[
  {
    "path": ".github/CONTRIBUTING.md",
    "content": "## Contributing to discord.py\n\nFirst off, thanks for taking the time to contribute. It makes the library substantially better. :+1:\n\nThe following is a set of guidelines for contributing to the repository. These are guidelines, not hard rules.\n\n## This is too much to read! I want to ask a question!\n\nGenerally speaking questions are better suited in our resources below.\n\n- The official support server: https://discord.gg/r3sSKJJ\n- The Discord API server under #python_discord-py: https://discord.gg/discord-api\n- [The FAQ in the documentation](https://discordpy.readthedocs.io/en/latest/faq.html)\n- [StackOverflow's `discord.py` tag](https://stackoverflow.com/questions/tagged/discord.py)\n\nPlease try your best not to ask questions in our issue tracker. Most of them don't belong there unless they provide value to a larger audience.\n\n## Good Bug Reports\n\nPlease be aware of the following things when filing bug reports.\n\n1. Don't open duplicate issues. Please search your issue to see if it has been asked already. Duplicate issues will be closed.\n2. When filing a bug about exceptions or tracebacks, please include the *complete* traceback. Without the complete traceback the issue might be **unsolvable** and you will be asked to provide more information.\n3. Make sure to provide enough information to make the issue workable. The issue template will generally walk you through the process but they are enumerated here as well:\n    - A **summary** of your bug report. This is generally a quick sentence or two to describe the issue in human terms.\n    - Guidance on **how to reproduce the issue**. Ideally, this should have a small code sample that allows us to run and see the issue for ourselves to debug. **Please make sure that the token is not displayed**. If you cannot provide a code snippet, then let us know what the steps were, how often it happens, etc.\n    - Tell us **what you expected to happen**. That way we can meet that expectation.\n    - Tell us **what actually happens**. What ends up happening in reality? It's not helpful to say \"it fails\" or \"it doesn't work\". Say *how* it failed, do you get an exception? Does it hang? How are the expectations different from reality?\n    - Tell us **information about your environment**. What version of discord.py are you using? How was it installed? What operating system are you running on? These are valuable questions and information that we use.\n\nIf the bug report is missing this information then it'll take us longer to fix the issue. We will probably ask for clarification, and barring that if no response was given then the issue will be closed.\n\n## Submitting a Pull Request\n\nSubmitting a pull request is fairly simple, just make sure it focuses on a single aspect and doesn't manage to have scope creep and it's probably good to go. It would be incredibly lovely if the style is consistent to that found in the project. This project follows PEP-8 guidelines (mostly) with a column limit of 125.\n\n### Git Commit Guidelines\n\n- Use present tense (e.g. \"Add feature\" not \"Added feature\")\n- Limit all lines to 72 characters or less.\n- Reference issues or pull requests outside of the first line.\n    - Please use the shorthand `#123` and not the full URL.\n- Commits regarding the commands extension must be prefixed with `[commands]`\n\nIf you do not meet any of these guidelines, don't fret. Chances are they will be fixed upon rebasing but please do try to meet them to remove some of the workload.\n"
  },
  {
    "path": ".github/FUNDING.yml",
    "content": "open_collective: discordpy\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/bug_report.yml",
    "content": "name: Bug Report\ndescription: Report broken or incorrect behaviour\nlabels: unconfirmed bug\nbody:\n  - type: markdown\n    attributes:\n      value: >\n        Thanks for taking the time to fill out a bug.\n        If you want real-time support, consider joining our Discord at https://discord.gg/r3sSKJJ instead.\n\n        Please note that this form is for bugs only!\n  - type: input\n    attributes:\n      label: Summary\n      description: A simple summary of your bug report\n    validations:\n      required: true\n  - type: textarea\n    attributes:\n      label: Reproduction Steps\n      description: >\n         What you did to make it happen.\n    validations:\n      required: true\n  - type: textarea\n    attributes:\n      label: Minimal Reproducible Code\n      description: >\n        A short snippet of code that showcases the bug.\n      render: python\n  - type: textarea\n    attributes:\n      label: Expected Results\n      description: >\n        What did you expect to happen?\n    validations:\n      required: true\n  - type: textarea\n    attributes:\n      label: Actual Results\n      description: >\n        What actually happened?\n    validations:\n      required: true\n  - type: input\n    attributes:\n      label: Intents\n      description: >\n        What intents are you using for your bot?\n        This is the `discord.Intents` class you pass to the client.\n    validations:\n      required: true\n  - type: textarea\n    attributes:\n      label: System Information\n      description: >\n        Run `python -m discord -v` and paste this information below.\n\n        This command required v1.1.0 or higher of the library. If this errors out then show some basic\n        information involving your system such as operating system and Python version.\n    validations:\n      required: true\n  - type: checkboxes\n    attributes:\n      label: Checklist\n      description: >\n        Let's make sure you've properly done due diligence when reporting this issue!\n      options:\n        - label: I have searched the open issues for duplicates.\n          required: true\n        - label: I have shown the entire traceback, if possible.\n          required: true\n        - label: I have removed my token from display, if visible.\n          required: true\n  - type: textarea\n    attributes:\n      label: Additional Context\n      description: If there is anything else to say, please do so here.\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/config.yml",
    "content": "blank_issues_enabled: false\ncontact_links:\n  - name: Ask a question\n    about: Ask questions and discuss with other users of the library.\n    url: https://github.com/Rapptz/discord.py/discussions\n  - name: Discord Server\n    about: Use our official Discord server to ask for help and questions as well.\n    url: https://discord.gg/r3sSKJJ\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/feature_request.yml",
    "content": "name: Feature Request\ndescription: Suggest a feature for this library\nlabels: feature request\nbody:\n  - type: input\n    attributes:\n      label: Summary\n      description: >\n        A short summary of what your feature request is.\n    validations:\n      required: true\n  - type: dropdown\n    attributes:\n      multiple: false\n      label: What is the feature request for?\n      options:\n        - The core library\n        - discord.ext.commands\n        - discord.ext.tasks\n        - The documentation\n    validations:\n      required: true\n  - type: textarea\n    attributes:\n      label: The Problem\n      description: >\n        What problem is your feature trying to solve?\n        What becomes easier or possible when this feature is implemented?\n    validations:\n      required: true\n  - type: textarea\n    attributes:\n      label: The Ideal Solution\n      description: >\n        What is your ideal solution to the problem?\n        What would you like this feature to do?\n    validations:\n      required: true\n  - type: textarea\n    attributes:\n      label: The Current Solution\n      description: >\n        What is the current solution to the problem, if any?\n    validations:\n      required: false\n  - type: textarea\n    attributes:\n      label: Additional Context\n      description: If there is anything else to say, please do so here.\n"
  },
  {
    "path": ".github/PULL_REQUEST_TEMPLATE.md",
    "content": "## Summary\n\n<!-- What is this pull request for? Does it fix any issues? -->\n\n## Checklist\n\n<!-- Put an x inside [ ] to check it, like so: [x] -->\n\n- [ ] If code changes were made then they have been tested.\n    - [ ] I have updated the documentation to reflect the changes.\n- [ ] This PR fixes an issue.\n- [ ] This PR adds something new (e.g. new method or parameters).\n- [ ] This PR is a breaking change (e.g. methods or parameters removed/renamed)\n- [ ] This PR is **not** a code change (e.g. documentation, README, ...)\n"
  },
  {
    "path": ".github/workflows/build.yml",
    "content": "name: build\n\non:\n  push:\n  pull_request:\n    types: [ opened, reopened, synchronize ]\n\njobs:\n  dists-and-docs:\n    runs-on: ubuntu-latest\n    strategy:\n      fail-fast: false\n      matrix:\n        python-version: [ '3.8', '3.x' ]\n        language: [ 'en', 'ja' ]\n\n    name: dists & docs (${{ matrix.python-version }}/${{ matrix.language }})\n    steps:\n      - uses: actions/checkout@v3\n        with:\n          fetch-depth: 0\n\n      - name: Set up CPython ${{ matrix.python-version }}\n        uses: actions/setup-python@v4\n        with:\n          python-version: ${{ matrix.python-version }}\n\n      - name: Install dependencies\n        run: |\n          python -m pip install --upgrade pip setuptools wheel\n          pip install -U -r requirements.txt\n\n      - name: Build distributions\n        run: |\n          python ./setup.py sdist bdist_wheel\n\n      # - name: Upload artifacts\n      #   uses: actions/upload-artifact@v2\n      #   with:\n      #     name: distributions\n      #     path: dist/*\n\n      - name: Install package\n        run: |\n          pip install -e .[docs,speed,voice]\n\n      - name: Build docs\n        shell: bash\n        run: |\n          cd docs\n          sphinx-build -b html -D language=${DOCS_LANGUAGE} -j auto -a -n -T -W --keep-going . _build/html\n        env:\n          DOCS_LANGUAGE: ${{ matrix.language }}\n\n      # - name: Upload docs\n      #   uses: actions/upload-artifact@v2\n      #   if: always()\n      #   with:\n      #     name: docs-${{ matrix.language }}\n      #     path: docs/_build/html/*\n"
  },
  {
    "path": ".github/workflows/crowdin_download.yml",
    "content": "name: crowdin download\n\non:\n  schedule:\n    - cron: '0 18 * * 1'\n  workflow_dispatch:\n\njobs:\n  check-environment:\n    runs-on: ubuntu-latest\n    environment: Crowdin\n    outputs:\n      available: ${{ steps.check.outputs.available }}\n    steps:\n      - id: check\n        if: env.CROWDIN_API_KEY != null\n        run: |\n          echo \"available=true\" >> $GITHUB_OUTPUT\n        env:\n          CROWDIN_API_KEY: ${{ secrets.CROWDIN_API_KEY }}\n\n  download:\n    runs-on: ubuntu-latest\n    needs: [ check-environment ]\n    # secrets cannot be accessed inside an `if` so this needs to be checked in separate job\n    if: needs.check-environment.outputs.available == 'true'\n    environment: Crowdin\n    name: download\n    steps:\n      - uses: actions/checkout@v2\n        with:\n          fetch-depth: 0\n          ref: master\n\n      - name: Install system dependencies\n        run: |\n          wget -qO - https://artifacts.crowdin.com/repo/GPG-KEY-crowdin | sudo apt-key add -\n          echo \"deb https://artifacts.crowdin.com/repo/deb/ /\" | sudo tee -a /etc/apt/sources.list.d/crowdin.list\n          sudo apt-get update -qq\n          sudo apt-get install -y crowdin3\n\n      - name: Download translations\n        shell: bash\n        run: |\n          cd docs\n          crowdin download --all\n        env:\n          CROWDIN_API_KEY: ${{ secrets.CROWDIN_API_KEY }}\n\n      - name: Create pull request\n        id: cpr_crowdin\n        uses: peter-evans/create-pull-request@v3\n        with:\n          token: ${{ secrets.GITHUB_TOKEN }}\n          commit-message: Crowdin translations download\n          title: \"[Crowdin] Updated translation files\"\n          body: |\n            Created by the [Crowdin download workflow](.github/workflows/crowdin_download.yml).\n          branch: \"auto/crowdin\"\n          author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>\n\n      - name: Close and reopen the PR with different token to trigger CI\n        uses: actions/github-script@v3\n        env:\n          PR_NUMBER: ${{ steps.cpr_crowdin.outputs.pull-request-number }}\n          PR_OPERATION: ${{ steps.cpr_crowdin.outputs.pull-request-operation }}\n        with:\n          github-token: ${{ secrets.GH_REPO_SCOPED_TOKEN }}\n          script: |\n            const script = require(\n              `${process.env.GITHUB_WORKSPACE}/.github/workflows/scripts/close_and_reopen_pr.js`\n            );\n            console.log(script({github, context}));\n"
  },
  {
    "path": ".github/workflows/crowdin_upload.yml",
    "content": "name: crowdin upload\n\non:\n  workflow_dispatch:\n\njobs:\n  upload:\n    runs-on: ubuntu-latest\n    environment: Crowdin\n    name: upload\n    steps:\n      - uses: actions/checkout@v3\n        with:\n          fetch-depth: 0\n\n      - name: Set up CPython 3.x\n        uses: actions/setup-python@v4\n        with:\n          python-version: 3.x\n\n      - name: Install system dependencies\n        run: |\n          wget -qO - https://artifacts.crowdin.com/repo/GPG-KEY-crowdin | sudo apt-key add -\n          echo \"deb https://artifacts.crowdin.com/repo/deb/ /\" | sudo tee -a /etc/apt/sources.list.d/crowdin.list\n          sudo apt-get update -qq\n          sudo apt-get install -y crowdin3\n\n      - name: Install Python dependencies\n        run: |\n          python -m pip install --upgrade pip setuptools wheel\n          pip install -e .[docs,speed,voice]\n\n      - name: Build gettext\n        run: |\n          cd docs\n          make gettext\n\n      - name: Upload sources\n        shell: bash\n        run: |\n          cd docs\n          crowdin upload\n        env:\n          CROWDIN_API_KEY: ${{ secrets.CROWDIN_API_KEY }}\n"
  },
  {
    "path": ".github/workflows/lint.yml",
    "content": "name: lint\n\non:\n  push:\n  pull_request:\n    types: [ opened, reopened, synchronize ]\n\njobs:\n  check:\n    runs-on: ubuntu-latest\n    strategy:\n      fail-fast: false\n      matrix:\n        python-version: [ '3.8', '3.x' ]\n\n    name: check ${{ matrix.python-version }}\n    steps:\n      - uses: actions/checkout@v3\n        with:\n          fetch-depth: 0\n\n      - name: Set up CPython ${{ matrix.python-version }}\n        uses: actions/setup-python@v4\n        with:\n          python-version: ${{ matrix.python-version }}\n\n      - name: Install dependencies\n        id: install-deps\n        run: |\n          python -m pip install --upgrade pip setuptools wheel black==22.6 requests\n          pip install -U -r requirements.txt\n\n      - name: Setup node.js\n        uses: actions/setup-node@v3\n        with:\n          node-version: '16'\n\n      - name: Run Pyright\n        uses: jakebailey/pyright-action@v1\n        with:\n          version: '1.1.351'\n          warnings: false\n          no-comments: ${{ matrix.python-version != '3.x' }}\n\n      - name: Run black\n        if: ${{ always() && steps.install-deps.outcome == 'success' }}\n        run: |\n          black --check discord examples\n"
  },
  {
    "path": ".github/workflows/scripts/close_and_reopen_pr.js",
    "content": "module.exports = (async function ({github, context}) {\n    const pr_number = process.env.PR_NUMBER;\n    const pr_operation = process.env.PR_OPERATION;\n\n    if (!['created', 'updated'].includes(pr_operation)) {\n        console.log('PR was not created as there were no changes.')\n        return;\n    }\n\n    for (const state of ['closed', 'open']) {\n        // Wait a moment for GitHub to process the previous action..\n        await new Promise(r => setTimeout(r, 5000));\n\n        // Close the PR\n        github.issues.update({\n            issue_number: pr_number,\n            owner: context.repo.owner,\n            repo: context.repo.repo,\n            state\n        });\n    }\n})\n"
  },
  {
    "path": ".github/workflows/test.yml",
    "content": "name: test\n\non:\n  push:\n  pull_request:\n    types: [ opened, reopened, synchronize ]\n\njobs:\n  pytest:\n    runs-on: ubuntu-latest\n    strategy:\n      fail-fast: false\n      matrix:\n        python-version: [ '3.8', '3.x' ]\n\n    name: pytest ${{ matrix.python-version }}\n    steps:\n      - uses: actions/checkout@v3\n        with:\n          fetch-depth: 0\n\n      - name: Set up CPython ${{ matrix.python-version }}\n        uses: actions/setup-python@v4\n        with:\n          python-version: ${{ matrix.python-version }}\n\n      - name: Install dependencies\n        run: |\n          python -m pip install -e .[test]\n\n      - name: Run tests\n        shell: bash\n        run: |\n          PYTHONPATH=\"$(pwd)\" pytest -vs --cov=discord --cov-report term-missing:skip-covered\n"
  },
  {
    "path": ".gitignore",
    "content": "*.json\n*.py[cod]\n*.log\n*.egg-info\nvenv\n.venv\ndocs/_build\ndocs/crowdin.py\n*.buildinfo\n*.mp3\n*.m4a\n*.wav\n*.png\n*.jpg\n*.flac\n*.mo\n/.coverage\nbuild/*\n"
  },
  {
    "path": ".readthedocs.yml",
    "content": "version: 2\nformats: []\n\nbuild:\n  os: \"ubuntu-22.04\"\n  tools:\n    python: \"3.8\"\n\nsphinx:\n  configuration: docs/conf.py\n  fail_on_warning: false\n  builder: html\n\npython:\n  install:\n    - method: pip\n      path: .\n      extra_requirements:\n        - docs\n"
  },
  {
    "path": "LICENSE",
    "content": "The MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n"
  },
  {
    "path": "MANIFEST.in",
    "content": "include README.rst\ninclude LICENSE\ninclude requirements.txt\ninclude discord/bin/*.dll\ninclude discord/py.typed\n"
  },
  {
    "path": "README.ja.rst",
    "content": "discord.py\n==========\n\n.. image:: https://discord.com/api/guilds/336642139381301249/embed.png\n   :target: https://discord.gg/nXzj3dg\n   :alt: Discordサーバーの招待\n.. image:: https://img.shields.io/pypi/v/discord.py.svg\n   :target: https://pypi.python.org/pypi/discord.py\n   :alt: PyPIのバージョン情報\n.. image:: https://img.shields.io/pypi/pyversions/discord.py.svg\n   :target: https://pypi.python.org/pypi/discord.py\n   :alt: PyPIのサポートしているPythonのバージョン\n\ndiscord.py は機能豊富かつモダンで使いやすい、非同期処理にも対応したDiscord用のAPIラッパーです。\n\n主な特徴\n-------------\n\n- ``async`` と ``await`` を使ったモダンなPythonらしいAPI。\n- 適切なレート制限処理\n- メモリと速度の両方を最適化。\n\nインストール\n-------------\n\n**Python 3.8 以降のバージョンが必須です**\n\n完全な音声サポートなしでライブラリをインストールする場合は次のコマンドを実行してください:\n\n.. code:: sh\n\n    # Linux/macOS\n    python3 -m pip install -U discord.py\n\n    # Windows\n    py -3 -m pip install -U discord.py\n\n音声サポートが必要なら、次のコマンドを実行しましょう:\n\n.. code:: sh\n\n    # Linux/macOS\n    python3 -m pip install -U discord.py[voice]\n\n    # Windows\n    py -3 -m pip install -U discord.py[voice]\n\n\n開発版をインストールしたいのならば、次の手順に従ってください:\n\n.. code:: sh\n\n    $ git clone https://github.com/Rapptz/discord.py\n    $ cd discord.py\n    $ python3 -m pip install -U .[voice]\n\n\nオプションパッケージ\n~~~~~~~~~~~~~~~~~~~~~~\n\n* PyNaCl (音声サポート用)\n\nLinuxで音声サポートを導入するには、前述のコマンドを実行する前にお気に入りのパッケージマネージャー(例えば ``apt`` や ``dnf`` など)を使って以下のパッケージをインストールする必要があります:\n\n* libffi-dev (システムによっては ``libffi-devel``)\n* python-dev (例えばPython 3.8用の ``python3.8-dev``)\n\n簡単な例\n--------------\n\n.. code:: py\n\n    import discord\n\n    class MyClient(discord.Client):\n        async def on_ready(self):\n            print('Logged on as', self.user)\n\n        async def on_message(self, message):\n            # don't respond to ourselves\n            if message.author == self.user:\n                return\n\n            if message.content == 'ping':\n                await message.channel.send('pong')\n\n    intents = discord.Intents.default()\n    intents.message_content = True\n    client = MyClient(intents=intents)\n    client.run('token')\n\nBotの例\n~~~~~~~~~~~~~\n\n.. code:: py\n\n    import discord\n    from discord.ext import commands\n\n    intents = discord.Intents.default()\n    intents.message_content = True\n    bot = commands.Bot(command_prefix='>', intents=intents)\n\n    @bot.command()\n    async def ping(ctx):\n        await ctx.send('pong')\n\n    bot.run('token')\n\nexamplesディレクトリに更に多くのサンプルがあります。\n\nリンク\n------\n\n- `ドキュメント <https://discordpy.readthedocs.io/ja/latest/index.html>`_\n- `公式Discordサーバー <https://discord.gg/nXzj3dg>`_\n- `Discord API <https://discord.gg/discord-api>`_\n"
  },
  {
    "path": "README.rst",
    "content": "discord.py\n==========\n\n.. image:: https://discord.com/api/guilds/336642139381301249/embed.png\n   :target: https://discord.gg/r3sSKJJ\n   :alt: Discord server invite\n.. image:: https://img.shields.io/pypi/v/discord.py.svg\n   :target: https://pypi.python.org/pypi/discord.py\n   :alt: PyPI version info\n.. image:: https://img.shields.io/pypi/pyversions/discord.py.svg\n   :target: https://pypi.python.org/pypi/discord.py\n   :alt: PyPI supported Python versions\n\nA modern, easy to use, feature-rich, and async ready API wrapper for Discord written in Python.\n\nKey Features\n-------------\n\n- Modern Pythonic API using ``async`` and ``await``.\n- Proper rate limit handling.\n- Optimised in both speed and memory.\n\nInstalling\n----------\n\n**Python 3.8 or higher is required**\n\nTo install the library without full voice support, you can just run the following command:\n\n.. code:: sh\n\n    # Linux/macOS\n    python3 -m pip install -U discord.py\n\n    # Windows\n    py -3 -m pip install -U discord.py\n\nOtherwise to get voice support you should run the following command:\n\n.. code:: sh\n\n    # Linux/macOS\n    python3 -m pip install -U \"discord.py[voice]\"\n\n    # Windows\n    py -3 -m pip install -U discord.py[voice]\n\n\nTo install the development version, do the following:\n\n.. code:: sh\n\n    $ git clone https://github.com/Rapptz/discord.py\n    $ cd discord.py\n    $ python3 -m pip install -U .[voice]\n\n\nOptional Packages\n~~~~~~~~~~~~~~~~~~\n\n* `PyNaCl <https://pypi.org/project/PyNaCl/>`__ (for voice support)\n\nPlease note that when installing voice support on Linux, you must install the following packages via your favourite package manager (e.g. ``apt``, ``dnf``, etc) before running the above commands:\n\n* libffi-dev (or ``libffi-devel`` on some systems)\n* python-dev (e.g. ``python3.8-dev`` for Python 3.8)\n\nQuick Example\n--------------\n\n.. code:: py\n\n    import discord\n\n    class MyClient(discord.Client):\n        async def on_ready(self):\n            print('Logged on as', self.user)\n\n        async def on_message(self, message):\n            # don't respond to ourselves\n            if message.author == self.user:\n                return\n\n            if message.content == 'ping':\n                await message.channel.send('pong')\n\n    intents = discord.Intents.default()\n    intents.message_content = True\n    client = MyClient(intents=intents)\n    client.run('token')\n\nBot Example\n~~~~~~~~~~~~~\n\n.. code:: py\n\n    import discord\n    from discord.ext import commands\n\n    intents = discord.Intents.default()\n    intents.message_content = True\n    bot = commands.Bot(command_prefix='>', intents=intents)\n\n    @bot.command()\n    async def ping(ctx):\n        await ctx.send('pong')\n\n    bot.run('token')\n\nYou can find more examples in the examples directory.\n\nLinks\n------\n\n- `Documentation <https://discordpy.readthedocs.io/en/latest/index.html>`_\n- `Official Discord Server <https://discord.gg/r3sSKJJ>`_\n- `Discord API <https://discord.gg/discord-api>`_\n"
  },
  {
    "path": "discord/__init__.py",
    "content": "\"\"\"\nDiscord API Wrapper\n~~~~~~~~~~~~~~~~~~~\n\nA basic wrapper for the Discord API.\n\n:copyright: (c) 2015-present Rapptz\n:license: MIT, see LICENSE for more details.\n\n\"\"\"\n\n__title__ = 'discord'\n__author__ = 'Rapptz'\n__license__ = 'MIT'\n__copyright__ = 'Copyright 2015-present Rapptz'\n__version__ = '2.5.0a'\n\n__path__ = __import__('pkgutil').extend_path(__path__, __name__)\n\nimport logging\nfrom typing import NamedTuple, Literal\n\nfrom .client import *\nfrom .appinfo import *\nfrom .user import *\nfrom .emoji import *\nfrom .partial_emoji import *\nfrom .activity import *\nfrom .channel import *\nfrom .guild import *\nfrom .flags import *\nfrom .member import *\nfrom .message import *\nfrom .asset import *\nfrom .errors import *\nfrom .permissions import *\nfrom .role import *\nfrom .file import *\nfrom .colour import *\nfrom .integrations import *\nfrom .invite import *\nfrom .template import *\nfrom .welcome_screen import *\nfrom .sku import *\nfrom .widget import *\nfrom .object import *\nfrom .reaction import *\nfrom . import (\n    utils as utils,\n    opus as opus,\n    abc as abc,\n    ui as ui,\n    app_commands as app_commands,\n)\nfrom .enums import *\nfrom .embeds import *\nfrom .mentions import *\nfrom .shard import *\nfrom .player import *\nfrom .webhook import *\nfrom .voice_client import *\nfrom .audit_logs import *\nfrom .raw_models import *\nfrom .team import *\nfrom .sticker import *\nfrom .stage_instance import *\nfrom .scheduled_event import *\nfrom .interactions import *\nfrom .components import *\nfrom .threads import *\nfrom .automod import *\nfrom .poll import *\n\n\nclass VersionInfo(NamedTuple):\n    major: int\n    minor: int\n    micro: int\n    releaselevel: Literal[\"alpha\", \"beta\", \"candidate\", \"final\"]\n    serial: int\n\n\nversion_info: VersionInfo = VersionInfo(major=2, minor=5, micro=0, releaselevel='alpha', serial=0)\n\nlogging.getLogger(__name__).addHandler(logging.NullHandler())\n\ndel logging, NamedTuple, Literal, VersionInfo\n"
  },
  {
    "path": "discord/__main__.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom __future__ import annotations\n\nfrom typing import Optional, Tuple, Dict\n\nimport argparse\nimport sys\nfrom pathlib import Path\n\nimport discord\nimport importlib.metadata\nimport aiohttp\nimport platform\n\n\ndef show_version() -> None:\n    entries = []\n\n    entries.append('- Python v{0.major}.{0.minor}.{0.micro}-{0.releaselevel}'.format(sys.version_info))\n    version_info = discord.version_info\n    entries.append('- discord.py v{0.major}.{0.minor}.{0.micro}-{0.releaselevel}'.format(version_info))\n    if version_info.releaselevel != 'final':\n        version = importlib.metadata.version('discord.py')\n        if version:\n            entries.append(f'    - discord.py metadata: v{version}')\n\n    entries.append(f'- aiohttp v{aiohttp.__version__}')\n    uname = platform.uname()\n    entries.append('- system info: {0.system} {0.release} {0.version}'.format(uname))\n    print('\\n'.join(entries))\n\n\ndef core(parser: argparse.ArgumentParser, args: argparse.Namespace) -> None:\n    if args.version:\n        show_version()\n    else:\n        parser.print_help()\n\n\n_bot_template = \"\"\"#!/usr/bin/env python3\n\nfrom discord.ext import commands\nimport discord\nimport config\n\nclass Bot(commands.{base}):\n    def __init__(self, intents: discord.Intents, **kwargs):\n        super().__init__(command_prefix=commands.when_mentioned_or('{prefix}'), intents=intents, **kwargs)\n\n    async def setup_hook(self):\n        for cog in config.cogs:\n            try:\n                await self.load_extension(cog)\n            except Exception as exc:\n                print(f'Could not load extension {{cog}} due to {{exc.__class__.__name__}}: {{exc}}')\n\n    async def on_ready(self):\n        print(f'Logged on as {{self.user}} (ID: {{self.user.id}})')\n\n\nintents = discord.Intents.default()\nintents.message_content = True\nbot = Bot(intents=intents)\n\n# write general commands here\n\nbot.run(config.token)\n\"\"\"\n\n_gitignore_template = \"\"\"# Byte-compiled / optimized / DLL files\n__pycache__/\n*.py[cod]\n*$py.class\n\n# C extensions\n*.so\n\n# Distribution / packaging\n.Python\nenv/\nbuild/\ndevelop-eggs/\ndist/\ndownloads/\neggs/\n.eggs/\nlib/\nlib64/\nparts/\nsdist/\nvar/\n*.egg-info/\n.installed.cfg\n*.egg\n\n# Our configuration files\nconfig.py\n\"\"\"\n\n_cog_template = '''from discord.ext import commands\nimport discord\n\nclass {name}(commands.Cog{attrs}):\n    \"\"\"The description for {name} goes here.\"\"\"\n\n    def __init__(self, bot):\n        self.bot = bot\n{extra}\nasync def setup(bot):\n    await bot.add_cog({name}(bot))\n'''\n\n_cog_extras = '''\n    async def cog_load(self):\n        # loading logic goes here\n        pass\n\n    async def cog_unload(self):\n        # clean up logic goes here\n        pass\n\n    async def cog_check(self, ctx):\n        # checks that apply to every command in here\n        return True\n\n    async def bot_check(self, ctx):\n        # checks that apply to every command to the bot\n        return True\n\n    async def bot_check_once(self, ctx):\n        # check that apply to every command but is guaranteed to be called only once\n        return True\n\n    async def cog_command_error(self, ctx, error):\n        # error handling to every command in here\n        pass\n\n    async def cog_app_command_error(self, interaction, error):\n        # error handling to every application command in here\n        pass\n\n    async def cog_before_invoke(self, ctx):\n        # called before a command is called here\n        pass\n\n    async def cog_after_invoke(self, ctx):\n        # called after a command is called here\n        pass\n\n'''\n\n\n# certain file names and directory names are forbidden\n# see: https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247%28v=vs.85%29.aspx\n# although some of this doesn't apply to Linux, we might as well be consistent\n_base_table: Dict[str, Optional[str]] = {\n    '<': '-',\n    '>': '-',\n    ':': '-',\n    '\"': '-',\n    # '/': '-', these are fine\n    # '\\\\': '-',\n    '|': '-',\n    '?': '-',\n    '*': '-',\n}\n\n# NUL (0) and 1-31 are disallowed\n_base_table.update((chr(i), None) for i in range(32))\n\n_translation_table = str.maketrans(_base_table)\n\n\ndef to_path(parser: argparse.ArgumentParser, name: str, *, replace_spaces: bool = False) -> Path:\n    if isinstance(name, Path):\n        return name\n\n    if sys.platform == 'win32':\n        forbidden = (\n            'CON',\n            'PRN',\n            'AUX',\n            'NUL',\n            'COM1',\n            'COM2',\n            'COM3',\n            'COM4',\n            'COM5',\n            'COM6',\n            'COM7',\n            'COM8',\n            'COM9',\n            'LPT1',\n            'LPT2',\n            'LPT3',\n            'LPT4',\n            'LPT5',\n            'LPT6',\n            'LPT7',\n            'LPT8',\n            'LPT9',\n        )\n        if len(name) <= 4 and name.upper() in forbidden:\n            parser.error('invalid directory name given, use a different one')\n\n    name = name.translate(_translation_table)\n    if replace_spaces:\n        name = name.replace(' ', '-')\n    return Path(name)\n\n\ndef newbot(parser: argparse.ArgumentParser, args: argparse.Namespace) -> None:\n    new_directory = to_path(parser, args.directory) / to_path(parser, args.name)\n\n    # as a note exist_ok for Path is a 3.5+ only feature\n    # since we already checked above that we're >3.5\n    try:\n        new_directory.mkdir(exist_ok=True, parents=True)\n    except OSError as exc:\n        parser.error(f'could not create our bot directory ({exc})')\n\n    cogs = new_directory / 'cogs'\n\n    try:\n        cogs.mkdir(exist_ok=True)\n        init = cogs / '__init__.py'\n        init.touch()\n    except OSError as exc:\n        print(f'warning: could not create cogs directory ({exc})')\n\n    try:\n        with open(str(new_directory / 'config.py'), 'w', encoding='utf-8') as fp:\n            fp.write('token = \"place your token here\"\\ncogs = []\\n')\n    except OSError as exc:\n        parser.error(f'could not create config file ({exc})')\n\n    try:\n        with open(str(new_directory / 'bot.py'), 'w', encoding='utf-8') as fp:\n            base = 'Bot' if not args.sharded else 'AutoShardedBot'\n            fp.write(_bot_template.format(base=base, prefix=args.prefix))\n    except OSError as exc:\n        parser.error(f'could not create bot file ({exc})')\n\n    if not args.no_git:\n        try:\n            with open(str(new_directory / '.gitignore'), 'w', encoding='utf-8') as fp:\n                fp.write(_gitignore_template)\n        except OSError as exc:\n            print(f'warning: could not create .gitignore file ({exc})')\n\n    print('successfully made bot at', new_directory)\n\n\ndef newcog(parser: argparse.ArgumentParser, args: argparse.Namespace) -> None:\n    cog_dir = to_path(parser, args.directory)\n    try:\n        cog_dir.mkdir(exist_ok=True)\n    except OSError as exc:\n        print(f'warning: could not create cogs directory ({exc})')\n\n    directory = cog_dir / to_path(parser, args.name)\n    directory = directory.with_suffix('.py')\n    try:\n        with open(str(directory), 'w', encoding='utf-8') as fp:\n            attrs = ''\n            extra = _cog_extras if args.full else ''\n            if args.class_name:\n                name = args.class_name\n            else:\n                name = str(directory.stem)\n                if '-' in name or '_' in name:\n                    translation = str.maketrans('-_', '  ')\n                    name = name.translate(translation).title().replace(' ', '')\n                else:\n                    name = name.title()\n\n            if args.display_name:\n                attrs += f', name=\"{args.display_name}\"'\n            if args.hide_commands:\n                attrs += ', command_attrs=dict(hidden=True)'\n            fp.write(_cog_template.format(name=name, extra=extra, attrs=attrs))\n    except OSError as exc:\n        parser.error(f'could not create cog file ({exc})')\n    else:\n        print('successfully made cog at', directory)\n\n\ndef add_newbot_args(subparser: argparse._SubParsersAction[argparse.ArgumentParser]) -> None:\n    parser = subparser.add_parser('newbot', help='creates a command bot project quickly')\n    parser.set_defaults(func=newbot)\n\n    parser.add_argument('name', help='the bot project name')\n    parser.add_argument('directory', help='the directory to place it in (default: .)', nargs='?', default=Path.cwd())\n    parser.add_argument('--prefix', help='the bot prefix (default: $)', default='$', metavar='<prefix>')\n    parser.add_argument('--sharded', help='whether to use AutoShardedBot', action='store_true')\n    parser.add_argument('--no-git', help='do not create a .gitignore file', action='store_true', dest='no_git')\n\n\ndef add_newcog_args(subparser: argparse._SubParsersAction[argparse.ArgumentParser]) -> None:\n    parser = subparser.add_parser('newcog', help='creates a new cog template quickly')\n    parser.set_defaults(func=newcog)\n\n    parser.add_argument('name', help='the cog name')\n    parser.add_argument('directory', help='the directory to place it in (default: cogs)', nargs='?', default=Path('cogs'))\n    parser.add_argument('--class-name', help='the class name of the cog (default: <name>)', dest='class_name')\n    parser.add_argument('--display-name', help='the cog name (default: <name>)')\n    parser.add_argument('--hide-commands', help='whether to hide all commands in the cog', action='store_true')\n    parser.add_argument('--full', help='add all special methods as well', action='store_true')\n\n\ndef parse_args() -> Tuple[argparse.ArgumentParser, argparse.Namespace]:\n    parser = argparse.ArgumentParser(prog='discord', description='Tools for helping with discord.py')\n    parser.add_argument('-v', '--version', action='store_true', help='shows the library version')\n    parser.set_defaults(func=core)\n\n    subparser = parser.add_subparsers(dest='subcommand', title='subcommands')\n    add_newbot_args(subparser)\n    add_newcog_args(subparser)\n    return parser, parser.parse_args()\n\n\ndef main() -> None:\n    parser, args = parse_args()\n    args.func(parser, args)\n\n\nif __name__ == '__main__':\n    main()\n"
  },
  {
    "path": "discord/_types.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom __future__ import annotations\nfrom typing import TypeVar, TYPE_CHECKING\n\nif TYPE_CHECKING:\n    from typing_extensions import TypeVar\n    from .client import Client\n\n    ClientT = TypeVar('ClientT', bound=Client, covariant=True, default=Client)\nelse:\n    ClientT = TypeVar('ClientT', bound='Client', covariant=True)\n"
  },
  {
    "path": "discord/abc.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom __future__ import annotations\n\nimport copy\nimport time\nimport asyncio\nfrom datetime import datetime\nfrom typing import (\n    Any,\n    AsyncIterator,\n    Callable,\n    Dict,\n    Iterable,\n    List,\n    Optional,\n    TYPE_CHECKING,\n    Protocol,\n    Sequence,\n    Tuple,\n    TypeVar,\n    Union,\n    overload,\n    runtime_checkable,\n)\n\nfrom .object import OLDEST_OBJECT, Object\nfrom .context_managers import Typing\nfrom .enums import ChannelType, InviteTarget\nfrom .errors import ClientException, NotFound\nfrom .mentions import AllowedMentions\nfrom .permissions import PermissionOverwrite, Permissions\nfrom .role import Role\nfrom .invite import Invite\nfrom .file import File\nfrom .http import handle_message_parameters\nfrom .voice_client import VoiceClient, VoiceProtocol\nfrom .sticker import GuildSticker, StickerItem\nfrom . import utils\n\n__all__ = (\n    'Snowflake',\n    'User',\n    'PrivateChannel',\n    'GuildChannel',\n    'Messageable',\n    'Connectable',\n)\n\nT = TypeVar('T', bound=VoiceProtocol)\n\nif TYPE_CHECKING:\n    from typing_extensions import Self\n\n    from .client import Client\n    from .user import ClientUser\n    from .asset import Asset\n    from .state import ConnectionState\n    from .guild import Guild\n    from .member import Member\n    from .channel import CategoryChannel\n    from .embeds import Embed\n    from .message import Message, MessageReference, PartialMessage\n    from .channel import (\n        TextChannel,\n        DMChannel,\n        GroupChannel,\n        PartialMessageable,\n        VocalGuildChannel,\n        VoiceChannel,\n        StageChannel,\n    )\n    from .poll import Poll\n    from .threads import Thread\n    from .ui.view import View\n    from .types.channel import (\n        PermissionOverwrite as PermissionOverwritePayload,\n        Channel as ChannelPayload,\n        GuildChannel as GuildChannelPayload,\n        OverwriteType,\n    )\n    from .types.snowflake import (\n        SnowflakeList,\n    )\n\n    PartialMessageableChannel = Union[TextChannel, VoiceChannel, StageChannel, Thread, DMChannel, PartialMessageable]\n    MessageableChannel = Union[PartialMessageableChannel, GroupChannel]\n    SnowflakeTime = Union[\"Snowflake\", datetime]\n\nMISSING = utils.MISSING\n\n\nclass _Undefined:\n    def __repr__(self) -> str:\n        return 'see-below'\n\n\n_undefined: Any = _Undefined()\n\n\nasync def _single_delete_strategy(messages: Iterable[Message], *, reason: Optional[str] = None):\n    for m in messages:\n        try:\n            await m.delete()\n        except NotFound as exc:\n            if exc.code == 10008:\n                continue  # bulk deletion ignores not found messages, single deletion does not.\n            # several other race conditions with deletion should fail without continuing,\n            # such as the channel being deleted and not found.\n            raise\n\n\nasync def _purge_helper(\n    channel: Union[Thread, TextChannel, VocalGuildChannel],\n    *,\n    limit: Optional[int] = 100,\n    check: Callable[[Message], bool] = MISSING,\n    before: Optional[SnowflakeTime] = None,\n    after: Optional[SnowflakeTime] = None,\n    around: Optional[SnowflakeTime] = None,\n    oldest_first: Optional[bool] = None,\n    bulk: bool = True,\n    reason: Optional[str] = None,\n) -> List[Message]:\n    if check is MISSING:\n        check = lambda m: True\n\n    iterator = channel.history(limit=limit, before=before, after=after, oldest_first=oldest_first, around=around)\n    ret: List[Message] = []\n    count = 0\n\n    minimum_time = int((time.time() - 14 * 24 * 60 * 60) * 1000.0 - 1420070400000) << 22\n    strategy = channel.delete_messages if bulk else _single_delete_strategy\n\n    async for message in iterator:\n        if count == 100:\n            to_delete = ret[-100:]\n            await strategy(to_delete, reason=reason)\n            count = 0\n            await asyncio.sleep(1)\n\n        if not check(message):\n            continue\n\n        if message.id < minimum_time:\n            # older than 14 days old\n            if count == 1:\n                await ret[-1].delete()\n            elif count >= 2:\n                to_delete = ret[-count:]\n                await strategy(to_delete, reason=reason)\n\n            count = 0\n            strategy = _single_delete_strategy\n\n        count += 1\n        ret.append(message)\n\n    # Some messages remaining to poll\n    if count >= 2:\n        # more than 2 messages -> bulk delete\n        to_delete = ret[-count:]\n        await strategy(to_delete, reason=reason)\n    elif count == 1:\n        # delete a single message\n        await ret[-1].delete()\n\n    return ret\n\n\n@runtime_checkable\nclass Snowflake(Protocol):\n    \"\"\"An ABC that details the common operations on a Discord model.\n\n    Almost all :ref:`Discord models <discord_api_models>` meet this\n    abstract base class.\n\n    If you want to create a snowflake on your own, consider using\n    :class:`.Object`.\n\n    Attributes\n    -----------\n    id: :class:`int`\n        The model's unique ID.\n    \"\"\"\n\n    id: int\n\n\n@runtime_checkable\nclass User(Snowflake, Protocol):\n    \"\"\"An ABC that details the common operations on a Discord user.\n\n    The following implement this ABC:\n\n    - :class:`~discord.User`\n    - :class:`~discord.ClientUser`\n    - :class:`~discord.Member`\n\n    This ABC must also implement :class:`~discord.abc.Snowflake`.\n\n    Attributes\n    -----------\n    name: :class:`str`\n        The user's username.\n    discriminator: :class:`str`\n        The user's discriminator. This is a legacy concept that is no longer used.\n    global_name: Optional[:class:`str`]\n        The user's global nickname.\n    bot: :class:`bool`\n        If the user is a bot account.\n    system: :class:`bool`\n        If the user is a system account.\n    \"\"\"\n\n    name: str\n    discriminator: str\n    global_name: Optional[str]\n    bot: bool\n    system: bool\n\n    @property\n    def display_name(self) -> str:\n        \"\"\":class:`str`: Returns the user's display name.\"\"\"\n        raise NotImplementedError\n\n    @property\n    def mention(self) -> str:\n        \"\"\":class:`str`: Returns a string that allows you to mention the given user.\"\"\"\n        raise NotImplementedError\n\n    @property\n    def avatar(self) -> Optional[Asset]:\n        \"\"\"Optional[:class:`~discord.Asset`]: Returns an Asset that represents the user's avatar, if present.\"\"\"\n        raise NotImplementedError\n\n    @property\n    def avatar_decoration(self) -> Optional[Asset]:\n        \"\"\"Optional[:class:`~discord.Asset`]: Returns an Asset that represents the user's avatar decoration, if present.\n\n        .. versionadded:: 2.4\n        \"\"\"\n        raise NotImplementedError\n\n    @property\n    def avatar_decoration_sku_id(self) -> Optional[int]:\n        \"\"\"Optional[:class:`int`]: Returns an integer that represents the user's avatar decoration SKU ID, if present.\n\n        .. versionadded:: 2.4\n        \"\"\"\n        raise NotImplementedError\n\n    @property\n    def default_avatar(self) -> Asset:\n        \"\"\":class:`~discord.Asset`: Returns the default avatar for a given user.\"\"\"\n        raise NotImplementedError\n\n    @property\n    def display_avatar(self) -> Asset:\n        \"\"\":class:`~discord.Asset`: Returns the user's display avatar.\n\n        For regular users this is just their default avatar or uploaded avatar.\n\n        .. versionadded:: 2.0\n        \"\"\"\n        raise NotImplementedError\n\n    def mentioned_in(self, message: Message) -> bool:\n        \"\"\"Checks if the user is mentioned in the specified message.\n\n        Parameters\n        -----------\n        message: :class:`~discord.Message`\n            The message to check if you're mentioned in.\n\n        Returns\n        -------\n        :class:`bool`\n            Indicates if the user is mentioned in the message.\n        \"\"\"\n        raise NotImplementedError\n\n\nclass PrivateChannel:\n    \"\"\"An ABC that details the common operations on a private Discord channel.\n\n    The following implement this ABC:\n\n    - :class:`~discord.DMChannel`\n    - :class:`~discord.GroupChannel`\n\n    This ABC must also implement :class:`~discord.abc.Snowflake`.\n\n    Attributes\n    -----------\n    me: :class:`~discord.ClientUser`\n        The user presenting yourself.\n    \"\"\"\n\n    __slots__ = ()\n\n    id: int\n    me: ClientUser\n\n\nclass _Overwrites:\n    __slots__ = ('id', 'allow', 'deny', 'type')\n\n    ROLE = 0\n    MEMBER = 1\n\n    def __init__(self, data: PermissionOverwritePayload) -> None:\n        self.id: int = int(data['id'])\n        self.allow: int = int(data.get('allow', 0))\n        self.deny: int = int(data.get('deny', 0))\n        self.type: OverwriteType = data['type']\n\n    def _asdict(self) -> PermissionOverwritePayload:\n        return {\n            'id': self.id,\n            'allow': str(self.allow),\n            'deny': str(self.deny),\n            'type': self.type,\n        }\n\n    def is_role(self) -> bool:\n        return self.type == 0\n\n    def is_member(self) -> bool:\n        return self.type == 1\n\n\nclass GuildChannel:\n    \"\"\"An ABC that details the common operations on a Discord guild channel.\n\n    The following implement this ABC:\n\n    - :class:`~discord.TextChannel`\n    - :class:`~discord.VoiceChannel`\n    - :class:`~discord.CategoryChannel`\n    - :class:`~discord.StageChannel`\n    - :class:`~discord.ForumChannel`\n\n    This ABC must also implement :class:`~discord.abc.Snowflake`.\n\n    Attributes\n    -----------\n    name: :class:`str`\n        The channel name.\n    guild: :class:`~discord.Guild`\n        The guild the channel belongs to.\n    position: :class:`int`\n        The position in the channel list. This is a number that starts at 0.\n        e.g. the top channel is position 0.\n    \"\"\"\n\n    __slots__ = ()\n\n    id: int\n    name: str\n    guild: Guild\n    type: ChannelType\n    position: int\n    category_id: Optional[int]\n    _state: ConnectionState\n    _overwrites: List[_Overwrites]\n\n    if TYPE_CHECKING:\n\n        def __init__(self, *, state: ConnectionState, guild: Guild, data: GuildChannelPayload):\n            ...\n\n    def __str__(self) -> str:\n        return self.name\n\n    @property\n    def _sorting_bucket(self) -> int:\n        raise NotImplementedError\n\n    def _update(self, guild: Guild, data: Dict[str, Any]) -> None:\n        raise NotImplementedError\n\n    async def _move(\n        self,\n        position: int,\n        parent_id: Optional[Any] = None,\n        lock_permissions: bool = False,\n        *,\n        reason: Optional[str],\n    ) -> None:\n        if position < 0:\n            raise ValueError('Channel position cannot be less than 0.')\n\n        http = self._state.http\n        bucket = self._sorting_bucket\n        channels: List[GuildChannel] = [c for c in self.guild.channels if c._sorting_bucket == bucket]\n\n        channels.sort(key=lambda c: c.position)\n\n        try:\n            # remove ourselves from the channel list\n            channels.remove(self)\n        except ValueError:\n            # not there somehow lol\n            return\n        else:\n            index = next((i for i, c in enumerate(channels) if c.position >= position), len(channels))\n            # add ourselves at our designated position\n            channels.insert(index, self)\n\n        payload = []\n        for index, c in enumerate(channels):\n            d: Dict[str, Any] = {'id': c.id, 'position': index}\n            if parent_id is not _undefined and c.id == self.id:\n                d.update(parent_id=parent_id, lock_permissions=lock_permissions)\n            payload.append(d)\n\n        await http.bulk_channel_update(self.guild.id, payload, reason=reason)\n\n    async def _edit(self, options: Dict[str, Any], reason: Optional[str]) -> Optional[ChannelPayload]:\n        try:\n            parent = options.pop('category')\n        except KeyError:\n            parent_id = _undefined\n        else:\n            parent_id = parent and parent.id\n\n        try:\n            options['rate_limit_per_user'] = options.pop('slowmode_delay')\n        except KeyError:\n            pass\n\n        try:\n            options['default_thread_rate_limit_per_user'] = options.pop('default_thread_slowmode_delay')\n        except KeyError:\n            pass\n\n        try:\n            rtc_region = options.pop('rtc_region')\n        except KeyError:\n            pass\n        else:\n            options['rtc_region'] = None if rtc_region is None else str(rtc_region)\n\n        try:\n            video_quality_mode = options.pop('video_quality_mode')\n        except KeyError:\n            pass\n        else:\n            options['video_quality_mode'] = int(video_quality_mode)\n\n        lock_permissions = options.pop('sync_permissions', False)\n\n        try:\n            position = options.pop('position')\n        except KeyError:\n            if parent_id is not _undefined:\n                if lock_permissions:\n                    category = self.guild.get_channel(parent_id)\n                    if category:\n                        options['permission_overwrites'] = [c._asdict() for c in category._overwrites]\n                options['parent_id'] = parent_id\n            elif lock_permissions and self.category_id is not None:\n                # if we're syncing permissions on a pre-existing channel category without changing it\n                # we need to update the permissions to point to the pre-existing category\n                category = self.guild.get_channel(self.category_id)\n                if category:\n                    options['permission_overwrites'] = [c._asdict() for c in category._overwrites]\n        else:\n            await self._move(position, parent_id=parent_id, lock_permissions=lock_permissions, reason=reason)\n\n        overwrites = options.get('overwrites', None)\n        if overwrites is not None:\n            perms = []\n            for target, perm in overwrites.items():\n                if not isinstance(perm, PermissionOverwrite):\n                    raise TypeError(f'Expected PermissionOverwrite received {perm.__class__.__name__}')\n\n                allow, deny = perm.pair()\n                payload = {\n                    'allow': allow.value,\n                    'deny': deny.value,\n                    'id': target.id,\n                }\n\n                if isinstance(target, Role):\n                    payload['type'] = _Overwrites.ROLE\n                elif isinstance(target, Object):\n                    payload['type'] = _Overwrites.ROLE if target.type is Role else _Overwrites.MEMBER\n                else:\n                    payload['type'] = _Overwrites.MEMBER\n\n                perms.append(payload)\n            options['permission_overwrites'] = perms\n\n        try:\n            ch_type = options['type']\n        except KeyError:\n            pass\n        else:\n            if not isinstance(ch_type, ChannelType):\n                raise TypeError('type field must be of type ChannelType')\n            options['type'] = ch_type.value\n\n        try:\n            status = options.pop('status')\n        except KeyError:\n            pass\n        else:\n            await self._state.http.edit_voice_channel_status(status, channel_id=self.id, reason=reason)\n\n        if options:\n            return await self._state.http.edit_channel(self.id, reason=reason, **options)\n\n    def _fill_overwrites(self, data: GuildChannelPayload) -> None:\n        self._overwrites = []\n        everyone_index = 0\n        everyone_id = self.guild.id\n\n        for index, overridden in enumerate(data.get('permission_overwrites', [])):\n            overwrite = _Overwrites(overridden)\n            self._overwrites.append(overwrite)\n\n            if overwrite.type == _Overwrites.MEMBER:\n                continue\n\n            if overwrite.id == everyone_id:\n                # the @everyone role is not guaranteed to be the first one\n                # in the list of permission overwrites, however the permission\n                # resolution code kind of requires that it is the first one in\n                # the list since it is special. So we need the index so we can\n                # swap it to be the first one.\n                everyone_index = index\n\n        # do the swap\n        tmp = self._overwrites\n        if tmp:\n            tmp[everyone_index], tmp[0] = tmp[0], tmp[everyone_index]\n\n    @property\n    def changed_roles(self) -> List[Role]:\n        \"\"\"List[:class:`~discord.Role`]: Returns a list of roles that have been overridden from\n        their default values in the :attr:`~discord.Guild.roles` attribute.\"\"\"\n        ret = []\n        g = self.guild\n        for overwrite in filter(lambda o: o.is_role(), self._overwrites):\n            role = g.get_role(overwrite.id)\n            if role is None:\n                continue\n\n            role = copy.copy(role)\n            role.permissions.handle_overwrite(overwrite.allow, overwrite.deny)\n            ret.append(role)\n        return ret\n\n    @property\n    def mention(self) -> str:\n        \"\"\":class:`str`: The string that allows you to mention the channel.\"\"\"\n        return f'<#{self.id}>'\n\n    @property\n    def jump_url(self) -> str:\n        \"\"\":class:`str`: Returns a URL that allows the client to jump to the channel.\n\n        .. versionadded:: 2.0\n        \"\"\"\n        return f'https://discord.com/channels/{self.guild.id}/{self.id}'\n\n    @property\n    def created_at(self) -> datetime:\n        \"\"\":class:`datetime.datetime`: Returns the channel's creation time in UTC.\"\"\"\n        return utils.snowflake_time(self.id)\n\n    def overwrites_for(self, obj: Union[Role, User, Object]) -> PermissionOverwrite:\n        \"\"\"Returns the channel-specific overwrites for a member or a role.\n\n        Parameters\n        -----------\n        obj: Union[:class:`~discord.Role`, :class:`~discord.abc.User`, :class:`~discord.Object`]\n            The role or user denoting whose overwrite to get.\n\n        Returns\n        ---------\n        :class:`~discord.PermissionOverwrite`\n            The permission overwrites for this object.\n        \"\"\"\n\n        if isinstance(obj, User):\n            predicate = lambda p: p.is_member()\n        elif isinstance(obj, Role):\n            predicate = lambda p: p.is_role()\n        else:\n            predicate = lambda p: True\n\n        for overwrite in filter(predicate, self._overwrites):\n            if overwrite.id == obj.id:\n                allow = Permissions(overwrite.allow)\n                deny = Permissions(overwrite.deny)\n                return PermissionOverwrite.from_pair(allow, deny)\n\n        return PermissionOverwrite()\n\n    @property\n    def overwrites(self) -> Dict[Union[Role, Member, Object], PermissionOverwrite]:\n        \"\"\"Returns all of the channel's overwrites.\n\n        This is returned as a dictionary where the key contains the target which\n        can be either a :class:`~discord.Role` or a :class:`~discord.Member` and the value is the\n        overwrite as a :class:`~discord.PermissionOverwrite`.\n\n        .. versionchanged:: 2.0\n            Overwrites can now be type-aware :class:`~discord.Object` in case of cache lookup failure\n\n        Returns\n        --------\n        Dict[Union[:class:`~discord.Role`, :class:`~discord.Member`, :class:`~discord.Object`], :class:`~discord.PermissionOverwrite`]\n            The channel's permission overwrites.\n        \"\"\"\n        ret = {}\n        for ow in self._overwrites:\n            allow = Permissions(ow.allow)\n            deny = Permissions(ow.deny)\n            overwrite = PermissionOverwrite.from_pair(allow, deny)\n            target = None\n\n            if ow.is_role():\n                target = self.guild.get_role(ow.id)\n            elif ow.is_member():\n                target = self.guild.get_member(ow.id)\n\n            if target is None:\n                target_type = Role if ow.is_role() else User\n                target = Object(id=ow.id, type=target_type)  # type: ignore\n\n            ret[target] = overwrite\n        return ret\n\n    @property\n    def category(self) -> Optional[CategoryChannel]:\n        \"\"\"Optional[:class:`~discord.CategoryChannel`]: The category this channel belongs to.\n\n        If there is no category then this is ``None``.\n        \"\"\"\n        return self.guild.get_channel(self.category_id)  # type: ignore # These are coerced into CategoryChannel\n\n    @property\n    def permissions_synced(self) -> bool:\n        \"\"\":class:`bool`: Whether or not the permissions for this channel are synced with the\n        category it belongs to.\n\n        If there is no category then this is ``False``.\n\n        .. versionadded:: 1.3\n        \"\"\"\n        if self.category_id is None:\n            return False\n\n        category = self.guild.get_channel(self.category_id)\n        return bool(category and category.overwrites == self.overwrites)\n\n    def _apply_implicit_permissions(self, base: Permissions) -> None:\n        # if you can't send a message in a channel then you can't have certain\n        # permissions as well\n        if not base.send_messages:\n            base.send_tts_messages = False\n            base.mention_everyone = False\n            base.embed_links = False\n            base.attach_files = False\n\n        # if you can't read a channel then you have no permissions there\n        if not base.read_messages:\n            denied = Permissions.all_channel()\n            base.value &= ~denied.value\n\n    def permissions_for(self, obj: Union[Member, Role], /) -> Permissions:\n        \"\"\"Handles permission resolution for the :class:`~discord.Member`\n        or :class:`~discord.Role`.\n\n        This function takes into consideration the following cases:\n\n        - Guild owner\n        - Guild roles\n        - Channel overrides\n        - Member overrides\n        - Implicit permissions\n        - Member timeout\n        - User installed app\n\n        If a :class:`~discord.Role` is passed, then it checks the permissions\n        someone with that role would have, which is essentially:\n\n        - The default role permissions\n        - The permissions of the role used as a parameter\n        - The default role permission overwrites\n        - The permission overwrites of the role used as a parameter\n\n        .. versionchanged:: 2.0\n            The object passed in can now be a role object.\n\n        .. versionchanged:: 2.0\n            ``obj`` parameter is now positional-only.\n\n        .. versionchanged:: 2.4\n            User installed apps are now taken into account.\n            The permissions returned for a user installed app mirrors the\n            permissions Discord returns in :attr:`~discord.Interaction.app_permissions`,\n            though it is recommended to use that attribute instead.\n\n        Parameters\n        ----------\n        obj: Union[:class:`~discord.Member`, :class:`~discord.Role`]\n            The object to resolve permissions for. This could be either\n            a member or a role. If it's a role then member overwrites\n            are not computed.\n\n        Returns\n        -------\n        :class:`~discord.Permissions`\n            The resolved permissions for the member or role.\n        \"\"\"\n\n        # The current cases can be explained as:\n        # Guild owner get all permissions -- no questions asked. Otherwise...\n        # The @everyone role gets the first application.\n        # After that, the applied roles that the user has in the channel\n        # (or otherwise) are then OR'd together.\n        # After the role permissions are resolved, the member permissions\n        # have to take into effect.\n        # After all that is done.. you have to do the following:\n\n        # If manage permissions is True, then all permissions are set to True.\n\n        # The operation first takes into consideration the denied\n        # and then the allowed.\n\n        if self.guild.owner_id == obj.id:\n            return Permissions.all()\n\n        default = self.guild.default_role\n        if default is None:\n\n            if self._state.self_id == obj.id:\n                return Permissions._user_installed_permissions(in_guild=True)\n            else:\n                return Permissions.none()\n\n        base = Permissions(default.permissions.value)\n\n        # Handle the role case first\n        if isinstance(obj, Role):\n            base.value |= obj._permissions\n\n            if base.administrator:\n                return Permissions.all()\n\n            # Apply @everyone allow/deny first since it's special\n            try:\n                maybe_everyone = self._overwrites[0]\n                if maybe_everyone.id == self.guild.id:\n                    base.handle_overwrite(allow=maybe_everyone.allow, deny=maybe_everyone.deny)\n            except IndexError:\n                pass\n\n            if obj.is_default():\n                return base\n\n            overwrite = utils.get(self._overwrites, type=_Overwrites.ROLE, id=obj.id)\n            if overwrite is not None:\n                base.handle_overwrite(overwrite.allow, overwrite.deny)\n\n            return base\n\n        roles = obj._roles\n        get_role = self.guild.get_role\n\n        # Apply guild roles that the member has.\n        for role_id in roles:\n            role = get_role(role_id)\n            if role is not None:\n                base.value |= role._permissions\n\n        # Guild-wide Administrator -> True for everything\n        # Bypass all channel-specific overrides\n        if base.administrator:\n            return Permissions.all()\n\n        # Apply @everyone allow/deny first since it's special\n        try:\n            maybe_everyone = self._overwrites[0]\n            if maybe_everyone.id == self.guild.id:\n                base.handle_overwrite(allow=maybe_everyone.allow, deny=maybe_everyone.deny)\n                remaining_overwrites = self._overwrites[1:]\n            else:\n                remaining_overwrites = self._overwrites\n        except IndexError:\n            remaining_overwrites = self._overwrites\n\n        denies = 0\n        allows = 0\n\n        # Apply channel specific role permission overwrites\n        for overwrite in remaining_overwrites:\n            if overwrite.is_role() and roles.has(overwrite.id):\n                denies |= overwrite.deny\n                allows |= overwrite.allow\n\n        base.handle_overwrite(allow=allows, deny=denies)\n\n        # Apply member specific permission overwrites\n        for overwrite in remaining_overwrites:\n            if overwrite.is_member() and overwrite.id == obj.id:\n                base.handle_overwrite(allow=overwrite.allow, deny=overwrite.deny)\n                break\n\n        if obj.is_timed_out():\n            # Timeout leads to every permission except VIEW_CHANNEL and READ_MESSAGE_HISTORY\n            # being explicitly denied\n            # N.B.: This *must* come last, because it's a conclusive mask\n            base.value &= Permissions._timeout_mask()\n\n        return base\n\n    async def delete(self, *, reason: Optional[str] = None) -> None:\n        \"\"\"|coro|\n\n        Deletes the channel.\n\n        You must have :attr:`~discord.Permissions.manage_channels` to do this.\n\n        Parameters\n        -----------\n        reason: Optional[:class:`str`]\n            The reason for deleting this channel.\n            Shows up on the audit log.\n\n        Raises\n        -------\n        ~discord.Forbidden\n            You do not have proper permissions to delete the channel.\n        ~discord.NotFound\n            The channel was not found or was already deleted.\n        ~discord.HTTPException\n            Deleting the channel failed.\n        \"\"\"\n        await self._state.http.delete_channel(self.id, reason=reason)\n\n    @overload\n    async def set_permissions(\n        self,\n        target: Union[Member, Role],\n        *,\n        overwrite: Optional[Union[PermissionOverwrite, _Undefined]] = ...,\n        reason: Optional[str] = ...,\n    ) -> None:\n        ...\n\n    @overload\n    async def set_permissions(\n        self,\n        target: Union[Member, Role],\n        *,\n        reason: Optional[str] = ...,\n        **permissions: Optional[bool],\n    ) -> None:\n        ...\n\n    async def set_permissions(\n        self,\n        target: Union[Member, Role],\n        *,\n        overwrite: Any = _undefined,\n        reason: Optional[str] = None,\n        **permissions: Optional[bool],\n    ) -> None:\n        r\"\"\"|coro|\n\n        Sets the channel specific permission overwrites for a target in the\n        channel.\n\n        The ``target`` parameter should either be a :class:`~discord.Member` or a\n        :class:`~discord.Role` that belongs to guild.\n\n        The ``overwrite`` parameter, if given, must either be ``None`` or\n        :class:`~discord.PermissionOverwrite`. For convenience, you can pass in\n        keyword arguments denoting :class:`~discord.Permissions` attributes. If this is\n        done, then you cannot mix the keyword arguments with the ``overwrite``\n        parameter.\n\n        If the ``overwrite`` parameter is ``None``, then the permission\n        overwrites are deleted.\n\n        You must have :attr:`~discord.Permissions.manage_roles` to do this.\n\n        .. note::\n\n            This method *replaces* the old overwrites with the ones given.\n\n        Examples\n        ----------\n\n        Setting allow and deny: ::\n\n            await message.channel.set_permissions(message.author, read_messages=True,\n                                                                  send_messages=False)\n\n        Deleting overwrites ::\n\n            await channel.set_permissions(member, overwrite=None)\n\n        Using :class:`~discord.PermissionOverwrite` ::\n\n            overwrite = discord.PermissionOverwrite()\n            overwrite.send_messages = False\n            overwrite.read_messages = True\n            await channel.set_permissions(member, overwrite=overwrite)\n\n        .. versionchanged:: 2.0\n            This function will now raise :exc:`TypeError` instead of\n            ``InvalidArgument``.\n\n\n        Parameters\n        -----------\n        target: Union[:class:`~discord.Member`, :class:`~discord.Role`]\n            The member or role to overwrite permissions for.\n        overwrite: Optional[:class:`~discord.PermissionOverwrite`]\n            The permissions to allow and deny to the target, or ``None`` to\n            delete the overwrite.\n        \\*\\*permissions\n            A keyword argument list of permissions to set for ease of use.\n            Cannot be mixed with ``overwrite``.\n        reason: Optional[:class:`str`]\n            The reason for doing this action. Shows up on the audit log.\n\n        Raises\n        -------\n        ~discord.Forbidden\n            You do not have permissions to edit channel specific permissions.\n        ~discord.HTTPException\n            Editing channel specific permissions failed.\n        ~discord.NotFound\n            The role or member being edited is not part of the guild.\n        TypeError\n            The ``overwrite`` parameter was invalid or the target type was not\n            :class:`~discord.Role` or :class:`~discord.Member`.\n        ValueError\n            The ``overwrite`` parameter and ``positions`` parameters were both\n            unset.\n        \"\"\"\n\n        http = self._state.http\n\n        if isinstance(target, User):\n            perm_type = _Overwrites.MEMBER\n        elif isinstance(target, Role):\n            perm_type = _Overwrites.ROLE\n        else:\n            raise ValueError('target parameter must be either Member or Role')\n\n        if overwrite is _undefined:\n            if len(permissions) == 0:\n                raise ValueError('No overwrite provided.')\n            try:\n                overwrite = PermissionOverwrite(**permissions)\n            except (ValueError, TypeError):\n                raise TypeError('Invalid permissions given to keyword arguments.')\n        else:\n            if len(permissions) > 0:\n                raise TypeError('Cannot mix overwrite and keyword arguments.')\n\n        if overwrite is None:\n            await http.delete_channel_permissions(self.id, target.id, reason=reason)\n        elif isinstance(overwrite, PermissionOverwrite):\n            (allow, deny) = overwrite.pair()\n            await http.edit_channel_permissions(\n                self.id, target.id, str(allow.value), str(deny.value), perm_type, reason=reason\n            )\n        else:\n            raise TypeError('Invalid overwrite type provided.')\n\n    async def _clone_impl(\n        self,\n        base_attrs: Dict[str, Any],\n        *,\n        name: Optional[str] = None,\n        reason: Optional[str] = None,\n    ) -> Self:\n        base_attrs['permission_overwrites'] = [x._asdict() for x in self._overwrites]\n        base_attrs['parent_id'] = self.category_id\n        base_attrs['name'] = name or self.name\n        guild_id = self.guild.id\n        cls = self.__class__\n        data = await self._state.http.create_channel(guild_id, self.type.value, reason=reason, **base_attrs)\n        obj = cls(state=self._state, guild=self.guild, data=data)\n\n        # temporarily add it to the cache\n        self.guild._channels[obj.id] = obj  # type: ignore # obj is a GuildChannel\n        return obj\n\n    async def clone(self, *, name: Optional[str] = None, reason: Optional[str] = None) -> Self:\n        \"\"\"|coro|\n\n        Clones this channel. This creates a channel with the same properties\n        as this channel.\n\n        You must have :attr:`~discord.Permissions.manage_channels` to do this.\n\n        .. versionadded:: 1.1\n\n        Parameters\n        ------------\n        name: Optional[:class:`str`]\n            The name of the new channel. If not provided, defaults to this\n            channel name.\n        reason: Optional[:class:`str`]\n            The reason for cloning this channel. Shows up on the audit log.\n\n        Raises\n        -------\n        ~discord.Forbidden\n            You do not have the proper permissions to create this channel.\n        ~discord.HTTPException\n            Creating the channel failed.\n\n        Returns\n        --------\n        :class:`.abc.GuildChannel`\n            The channel that was created.\n        \"\"\"\n        raise NotImplementedError\n\n    @overload\n    async def move(\n        self,\n        *,\n        beginning: bool,\n        offset: int = MISSING,\n        category: Optional[Snowflake] = MISSING,\n        sync_permissions: bool = MISSING,\n        reason: Optional[str] = MISSING,\n    ) -> None:\n        ...\n\n    @overload\n    async def move(\n        self,\n        *,\n        end: bool,\n        offset: int = MISSING,\n        category: Optional[Snowflake] = MISSING,\n        sync_permissions: bool = MISSING,\n        reason: str = MISSING,\n    ) -> None:\n        ...\n\n    @overload\n    async def move(\n        self,\n        *,\n        before: Snowflake,\n        offset: int = MISSING,\n        category: Optional[Snowflake] = MISSING,\n        sync_permissions: bool = MISSING,\n        reason: str = MISSING,\n    ) -> None:\n        ...\n\n    @overload\n    async def move(\n        self,\n        *,\n        after: Snowflake,\n        offset: int = MISSING,\n        category: Optional[Snowflake] = MISSING,\n        sync_permissions: bool = MISSING,\n        reason: str = MISSING,\n    ) -> None:\n        ...\n\n    async def move(self, **kwargs: Any) -> None:\n        \"\"\"|coro|\n\n        A rich interface to help move a channel relative to other channels.\n\n        If exact position movement is required, ``edit`` should be used instead.\n\n        You must have :attr:`~discord.Permissions.manage_channels` to do this.\n\n        .. note::\n\n            Voice channels will always be sorted below text channels.\n            This is a Discord limitation.\n\n        .. versionadded:: 1.7\n\n        .. versionchanged:: 2.0\n            This function will now raise :exc:`TypeError` or\n            :exc:`ValueError` instead of ``InvalidArgument``.\n\n        Parameters\n        ------------\n        beginning: :class:`bool`\n            Whether to move the channel to the beginning of the\n            channel list (or category if given).\n            This is mutually exclusive with ``end``, ``before``, and ``after``.\n        end: :class:`bool`\n            Whether to move the channel to the end of the\n            channel list (or category if given).\n            This is mutually exclusive with ``beginning``, ``before``, and ``after``.\n        before: :class:`~discord.abc.Snowflake`\n            Whether to move the channel before the given channel.\n            This is mutually exclusive with ``beginning``, ``end``, and ``after``.\n        after: :class:`~discord.abc.Snowflake`\n            Whether to move the channel after the given channel.\n            This is mutually exclusive with ``beginning``, ``end``, and ``before``.\n        offset: :class:`int`\n            The number of channels to offset the move by. For example,\n            an offset of ``2`` with ``beginning=True`` would move\n            it 2 after the beginning. A positive number moves it below\n            while a negative number moves it above. Note that this\n            number is relative and computed after the ``beginning``,\n            ``end``, ``before``, and ``after`` parameters.\n        category: Optional[:class:`~discord.abc.Snowflake`]\n            The category to move this channel under.\n            If ``None`` is given then it moves it out of the category.\n            This parameter is ignored if moving a category channel.\n        sync_permissions: :class:`bool`\n            Whether to sync the permissions with the category (if given).\n        reason: :class:`str`\n            The reason for the move.\n\n        Raises\n        -------\n        ValueError\n            An invalid position was given.\n        TypeError\n            A bad mix of arguments were passed.\n        Forbidden\n            You do not have permissions to move the channel.\n        HTTPException\n            Moving the channel failed.\n        \"\"\"\n\n        if not kwargs:\n            return\n\n        beginning, end = kwargs.get('beginning'), kwargs.get('end')\n        before, after = kwargs.get('before'), kwargs.get('after')\n        offset = kwargs.get('offset', 0)\n        if sum(bool(a) for a in (beginning, end, before, after)) > 1:\n            raise TypeError('Only one of [before, after, end, beginning] can be used.')\n\n        bucket = self._sorting_bucket\n        parent_id = kwargs.get('category', MISSING)\n        # fmt: off\n        channels: List[GuildChannel]\n        if parent_id not in (MISSING, None):\n            parent_id = parent_id.id\n            channels = [\n                ch\n                for ch in self.guild.channels\n                if ch._sorting_bucket == bucket\n                and ch.category_id == parent_id\n            ]\n        else:\n            channels = [\n                ch\n                for ch in self.guild.channels\n                if ch._sorting_bucket == bucket\n                and ch.category_id == self.category_id\n            ]\n        # fmt: on\n\n        channels.sort(key=lambda c: (c.position, c.id))\n\n        try:\n            # Try to remove ourselves from the channel list\n            channels.remove(self)\n        except ValueError:\n            # If we're not there then it's probably due to not being in the category\n            pass\n\n        index = None\n        if beginning:\n            index = 0\n        elif end:\n            index = len(channels)\n        elif before:\n            index = next((i for i, c in enumerate(channels) if c.id == before.id), None)\n        elif after:\n            index = next((i + 1 for i, c in enumerate(channels) if c.id == after.id), None)\n\n        if index is None:\n            raise ValueError('Could not resolve appropriate move position')\n\n        channels.insert(max((index + offset), 0), self)\n        payload = []\n        lock_permissions = kwargs.get('sync_permissions', False)\n        reason = kwargs.get('reason')\n        for index, channel in enumerate(channels):\n            d = {'id': channel.id, 'position': index}\n            if parent_id is not MISSING and channel.id == self.id:\n                d.update(parent_id=parent_id, lock_permissions=lock_permissions)\n            payload.append(d)\n\n        await self._state.http.bulk_channel_update(self.guild.id, payload, reason=reason)\n\n    async def create_invite(\n        self,\n        *,\n        reason: Optional[str] = None,\n        max_age: int = 0,\n        max_uses: int = 0,\n        temporary: bool = False,\n        unique: bool = True,\n        target_type: Optional[InviteTarget] = None,\n        target_user: Optional[User] = None,\n        target_application_id: Optional[int] = None,\n    ) -> Invite:\n        \"\"\"|coro|\n\n        Creates an instant invite from a text or voice channel.\n\n        You must have :attr:`~discord.Permissions.create_instant_invite` to do this.\n\n        Parameters\n        ------------\n        max_age: :class:`int`\n            How long the invite should last in seconds. If it's 0 then the invite\n            doesn't expire. Defaults to ``0``.\n        max_uses: :class:`int`\n            How many uses the invite could be used for. If it's 0 then there\n            are unlimited uses. Defaults to ``0``.\n        temporary: :class:`bool`\n            Denotes that the invite grants temporary membership\n            (i.e. they get kicked after they disconnect). Defaults to ``False``.\n        unique: :class:`bool`\n            Indicates if a unique invite URL should be created. Defaults to True.\n            If this is set to ``False`` then it will return a previously created\n            invite.\n        reason: Optional[:class:`str`]\n            The reason for creating this invite. Shows up on the audit log.\n        target_type: Optional[:class:`.InviteTarget`]\n            The type of target for the voice channel invite, if any.\n\n            .. versionadded:: 2.0\n\n        target_user: Optional[:class:`User`]\n            The user whose stream to display for this invite, required if ``target_type`` is :attr:`.InviteTarget.stream`. The user must be streaming in the channel.\n\n            .. versionadded:: 2.0\n\n        target_application_id:: Optional[:class:`int`]\n            The id of the embedded application for the invite, required if ``target_type`` is :attr:`.InviteTarget.embedded_application`.\n\n            .. versionadded:: 2.0\n\n        Raises\n        -------\n        ~discord.HTTPException\n            Invite creation failed.\n\n        ~discord.NotFound\n            The channel that was passed is a category or an invalid channel.\n\n        Returns\n        --------\n        :class:`~discord.Invite`\n            The invite that was created.\n        \"\"\"\n        if target_type is InviteTarget.unknown:\n            raise ValueError('Cannot create invite with an unknown target type')\n\n        data = await self._state.http.create_invite(\n            self.id,\n            reason=reason,\n            max_age=max_age,\n            max_uses=max_uses,\n            temporary=temporary,\n            unique=unique,\n            target_type=target_type.value if target_type else None,\n            target_user_id=target_user.id if target_user else None,\n            target_application_id=target_application_id,\n        )\n        return Invite.from_incomplete(data=data, state=self._state)\n\n    async def invites(self) -> List[Invite]:\n        \"\"\"|coro|\n\n        Returns a list of all active instant invites from this channel.\n\n        You must have :attr:`~discord.Permissions.manage_channels` to get this information.\n\n        Raises\n        -------\n        ~discord.Forbidden\n            You do not have proper permissions to get the information.\n        ~discord.HTTPException\n            An error occurred while fetching the information.\n\n        Returns\n        -------\n        List[:class:`~discord.Invite`]\n            The list of invites that are currently active.\n        \"\"\"\n\n        state = self._state\n        data = await state.http.invites_from_channel(self.id)\n        guild = self.guild\n        return [Invite(state=state, data=invite, channel=self, guild=guild) for invite in data]\n\n\nclass Messageable:\n    \"\"\"An ABC that details the common operations on a model that can send messages.\n\n    The following classes implement this ABC:\n\n    - :class:`~discord.TextChannel`\n    - :class:`~discord.VoiceChannel`\n    - :class:`~discord.StageChannel`\n    - :class:`~discord.DMChannel`\n    - :class:`~discord.GroupChannel`\n    - :class:`~discord.PartialMessageable`\n    - :class:`~discord.User`\n    - :class:`~discord.Member`\n    - :class:`~discord.ext.commands.Context`\n    - :class:`~discord.Thread`\n    \"\"\"\n\n    __slots__ = ()\n    _state: ConnectionState\n\n    async def _get_channel(self) -> MessageableChannel:\n        raise NotImplementedError\n\n    @overload\n    async def send(\n        self,\n        content: Optional[str] = ...,\n        *,\n        tts: bool = ...,\n        embed: Embed = ...,\n        file: File = ...,\n        stickers: Sequence[Union[GuildSticker, StickerItem]] = ...,\n        delete_after: float = ...,\n        nonce: Union[str, int] = ...,\n        allowed_mentions: AllowedMentions = ...,\n        reference: Union[Message, MessageReference, PartialMessage] = ...,\n        mention_author: bool = ...,\n        view: View = ...,\n        suppress_embeds: bool = ...,\n        silent: bool = ...,\n        poll: Poll = ...,\n    ) -> Message:\n        ...\n\n    @overload\n    async def send(\n        self,\n        content: Optional[str] = ...,\n        *,\n        tts: bool = ...,\n        embed: Embed = ...,\n        files: Sequence[File] = ...,\n        stickers: Sequence[Union[GuildSticker, StickerItem]] = ...,\n        delete_after: float = ...,\n        nonce: Union[str, int] = ...,\n        allowed_mentions: AllowedMentions = ...,\n        reference: Union[Message, MessageReference, PartialMessage] = ...,\n        mention_author: bool = ...,\n        view: View = ...,\n        suppress_embeds: bool = ...,\n        silent: bool = ...,\n        poll: Poll = ...,\n    ) -> Message:\n        ...\n\n    @overload\n    async def send(\n        self,\n        content: Optional[str] = ...,\n        *,\n        tts: bool = ...,\n        embeds: Sequence[Embed] = ...,\n        file: File = ...,\n        stickers: Sequence[Union[GuildSticker, StickerItem]] = ...,\n        delete_after: float = ...,\n        nonce: Union[str, int] = ...,\n        allowed_mentions: AllowedMentions = ...,\n        reference: Union[Message, MessageReference, PartialMessage] = ...,\n        mention_author: bool = ...,\n        view: View = ...,\n        suppress_embeds: bool = ...,\n        silent: bool = ...,\n        poll: Poll = ...,\n    ) -> Message:\n        ...\n\n    @overload\n    async def send(\n        self,\n        content: Optional[str] = ...,\n        *,\n        tts: bool = ...,\n        embeds: Sequence[Embed] = ...,\n        files: Sequence[File] = ...,\n        stickers: Sequence[Union[GuildSticker, StickerItem]] = ...,\n        delete_after: float = ...,\n        nonce: Union[str, int] = ...,\n        allowed_mentions: AllowedMentions = ...,\n        reference: Union[Message, MessageReference, PartialMessage] = ...,\n        mention_author: bool = ...,\n        view: View = ...,\n        suppress_embeds: bool = ...,\n        silent: bool = ...,\n        poll: Poll = ...,\n    ) -> Message:\n        ...\n\n    async def send(\n        self,\n        content: Optional[str] = None,\n        *,\n        tts: bool = False,\n        embed: Optional[Embed] = None,\n        embeds: Optional[Sequence[Embed]] = None,\n        file: Optional[File] = None,\n        files: Optional[Sequence[File]] = None,\n        stickers: Optional[Sequence[Union[GuildSticker, StickerItem]]] = None,\n        delete_after: Optional[float] = None,\n        nonce: Optional[Union[str, int]] = None,\n        allowed_mentions: Optional[AllowedMentions] = None,\n        reference: Optional[Union[Message, MessageReference, PartialMessage]] = None,\n        mention_author: Optional[bool] = None,\n        view: Optional[View] = None,\n        suppress_embeds: bool = False,\n        silent: bool = False,\n        poll: Optional[Poll] = None,\n    ) -> Message:\n        \"\"\"|coro|\n\n        Sends a message to the destination with the content given.\n\n        The content must be a type that can convert to a string through ``str(content)``.\n        If the content is set to ``None`` (the default), then the ``embed`` parameter must\n        be provided.\n\n        To upload a single file, the ``file`` parameter should be used with a\n        single :class:`~discord.File` object. To upload multiple files, the ``files``\n        parameter should be used with a :class:`list` of :class:`~discord.File` objects.\n        **Specifying both parameters will lead to an exception**.\n\n        To upload a single embed, the ``embed`` parameter should be used with a\n        single :class:`~discord.Embed` object. To upload multiple embeds, the ``embeds``\n        parameter should be used with a :class:`list` of :class:`~discord.Embed` objects.\n        **Specifying both parameters will lead to an exception**.\n\n        .. versionchanged:: 2.0\n            This function will now raise :exc:`TypeError` or\n            :exc:`ValueError` instead of ``InvalidArgument``.\n\n        Parameters\n        ------------\n        content: Optional[:class:`str`]\n            The content of the message to send.\n        tts: :class:`bool`\n            Indicates if the message should be sent using text-to-speech.\n        embed: :class:`~discord.Embed`\n            The rich embed for the content.\n        embeds: List[:class:`~discord.Embed`]\n            A list of embeds to upload. Must be a maximum of 10.\n\n            .. versionadded:: 2.0\n        file: :class:`~discord.File`\n            The file to upload.\n        files: List[:class:`~discord.File`]\n            A list of files to upload. Must be a maximum of 10.\n        nonce: :class:`int`\n            The nonce to use for sending this message. If the message was successfully sent,\n            then the message will have a nonce with this value.\n        delete_after: :class:`float`\n            If provided, the number of seconds to wait in the background\n            before deleting the message we just sent. If the deletion fails,\n            then it is silently ignored.\n        allowed_mentions: :class:`~discord.AllowedMentions`\n            Controls the mentions being processed in this message. If this is\n            passed, then the object is merged with :attr:`~discord.Client.allowed_mentions`.\n            The merging behaviour only overrides attributes that have been explicitly passed\n            to the object, otherwise it uses the attributes set in :attr:`~discord.Client.allowed_mentions`.\n            If no object is passed at all then the defaults given by :attr:`~discord.Client.allowed_mentions`\n            are used instead.\n\n            .. versionadded:: 1.4\n\n        reference: Union[:class:`~discord.Message`, :class:`~discord.MessageReference`, :class:`~discord.PartialMessage`]\n            A reference to the :class:`~discord.Message` to which you are replying, this can be created using\n            :meth:`~discord.Message.to_reference` or passed directly as a :class:`~discord.Message`. You can control\n            whether this mentions the author of the referenced message using the :attr:`~discord.AllowedMentions.replied_user`\n            attribute of ``allowed_mentions`` or by setting ``mention_author``.\n\n            .. versionadded:: 1.6\n\n        mention_author: Optional[:class:`bool`]\n            If set, overrides the :attr:`~discord.AllowedMentions.replied_user` attribute of ``allowed_mentions``.\n\n            .. versionadded:: 1.6\n        view: :class:`discord.ui.View`\n            A Discord UI View to add to the message.\n\n            .. versionadded:: 2.0\n        stickers: Sequence[Union[:class:`~discord.GuildSticker`, :class:`~discord.StickerItem`]]\n            A list of stickers to upload. Must be a maximum of 3.\n\n            .. versionadded:: 2.0\n        suppress_embeds: :class:`bool`\n            Whether to suppress embeds for the message. This sends the message without any embeds if set to ``True``.\n\n            .. versionadded:: 2.0\n        silent: :class:`bool`\n            Whether to suppress push and desktop notifications for the message. This will increment the mention counter\n            in the UI, but will not actually send a notification.\n\n            .. versionadded:: 2.2\n        poll: :class:`~discord.Poll`\n            The poll to send with this message.\n\n            .. versionadded:: 2.4\n\n        Raises\n        --------\n        ~discord.HTTPException\n            Sending the message failed.\n        ~discord.Forbidden\n            You do not have the proper permissions to send the message.\n        ValueError\n            The ``files`` or ``embeds`` list is not of the appropriate size.\n        TypeError\n            You specified both ``file`` and ``files``,\n            or you specified both ``embed`` and ``embeds``,\n            or the ``reference`` object is not a :class:`~discord.Message`,\n            :class:`~discord.MessageReference` or :class:`~discord.PartialMessage`.\n\n        Returns\n        ---------\n        :class:`~discord.Message`\n            The message that was sent.\n        \"\"\"\n\n        channel = await self._get_channel()\n        state = self._state\n        content = str(content) if content is not None else None\n        previous_allowed_mention = state.allowed_mentions\n\n        if stickers is not None:\n            sticker_ids: SnowflakeList = [sticker.id for sticker in stickers]\n        else:\n            sticker_ids = MISSING\n\n        if reference is not None:\n            try:\n                reference_dict = reference.to_message_reference_dict()\n            except AttributeError:\n                raise TypeError('reference parameter must be Message, MessageReference, or PartialMessage') from None\n        else:\n            reference_dict = MISSING\n\n        if view and not hasattr(view, '__discord_ui_view__'):\n            raise TypeError(f'view parameter must be View not {view.__class__.__name__}')\n\n        if suppress_embeds or silent:\n            from .message import MessageFlags  # circular import\n\n            flags = MessageFlags._from_value(0)\n            flags.suppress_embeds = suppress_embeds\n            flags.suppress_notifications = silent\n        else:\n            flags = MISSING\n\n        with handle_message_parameters(\n            content=content,\n            tts=tts,\n            file=file if file is not None else MISSING,\n            files=files if files is not None else MISSING,\n            embed=embed if embed is not None else MISSING,\n            embeds=embeds if embeds is not None else MISSING,\n            nonce=nonce,\n            allowed_mentions=allowed_mentions,\n            message_reference=reference_dict,\n            previous_allowed_mentions=previous_allowed_mention,\n            mention_author=mention_author,\n            stickers=sticker_ids,\n            view=view,\n            flags=flags,\n            poll=poll,\n        ) as params:\n            data = await state.http.send_message(channel.id, params=params)\n\n        ret = state.create_message(channel=channel, data=data)\n        if view and not view.is_finished():\n            state.store_view(view, ret.id)\n\n        if poll:\n            poll._update(ret)\n\n        if delete_after is not None:\n            await ret.delete(delay=delete_after)\n        return ret\n\n    def typing(self) -> Typing:\n        \"\"\"Returns an asynchronous context manager that allows you to send a typing indicator to\n        the destination for an indefinite period of time, or 10 seconds if the context manager\n        is called using ``await``.\n\n        Example Usage: ::\n\n            async with channel.typing():\n                # simulate something heavy\n                await asyncio.sleep(20)\n\n            await channel.send('Done!')\n\n        Example Usage: ::\n\n            await channel.typing()\n            # Do some computational magic for about 10 seconds\n            await channel.send('Done!')\n\n        .. versionchanged:: 2.0\n            This no longer works with the ``with`` syntax, ``async with`` must be used instead.\n\n        .. versionchanged:: 2.0\n            Added functionality to ``await`` the context manager to send a typing indicator for 10 seconds.\n        \"\"\"\n        return Typing(self)\n\n    async def fetch_message(self, id: int, /) -> Message:\n        \"\"\"|coro|\n\n        Retrieves a single :class:`~discord.Message` from the destination.\n\n        Parameters\n        ------------\n        id: :class:`int`\n            The message ID to look for.\n\n        Raises\n        --------\n        ~discord.NotFound\n            The specified message was not found.\n        ~discord.Forbidden\n            You do not have the permissions required to get a message.\n        ~discord.HTTPException\n            Retrieving the message failed.\n\n        Returns\n        --------\n        :class:`~discord.Message`\n            The message asked for.\n        \"\"\"\n\n        channel = await self._get_channel()\n        data = await self._state.http.get_message(channel.id, id)\n        return self._state.create_message(channel=channel, data=data)\n\n    async def pins(self) -> List[Message]:\n        \"\"\"|coro|\n\n        Retrieves all messages that are currently pinned in the channel.\n\n        .. note::\n\n            Due to a limitation with the Discord API, the :class:`.Message`\n            objects returned by this method do not contain complete\n            :attr:`.Message.reactions` data.\n\n        Raises\n        -------\n        ~discord.Forbidden\n            You do not have the permission to retrieve pinned messages.\n        ~discord.HTTPException\n            Retrieving the pinned messages failed.\n\n        Returns\n        --------\n        List[:class:`~discord.Message`]\n            The messages that are currently pinned.\n        \"\"\"\n\n        channel = await self._get_channel()\n        state = self._state\n        data = await state.http.pins_from(channel.id)\n        return [state.create_message(channel=channel, data=m) for m in data]\n\n    async def history(\n        self,\n        *,\n        limit: Optional[int] = 100,\n        before: Optional[SnowflakeTime] = None,\n        after: Optional[SnowflakeTime] = None,\n        around: Optional[SnowflakeTime] = None,\n        oldest_first: Optional[bool] = None,\n    ) -> AsyncIterator[Message]:\n        \"\"\"Returns an :term:`asynchronous iterator` that enables receiving the destination's message history.\n\n        You must have :attr:`~discord.Permissions.read_message_history` to do this.\n\n        Examples\n        ---------\n\n        Usage ::\n\n            counter = 0\n            async for message in channel.history(limit=200):\n                if message.author == client.user:\n                    counter += 1\n\n        Flattening into a list: ::\n\n            messages = [message async for message in channel.history(limit=123)]\n            # messages is now a list of Message...\n\n        All parameters are optional.\n\n        Parameters\n        -----------\n        limit: Optional[:class:`int`]\n            The number of messages to retrieve.\n            If ``None``, retrieves every message in the channel. Note, however,\n            that this would make it a slow operation.\n        before: Optional[Union[:class:`~discord.abc.Snowflake`, :class:`datetime.datetime`]]\n            Retrieve messages before this date or message.\n            If a datetime is provided, it is recommended to use a UTC aware datetime.\n            If the datetime is naive, it is assumed to be local time.\n        after: Optional[Union[:class:`~discord.abc.Snowflake`, :class:`datetime.datetime`]]\n            Retrieve messages after this date or message.\n            If a datetime is provided, it is recommended to use a UTC aware datetime.\n            If the datetime is naive, it is assumed to be local time.\n        around: Optional[Union[:class:`~discord.abc.Snowflake`, :class:`datetime.datetime`]]\n            Retrieve messages around this date or message.\n            If a datetime is provided, it is recommended to use a UTC aware datetime.\n            If the datetime is naive, it is assumed to be local time.\n            When using this argument, the maximum limit is 101. Note that if the limit is an\n            even number then this will return at most limit + 1 messages.\n        oldest_first: Optional[:class:`bool`]\n            If set to ``True``, return messages in oldest->newest order. Defaults to ``True`` if\n            ``after`` is specified, otherwise ``False``.\n\n        Raises\n        ------\n        ~discord.Forbidden\n            You do not have permissions to get channel message history.\n        ~discord.HTTPException\n            The request to get message history failed.\n\n        Yields\n        -------\n        :class:`~discord.Message`\n            The message with the message data parsed.\n        \"\"\"\n\n        async def _around_strategy(retrieve: int, around: Optional[Snowflake], limit: Optional[int]):\n            if not around:\n                return [], None, 0\n\n            around_id = around.id if around else None\n            data = await self._state.http.logs_from(channel.id, retrieve, around=around_id)\n\n            return data, None, 0\n\n        async def _after_strategy(retrieve: int, after: Optional[Snowflake], limit: Optional[int]):\n            after_id = after.id if after else None\n            data = await self._state.http.logs_from(channel.id, retrieve, after=after_id)\n\n            if data:\n                if limit is not None:\n                    limit -= len(data)\n\n                after = Object(id=int(data[0]['id']))\n\n            return data, after, limit\n\n        async def _before_strategy(retrieve: int, before: Optional[Snowflake], limit: Optional[int]):\n            before_id = before.id if before else None\n            data = await self._state.http.logs_from(channel.id, retrieve, before=before_id)\n\n            if data:\n                if limit is not None:\n                    limit -= len(data)\n\n                before = Object(id=int(data[-1]['id']))\n\n            return data, before, limit\n\n        if isinstance(before, datetime):\n            before = Object(id=utils.time_snowflake(before, high=False))\n        if isinstance(after, datetime):\n            after = Object(id=utils.time_snowflake(after, high=True))\n        if isinstance(around, datetime):\n            around = Object(id=utils.time_snowflake(around))\n\n        if oldest_first is None:\n            reverse = after is not None\n        else:\n            reverse = oldest_first\n\n        after = after or OLDEST_OBJECT\n        predicate = None\n\n        if around:\n            if limit is None:\n                raise ValueError('history does not support around with limit=None')\n            if limit > 101:\n                raise ValueError(\"history max limit 101 when specifying around parameter\")\n\n            # Strange Discord quirk\n            limit = 100 if limit == 101 else limit\n\n            strategy, state = _around_strategy, around\n\n            if before and after:\n                predicate = lambda m: after.id < int(m['id']) < before.id\n            elif before:\n                predicate = lambda m: int(m['id']) < before.id\n            elif after:\n                predicate = lambda m: after.id < int(m['id'])\n        elif reverse:\n            strategy, state = _after_strategy, after\n            if before:\n                predicate = lambda m: int(m['id']) < before.id\n        else:\n            strategy, state = _before_strategy, before\n            if after and after != OLDEST_OBJECT:\n                predicate = lambda m: int(m['id']) > after.id\n\n        channel = await self._get_channel()\n\n        while True:\n            retrieve = 100 if limit is None else min(limit, 100)\n            if retrieve < 1:\n                return\n\n            data, state, limit = await strategy(retrieve, state, limit)\n\n            if reverse:\n                data = reversed(data)\n            if predicate:\n                data = filter(predicate, data)\n\n            count = 0\n\n            for count, raw_message in enumerate(data, 1):\n                yield self._state.create_message(channel=channel, data=raw_message)\n\n            if count < 100:\n                # There's no data left after this\n                break\n\n\nclass Connectable(Protocol):\n    \"\"\"An ABC that details the common operations on a channel that can\n    connect to a voice server.\n\n    The following implement this ABC:\n\n    - :class:`~discord.VoiceChannel`\n    - :class:`~discord.StageChannel`\n    \"\"\"\n\n    __slots__ = ()\n    _state: ConnectionState\n\n    def _get_voice_client_key(self) -> Tuple[int, str]:\n        raise NotImplementedError\n\n    def _get_voice_state_pair(self) -> Tuple[int, int]:\n        raise NotImplementedError\n\n    async def connect(\n        self,\n        *,\n        timeout: float = 30.0,\n        reconnect: bool = True,\n        cls: Callable[[Client, Connectable], T] = VoiceClient,\n        self_deaf: bool = False,\n        self_mute: bool = False,\n    ) -> T:\n        \"\"\"|coro|\n\n        Connects to voice and creates a :class:`~discord.VoiceClient` to establish\n        your connection to the voice server.\n\n        This requires :attr:`~discord.Intents.voice_states`.\n\n        Parameters\n        -----------\n        timeout: :class:`float`\n            The timeout in seconds to wait the connection to complete.\n        reconnect: :class:`bool`\n            Whether the bot should automatically attempt\n            a reconnect if a part of the handshake fails\n            or the gateway goes down.\n        cls: Type[:class:`~discord.VoiceProtocol`]\n            A type that subclasses :class:`~discord.VoiceProtocol` to connect with.\n            Defaults to :class:`~discord.VoiceClient`.\n        self_mute: :class:`bool`\n            Indicates if the client should be self-muted.\n\n            .. versionadded:: 2.0\n        self_deaf: :class:`bool`\n            Indicates if the client should be self-deafened.\n\n            .. versionadded:: 2.0\n\n        Raises\n        -------\n        asyncio.TimeoutError\n            Could not connect to the voice channel in time.\n        ~discord.ClientException\n            You are already connected to a voice channel.\n        ~discord.opus.OpusNotLoaded\n            The opus library has not been loaded.\n\n        Returns\n        --------\n        :class:`~discord.VoiceProtocol`\n            A voice client that is fully connected to the voice server.\n        \"\"\"\n\n        key_id, _ = self._get_voice_client_key()\n        state = self._state\n\n        if state._get_voice_client(key_id):\n            raise ClientException('Already connected to a voice channel.')\n\n        client = state._get_client()\n        voice: T = cls(client, self)\n\n        if not isinstance(voice, VoiceProtocol):\n            raise TypeError('Type must meet VoiceProtocol abstract base class.')\n\n        state._add_voice_client(key_id, voice)\n\n        try:\n            await voice.connect(timeout=timeout, reconnect=reconnect, self_deaf=self_deaf, self_mute=self_mute)\n        except asyncio.TimeoutError:\n            try:\n                await voice.disconnect(force=True)\n            except Exception:\n                # we don't care if disconnect failed because connection failed\n                pass\n            raise  # re-raise\n\n        return voice\n"
  },
  {
    "path": "discord/activity.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom __future__ import annotations\n\nimport datetime\nfrom typing import Any, Dict, List, Optional, TYPE_CHECKING, Union, overload\n\nfrom .asset import Asset\nfrom .enums import ActivityType, try_enum\nfrom .colour import Colour\nfrom .partial_emoji import PartialEmoji\nfrom .utils import _get_as_snowflake\n\n__all__ = (\n    'BaseActivity',\n    'Activity',\n    'Streaming',\n    'Game',\n    'Spotify',\n    'CustomActivity',\n)\n\n\"\"\"If curious, this is the current schema for an activity.\n\nIt's fairly long so I will document it here:\n\nAll keys are optional.\n\nstate: str (max: 128),\ndetails: str (max: 128)\ntimestamps: dict\n    start: int (min: 1)\n    end: int (min: 1)\nassets: dict\n    large_image: str (max: 32)\n    large_text: str (max: 128)\n    small_image: str (max: 32)\n    small_text: str (max: 128)\nparty: dict\n    id: str (max: 128),\n    size: List[int] (max-length: 2)\n        elem: int (min: 1)\nsecrets: dict\n    match: str (max: 128)\n    join: str (max: 128)\n    spectate: str (max: 128)\ninstance: bool\napplication_id: str\nname: str (max: 128)\nurl: str\ntype: int\nsync_id: str\nsession_id: str\nflags: int\nbuttons: list[str (max: 32)]\n\nThere are also activity flags which are mostly uninteresting for the library atm.\n\nt.ActivityFlags = {\n    INSTANCE: 1,\n    JOIN: 2,\n    SPECTATE: 4,\n    JOIN_REQUEST: 8,\n    SYNC: 16,\n    PLAY: 32\n}\n\"\"\"\n\nif TYPE_CHECKING:\n    from .types.activity import (\n        Activity as ActivityPayload,\n        ActivityTimestamps,\n        ActivityParty,\n        ActivityAssets,\n    )\n\n    from .state import ConnectionState\n\n\nclass BaseActivity:\n    \"\"\"The base activity that all user-settable activities inherit from.\n    A user-settable activity is one that can be used in :meth:`Client.change_presence`.\n\n    The following types currently count as user-settable:\n\n    - :class:`Activity`\n    - :class:`Game`\n    - :class:`Streaming`\n    - :class:`CustomActivity`\n\n    Note that although these types are considered user-settable by the library,\n    Discord typically ignores certain combinations of activity depending on\n    what is currently set. This behaviour may change in the future so there are\n    no guarantees on whether Discord will actually let you set these types.\n\n    .. versionadded:: 1.3\n    \"\"\"\n\n    __slots__ = ('_created_at',)\n\n    def __init__(self, **kwargs: Any) -> None:\n        self._created_at: Optional[float] = kwargs.pop('created_at', None)\n\n    @property\n    def created_at(self) -> Optional[datetime.datetime]:\n        \"\"\"Optional[:class:`datetime.datetime`]: When the user started doing this activity in UTC.\n\n        .. versionadded:: 1.3\n        \"\"\"\n        if self._created_at is not None:\n            return datetime.datetime.fromtimestamp(self._created_at / 1000, tz=datetime.timezone.utc)\n\n    def to_dict(self) -> ActivityPayload:\n        raise NotImplementedError\n\n\nclass Activity(BaseActivity):\n    \"\"\"Represents an activity in Discord.\n\n    This could be an activity such as streaming, playing, listening\n    or watching.\n\n    For memory optimisation purposes, some activities are offered in slimmed\n    down versions:\n\n    - :class:`Game`\n    - :class:`Streaming`\n\n    Attributes\n    ------------\n    application_id: Optional[:class:`int`]\n        The application ID of the game.\n    name: Optional[:class:`str`]\n        The name of the activity.\n    url: Optional[:class:`str`]\n        A stream URL that the activity could be doing.\n    type: :class:`ActivityType`\n        The type of activity currently being done.\n    state: Optional[:class:`str`]\n        The user's current state. For example, \"In Game\".\n    details: Optional[:class:`str`]\n        The detail of the user's current activity.\n    platform: Optional[:class:`str`]\n        The user's current platform.\n\n        .. versionadded:: 2.4\n    timestamps: :class:`dict`\n        A dictionary of timestamps. It contains the following optional keys:\n\n        - ``start``: Corresponds to when the user started doing the\n          activity in milliseconds since Unix epoch.\n        - ``end``: Corresponds to when the user will finish doing the\n          activity in milliseconds since Unix epoch.\n\n    assets: :class:`dict`\n        A dictionary representing the images and their hover text of an activity.\n        It contains the following optional keys:\n\n        - ``large_image``: A string representing the ID for the large image asset.\n        - ``large_text``: A string representing the text when hovering over the large image asset.\n        - ``small_image``: A string representing the ID for the small image asset.\n        - ``small_text``: A string representing the text when hovering over the small image asset.\n\n    party: :class:`dict`\n        A dictionary representing the activity party. It contains the following optional keys:\n\n        - ``id``: A string representing the party ID.\n        - ``size``: A list of up to two integer elements denoting (current_size, maximum_size).\n    buttons: List[:class:`str`]\n        A list of strings representing the labels of custom buttons shown in a rich presence.\n\n        .. versionadded:: 2.0\n\n    emoji: Optional[:class:`PartialEmoji`]\n        The emoji that belongs to this activity.\n    \"\"\"\n\n    __slots__ = (\n        'state',\n        'details',\n        'timestamps',\n        'platform',\n        'assets',\n        'party',\n        'flags',\n        'sync_id',\n        'session_id',\n        'type',\n        'name',\n        'url',\n        'application_id',\n        'emoji',\n        'buttons',\n    )\n\n    def __init__(self, **kwargs: Any) -> None:\n        super().__init__(**kwargs)\n        self.state: Optional[str] = kwargs.pop('state', None)\n        self.details: Optional[str] = kwargs.pop('details', None)\n        self.timestamps: ActivityTimestamps = kwargs.pop('timestamps', {})\n        self.platform: Optional[str] = kwargs.pop('platform', None)\n        self.assets: ActivityAssets = kwargs.pop('assets', {})\n        self.party: ActivityParty = kwargs.pop('party', {})\n        self.application_id: Optional[int] = _get_as_snowflake(kwargs, 'application_id')\n        self.name: Optional[str] = kwargs.pop('name', None)\n        self.url: Optional[str] = kwargs.pop('url', None)\n        self.flags: int = kwargs.pop('flags', 0)\n        self.sync_id: Optional[str] = kwargs.pop('sync_id', None)\n        self.session_id: Optional[str] = kwargs.pop('session_id', None)\n        self.buttons: List[str] = kwargs.pop('buttons', [])\n\n        activity_type = kwargs.pop('type', -1)\n        self.type: ActivityType = (\n            activity_type if isinstance(activity_type, ActivityType) else try_enum(ActivityType, activity_type)\n        )\n\n        emoji = kwargs.pop('emoji', None)\n        self.emoji: Optional[PartialEmoji] = PartialEmoji.from_dict(emoji) if emoji is not None else None\n\n    def __repr__(self) -> str:\n        attrs = (\n            ('type', self.type),\n            ('name', self.name),\n            ('url', self.url),\n            ('platform', self.platform),\n            ('details', self.details),\n            ('application_id', self.application_id),\n            ('session_id', self.session_id),\n            ('emoji', self.emoji),\n        )\n        inner = ' '.join('%s=%r' % t for t in attrs)\n        return f'<Activity {inner}>'\n\n    def to_dict(self) -> Dict[str, Any]:\n        ret: Dict[str, Any] = {}\n        for attr in self.__slots__:\n            value = getattr(self, attr, None)\n            if value is None:\n                continue\n\n            if isinstance(value, dict) and len(value) == 0:\n                continue\n\n            ret[attr] = value\n        ret['type'] = int(self.type)\n        if self.emoji:\n            ret['emoji'] = self.emoji.to_dict()\n        return ret\n\n    @property\n    def start(self) -> Optional[datetime.datetime]:\n        \"\"\"Optional[:class:`datetime.datetime`]: When the user started doing this activity in UTC, if applicable.\"\"\"\n        try:\n            timestamp = self.timestamps['start'] / 1000\n        except KeyError:\n            return None\n        else:\n            return datetime.datetime.fromtimestamp(timestamp, tz=datetime.timezone.utc)\n\n    @property\n    def end(self) -> Optional[datetime.datetime]:\n        \"\"\"Optional[:class:`datetime.datetime`]: When the user will stop doing this activity in UTC, if applicable.\"\"\"\n        try:\n            timestamp = self.timestamps['end'] / 1000\n        except KeyError:\n            return None\n        else:\n            return datetime.datetime.fromtimestamp(timestamp, tz=datetime.timezone.utc)\n\n    @property\n    def large_image_url(self) -> Optional[str]:\n        \"\"\"Optional[:class:`str`]: Returns a URL pointing to the large image asset of this activity, if applicable.\"\"\"\n        try:\n            large_image = self.assets['large_image']\n        except KeyError:\n            return None\n        else:\n            return self._image_url(large_image)\n\n    @property\n    def small_image_url(self) -> Optional[str]:\n        \"\"\"Optional[:class:`str`]: Returns a URL pointing to the small image asset of this activity, if applicable.\"\"\"\n        try:\n            small_image = self.assets['small_image']\n        except KeyError:\n            return None\n        else:\n            return self._image_url(small_image)\n\n    def _image_url(self, image: str) -> Optional[str]:\n        if image.startswith('mp:'):\n            return f'https://media.discordapp.net/{image[3:]}'\n        elif self.application_id is not None:\n            return Asset.BASE + f'/app-assets/{self.application_id}/{image}.png'\n\n    @property\n    def large_image_text(self) -> Optional[str]:\n        \"\"\"Optional[:class:`str`]: Returns the large image asset hover text of this activity, if applicable.\"\"\"\n        return self.assets.get('large_text', None)\n\n    @property\n    def small_image_text(self) -> Optional[str]:\n        \"\"\"Optional[:class:`str`]: Returns the small image asset hover text of this activity, if applicable.\"\"\"\n        return self.assets.get('small_text', None)\n\n\nclass Game(BaseActivity):\n    \"\"\"A slimmed down version of :class:`Activity` that represents a Discord game.\n\n    This is typically displayed via **Playing** on the official Discord client.\n\n    .. container:: operations\n\n        .. describe:: x == y\n\n            Checks if two games are equal.\n\n        .. describe:: x != y\n\n            Checks if two games are not equal.\n\n        .. describe:: hash(x)\n\n            Returns the game's hash.\n\n        .. describe:: str(x)\n\n            Returns the game's name.\n\n    Parameters\n    -----------\n    name: :class:`str`\n        The game's name.\n\n    Attributes\n    -----------\n    name: :class:`str`\n        The game's name.\n    platform: Optional[:class:`str`]\n        Where the user is playing from (ie. PS5, Xbox).\n\n        .. versionadded:: 2.4\n\n    assets: :class:`dict`\n        A dictionary representing the images and their hover text of a game.\n        It contains the following optional keys:\n\n        - ``large_image``: A string representing the ID for the large image asset.\n        - ``large_text``: A string representing the text when hovering over the large image asset.\n        - ``small_image``: A string representing the ID for the small image asset.\n        - ``small_text``: A string representing the text when hovering over the small image asset.\n\n        .. versionadded:: 2.4\n    \"\"\"\n\n    __slots__ = ('name', '_end', '_start', 'platform', 'assets')\n\n    def __init__(self, name: str, **extra: Any) -> None:\n        super().__init__(**extra)\n        self.name: str = name\n        self.platform: Optional[str] = extra.get('platform')\n        self.assets: ActivityAssets = extra.get('assets', {}) or {}\n\n        try:\n            timestamps: ActivityTimestamps = extra['timestamps']\n        except KeyError:\n            self._start = 0\n            self._end = 0\n        else:\n            self._start = timestamps.get('start', 0)\n            self._end = timestamps.get('end', 0)\n\n    @property\n    def type(self) -> ActivityType:\n        \"\"\":class:`ActivityType`: Returns the game's type. This is for compatibility with :class:`Activity`.\n\n        It always returns :attr:`ActivityType.playing`.\n        \"\"\"\n        return ActivityType.playing\n\n    @property\n    def start(self) -> Optional[datetime.datetime]:\n        \"\"\"Optional[:class:`datetime.datetime`]: When the user started playing this game in UTC, if applicable.\"\"\"\n        if self._start:\n            return datetime.datetime.fromtimestamp(self._start / 1000, tz=datetime.timezone.utc)\n        return None\n\n    @property\n    def end(self) -> Optional[datetime.datetime]:\n        \"\"\"Optional[:class:`datetime.datetime`]: When the user will stop playing this game in UTC, if applicable.\"\"\"\n        if self._end:\n            return datetime.datetime.fromtimestamp(self._end / 1000, tz=datetime.timezone.utc)\n        return None\n\n    def __str__(self) -> str:\n        return str(self.name)\n\n    def __repr__(self) -> str:\n        return f'<Game name={self.name!r}>'\n\n    def to_dict(self) -> Dict[str, Any]:\n        timestamps: Dict[str, Any] = {}\n        if self._start:\n            timestamps['start'] = self._start\n\n        if self._end:\n            timestamps['end'] = self._end\n\n        return {\n            'type': ActivityType.playing.value,\n            'name': str(self.name),\n            'timestamps': timestamps,\n            'platform': str(self.platform) if self.platform else None,\n            'assets': self.assets,\n        }\n\n    def __eq__(self, other: object) -> bool:\n        return isinstance(other, Game) and other.name == self.name\n\n    def __ne__(self, other: object) -> bool:\n        return not self.__eq__(other)\n\n    def __hash__(self) -> int:\n        return hash(self.name)\n\n\nclass Streaming(BaseActivity):\n    \"\"\"A slimmed down version of :class:`Activity` that represents a Discord streaming status.\n\n    This is typically displayed via **Streaming** on the official Discord client.\n\n    .. container:: operations\n\n        .. describe:: x == y\n\n            Checks if two streams are equal.\n\n        .. describe:: x != y\n\n            Checks if two streams are not equal.\n\n        .. describe:: hash(x)\n\n            Returns the stream's hash.\n\n        .. describe:: str(x)\n\n            Returns the stream's name.\n\n    Attributes\n    -----------\n    platform: Optional[:class:`str`]\n        Where the user is streaming from (ie. YouTube, Twitch).\n\n        .. versionadded:: 1.3\n\n    name: Optional[:class:`str`]\n        The stream's name.\n    details: Optional[:class:`str`]\n        An alias for :attr:`name`\n    game: Optional[:class:`str`]\n        The game being streamed.\n\n        .. versionadded:: 1.3\n\n    url: :class:`str`\n        The stream's URL.\n    assets: :class:`dict`\n        A dictionary comprising of similar keys than those in :attr:`Activity.assets`.\n    \"\"\"\n\n    __slots__ = ('platform', 'name', 'game', 'url', 'details', 'assets')\n\n    def __init__(self, *, name: Optional[str], url: str, **extra: Any) -> None:\n        super().__init__(**extra)\n        self.platform: Optional[str] = name\n        self.name: Optional[str] = extra.pop('details', name)\n        self.game: Optional[str] = extra.pop('state', None)\n        self.url: str = url\n        self.details: Optional[str] = extra.pop('details', self.name)  # compatibility\n        self.assets: ActivityAssets = extra.pop('assets', {})\n\n    @property\n    def type(self) -> ActivityType:\n        \"\"\":class:`ActivityType`: Returns the game's type. This is for compatibility with :class:`Activity`.\n\n        It always returns :attr:`ActivityType.streaming`.\n        \"\"\"\n        return ActivityType.streaming\n\n    def __str__(self) -> str:\n        return str(self.name)\n\n    def __repr__(self) -> str:\n        return f'<Streaming name={self.name!r}>'\n\n    @property\n    def twitch_name(self) -> Optional[str]:\n        \"\"\"Optional[:class:`str`]: If provided, the twitch name of the user streaming.\n\n        This corresponds to the ``large_image`` key of the :attr:`Streaming.assets`\n        dictionary if it starts with ``twitch:``. Typically set by the Discord client.\n        \"\"\"\n\n        try:\n            name = self.assets['large_image']\n        except KeyError:\n            return None\n        else:\n            return name[7:] if name[:7] == 'twitch:' else None\n\n    def to_dict(self) -> Dict[str, Any]:\n        ret: Dict[str, Any] = {\n            'type': ActivityType.streaming.value,\n            'name': str(self.name),\n            'url': str(self.url),\n            'assets': self.assets,\n        }\n        if self.details:\n            ret['details'] = self.details\n        return ret\n\n    def __eq__(self, other: object) -> bool:\n        return isinstance(other, Streaming) and other.name == self.name and other.url == self.url\n\n    def __ne__(self, other: object) -> bool:\n        return not self.__eq__(other)\n\n    def __hash__(self) -> int:\n        return hash(self.name)\n\n\nclass Spotify:\n    \"\"\"Represents a Spotify listening activity from Discord. This is a special case of\n    :class:`Activity` that makes it easier to work with the Spotify integration.\n\n    .. container:: operations\n\n        .. describe:: x == y\n\n            Checks if two activities are equal.\n\n        .. describe:: x != y\n\n            Checks if two activities are not equal.\n\n        .. describe:: hash(x)\n\n            Returns the activity's hash.\n\n        .. describe:: str(x)\n\n            Returns the string 'Spotify'.\n    \"\"\"\n\n    __slots__ = ('_state', '_details', '_timestamps', '_assets', '_party', '_sync_id', '_session_id', '_created_at')\n\n    def __init__(self, **data: Any) -> None:\n        self._state: str = data.pop('state', '')\n        self._details: str = data.pop('details', '')\n        self._timestamps: ActivityTimestamps = data.pop('timestamps', {})\n        self._assets: ActivityAssets = data.pop('assets', {})\n        self._party: ActivityParty = data.pop('party', {})\n        self._sync_id: str = data.pop('sync_id', '')\n        self._session_id: Optional[str] = data.pop('session_id')\n        self._created_at: Optional[float] = data.pop('created_at', None)\n\n    @property\n    def type(self) -> ActivityType:\n        \"\"\":class:`ActivityType`: Returns the activity's type. This is for compatibility with :class:`Activity`.\n\n        It always returns :attr:`ActivityType.listening`.\n        \"\"\"\n        return ActivityType.listening\n\n    @property\n    def created_at(self) -> Optional[datetime.datetime]:\n        \"\"\"Optional[:class:`datetime.datetime`]: When the user started listening in UTC.\n\n        .. versionadded:: 1.3\n        \"\"\"\n        if self._created_at is not None:\n            return datetime.datetime.fromtimestamp(self._created_at / 1000, tz=datetime.timezone.utc)\n\n    @property\n    def colour(self) -> Colour:\n        \"\"\":class:`Colour`: Returns the Spotify integration colour, as a :class:`Colour`.\n\n        There is an alias for this named :attr:`color`\"\"\"\n        return Colour(0x1DB954)\n\n    @property\n    def color(self) -> Colour:\n        \"\"\":class:`Colour`: Returns the Spotify integration colour, as a :class:`Colour`.\n\n        There is an alias for this named :attr:`colour`\"\"\"\n        return self.colour\n\n    def to_dict(self) -> Dict[str, Any]:\n        return {\n            'flags': 48,  # SYNC | PLAY\n            'name': 'Spotify',\n            'assets': self._assets,\n            'party': self._party,\n            'sync_id': self._sync_id,\n            'session_id': self._session_id,\n            'timestamps': self._timestamps,\n            'details': self._details,\n            'state': self._state,\n        }\n\n    @property\n    def name(self) -> str:\n        \"\"\":class:`str`: The activity's name. This will always return \"Spotify\".\"\"\"\n        return 'Spotify'\n\n    def __eq__(self, other: object) -> bool:\n        return (\n            isinstance(other, Spotify)\n            and other._session_id == self._session_id\n            and other._sync_id == self._sync_id\n            and other.start == self.start\n        )\n\n    def __ne__(self, other: object) -> bool:\n        return not self.__eq__(other)\n\n    def __hash__(self) -> int:\n        return hash(self._session_id)\n\n    def __str__(self) -> str:\n        return 'Spotify'\n\n    def __repr__(self) -> str:\n        return f'<Spotify title={self.title!r} artist={self.artist!r} track_id={self.track_id!r}>'\n\n    @property\n    def title(self) -> str:\n        \"\"\":class:`str`: The title of the song being played.\"\"\"\n        return self._details\n\n    @property\n    def artists(self) -> List[str]:\n        \"\"\"List[:class:`str`]: The artists of the song being played.\"\"\"\n        return self._state.split('; ')\n\n    @property\n    def artist(self) -> str:\n        \"\"\":class:`str`: The artist of the song being played.\n\n        This does not attempt to split the artist information into\n        multiple artists. Useful if there's only a single artist.\n        \"\"\"\n        return self._state\n\n    @property\n    def album(self) -> str:\n        \"\"\":class:`str`: The album that the song being played belongs to.\"\"\"\n        return self._assets.get('large_text', '')\n\n    @property\n    def album_cover_url(self) -> str:\n        \"\"\":class:`str`: The album cover image URL from Spotify's CDN.\"\"\"\n        large_image = self._assets.get('large_image', '')\n        if large_image[:8] != 'spotify:':\n            return ''\n        album_image_id = large_image[8:]\n        return 'https://i.scdn.co/image/' + album_image_id\n\n    @property\n    def track_id(self) -> str:\n        \"\"\":class:`str`: The track ID used by Spotify to identify this song.\"\"\"\n        return self._sync_id\n\n    @property\n    def track_url(self) -> str:\n        \"\"\":class:`str`: The track URL to listen on Spotify.\n\n        .. versionadded:: 2.0\n        \"\"\"\n        return f'https://open.spotify.com/track/{self.track_id}'\n\n    @property\n    def start(self) -> datetime.datetime:\n        \"\"\":class:`datetime.datetime`: When the user started playing this song in UTC.\"\"\"\n        # the start key will be present here\n        return datetime.datetime.fromtimestamp(self._timestamps['start'] / 1000, tz=datetime.timezone.utc)  # type: ignore\n\n    @property\n    def end(self) -> datetime.datetime:\n        \"\"\":class:`datetime.datetime`: When the user will stop playing this song in UTC.\"\"\"\n        # the end key will be present here\n        return datetime.datetime.fromtimestamp(self._timestamps['end'] / 1000, tz=datetime.timezone.utc)  # type: ignore\n\n    @property\n    def duration(self) -> datetime.timedelta:\n        \"\"\":class:`datetime.timedelta`: The duration of the song being played.\"\"\"\n        return self.end - self.start\n\n    @property\n    def party_id(self) -> str:\n        \"\"\":class:`str`: The party ID of the listening party.\"\"\"\n        return self._party.get('id', '')\n\n\nclass CustomActivity(BaseActivity):\n    \"\"\"Represents a custom activity from Discord.\n\n    .. container:: operations\n\n        .. describe:: x == y\n\n            Checks if two activities are equal.\n\n        .. describe:: x != y\n\n            Checks if two activities are not equal.\n\n        .. describe:: hash(x)\n\n            Returns the activity's hash.\n\n        .. describe:: str(x)\n\n            Returns the custom status text.\n\n    .. versionadded:: 1.3\n\n    Attributes\n    -----------\n    name: Optional[:class:`str`]\n        The custom activity's name.\n    emoji: Optional[:class:`PartialEmoji`]\n        The emoji to pass to the activity, if any.\n    \"\"\"\n\n    __slots__ = ('name', 'emoji', 'state')\n\n    def __init__(\n        self, name: Optional[str], *, emoji: Optional[Union[PartialEmoji, Dict[str, Any], str]] = None, **extra: Any\n    ) -> None:\n        super().__init__(**extra)\n        self.name: Optional[str] = name\n        self.state: Optional[str] = extra.pop('state', name)\n        if self.name == 'Custom Status':\n            self.name = self.state\n\n        self.emoji: Optional[PartialEmoji]\n        if emoji is None:\n            self.emoji = emoji\n        elif isinstance(emoji, dict):\n            self.emoji = PartialEmoji.from_dict(emoji)\n        elif isinstance(emoji, str):\n            self.emoji = PartialEmoji(name=emoji)\n        elif isinstance(emoji, PartialEmoji):\n            self.emoji = emoji\n        else:\n            raise TypeError(f'Expected str, PartialEmoji, or None, received {type(emoji)!r} instead.')\n\n    @property\n    def type(self) -> ActivityType:\n        \"\"\":class:`ActivityType`: Returns the activity's type. This is for compatibility with :class:`Activity`.\n\n        It always returns :attr:`ActivityType.custom`.\n        \"\"\"\n        return ActivityType.custom\n\n    def to_dict(self) -> Dict[str, Any]:\n        if self.name == self.state:\n            o = {\n                'type': ActivityType.custom.value,\n                'state': self.name,\n                'name': 'Custom Status',\n            }\n        else:\n            o = {\n                'type': ActivityType.custom.value,\n                'name': self.name,\n            }\n\n        if self.emoji:\n            o['emoji'] = self.emoji.to_dict()\n        return o\n\n    def __eq__(self, other: object) -> bool:\n        return isinstance(other, CustomActivity) and other.name == self.name and other.emoji == self.emoji\n\n    def __ne__(self, other: object) -> bool:\n        return not self.__eq__(other)\n\n    def __hash__(self) -> int:\n        return hash((self.name, str(self.emoji)))\n\n    def __str__(self) -> str:\n        if self.emoji:\n            if self.name:\n                return f'{self.emoji} {self.name}'\n            return str(self.emoji)\n        else:\n            return str(self.name)\n\n    def __repr__(self) -> str:\n        return f'<CustomActivity name={self.name!r} emoji={self.emoji!r}>'\n\n\nActivityTypes = Union[Activity, Game, CustomActivity, Streaming, Spotify]\n\n\n@overload\ndef create_activity(data: ActivityPayload, state: ConnectionState) -> ActivityTypes:\n    ...\n\n\n@overload\ndef create_activity(data: None, state: ConnectionState) -> None:\n    ...\n\n\ndef create_activity(data: Optional[ActivityPayload], state: ConnectionState) -> Optional[ActivityTypes]:\n    if not data:\n        return None\n\n    game_type = try_enum(ActivityType, data.get('type', -1))\n    if game_type is ActivityType.playing:\n        if 'application_id' in data or 'session_id' in data:\n            return Activity(**data)\n        return Game(**data)\n    elif game_type is ActivityType.custom:\n        try:\n            name = data.pop('name')  # type: ignore\n        except KeyError:\n            ret = Activity(**data)\n        else:\n            # we removed the name key from data already\n            ret = CustomActivity(name=name, **data)  # type: ignore\n    elif game_type is ActivityType.streaming:\n        if 'url' in data:\n            # the url won't be None here\n            return Streaming(**data)  # type: ignore\n        return Activity(**data)\n    elif game_type is ActivityType.listening and 'sync_id' in data and 'session_id' in data:\n        return Spotify(**data)\n    else:\n        ret = Activity(**data)\n\n    if isinstance(ret.emoji, PartialEmoji):\n        ret.emoji._state = state\n    return ret\n"
  },
  {
    "path": "discord/app_commands/__init__.py",
    "content": "\"\"\"\ndiscord.app_commands\n~~~~~~~~~~~~~~~~~~~~~\n\nApplication commands support for the Discord API\n\n:copyright: (c) 2015-present Rapptz\n:license: MIT, see LICENSE for more details.\n\n\"\"\"\n\nfrom .commands import *\nfrom .errors import *\nfrom .models import *\nfrom .tree import *\nfrom .namespace import *\nfrom .transformers import *\nfrom .translator import *\nfrom .installs import *\nfrom . import checks as checks\nfrom .checks import Cooldown as Cooldown\n"
  },
  {
    "path": "discord/app_commands/checks.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom __future__ import annotations\n\nfrom typing import (\n    Any,\n    Coroutine,\n    Dict,\n    Hashable,\n    Union,\n    Callable,\n    TypeVar,\n    Optional,\n    TYPE_CHECKING,\n)\n\nimport time\n\nfrom .commands import check\nfrom .errors import (\n    NoPrivateMessage,\n    MissingRole,\n    MissingAnyRole,\n    MissingPermissions,\n    BotMissingPermissions,\n    CommandOnCooldown,\n)\n\nfrom ..user import User\nfrom ..permissions import Permissions\nfrom ..utils import get as utils_get, MISSING, maybe_coroutine\n\nT = TypeVar('T')\n\nif TYPE_CHECKING:\n    from typing_extensions import Self\n    from ..interactions import Interaction\n\n    CooldownFunction = Union[\n        Callable[[Interaction[Any]], Coroutine[Any, Any, T]],\n        Callable[[Interaction[Any]], T],\n    ]\n\n__all__ = (\n    'has_role',\n    'has_any_role',\n    'has_permissions',\n    'bot_has_permissions',\n    'cooldown',\n    'dynamic_cooldown',\n)\n\n\nclass Cooldown:\n    \"\"\"Represents a cooldown for a command.\n\n    .. versionadded:: 2.0\n\n    Attributes\n    -----------\n    rate: :class:`float`\n        The total number of tokens available per :attr:`per` seconds.\n    per: :class:`float`\n        The length of the cooldown period in seconds.\n    \"\"\"\n\n    __slots__ = ('rate', 'per', '_window', '_tokens', '_last')\n\n    def __init__(self, rate: float, per: float) -> None:\n        self.rate: int = int(rate)\n        self.per: float = float(per)\n        self._window: float = 0.0\n        self._tokens: int = self.rate\n        self._last: float = 0.0\n\n    def get_tokens(self, current: Optional[float] = None) -> int:\n        \"\"\"Returns the number of available tokens before rate limiting is applied.\n\n        Parameters\n        ------------\n        current: Optional[:class:`float`]\n            The time in seconds since Unix epoch to calculate tokens at.\n            If not supplied then :func:`time.time()` is used.\n\n        Returns\n        --------\n        :class:`int`\n            The number of tokens available before the cooldown is to be applied.\n        \"\"\"\n        if not current:\n            current = time.time()\n\n        # the calculated tokens should be non-negative\n        tokens = max(self._tokens, 0)\n\n        if current > self._window + self.per:\n            tokens = self.rate\n        return tokens\n\n    def get_retry_after(self, current: Optional[float] = None) -> float:\n        \"\"\"Returns the time in seconds until the cooldown will be reset.\n\n        Parameters\n        -------------\n        current: Optional[:class:`float`]\n            The current time in seconds since Unix epoch.\n            If not supplied, then :func:`time.time()` is used.\n\n        Returns\n        -------\n        :class:`float`\n            The number of seconds to wait before this cooldown will be reset.\n        \"\"\"\n        current = current or time.time()\n        tokens = self.get_tokens(current)\n\n        if tokens == 0:\n            return self.per - (current - self._window)\n\n        return 0.0\n\n    def update_rate_limit(self, current: Optional[float] = None, *, tokens: int = 1) -> Optional[float]:\n        \"\"\"Updates the cooldown rate limit.\n\n        Parameters\n        -------------\n        current: Optional[:class:`float`]\n            The time in seconds since Unix epoch to update the rate limit at.\n            If not supplied, then :func:`time.time()` is used.\n        tokens: :class:`int`\n            The amount of tokens to deduct from the rate limit.\n\n        Returns\n        -------\n        Optional[:class:`float`]\n            The retry-after time in seconds if rate limited.\n        \"\"\"\n        current = current or time.time()\n        self._last = current\n\n        self._tokens = self.get_tokens(current)\n\n        # first token used means that we start a new rate limit window\n        if self._tokens == self.rate:\n            self._window = current\n\n        # decrement tokens by specified number\n        self._tokens -= tokens\n\n        # check if we are rate limited and return retry-after\n        if self._tokens < 0:\n            return self.per - (current - self._window)\n\n    def reset(self) -> None:\n        \"\"\"Reset the cooldown to its initial state.\"\"\"\n        self._tokens = self.rate\n        self._last = 0.0\n\n    def copy(self) -> Self:\n        \"\"\"Creates a copy of this cooldown.\n\n        Returns\n        --------\n        :class:`Cooldown`\n            A new instance of this cooldown.\n        \"\"\"\n        return self.__class__(self.rate, self.per)\n\n    def __repr__(self) -> str:\n        return f'<Cooldown rate: {self.rate} per: {self.per} window: {self._window} tokens: {self._tokens}>'\n\n\ndef has_role(item: Union[int, str], /) -> Callable[[T], T]:\n    \"\"\"A :func:`~discord.app_commands.check` that is added that checks if the member invoking the\n    command has the role specified via the name or ID specified.\n\n    If a string is specified, you must give the exact name of the role, including\n    caps and spelling.\n\n    If an integer is specified, you must give the exact snowflake ID of the role.\n\n    This check raises one of two special exceptions, :exc:`~discord.app_commands.MissingRole`\n    if the user is missing a role, or :exc:`~discord.app_commands.NoPrivateMessage` if\n    it is used in a private message. Both inherit from :exc:`~discord.app_commands.CheckFailure`.\n\n    .. versionadded:: 2.0\n\n    .. note::\n\n        This is different from the permission system that Discord provides for application\n        commands. This is done entirely locally in the program rather than being handled\n        by Discord.\n\n    Parameters\n    -----------\n    item: Union[:class:`int`, :class:`str`]\n        The name or ID of the role to check.\n    \"\"\"\n\n    def predicate(interaction: Interaction) -> bool:\n        if isinstance(interaction.user, User):\n            raise NoPrivateMessage()\n\n        if isinstance(item, int):\n            role = interaction.user.get_role(item)\n        else:\n            role = utils_get(interaction.user.roles, name=item)\n\n        if role is None:\n            raise MissingRole(item)\n        return True\n\n    return check(predicate)\n\n\ndef has_any_role(*items: Union[int, str]) -> Callable[[T], T]:\n    r\"\"\"A :func:`~discord.app_commands.check` that is added that checks if the member\n    invoking the command has **any** of the roles specified. This means that if they have\n    one out of the three roles specified, then this check will return ``True``.\n\n    Similar to :func:`has_role`\\, the names or IDs passed in must be exact.\n\n    This check raises one of two special exceptions, :exc:`~discord.app_commands.MissingAnyRole`\n    if the user is missing all roles, or :exc:`~discord.app_commands.NoPrivateMessage` if\n    it is used in a private message. Both inherit from :exc:`~discord.app_commands.CheckFailure`.\n\n    .. versionadded:: 2.0\n\n    .. note::\n\n        This is different from the permission system that Discord provides for application\n        commands. This is done entirely locally in the program rather than being handled\n        by Discord.\n\n    Parameters\n    -----------\n    items: List[Union[:class:`str`, :class:`int`]]\n        An argument list of names or IDs to check that the member has roles wise.\n\n    Example\n    --------\n\n    .. code-block:: python3\n\n        @tree.command()\n        @app_commands.checks.has_any_role('Library Devs', 'Moderators', 492212595072434186)\n        async def cool(interaction: discord.Interaction):\n            await interaction.response.send_message('You are cool indeed')\n    \"\"\"\n\n    def predicate(interaction: Interaction) -> bool:\n        if isinstance(interaction.user, User):\n            raise NoPrivateMessage()\n\n        if any(\n            interaction.user.get_role(item) is not None\n            if isinstance(item, int)\n            else utils_get(interaction.user.roles, name=item) is not None\n            for item in items\n        ):\n            return True\n        raise MissingAnyRole(list(items))\n\n    return check(predicate)\n\n\ndef has_permissions(**perms: bool) -> Callable[[T], T]:\n    r\"\"\"A :func:`~discord.app_commands.check` that is added that checks if the member\n    has all of the permissions necessary.\n\n    Note that this check operates on the permissions given by\n    :attr:`discord.Interaction.permissions`.\n\n    The permissions passed in must be exactly like the properties shown under\n    :class:`discord.Permissions`.\n\n    This check raises a special exception, :exc:`~discord.app_commands.MissingPermissions`\n    that is inherited from :exc:`~discord.app_commands.CheckFailure`.\n\n    .. versionadded:: 2.0\n\n    .. note::\n\n        This is different from the permission system that Discord provides for application\n        commands. This is done entirely locally in the program rather than being handled\n        by Discord.\n\n    Parameters\n    ------------\n    \\*\\*perms: :class:`bool`\n        Keyword arguments denoting the permissions to check for.\n\n    Example\n    ---------\n\n    .. code-block:: python3\n\n        @tree.command()\n        @app_commands.checks.has_permissions(manage_messages=True)\n        async def test(interaction: discord.Interaction):\n            await interaction.response.send_message('You can manage messages.')\n\n    \"\"\"\n\n    invalid = perms.keys() - Permissions.VALID_FLAGS.keys()\n    if invalid:\n        raise TypeError(f\"Invalid permission(s): {', '.join(invalid)}\")\n\n    def predicate(interaction: Interaction) -> bool:\n        permissions = interaction.permissions\n\n        missing = [perm for perm, value in perms.items() if getattr(permissions, perm) != value]\n\n        if not missing:\n            return True\n\n        raise MissingPermissions(missing)\n\n    return check(predicate)\n\n\ndef bot_has_permissions(**perms: bool) -> Callable[[T], T]:\n    \"\"\"Similar to :func:`has_permissions` except checks if the bot itself has\n    the permissions listed. This relies on :attr:`discord.Interaction.app_permissions`.\n\n    This check raises a special exception, :exc:`~discord.app_commands.BotMissingPermissions`\n    that is inherited from :exc:`~discord.app_commands.CheckFailure`.\n\n    .. versionadded:: 2.0\n    \"\"\"\n\n    invalid = set(perms) - set(Permissions.VALID_FLAGS)\n    if invalid:\n        raise TypeError(f\"Invalid permission(s): {', '.join(invalid)}\")\n\n    def predicate(interaction: Interaction) -> bool:\n        permissions = interaction.app_permissions\n        missing = [perm for perm, value in perms.items() if getattr(permissions, perm) != value]\n\n        if not missing:\n            return True\n\n        raise BotMissingPermissions(missing)\n\n    return check(predicate)\n\n\ndef _create_cooldown_decorator(\n    key: CooldownFunction[Hashable], factory: CooldownFunction[Optional[Cooldown]]\n) -> Callable[[T], T]:\n\n    mapping: Dict[Any, Cooldown] = {}\n\n    async def get_bucket(\n        interaction: Interaction,\n        *,\n        mapping: Dict[Any, Cooldown] = mapping,\n        key: CooldownFunction[Hashable] = key,\n        factory: CooldownFunction[Optional[Cooldown]] = factory,\n    ) -> Optional[Cooldown]:\n        current = interaction.created_at.timestamp()\n        dead_keys = [k for k, v in mapping.items() if current > v._last + v.per]\n        for k in dead_keys:\n            del mapping[k]\n\n        k = await maybe_coroutine(key, interaction)\n        if k not in mapping:\n            bucket: Optional[Cooldown] = await maybe_coroutine(factory, interaction)\n            if bucket is not None:\n                mapping[k] = bucket\n        else:\n            bucket = mapping[k]\n\n        return bucket\n\n    async def predicate(interaction: Interaction) -> bool:\n        bucket = await get_bucket(interaction)\n        if bucket is None:\n            return True\n\n        retry_after = bucket.update_rate_limit(interaction.created_at.timestamp())\n        if retry_after is None:\n            return True\n\n        raise CommandOnCooldown(bucket, retry_after)\n\n    return check(predicate)\n\n\ndef cooldown(\n    rate: float,\n    per: float,\n    *,\n    key: Optional[CooldownFunction[Hashable]] = MISSING,\n) -> Callable[[T], T]:\n    \"\"\"A decorator that adds a cooldown to a command.\n\n    A cooldown allows a command to only be used a specific amount\n    of times in a specific time frame. These cooldowns are based off\n    of the ``key`` function provided. If a ``key`` is not provided\n    then it defaults to a user-level cooldown. The ``key`` function\n    must take a single parameter, the :class:`discord.Interaction` and\n    return a value that is used as a key to the internal cooldown mapping.\n\n    The ``key`` function can optionally be a coroutine.\n\n    If a cooldown is triggered, then :exc:`~discord.app_commands.CommandOnCooldown` is\n    raised to the error handlers.\n\n    Examples\n    ---------\n\n    Setting a one per 5 seconds per member cooldown on a command:\n\n    .. code-block:: python3\n\n        @tree.command()\n        @app_commands.checks.cooldown(1, 5.0, key=lambda i: (i.guild_id, i.user.id))\n        async def test(interaction: discord.Interaction):\n            await interaction.response.send_message('Hello')\n\n        @test.error\n        async def on_test_error(interaction: discord.Interaction, error: app_commands.AppCommandError):\n            if isinstance(error, app_commands.CommandOnCooldown):\n                await interaction.response.send_message(str(error), ephemeral=True)\n\n    Parameters\n    ------------\n    rate: :class:`int`\n        The number of times a command can be used before triggering a cooldown.\n    per: :class:`float`\n        The amount of seconds to wait for a cooldown when it's been triggered.\n    key: Optional[Callable[[:class:`discord.Interaction`], :class:`collections.abc.Hashable`]]\n        A function that returns a key to the mapping denoting the type of cooldown.\n        Can optionally be a coroutine. If not given then defaults to a user-level\n        cooldown. If ``None`` is passed then it is interpreted as a \"global\" cooldown.\n    \"\"\"\n\n    if key is MISSING:\n        key_func = lambda interaction: interaction.user.id\n    elif key is None:\n        key_func = lambda i: None\n    else:\n        key_func = key\n\n    factory = lambda interaction: Cooldown(rate, per)\n\n    return _create_cooldown_decorator(key_func, factory)\n\n\ndef dynamic_cooldown(\n    factory: CooldownFunction[Optional[Cooldown]],\n    *,\n    key: Optional[CooldownFunction[Hashable]] = MISSING,\n) -> Callable[[T], T]:\n    \"\"\"A decorator that adds a dynamic cooldown to a command.\n\n    A cooldown allows a command to only be used a specific amount\n    of times in a specific time frame. These cooldowns are based off\n    of the ``key`` function provided. If a ``key`` is not provided\n    then it defaults to a user-level cooldown. The ``key`` function\n    must take a single parameter, the :class:`discord.Interaction` and\n    return a value that is used as a key to the internal cooldown mapping.\n\n    If a ``factory`` function is given, it must be a function that\n    accepts a single parameter of type :class:`discord.Interaction` and must\n    return a :class:`~discord.app_commands.Cooldown` or ``None``.\n    If ``None`` is returned then that cooldown is effectively bypassed.\n\n    Both ``key`` and ``factory`` can optionally be coroutines.\n\n    If a cooldown is triggered, then :exc:`~discord.app_commands.CommandOnCooldown` is\n    raised to the error handlers.\n\n    Examples\n    ---------\n\n    Setting a cooldown for everyone but the owner.\n\n    .. code-block:: python3\n\n        def cooldown_for_everyone_but_me(interaction: discord.Interaction) -> Optional[app_commands.Cooldown]:\n            if interaction.user.id == 80088516616269824:\n                return None\n            return app_commands.Cooldown(1, 10.0)\n\n        @tree.command()\n        @app_commands.checks.dynamic_cooldown(cooldown_for_everyone_but_me)\n        async def test(interaction: discord.Interaction):\n            await interaction.response.send_message('Hello')\n\n        @test.error\n        async def on_test_error(interaction: discord.Interaction, error: app_commands.AppCommandError):\n            if isinstance(error, app_commands.CommandOnCooldown):\n                await interaction.response.send_message(str(error), ephemeral=True)\n\n    Parameters\n    ------------\n    factory: Optional[Callable[[:class:`discord.Interaction`], Optional[:class:`~discord.app_commands.Cooldown`]]]\n        A function that takes an interaction and returns a cooldown that will apply to that interaction\n        or ``None`` if the interaction should not have a cooldown.\n    key: Optional[Callable[[:class:`discord.Interaction`], :class:`collections.abc.Hashable`]]\n        A function that returns a key to the mapping denoting the type of cooldown.\n        Can optionally be a coroutine. If not given then defaults to a user-level\n        cooldown. If ``None`` is passed then it is interpreted as a \"global\" cooldown.\n    \"\"\"\n\n    if key is MISSING:\n        key_func = lambda interaction: interaction.user.id\n    elif key is None:\n        key_func = lambda i: None\n    else:\n        key_func = key\n\n    return _create_cooldown_decorator(key_func, factory)\n"
  },
  {
    "path": "discord/app_commands/commands.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom __future__ import annotations\nimport inspect\n\nfrom typing import (\n    Any,\n    Callable,\n    ClassVar,\n    Coroutine,\n    Dict,\n    Generator,\n    Generic,\n    List,\n    MutableMapping,\n    Optional,\n    Set,\n    TYPE_CHECKING,\n    Tuple,\n    Type,\n    TypeVar,\n    Union,\n    overload,\n)\n\nimport re\nfrom copy import copy as shallow_copy\n\nfrom ..enums import AppCommandOptionType, AppCommandType, ChannelType, Locale\nfrom .installs import AppCommandContext, AppInstallationType\nfrom .models import Choice\nfrom .transformers import annotation_to_parameter, CommandParameter, NoneType\nfrom .errors import AppCommandError, CheckFailure, CommandInvokeError, CommandSignatureMismatch, CommandAlreadyRegistered\nfrom .translator import TranslationContextLocation, TranslationContext, Translator, locale_str\nfrom ..message import Message\nfrom ..user import User\nfrom ..member import Member\nfrom ..permissions import Permissions\nfrom ..utils import resolve_annotation, MISSING, is_inside_class, maybe_coroutine, async_all, _shorten, _to_kebab_case\n\nif TYPE_CHECKING:\n    from typing_extensions import ParamSpec, Concatenate\n    from ..interactions import Interaction\n    from ..abc import Snowflake\n    from .namespace import Namespace\n    from .models import ChoiceT\n    from .tree import CommandTree\n    from .._types import ClientT\n\n    # Generally, these two libraries are supposed to be separate from each other.\n    # However, for type hinting purposes it's unfortunately necessary for one to\n    # reference the other to prevent type checking errors in callbacks\n    from discord.ext import commands\n\n    ErrorFunc = Callable[[Interaction, AppCommandError], Coroutine[Any, Any, None]]\n\n__all__ = (\n    'Command',\n    'ContextMenu',\n    'Group',\n    'Parameter',\n    'context_menu',\n    'command',\n    'describe',\n    'check',\n    'rename',\n    'choices',\n    'autocomplete',\n    'guilds',\n    'guild_only',\n    'dm_only',\n    'private_channel_only',\n    'allowed_contexts',\n    'guild_install',\n    'user_install',\n    'allowed_installs',\n    'default_permissions',\n)\n\nif TYPE_CHECKING:\n    P = ParamSpec('P')\nelse:\n    P = TypeVar('P')\n\nT = TypeVar('T')\nF = TypeVar('F', bound=Callable[..., Any])\nGroupT = TypeVar('GroupT', bound='Binding')\nCoro = Coroutine[Any, Any, T]\nUnboundError = Callable[['Interaction[Any]', AppCommandError], Coro[Any]]\nError = Union[\n    Callable[[GroupT, 'Interaction[Any]', AppCommandError], Coro[Any]],\n    UnboundError,\n]\nCheck = Callable[['Interaction[Any]'], Union[bool, Coro[bool]]]\nBinding = Union['Group', 'commands.Cog']\n\n\nif TYPE_CHECKING:\n    CommandCallback = Union[\n        Callable[Concatenate[GroupT, 'Interaction[Any]', P], Coro[T]],\n        Callable[Concatenate['Interaction[Any]', P], Coro[T]],\n    ]\n\n    ContextMenuCallback = Union[\n        # If groups end up support context menus these would be uncommented\n        # Callable[[GroupT, 'Interaction', Member], Coro[Any]],\n        # Callable[[GroupT, 'Interaction', User], Coro[Any]],\n        # Callable[[GroupT, 'Interaction', Message], Coro[Any]],\n        # Callable[[GroupT, 'Interaction', Union[Member, User]], Coro[Any]],\n        Callable[['Interaction[Any]', Member], Coro[Any]],\n        Callable[['Interaction[Any]', User], Coro[Any]],\n        Callable[['Interaction[Any]', Message], Coro[Any]],\n        Callable[['Interaction[Any]', Union[Member, User]], Coro[Any]],\n    ]\n\n    AutocompleteCallback = Union[\n        Callable[[GroupT, 'Interaction[Any]', str], Coro[List[Choice[ChoiceT]]]],\n        Callable[['Interaction[Any]', str], Coro[List[Choice[ChoiceT]]]],\n    ]\nelse:\n    CommandCallback = Callable[..., Coro[T]]\n    ContextMenuCallback = Callable[..., Coro[T]]\n    AutocompleteCallback = Callable[..., Coro[T]]\n\n\nCheckInputParameter = Union['Command[Any, ..., Any]', 'ContextMenu', 'CommandCallback[Any, ..., Any]', ContextMenuCallback]\n\n# The re module doesn't support \\p{} so we have to list characters from Thai and Devanagari manually.\nTHAI_COMBINING = r'\\u0e31-\\u0e3a\\u0e47-\\u0e4e'\nDEVANAGARI_COMBINING = r'\\u0900-\\u0903\\u093a\\u093b\\u093c\\u093e\\u093f\\u0940-\\u094f\\u0955\\u0956\\u0957\\u0962\\u0963'\nVALID_SLASH_COMMAND_NAME = re.compile(r'^[-_\\w' + THAI_COMBINING + DEVANAGARI_COMBINING + r']{1,32}$')\n\nARG_NAME_SUBREGEX = r'(?:\\\\?\\*){0,2}(?P<name>\\w+)'\n\nARG_DESCRIPTION_SUBREGEX = r'(?P<description>(?:.|\\n)+?(?:\\Z|\\r?\\n(?=[\\S\\r\\n])))'\n\nARG_TYPE_SUBREGEX = r'(?:.+)'\n\nGOOGLE_DOCSTRING_ARG_REGEX = re.compile(\n    rf'^{ARG_NAME_SUBREGEX}[ \\t]*(?:\\({ARG_TYPE_SUBREGEX}\\))?[ \\t]*:[ \\t]*{ARG_DESCRIPTION_SUBREGEX}',\n    re.MULTILINE,\n)\n\nSPHINX_DOCSTRING_ARG_REGEX = re.compile(\n    rf'^:param {ARG_NAME_SUBREGEX}:[ \\t]+{ARG_DESCRIPTION_SUBREGEX}',\n    re.MULTILINE,\n)\n\nNUMPY_DOCSTRING_ARG_REGEX = re.compile(\n    rf'^{ARG_NAME_SUBREGEX}(?:[ \\t]*:)?(?:[ \\t]+{ARG_TYPE_SUBREGEX})?[ \\t]*\\r?\\n[ \\t]+{ARG_DESCRIPTION_SUBREGEX}',\n    re.MULTILINE,\n)\n\n\ndef _parse_args_from_docstring(func: Callable[..., Any], params: Dict[str, CommandParameter]) -> Dict[str, str]:\n    docstring = inspect.getdoc(func)\n\n    if docstring is None:\n        return {}\n\n    # Extract the arguments\n    # Note: These are loose regexes, but they are good enough for our purposes\n    # For Google-style, look only at the lines that are indented\n    section_lines = inspect.cleandoc('\\n'.join(line for line in docstring.splitlines() if line.startswith('  ')))\n    docstring_styles = (\n        GOOGLE_DOCSTRING_ARG_REGEX.finditer(section_lines),\n        SPHINX_DOCSTRING_ARG_REGEX.finditer(docstring),\n        NUMPY_DOCSTRING_ARG_REGEX.finditer(docstring),\n    )\n\n    return {\n        m.group('name'): m.group('description') for matches in docstring_styles for m in matches if m.group('name') in params\n    }\n\n\ndef validate_name(name: str) -> str:\n    match = VALID_SLASH_COMMAND_NAME.match(name)\n    if match is None:\n        raise ValueError(\n            f'{name!r} must be between 1-32 characters and contain only lower-case letters, numbers, hyphens, or underscores.'\n        )\n\n    # Ideally, name.islower() would work instead but since certain characters\n    # are Lo (e.g. CJK) those don't pass the test. I'd use `casefold` instead as\n    # well, but chances are the server-side check is probably something similar to\n    # this code anyway.\n    if name.lower() != name:\n        raise ValueError(f'{name!r} must be all lower-case')\n    return name\n\n\ndef validate_context_menu_name(name: str) -> str:\n    if not name or len(name) > 32:\n        raise ValueError('context menu names must be between 1-32 characters')\n    return name\n\n\ndef validate_auto_complete_callback(\n    callback: AutocompleteCallback[GroupT, ChoiceT]\n) -> AutocompleteCallback[GroupT, ChoiceT]:\n    # This function needs to ensure the following is true:\n    # If self.foo is passed then don't pass command.binding to the callback\n    # If Class.foo is passed then it is assumed command.binding has to be passed\n    # If free_function_foo is passed then no binding should be passed at all\n    # Passing command.binding is mandated by pass_command_binding\n\n    binding = getattr(callback, '__self__', None)\n    pass_command_binding = binding is None and is_inside_class(callback)\n\n    # 'method' objects can't have dynamic attributes\n    if binding is None:\n        callback.pass_command_binding = pass_command_binding\n\n    required_parameters = 2 + pass_command_binding\n    params = inspect.signature(callback).parameters\n    if len(params) != required_parameters:\n        raise TypeError(f'autocomplete callback {callback.__qualname__!r} requires either 2 or 3 parameters to be passed')\n\n    return callback\n\n\ndef _context_menu_annotation(annotation: Any, *, _none: type = NoneType) -> AppCommandType:\n    if annotation is Message:\n        return AppCommandType.message\n\n    supported_types: Set[Any] = {Member, User}\n    if annotation in supported_types:\n        return AppCommandType.user\n\n    # Check if there's an origin\n    origin = getattr(annotation, '__origin__', None)\n    if origin is not Union:\n        # Only Union is supported so bail early\n        msg = (\n            f'unsupported type annotation {annotation!r}, must be either discord.Member, '\n            'discord.User, discord.Message, or a typing.Union of discord.Member and discord.User'\n        )\n        raise TypeError(msg)\n\n    # Only Union[Member, User] is supported\n    if not all(arg in supported_types for arg in annotation.__args__):\n        raise TypeError(f'unsupported types given inside {annotation!r}')\n\n    return AppCommandType.user\n\n\ndef _populate_descriptions(params: Dict[str, CommandParameter], descriptions: Dict[str, Any]) -> None:\n    for name, param in params.items():\n        description = descriptions.pop(name, MISSING)\n        if description is MISSING:\n            param.description = '…'\n            continue\n\n        if not isinstance(description, (str, locale_str)):\n            raise TypeError('description must be a string')\n\n        if isinstance(description, str):\n            param.description = _shorten(description)\n        else:\n            param.description = description\n\n    if descriptions:\n        first = next(iter(descriptions))\n        raise TypeError(f'unknown parameter given: {first}')\n\n\ndef _populate_renames(params: Dict[str, CommandParameter], renames: Dict[str, Union[str, locale_str]]) -> None:\n    rename_map: Dict[str, Union[str, locale_str]] = {}\n\n    # original name to renamed name\n\n    for name in params.keys():\n        new_name = renames.pop(name, MISSING)\n\n        if new_name is MISSING:\n            rename_map[name] = name\n            continue\n\n        if name in rename_map:\n            raise ValueError(f'{new_name} is already used')\n\n        if isinstance(new_name, str):\n            new_name = validate_name(new_name)\n        else:\n            validate_name(new_name.message)\n\n        rename_map[name] = new_name\n        params[name]._rename = new_name\n\n    if renames:\n        first = next(iter(renames))\n        raise ValueError(f'unknown parameter given: {first}')\n\n\ndef _populate_choices(params: Dict[str, CommandParameter], all_choices: Dict[str, List[Choice]]) -> None:\n    for name, param in params.items():\n        choices = all_choices.pop(name, MISSING)\n        if choices is MISSING:\n            continue\n\n        if not isinstance(choices, list):\n            raise TypeError('choices must be a list of Choice')\n\n        if not all(isinstance(choice, Choice) for choice in choices):\n            raise TypeError('choices must be a list of Choice')\n\n        if param.type not in (AppCommandOptionType.string, AppCommandOptionType.number, AppCommandOptionType.integer):\n            raise TypeError('choices are only supported for integer, string, or number option types')\n\n        if not all(param.type == choice._option_type for choice in choices):\n            raise TypeError('choices must all have the same inner option type as the parameter choice type')\n\n        param.choices = choices\n\n    if all_choices:\n        first = next(iter(all_choices))\n        raise TypeError(f'unknown parameter given: {first}')\n\n\ndef _populate_autocomplete(params: Dict[str, CommandParameter], autocomplete: Dict[str, Any]) -> None:\n    for name, param in params.items():\n        callback = autocomplete.pop(name, MISSING)\n        if callback is MISSING:\n            continue\n\n        if not inspect.iscoroutinefunction(callback):\n            raise TypeError('autocomplete callback must be a coroutine function')\n\n        if param.type not in (AppCommandOptionType.string, AppCommandOptionType.number, AppCommandOptionType.integer):\n            raise TypeError('autocomplete is only supported for integer, string, or number option types')\n\n        if param.is_choice_annotation():\n            raise TypeError(\n                'Choice annotation unsupported for autocomplete parameters, consider using a regular annotation instead'\n            )\n\n        param.autocomplete = validate_auto_complete_callback(callback)\n\n    if autocomplete:\n        first = next(iter(autocomplete))\n        raise TypeError(f'unknown parameter given: {first}')\n\n\ndef _extract_parameters_from_callback(func: Callable[..., Any], globalns: Dict[str, Any]) -> Dict[str, CommandParameter]:\n    params = inspect.signature(func).parameters\n    cache = {}\n    required_params = is_inside_class(func) + 1\n    if len(params) < required_params:\n        raise TypeError(f'callback {func.__qualname__!r} must have more than {required_params - 1} parameter(s)')\n\n    iterator = iter(params.values())\n    for _ in range(0, required_params):\n        next(iterator)\n\n    parameters: List[CommandParameter] = []\n    for parameter in iterator:\n        if parameter.annotation is parameter.empty:\n            raise TypeError(f'parameter {parameter.name!r} is missing a type annotation in callback {func.__qualname__!r}')\n\n        resolved = resolve_annotation(parameter.annotation, globalns, globalns, cache)\n        param = annotation_to_parameter(resolved, parameter)\n        parameters.append(param)\n\n    values = sorted(parameters, key=lambda a: a.required, reverse=True)\n    result = {v.name: v for v in values}\n\n    descriptions = _parse_args_from_docstring(func, result)\n\n    try:\n        descriptions.update(func.__discord_app_commands_param_description__)\n    except AttributeError:\n        for param in values:\n            if param.description is MISSING:\n                param.description = '…'\n    if descriptions:\n        _populate_descriptions(result, descriptions)\n\n    try:\n        renames = func.__discord_app_commands_param_rename__\n    except AttributeError:\n        pass\n    else:\n        _populate_renames(result, renames.copy())\n\n    try:\n        choices = func.__discord_app_commands_param_choices__\n    except AttributeError:\n        pass\n    else:\n        _populate_choices(result, choices.copy())\n\n    try:\n        autocomplete = func.__discord_app_commands_param_autocomplete__\n    except AttributeError:\n        pass\n    else:\n        _populate_autocomplete(result, autocomplete.copy())\n\n    return result\n\n\ndef _get_context_menu_parameter(func: ContextMenuCallback) -> Tuple[str, Any, AppCommandType]:\n    params = inspect.signature(func).parameters\n    if is_inside_class(func) and not hasattr(func, '__self__'):\n        raise TypeError('context menus cannot be defined inside a class')\n\n    if len(params) != 2:\n        msg = (\n            f'context menu callback {func.__qualname__!r} requires 2 parameters, '\n            'the first one being the interaction and the other one explicitly '\n            'annotated with either discord.Message, discord.User, discord.Member, '\n            'or a typing.Union of discord.Member and discord.User'\n        )\n        raise TypeError(msg)\n\n    iterator = iter(params.values())\n    next(iterator)  # skip interaction\n    parameter = next(iterator)\n    if parameter.annotation is parameter.empty:\n        msg = (\n            f'second parameter of context menu callback {func.__qualname__!r} must be explicitly '\n            'annotated with either discord.Message, discord.User, discord.Member, or '\n            'a typing.Union of discord.Member and discord.User'\n        )\n        raise TypeError(msg)\n\n    resolved = resolve_annotation(parameter.annotation, func.__globals__, func.__globals__, {})\n    type = _context_menu_annotation(resolved)\n    return (parameter.name, resolved, type)\n\n\ndef mark_overrideable(func: F) -> F:\n    func.__discord_app_commands_base_function__ = None\n    return func\n\n\nclass Parameter:\n    \"\"\"A class that contains the parameter information of a :class:`Command` callback.\n\n    .. versionadded:: 2.0\n\n    Attributes\n    -----------\n    name: :class:`str`\n        The name of the parameter. This is the Python identifier for the parameter.\n    display_name: :class:`str`\n        The displayed name of the parameter on Discord.\n    description: :class:`str`\n        The description of the parameter.\n    autocomplete: :class:`bool`\n        Whether the parameter has an autocomplete handler.\n    locale_name: Optional[:class:`locale_str`]\n        The display name's locale string, if available.\n    locale_description: Optional[:class:`locale_str`]\n        The description's locale string, if available.\n    required: :class:`bool`\n        Whether the parameter is required\n    choices: List[:class:`~discord.app_commands.Choice`]\n        A list of choices this parameter takes, if any.\n    type: :class:`~discord.AppCommandOptionType`\n        The underlying type of this parameter.\n    channel_types: List[:class:`~discord.ChannelType`]\n        The channel types that are allowed for this parameter.\n    min_value: Optional[Union[:class:`int`, :class:`float`]]\n        The minimum supported value for this parameter.\n    max_value: Optional[Union[:class:`int`, :class:`float`]]\n        The maximum supported value for this parameter.\n    default: Any\n        The default value of the parameter, if given.\n        If not given then this is :data:`~discord.utils.MISSING`.\n    command: :class:`Command`\n        The command this parameter is attached to.\n    \"\"\"\n\n    def __init__(self, parent: CommandParameter, command: Command[Any, ..., Any]) -> None:\n        self.__parent: CommandParameter = parent\n        self.__command: Command[Any, ..., Any] = command\n\n    @property\n    def command(self) -> Command[Any, ..., Any]:\n        return self.__command\n\n    @property\n    def name(self) -> str:\n        return self.__parent.name\n\n    @property\n    def display_name(self) -> str:\n        return self.__parent.display_name\n\n    @property\n    def required(self) -> bool:\n        return self.__parent.required\n\n    @property\n    def description(self) -> str:\n        return str(self.__parent.description)\n\n    @property\n    def locale_name(self) -> Optional[locale_str]:\n        if isinstance(self.__parent._rename, locale_str):\n            return self.__parent._rename\n        return None\n\n    @property\n    def locale_description(self) -> Optional[locale_str]:\n        if isinstance(self.__parent.description, locale_str):\n            return self.__parent.description\n        return None\n\n    @property\n    def autocomplete(self) -> bool:\n        return self.__parent.autocomplete is not None\n\n    @property\n    def default(self) -> Any:\n        return self.__parent.default\n\n    @property\n    def type(self) -> AppCommandOptionType:\n        return self.__parent.type\n\n    @property\n    def choices(self) -> List[Choice[Union[int, float, str]]]:\n        choices = self.__parent.choices\n        if choices is MISSING:\n            return []\n        return choices.copy()\n\n    @property\n    def channel_types(self) -> List[ChannelType]:\n        channel_types = self.__parent.channel_types\n        if channel_types is MISSING:\n            return []\n        return channel_types.copy()\n\n    @property\n    def min_value(self) -> Optional[Union[int, float]]:\n        return self.__parent.min_value\n\n    @property\n    def max_value(self) -> Optional[Union[int, float]]:\n        return self.__parent.max_value\n\n\nclass Command(Generic[GroupT, P, T]):\n    \"\"\"A class that implements an application command.\n\n    These are usually not created manually, instead they are created using\n    one of the following decorators:\n\n    - :func:`~discord.app_commands.command`\n    - :meth:`Group.command <discord.app_commands.Group.command>`\n    - :meth:`CommandTree.command <discord.app_commands.CommandTree.command>`\n\n    .. versionadded:: 2.0\n\n    Parameters\n    -----------\n    name: Union[:class:`str`, :class:`locale_str`]\n        The name of the application command.\n    description: Union[:class:`str`, :class:`locale_str`]\n        The description of the application command. This shows up in the UI to describe\n        the application command.\n    callback: :ref:`coroutine <coroutine>`\n        The coroutine that is executed when the command is called.\n    auto_locale_strings: :class:`bool`\n        If this is set to ``True``, then all translatable strings will implicitly\n        be wrapped into :class:`locale_str` rather than :class:`str`. This could\n        avoid some repetition and be more ergonomic for certain defaults such\n        as default command names, command descriptions, and parameter names.\n        Defaults to ``True``.\n    nsfw: :class:`bool`\n        Whether the command is NSFW and should only work in NSFW channels.\n        Defaults to ``False``.\n\n        Due to a Discord limitation, this does not work on subcommands.\n    parent: Optional[:class:`Group`]\n        The parent application command. ``None`` if there isn't one.\n    extras: :class:`dict`\n        A dictionary that can be used to store extraneous data.\n        The library will not touch any values or keys within this dictionary.\n\n    Attributes\n    ------------\n    name: :class:`str`\n        The name of the application command.\n    description: :class:`str`\n        The description of the application command. This shows up in the UI to describe\n        the application command.\n    checks\n        A list of predicates that take a :class:`~discord.Interaction` parameter\n        to indicate whether the command callback should be executed. If an exception\n        is necessary to be thrown to signal failure, then one inherited from\n        :exc:`AppCommandError` should be used. If all the checks fail without\n        propagating an exception, :exc:`CheckFailure` is raised.\n    default_permissions: Optional[:class:`~discord.Permissions`]\n        The default permissions that can execute this command on Discord. Note\n        that server administrators can override this value in the client.\n        Setting an empty permissions field will disallow anyone except server\n        administrators from using the command in a guild.\n\n        Due to a Discord limitation, this does not work on subcommands.\n    guild_only: :class:`bool`\n        Whether the command should only be usable in guild contexts.\n\n        Due to a Discord limitation, this does not work on subcommands.\n    allowed_contexts: Optional[:class:`~discord.app_commands.AppCommandContext`]\n        The contexts that the command is allowed to be used in.\n        Overrides ``guild_only`` if this is set.\n\n        .. versionadded:: 2.4\n    allowed_installs: Optional[:class:`~discord.app_commands.AppInstallationType`]\n        The installation contexts that the command is allowed to be installed\n        on.\n\n        .. versionadded:: 2.4\n    nsfw: :class:`bool`\n        Whether the command is NSFW and should only work in NSFW channels.\n\n        Due to a Discord limitation, this does not work on subcommands.\n    parent: Optional[:class:`Group`]\n        The parent application command. ``None`` if there isn't one.\n    extras: :class:`dict`\n        A dictionary that can be used to store extraneous data.\n        The library will not touch any values or keys within this dictionary.\n    \"\"\"\n\n    def __init__(\n        self,\n        *,\n        name: Union[str, locale_str],\n        description: Union[str, locale_str],\n        callback: CommandCallback[GroupT, P, T],\n        nsfw: bool = False,\n        parent: Optional[Group] = None,\n        guild_ids: Optional[List[int]] = None,\n        allowed_contexts: Optional[AppCommandContext] = None,\n        allowed_installs: Optional[AppInstallationType] = None,\n        auto_locale_strings: bool = True,\n        extras: Dict[Any, Any] = MISSING,\n    ):\n        name, locale = (name.message, name) if isinstance(name, locale_str) else (name, None)\n        self.name: str = validate_name(name)\n        self._locale_name: Optional[locale_str] = locale\n        description, locale = (\n            (description.message, description) if isinstance(description, locale_str) else (description, None)\n        )\n        self.description: str = description\n        self._locale_description: Optional[locale_str] = locale\n        self._attr: Optional[str] = None\n        self._callback: CommandCallback[GroupT, P, T] = callback\n        self.parent: Optional[Group] = parent\n        self.binding: Optional[GroupT] = None\n        self.on_error: Optional[Error[GroupT]] = None\n        self.module: Optional[str] = callback.__module__\n\n        # Unwrap __self__ for bound methods\n        try:\n            self.binding = callback.__self__\n            self._callback = callback = callback.__func__\n        except AttributeError:\n            pass\n\n        self._params: Dict[str, CommandParameter] = _extract_parameters_from_callback(callback, callback.__globals__)\n        self.checks: List[Check] = getattr(callback, '__discord_app_commands_checks__', [])\n        self._guild_ids: Optional[List[int]] = guild_ids or getattr(\n            callback, '__discord_app_commands_default_guilds__', None\n        )\n        self.default_permissions: Optional[Permissions] = getattr(\n            callback, '__discord_app_commands_default_permissions__', None\n        )\n        self.guild_only: bool = getattr(callback, '__discord_app_commands_guild_only__', False)\n        self.allowed_contexts: Optional[AppCommandContext] = allowed_contexts or getattr(\n            callback, '__discord_app_commands_contexts__', None\n        )\n        self.allowed_installs: Optional[AppInstallationType] = allowed_installs or getattr(\n            callback, '__discord_app_commands_installation_types__', None\n        )\n\n        self.nsfw: bool = nsfw\n        self.extras: Dict[Any, Any] = extras or {}\n\n        if self._guild_ids is not None and self.parent is not None:\n            raise ValueError('child commands cannot have default guilds set, consider setting them in the parent instead')\n\n        if auto_locale_strings:\n            self._convert_to_locale_strings()\n\n    def _convert_to_locale_strings(self) -> None:\n        if self._locale_name is None:\n            self._locale_name = locale_str(self.name)\n        if self._locale_description is None:\n            self._locale_description = locale_str(self.description)\n\n        for param in self._params.values():\n            param._convert_to_locale_strings()\n\n    def __set_name__(self, owner: Type[Any], name: str) -> None:\n        self._attr = name\n\n    @property\n    def callback(self) -> CommandCallback[GroupT, P, T]:\n        \"\"\":ref:`coroutine <coroutine>`: The coroutine that is executed when the command is called.\"\"\"\n        return self._callback\n\n    def _copy_with(\n        self,\n        *,\n        parent: Optional[Group],\n        binding: GroupT,\n        bindings: MutableMapping[GroupT, GroupT] = MISSING,\n        set_on_binding: bool = True,\n    ) -> Command:\n        bindings = {} if bindings is MISSING else bindings\n\n        copy = shallow_copy(self)\n        copy._params = self._params.copy()\n        copy.parent = parent\n        copy.binding = bindings.get(self.binding) if self.binding is not None else binding\n\n        if copy._attr and set_on_binding:\n            setattr(copy.binding, copy._attr, copy)\n\n        return copy\n\n    async def get_translated_payload(self, tree: CommandTree[ClientT], translator: Translator) -> Dict[str, Any]:\n        base = self.to_dict(tree)\n        name_localizations: Dict[str, str] = {}\n        description_localizations: Dict[str, str] = {}\n\n        # Prevent creating these objects in a heavy loop\n        name_context = TranslationContext(location=TranslationContextLocation.command_name, data=self)\n        description_context = TranslationContext(location=TranslationContextLocation.command_description, data=self)\n\n        for locale in Locale:\n            if self._locale_name:\n                translation = await translator._checked_translate(self._locale_name, locale, name_context)\n                if translation is not None:\n                    name_localizations[locale.value] = translation\n\n            if self._locale_description:\n                translation = await translator._checked_translate(self._locale_description, locale, description_context)\n                if translation is not None:\n                    description_localizations[locale.value] = translation\n\n        base['name_localizations'] = name_localizations\n        base['description_localizations'] = description_localizations\n        base['options'] = [\n            await param.get_translated_payload(translator, Parameter(param, self)) for param in self._params.values()\n        ]\n        return base\n\n    def to_dict(self, tree: CommandTree[ClientT]) -> Dict[str, Any]:\n        # If we have a parent then our type is a subcommand\n        # Otherwise, the type falls back to the specific command type (e.g. slash command or context menu)\n        option_type = AppCommandType.chat_input.value if self.parent is None else AppCommandOptionType.subcommand.value\n        base: Dict[str, Any] = {\n            'name': self.name,\n            'description': self.description,\n            'type': option_type,\n            'options': [param.to_dict() for param in self._params.values()],\n        }\n\n        if self.parent is None:\n            base['nsfw'] = self.nsfw\n            base['dm_permission'] = not self.guild_only\n            base['default_member_permissions'] = None if self.default_permissions is None else self.default_permissions.value\n            base['contexts'] = tree.allowed_contexts._merge_to_array(self.allowed_contexts)\n            base['integration_types'] = tree.allowed_installs._merge_to_array(self.allowed_installs)\n\n        return base\n\n    async def _invoke_error_handlers(self, interaction: Interaction, error: AppCommandError) -> None:\n        # These type ignores are because the type checker can't narrow this type properly.\n        if self.on_error is not None:\n            if self.binding is not None:\n                await self.on_error(self.binding, interaction, error)  # type: ignore\n            else:\n                await self.on_error(interaction, error)  # type: ignore\n\n        parent = self.parent\n        if parent is not None:\n            await parent.on_error(interaction, error)\n\n            if parent.parent is not None:\n                await parent.parent.on_error(interaction, error)\n\n        binding_error_handler = getattr(self.binding, '__discord_app_commands_error_handler__', None)\n        if binding_error_handler is not None:\n            await binding_error_handler(interaction, error)\n\n    def _has_any_error_handlers(self) -> bool:\n        if self.on_error is not None:\n            return True\n\n        parent = self.parent\n        if parent is not None:\n            # Check if the on_error is overridden\n            if not hasattr(parent.on_error, '__discord_app_commands_base_function__'):\n                return True\n\n            if parent.parent is not None:\n                if not hasattr(parent.parent.on_error, '__discord_app_commands_base_function__'):\n                    return True\n\n        # Check if we have a bound error handler\n        if getattr(self.binding, '__discord_app_commands_error_handler__', None) is not None:\n            return True\n\n        return False\n\n    async def _transform_arguments(self, interaction: Interaction, namespace: Namespace) -> Dict[str, Any]:\n        values = namespace.__dict__\n        transformed_values = {}\n\n        for param in self._params.values():\n            try:\n                value = values[param.display_name]\n            except KeyError:\n                if not param.required:\n                    transformed_values[param.name] = param.default\n                else:\n                    raise CommandSignatureMismatch(self) from None\n            else:\n                transformed_values[param.name] = await param.transform(interaction, value)\n\n        return transformed_values\n\n    async def _do_call(self, interaction: Interaction, params: Dict[str, Any]) -> T:\n        # These type ignores are because the type checker doesn't quite understand the narrowing here\n        # Likewise, it thinks we're missing positional arguments when there aren't any.\n        try:\n            if self.binding is not None:\n                return await self._callback(self.binding, interaction, **params)  # type: ignore\n            return await self._callback(interaction, **params)  # type: ignore\n        except TypeError as e:\n            # In order to detect mismatch from the provided signature and the Discord data,\n            # there are many ways it can go wrong yet all of them eventually lead to a TypeError\n            # from the Python compiler showcasing that the signature is incorrect. This lovely\n            # piece of code essentially checks the last frame of the caller and checks if the\n            # locals contains our `self` reference.\n            #\n            # This is because there is a possibility that a TypeError is raised within the body\n            # of the function, and in that case the locals wouldn't contain a reference to\n            # the command object under the name `self`.\n            frame = inspect.trace()[-1].frame\n            if frame.f_locals.get('self') is self:\n                raise CommandSignatureMismatch(self) from None\n            raise CommandInvokeError(self, e) from e\n        except AppCommandError:\n            raise\n        except Exception as e:\n            raise CommandInvokeError(self, e) from e\n\n    async def _invoke_with_namespace(self, interaction: Interaction, namespace: Namespace) -> T:\n        if not await self._check_can_run(interaction):\n            raise CheckFailure(f'The check functions for command {self.name!r} failed.')\n\n        transformed_values = await self._transform_arguments(interaction, namespace)\n        return await self._do_call(interaction, transformed_values)\n\n    async def _invoke_autocomplete(self, interaction: Interaction, name: str, namespace: Namespace):\n        # The namespace contains the Discord provided names so this will be fine\n        # even if the name is renamed\n        value = namespace.__dict__[name]\n\n        try:\n            param = self._params[name]\n        except KeyError:\n            # Slow case, it might be a rename\n            params = {param.display_name: param for param in self._params.values()}\n            try:\n                param = params[name]\n            except KeyError:\n                raise CommandSignatureMismatch(self) from None\n\n        if param.autocomplete is None:\n            raise CommandSignatureMismatch(self)\n\n        predicates = getattr(param.autocomplete, '__discord_app_commands_checks__', [])\n        if predicates:\n            try:\n                passed = await async_all(f(interaction) for f in predicates)\n            except Exception:\n                passed = False\n\n            if not passed:\n                if not interaction.response.is_done():\n                    await interaction.response.autocomplete([])\n                return\n\n        if getattr(param.autocomplete, 'pass_command_binding', False):\n            binding = self.binding\n            if binding is not None:\n                choices = await param.autocomplete(binding, interaction, value)\n            else:\n                raise TypeError('autocomplete parameter expected a bound self parameter but one was not provided')\n        else:\n            choices = await param.autocomplete(interaction, value)\n\n        if interaction.response.is_done():\n            return\n\n        await interaction.response.autocomplete(choices)\n\n    def _get_internal_command(self, name: str) -> Optional[Union[Command, Group]]:\n        return None\n\n    @property\n    def parameters(self) -> List[Parameter]:\n        \"\"\"Returns a list of parameters for this command.\n\n        This does not include the ``self`` or ``interaction`` parameters.\n\n        Returns\n        --------\n        List[:class:`Parameter`]\n            The parameters of this command.\n        \"\"\"\n        return [Parameter(p, self) for p in self._params.values()]\n\n    def get_parameter(self, name: str) -> Optional[Parameter]:\n        \"\"\"Retrieves a parameter by its name.\n\n        The name must be the Python identifier rather than the renamed\n        one for display on Discord.\n\n        Parameters\n        -----------\n        name: :class:`str`\n            The parameter name in the callback function.\n\n        Returns\n        --------\n        Optional[:class:`Parameter`]\n            The parameter or ``None`` if not found.\n        \"\"\"\n\n        parent = self._params.get(name)\n        if parent is not None:\n            return Parameter(parent, self)\n        return None\n\n    @property\n    def root_parent(self) -> Optional[Group]:\n        \"\"\"Optional[:class:`Group`]: The root parent of this command.\"\"\"\n        if self.parent is None:\n            return None\n        parent = self.parent\n        return parent.parent or parent\n\n    @property\n    def qualified_name(self) -> str:\n        \"\"\":class:`str`: Returns the fully qualified command name.\n\n        The qualified name includes the parent name as well. For example,\n        in a command like ``/foo bar`` the qualified name is ``foo bar``.\n        \"\"\"\n        # A B C\n        #     ^ self\n        #   ^ parent\n        # ^ grandparent\n        if self.parent is None:\n            return self.name\n\n        names = [self.name, self.parent.name]\n        grandparent = self.parent.parent\n        if grandparent is not None:\n            names.append(grandparent.name)\n\n        return ' '.join(reversed(names))\n\n    async def _check_can_run(self, interaction: Interaction) -> bool:\n        if self.parent is not None and self.parent is not self.binding:\n            # For commands with a parent which isn't the binding, i.e.\n            # <binding>\n            #     <parent>\n            #         <command>\n            # The parent check needs to be called first\n            if not await maybe_coroutine(self.parent.interaction_check, interaction):\n                return False\n\n        if self.binding is not None:\n            check: Optional[Check] = getattr(self.binding, 'interaction_check', None)\n            if check:\n                ret = await maybe_coroutine(check, interaction)\n                if not ret:\n                    return False\n\n        predicates = self.checks\n        if not predicates:\n            return True\n\n        return await async_all(f(interaction) for f in predicates)\n\n    def error(self, coro: Error[GroupT]) -> Error[GroupT]:\n        \"\"\"A decorator that registers a coroutine as a local error handler.\n\n        The local error handler is called whenever an exception is raised in the body\n        of the command or during handling of the command. The error handler must take\n        2 parameters, the interaction and the error.\n\n        The error passed will be derived from :exc:`AppCommandError`.\n\n        Parameters\n        -----------\n        coro: :ref:`coroutine <coroutine>`\n            The coroutine to register as the local error handler.\n\n        Raises\n        -------\n        TypeError\n            The coroutine passed is not actually a coroutine.\n        \"\"\"\n\n        if not inspect.iscoroutinefunction(coro):\n            raise TypeError('The error handler must be a coroutine.')\n\n        self.on_error = coro\n        return coro\n\n    def autocomplete(\n        self, name: str\n    ) -> Callable[[AutocompleteCallback[GroupT, ChoiceT]], AutocompleteCallback[GroupT, ChoiceT]]:\n        \"\"\"A decorator that registers a coroutine as an autocomplete prompt for a parameter.\n\n        The coroutine callback must have 2 parameters, the :class:`~discord.Interaction`,\n        and the current value by the user (the string currently being typed by the user).\n\n        To get the values from other parameters that may be filled in, accessing\n        :attr:`.Interaction.namespace` will give a :class:`Namespace` object with those\n        values.\n\n        Parent :func:`checks <check>` are ignored within an autocomplete. However, checks can be added\n        to the autocomplete callback and the ones added will be called. If the checks fail for any reason\n        then an empty list is sent as the interaction response.\n\n        The coroutine decorator **must** return a list of :class:`~discord.app_commands.Choice` objects.\n        Only up to 25 objects are supported.\n\n        .. warning::\n            The choices returned from this coroutine are suggestions. The user may ignore them and input their own value.\n\n        Example:\n\n        .. code-block:: python3\n\n            @app_commands.command()\n            async def fruits(interaction: discord.Interaction, fruit: str):\n                await interaction.response.send_message(f'Your favourite fruit seems to be {fruit}')\n\n            @fruits.autocomplete('fruit')\n            async def fruits_autocomplete(\n                interaction: discord.Interaction,\n                current: str,\n            ) -> List[app_commands.Choice[str]]:\n                fruits = ['Banana', 'Pineapple', 'Apple', 'Watermelon', 'Melon', 'Cherry']\n                return [\n                    app_commands.Choice(name=fruit, value=fruit)\n                    for fruit in fruits if current.lower() in fruit.lower()\n                ]\n\n\n        Parameters\n        -----------\n        name: :class:`str`\n            The parameter name to register as autocomplete.\n\n        Raises\n        -------\n        TypeError\n            The coroutine passed is not actually a coroutine or\n            the parameter is not found or of an invalid type.\n        \"\"\"\n\n        def decorator(coro: AutocompleteCallback[GroupT, ChoiceT]) -> AutocompleteCallback[GroupT, ChoiceT]:\n            if not inspect.iscoroutinefunction(coro):\n                raise TypeError('The autocomplete callback must be a coroutine function.')\n\n            try:\n                param = self._params[name]\n            except KeyError:\n                raise TypeError(f'unknown parameter: {name!r}') from None\n\n            if param.type not in (AppCommandOptionType.string, AppCommandOptionType.number, AppCommandOptionType.integer):\n                raise TypeError('autocomplete is only supported for integer, string, or number option types')\n\n            if param.is_choice_annotation():\n                raise TypeError(\n                    'Choice annotation unsupported for autocomplete parameters, consider using a regular annotation instead'\n                )\n\n            param.autocomplete = validate_auto_complete_callback(coro)\n            return coro\n\n        return decorator\n\n    def add_check(self, func: Check, /) -> None:\n        \"\"\"Adds a check to the command.\n\n        This is the non-decorator interface to :func:`check`.\n\n        Parameters\n        -----------\n        func\n            The function that will be used as a check.\n        \"\"\"\n\n        self.checks.append(func)\n\n    def remove_check(self, func: Check, /) -> None:\n        \"\"\"Removes a check from the command.\n\n        This function is idempotent and will not raise an exception\n        if the function is not in the command's checks.\n\n        Parameters\n        -----------\n        func\n            The function to remove from the checks.\n        \"\"\"\n\n        try:\n            self.checks.remove(func)\n        except ValueError:\n            pass\n\n\nclass ContextMenu:\n    \"\"\"A class that implements a context menu application command.\n\n    These are usually not created manually, instead they are created using\n    one of the following decorators:\n\n    - :func:`~discord.app_commands.context_menu`\n    - :meth:`CommandTree.context_menu <discord.app_commands.CommandTree.context_menu>`\n\n    .. versionadded:: 2.0\n\n    Parameters\n    -----------\n    name: Union[:class:`str`, :class:`locale_str`]\n        The name of the context menu.\n    callback: :ref:`coroutine <coroutine>`\n        The coroutine that is executed when the command is called.\n    type: :class:`.AppCommandType`\n        The type of context menu application command. By default, this is inferred\n        by the parameter of the callback.\n    auto_locale_strings: :class:`bool`\n        If this is set to ``True``, then all translatable strings will implicitly\n        be wrapped into :class:`locale_str` rather than :class:`str`. This could\n        avoid some repetition and be more ergonomic for certain defaults such\n        as default command names, command descriptions, and parameter names.\n        Defaults to ``True``.\n    nsfw: :class:`bool`\n        Whether the command is NSFW and should only work in NSFW channels.\n        Defaults to ``False``.\n    extras: :class:`dict`\n        A dictionary that can be used to store extraneous data.\n        The library will not touch any values or keys within this dictionary.\n\n    Attributes\n    ------------\n    name: :class:`str`\n        The name of the context menu.\n    type: :class:`.AppCommandType`\n        The type of context menu application command. By default, this is inferred\n        by the parameter of the callback.\n    default_permissions: Optional[:class:`~discord.Permissions`]\n        The default permissions that can execute this command on Discord. Note\n        that server administrators can override this value in the client.\n        Setting an empty permissions field will disallow anyone except server\n        administrators from using the command in a guild.\n    guild_only: :class:`bool`\n        Whether the command should only be usable in guild contexts.\n        Defaults to ``False``.\n    allowed_contexts: Optional[:class:`~discord.app_commands.AppCommandContext`]\n        The contexts that this context menu is allowed to be used in.\n        Overrides ``guild_only`` if set.\n\n        .. versionadded:: 2.4\n    allowed_installs: Optional[:class:`~discord.app_commands.AppInstallationType`]\n        The installation contexts that the command is allowed to be installed\n        on.\n\n        .. versionadded:: 2.4\n    nsfw: :class:`bool`\n        Whether the command is NSFW and should only work in NSFW channels.\n        Defaults to ``False``.\n    checks\n        A list of predicates that take a :class:`~discord.Interaction` parameter\n        to indicate whether the command callback should be executed. If an exception\n        is necessary to be thrown to signal failure, then one inherited from\n        :exc:`AppCommandError` should be used. If all the checks fail without\n        propagating an exception, :exc:`CheckFailure` is raised.\n    extras: :class:`dict`\n        A dictionary that can be used to store extraneous data.\n        The library will not touch any values or keys within this dictionary.\n    \"\"\"\n\n    def __init__(\n        self,\n        *,\n        name: Union[str, locale_str],\n        callback: ContextMenuCallback,\n        type: AppCommandType = MISSING,\n        nsfw: bool = False,\n        guild_ids: Optional[List[int]] = None,\n        allowed_contexts: Optional[AppCommandContext] = None,\n        allowed_installs: Optional[AppInstallationType] = None,\n        auto_locale_strings: bool = True,\n        extras: Dict[Any, Any] = MISSING,\n    ):\n        name, locale = (name.message, name) if isinstance(name, locale_str) else (name, None)\n        self.name: str = validate_context_menu_name(name)\n        self._locale_name: Optional[locale_str] = locale\n        self._callback: ContextMenuCallback = callback\n        (param, annotation, actual_type) = _get_context_menu_parameter(callback)\n        if type is MISSING:\n            type = actual_type\n\n        if actual_type != type:\n            raise ValueError(f'context menu callback implies a type of {actual_type} but {type} was passed.')\n\n        self.type: AppCommandType = type\n        self._param_name = param\n        self._annotation = annotation\n        self.module: Optional[str] = callback.__module__\n        self._guild_ids = guild_ids or getattr(callback, '__discord_app_commands_default_guilds__', None)\n        self.on_error: Optional[UnboundError] = None\n        self.default_permissions: Optional[Permissions] = getattr(\n            callback, '__discord_app_commands_default_permissions__', None\n        )\n        self.nsfw: bool = nsfw\n        self.guild_only: bool = getattr(callback, '__discord_app_commands_guild_only__', False)\n        self.allowed_contexts: Optional[AppCommandContext] = allowed_contexts or getattr(\n            callback, '__discord_app_commands_contexts__', None\n        )\n        self.allowed_installs: Optional[AppInstallationType] = allowed_installs or getattr(\n            callback, '__discord_app_commands_installation_types__', None\n        )\n        self.checks: List[Check] = getattr(callback, '__discord_app_commands_checks__', [])\n        self.extras: Dict[Any, Any] = extras or {}\n\n        if auto_locale_strings:\n            if self._locale_name is None:\n                self._locale_name = locale_str(self.name)\n\n    @property\n    def callback(self) -> ContextMenuCallback:\n        \"\"\":ref:`coroutine <coroutine>`: The coroutine that is executed when the context menu is called.\"\"\"\n        return self._callback\n\n    @property\n    def qualified_name(self) -> str:\n        \"\"\":class:`str`: Returns the fully qualified command name.\"\"\"\n        return self.name\n\n    async def get_translated_payload(self, tree: CommandTree[ClientT], translator: Translator) -> Dict[str, Any]:\n        base = self.to_dict(tree)\n        context = TranslationContext(location=TranslationContextLocation.command_name, data=self)\n        if self._locale_name:\n            name_localizations: Dict[str, str] = {}\n            for locale in Locale:\n                translation = await translator._checked_translate(self._locale_name, locale, context)\n                if translation is not None:\n                    name_localizations[locale.value] = translation\n\n            base['name_localizations'] = name_localizations\n        return base\n\n    def to_dict(self, tree: CommandTree[ClientT]) -> Dict[str, Any]:\n        return {\n            'name': self.name,\n            'type': self.type.value,\n            'dm_permission': not self.guild_only,\n            'contexts': tree.allowed_contexts._merge_to_array(self.allowed_contexts),\n            'integration_types': tree.allowed_installs._merge_to_array(self.allowed_installs),\n            'default_member_permissions': None if self.default_permissions is None else self.default_permissions.value,\n            'nsfw': self.nsfw,\n        }\n\n    async def _check_can_run(self, interaction: Interaction) -> bool:\n        predicates = self.checks\n        if not predicates:\n            return True\n\n        return await async_all(f(interaction) for f in predicates)\n\n    def _has_any_error_handlers(self) -> bool:\n        return self.on_error is not None\n\n    async def _invoke(self, interaction: Interaction, arg: Any):\n        try:\n            if not await self._check_can_run(interaction):\n                raise CheckFailure(f'The check functions for context menu {self.name!r} failed.')\n\n            await self._callback(interaction, arg)\n        except AppCommandError:\n            raise\n        except Exception as e:\n            raise CommandInvokeError(self, e) from e\n\n    def error(self, coro: UnboundError) -> UnboundError:\n        \"\"\"A decorator that registers a coroutine as a local error handler.\n\n        The local error handler is called whenever an exception is raised in the body\n        of the command or during handling of the command. The error handler must take\n        2 parameters, the interaction and the error.\n\n        The error passed will be derived from :exc:`AppCommandError`.\n\n        Parameters\n        -----------\n        coro: :ref:`coroutine <coroutine>`\n            The coroutine to register as the local error handler.\n\n        Raises\n        -------\n        TypeError\n            The coroutine passed is not actually a coroutine.\n        \"\"\"\n\n        if not inspect.iscoroutinefunction(coro):\n            raise TypeError('The error handler must be a coroutine.')\n\n        self.on_error = coro\n        return coro\n\n    def add_check(self, func: Check, /) -> None:\n        \"\"\"Adds a check to the command.\n\n        This is the non-decorator interface to :func:`check`.\n\n        Parameters\n        -----------\n        func\n            The function that will be used as a check.\n        \"\"\"\n\n        self.checks.append(func)\n\n    def remove_check(self, func: Check, /) -> None:\n        \"\"\"Removes a check from the command.\n\n        This function is idempotent and will not raise an exception\n        if the function is not in the command's checks.\n\n        Parameters\n        -----------\n        func\n            The function to remove from the checks.\n        \"\"\"\n\n        try:\n            self.checks.remove(func)\n        except ValueError:\n            pass\n\n\nclass Group:\n    \"\"\"A class that implements an application command group.\n\n    These are usually inherited rather than created manually.\n\n    Decorators such as :func:`guild_only`, :func:`guilds`, and :func:`default_permissions`\n    will apply to the group if used on top of a subclass. For example:\n\n    .. code-block:: python3\n\n        from discord import app_commands\n\n        @app_commands.guild_only()\n        class MyGroup(app_commands.Group):\n            pass\n\n    .. versionadded:: 2.0\n\n    Parameters\n    -----------\n    name: Union[:class:`str`, :class:`locale_str`]\n        The name of the group. If not given, it defaults to a lower-case\n        kebab-case version of the class name.\n    description: Union[:class:`str`, :class:`locale_str`]\n        The description of the group. This shows up in the UI to describe\n        the group. If not given, it defaults to the docstring of the\n        class shortened to 100 characters.\n    auto_locale_strings: :class:`bool`\n        If this is set to ``True``, then all translatable strings will implicitly\n        be wrapped into :class:`locale_str` rather than :class:`str`. This could\n        avoid some repetition and be more ergonomic for certain defaults such\n        as default command names, command descriptions, and parameter names.\n        Defaults to ``True``.\n    default_permissions: Optional[:class:`~discord.Permissions`]\n        The default permissions that can execute this group on Discord. Note\n        that server administrators can override this value in the client.\n        Setting an empty permissions field will disallow anyone except server\n        administrators from using the command in a guild.\n\n        Due to a Discord limitation, this does not work on subcommands.\n    guild_only: :class:`bool`\n        Whether the group should only be usable in guild contexts.\n        Defaults to ``False``.\n\n        Due to a Discord limitation, this does not work on subcommands.\n    nsfw: :class:`bool`\n        Whether the command is NSFW and should only work in NSFW channels.\n        Defaults to ``False``.\n\n        Due to a Discord limitation, this does not work on subcommands.\n    parent: Optional[:class:`Group`]\n        The parent application command. ``None`` if there isn't one.\n    extras: :class:`dict`\n        A dictionary that can be used to store extraneous data.\n        The library will not touch any values or keys within this dictionary.\n\n    Attributes\n    ------------\n    name: :class:`str`\n        The name of the group.\n    description: :class:`str`\n        The description of the group. This shows up in the UI to describe\n        the group.\n    default_permissions: Optional[:class:`~discord.Permissions`]\n        The default permissions that can execute this group on Discord. Note\n        that server administrators can override this value in the client.\n        Setting an empty permissions field will disallow anyone except server\n        administrators from using the command in a guild.\n\n        Due to a Discord limitation, this does not work on subcommands.\n    guild_only: :class:`bool`\n        Whether the group should only be usable in guild contexts.\n\n        Due to a Discord limitation, this does not work on subcommands.\n    allowed_contexts: Optional[:class:`~discord.app_commands.AppCommandContext`]\n        The contexts that this group is allowed to be used in. Overrides\n        guild_only if set.\n\n        .. versionadded:: 2.4\n    allowed_installs: Optional[:class:`~discord.app_commands.AppInstallationType`]\n        The installation contexts that the command is allowed to be installed\n        on.\n\n        .. versionadded:: 2.4\n    nsfw: :class:`bool`\n        Whether the command is NSFW and should only work in NSFW channels.\n\n        Due to a Discord limitation, this does not work on subcommands.\n    parent: Optional[:class:`Group`]\n        The parent group. ``None`` if there isn't one.\n    extras: :class:`dict`\n        A dictionary that can be used to store extraneous data.\n        The library will not touch any values or keys within this dictionary.\n    \"\"\"\n\n    __discord_app_commands_group_children__: ClassVar[List[Union[Command[Any, ..., Any], Group]]] = []\n    __discord_app_commands_skip_init_binding__: bool = False\n    __discord_app_commands_group_name__: str = MISSING\n    __discord_app_commands_group_description__: str = MISSING\n    __discord_app_commands_group_locale_name__: Optional[locale_str] = None\n    __discord_app_commands_group_locale_description__: Optional[locale_str] = None\n    __discord_app_commands_group_nsfw__: bool = False\n    __discord_app_commands_guild_only__: bool = MISSING\n    __discord_app_commands_contexts__: Optional[AppCommandContext] = MISSING\n    __discord_app_commands_installation_types__: Optional[AppInstallationType] = MISSING\n    __discord_app_commands_default_permissions__: Optional[Permissions] = MISSING\n    __discord_app_commands_has_module__: bool = False\n    __discord_app_commands_error_handler__: Optional[\n        Callable[[Interaction, AppCommandError], Coroutine[Any, Any, None]]\n    ] = None\n\n    def __init_subclass__(\n        cls,\n        *,\n        name: Union[str, locale_str] = MISSING,\n        description: Union[str, locale_str] = MISSING,\n        guild_only: bool = MISSING,\n        nsfw: bool = False,\n        default_permissions: Optional[Permissions] = MISSING,\n    ) -> None:\n        if not cls.__discord_app_commands_group_children__:\n            children: List[Union[Command[Any, ..., Any], Group]] = [\n                member for member in cls.__dict__.values() if isinstance(member, (Group, Command)) and member.parent is None\n            ]\n\n            cls.__discord_app_commands_group_children__ = children\n\n            found = set()\n            for child in children:\n                if child.name in found:\n                    raise TypeError(f'Command {child.name!r} is a duplicate')\n                found.add(child.name)\n\n            if len(children) > 25:\n                raise TypeError('groups cannot have more than 25 commands')\n\n        if name is MISSING:\n            cls.__discord_app_commands_group_name__ = validate_name(_to_kebab_case(cls.__name__))\n        elif isinstance(name, str):\n            cls.__discord_app_commands_group_name__ = validate_name(name)\n        else:\n            cls.__discord_app_commands_group_name__ = validate_name(name.message)\n            cls.__discord_app_commands_group_locale_name__ = name\n\n        if description is MISSING:\n            if cls.__doc__ is None:\n                cls.__discord_app_commands_group_description__ = '…'\n            else:\n                cls.__discord_app_commands_group_description__ = _shorten(cls.__doc__)\n        elif isinstance(description, str):\n            cls.__discord_app_commands_group_description__ = description\n        else:\n            cls.__discord_app_commands_group_description__ = description.message\n            cls.__discord_app_commands_group_locale_description__ = description\n\n        if guild_only is not MISSING:\n            cls.__discord_app_commands_guild_only__ = guild_only\n\n        if default_permissions is not MISSING:\n            cls.__discord_app_commands_default_permissions__ = default_permissions\n\n        if cls.__module__ != __name__:\n            cls.__discord_app_commands_has_module__ = True\n        cls.__discord_app_commands_group_nsfw__ = nsfw\n\n    def __init__(\n        self,\n        *,\n        name: Union[str, locale_str] = MISSING,\n        description: Union[str, locale_str] = MISSING,\n        parent: Optional[Group] = None,\n        guild_ids: Optional[List[int]] = None,\n        guild_only: bool = MISSING,\n        allowed_contexts: Optional[AppCommandContext] = MISSING,\n        allowed_installs: Optional[AppInstallationType] = MISSING,\n        nsfw: bool = MISSING,\n        auto_locale_strings: bool = True,\n        default_permissions: Optional[Permissions] = MISSING,\n        extras: Dict[Any, Any] = MISSING,\n    ):\n        cls = self.__class__\n\n        if name is MISSING:\n            name, locale = cls.__discord_app_commands_group_name__, cls.__discord_app_commands_group_locale_name__\n        elif isinstance(name, str):\n            name, locale = validate_name(name), None\n        else:\n            name, locale = validate_name(name.message), name\n        self.name: str = name\n        self._locale_name: Optional[locale_str] = locale\n\n        if description is MISSING:\n            description, locale = (\n                cls.__discord_app_commands_group_description__,\n                cls.__discord_app_commands_group_locale_description__,\n            )\n        elif isinstance(description, str):\n            description, locale = description, None\n        else:\n            description, locale = description.message, description\n        self.description: str = description\n        self._locale_description: Optional[locale_str] = locale\n\n        self._attr: Optional[str] = None\n        self._owner_cls: Optional[Type[Any]] = None\n        self._guild_ids: Optional[List[int]] = guild_ids or getattr(cls, '__discord_app_commands_default_guilds__', None)\n\n        if default_permissions is MISSING:\n            if cls.__discord_app_commands_default_permissions__ is MISSING:\n                default_permissions = None\n            else:\n                default_permissions = cls.__discord_app_commands_default_permissions__\n\n        self.default_permissions: Optional[Permissions] = default_permissions\n\n        if guild_only is MISSING:\n            if cls.__discord_app_commands_guild_only__ is MISSING:\n                guild_only = False\n            else:\n                guild_only = cls.__discord_app_commands_guild_only__\n\n        self.guild_only: bool = guild_only\n\n        if allowed_contexts is MISSING:\n            if cls.__discord_app_commands_contexts__ is MISSING:\n                allowed_contexts = None\n            else:\n                allowed_contexts = cls.__discord_app_commands_contexts__\n\n        self.allowed_contexts: Optional[AppCommandContext] = allowed_contexts\n\n        if allowed_installs is MISSING:\n            if cls.__discord_app_commands_installation_types__ is MISSING:\n                allowed_installs = None\n            else:\n                allowed_installs = cls.__discord_app_commands_installation_types__\n\n        self.allowed_installs: Optional[AppInstallationType] = allowed_installs\n\n        if nsfw is MISSING:\n            nsfw = cls.__discord_app_commands_group_nsfw__\n\n        self.nsfw: bool = nsfw\n\n        if not self.description:\n            raise TypeError('groups must have a description')\n\n        if not self.name:\n            raise TypeError('groups must have a name')\n\n        self.parent: Optional[Group] = parent\n        self.module: Optional[str]\n        if cls.__discord_app_commands_has_module__:\n            self.module = cls.__module__\n        else:\n            try:\n                # This is pretty hacky\n                # It allows the module to be fetched if someone just constructs a bare Group object though.\n                self.module = inspect.currentframe().f_back.f_globals['__name__']  # type: ignore\n            except (AttributeError, IndexError, KeyError):\n                self.module = None\n\n        self._children: Dict[str, Union[Command, Group]] = {}\n        self.extras: Dict[Any, Any] = extras or {}\n\n        bindings: Dict[Group, Group] = {}\n\n        for child in self.__discord_app_commands_group_children__:\n            # commands and groups created directly in this class (no parent)\n            copy = (\n                child._copy_with(parent=self, binding=self, bindings=bindings, set_on_binding=False)\n                if not cls.__discord_app_commands_skip_init_binding__\n                else child\n            )\n\n            self._children[copy.name] = copy\n            if copy._attr and not cls.__discord_app_commands_skip_init_binding__:\n                setattr(self, copy._attr, copy)\n\n        if parent is not None:\n            if parent.parent is not None:\n                raise ValueError('groups can only be nested at most one level')\n            parent.add_command(self)\n\n        if auto_locale_strings:\n            self._convert_to_locale_strings()\n\n    def _convert_to_locale_strings(self) -> None:\n        if self._locale_name is None:\n            self._locale_name = locale_str(self.name)\n        if self._locale_description is None:\n            self._locale_description = locale_str(self.description)\n\n        # I don't know if propagating to the children is the right behaviour here.\n\n    def __set_name__(self, owner: Type[Any], name: str) -> None:\n        self._attr = name\n        self.module = owner.__module__\n        self._owner_cls = owner\n\n    def _copy_with(\n        self,\n        *,\n        parent: Optional[Group],\n        binding: Binding,\n        bindings: MutableMapping[Group, Group] = MISSING,\n        set_on_binding: bool = True,\n    ) -> Group:\n        bindings = {} if bindings is MISSING else bindings\n\n        copy = shallow_copy(self)\n        copy.parent = parent\n        copy._children = {}\n\n        bindings[self] = copy\n\n        for child in self._children.values():\n            child_copy = child._copy_with(parent=copy, binding=binding, bindings=bindings)\n            child_copy.parent = copy\n            copy._children[child_copy.name] = child_copy\n\n            if isinstance(child_copy, Group) and child_copy._attr and set_on_binding:\n                if binding.__class__ is child_copy._owner_cls:\n                    setattr(binding, child_copy._attr, child_copy)\n                elif child_copy._owner_cls is copy.__class__:\n                    setattr(copy, child_copy._attr, child_copy)\n\n        if copy._attr and set_on_binding:\n            setattr(parent or binding, copy._attr, copy)\n\n        return copy\n\n    async def get_translated_payload(self, tree: CommandTree[ClientT], translator: Translator) -> Dict[str, Any]:\n        base = self.to_dict(tree)\n        name_localizations: Dict[str, str] = {}\n        description_localizations: Dict[str, str] = {}\n\n        # Prevent creating these objects in a heavy loop\n        name_context = TranslationContext(location=TranslationContextLocation.group_name, data=self)\n        description_context = TranslationContext(location=TranslationContextLocation.group_description, data=self)\n        for locale in Locale:\n            if self._locale_name:\n                translation = await translator._checked_translate(self._locale_name, locale, name_context)\n                if translation is not None:\n                    name_localizations[locale.value] = translation\n\n            if self._locale_description:\n                translation = await translator._checked_translate(self._locale_description, locale, description_context)\n                if translation is not None:\n                    description_localizations[locale.value] = translation\n\n        base['name_localizations'] = name_localizations\n        base['description_localizations'] = description_localizations\n        base['options'] = [await child.get_translated_payload(tree, translator) for child in self._children.values()]\n        return base\n\n    def to_dict(self, tree: CommandTree[ClientT]) -> Dict[str, Any]:\n        # If this has a parent command then it's part of a subcommand group\n        # Otherwise, it's just a regular command\n        option_type = 1 if self.parent is None else AppCommandOptionType.subcommand_group.value\n        base: Dict[str, Any] = {\n            'name': self.name,\n            'description': self.description,\n            'type': option_type,\n            'options': [child.to_dict(tree) for child in self._children.values()],\n        }\n\n        if self.parent is None:\n            base['nsfw'] = self.nsfw\n            base['dm_permission'] = not self.guild_only\n            base['default_member_permissions'] = None if self.default_permissions is None else self.default_permissions.value\n            base['contexts'] = tree.allowed_contexts._merge_to_array(self.allowed_contexts)\n            base['integration_types'] = tree.allowed_installs._merge_to_array(self.allowed_installs)\n\n        return base\n\n    @property\n    def root_parent(self) -> Optional[Group]:\n        \"\"\"Optional[:class:`Group`]: The parent of this group.\"\"\"\n        return self.parent\n\n    @property\n    def qualified_name(self) -> str:\n        \"\"\":class:`str`: Returns the fully qualified group name.\n\n        The qualified name includes the parent name as well. For example,\n        in a group like ``/foo bar`` the qualified name is ``foo bar``.\n        \"\"\"\n\n        if self.parent is None:\n            return self.name\n        return f'{self.parent.name} {self.name}'\n\n    def _get_internal_command(self, name: str) -> Optional[Union[Command[Any, ..., Any], Group]]:\n        return self._children.get(name)\n\n    @property\n    def commands(self) -> List[Union[Command[Any, ..., Any], Group]]:\n        \"\"\"List[Union[:class:`Command`, :class:`Group`]]: The commands that this group contains.\"\"\"\n        return list(self._children.values())\n\n    def walk_commands(self) -> Generator[Union[Command[Any, ..., Any], Group], None, None]:\n        \"\"\"An iterator that recursively walks through all commands that this group contains.\n\n        Yields\n        ---------\n        Union[:class:`Command`, :class:`Group`]\n            The commands in this group.\n        \"\"\"\n\n        for command in self._children.values():\n            yield command\n            if isinstance(command, Group):\n                yield from command.walk_commands()\n\n    @mark_overrideable\n    async def on_error(self, interaction: Interaction, error: AppCommandError, /) -> None:\n        \"\"\"|coro|\n\n        A callback that is called when a child's command raises an :exc:`AppCommandError`.\n\n        To get the command that failed, :attr:`discord.Interaction.command` should be used.\n\n        The default implementation does nothing.\n\n        Parameters\n        -----------\n        interaction: :class:`~discord.Interaction`\n            The interaction that is being handled.\n        error: :exc:`AppCommandError`\n            The exception that was raised.\n        \"\"\"\n\n        pass\n\n    def error(self, coro: ErrorFunc) -> ErrorFunc:\n        \"\"\"A decorator that registers a coroutine as a local error handler.\n\n        The local error handler is called whenever an exception is raised in a child command.\n        The error handler must take 2 parameters, the interaction and the error.\n\n        The error passed will be derived from :exc:`AppCommandError`.\n\n        Parameters\n        -----------\n        coro: :ref:`coroutine <coroutine>`\n            The coroutine to register as the local error handler.\n\n        Raises\n        -------\n        TypeError\n            The coroutine passed is not actually a coroutine, or is an invalid coroutine.\n        \"\"\"\n\n        if not inspect.iscoroutinefunction(coro):\n            raise TypeError('The error handler must be a coroutine.')\n\n        params = inspect.signature(coro).parameters\n        if len(params) != 2:\n            raise TypeError('The error handler must have 2 parameters.')\n\n        self.on_error = coro\n        return coro\n\n    async def interaction_check(self, interaction: Interaction, /) -> bool:\n        \"\"\"|coro|\n\n        A callback that is called when an interaction happens within the group\n        that checks whether a command inside the group should be executed.\n\n        This is useful to override if, for example, you want to ensure that the\n        interaction author is a given user.\n\n        The default implementation of this returns ``True``.\n\n        .. note::\n\n            If an exception occurs within the body then the check\n            is considered a failure and error handlers such as\n            :meth:`on_error` is called. See :exc:`AppCommandError`\n            for more information.\n\n        Parameters\n        -----------\n        interaction: :class:`~discord.Interaction`\n            The interaction that occurred.\n\n        Returns\n        ---------\n        :class:`bool`\n            Whether the view children's callbacks should be called.\n        \"\"\"\n\n        return True\n\n    def add_command(self, command: Union[Command[Any, ..., Any], Group], /, *, override: bool = False) -> None:\n        \"\"\"Adds a command or group to this group's internal list of commands.\n\n        Parameters\n        -----------\n        command: Union[:class:`Command`, :class:`Group`]\n            The command or group to add.\n        override: :class:`bool`\n            Whether to override a pre-existing command or group with the same name.\n            If ``False`` then an exception is raised.\n\n        Raises\n        -------\n        CommandAlreadyRegistered\n            The command or group is already registered. Note that the :attr:`CommandAlreadyRegistered.guild_id`\n            attribute will always be ``None`` in this case.\n        ValueError\n            There are too many commands already registered or the group is too\n            deeply nested.\n        TypeError\n            The wrong command type was passed.\n        \"\"\"\n\n        if not isinstance(command, (Command, Group)):\n            raise TypeError(f'expected Command or Group not {command.__class__.__name__}')\n\n        if isinstance(command, Group) and self.parent is not None:\n            # In a tree like so:\n            # <group>\n            #   <self>\n            #     <group>\n            # this needs to be forbidden\n            raise ValueError(f'{command.name!r} is too nested, groups can only be nested at most one level')\n\n        if not override and command.name in self._children:\n            raise CommandAlreadyRegistered(command.name, guild_id=None)\n\n        self._children[command.name] = command\n        command.parent = self\n        if len(self._children) > 25:\n            raise ValueError('maximum number of child commands exceeded')\n\n    def remove_command(self, name: str, /) -> Optional[Union[Command[Any, ..., Any], Group]]:\n        \"\"\"Removes a command or group from the internal list of commands.\n\n        Parameters\n        -----------\n        name: :class:`str`\n            The name of the command or group to remove.\n\n        Returns\n        --------\n        Optional[Union[:class:`~discord.app_commands.Command`, :class:`~discord.app_commands.Group`]]\n            The command that was removed. If nothing was removed\n            then ``None`` is returned instead.\n        \"\"\"\n\n        self._children.pop(name, None)\n\n    def get_command(self, name: str, /) -> Optional[Union[Command[Any, ..., Any], Group]]:\n        \"\"\"Retrieves a command or group from its name.\n\n        Parameters\n        -----------\n        name: :class:`str`\n            The name of the command or group to retrieve.\n\n        Returns\n        --------\n        Optional[Union[:class:`~discord.app_commands.Command`, :class:`~discord.app_commands.Group`]]\n            The command or group that was retrieved. If nothing was found\n            then ``None`` is returned instead.\n        \"\"\"\n        return self._children.get(name)\n\n    def command(\n        self,\n        *,\n        name: Union[str, locale_str] = MISSING,\n        description: Union[str, locale_str] = MISSING,\n        nsfw: bool = False,\n        auto_locale_strings: bool = True,\n        extras: Dict[Any, Any] = MISSING,\n    ) -> Callable[[CommandCallback[GroupT, P, T]], Command[GroupT, P, T]]:\n        \"\"\"A decorator that creates an application command from a regular function under this group.\n\n        Parameters\n        ------------\n        name: Union[:class:`str`, :class:`locale_str`]\n            The name of the application command. If not given, it defaults to a lower-case\n            version of the callback name.\n        description: Union[:class:`str`, :class:`locale_str`]\n            The description of the application command. This shows up in the UI to describe\n            the application command. If not given, it defaults to the first line of the docstring\n            of the callback shortened to 100 characters.\n        nsfw: :class:`bool`\n            Whether the command is NSFW and should only work in NSFW channels. Defaults to ``False``.\n        auto_locale_strings: :class:`bool`\n            If this is set to ``True``, then all translatable strings will implicitly\n            be wrapped into :class:`locale_str` rather than :class:`str`. This could\n            avoid some repetition and be more ergonomic for certain defaults such\n            as default command names, command descriptions, and parameter names.\n            Defaults to ``True``.\n        extras: :class:`dict`\n            A dictionary that can be used to store extraneous data.\n            The library will not touch any values or keys within this dictionary.\n        \"\"\"\n\n        def decorator(func: CommandCallback[GroupT, P, T]) -> Command[GroupT, P, T]:\n            if not inspect.iscoroutinefunction(func):\n                raise TypeError('command function must be a coroutine function')\n\n            if description is MISSING:\n                if func.__doc__ is None:\n                    desc = '…'\n                else:\n                    desc = _shorten(func.__doc__)\n            else:\n                desc = description\n\n            command = Command(\n                name=name if name is not MISSING else func.__name__,\n                description=desc,\n                callback=func,\n                nsfw=nsfw,\n                parent=self,\n                auto_locale_strings=auto_locale_strings,\n                extras=extras,\n            )\n            self.add_command(command)\n            return command\n\n        return decorator\n\n\ndef command(\n    *,\n    name: Union[str, locale_str] = MISSING,\n    description: Union[str, locale_str] = MISSING,\n    nsfw: bool = False,\n    auto_locale_strings: bool = True,\n    extras: Dict[Any, Any] = MISSING,\n) -> Callable[[CommandCallback[GroupT, P, T]], Command[GroupT, P, T]]:\n    \"\"\"Creates an application command from a regular function.\n\n    Parameters\n    ------------\n    name: :class:`str`\n        The name of the application command. If not given, it defaults to a lower-case\n        version of the callback name.\n    description: :class:`str`\n        The description of the application command. This shows up in the UI to describe\n        the application command. If not given, it defaults to the first line of the docstring\n        of the callback shortened to 100 characters.\n    nsfw: :class:`bool`\n        Whether the command is NSFW and should only work in NSFW channels. Defaults to ``False``.\n\n        Due to a Discord limitation, this does not work on subcommands.\n    auto_locale_strings: :class:`bool`\n        If this is set to ``True``, then all translatable strings will implicitly\n        be wrapped into :class:`locale_str` rather than :class:`str`. This could\n        avoid some repetition and be more ergonomic for certain defaults such\n        as default command names, command descriptions, and parameter names.\n        Defaults to ``True``.\n    extras: :class:`dict`\n        A dictionary that can be used to store extraneous data.\n        The library will not touch any values or keys within this dictionary.\n    \"\"\"\n\n    def decorator(func: CommandCallback[GroupT, P, T]) -> Command[GroupT, P, T]:\n        if not inspect.iscoroutinefunction(func):\n            raise TypeError('command function must be a coroutine function')\n\n        if description is MISSING:\n            if func.__doc__ is None:\n                desc = '…'\n            else:\n                desc = _shorten(func.__doc__)\n        else:\n            desc = description\n\n        return Command(\n            name=name if name is not MISSING else func.__name__,\n            description=desc,\n            callback=func,\n            parent=None,\n            nsfw=nsfw,\n            auto_locale_strings=auto_locale_strings,\n            extras=extras,\n        )\n\n    return decorator\n\n\ndef context_menu(\n    *,\n    name: Union[str, locale_str] = MISSING,\n    nsfw: bool = False,\n    auto_locale_strings: bool = True,\n    extras: Dict[Any, Any] = MISSING,\n) -> Callable[[ContextMenuCallback], ContextMenu]:\n    \"\"\"Creates an application command context menu from a regular function.\n\n    This function must have a signature of :class:`~discord.Interaction` as its first parameter\n    and taking either a :class:`~discord.Member`, :class:`~discord.User`, or :class:`~discord.Message`,\n    or a :obj:`typing.Union` of ``Member`` and ``User`` as its second parameter.\n\n    Examples\n    ---------\n\n    .. code-block:: python3\n\n        @app_commands.context_menu()\n        async def react(interaction: discord.Interaction, message: discord.Message):\n            await interaction.response.send_message('Very cool message!', ephemeral=True)\n\n        @app_commands.context_menu()\n        async def ban(interaction: discord.Interaction, user: discord.Member):\n            await interaction.response.send_message(f'Should I actually ban {user}...', ephemeral=True)\n\n    Parameters\n    ------------\n    name: Union[:class:`str`, :class:`locale_str`]\n        The name of the context menu command. If not given, it defaults to a title-case\n        version of the callback name. Note that unlike regular slash commands this can\n        have spaces and upper case characters in the name.\n    nsfw: :class:`bool`\n        Whether the command is NSFW and should only work in NSFW channels. Defaults to ``False``.\n\n        Due to a Discord limitation, this does not work on subcommands.\n    auto_locale_strings: :class:`bool`\n        If this is set to ``True``, then all translatable strings will implicitly\n        be wrapped into :class:`locale_str` rather than :class:`str`. This could\n        avoid some repetition and be more ergonomic for certain defaults such\n        as default command names, command descriptions, and parameter names.\n        Defaults to ``True``.\n    extras: :class:`dict`\n        A dictionary that can be used to store extraneous data.\n        The library will not touch any values or keys within this dictionary.\n    \"\"\"\n\n    def decorator(func: ContextMenuCallback) -> ContextMenu:\n        if not inspect.iscoroutinefunction(func):\n            raise TypeError('context menu function must be a coroutine function')\n\n        actual_name = func.__name__.title() if name is MISSING else name\n        return ContextMenu(\n            name=actual_name,\n            nsfw=nsfw,\n            callback=func,\n            auto_locale_strings=auto_locale_strings,\n            extras=extras,\n        )\n\n    return decorator\n\n\ndef describe(**parameters: Union[str, locale_str]) -> Callable[[T], T]:\n    r'''Describes the given parameters by their name using the key of the keyword argument\n    as the name.\n\n    Example:\n\n    .. code-block:: python3\n\n        @app_commands.command(description='Bans a member')\n        @app_commands.describe(member='the member to ban')\n        async def ban(interaction: discord.Interaction, member: discord.Member):\n            await interaction.response.send_message(f'Banned {member}')\n\n    Alternatively, you can describe parameters using Google, Sphinx, or Numpy style docstrings.\n\n    Example:\n\n    .. code-block:: python3\n\n        @app_commands.command()\n        async def ban(interaction: discord.Interaction, member: discord.Member):\n            \"\"\"Bans a member\n\n            Parameters\n            -----------\n            member: discord.Member\n                the member to ban\n            \"\"\"\n            await interaction.response.send_message(f'Banned {member}')\n\n    Parameters\n    -----------\n    \\*\\*parameters: Union[:class:`str`, :class:`locale_str`]\n        The description of the parameters.\n\n    Raises\n    --------\n    TypeError\n        The parameter name is not found.\n    '''\n\n    def decorator(inner: T) -> T:\n        if isinstance(inner, Command):\n            _populate_descriptions(inner._params, parameters)\n        else:\n            try:\n                inner.__discord_app_commands_param_description__.update(parameters)  # type: ignore # Runtime attribute access\n            except AttributeError:\n                inner.__discord_app_commands_param_description__ = parameters  # type: ignore # Runtime attribute assignment\n\n        return inner\n\n    return decorator\n\n\ndef rename(**parameters: Union[str, locale_str]) -> Callable[[T], T]:\n    r\"\"\"Renames the given parameters by their name using the key of the keyword argument\n    as the name.\n\n    This renames the parameter within the Discord UI. When referring to the parameter in other\n    decorators, the parameter name used in the function is used instead of the renamed one.\n\n    Example:\n\n    .. code-block:: python3\n\n        @app_commands.command()\n        @app_commands.rename(the_member_to_ban='member')\n        async def ban(interaction: discord.Interaction, the_member_to_ban: discord.Member):\n            await interaction.response.send_message(f'Banned {the_member_to_ban}')\n\n    Parameters\n    -----------\n    \\*\\*parameters: Union[:class:`str`, :class:`locale_str`]\n        The name of the parameters.\n\n    Raises\n    --------\n    ValueError\n        The parameter name is already used by another parameter.\n    TypeError\n        The parameter name is not found.\n    \"\"\"\n\n    def decorator(inner: T) -> T:\n        if isinstance(inner, Command):\n            _populate_renames(inner._params, parameters)\n        else:\n            try:\n                inner.__discord_app_commands_param_rename__.update(parameters)  # type: ignore # Runtime attribute access\n            except AttributeError:\n                inner.__discord_app_commands_param_rename__ = parameters  # type: ignore # Runtime attribute assignment\n\n        return inner\n\n    return decorator\n\n\ndef choices(**parameters: List[Choice[ChoiceT]]) -> Callable[[T], T]:\n    r\"\"\"Instructs the given parameters by their name to use the given choices for their choices.\n\n    Example:\n\n    .. code-block:: python3\n\n        @app_commands.command()\n        @app_commands.describe(fruits='fruits to choose from')\n        @app_commands.choices(fruits=[\n            Choice(name='apple', value=1),\n            Choice(name='banana', value=2),\n            Choice(name='cherry', value=3),\n        ])\n        async def fruit(interaction: discord.Interaction, fruits: Choice[int]):\n            await interaction.response.send_message(f'Your favourite fruit is {fruits.name}.')\n\n    .. note::\n\n        This is not the only way to provide choices to a command. There are two more ergonomic ways\n        of doing this. The first one is to use a :obj:`typing.Literal` annotation:\n\n        .. code-block:: python3\n\n            @app_commands.command()\n            @app_commands.describe(fruits='fruits to choose from')\n            async def fruit(interaction: discord.Interaction, fruits: Literal['apple', 'banana', 'cherry']):\n                await interaction.response.send_message(f'Your favourite fruit is {fruits}.')\n\n        The second way is to use an :class:`enum.Enum`:\n\n        .. code-block:: python3\n\n            class Fruits(enum.Enum):\n                apple = 1\n                banana = 2\n                cherry = 3\n\n            @app_commands.command()\n            @app_commands.describe(fruits='fruits to choose from')\n            async def fruit(interaction: discord.Interaction, fruits: Fruits):\n                await interaction.response.send_message(f'Your favourite fruit is {fruits}.')\n\n\n    Parameters\n    -----------\n    \\*\\*parameters\n        The choices of the parameters.\n\n    Raises\n    --------\n    TypeError\n        The parameter name is not found or the parameter type was incorrect.\n    \"\"\"\n\n    def decorator(inner: T) -> T:\n        if isinstance(inner, Command):\n            _populate_choices(inner._params, parameters)\n        else:\n            try:\n                inner.__discord_app_commands_param_choices__.update(parameters)  # type: ignore # Runtime attribute access\n            except AttributeError:\n                inner.__discord_app_commands_param_choices__ = parameters  # type: ignore # Runtime attribute assignment\n\n        return inner\n\n    return decorator\n\n\ndef autocomplete(**parameters: AutocompleteCallback[GroupT, ChoiceT]) -> Callable[[T], T]:\n    r\"\"\"Associates the given parameters with the given autocomplete callback.\n\n    Autocomplete is only supported on types that have :class:`str`, :class:`int`, or :class:`float`\n    values.\n\n    :func:`Checks <check>` are supported, however they must be attached to the autocomplete\n    callback in order to work. Checks attached to the command are ignored when invoking the autocomplete\n    callback.\n\n    For more information, see the :meth:`Command.autocomplete` documentation.\n\n    .. warning::\n        The choices returned from this coroutine are suggestions. The user may ignore them and input their own value.\n\n    Example:\n\n    .. code-block:: python3\n\n            async def fruit_autocomplete(\n                interaction: discord.Interaction,\n                current: str,\n            ) -> List[app_commands.Choice[str]]:\n                fruits = ['Banana', 'Pineapple', 'Apple', 'Watermelon', 'Melon', 'Cherry']\n                return [\n                    app_commands.Choice(name=fruit, value=fruit)\n                    for fruit in fruits if current.lower() in fruit.lower()\n                ]\n\n            @app_commands.command()\n            @app_commands.autocomplete(fruit=fruit_autocomplete)\n            async def fruits(interaction: discord.Interaction, fruit: str):\n                await interaction.response.send_message(f'Your favourite fruit seems to be {fruit}')\n\n    Parameters\n    -----------\n    \\*\\*parameters\n        The parameters to mark as autocomplete.\n\n    Raises\n    --------\n    TypeError\n        The parameter name is not found or the parameter type was incorrect.\n    \"\"\"\n\n    def decorator(inner: T) -> T:\n        if isinstance(inner, Command):\n            _populate_autocomplete(inner._params, parameters)\n        else:\n            try:\n                inner.__discord_app_commands_param_autocomplete__.update(parameters)  # type: ignore # Runtime attribute access\n            except AttributeError:\n                inner.__discord_app_commands_param_autocomplete__ = parameters  # type: ignore # Runtime attribute assignment\n\n        return inner\n\n    return decorator\n\n\ndef guilds(*guild_ids: Union[Snowflake, int]) -> Callable[[T], T]:\n    r\"\"\"Associates the given guilds with the command.\n\n    When the command instance is added to a :class:`CommandTree`, the guilds that are\n    specified by this decorator become the default guilds that it's added to rather\n    than being a global command.\n\n    .. note::\n\n        Due to an implementation quirk and Python limitation, if this is used in conjunction\n        with the :meth:`CommandTree.command` or :meth:`CommandTree.context_menu` decorator\n        then this must go below that decorator.\n\n    .. note ::\n\n        Due to a Discord limitation, this decorator cannot be used in conjunction with\n        contexts (e.g. :func:`.app_commands.allowed_contexts`) or installation types\n        (e.g. :func:`.app_commands.allowed_installs`).\n\n    Example:\n\n    .. code-block:: python3\n\n            MY_GUILD_ID = discord.Object(...)  # Guild ID here\n\n            @app_commands.command()\n            @app_commands.guilds(MY_GUILD_ID)\n            async def bonk(interaction: discord.Interaction):\n                await interaction.response.send_message('Bonk', ephemeral=True)\n\n    Parameters\n    -----------\n    \\*guild_ids: Union[:class:`int`, :class:`~discord.abc.Snowflake`]\n        The guilds to associate this command with. The command tree will\n        use this as the default when added rather than adding it as a global\n        command.\n    \"\"\"\n\n    defaults: List[int] = [g if isinstance(g, int) else g.id for g in guild_ids]\n\n    def decorator(inner: T) -> T:\n        if isinstance(inner, (Group, ContextMenu)):\n            inner._guild_ids = defaults\n        elif isinstance(inner, Command):\n            if inner.parent is not None:\n                raise ValueError('child commands of a group cannot have default guilds set')\n\n            inner._guild_ids = defaults\n        else:\n            # Runtime attribute assignment\n            inner.__discord_app_commands_default_guilds__ = defaults  # type: ignore\n\n        return inner\n\n    return decorator\n\n\ndef check(predicate: Check) -> Callable[[T], T]:\n    r\"\"\"A decorator that adds a check to an application command.\n\n    These checks should be predicates that take in a single parameter taking\n    a :class:`~discord.Interaction`. If the check returns a ``False``\\-like value then\n    during invocation a :exc:`CheckFailure` exception is raised and sent to\n    the appropriate error handlers.\n\n    These checks can be either a coroutine or not.\n\n    Examples\n    ---------\n\n    Creating a basic check to see if the command invoker is you.\n\n    .. code-block:: python3\n\n        def check_if_it_is_me(interaction: discord.Interaction) -> bool:\n            return interaction.user.id == 85309593344815104\n\n        @tree.command()\n        @app_commands.check(check_if_it_is_me)\n        async def only_for_me(interaction: discord.Interaction):\n            await interaction.response.send_message('I know you!', ephemeral=True)\n\n    Transforming common checks into its own decorator:\n\n    .. code-block:: python3\n\n        def is_me():\n            def predicate(interaction: discord.Interaction) -> bool:\n                return interaction.user.id == 85309593344815104\n            return app_commands.check(predicate)\n\n        @tree.command()\n        @is_me()\n        async def only_me(interaction: discord.Interaction):\n            await interaction.response.send_message('Only you!')\n\n    Parameters\n    -----------\n    predicate: Callable[[:class:`~discord.Interaction`], :class:`bool`]\n        The predicate to check if the command should be invoked.\n    \"\"\"\n\n    def decorator(func: CheckInputParameter) -> CheckInputParameter:\n        if isinstance(func, (Command, ContextMenu)):\n            func.checks.append(predicate)\n        else:\n            if not hasattr(func, '__discord_app_commands_checks__'):\n                func.__discord_app_commands_checks__ = []\n\n            func.__discord_app_commands_checks__.append(predicate)\n\n        return func\n\n    return decorator  # type: ignore\n\n\n@overload\ndef guild_only(func: None = ...) -> Callable[[T], T]:\n    ...\n\n\n@overload\ndef guild_only(func: T) -> T:\n    ...\n\n\ndef guild_only(func: Optional[T] = None) -> Union[T, Callable[[T], T]]:\n    \"\"\"A decorator that indicates this command can only be used in a guild context.\n\n    This is **not** implemented as a :func:`check`, and is instead verified by Discord server side.\n    Therefore, there is no error handler called when a command is used within a private message.\n\n    This decorator can be called with or without parentheses.\n\n    Due to a Discord limitation, this decorator does nothing in subcommands and is ignored.\n\n    Examples\n    ---------\n\n    .. code-block:: python3\n\n        @app_commands.command()\n        @app_commands.guild_only()\n        async def my_guild_only_command(interaction: discord.Interaction) -> None:\n            await interaction.response.send_message('I am only available in guilds!')\n    \"\"\"\n\n    def inner(f: T) -> T:\n        if isinstance(f, (Command, Group, ContextMenu)):\n            f.guild_only = True\n            allowed_contexts = f.allowed_contexts or AppCommandContext()\n            f.allowed_contexts = allowed_contexts\n        else:\n            f.__discord_app_commands_guild_only__ = True  # type: ignore # Runtime attribute assignment\n\n            allowed_contexts = getattr(f, '__discord_app_commands_contexts__', None) or AppCommandContext()\n            f.__discord_app_commands_contexts__ = allowed_contexts  # type: ignore # Runtime attribute assignment\n\n        allowed_contexts.guild = True\n\n        return f\n\n    # Check if called with parentheses or not\n    if func is None:\n        # Called with parentheses\n        return inner\n    else:\n        return inner(func)\n\n\n@overload\ndef private_channel_only(func: None = ...) -> Callable[[T], T]:\n    ...\n\n\n@overload\ndef private_channel_only(func: T) -> T:\n    ...\n\n\ndef private_channel_only(func: Optional[T] = None) -> Union[T, Callable[[T], T]]:\n    \"\"\"A decorator that indicates this command can only be used in the context of DMs and group DMs.\n\n    This is **not** implemented as a :func:`check`, and is instead verified by Discord server side.\n    Therefore, there is no error handler called when a command is used within a guild.\n\n    This decorator can be called with or without parentheses.\n\n    Due to a Discord limitation, this decorator does nothing in subcommands and is ignored.\n\n    .. versionadded:: 2.4\n\n    Examples\n    ---------\n\n    .. code-block:: python3\n\n        @app_commands.command()\n        @app_commands.private_channel_only()\n        async def my_private_channel_only_command(interaction: discord.Interaction) -> None:\n            await interaction.response.send_message('I am only available in DMs and GDMs!')\n    \"\"\"\n\n    def inner(f: T) -> T:\n        if isinstance(f, (Command, Group, ContextMenu)):\n            f.guild_only = False\n            allowed_contexts = f.allowed_contexts or AppCommandContext()\n            f.allowed_contexts = allowed_contexts\n        else:\n            allowed_contexts = getattr(f, '__discord_app_commands_contexts__', None) or AppCommandContext()\n            f.__discord_app_commands_contexts__ = allowed_contexts  # type: ignore # Runtime attribute assignment\n\n        allowed_contexts.private_channel = True\n\n        return f\n\n    # Check if called with parentheses or not\n    if func is None:\n        # Called with parentheses\n        return inner\n    else:\n        return inner(func)\n\n\n@overload\ndef dm_only(func: None = ...) -> Callable[[T], T]:\n    ...\n\n\n@overload\ndef dm_only(func: T) -> T:\n    ...\n\n\ndef dm_only(func: Optional[T] = None) -> Union[T, Callable[[T], T]]:\n    \"\"\"A decorator that indicates this command can only be used in the context of bot DMs.\n\n    This is **not** implemented as a :func:`check`, and is instead verified by Discord server side.\n    Therefore, there is no error handler called when a command is used within a guild or group DM.\n\n    This decorator can be called with or without parentheses.\n\n    Due to a Discord limitation, this decorator does nothing in subcommands and is ignored.\n\n    Examples\n    ---------\n\n    .. code-block:: python3\n\n        @app_commands.command()\n        @app_commands.dm_only()\n        async def my_dm_only_command(interaction: discord.Interaction) -> None:\n            await interaction.response.send_message('I am only available in DMs!')\n    \"\"\"\n\n    def inner(f: T) -> T:\n        if isinstance(f, (Command, Group, ContextMenu)):\n            f.guild_only = False\n            allowed_contexts = f.allowed_contexts or AppCommandContext()\n            f.allowed_contexts = allowed_contexts\n        else:\n            allowed_contexts = getattr(f, '__discord_app_commands_contexts__', None) or AppCommandContext()\n            f.__discord_app_commands_contexts__ = allowed_contexts  # type: ignore # Runtime attribute assignment\n\n        allowed_contexts.dm_channel = True\n        return f\n\n    # Check if called with parentheses or not\n    if func is None:\n        # Called with parentheses\n        return inner\n    else:\n        return inner(func)\n\n\ndef allowed_contexts(guilds: bool = MISSING, dms: bool = MISSING, private_channels: bool = MISSING) -> Callable[[T], T]:\n    \"\"\"A decorator that indicates this command can only be used in certain contexts.\n    Valid contexts are guilds, DMs and private channels.\n\n    This is **not** implemented as a :func:`check`, and is instead verified by Discord server side.\n\n    Due to a Discord limitation, this decorator does nothing in subcommands and is ignored.\n\n    .. versionadded:: 2.4\n\n    Examples\n    ---------\n\n    .. code-block:: python3\n\n        @app_commands.command()\n        @app_commands.allowed_contexts(guilds=True, dms=False, private_channels=True)\n        async def my_command(interaction: discord.Interaction) -> None:\n            await interaction.response.send_message('I am only available in guilds and private channels!')\n    \"\"\"\n\n    def inner(f: T) -> T:\n        if isinstance(f, (Command, Group, ContextMenu)):\n            f.guild_only = False\n            allowed_contexts = f.allowed_contexts or AppCommandContext()\n            f.allowed_contexts = allowed_contexts\n        else:\n            allowed_contexts = getattr(f, '__discord_app_commands_contexts__', None) or AppCommandContext()\n            f.__discord_app_commands_contexts__ = allowed_contexts  # type: ignore # Runtime attribute assignment\n\n        if guilds is not MISSING:\n            allowed_contexts.guild = guilds\n\n        if dms is not MISSING:\n            allowed_contexts.dm_channel = dms\n\n        if private_channels is not MISSING:\n            allowed_contexts.private_channel = private_channels\n\n        return f\n\n    return inner\n\n\n@overload\ndef guild_install(func: None = ...) -> Callable[[T], T]:\n    ...\n\n\n@overload\ndef guild_install(func: T) -> T:\n    ...\n\n\ndef guild_install(func: Optional[T] = None) -> Union[T, Callable[[T], T]]:\n    \"\"\"A decorator that indicates this command should be installed in guilds.\n\n    This is **not** implemented as a :func:`check`, and is instead verified by Discord server side.\n\n    Due to a Discord limitation, this decorator does nothing in subcommands and is ignored.\n\n    .. versionadded:: 2.4\n\n    Examples\n    ---------\n\n    .. code-block:: python3\n\n        @app_commands.command()\n        @app_commands.guild_install()\n        async def my_guild_install_command(interaction: discord.Interaction) -> None:\n            await interaction.response.send_message('I am installed in guilds by default!')\n    \"\"\"\n\n    def inner(f: T) -> T:\n        if isinstance(f, (Command, Group, ContextMenu)):\n            allowed_installs = f.allowed_installs or AppInstallationType()\n            f.allowed_installs = allowed_installs\n        else:\n            allowed_installs = getattr(f, '__discord_app_commands_installation_types__', None) or AppInstallationType()\n            f.__discord_app_commands_installation_types__ = allowed_installs  # type: ignore # Runtime attribute assignment\n\n        allowed_installs.guild = True\n\n        return f\n\n    # Check if called with parentheses or not\n    if func is None:\n        # Called with parentheses\n        return inner\n    else:\n        return inner(func)\n\n\n@overload\ndef user_install(func: None = ...) -> Callable[[T], T]:\n    ...\n\n\n@overload\ndef user_install(func: T) -> T:\n    ...\n\n\ndef user_install(func: Optional[T] = None) -> Union[T, Callable[[T], T]]:\n    \"\"\"A decorator that indicates this command should be installed for users.\n\n    This is **not** implemented as a :func:`check`, and is instead verified by Discord server side.\n\n    Due to a Discord limitation, this decorator does nothing in subcommands and is ignored.\n\n    .. versionadded:: 2.4\n\n    Examples\n    ---------\n\n    .. code-block:: python3\n\n        @app_commands.command()\n        @app_commands.user_install()\n        async def my_user_install_command(interaction: discord.Interaction) -> None:\n            await interaction.response.send_message('I am installed in users by default!')\n    \"\"\"\n\n    def inner(f: T) -> T:\n        if isinstance(f, (Command, Group, ContextMenu)):\n            allowed_installs = f.allowed_installs or AppInstallationType()\n            f.allowed_installs = allowed_installs\n        else:\n            allowed_installs = getattr(f, '__discord_app_commands_installation_types__', None) or AppInstallationType()\n            f.__discord_app_commands_installation_types__ = allowed_installs  # type: ignore # Runtime attribute assignment\n\n        allowed_installs.user = True\n\n        return f\n\n    # Check if called with parentheses or not\n    if func is None:\n        # Called with parentheses\n        return inner\n    else:\n        return inner(func)\n\n\ndef allowed_installs(\n    guilds: bool = MISSING,\n    users: bool = MISSING,\n) -> Callable[[T], T]:\n    \"\"\"A decorator that indicates this command should be installed in certain contexts.\n    Valid contexts are guilds and users.\n\n    This is **not** implemented as a :func:`check`, and is instead verified by Discord server side.\n\n    Due to a Discord limitation, this decorator does nothing in subcommands and is ignored.\n\n    .. versionadded:: 2.4\n\n    Examples\n    ---------\n\n    .. code-block:: python3\n\n        @app_commands.command()\n        @app_commands.allowed_installs(guilds=False, users=True)\n        async def my_command(interaction: discord.Interaction) -> None:\n            await interaction.response.send_message('I am installed in users by default!')\n    \"\"\"\n\n    def inner(f: T) -> T:\n        if isinstance(f, (Command, Group, ContextMenu)):\n            allowed_installs = f.allowed_installs or AppInstallationType()\n            f.allowed_installs = allowed_installs\n        else:\n            allowed_installs = getattr(f, '__discord_app_commands_installation_types__', None) or AppInstallationType()\n            f.__discord_app_commands_installation_types__ = allowed_installs  # type: ignore # Runtime attribute assignment\n\n        if guilds is not MISSING:\n            allowed_installs.guild = guilds\n\n        if users is not MISSING:\n            allowed_installs.user = users\n\n        return f\n\n    return inner\n\n\ndef default_permissions(**perms: bool) -> Callable[[T], T]:\n    r\"\"\"A decorator that sets the default permissions needed to execute this command.\n\n    When this decorator is used, by default users must have these permissions to execute the command.\n    However, an administrator can change the permissions needed to execute this command using the official\n    client. Therefore, this only serves as a hint.\n\n    Setting an empty permissions field, including via calling this with no arguments, will disallow anyone\n    except server administrators from using the command in a guild.\n\n    This is sent to Discord server side, and is not a :func:`check`. Therefore, error handlers are not called.\n\n    Due to a Discord limitation, this decorator does nothing in subcommands and is ignored.\n\n    .. warning::\n\n        This serves as a *hint* and members are *not* required to have the permissions given to actually\n        execute this command. If you want to ensure that members have the permissions needed, consider using\n        :func:`~discord.app_commands.checks.has_permissions` instead.\n\n    Parameters\n    -----------\n    \\*\\*perms: :class:`bool`\n        Keyword arguments denoting the permissions to set as the default.\n\n    Example\n    ---------\n\n    .. code-block:: python3\n\n        @app_commands.command()\n        @app_commands.default_permissions(manage_messages=True)\n        async def test(interaction: discord.Interaction):\n            await interaction.response.send_message('You may or may not have manage messages.')\n    \"\"\"\n\n    permissions = Permissions(**perms)\n\n    def decorator(func: T) -> T:\n        if isinstance(func, (Command, Group, ContextMenu)):\n            func.default_permissions = permissions\n        else:\n            func.__discord_app_commands_default_permissions__ = permissions  # type: ignore # Runtime attribute assignment\n\n        return func\n\n    return decorator\n"
  },
  {
    "path": "discord/app_commands/errors.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom __future__ import annotations\n\nfrom typing import Any, TYPE_CHECKING, List, Optional, Sequence, Union\n\nfrom ..enums import AppCommandOptionType, AppCommandType, Locale\nfrom ..errors import DiscordException, HTTPException, _flatten_error_dict\nfrom ..utils import _human_join\n\n__all__ = (\n    'AppCommandError',\n    'CommandInvokeError',\n    'TransformerError',\n    'TranslationError',\n    'CheckFailure',\n    'CommandAlreadyRegistered',\n    'CommandSignatureMismatch',\n    'CommandNotFound',\n    'CommandLimitReached',\n    'NoPrivateMessage',\n    'MissingRole',\n    'MissingAnyRole',\n    'MissingPermissions',\n    'BotMissingPermissions',\n    'CommandOnCooldown',\n    'MissingApplicationID',\n    'CommandSyncFailure',\n)\n\nif TYPE_CHECKING:\n    from .commands import Command, Group, ContextMenu, Parameter\n    from .transformers import Transformer\n    from .translator import TranslationContextTypes, locale_str\n    from ..types.snowflake import Snowflake, SnowflakeList\n    from .checks import Cooldown\n\n    CommandTypes = Union[Command[Any, ..., Any], Group, ContextMenu]\n\nAPP_ID_NOT_FOUND = (\n    'Client does not have an application_id set. Either the function was called before on_ready '\n    'was called or application_id was not passed to the Client constructor.'\n)\n\n\nclass AppCommandError(DiscordException):\n    \"\"\"The base exception type for all application command related errors.\n\n    This inherits from :exc:`discord.DiscordException`.\n\n    This exception and exceptions inherited from it are handled\n    in a special way as they are caught and passed into various error handlers\n    in this order:\n\n    - :meth:`Command.error <discord.app_commands.Command.error>`\n    - :meth:`Group.on_error <discord.app_commands.Group.on_error>`\n    - :meth:`CommandTree.on_error <discord.app_commands.CommandTree.on_error>`\n\n    .. versionadded:: 2.0\n    \"\"\"\n\n    pass\n\n\nclass CommandInvokeError(AppCommandError):\n    \"\"\"An exception raised when the command being invoked raised an exception.\n\n    This inherits from :exc:`~discord.app_commands.AppCommandError`.\n\n    .. versionadded:: 2.0\n\n    Attributes\n    -----------\n    original: :exc:`Exception`\n        The original exception that was raised. You can also get this via\n        the ``__cause__`` attribute.\n    command: Union[:class:`Command`, :class:`ContextMenu`]\n        The command that failed.\n    \"\"\"\n\n    def __init__(self, command: Union[Command[Any, ..., Any], ContextMenu], e: Exception) -> None:\n        self.original: Exception = e\n        self.command: Union[Command[Any, ..., Any], ContextMenu] = command\n        super().__init__(f'Command {command.name!r} raised an exception: {e.__class__.__name__}: {e}')\n\n\nclass TransformerError(AppCommandError):\n    \"\"\"An exception raised when a :class:`Transformer` or type annotation fails to\n    convert to its target type.\n\n    This inherits from :exc:`~discord.app_commands.AppCommandError`.\n\n    If an exception occurs while converting that does not subclass\n    :exc:`AppCommandError` then the exception is wrapped into this exception.\n    The original exception can be retrieved using the ``__cause__`` attribute.\n    Otherwise if the exception derives from :exc:`AppCommandError` then it will\n    be propagated as-is.\n\n    .. versionadded:: 2.0\n\n    Attributes\n    -----------\n    value: Any\n        The value that failed to convert.\n    type: :class:`~discord.AppCommandOptionType`\n        The type of argument that failed to convert.\n    transformer: :class:`Transformer`\n        The transformer that failed the conversion.\n    \"\"\"\n\n    def __init__(self, value: Any, opt_type: AppCommandOptionType, transformer: Transformer):\n        self.value: Any = value\n        self.type: AppCommandOptionType = opt_type\n        self.transformer: Transformer = transformer\n\n        super().__init__(f'Failed to convert {value} to {transformer._error_display_name!s}')\n\n\nclass TranslationError(AppCommandError):\n    \"\"\"An exception raised when the library fails to translate a string.\n\n    This inherits from :exc:`~discord.app_commands.AppCommandError`.\n\n    If an exception occurs while calling :meth:`Translator.translate` that does\n    not subclass this then the exception is wrapped into this exception.\n    The original exception can be retrieved using the ``__cause__`` attribute.\n    Otherwise it will be propagated as-is.\n\n    .. versionadded:: 2.0\n\n    Attributes\n    -----------\n    string: Optional[Union[:class:`str`, :class:`locale_str`]]\n        The string that caused the error, if any.\n    locale: Optional[:class:`~discord.Locale`]\n        The locale that caused the error, if any.\n    context: :class:`~discord.app_commands.TranslationContext`\n        The context of the translation that triggered the error.\n    \"\"\"\n\n    def __init__(\n        self,\n        *msg: str,\n        string: Optional[Union[str, locale_str]] = None,\n        locale: Optional[Locale] = None,\n        context: TranslationContextTypes,\n    ) -> None:\n        self.string: Optional[Union[str, locale_str]] = string\n        self.locale: Optional[Locale] = locale\n        self.context: TranslationContextTypes = context\n\n        if msg:\n            super().__init__(*msg)\n        else:\n            ctx = context.location.name.replace('_', ' ')\n            fmt = f'Failed to translate {self.string!r} in a {ctx}'\n            if self.locale is not None:\n                fmt = f'{fmt} in the {self.locale.value} locale'\n\n            super().__init__(fmt)\n\n\nclass CheckFailure(AppCommandError):\n    \"\"\"An exception raised when check predicates in a command have failed.\n\n    This inherits from :exc:`~discord.app_commands.AppCommandError`.\n\n    .. versionadded:: 2.0\n    \"\"\"\n\n    pass\n\n\nclass NoPrivateMessage(CheckFailure):\n    \"\"\"An exception raised when a command does not work in a direct message.\n\n    This inherits from :exc:`~discord.app_commands.CheckFailure`.\n\n    .. versionadded:: 2.0\n    \"\"\"\n\n    def __init__(self, message: Optional[str] = None) -> None:\n        super().__init__(message or 'This command cannot be used in direct messages.')\n\n\nclass MissingRole(CheckFailure):\n    \"\"\"An exception raised when the command invoker lacks a role to run a command.\n\n    This inherits from :exc:`~discord.app_commands.CheckFailure`.\n\n    .. versionadded:: 2.0\n\n    Attributes\n    -----------\n    missing_role: Union[:class:`str`, :class:`int`]\n        The required role that is missing.\n        This is the parameter passed to :func:`~discord.app_commands.checks.has_role`.\n    \"\"\"\n\n    def __init__(self, missing_role: Snowflake) -> None:\n        self.missing_role: Snowflake = missing_role\n        message = f'Role {missing_role!r} is required to run this command.'\n        super().__init__(message)\n\n\nclass MissingAnyRole(CheckFailure):\n    \"\"\"An exception raised when the command invoker lacks any of the roles\n    specified to run a command.\n\n    This inherits from :exc:`~discord.app_commands.CheckFailure`.\n\n    .. versionadded:: 2.0\n\n    Attributes\n    -----------\n    missing_roles: List[Union[:class:`str`, :class:`int`]]\n        The roles that the invoker is missing.\n        These are the parameters passed to :func:`~discord.app_commands.checks.has_any_role`.\n    \"\"\"\n\n    def __init__(self, missing_roles: SnowflakeList) -> None:\n        self.missing_roles: SnowflakeList = missing_roles\n\n        fmt = _human_join([f\"'{role}'\" for role in missing_roles])\n        message = f'You are missing at least one of the required roles: {fmt}'\n        super().__init__(message)\n\n\nclass MissingPermissions(CheckFailure):\n    \"\"\"An exception raised when the command invoker lacks permissions to run a\n    command.\n\n    This inherits from :exc:`~discord.app_commands.CheckFailure`.\n\n    .. versionadded:: 2.0\n\n    Attributes\n    -----------\n    missing_permissions: List[:class:`str`]\n        The required permissions that are missing.\n    \"\"\"\n\n    def __init__(self, missing_permissions: List[str], *args: Any) -> None:\n        self.missing_permissions: List[str] = missing_permissions\n\n        missing = [perm.replace('_', ' ').replace('guild', 'server').title() for perm in missing_permissions]\n        fmt = _human_join(missing, final='and')\n        message = f'You are missing {fmt} permission(s) to run this command.'\n        super().__init__(message, *args)\n\n\nclass BotMissingPermissions(CheckFailure):\n    \"\"\"An exception raised when the bot's member lacks permissions to run a\n    command.\n\n    This inherits from :exc:`~discord.app_commands.CheckFailure`.\n\n    .. versionadded:: 2.0\n\n    Attributes\n    -----------\n    missing_permissions: List[:class:`str`]\n        The required permissions that are missing.\n    \"\"\"\n\n    def __init__(self, missing_permissions: List[str], *args: Any) -> None:\n        self.missing_permissions: List[str] = missing_permissions\n\n        missing = [perm.replace('_', ' ').replace('guild', 'server').title() for perm in missing_permissions]\n        fmt = _human_join(missing, final='and')\n        message = f'Bot requires {fmt} permission(s) to run this command.'\n        super().__init__(message, *args)\n\n\nclass CommandOnCooldown(CheckFailure):\n    \"\"\"An exception raised when the command being invoked is on cooldown.\n\n    This inherits from :exc:`~discord.app_commands.CheckFailure`.\n\n    .. versionadded:: 2.0\n\n    Attributes\n    -----------\n    cooldown: :class:`~discord.app_commands.Cooldown`\n        The cooldown that was triggered.\n    retry_after: :class:`float`\n        The amount of seconds to wait before you can retry again.\n    \"\"\"\n\n    def __init__(self, cooldown: Cooldown, retry_after: float) -> None:\n        self.cooldown: Cooldown = cooldown\n        self.retry_after: float = retry_after\n        super().__init__(f'You are on cooldown. Try again in {retry_after:.2f}s')\n\n\nclass CommandAlreadyRegistered(AppCommandError):\n    \"\"\"An exception raised when a command is already registered.\n\n    This inherits from :exc:`~discord.app_commands.AppCommandError`.\n\n    .. versionadded:: 2.0\n\n    Attributes\n    -----------\n    name: :class:`str`\n        The name of the command already registered.\n    guild_id: Optional[:class:`int`]\n        The guild ID this command was already registered at.\n        If ``None`` then it was a global command.\n    \"\"\"\n\n    def __init__(self, name: str, guild_id: Optional[int]):\n        self.name: str = name\n        self.guild_id: Optional[int] = guild_id\n        super().__init__(f'Command {name!r} already registered.')\n\n\nclass CommandNotFound(AppCommandError):\n    \"\"\"An exception raised when an application command could not be found.\n\n    This inherits from :exc:`~discord.app_commands.AppCommandError`.\n\n    .. versionadded:: 2.0\n\n    Attributes\n    ------------\n    name: :class:`str`\n        The name of the application command not found.\n    parents: List[:class:`str`]\n        A list of parent command names that were previously found\n        prior to the application command not being found.\n    type: :class:`~discord.AppCommandType`\n        The type of command that was not found.\n    \"\"\"\n\n    def __init__(self, name: str, parents: List[str], type: AppCommandType = AppCommandType.chat_input):\n        self.name: str = name\n        self.parents: List[str] = parents\n        self.type: AppCommandType = type\n        super().__init__(f'Application command {name!r} not found')\n\n\nclass CommandLimitReached(AppCommandError):\n    \"\"\"An exception raised when the maximum number of application commands was reached\n    either globally or in a guild.\n\n    This inherits from :exc:`~discord.app_commands.AppCommandError`.\n\n    .. versionadded:: 2.0\n\n    Attributes\n    ------------\n    type: :class:`~discord.AppCommandType`\n        The type of command that reached the limit.\n    guild_id: Optional[:class:`int`]\n        The guild ID that reached the limit or ``None`` if it was global.\n    limit: :class:`int`\n        The limit that was hit.\n    \"\"\"\n\n    def __init__(self, guild_id: Optional[int], limit: int, type: AppCommandType = AppCommandType.chat_input):\n        self.guild_id: Optional[int] = guild_id\n        self.limit: int = limit\n        self.type: AppCommandType = type\n\n        lookup = {\n            AppCommandType.chat_input: 'slash commands',\n            AppCommandType.message: 'message context menu commands',\n            AppCommandType.user: 'user context menu commands',\n        }\n        desc = lookup.get(type, 'application commands')\n        ns = 'globally' if self.guild_id is None else f'for guild ID {self.guild_id}'\n        super().__init__(f'maximum number of {desc} exceeded {limit} {ns}')\n\n\nclass CommandSignatureMismatch(AppCommandError):\n    \"\"\"An exception raised when an application command from Discord has a different signature\n    from the one provided in the code. This happens because your command definition differs\n    from the command definition you provided Discord. Either your code is out of date or the\n    data from Discord is out of sync.\n\n    This inherits from :exc:`~discord.app_commands.AppCommandError`.\n\n    .. versionadded:: 2.0\n\n    Attributes\n    ------------\n    command: Union[:class:`~.app_commands.Command`, :class:`~.app_commands.ContextMenu`, :class:`~.app_commands.Group`]\n        The command that had the signature mismatch.\n    \"\"\"\n\n    def __init__(self, command: Union[Command[Any, ..., Any], ContextMenu, Group]):\n        self.command: Union[Command[Any, ..., Any], ContextMenu, Group] = command\n        msg = (\n            f'The signature for command {command.name!r} is different from the one provided by Discord. '\n            'This can happen because either your code is out of date or you have not synced the '\n            'commands with Discord, causing the mismatch in data. It is recommended to sync the '\n            'command tree to fix this issue.'\n        )\n        super().__init__(msg)\n\n\nclass MissingApplicationID(AppCommandError):\n    \"\"\"An exception raised when the client does not have an application ID set.\n    An application ID is required for syncing application commands.\n\n    This inherits from :exc:`~discord.app_commands.AppCommandError`.\n\n    .. versionadded:: 2.0\n    \"\"\"\n\n    def __init__(self, message: Optional[str] = None):\n        super().__init__(message or APP_ID_NOT_FOUND)\n\n\ndef _get_command_error(\n    index: str,\n    inner: Any,\n    objects: Sequence[Union[Parameter, CommandTypes]],\n    messages: List[str],\n    indent: int = 0,\n) -> None:\n    # Import these here to avoid circular imports\n    from .commands import Command, Group, ContextMenu\n\n    indentation = ' ' * indent\n\n    # Top level errors are:\n    # <number>: { <key>: <error> }\n    # The dicts could be nested, e.g.\n    # <number>: { <key>: { <second>: <error> } }\n    # Luckily, this is already handled by the flatten_error_dict utility\n    if not index.isdigit():\n        errors = _flatten_error_dict(inner, index)\n        messages.extend(f'In {k}: {v}' for k, v in errors.items())\n        return\n\n    idx = int(index)\n    try:\n        obj = objects[idx]\n    except IndexError:\n        dedent_one_level = ' ' * (indent - 2)\n        errors = _flatten_error_dict(inner, index)\n        messages.extend(f'{dedent_one_level}In {k}: {v}' for k, v in errors.items())\n        return\n\n    children: Sequence[Union[Parameter, CommandTypes]] = []\n    if isinstance(obj, Command):\n        messages.append(f'{indentation}In command {obj.qualified_name!r} defined in function {obj.callback.__qualname__!r}')\n        children = obj.parameters\n    elif isinstance(obj, Group):\n        messages.append(f'{indentation}In group {obj.qualified_name!r} defined in module {obj.module!r}')\n        children = obj.commands\n    elif isinstance(obj, ContextMenu):\n        messages.append(\n            f'{indentation}In context menu {obj.qualified_name!r} defined in function {obj.callback.__qualname__!r}'\n        )\n    else:\n        messages.append(f'{indentation}In parameter {obj.name!r}')\n\n    for key, remaining in inner.items():\n        # Special case the 'options' key since they have well defined meanings\n        if key == 'options':\n            for index, d in remaining.items():\n                _get_command_error(index, d, children, messages, indent=indent + 2)\n        else:\n            if isinstance(remaining, dict):\n                try:\n                    inner_errors = remaining['_errors']\n                except KeyError:\n                    errors = _flatten_error_dict(remaining, key=key)\n                else:\n                    errors = {key: ' '.join(x.get('message', '') for x in inner_errors)}\n            else:\n                errors = _flatten_error_dict(remaining, key=key)\n\n            messages.extend(f'{indentation}  {k}: {v}' for k, v in errors.items())\n\n\nclass CommandSyncFailure(AppCommandError, HTTPException):\n    \"\"\"An exception raised when :meth:`CommandTree.sync` failed.\n\n    This provides syncing failures in a slightly more readable format.\n\n    This inherits from :exc:`~discord.app_commands.AppCommandError`\n    and :exc:`~discord.HTTPException`.\n\n    .. versionadded:: 2.0\n    \"\"\"\n\n    def __init__(self, child: HTTPException, commands: List[CommandTypes]) -> None:\n        # Consume the child exception and make it seem as if we are that exception\n        self.__dict__.update(child.__dict__)\n\n        messages = [f'Failed to upload commands to Discord (HTTP status {self.status}, error code {self.code})']\n\n        if self._errors:\n            # Handle case where the errors dict has no actual chain such as APPLICATION_COMMAND_TOO_LARGE\n            if len(self._errors) == 1 and '_errors' in self._errors:\n                errors = self._errors['_errors']\n                if len(errors) == 1:\n                    extra = errors[0].get('message')\n                    if extra:\n                        messages[0] += f': {extra}'\n                else:\n                    messages.extend(f'Error {e.get(\"code\", \"\")}: {e.get(\"message\", \"\")}' for e in errors)\n            else:\n                for index, inner in self._errors.items():\n                    _get_command_error(index, inner, commands, messages)\n\n        # Equivalent to super().__init__(...) but skips other constructors\n        self.args = ('\\n'.join(messages),)\n"
  },
  {
    "path": "discord/app_commands/installs.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom __future__ import annotations\nfrom typing import TYPE_CHECKING, ClassVar, List, Optional, Sequence\n\n__all__ = (\n    'AppInstallationType',\n    'AppCommandContext',\n)\n\nif TYPE_CHECKING:\n    from typing_extensions import Self\n    from ..types.interactions import InteractionContextType, InteractionInstallationType\n\n\nclass AppInstallationType:\n    r\"\"\"Represents the installation location of an application command.\n\n    .. versionadded:: 2.4\n\n    Parameters\n    -----------\n    guild: Optional[:class:`bool`]\n        Whether the integration is a guild install.\n    user: Optional[:class:`bool`]\n        Whether the integration is a user install.\n    \"\"\"\n\n    __slots__ = ('_guild', '_user')\n\n    GUILD: ClassVar[int] = 0\n    USER: ClassVar[int] = 1\n\n    def __init__(self, *, guild: Optional[bool] = None, user: Optional[bool] = None):\n        self._guild: Optional[bool] = guild\n        self._user: Optional[bool] = user\n\n    @property\n    def guild(self) -> bool:\n        \"\"\":class:`bool`: Whether the integration is a guild install.\"\"\"\n        return bool(self._guild)\n\n    @guild.setter\n    def guild(self, value: bool) -> None:\n        self._guild = bool(value)\n\n    @property\n    def user(self) -> bool:\n        \"\"\":class:`bool`: Whether the integration is a user install.\"\"\"\n        return bool(self._user)\n\n    @user.setter\n    def user(self, value: bool) -> None:\n        self._user = bool(value)\n\n    def merge(self, other: AppInstallationType) -> AppInstallationType:\n        # Merging is similar to AllowedMentions where `self` is the base\n        # and the `other` is the override preference\n        guild = self._guild if other._guild is None else other._guild\n        user = self._user if other._user is None else other._user\n        return AppInstallationType(guild=guild, user=user)\n\n    def _is_unset(self) -> bool:\n        return all(x is None for x in (self._guild, self._user))\n\n    def _merge_to_array(self, other: Optional[AppInstallationType]) -> Optional[List[InteractionInstallationType]]:\n        result = self.merge(other) if other is not None else self\n        if result._is_unset():\n            return None\n        return result.to_array()\n\n    @classmethod\n    def _from_value(cls, value: Sequence[InteractionInstallationType]) -> Self:\n        self = cls()\n        for x in value:\n            if x == cls.GUILD:\n                self._guild = True\n            elif x == cls.USER:\n                self._user = True\n        return self\n\n    def to_array(self) -> List[InteractionInstallationType]:\n        values = []\n        if self._guild:\n            values.append(self.GUILD)\n        if self._user:\n            values.append(self.USER)\n        return values\n\n\nclass AppCommandContext:\n    r\"\"\"Wraps up the Discord :class:`~discord.app_commands.Command` execution context.\n\n    .. versionadded:: 2.4\n\n    Parameters\n    -----------\n    guild: Optional[:class:`bool`]\n        Whether the context allows usage in a guild.\n    dm_channel: Optional[:class:`bool`]\n        Whether the context allows usage in a DM channel.\n    private_channel: Optional[:class:`bool`]\n        Whether the context allows usage in a DM or a GDM channel.\n    \"\"\"\n\n    GUILD: ClassVar[int] = 0\n    DM_CHANNEL: ClassVar[int] = 1\n    PRIVATE_CHANNEL: ClassVar[int] = 2\n\n    __slots__ = ('_guild', '_dm_channel', '_private_channel')\n\n    def __init__(\n        self,\n        *,\n        guild: Optional[bool] = None,\n        dm_channel: Optional[bool] = None,\n        private_channel: Optional[bool] = None,\n    ):\n        self._guild: Optional[bool] = guild\n        self._dm_channel: Optional[bool] = dm_channel\n        self._private_channel: Optional[bool] = private_channel\n\n    @property\n    def guild(self) -> bool:\n        \"\"\":class:`bool`: Whether the context allows usage in a guild.\"\"\"\n        return bool(self._guild)\n\n    @guild.setter\n    def guild(self, value: bool) -> None:\n        self._guild = bool(value)\n\n    @property\n    def dm_channel(self) -> bool:\n        \"\"\":class:`bool`: Whether the context allows usage in a DM channel.\"\"\"\n        return bool(self._dm_channel)\n\n    @dm_channel.setter\n    def dm_channel(self, value: bool) -> None:\n        self._dm_channel = bool(value)\n\n    @property\n    def private_channel(self) -> bool:\n        \"\"\":class:`bool`: Whether the context allows usage in a DM or a GDM channel.\"\"\"\n        return bool(self._private_channel)\n\n    @private_channel.setter\n    def private_channel(self, value: bool) -> None:\n        self._private_channel = bool(value)\n\n    def merge(self, other: AppCommandContext) -> AppCommandContext:\n        guild = self._guild if other._guild is None else other._guild\n        dm_channel = self._dm_channel if other._dm_channel is None else other._dm_channel\n        private_channel = self._private_channel if other._private_channel is None else other._private_channel\n        return AppCommandContext(guild=guild, dm_channel=dm_channel, private_channel=private_channel)\n\n    def _is_unset(self) -> bool:\n        return all(x is None for x in (self._guild, self._dm_channel, self._private_channel))\n\n    def _merge_to_array(self, other: Optional[AppCommandContext]) -> Optional[List[InteractionContextType]]:\n        result = self.merge(other) if other is not None else self\n        if result._is_unset():\n            return None\n        return result.to_array()\n\n    @classmethod\n    def _from_value(cls, value: Sequence[InteractionContextType]) -> Self:\n        self = cls()\n        for x in value:\n            if x == cls.GUILD:\n                self._guild = True\n            elif x == cls.DM_CHANNEL:\n                self._dm_channel = True\n            elif x == cls.PRIVATE_CHANNEL:\n                self._private_channel = True\n        return self\n\n    def to_array(self) -> List[InteractionContextType]:\n        values = []\n        if self._guild:\n            values.append(self.GUILD)\n        if self._dm_channel:\n            values.append(self.DM_CHANNEL)\n        if self._private_channel:\n            values.append(self.PRIVATE_CHANNEL)\n        return values\n"
  },
  {
    "path": "discord/app_commands/models.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom __future__ import annotations\nfrom datetime import datetime\n\nfrom .errors import MissingApplicationID\nfrom ..flags import AppCommandContext, AppInstallationType\nfrom .translator import TranslationContextLocation, TranslationContext, locale_str, Translator\nfrom ..permissions import Permissions\nfrom ..enums import (\n    AppCommandOptionType,\n    AppCommandType,\n    AppCommandPermissionType,\n    ChannelType,\n    Locale,\n    try_enum,\n)\nfrom ..mixins import Hashable\nfrom ..utils import _get_as_snowflake, parse_time, snowflake_time, MISSING\nfrom ..object import Object\nfrom ..role import Role\nfrom ..member import Member\n\nfrom typing import Any, Dict, Generic, List, TYPE_CHECKING, Optional, TypeVar, Union\n\n__all__ = (\n    'AppCommand',\n    'AppCommandGroup',\n    'AppCommandChannel',\n    'AppCommandThread',\n    'AppCommandPermissions',\n    'GuildAppCommandPermissions',\n    'Argument',\n    'Choice',\n    'AllChannels',\n)\n\nChoiceT = TypeVar('ChoiceT', str, int, float, Union[str, int, float])\n\n\ndef is_app_command_argument_type(value: int) -> bool:\n    return 11 >= value >= 3\n\n\nif TYPE_CHECKING:\n    from ..types.command import (\n        ApplicationCommand as ApplicationCommandPayload,\n        ApplicationCommandOption,\n        ApplicationCommandOptionChoice,\n        ApplicationCommandPermissions,\n        GuildApplicationCommandPermissions,\n    )\n    from ..types.interactions import (\n        PartialChannel,\n        PartialThread,\n    )\n    from ..types.threads import (\n        ThreadMetadata,\n        ThreadArchiveDuration,\n    )\n\n    from ..abc import Snowflake\n    from ..state import ConnectionState\n    from ..guild import GuildChannel, Guild\n    from ..channel import TextChannel\n    from ..threads import Thread\n    from ..user import User\n\n    ApplicationCommandParent = Union['AppCommand', 'AppCommandGroup']\n\n\nclass AllChannels:\n    \"\"\"Represents all channels for application command permissions.\n\n    .. versionadded:: 2.0\n\n    Attributes\n    -----------\n    guild: :class:`~discord.Guild`\n        The guild the application command permission is for.\n    \"\"\"\n\n    __slots__ = ('guild',)\n\n    def __init__(self, guild: Guild):\n        self.guild: Guild = guild\n\n    @property\n    def id(self) -> int:\n        \"\"\":class:`int`: The ID sentinel used to represent all channels. Equivalent to the guild's ID minus 1.\"\"\"\n        return self.guild.id - 1\n\n    def __repr__(self) -> str:\n        return f'<AllChannels guild={self.guild}>'\n\n\ndef _to_locale_dict(data: Dict[str, str]) -> Dict[Locale, str]:\n    return {try_enum(Locale, key): value for key, value in data.items()}\n\n\nclass AppCommand(Hashable):\n    \"\"\"Represents an application command.\n\n    In common parlance this is referred to as a \"Slash Command\" or a\n    \"Context Menu Command\".\n\n    .. versionadded:: 2.0\n\n    .. container:: operations\n\n        .. describe:: x == y\n\n            Checks if two application commands are equal.\n\n        .. describe:: x != y\n\n            Checks if two application commands are not equal.\n\n        .. describe:: hash(x)\n\n            Returns the application command's hash.\n\n        .. describe:: str(x)\n\n            Returns the application command's name.\n\n    Attributes\n    -----------\n    id: :class:`int`\n        The application command's ID.\n    application_id: :class:`int`\n        The application command's application's ID.\n    type: :class:`~discord.AppCommandType`\n        The application command's type.\n    name: :class:`str`\n        The application command's name.\n    description: :class:`str`\n        The application command's description.\n    name_localizations: Dict[:class:`~discord.Locale`, :class:`str`]\n        The localised names of the application command. Used for display purposes.\n    description_localizations: Dict[:class:`~discord.Locale`, :class:`str`]\n        The localised descriptions of the application command. Used for display purposes.\n    options: List[Union[:class:`Argument`, :class:`AppCommandGroup`]]\n        A list of options.\n    default_member_permissions: Optional[:class:`~discord.Permissions`]\n        The default member permissions that can run this command.\n    dm_permission: :class:`bool`\n        A boolean that indicates whether this command can be run in direct messages.\n    allowed_contexts: Optional[:class:`~discord.app_commands.AppCommandContext`]\n        The contexts that this command is allowed to be used in. Overrides the ``dm_permission`` attribute.\n\n        .. versionadded:: 2.4\n    allowed_installs: Optional[:class:`~discord.app_commands.AppInstallationType`]\n        The installation contexts that this command is allowed to be installed in.\n\n        .. versionadded:: 2.4\n    guild_id: Optional[:class:`int`]\n        The ID of the guild this command is registered in. A value of ``None``\n        denotes that it is a global command.\n    nsfw: :class:`bool`\n        Whether the command is NSFW and should only work in NSFW channels.\n    \"\"\"\n\n    __slots__ = (\n        'id',\n        'type',\n        'application_id',\n        'name',\n        'description',\n        'name_localizations',\n        'description_localizations',\n        'guild_id',\n        'options',\n        'default_member_permissions',\n        'dm_permission',\n        'allowed_contexts',\n        'allowed_installs',\n        'nsfw',\n        '_state',\n    )\n\n    def __init__(self, *, data: ApplicationCommandPayload, state: ConnectionState) -> None:\n        self._state: ConnectionState = state\n        self._from_data(data)\n\n    def _from_data(self, data: ApplicationCommandPayload) -> None:\n        self.id: int = int(data['id'])\n        self.application_id: int = int(data['application_id'])\n        self.name: str = data['name']\n        self.description: str = data['description']\n        self.guild_id: Optional[int] = _get_as_snowflake(data, 'guild_id')\n        self.type: AppCommandType = try_enum(AppCommandType, data.get('type', 1))\n        self.options: List[Union[Argument, AppCommandGroup]] = [\n            app_command_option_factory(data=d, parent=self, state=self._state) for d in data.get('options', [])\n        ]\n        self.default_member_permissions: Optional[Permissions]\n        permissions = data.get('default_member_permissions')\n        if permissions is None:\n            self.default_member_permissions = None\n        else:\n            self.default_member_permissions = Permissions(int(permissions))\n\n        dm_permission = data.get('dm_permission')\n        # For some reason this field can be explicit null and mean True\n        if dm_permission is None:\n            dm_permission = True\n\n        self.dm_permission: bool = dm_permission\n\n        allowed_contexts = data.get('contexts')\n        if allowed_contexts is None:\n            self.allowed_contexts: Optional[AppCommandContext] = None\n        else:\n            self.allowed_contexts = AppCommandContext._from_value(allowed_contexts)\n\n        allowed_installs = data.get('integration_types')\n        if allowed_installs is None:\n            self.allowed_installs: Optional[AppInstallationType] = None\n        else:\n            self.allowed_installs = AppInstallationType._from_value(allowed_installs)\n\n        self.nsfw: bool = data.get('nsfw', False)\n        self.name_localizations: Dict[Locale, str] = _to_locale_dict(data.get('name_localizations') or {})\n        self.description_localizations: Dict[Locale, str] = _to_locale_dict(data.get('description_localizations') or {})\n\n    def to_dict(self) -> ApplicationCommandPayload:\n        return {\n            'id': self.id,\n            'type': self.type.value,\n            'application_id': self.application_id,\n            'name': self.name,\n            'description': self.description,\n            'name_localizations': {str(k): v for k, v in self.name_localizations.items()},\n            'description_localizations': {str(k): v for k, v in self.description_localizations.items()},\n            'contexts': self.allowed_contexts.to_array() if self.allowed_contexts is not None else None,\n            'integration_types': self.allowed_installs.to_array() if self.allowed_installs is not None else None,\n            'options': [opt.to_dict() for opt in self.options],\n        }  # type: ignore # Type checker does not understand this literal.\n\n    def __str__(self) -> str:\n        return self.name\n\n    def __repr__(self) -> str:\n        return f'<{self.__class__.__name__} id={self.id!r} name={self.name!r} type={self.type!r}>'\n\n    @property\n    def mention(self) -> str:\n        \"\"\":class:`str`: Returns a string that allows you to mention the given AppCommand.\"\"\"\n        return f'</{self.name}:{self.id}>'\n\n    @property\n    def guild(self) -> Optional[Guild]:\n        \"\"\"Optional[:class:`~discord.Guild`]: Returns the guild this command is registered to\n        if it exists.\n        \"\"\"\n        return self._state._get_guild(self.guild_id)\n\n    async def delete(self) -> None:\n        \"\"\"|coro|\n\n        Deletes the application command.\n\n        Raises\n        -------\n        NotFound\n            The application command was not found.\n        Forbidden\n            You do not have permission to delete this application command.\n        HTTPException\n            Deleting the application command failed.\n        MissingApplicationID\n            The client does not have an application ID.\n        \"\"\"\n        state = self._state\n        if not state.application_id:\n            raise MissingApplicationID\n\n        if self.guild_id:\n            await state.http.delete_guild_command(\n                state.application_id,\n                self.guild_id,\n                self.id,\n            )\n        else:\n            await state.http.delete_global_command(\n                state.application_id,\n                self.id,\n            )\n\n    async def edit(\n        self,\n        *,\n        name: str = MISSING,\n        description: str = MISSING,\n        default_member_permissions: Optional[Permissions] = MISSING,\n        dm_permission: bool = MISSING,\n        options: List[Union[Argument, AppCommandGroup]] = MISSING,\n    ) -> AppCommand:\n        \"\"\"|coro|\n\n        Edits the application command.\n\n        Parameters\n        -----------\n        name: :class:`str`\n            The new name for the application command.\n        description: :class:`str`\n            The new description for the application command.\n        default_member_permissions: Optional[:class:`~discord.Permissions`]\n            The new default permissions needed to use this application command.\n            Pass value of ``None`` to remove any permission requirements.\n        dm_permission: :class:`bool`\n            Indicates if the application command can be used in DMs.\n        options: List[Union[:class:`Argument`, :class:`AppCommandGroup`]]\n            List of new options for this application command.\n\n        Raises\n        -------\n        NotFound\n            The application command was not found.\n        Forbidden\n            You do not have permission to edit this application command.\n        HTTPException\n            Editing the application command failed.\n        MissingApplicationID\n            The client does not have an application ID.\n\n        Returns\n        --------\n        :class:`AppCommand`\n            The newly edited application command.\n        \"\"\"\n        state = self._state\n        if not state.application_id:\n            raise MissingApplicationID\n\n        payload = {}\n\n        if name is not MISSING:\n            payload['name'] = name\n\n        if description is not MISSING:\n            payload['description'] = description\n\n        if default_member_permissions is not MISSING:\n            if default_member_permissions is not None:\n                payload['default_member_permissions'] = default_member_permissions.value\n            else:\n                payload['default_member_permissions'] = None\n\n        if self.guild_id is None and dm_permission is not MISSING:\n            payload['dm_permission'] = dm_permission\n\n        if options is not MISSING:\n            payload['options'] = [option.to_dict() for option in options]\n\n        if not payload:\n            return self\n\n        if self.guild_id:\n            data = await state.http.edit_guild_command(\n                state.application_id,\n                self.guild_id,\n                self.id,\n                payload,\n            )\n        else:\n            data = await state.http.edit_global_command(\n                state.application_id,\n                self.id,\n                payload,\n            )\n        return AppCommand(data=data, state=state)\n\n    async def fetch_permissions(self, guild: Snowflake) -> GuildAppCommandPermissions:\n        \"\"\"|coro|\n\n        Retrieves this command's permission in the guild.\n\n        Parameters\n        -----------\n        guild: :class:`~discord.abc.Snowflake`\n            The guild to retrieve the permissions from.\n\n        Raises\n        -------\n        Forbidden\n            You do not have permission to fetch the application command's permissions.\n        HTTPException\n            Fetching the application command's permissions failed.\n        MissingApplicationID\n            The client does not have an application ID.\n        NotFound\n            The application command's permissions could not be found.\n            This can also indicate that the permissions are synced with the guild\n            (i.e. they are unchanged from the default).\n\n        Returns\n        --------\n        :class:`GuildAppCommandPermissions`\n            An object representing the application command's permissions in the guild.\n        \"\"\"\n        state = self._state\n        if not state.application_id:\n            raise MissingApplicationID\n\n        data = await state.http.get_application_command_permissions(\n            state.application_id,\n            guild.id,\n            self.id,\n        )\n        return GuildAppCommandPermissions(data=data, state=state, command=self)\n\n\nclass Choice(Generic[ChoiceT]):\n    \"\"\"Represents an application command argument choice.\n\n    .. versionadded:: 2.0\n\n    .. container:: operations\n\n        .. describe:: x == y\n\n            Checks if two choices are equal.\n\n        .. describe:: x != y\n\n            Checks if two choices are not equal.\n\n        .. describe:: hash(x)\n\n            Returns the choice's hash.\n\n    Parameters\n    -----------\n    name: Union[:class:`str`, :class:`locale_str`]\n        The name of the choice. Used for display purposes.\n        Can only be up to 100 characters.\n    name_localizations: Dict[:class:`~discord.Locale`, :class:`str`]\n        The localised names of the choice. Used for display purposes.\n    value: Union[:class:`int`, :class:`str`, :class:`float`]\n        The value of the choice. If it's a string, it can only be\n        up to 100 characters long.\n    \"\"\"\n\n    __slots__ = ('name', 'value', '_locale_name', 'name_localizations')\n\n    def __init__(self, *, name: Union[str, locale_str], value: ChoiceT):\n        name, locale = (name.message, name) if isinstance(name, locale_str) else (name, None)\n        self.name: str = name\n        self._locale_name: Optional[locale_str] = locale\n        self.value: ChoiceT = value\n        self.name_localizations: Dict[Locale, str] = {}\n\n    @classmethod\n    def from_dict(cls, data: ApplicationCommandOptionChoice) -> Choice[ChoiceT]:\n        self = cls.__new__(cls)\n        self.name = data['name']\n        self.value = data['value']  # type: ignore # This seems to break every other pyright release\n        self.name_localizations = _to_locale_dict(data.get('name_localizations') or {})\n        return self\n\n    def __eq__(self, o: object) -> bool:\n        return isinstance(o, Choice) and self.name == o.name and self.value == o.value\n\n    def __hash__(self) -> int:\n        return hash((self.name, self.value))\n\n    def __repr__(self) -> str:\n        return f'{self.__class__.__name__}(name={self.name!r}, value={self.value!r})'\n\n    @property\n    def _option_type(self) -> AppCommandOptionType:\n        if isinstance(self.value, int):\n            return AppCommandOptionType.integer\n        elif isinstance(self.value, float):\n            return AppCommandOptionType.number\n        elif isinstance(self.value, str):\n            return AppCommandOptionType.string\n        else:\n            raise TypeError(\n                f'invalid Choice value type given, expected int, str, or float but received {self.value.__class__.__name__}'\n            )\n\n    async def get_translated_payload(self, translator: Translator) -> Dict[str, Any]:\n        base = self.to_dict()\n        name_localizations: Dict[str, str] = {}\n        context = TranslationContext(location=TranslationContextLocation.choice_name, data=self)\n        if self._locale_name:\n            for locale in Locale:\n                translation = await translator._checked_translate(self._locale_name, locale, context)\n                if translation is not None:\n                    name_localizations[locale.value] = translation\n\n        if name_localizations:\n            base['name_localizations'] = name_localizations\n\n        return base\n\n    async def get_translated_payload_for_locale(self, translator: Translator, locale: Locale) -> Dict[str, Any]:\n        base = self.to_dict()\n        if self._locale_name:\n            context = TranslationContext(location=TranslationContextLocation.choice_name, data=self)\n            translation = await translator._checked_translate(self._locale_name, locale, context)\n            if translation is not None:\n                base['name'] = translation\n\n        return base\n\n    def to_dict(self) -> Dict[str, Any]:\n        base = {\n            'name': self.name,\n            'value': self.value,\n        }\n        if self.name_localizations:\n            base['name_localizations'] = {str(k): v for k, v in self.name_localizations.items()}\n        return base\n\n\nclass AppCommandChannel(Hashable):\n    \"\"\"Represents an application command partially resolved channel object.\n\n    .. versionadded:: 2.0\n\n    .. container:: operations\n\n        .. describe:: x == y\n\n            Checks if two channels are equal.\n\n        .. describe:: x != y\n\n            Checks if two channels are not equal.\n\n        .. describe:: hash(x)\n\n            Returns the channel's hash.\n\n        .. describe:: str(x)\n\n            Returns the channel's name.\n\n    Attributes\n    -----------\n    id: :class:`int`\n        The ID of the channel.\n    type: :class:`~discord.ChannelType`\n        The type of channel.\n    name: :class:`str`\n        The name of the channel.\n    permissions: :class:`~discord.Permissions`\n        The resolved permissions of the user who invoked\n        the application command in that channel.\n    guild_id: :class:`int`\n        The guild ID this channel belongs to.\n    \"\"\"\n\n    __slots__ = (\n        'id',\n        'type',\n        'name',\n        'permissions',\n        'guild_id',\n        '_state',\n    )\n\n    def __init__(\n        self,\n        *,\n        state: ConnectionState,\n        data: PartialChannel,\n        guild_id: int,\n    ):\n        self._state: ConnectionState = state\n        self.guild_id: int = guild_id\n        self.id: int = int(data['id'])\n        self.type: ChannelType = try_enum(ChannelType, data['type'])\n        self.name: str = data['name']\n        self.permissions: Permissions = Permissions(int(data['permissions']))\n\n    def __str__(self) -> str:\n        return self.name\n\n    def __repr__(self) -> str:\n        return f'<{self.__class__.__name__} id={self.id!r} name={self.name!r} type={self.type!r}>'\n\n    @property\n    def guild(self) -> Optional[Guild]:\n        \"\"\"Optional[:class:`~discord.Guild`]: The channel's guild, from cache, if found.\"\"\"\n        return self._state._get_guild(self.guild_id)\n\n    def resolve(self) -> Optional[GuildChannel]:\n        \"\"\"Resolves the application command channel to the appropriate channel\n        from cache if found.\n\n        Returns\n        --------\n        Optional[:class:`.abc.GuildChannel`]\n            The resolved guild channel or ``None`` if not found in cache.\n        \"\"\"\n        guild = self._state._get_guild(self.guild_id)\n        if guild is not None:\n            return guild.get_channel(self.id)\n        return None\n\n    async def fetch(self) -> GuildChannel:\n        \"\"\"|coro|\n\n        Fetches the partial channel to a full :class:`.abc.GuildChannel`.\n\n        Raises\n        --------\n        NotFound\n            The channel was not found.\n        Forbidden\n            You do not have the permissions required to get a channel.\n        HTTPException\n            Retrieving the channel failed.\n\n        Returns\n        --------\n        :class:`.abc.GuildChannel`\n            The full channel.\n        \"\"\"\n        client = self._state._get_client()\n        return await client.fetch_channel(self.id)  # type: ignore # This is explicit narrowing\n\n    @property\n    def mention(self) -> str:\n        \"\"\":class:`str`: The string that allows you to mention the channel.\"\"\"\n        return f'<#{self.id}>'\n\n    @property\n    def created_at(self) -> datetime:\n        \"\"\":class:`datetime.datetime`: An aware timestamp of when this channel was created in UTC.\"\"\"\n        return snowflake_time(self.id)\n\n\nclass AppCommandThread(Hashable):\n    \"\"\"Represents an application command partially resolved thread object.\n\n    .. versionadded:: 2.0\n\n    .. container:: operations\n\n        .. describe:: x == y\n\n            Checks if two thread are equal.\n\n        .. describe:: x != y\n\n            Checks if two thread are not equal.\n\n        .. describe:: hash(x)\n\n            Returns the thread's hash.\n\n        .. describe:: str(x)\n\n            Returns the thread's name.\n\n    Attributes\n    -----------\n    id: :class:`int`\n        The ID of the thread.\n    type: :class:`~discord.ChannelType`\n        The type of thread.\n    name: :class:`str`\n        The name of the thread.\n    parent_id: :class:`int`\n        The parent text channel ID this thread belongs to.\n    permissions: :class:`~discord.Permissions`\n        The resolved permissions of the user who invoked\n        the application command in that thread.\n    guild_id: :class:`int`\n        The guild ID this thread belongs to.\n    archived: :class:`bool`\n        Whether the thread is archived.\n    locked: :class:`bool`\n        Whether the thread is locked.\n    invitable: :class:`bool`\n        Whether non-moderators can add other non-moderators to this thread.\n        This is always ``True`` for public threads.\n    archiver_id: Optional[:class:`int`]\n        The user's ID that archived this thread.\n    auto_archive_duration: :class:`int`\n        The duration in minutes until the thread is automatically hidden from the channel list.\n        Usually a value of 60, 1440, 4320 and 10080.\n    archive_timestamp: :class:`datetime.datetime`\n        An aware timestamp of when the thread's archived status was last updated in UTC.\n    \"\"\"\n\n    __slots__ = (\n        'id',\n        'type',\n        'name',\n        'permissions',\n        'guild_id',\n        'parent_id',\n        'archived',\n        'archiver_id',\n        'auto_archive_duration',\n        'archive_timestamp',\n        'locked',\n        'invitable',\n        '_created_at',\n        '_state',\n    )\n\n    def __init__(\n        self,\n        *,\n        state: ConnectionState,\n        data: PartialThread,\n        guild_id: int,\n    ):\n        self._state: ConnectionState = state\n        self.guild_id: int = guild_id\n        self.id: int = int(data['id'])\n        self.parent_id: int = int(data['parent_id'])\n        self.type: ChannelType = try_enum(ChannelType, data['type'])\n        self.name: str = data['name']\n        self.permissions: Permissions = Permissions(int(data['permissions']))\n        self._unroll_metadata(data['thread_metadata'])\n\n    def __str__(self) -> str:\n        return self.name\n\n    def __repr__(self) -> str:\n        return f'<{self.__class__.__name__} id={self.id!r} name={self.name!r} archived={self.archived} type={self.type!r}>'\n\n    @property\n    def guild(self) -> Optional[Guild]:\n        \"\"\"Optional[:class:`~discord.Guild`]: The channel's guild, from cache, if found.\"\"\"\n        return self._state._get_guild(self.guild_id)\n\n    def _unroll_metadata(self, data: ThreadMetadata) -> None:\n        self.archived: bool = data['archived']\n        self.archiver_id: Optional[int] = _get_as_snowflake(data, 'archiver_id')\n        self.auto_archive_duration: ThreadArchiveDuration = data['auto_archive_duration']\n        self.archive_timestamp: datetime = parse_time(data['archive_timestamp'])\n        self.locked: bool = data.get('locked', False)\n        self.invitable: bool = data.get('invitable', True)\n        self._created_at: Optional[datetime] = parse_time(data.get('create_timestamp'))\n\n    @property\n    def parent(self) -> Optional[TextChannel]:\n        \"\"\"Optional[:class:`~discord.TextChannel`]: The parent channel this thread belongs to.\"\"\"\n        return self.guild.get_channel(self.parent_id)  # type: ignore\n\n    @property\n    def mention(self) -> str:\n        \"\"\":class:`str`: The string that allows you to mention the thread.\"\"\"\n        return f'<#{self.id}>'\n\n    @property\n    def created_at(self) -> Optional[datetime]:\n        \"\"\"An aware timestamp of when the thread was created in UTC.\n\n        .. note::\n\n            This timestamp only exists for threads created after 9 January 2022, otherwise returns ``None``.\n        \"\"\"\n        return self._created_at\n\n    def resolve(self) -> Optional[Thread]:\n        \"\"\"Resolves the application command channel to the appropriate channel\n        from cache if found.\n\n        Returns\n        --------\n        Optional[:class:`.abc.GuildChannel`]\n            The resolved guild channel or ``None`` if not found in cache.\n        \"\"\"\n        guild = self._state._get_guild(self.guild_id)\n        if guild is not None:\n            return guild.get_thread(self.id)\n        return None\n\n    async def fetch(self) -> Thread:\n        \"\"\"|coro|\n\n        Fetches the partial channel to a full :class:`~discord.Thread`.\n\n        Raises\n        --------\n        NotFound\n            The thread was not found.\n        Forbidden\n            You do not have the permissions required to get a thread.\n        HTTPException\n            Retrieving the thread failed.\n\n        Returns\n        --------\n        :class:`~discord.Thread`\n            The full thread.\n        \"\"\"\n        client = self._state._get_client()\n        return await client.fetch_channel(self.id)  # type: ignore # This is explicit narrowing\n\n\nclass Argument:\n    \"\"\"Represents an application command argument.\n\n    .. versionadded:: 2.0\n\n    Attributes\n    ------------\n    type: :class:`~discord.AppCommandOptionType`\n        The type of argument.\n    name: :class:`str`\n        The name of the argument.\n    description: :class:`str`\n        The description of the argument.\n    name_localizations: Dict[:class:`~discord.Locale`, :class:`str`]\n        The localised names of the argument. Used for display purposes.\n    description_localizations: Dict[:class:`~discord.Locale`, :class:`str`]\n        The localised descriptions of the argument. Used for display purposes.\n    required: :class:`bool`\n        Whether the argument is required.\n    choices: List[:class:`Choice`]\n        A list of choices for the command to choose from for this argument.\n    parent: Union[:class:`AppCommand`, :class:`AppCommandGroup`]\n        The parent application command that has this argument.\n    channel_types: List[:class:`~discord.ChannelType`]\n        The channel types that are allowed for this parameter.\n    min_value: Optional[Union[:class:`int`, :class:`float`]]\n        The minimum supported value for this parameter.\n    max_value: Optional[Union[:class:`int`, :class:`float`]]\n        The maximum supported value for this parameter.\n    min_length: Optional[:class:`int`]\n        The minimum allowed length for this parameter.\n    max_length: Optional[:class:`int`]\n        The maximum allowed length for this parameter.\n    autocomplete: :class:`bool`\n        Whether the argument has autocomplete.\n    \"\"\"\n\n    __slots__ = (\n        'type',\n        'name',\n        'description',\n        'name_localizations',\n        'description_localizations',\n        'required',\n        'choices',\n        'channel_types',\n        'min_value',\n        'max_value',\n        'min_length',\n        'max_length',\n        'autocomplete',\n        'parent',\n        '_state',\n    )\n\n    def __init__(\n        self, *, parent: ApplicationCommandParent, data: ApplicationCommandOption, state: Optional[ConnectionState] = None\n    ) -> None:\n        self._state: Optional[ConnectionState] = state\n        self.parent: ApplicationCommandParent = parent\n        self._from_data(data)\n\n    def __repr__(self) -> str:\n        return f'<{self.__class__.__name__} name={self.name!r} type={self.type!r} required={self.required}>'\n\n    def _from_data(self, data: ApplicationCommandOption) -> None:\n        self.type: AppCommandOptionType = try_enum(AppCommandOptionType, data['type'])\n        self.name: str = data['name']\n        self.description: str = data['description']\n        self.required: bool = data.get('required', False)\n        self.min_value: Optional[Union[int, float]] = data.get('min_value')\n        self.max_value: Optional[Union[int, float]] = data.get('max_value')\n        self.min_length: Optional[int] = data.get('min_length')\n        self.max_length: Optional[int] = data.get('max_length')\n        self.autocomplete: bool = data.get('autocomplete', False)\n        self.channel_types: List[ChannelType] = [try_enum(ChannelType, d) for d in data.get('channel_types', [])]\n        self.choices: List[Choice[Union[int, float, str]]] = [Choice.from_dict(d) for d in data.get('choices', [])]\n        self.name_localizations: Dict[Locale, str] = _to_locale_dict(data.get('name_localizations') or {})\n        self.description_localizations: Dict[Locale, str] = _to_locale_dict(data.get('description_localizations') or {})\n\n    def to_dict(self) -> ApplicationCommandOption:\n        return {\n            'name': self.name,\n            'type': self.type.value,\n            'description': self.description,\n            'required': self.required,\n            'choices': [choice.to_dict() for choice in self.choices],\n            'channel_types': [channel_type.value for channel_type in self.channel_types],\n            'min_value': self.min_value,\n            'max_value': self.max_value,\n            'min_length': self.min_length,\n            'max_length': self.max_length,\n            'autocomplete': self.autocomplete,\n            'options': [],\n            'name_localizations': {str(k): v for k, v in self.name_localizations.items()},\n            'description_localizations': {str(k): v for k, v in self.description_localizations.items()},\n        }  # type: ignore # Type checker does not understand this literal.\n\n\nclass AppCommandGroup:\n    \"\"\"Represents an application command subcommand.\n\n    .. versionadded:: 2.0\n\n    Attributes\n    ------------\n    type: :class:`~discord.AppCommandOptionType`\n        The type of subcommand.\n    name: :class:`str`\n        The name of the subcommand.\n    description: :class:`str`\n        The description of the subcommand.\n    name_localizations: Dict[:class:`~discord.Locale`, :class:`str`]\n        The localised names of the subcommand. Used for display purposes.\n    description_localizations: Dict[:class:`~discord.Locale`, :class:`str`]\n        The localised descriptions of the subcommand. Used for display purposes.\n    options: List[Union[:class:`Argument`, :class:`AppCommandGroup`]]\n        A list of options.\n    parent: Union[:class:`AppCommand`, :class:`AppCommandGroup`]\n        The parent application command.\n    \"\"\"\n\n    __slots__ = (\n        'type',\n        'name',\n        'description',\n        'name_localizations',\n        'description_localizations',\n        'options',\n        'parent',\n        '_state',\n    )\n\n    def __init__(\n        self, *, parent: ApplicationCommandParent, data: ApplicationCommandOption, state: Optional[ConnectionState] = None\n    ) -> None:\n        self.parent: ApplicationCommandParent = parent\n        self._state: Optional[ConnectionState] = state\n        self._from_data(data)\n\n    def __repr__(self) -> str:\n        return f'<{self.__class__.__name__} name={self.name!r} type={self.type!r}>'\n\n    @property\n    def qualified_name(self) -> str:\n        \"\"\":class:`str`: Returns the fully qualified command name.\n\n        The qualified name includes the parent name as well. For example,\n        in a command like ``/foo bar`` the qualified name is ``foo bar``.\n        \"\"\"\n        # A B C\n        #     ^ self\n        #   ^ parent\n        # ^ grandparent\n        names = [self.name, self.parent.name]\n        if isinstance(self.parent, AppCommandGroup):\n            names.append(self.parent.parent.name)\n\n        return ' '.join(reversed(names))\n\n    @property\n    def mention(self) -> str:\n        \"\"\":class:`str`: Returns a string that allows you to mention the given AppCommandGroup.\"\"\"\n        if isinstance(self.parent, AppCommand):\n            base_command = self.parent\n        else:\n            base_command = self.parent.parent\n        return f'</{self.qualified_name}:{base_command.id}>'  # type: ignore\n\n    def _from_data(self, data: ApplicationCommandOption) -> None:\n        self.type: AppCommandOptionType = try_enum(AppCommandOptionType, data['type'])\n        self.name: str = data['name']\n        self.description: str = data['description']\n        self.options: List[Union[Argument, AppCommandGroup]] = [\n            app_command_option_factory(data=d, parent=self, state=self._state) for d in data.get('options', [])\n        ]\n        self.name_localizations: Dict[Locale, str] = _to_locale_dict(data.get('name_localizations') or {})\n        self.description_localizations: Dict[Locale, str] = _to_locale_dict(data.get('description_localizations') or {})\n\n    def to_dict(self) -> 'ApplicationCommandOption':\n        return {\n            'name': self.name,\n            'type': self.type.value,\n            'description': self.description,\n            'options': [arg.to_dict() for arg in self.options],\n            'name_localizations': {str(k): v for k, v in self.name_localizations.items()},\n            'description_localizations': {str(k): v for k, v in self.description_localizations.items()},\n        }  # type: ignore # Type checker does not understand this literal.\n\n\nclass AppCommandPermissions:\n    \"\"\"Represents the permissions for an application command.\n\n    .. versionadded:: 2.0\n\n    Attributes\n    -----------\n    guild: :class:`~discord.Guild`\n        The guild associated with this permission.\n    id: :class:`int`\n        The ID of the permission target, such as a role, channel, or guild.\n        The special ``guild_id - 1`` sentinel is used to represent \"all channels\".\n    target: Any\n        The role, user, or channel associated with this permission. This could also be the :class:`AllChannels` sentinel type.\n        Falls back to :class:`~discord.Object` if the target could not be found in the cache.\n    type: :class:`.AppCommandPermissionType`\n        The type of permission.\n    permission: :class:`bool`\n        The permission value. ``True`` for allow, ``False`` for deny.\n    \"\"\"\n\n    __slots__ = ('id', 'type', 'permission', 'target', 'guild', '_state')\n\n    def __init__(self, *, data: ApplicationCommandPermissions, guild: Guild, state: ConnectionState) -> None:\n        self._state: ConnectionState = state\n        self.guild: Guild = guild\n\n        self.id: int = int(data['id'])\n        self.type: AppCommandPermissionType = try_enum(AppCommandPermissionType, data['type'])\n        self.permission: bool = data['permission']\n\n        _object = None\n        _type = MISSING\n\n        if self.type is AppCommandPermissionType.user:\n            _object = guild.get_member(self.id) or self._state.get_user(self.id)\n            _type = Member\n        elif self.type is AppCommandPermissionType.channel:\n            if self.id == (guild.id - 1):\n                _object = AllChannels(guild)\n            else:\n                _object = guild.get_channel(self.id)\n        elif self.type is AppCommandPermissionType.role:\n            _object = guild.get_role(self.id)\n            _type = Role\n\n        if _object is None:\n            _object = Object(id=self.id, type=_type)\n\n        self.target: Union[Object, User, Member, Role, AllChannels, GuildChannel] = _object\n\n    def to_dict(self) -> ApplicationCommandPermissions:\n        return {\n            'id': self.target.id,\n            'type': self.type.value,\n            'permission': self.permission,\n        }\n\n\nclass GuildAppCommandPermissions:\n    \"\"\"Represents the permissions for an application command in a guild.\n\n    .. versionadded:: 2.0\n\n    Attributes\n    -----------\n    application_id: :class:`int`\n        The application ID.\n    command: :class:`.AppCommand`\n        The application command associated with the permissions.\n    id: :class:`int`\n        ID of the command or the application ID.\n        When this is the application ID instead of a command ID,\n        the permissions apply to all commands that do not contain explicit overwrites.\n    guild_id: :class:`int`\n        The guild ID associated with the permissions.\n    permissions: List[:class:`AppCommandPermissions`]\n       The permissions, this is a max of 100.\n    \"\"\"\n\n    __slots__ = ('id', 'application_id', 'command', 'guild_id', 'permissions', '_state')\n\n    def __init__(self, *, data: GuildApplicationCommandPermissions, state: ConnectionState, command: AppCommand) -> None:\n        self._state: ConnectionState = state\n        self.command: AppCommand = command\n\n        self.id: int = int(data['id'])\n        self.application_id: int = int(data['application_id'])\n        self.guild_id: int = int(data['guild_id'])\n        guild = self.guild\n        self.permissions: List[AppCommandPermissions] = [\n            AppCommandPermissions(data=value, guild=guild, state=self._state) for value in data['permissions']\n        ]\n\n    def to_dict(self) -> Dict[str, Any]:\n        return {'permissions': [p.to_dict() for p in self.permissions]}\n\n    @property\n    def guild(self) -> Guild:\n        \"\"\":class:`~discord.Guild`: The guild associated with the permissions.\"\"\"\n        return self._state._get_or_create_unavailable_guild(self.guild_id)\n\n\ndef app_command_option_factory(\n    parent: ApplicationCommandParent, data: ApplicationCommandOption, *, state: Optional[ConnectionState] = None\n) -> Union[Argument, AppCommandGroup]:\n    if is_app_command_argument_type(data['type']):\n        return Argument(parent=parent, data=data, state=state)\n    else:\n        return AppCommandGroup(parent=parent, data=data, state=state)\n"
  },
  {
    "path": "discord/app_commands/namespace.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom __future__ import annotations\n\nfrom typing import TYPE_CHECKING, Any, Dict, Iterable, Iterator, List, NamedTuple, Tuple\nfrom ..member import Member\nfrom ..object import Object\nfrom ..role import Role\nfrom ..message import Message, Attachment\nfrom ..channel import PartialMessageable\nfrom ..enums import AppCommandOptionType\nfrom .models import AppCommandChannel, AppCommandThread\n\nif TYPE_CHECKING:\n    from ..interactions import Interaction\n    from ..types.interactions import ResolvedData, ApplicationCommandInteractionDataOption\n\n__all__ = ('Namespace',)\n\n\nclass ResolveKey(NamedTuple):\n    id: str\n    # CommandOptionType does not use 0 or negative numbers so those can be safe for library\n    # internal use, if necessary. Likewise, only 6, 7, 8, and 11 are actually in use.\n    type: int\n\n    @classmethod\n    def any_with(cls, id: str) -> ResolveKey:\n        return ResolveKey(id=id, type=-1)\n\n    def __eq__(self, o: object) -> bool:\n        if not isinstance(o, ResolveKey):\n            return NotImplemented\n        if self.type == -1 or o.type == -1:\n            return self.id == o.id\n        return (self.id, self.type) == (o.id, o.type)\n\n    def __hash__(self) -> int:\n        # Most of the time an ID lookup is all that is necessary\n        # In case of collision then we look up both the ID and the type.\n        return hash(self.id)\n\n\nclass Namespace:\n    \"\"\"An object that holds the parameters being passed to a command in a mostly raw state.\n\n    This class is deliberately simple and just holds the option name and resolved value as a simple\n    key-pair mapping. These attributes can be accessed using dot notation. For example, an option\n    with the name of ``example`` can be accessed using ``ns.example``. If an attribute is not found,\n    then ``None`` is returned rather than an attribute error.\n\n    .. warning::\n\n        The key names come from the raw Discord data, which means that if a parameter was renamed then the\n        renamed key is used instead of the function parameter name.\n\n    .. versionadded:: 2.0\n\n    .. container:: operations\n\n        .. describe:: x == y\n\n            Checks if two namespaces are equal by checking if all attributes are equal.\n        .. describe:: x != y\n\n            Checks if two namespaces are not equal.\n        .. describe:: x[key]\n\n            Returns an attribute if it is found, otherwise raises\n            a :exc:`KeyError`.\n        .. describe:: key in x\n\n            Checks if the attribute is in the namespace.\n        .. describe:: iter(x)\n\n           Returns an iterator of ``(name, value)`` pairs. This allows it\n           to be, for example, constructed as a dict or a list of pairs.\n\n    This namespace object converts resolved objects into their appropriate form depending on their\n    type. Consult the table below for conversion information.\n\n    +-------------------------------------------+-------------------------------------------------------------------------------+\n    |                Option Type                |                                 Resolved Type                                 |\n    +===========================================+===============================================================================+\n    | :attr:`.AppCommandOptionType.string`      | :class:`str`                                                                  |\n    +-------------------------------------------+-------------------------------------------------------------------------------+\n    | :attr:`.AppCommandOptionType.integer`     | :class:`int`                                                                  |\n    +-------------------------------------------+-------------------------------------------------------------------------------+\n    | :attr:`.AppCommandOptionType.boolean`     | :class:`bool`                                                                 |\n    +-------------------------------------------+-------------------------------------------------------------------------------+\n    | :attr:`.AppCommandOptionType.number`      | :class:`float`                                                                |\n    +-------------------------------------------+-------------------------------------------------------------------------------+\n    | :attr:`.AppCommandOptionType.user`        | :class:`~discord.User` or :class:`~discord.Member`                            |\n    +-------------------------------------------+-------------------------------------------------------------------------------+\n    | :attr:`.AppCommandOptionType.channel`     | :class:`.AppCommandChannel` or :class:`.AppCommandThread`                     |\n    +-------------------------------------------+-------------------------------------------------------------------------------+\n    | :attr:`.AppCommandOptionType.role`        | :class:`~discord.Role`                                                        |\n    +-------------------------------------------+-------------------------------------------------------------------------------+\n    | :attr:`.AppCommandOptionType.mentionable` | :class:`~discord.User` or :class:`~discord.Member`, or :class:`~discord.Role` |\n    +-------------------------------------------+-------------------------------------------------------------------------------+\n    | :attr:`.AppCommandOptionType.attachment`  | :class:`~discord.Attachment`                                                  |\n    +-------------------------------------------+-------------------------------------------------------------------------------+\n\n    .. note::\n\n        In autocomplete interactions, the namespace might not be validated or filled in. Discord does not\n        send the resolved data as well, so this means that certain fields end up just as IDs rather than\n        the resolved data. In these cases, a :class:`discord.Object` is returned instead.\n\n        This is a Discord limitation.\n    \"\"\"\n\n    def __init__(\n        self,\n        interaction: Interaction,\n        resolved: ResolvedData,\n        options: List[ApplicationCommandInteractionDataOption],\n    ):\n        completed = self._get_resolved_items(interaction, resolved)\n        for option in options:\n            opt_type = option['type']\n            name = option['name']\n            focused = option.get('focused', False)\n            if opt_type in (3, 4, 5):  # string, integer, boolean\n                value = option['value']  # type: ignore # Key is there\n                self.__dict__[name] = value\n            elif opt_type == 10:  # number\n                value = option['value']  # type: ignore # Key is there\n                # This condition is written this way because 0 can be a valid float\n                if value is None or value == '':\n                    self.__dict__[name] = float('nan')\n                else:\n                    if not focused:\n                        self.__dict__[name] = float(value)\n                    else:\n                        # Autocomplete focused values tend to be garbage in\n                        self.__dict__[name] = value\n            elif opt_type in (6, 7, 8, 9, 11):\n                # Remaining ones should be snowflake based ones with resolved data\n                snowflake: str = option['value']  # type: ignore # Key is there\n                if opt_type == 9:  # Mentionable\n                    # Mentionable is User | Role, these do not cause any conflict\n                    key = ResolveKey.any_with(snowflake)\n                else:\n                    # The remaining keys can conflict, for example, a role and a channel\n                    # could end up with the same ID in very old guilds since they used to default\n                    # to sharing the guild ID. Old general channels no longer exist, but some old\n                    # servers will still have them so this needs to be handled.\n                    key = ResolveKey(id=snowflake, type=opt_type)\n\n                value = completed.get(key) or Object(id=int(snowflake))\n                self.__dict__[name] = value\n\n    @classmethod\n    def _get_resolved_items(cls, interaction: Interaction, resolved: ResolvedData) -> Dict[ResolveKey, Any]:\n        completed: Dict[ResolveKey, Any] = {}\n        state = interaction._state\n        members = resolved.get('members', {})\n        guild_id = interaction.guild_id\n        guild = interaction.guild\n        type = AppCommandOptionType.user.value\n        for (user_id, user_data) in resolved.get('users', {}).items():\n            try:\n                member_data = members[user_id]\n            except KeyError:\n                completed[ResolveKey(id=user_id, type=type)] = state.create_user(user_data)\n            else:\n                member_data['user'] = user_data\n                # Guild ID can't be None in this case.\n                # There's a type mismatch here that I don't actually care about\n                member = Member(state=state, guild=guild, data=member_data)  # type: ignore\n                completed[ResolveKey(id=user_id, type=type)] = member\n\n        type = AppCommandOptionType.role.value\n        completed.update(\n            {\n                # The guild ID can't be None in this case.\n                ResolveKey(id=role_id, type=type): Role(guild=guild, state=state, data=role_data)  # type: ignore\n                for role_id, role_data in resolved.get('roles', {}).items()\n            }\n        )\n\n        type = AppCommandOptionType.channel.value\n        for (channel_id, channel_data) in resolved.get('channels', {}).items():\n            key = ResolveKey(id=channel_id, type=type)\n            if channel_data['type'] in (10, 11, 12):\n                # The guild ID can't be none in this case\n                completed[key] = AppCommandThread(state=state, data=channel_data, guild_id=guild_id)  # type: ignore\n            else:\n                # The guild ID can't be none in this case\n                completed[key] = AppCommandChannel(state=state, data=channel_data, guild_id=guild_id)  # type: ignore\n\n        type = AppCommandOptionType.attachment.value\n        completed.update(\n            {\n                ResolveKey(id=attachment_id, type=type): Attachment(data=attachment_data, state=state)\n                for attachment_id, attachment_data in resolved.get('attachments', {}).items()\n            }\n        )\n\n        for (message_id, message_data) in resolved.get('messages', {}).items():\n            channel_id = int(message_data['channel_id'])\n            if guild is None:\n                channel = PartialMessageable(state=state, guild_id=guild_id, id=channel_id)\n            else:\n                channel = guild.get_channel_or_thread(channel_id) or PartialMessageable(\n                    state=state, guild_id=guild_id, id=channel_id\n                )\n\n            # Type checker doesn't understand this due to failure to narrow\n            message = Message(state=state, channel=channel, data=message_data)  # type: ignore\n            message.guild = guild\n            key = ResolveKey(id=message_id, type=-1)\n            completed[key] = message\n\n        return completed\n\n    def __repr__(self) -> str:\n        items = (f'{k}={v!r}' for k, v in self.__dict__.items())\n        return '<{} {}>'.format(self.__class__.__name__, ' '.join(items))\n\n    def __eq__(self, other: object) -> bool:\n        if isinstance(self, Namespace) and isinstance(other, Namespace):\n            return self.__dict__ == other.__dict__\n        return NotImplemented\n\n    def __getitem__(self, key: str) -> Any:\n        return self.__dict__[key]\n\n    def __contains__(self, key: str) -> Any:\n        return key in self.__dict__\n\n    def __getattr__(self, attr: str) -> Any:\n        return None\n\n    def __iter__(self) -> Iterator[Tuple[str, Any]]:\n        yield from self.__dict__.items()\n\n    def _update_with_defaults(self, defaults: Iterable[Tuple[str, Any]]) -> None:\n        for key, value in defaults:\n            self.__dict__.setdefault(key, value)\n"
  },
  {
    "path": "discord/app_commands/transformers.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom __future__ import annotations\nimport inspect\n\nfrom dataclasses import dataclass\nfrom enum import Enum\nfrom typing import (\n    TYPE_CHECKING,\n    Any,\n    Callable,\n    ClassVar,\n    Coroutine,\n    Dict,\n    List,\n    Literal,\n    Optional,\n    Set,\n    Tuple,\n    Type,\n    TypeVar,\n    Union,\n)\n\nfrom .errors import AppCommandError, TransformerError\nfrom .models import AppCommandChannel, AppCommandThread, Choice\nfrom .translator import TranslationContextLocation, TranslationContext, Translator, locale_str\nfrom ..channel import StageChannel, VoiceChannel, TextChannel, CategoryChannel, ForumChannel\nfrom ..abc import GuildChannel\nfrom ..threads import Thread\nfrom ..enums import Enum as InternalEnum, AppCommandOptionType, ChannelType, Locale\nfrom ..utils import MISSING, maybe_coroutine\nfrom ..user import User\nfrom ..role import Role\nfrom ..member import Member\nfrom ..message import Attachment\n\n__all__ = (\n    'Transformer',\n    'Transform',\n    'Range',\n)\n\nT = TypeVar('T')\nFuncT = TypeVar('FuncT', bound=Callable[..., Any])\nChoiceT = TypeVar('ChoiceT', str, int, float, Union[str, int, float])\nNoneType = type(None)\n\nif TYPE_CHECKING:\n    from ..interactions import Interaction\n    from .commands import Parameter\n\n\n@dataclass\nclass CommandParameter:\n    # The name of the parameter is *always* the parameter name in the code\n    # Therefore, it can't be Union[str, locale_str]\n    name: str = MISSING\n    description: Union[str, locale_str] = MISSING\n    required: bool = MISSING\n    default: Any = MISSING\n    choices: List[Choice[Union[str, int, float]]] = MISSING\n    type: AppCommandOptionType = MISSING\n    channel_types: List[ChannelType] = MISSING\n    min_value: Optional[Union[int, float]] = None\n    max_value: Optional[Union[int, float]] = None\n    autocomplete: Optional[Callable[..., Coroutine[Any, Any, Any]]] = None\n    _rename: Union[str, locale_str] = MISSING\n    _annotation: Any = MISSING\n\n    async def get_translated_payload(self, translator: Translator, data: Parameter) -> Dict[str, Any]:\n        base = self.to_dict()\n\n        rename = self._rename\n        description = self.description\n        needs_name_translations = isinstance(rename, locale_str)\n        needs_description_translations = isinstance(description, locale_str)\n        name_localizations: Dict[str, str] = {}\n        description_localizations: Dict[str, str] = {}\n\n        # Prevent creating these objects in a heavy loop\n        name_context = TranslationContext(location=TranslationContextLocation.parameter_name, data=data)\n        description_context = TranslationContext(location=TranslationContextLocation.parameter_description, data=data)\n        for locale in Locale:\n            if needs_name_translations:\n                translation = await translator._checked_translate(rename, locale, name_context)\n                if translation is not None:\n                    name_localizations[locale.value] = translation\n\n            if needs_description_translations:\n                translation = await translator._checked_translate(description, locale, description_context)\n                if translation is not None:\n                    description_localizations[locale.value] = translation\n\n        if self.choices:\n            base['choices'] = [await choice.get_translated_payload(translator) for choice in self.choices]\n\n        if name_localizations:\n            base['name_localizations'] = name_localizations\n\n        if description_localizations:\n            base['description_localizations'] = description_localizations\n\n        return base\n\n    def to_dict(self) -> Dict[str, Any]:\n        base = {\n            'type': self.type.value,\n            'name': self.display_name,\n            'description': str(self.description),\n            'required': self.required,\n        }\n\n        if self.choices:\n            base['choices'] = [choice.to_dict() for choice in self.choices]\n        if self.channel_types:\n            base['channel_types'] = [t.value for t in self.channel_types]\n        if self.autocomplete:\n            base['autocomplete'] = True\n\n        min_key, max_key = (\n            ('min_value', 'max_value') if self.type is not AppCommandOptionType.string else ('min_length', 'max_length')\n        )\n        if self.min_value is not None:\n            base[min_key] = self.min_value\n        if self.max_value is not None:\n            base[max_key] = self.max_value\n\n        return base\n\n    def _convert_to_locale_strings(self) -> None:\n        if self._rename is MISSING:\n            self._rename = locale_str(self.name)\n        elif isinstance(self._rename, str):\n            self._rename = locale_str(self._rename)\n\n        if isinstance(self.description, str):\n            self.description = locale_str(self.description)\n\n        if self.choices:\n            for choice in self.choices:\n                if choice._locale_name is None:\n                    choice._locale_name = locale_str(choice.name)\n\n    def is_choice_annotation(self) -> bool:\n        return getattr(self._annotation, '__discord_app_commands_is_choice__', False)\n\n    async def transform(self, interaction: Interaction, value: Any, /) -> Any:\n        if hasattr(self._annotation, '__discord_app_commands_transformer__'):\n            # This one needs special handling for type safety reasons\n            if self._annotation.__discord_app_commands_is_choice__:\n                choice = next((c for c in self.choices if c.value == value), None)\n                if choice is None:\n                    raise TransformerError(value, self.type, self._annotation)\n                return choice\n\n            try:\n                return await maybe_coroutine(self._annotation.transform, interaction, value)\n            except AppCommandError:\n                raise\n            except Exception as e:\n                raise TransformerError(value, self.type, self._annotation) from e\n\n        return value\n\n    @property\n    def display_name(self) -> str:\n        \"\"\":class:`str`: The name of the parameter as it should be displayed to the user.\"\"\"\n        return self.name if self._rename is MISSING else str(self._rename)\n\n\nclass Transformer:\n    \"\"\"The base class that allows a type annotation in an application command parameter\n    to map into a :class:`~discord.AppCommandOptionType` and transform the raw value into one\n    from this type.\n\n    This class is customisable through the overriding of methods and properties in the class\n    and by using it as the second type parameter of the :class:`~discord.app_commands.Transform`\n    class. For example, to convert a string into a custom pair type:\n\n    .. code-block:: python3\n\n        class Point(typing.NamedTuple):\n            x: int\n            y: int\n\n        class PointTransformer(app_commands.Transformer):\n            async def transform(self, interaction: discord.Interaction, value: str) -> Point:\n                (x, _, y) = value.partition(',')\n                return Point(x=int(x.strip()), y=int(y.strip()))\n\n        @app_commands.command()\n        async def graph(\n            interaction: discord.Interaction,\n            point: app_commands.Transform[Point, PointTransformer],\n        ):\n            await interaction.response.send_message(str(point))\n\n    If a class is passed instead of an instance to the second type parameter, then it is\n    constructed with no arguments passed to the ``__init__`` method.\n\n    .. versionadded:: 2.0\n    \"\"\"\n\n    __discord_app_commands_transformer__: ClassVar[bool] = True\n    __discord_app_commands_is_choice__: ClassVar[bool] = False\n\n    # This is needed to pass typing's type checks.\n    # e.g. Optional[MyTransformer]\n    def __call__(self) -> None:\n        pass\n\n    def __or__(self, rhs: Any) -> Any:\n        return Union[self, rhs]  # type: ignore\n\n    @property\n    def type(self) -> AppCommandOptionType:\n        \"\"\":class:`~discord.AppCommandOptionType`: The option type associated with this transformer.\n\n        This must be a :obj:`property`.\n\n        Defaults to :attr:`~discord.AppCommandOptionType.string`.\n        \"\"\"\n        return AppCommandOptionType.string\n\n    @property\n    def channel_types(self) -> List[ChannelType]:\n        \"\"\"List[:class:`~discord.ChannelType`]: A list of channel types that are allowed to this parameter.\n\n        Only valid if the :meth:`type` returns :attr:`~discord.AppCommandOptionType.channel`.\n\n        This must be a :obj:`property`.\n\n        Defaults to an empty list.\n        \"\"\"\n        return []\n\n    @property\n    def min_value(self) -> Optional[Union[int, float]]:\n        \"\"\"Optional[:class:`int`]: The minimum supported value for this parameter.\n\n        Only valid if the :meth:`type` returns :attr:`~discord.AppCommandOptionType.number`\n        :attr:`~discord.AppCommandOptionType.integer`, or :attr:`~discord.AppCommandOptionType.string`.\n\n        This must be a :obj:`property`.\n\n        Defaults to ``None``.\n        \"\"\"\n        return None\n\n    @property\n    def max_value(self) -> Optional[Union[int, float]]:\n        \"\"\"Optional[:class:`int`]: The maximum supported value for this parameter.\n\n        Only valid if the :meth:`type` returns :attr:`~discord.AppCommandOptionType.number`\n        :attr:`~discord.AppCommandOptionType.integer`, or :attr:`~discord.AppCommandOptionType.string`.\n\n        This must be a :obj:`property`.\n\n        Defaults to ``None``.\n        \"\"\"\n        return None\n\n    @property\n    def choices(self) -> Optional[List[Choice[Union[int, float, str]]]]:\n        \"\"\"Optional[List[:class:`~discord.app_commands.Choice`]]: A list of up to 25 choices that are allowed to this parameter.\n\n        Only valid if the :meth:`type` returns :attr:`~discord.AppCommandOptionType.number`\n        :attr:`~discord.AppCommandOptionType.integer`, or :attr:`~discord.AppCommandOptionType.string`.\n\n        This must be a :obj:`property`.\n\n        Defaults to ``None``.\n        \"\"\"\n        return None\n\n    @property\n    def _error_display_name(self) -> str:\n        name = self.__class__.__name__\n        if name.endswith('Transformer'):\n            return name[:-11]\n        else:\n            return name\n\n    async def transform(self, interaction: Interaction, value: Any, /) -> Any:\n        \"\"\"|maybecoro|\n\n        Transforms the converted option value into another value.\n\n        The value passed into this transform function is the same as the\n        one in the :class:`conversion table <discord.app_commands.Namespace>`.\n\n        Parameters\n        -----------\n        interaction: :class:`~discord.Interaction`\n            The interaction being handled.\n        value: Any\n            The value of the given argument after being resolved.\n            See the :class:`conversion table <discord.app_commands.Namespace>`\n            for how certain option types correspond to certain values.\n        \"\"\"\n        raise NotImplementedError('Derived classes need to implement this.')\n\n    async def autocomplete(\n        self, interaction: Interaction, value: Union[int, float, str], /\n    ) -> List[Choice[Union[int, float, str]]]:\n        \"\"\"|coro|\n\n        An autocomplete prompt handler to be automatically used by options using this transformer.\n\n        .. note::\n\n            Autocomplete is only supported for options with a :meth:`~discord.app_commands.Transformer.type`\n            of :attr:`~discord.AppCommandOptionType.string`, :attr:`~discord.AppCommandOptionType.integer`,\n            or :attr:`~discord.AppCommandOptionType.number`.\n\n        Parameters\n        -----------\n        interaction: :class:`~discord.Interaction`\n            The autocomplete interaction being handled.\n        value: Union[:class:`str`, :class:`int`, :class:`float`]\n            The current value entered by the user.\n\n        Returns\n        --------\n        List[:class:`~discord.app_commands.Choice`]\n            A list of choices to be displayed to the user, a maximum of 25.\n\n        \"\"\"\n        raise NotImplementedError('Derived classes can implement this.')\n\n\nclass IdentityTransformer(Transformer):\n    def __init__(self, type: AppCommandOptionType) -> None:\n        self._type = type\n\n    @property\n    def type(self) -> AppCommandOptionType:\n        return self._type\n\n    async def transform(self, interaction: Interaction, value: Any, /) -> Any:\n        return value\n\n\nclass RangeTransformer(IdentityTransformer):\n    def __init__(\n        self,\n        opt_type: AppCommandOptionType,\n        *,\n        min: Optional[Union[int, float]] = None,\n        max: Optional[Union[int, float]] = None,\n    ) -> None:\n        if min and max and min > max:\n            raise TypeError('minimum cannot be larger than maximum')\n\n        self._min: Optional[Union[int, float]] = min\n        self._max: Optional[Union[int, float]] = max\n        super().__init__(opt_type)\n\n    @property\n    def min_value(self) -> Optional[Union[int, float]]:\n        return self._min\n\n    @property\n    def max_value(self) -> Optional[Union[int, float]]:\n        return self._max\n\n\nclass LiteralTransformer(IdentityTransformer):\n    def __init__(self, values: Tuple[Any, ...]) -> None:\n        first = type(values[0])\n        if first is int:\n            opt_type = AppCommandOptionType.integer\n        elif first is float:\n            opt_type = AppCommandOptionType.number\n        elif first is str:\n            opt_type = AppCommandOptionType.string\n        else:\n            raise TypeError(f'expected int, str, or float values not {first!r}')\n\n        self._choices = [Choice(name=str(v), value=v) for v in values]\n        super().__init__(opt_type)\n\n    @property\n    def choices(self):\n        return self._choices\n\n\nclass ChoiceTransformer(IdentityTransformer):\n    __discord_app_commands_is_choice__: ClassVar[bool] = True\n\n    def __init__(self, inner_type: Any) -> None:\n        if inner_type is int:\n            opt_type = AppCommandOptionType.integer\n        elif inner_type is float:\n            opt_type = AppCommandOptionType.number\n        elif inner_type is str:\n            opt_type = AppCommandOptionType.string\n        else:\n            raise TypeError(f'expected int, str, or float values not {inner_type!r}')\n\n        super().__init__(opt_type)\n\n\nclass EnumValueTransformer(Transformer):\n    def __init__(self, enum: Any) -> None:\n        super().__init__()\n\n        values = list(enum)\n        if len(values) < 2:\n            raise TypeError('enum.Enum requires at least two values.')\n\n        first = type(values[0].value)\n        if first is int:\n            opt_type = AppCommandOptionType.integer\n        elif first is float:\n            opt_type = AppCommandOptionType.number\n        elif first is str:\n            opt_type = AppCommandOptionType.string\n        else:\n            raise TypeError(f'expected int, str, or float values not {first!r}')\n\n        self._type: AppCommandOptionType = opt_type\n        self._enum: Any = enum\n        self._choices = [Choice(name=v.name, value=v.value) for v in values]\n\n    @property\n    def _error_display_name(self) -> str:\n        return self._enum.__name__\n\n    @property\n    def type(self) -> AppCommandOptionType:\n        return self._type\n\n    @property\n    def choices(self):\n        return self._choices\n\n    async def transform(self, interaction: Interaction, value: Any, /) -> Any:\n        return self._enum(value)\n\n\nclass EnumNameTransformer(Transformer):\n    def __init__(self, enum: Any) -> None:\n        super().__init__()\n\n        values = list(enum)\n        if len(values) < 2:\n            raise TypeError('enum.Enum requires at least two values.')\n\n        self._enum: Any = enum\n        self._choices = [Choice(name=v.name, value=v.name) for v in values]\n\n    @property\n    def _error_display_name(self) -> str:\n        return self._enum.__name__\n\n    @property\n    def type(self) -> AppCommandOptionType:\n        return AppCommandOptionType.string\n\n    @property\n    def choices(self):\n        return self._choices\n\n    async def transform(self, interaction: Interaction, value: Any, /) -> Any:\n        return self._enum[value]\n\n\nclass InlineTransformer(Transformer):\n    def __init__(self, annotation: Any) -> None:\n        super().__init__()\n        self.annotation: Any = annotation\n\n    @property\n    def _error_display_name(self) -> str:\n        return self.annotation.__name__\n\n    @property\n    def type(self) -> AppCommandOptionType:\n        return AppCommandOptionType.string\n\n    async def transform(self, interaction: Interaction, value: Any, /) -> Any:\n        return await self.annotation.transform(interaction, value)\n\n\nif TYPE_CHECKING:\n    from typing_extensions import Annotated as Transform\n    from typing_extensions import Annotated as Range\nelse:\n\n    class Transform:\n        \"\"\"A type annotation that can be applied to a parameter to customise the behaviour of\n        an option type by transforming with the given :class:`Transformer`. This requires\n        the usage of two generic parameters, the first one is the type you're converting to and the second\n        one is the type of the :class:`Transformer` actually doing the transformation.\n\n        During type checking time this is equivalent to :obj:`typing.Annotated` so type checkers understand\n        the intent of the code.\n\n        For example usage, check :class:`Transformer`.\n\n        .. versionadded:: 2.0\n        \"\"\"\n\n        def __class_getitem__(cls, items) -> Transformer:\n            if not isinstance(items, tuple):\n                raise TypeError(f'expected tuple for arguments, received {items.__class__.__name__} instead')\n\n            if len(items) != 2:\n                raise TypeError('Transform only accepts exactly two arguments')\n\n            _, transformer = items\n\n            if inspect.isclass(transformer):\n                if not issubclass(transformer, Transformer):\n                    raise TypeError(f'second argument of Transform must be a Transformer class not {transformer!r}')\n                transformer = transformer()\n            elif not isinstance(transformer, Transformer):\n                raise TypeError(f'second argument of Transform must be a Transformer not {transformer.__class__.__name__}')\n\n            return transformer\n\n    class Range:\n        \"\"\"A type annotation that can be applied to a parameter to require a numeric or string\n        type to fit within the range provided.\n\n        During type checking time this is equivalent to :obj:`typing.Annotated` so type checkers understand\n        the intent of the code.\n\n        Some example ranges:\n\n        - ``Range[int, 10]`` means the minimum is 10 with no maximum.\n        - ``Range[int, None, 10]`` means the maximum is 10 with no minimum.\n        - ``Range[int, 1, 10]`` means the minimum is 1 and the maximum is 10.\n        - ``Range[float, 1.0, 5.0]`` means the minimum is 1.0 and the maximum is 5.0.\n        - ``Range[str, 1, 10]`` means the minimum length is 1 and the maximum length is 10.\n\n        .. versionadded:: 2.0\n\n        Examples\n        ----------\n\n        .. code-block:: python3\n\n            @app_commands.command()\n            async def range(interaction: discord.Interaction, value: app_commands.Range[int, 10, 12]):\n                await interaction.response.send_message(f'Your value is {value}', ephemeral=True)\n        \"\"\"\n\n        def __class_getitem__(cls, obj) -> RangeTransformer:\n            if not isinstance(obj, tuple):\n                raise TypeError(f'expected tuple for arguments, received {obj.__class__.__name__} instead')\n\n            if len(obj) == 2:\n                obj = (*obj, None)\n            elif len(obj) != 3:\n                raise TypeError('Range accepts either two or three arguments with the first being the type of range.')\n\n            obj_type, min, max = obj\n\n            if min is None and max is None:\n                raise TypeError('Range must not be empty')\n\n            if min is not None and max is not None:\n                # At this point max and min are both not none\n                if type(min) != type(max):\n                    raise TypeError('Both min and max in Range must be the same type')\n\n            if obj_type is int:\n                opt_type = AppCommandOptionType.integer\n            elif obj_type is float:\n                opt_type = AppCommandOptionType.number\n            elif obj_type is str:\n                opt_type = AppCommandOptionType.string\n            else:\n                raise TypeError(f'expected int, float, or str as range type, received {obj_type!r} instead')\n\n            if obj_type in (str, int):\n                cast = int\n            else:\n                cast = float\n\n            transformer = RangeTransformer(\n                opt_type,\n                min=cast(min) if min is not None else None,\n                max=cast(max) if max is not None else None,\n            )\n            return transformer\n\n\nclass MemberTransformer(Transformer):\n    @property\n    def type(self) -> AppCommandOptionType:\n        return AppCommandOptionType.user\n\n    async def transform(self, interaction: Interaction, value: Any, /) -> Member:\n        if not isinstance(value, Member):\n            raise TransformerError(value, self.type, self)\n        return value\n\n\nclass BaseChannelTransformer(Transformer):\n    def __init__(self, *channel_types: Type[Any]) -> None:\n        super().__init__()\n        if len(channel_types) == 1:\n            display_name = channel_types[0].__name__\n            types = CHANNEL_TO_TYPES[channel_types[0]]\n        else:\n            display_name = '{}, and {}'.format(', '.join(t.__name__ for t in channel_types[:-1]), channel_types[-1].__name__)\n            types = []\n\n            for t in channel_types:\n                try:\n                    types.extend(CHANNEL_TO_TYPES[t])\n                except KeyError:\n                    raise TypeError('Union type of channels must be entirely made up of channels') from None\n\n        self._types: Tuple[Type[Any], ...] = channel_types\n        self._channel_types: List[ChannelType] = types\n        self._display_name = display_name\n\n    @property\n    def _error_display_name(self) -> str:\n        return self._display_name\n\n    @property\n    def type(self) -> AppCommandOptionType:\n        return AppCommandOptionType.channel\n\n    @property\n    def channel_types(self) -> List[ChannelType]:\n        return self._channel_types\n\n    async def transform(self, interaction: Interaction, value: Any, /):\n        resolved = value.resolve()\n        if resolved is None or not isinstance(resolved, self._types):\n            raise TransformerError(value, AppCommandOptionType.channel, self)\n        return resolved\n\n\nclass RawChannelTransformer(BaseChannelTransformer):\n    async def transform(self, interaction: Interaction, value: Any, /):\n        if not isinstance(value, self._types):\n            raise TransformerError(value, AppCommandOptionType.channel, self)\n        return value\n\n\nclass UnionChannelTransformer(BaseChannelTransformer):\n    async def transform(self, interaction: Interaction, value: Any, /):\n        if isinstance(value, self._types):\n            return value\n\n        resolved = value.resolve()\n        if resolved is None or not isinstance(resolved, self._types):\n            raise TransformerError(value, AppCommandOptionType.channel, self)\n        return resolved\n\n\nCHANNEL_TO_TYPES: Dict[Any, List[ChannelType]] = {\n    AppCommandChannel: [\n        ChannelType.stage_voice,\n        ChannelType.voice,\n        ChannelType.text,\n        ChannelType.news,\n        ChannelType.category,\n        ChannelType.forum,\n    ],\n    GuildChannel: [\n        ChannelType.stage_voice,\n        ChannelType.voice,\n        ChannelType.text,\n        ChannelType.news,\n        ChannelType.category,\n        ChannelType.forum,\n    ],\n    AppCommandThread: [ChannelType.news_thread, ChannelType.private_thread, ChannelType.public_thread],\n    Thread: [ChannelType.news_thread, ChannelType.private_thread, ChannelType.public_thread],\n    StageChannel: [ChannelType.stage_voice],\n    VoiceChannel: [ChannelType.voice],\n    TextChannel: [ChannelType.text, ChannelType.news],\n    CategoryChannel: [ChannelType.category],\n    ForumChannel: [ChannelType.forum],\n}\n\nBUILT_IN_TRANSFORMERS: Dict[Any, Transformer] = {\n    str: IdentityTransformer(AppCommandOptionType.string),\n    int: IdentityTransformer(AppCommandOptionType.integer),\n    float: IdentityTransformer(AppCommandOptionType.number),\n    bool: IdentityTransformer(AppCommandOptionType.boolean),\n    User: IdentityTransformer(AppCommandOptionType.user),\n    Member: MemberTransformer(),\n    Role: IdentityTransformer(AppCommandOptionType.role),\n    AppCommandChannel: RawChannelTransformer(AppCommandChannel),\n    AppCommandThread: RawChannelTransformer(AppCommandThread),\n    GuildChannel: BaseChannelTransformer(GuildChannel),\n    Thread: BaseChannelTransformer(Thread),\n    StageChannel: BaseChannelTransformer(StageChannel),\n    VoiceChannel: BaseChannelTransformer(VoiceChannel),\n    TextChannel: BaseChannelTransformer(TextChannel),\n    CategoryChannel: BaseChannelTransformer(CategoryChannel),\n    ForumChannel: BaseChannelTransformer(ForumChannel),\n    Attachment: IdentityTransformer(AppCommandOptionType.attachment),\n}\n\nALLOWED_DEFAULTS: Dict[AppCommandOptionType, Tuple[Type[Any], ...]] = {\n    AppCommandOptionType.string: (str, NoneType),\n    AppCommandOptionType.integer: (int, NoneType),\n    AppCommandOptionType.boolean: (bool, NoneType),\n    AppCommandOptionType.number: (float, NoneType),\n}\n\n\ndef get_supported_annotation(\n    annotation: Any,\n    *,\n    _none: type = NoneType,\n    _mapping: Dict[Any, Transformer] = BUILT_IN_TRANSFORMERS,\n) -> Tuple[Any, Any, bool]:\n    \"\"\"Returns an appropriate, yet supported, annotation along with an optional default value.\n\n    The third boolean element of the tuple indicates if default values should be validated.\n\n    This differs from the built in mapping by supporting a few more things.\n    Likewise, this returns a \"transformed\" annotation that is ready to use with CommandParameter.transform.\n    \"\"\"\n\n    try:\n        return (_mapping[annotation], MISSING, True)\n    except (KeyError, TypeError):\n        pass\n\n    if isinstance(annotation, Transformer):\n        return (annotation, MISSING, False)\n\n    if inspect.isclass(annotation):\n        if issubclass(annotation, Transformer):\n            return (annotation(), MISSING, False)\n        if issubclass(annotation, (Enum, InternalEnum)):\n            if all(isinstance(v.value, (str, int, float)) for v in annotation):\n                return (EnumValueTransformer(annotation), MISSING, False)\n            else:\n                return (EnumNameTransformer(annotation), MISSING, False)\n        if annotation is Choice:\n            raise TypeError('Choice requires a type argument of int, str, or float')\n\n        # Check if a transform @classmethod is given to the class\n        # These flatten into simple \"inline\" transformers with implicit strings\n        transform_classmethod = annotation.__dict__.get('transform', None)\n        if isinstance(transform_classmethod, classmethod):\n            params = inspect.signature(transform_classmethod.__func__).parameters\n            if len(params) != 3:\n                raise TypeError('Inline transformer with transform classmethod requires 3 parameters')\n            if not inspect.iscoroutinefunction(transform_classmethod.__func__):\n                raise TypeError('Inline transformer with transform classmethod must be a coroutine')\n            return (InlineTransformer(annotation), MISSING, False)\n\n    # Check if there's an origin\n    origin = getattr(annotation, '__origin__', None)\n    if origin is Literal:\n        args = annotation.__args__\n        return (LiteralTransformer(args), MISSING, True)\n\n    if origin is Choice:\n        arg = annotation.__args__[0]\n        return (ChoiceTransformer(arg), MISSING, True)\n\n    if origin is not Union:\n        # Only Union/Optional is supported right now so bail early\n        raise TypeError(f'unsupported type annotation {annotation!r}')\n\n    default = MISSING\n    args = annotation.__args__\n    if args[-1] is _none:\n        if len(args) == 2:\n            underlying = args[0]\n            inner, _, validate_default = get_supported_annotation(underlying)\n            if inner is None:\n                raise TypeError(f'unsupported inner optional type {underlying!r}')\n            return (inner, None, validate_default)\n        else:\n            args = args[:-1]\n            default = None\n\n    # Check for channel union types\n    if any(arg in CHANNEL_TO_TYPES for arg in args):\n        # If any channel type is given, then *all* must be channel types\n        return (UnionChannelTransformer(*args), default, True)\n\n    # The only valid transformations here are:\n    # [Member, User] => user\n    # [Member, User, Role] => mentionable\n    # [Member | User, Role] => mentionable\n    supported_types: Set[Any] = {Role, Member, User}\n    if not all(arg in supported_types for arg in args):\n        raise TypeError(f'unsupported types given inside {annotation!r}')\n    if args == (User, Member) or args == (Member, User):\n        return (IdentityTransformer(AppCommandOptionType.user), default, True)\n\n    return (IdentityTransformer(AppCommandOptionType.mentionable), default, True)\n\n\ndef annotation_to_parameter(annotation: Any, parameter: inspect.Parameter) -> CommandParameter:\n    \"\"\"Returns the appropriate :class:`CommandParameter` for the given annotation.\n\n    The resulting ``_annotation`` attribute might not match the one given here and might\n    be transformed in order to be easier to call from the ``transform`` asynchronous function\n    of a command parameter.\n    \"\"\"\n\n    (inner, default, validate_default) = get_supported_annotation(annotation)\n    type = inner.type\n\n    if default is MISSING or default is None:\n        param_default = parameter.default\n        if param_default is not parameter.empty:\n            default = param_default\n\n    # Verify validity of the default parameter\n    if default is not MISSING and validate_default:\n        valid_types: Tuple[Any, ...] = ALLOWED_DEFAULTS.get(type, (NoneType,))\n        if not isinstance(default, valid_types):\n            raise TypeError(f'invalid default parameter type given ({default.__class__}), expected {valid_types}')\n\n    result = CommandParameter(\n        type=type,\n        _annotation=inner,\n        default=default,\n        required=default is MISSING,\n        name=parameter.name,\n    )\n\n    choices = inner.choices\n    if choices is not None:\n        result.choices = choices\n\n    # These methods should be duck typed\n    if type in (AppCommandOptionType.number, AppCommandOptionType.string, AppCommandOptionType.integer):\n        result.min_value = inner.min_value\n        result.max_value = inner.max_value\n\n    if type is AppCommandOptionType.channel:\n        result.channel_types = inner.channel_types\n\n    if parameter.kind in (parameter.POSITIONAL_ONLY, parameter.VAR_KEYWORD, parameter.VAR_POSITIONAL):\n        raise TypeError(f'unsupported parameter kind in callback: {parameter.kind!s}')\n\n    # Check if the method is overridden\n    if inner.autocomplete.__func__ is not Transformer.autocomplete:\n        from .commands import validate_auto_complete_callback\n\n        result.autocomplete = validate_auto_complete_callback(inner.autocomplete)\n\n    return result\n"
  },
  {
    "path": "discord/app_commands/translator.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom __future__ import annotations\nfrom typing import TYPE_CHECKING, Any, Generic, Literal, Optional, TypeVar, Union, overload\nfrom .errors import TranslationError\nfrom ..enums import Enum, Locale\n\n\nif TYPE_CHECKING:\n    from .commands import Command, ContextMenu, Group, Parameter\n    from .models import Choice\n\n\n__all__ = (\n    'TranslationContextLocation',\n    'TranslationContextTypes',\n    'TranslationContext',\n    'Translator',\n    'locale_str',\n)\n\n\nclass TranslationContextLocation(Enum):\n    command_name = 0\n    command_description = 1\n    group_name = 2\n    group_description = 3\n    parameter_name = 4\n    parameter_description = 5\n    choice_name = 6\n    other = 7\n\n\n_L = TypeVar('_L', bound=TranslationContextLocation)\n_D = TypeVar('_D')\n\n\nclass TranslationContext(Generic[_L, _D]):\n    \"\"\"A class that provides context for the :class:`locale_str` being translated.\n\n    This is useful to determine where exactly the string is located and aid in looking\n    up the actual translation.\n\n    Attributes\n    -----------\n    location: :class:`TranslationContextLocation`\n        The location where this string is located.\n    data: Any\n        The extraneous data that is being translated.\n    \"\"\"\n\n    __slots__ = ('location', 'data')\n\n    @overload\n    def __init__(\n        self, location: Literal[TranslationContextLocation.command_name], data: Union[Command[Any, ..., Any], ContextMenu]\n    ) -> None:\n        ...\n\n    @overload\n    def __init__(\n        self, location: Literal[TranslationContextLocation.command_description], data: Command[Any, ..., Any]\n    ) -> None:\n        ...\n\n    @overload\n    def __init__(\n        self,\n        location: Literal[TranslationContextLocation.group_name, TranslationContextLocation.group_description],\n        data: Group,\n    ) -> None:\n        ...\n\n    @overload\n    def __init__(\n        self,\n        location: Literal[TranslationContextLocation.parameter_name, TranslationContextLocation.parameter_description],\n        data: Parameter,\n    ) -> None:\n        ...\n\n    @overload\n    def __init__(self, location: Literal[TranslationContextLocation.choice_name], data: Choice[Any]) -> None:\n        ...\n\n    @overload\n    def __init__(self, location: Literal[TranslationContextLocation.other], data: Any) -> None:\n        ...\n\n    def __init__(self, location: _L, data: _D) -> None:  # type: ignore # pyright doesn't like the overloads\n        self.location: _L = location\n        self.data: _D = data\n\n\n# For type checking purposes, it makes sense to allow the user to leverage type narrowing\n# So code like this works as expected:\n#\n# if context.type == TranslationContextLocation.command_name:\n#    reveal_type(context.data)  # Revealed type is Command | ContextMenu\n#\n# This requires a union of types\nCommandNameTranslationContext = TranslationContext[\n    Literal[TranslationContextLocation.command_name], Union['Command[Any, ..., Any]', 'ContextMenu']\n]\nCommandDescriptionTranslationContext = TranslationContext[\n    Literal[TranslationContextLocation.command_description], 'Command[Any, ..., Any]'\n]\nGroupTranslationContext = TranslationContext[\n    Literal[TranslationContextLocation.group_name, TranslationContextLocation.group_description], 'Group'\n]\nParameterTranslationContext = TranslationContext[\n    Literal[TranslationContextLocation.parameter_name, TranslationContextLocation.parameter_description], 'Parameter'\n]\nChoiceTranslationContext = TranslationContext[Literal[TranslationContextLocation.choice_name], 'Choice[Any]']\nOtherTranslationContext = TranslationContext[Literal[TranslationContextLocation.other], Any]\n\nTranslationContextTypes = Union[\n    CommandNameTranslationContext,\n    CommandDescriptionTranslationContext,\n    GroupTranslationContext,\n    ParameterTranslationContext,\n    ChoiceTranslationContext,\n    OtherTranslationContext,\n]\n\n\nclass Translator:\n    \"\"\"A class that handles translations for commands, parameters, and choices.\n\n    Translations are done lazily in order to allow for async enabled translations as well\n    as supporting a wide array of translation systems such as :mod:`gettext` and\n    `Project Fluent <https://projectfluent.org>`_.\n\n    In order for a translator to be used, it must be set using the :meth:`CommandTree.set_translator`\n    method. The translation flow for a string is as follows:\n\n    1. Use :class:`locale_str` instead of :class:`str` in areas of a command you want to be translated.\n        - Currently, these are command names, command descriptions, parameter names, parameter descriptions, and choice names.\n        - This can also be used inside the :func:`~discord.app_commands.describe` decorator.\n    2. Call :meth:`CommandTree.set_translator` to the translator instance that will handle the translations.\n    3. Call :meth:`CommandTree.sync`\n    4. The library will call :meth:`Translator.translate` on all the relevant strings being translated.\n\n    .. versionadded:: 2.0\n    \"\"\"\n\n    async def load(self) -> None:\n        \"\"\"|coro|\n\n        An asynchronous setup function for loading the translation system.\n\n        The default implementation does nothing.\n\n        This is invoked when :meth:`CommandTree.set_translator` is called.\n        \"\"\"\n        pass\n\n    async def unload(self) -> None:\n        \"\"\"|coro|\n\n        An asynchronous teardown function for unloading the translation system.\n\n        The default implementation does nothing.\n\n        This is invoked when :meth:`CommandTree.set_translator` is called\n        if a tree already has a translator or when :meth:`discord.Client.close` is called.\n        \"\"\"\n        pass\n\n    async def _checked_translate(\n        self, string: locale_str, locale: Locale, context: TranslationContextTypes\n    ) -> Optional[str]:\n        try:\n            return await self.translate(string, locale, context)\n        except TranslationError:\n            raise\n        except Exception as e:\n            raise TranslationError(string=string, locale=locale, context=context) from e\n\n    async def translate(self, string: locale_str, locale: Locale, context: TranslationContextTypes) -> Optional[str]:\n        \"\"\"|coro|\n\n        Translates the given string to the specified locale.\n\n        If the string cannot be translated, ``None`` should be returned.\n\n        The default implementation returns ``None``.\n\n        If an exception is raised in this method, it should inherit from :exc:`TranslationError`.\n        If it doesn't, then when this is called the exception will be chained with it instead.\n\n        Parameters\n        ------------\n        string: :class:`locale_str`\n            The string being translated.\n        locale: :class:`~discord.Locale`\n            The locale being requested for translation.\n        context: :class:`TranslationContext`\n            The translation context where the string originated from.\n            For better type checking ergonomics, the ``TranslationContextTypes``\n            type can be used instead to aid with type narrowing. It is functionally\n            equivalent to :class:`TranslationContext`.\n        \"\"\"\n\n        return None\n\n\nclass locale_str:\n    \"\"\"Marks a string as ready for translation.\n\n    This is done lazily and is not actually translated until :meth:`CommandTree.sync` is called.\n\n    The sync method then ultimately defers the responsibility of translating to the :class:`Translator`\n    instance used by the :class:`CommandTree`. For more information on the translation flow, see the\n    :class:`Translator` documentation.\n\n    .. container:: operations\n\n        .. describe:: str(x)\n\n            Returns the message passed to the string.\n\n        .. describe:: x == y\n\n            Checks if the string is equal to another string.\n\n        .. describe:: x != y\n\n            Checks if the string is not equal to another string.\n\n        .. describe:: hash(x)\n\n            Returns the hash of the string.\n\n    .. versionadded:: 2.0\n\n    Attributes\n    ------------\n    message: :class:`str`\n        The message being translated. Once set, this cannot be changed.\n\n        .. warning::\n\n            This must be the default \"message\" that you send to Discord.\n            Discord sends this message back to the library and the library\n            uses it to access the data in order to dispatch commands.\n\n            For example, in a command name context, if the command\n            name is ``foo`` then the message *must* also be ``foo``.\n            For other translation systems that require a message ID such\n            as Fluent, consider using a keyword argument to pass it in.\n    extras: :class:`dict`\n        A dict of user provided extras to attach to the translated string.\n        This can be used to add more context, information, or any metadata necessary\n        to aid in actually translating the string.\n\n        Since these are passed via keyword arguments, the keys are strings.\n    \"\"\"\n\n    __slots__ = ('__message', 'extras')\n\n    def __init__(self, message: str, /, **kwargs: Any) -> None:\n        self.__message: str = message\n        self.extras: dict[str, Any] = kwargs\n\n    @property\n    def message(self) -> str:\n        return self.__message\n\n    def __str__(self) -> str:\n        return self.__message\n\n    def __repr__(self) -> str:\n        kwargs = ', '.join(f'{k}={v!r}' for k, v in self.extras.items())\n        if kwargs:\n            return f'{self.__class__.__name__}({self.__message!r}, {kwargs})'\n        return f'{self.__class__.__name__}({self.__message!r})'\n\n    def __eq__(self, obj: object) -> bool:\n        return isinstance(obj, locale_str) and self.message == obj.message\n\n    def __hash__(self) -> int:\n        return hash(self.__message)\n"
  },
  {
    "path": "discord/app_commands/tree.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom __future__ import annotations\nimport logging\nimport inspect\n\nfrom typing import (\n    Any,\n    TYPE_CHECKING,\n    Callable,\n    Coroutine,\n    Dict,\n    Generator,\n    Generic,\n    List,\n    Literal,\n    Optional,\n    Sequence,\n    Set,\n    Tuple,\n    Union,\n    overload,\n)\nfrom collections import Counter\n\n\nfrom .namespace import Namespace, ResolveKey\nfrom .models import AppCommand\nfrom .commands import Command, ContextMenu, Group\nfrom .errors import (\n    AppCommandError,\n    CommandAlreadyRegistered,\n    CommandNotFound,\n    CommandSignatureMismatch,\n    CommandLimitReached,\n    CommandSyncFailure,\n    MissingApplicationID,\n)\nfrom .installs import AppCommandContext, AppInstallationType\nfrom .translator import Translator, locale_str\nfrom ..errors import ClientException, HTTPException\nfrom ..enums import AppCommandType, InteractionType\nfrom ..utils import MISSING, _get_as_snowflake, _is_submodule, _shorten\nfrom .._types import ClientT\n\n\nif TYPE_CHECKING:\n    from ..types.interactions import ApplicationCommandInteractionData, ApplicationCommandInteractionDataOption\n    from ..interactions import Interaction\n    from ..abc import Snowflake\n    from .commands import ContextMenuCallback, CommandCallback, P, T\n\n    ErrorFunc = Callable[\n        [Interaction, AppCommandError],\n        Coroutine[Any, Any, Any],\n    ]\n\n__all__ = ('CommandTree',)\n\n_log = logging.getLogger(__name__)\n\n\ndef _retrieve_guild_ids(\n    command: Any, guild: Optional[Snowflake] = MISSING, guilds: Sequence[Snowflake] = MISSING\n) -> Optional[Set[int]]:\n    if guild is not MISSING and guilds is not MISSING:\n        raise TypeError('cannot mix guild and guilds keyword arguments')\n\n    # guilds=[] or guilds=[...]\n    if guild is MISSING:\n        # If no arguments are given then it should default to the ones\n        # given to the guilds(...) decorator or None for global.\n        if guilds is MISSING:\n            return getattr(command, '_guild_ids', None)\n\n        # guilds=[] is the same as global\n        if len(guilds) == 0:\n            return None\n\n        return {g.id for g in guilds}\n\n    # At this point it should be...\n    # guild=None or guild=Object\n    if guild is None:\n        return None\n    return {guild.id}\n\n\nclass CommandTree(Generic[ClientT]):\n    \"\"\"Represents a container that holds application command information.\n\n    Parameters\n    -----------\n    client: :class:`~discord.Client`\n        The client instance to get application command information from.\n    fallback_to_global: :class:`bool`\n        If a guild-specific command is not found when invoked, then try falling back into\n        a global command in the tree. For example, if the tree locally has a ``/ping`` command\n        under the global namespace but the guild has a guild-specific ``/ping``, instead of failing\n        to find the guild-specific ``/ping`` command it will fall back to the global ``/ping`` command.\n        This has the potential to raise more :exc:`~discord.app_commands.CommandSignatureMismatch` errors\n        than usual. Defaults to ``True``.\n    allowed_contexts: :class:`~discord.app_commands.AppCommandContext`\n        The default allowed contexts that applies to all commands in this tree.\n        Note that you can override this on a per command basis.\n\n        .. versionadded:: 2.4\n    allowed_installs: :class:`~discord.app_commands.AppInstallationType`\n        The default allowed install locations that apply to all commands in this tree.\n        Note that you can override this on a per command basis.\n\n        .. versionadded:: 2.4\n    \"\"\"\n\n    def __init__(\n        self,\n        client: ClientT,\n        *,\n        fallback_to_global: bool = True,\n        allowed_contexts: AppCommandContext = MISSING,\n        allowed_installs: AppInstallationType = MISSING,\n    ):\n        self.client: ClientT = client\n        self._http = client.http\n        self._state = client._connection\n\n        if self._state._command_tree is not None:\n            raise ClientException('This client already has an associated command tree.')\n\n        self._state._command_tree = self\n        self.fallback_to_global: bool = fallback_to_global\n        self.allowed_contexts = AppCommandContext() if allowed_contexts is MISSING else allowed_contexts\n        self.allowed_installs = AppInstallationType() if allowed_installs is MISSING else allowed_installs\n        self._guild_commands: Dict[int, Dict[str, Union[Command, Group]]] = {}\n        self._global_commands: Dict[str, Union[Command, Group]] = {}\n        # (name, guild_id, command_type): Command\n        # The above two mappings can use this structure too but we need fast retrieval\n        # by name and guild_id in the above case while here it isn't as important since\n        # it's uncommon and N=5 anyway.\n        self._context_menus: Dict[Tuple[str, Optional[int], int], ContextMenu] = {}\n\n    async def fetch_command(self, command_id: int, /, *, guild: Optional[Snowflake] = None) -> AppCommand:\n        \"\"\"|coro|\n\n        Fetches an application command from the application.\n\n        Parameters\n        -----------\n        command_id: :class:`int`\n            The ID of the command to fetch.\n        guild: Optional[:class:`~discord.abc.Snowflake`]\n            The guild to fetch the command from. If not passed then the global command\n            is fetched instead.\n\n        Raises\n        -------\n        HTTPException\n            Fetching the command failed.\n        MissingApplicationID\n            The application ID could not be found.\n        NotFound\n            The application command was not found.\n            This could also be because the command is a guild command\n            and the guild was not specified and vice versa.\n\n        Returns\n        --------\n        :class:`~discord.app_commands.AppCommand`\n            The application command.\n        \"\"\"\n        if self.client.application_id is None:\n            raise MissingApplicationID\n\n        if guild is None:\n            command = await self._http.get_global_command(self.client.application_id, command_id)\n        else:\n            command = await self._http.get_guild_command(self.client.application_id, guild.id, command_id)\n\n        return AppCommand(data=command, state=self._state)\n\n    async def fetch_commands(self, *, guild: Optional[Snowflake] = None) -> List[AppCommand]:\n        \"\"\"|coro|\n\n        Fetches the application's current commands.\n\n        If no guild is passed then global commands are fetched, otherwise\n        the guild's commands are fetched instead.\n\n        .. note::\n\n            This includes context menu commands.\n\n        Parameters\n        -----------\n        guild: Optional[:class:`~discord.abc.Snowflake`]\n            The guild to fetch the commands from. If not passed then global commands\n            are fetched instead.\n\n        Raises\n        -------\n        HTTPException\n            Fetching the commands failed.\n        MissingApplicationID\n            The application ID could not be found.\n\n        Returns\n        --------\n        List[:class:`~discord.app_commands.AppCommand`]\n            The application's commands.\n        \"\"\"\n        if self.client.application_id is None:\n            raise MissingApplicationID\n\n        if guild is None:\n            commands = await self._http.get_global_commands(self.client.application_id)\n        else:\n            commands = await self._http.get_guild_commands(self.client.application_id, guild.id)\n\n        return [AppCommand(data=data, state=self._state) for data in commands]\n\n    def copy_global_to(self, *, guild: Snowflake) -> None:\n        \"\"\"Copies all global commands to the specified guild.\n\n        This method is mainly available for development purposes, as it allows you\n        to copy your global commands over to a testing guild easily.\n\n        Note that this method will *override* pre-existing guild commands that would conflict.\n\n        Parameters\n        -----------\n        guild: :class:`~discord.abc.Snowflake`\n            The guild to copy the commands to.\n\n        Raises\n        --------\n        CommandLimitReached\n            The maximum number of commands was reached for that guild.\n            This is currently 100 for slash commands and 5 for context menu commands.\n        \"\"\"\n\n        try:\n            mapping = self._guild_commands[guild.id].copy()\n        except KeyError:\n            mapping = {}\n\n        mapping.update(self._global_commands)\n        if len(mapping) > 100:\n            raise CommandLimitReached(guild_id=guild.id, limit=100)\n\n        ctx_menu: Dict[Tuple[str, Optional[int], int], ContextMenu] = {\n            (name, guild.id, cmd_type): cmd\n            for ((name, g, cmd_type), cmd) in self._context_menus.items()\n            if g is None or g == guild.id\n        }\n\n        counter = Counter(cmd_type for _, _, cmd_type in ctx_menu)\n        for cmd_type, count in counter.items():\n            if count > 5:\n                as_enum = AppCommandType(cmd_type)\n                raise CommandLimitReached(guild_id=guild.id, limit=5, type=as_enum)\n\n        self._context_menus.update(ctx_menu)\n        self._guild_commands[guild.id] = mapping\n\n    def add_command(\n        self,\n        command: Union[Command[Any, ..., Any], ContextMenu, Group],\n        /,\n        *,\n        guild: Optional[Snowflake] = MISSING,\n        guilds: Sequence[Snowflake] = MISSING,\n        override: bool = False,\n    ) -> None:\n        \"\"\"Adds an application command to the tree.\n\n        This only adds the command locally -- in order to sync the commands\n        and enable them in the client, :meth:`sync` must be called.\n\n        The root parent of the command is added regardless of the type passed.\n\n        Parameters\n        -----------\n        command: Union[:class:`Command`, :class:`Group`]\n            The application command or group to add.\n        guild: Optional[:class:`~discord.abc.Snowflake`]\n            The guild to add the command to. If not given or ``None`` then it\n            becomes a global command instead.\n\n            .. note ::\n\n                Due to a Discord limitation, this keyword argument cannot be used in conjunction with\n                contexts (e.g. :func:`.app_commands.allowed_contexts`) or installation types\n                (e.g. :func:`.app_commands.allowed_installs`).\n\n        guilds: List[:class:`~discord.abc.Snowflake`]\n            The list of guilds to add the command to. This cannot be mixed\n            with the ``guild`` parameter. If no guilds are given at all\n            then it becomes a global command instead.\n\n            .. note ::\n\n                Due to a Discord limitation, this keyword argument cannot be used in conjunction with\n                contexts (e.g. :func:`.app_commands.allowed_contexts`) or installation types\n                (e.g. :func:`.app_commands.allowed_installs`).\n\n        override: :class:`bool`\n            Whether to override a command with the same name. If ``False``\n            an exception is raised. Default is ``False``.\n\n        Raises\n        --------\n        ~discord.app_commands.CommandAlreadyRegistered\n            The command was already registered and no override was specified.\n        TypeError\n            The application command passed is not a valid application command.\n            Or, ``guild`` and ``guilds`` were both given.\n        CommandLimitReached\n            The maximum number of commands was reached globally or for that guild.\n            This is currently 100 for slash commands and 5 for context menu commands.\n        \"\"\"\n\n        guild_ids = _retrieve_guild_ids(command, guild, guilds)\n        if isinstance(command, ContextMenu):\n            type = command.type.value\n            name = command.name\n\n            def _context_menu_add_helper(\n                guild_id: Optional[int],\n                data: Dict[Tuple[str, Optional[int], int], ContextMenu],\n                name: str = name,\n                type: int = type,\n            ) -> None:\n                key = (name, guild_id, type)\n                found = key in self._context_menus\n                if found and not override:\n                    raise CommandAlreadyRegistered(name, guild_id)\n\n                # If the key is found and overridden then it shouldn't count as an extra addition\n                # read as `0 if override and found else 1` if confusing\n                to_add = not (override and found)\n                total = sum(1 for _, g, t in self._context_menus if g == guild_id and t == type)\n                if total + to_add > 5:\n                    raise CommandLimitReached(guild_id=guild_id, limit=5, type=AppCommandType(type))\n                data[key] = command\n\n            if guild_ids is None:\n                _context_menu_add_helper(None, self._context_menus)\n            else:\n                current: Dict[Tuple[str, Optional[int], int], ContextMenu] = {}\n                for guild_id in guild_ids:\n                    _context_menu_add_helper(guild_id, current)\n\n                # Update at the end in order to make sure the update is atomic.\n                # An error during addition could end up making the context menu mapping\n                # have a partial state\n                self._context_menus.update(current)\n            return\n        elif not isinstance(command, (Command, Group)):\n            raise TypeError(f'Expected an application command, received {command.__class__.__name__} instead')\n\n        # todo: validate application command groups having children (required)\n\n        root = command.root_parent or command\n        name = root.name\n        if guild_ids is not None:\n            # Validate that the command can be added first, before actually\n            # adding it into the mapping. This ensures atomicity.\n            for guild_id in guild_ids:\n                commands = self._guild_commands.get(guild_id, {})\n                found = name in commands\n                if found and not override:\n                    raise CommandAlreadyRegistered(name, guild_id)\n\n                to_add = not (override and found)\n                if len(commands) + to_add > 100:\n                    raise CommandLimitReached(guild_id=guild_id, limit=100)\n\n            # Actually add the command now that it has been verified to be okay.\n            for guild_id in guild_ids:\n                commands = self._guild_commands.setdefault(guild_id, {})\n                commands[name] = root\n        else:\n            found = name in self._global_commands\n            if found and not override:\n                raise CommandAlreadyRegistered(name, None)\n\n            to_add = not (override and found)\n            if len(self._global_commands) + to_add > 100:\n                raise CommandLimitReached(guild_id=None, limit=100)\n            self._global_commands[name] = root\n\n    @overload\n    def remove_command(\n        self,\n        command: str,\n        /,\n        *,\n        guild: Optional[Snowflake] = ...,\n        type: Literal[AppCommandType.message, AppCommandType.user],\n    ) -> Optional[ContextMenu]:\n        ...\n\n    @overload\n    def remove_command(\n        self,\n        command: str,\n        /,\n        *,\n        guild: Optional[Snowflake] = ...,\n        type: Literal[AppCommandType.chat_input] = ...,\n    ) -> Optional[Union[Command[Any, ..., Any], Group]]:\n        ...\n\n    @overload\n    def remove_command(\n        self,\n        command: str,\n        /,\n        *,\n        guild: Optional[Snowflake] = ...,\n        type: AppCommandType,\n    ) -> Optional[Union[Command[Any, ..., Any], ContextMenu, Group]]:\n        ...\n\n    def remove_command(\n        self,\n        command: str,\n        /,\n        *,\n        guild: Optional[Snowflake] = None,\n        type: AppCommandType = AppCommandType.chat_input,\n    ) -> Optional[Union[Command[Any, ..., Any], ContextMenu, Group]]:\n        \"\"\"Removes an application command from the tree.\n\n        This only removes the command locally -- in order to sync the commands\n        and remove them in the client, :meth:`sync` must be called.\n\n        Parameters\n        -----------\n        command: :class:`str`\n            The name of the root command to remove.\n        guild: Optional[:class:`~discord.abc.Snowflake`]\n            The guild to remove the command from. If not given or ``None`` then it\n            removes a global command instead.\n        type: :class:`~discord.AppCommandType`\n            The type of command to remove. Defaults to :attr:`~discord.AppCommandType.chat_input`,\n            i.e. slash commands.\n\n        Returns\n        ---------\n        Optional[Union[:class:`Command`, :class:`ContextMenu`, :class:`Group`]]\n            The application command that got removed.\n            If nothing was removed then ``None`` is returned instead.\n        \"\"\"\n\n        if type is AppCommandType.chat_input:\n            if guild is None:\n                return self._global_commands.pop(command, None)\n            else:\n                try:\n                    commands = self._guild_commands[guild.id]\n                except KeyError:\n                    return None\n                else:\n                    return commands.pop(command, None)\n        elif type in (AppCommandType.user, AppCommandType.message):\n            guild_id = None if guild is None else guild.id\n            key = (command, guild_id, type.value)\n            return self._context_menus.pop(key, None)\n\n    def clear_commands(self, *, guild: Optional[Snowflake], type: Optional[AppCommandType] = None) -> None:\n        \"\"\"Clears all application commands from the tree.\n\n        This only removes the commands locally -- in order to sync the commands\n        and remove them in the client, :meth:`sync` must be called.\n\n        Parameters\n        -----------\n        guild: Optional[:class:`~discord.abc.Snowflake`]\n            The guild to remove the commands from. If ``None`` then it\n            removes all global commands instead.\n        type: :class:`~discord.AppCommandType`\n            The type of command to clear. If not given or ``None`` then it removes all commands\n            regardless of the type.\n        \"\"\"\n\n        if type is None or type is AppCommandType.chat_input:\n            if guild is None:\n                self._global_commands.clear()\n            else:\n                try:\n                    commands = self._guild_commands[guild.id]\n                except KeyError:\n                    pass\n                else:\n                    commands.clear()\n\n        guild_id = None if guild is None else guild.id\n        if type is None:\n            self._context_menus = {\n                (name, _guild_id, value): cmd\n                for (name, _guild_id, value), cmd in self._context_menus.items()\n                if _guild_id != guild_id\n            }\n        elif type in (AppCommandType.user, AppCommandType.message):\n            self._context_menus = {\n                (name, _guild_id, value): cmd\n                for (name, _guild_id, value), cmd in self._context_menus.items()\n                if _guild_id != guild_id or value != type.value\n            }\n\n    @overload\n    def get_command(\n        self,\n        command: str,\n        /,\n        *,\n        guild: Optional[Snowflake] = ...,\n        type: Literal[AppCommandType.message, AppCommandType.user],\n    ) -> Optional[ContextMenu]:\n        ...\n\n    @overload\n    def get_command(\n        self,\n        command: str,\n        /,\n        *,\n        guild: Optional[Snowflake] = ...,\n        type: Literal[AppCommandType.chat_input] = ...,\n    ) -> Optional[Union[Command[Any, ..., Any], Group]]:\n        ...\n\n    @overload\n    def get_command(\n        self,\n        command: str,\n        /,\n        *,\n        guild: Optional[Snowflake] = ...,\n        type: AppCommandType,\n    ) -> Optional[Union[Command[Any, ..., Any], ContextMenu, Group]]:\n        ...\n\n    def get_command(\n        self,\n        command: str,\n        /,\n        *,\n        guild: Optional[Snowflake] = None,\n        type: AppCommandType = AppCommandType.chat_input,\n    ) -> Optional[Union[Command[Any, ..., Any], ContextMenu, Group]]:\n        \"\"\"Gets an application command from the tree.\n\n        Parameters\n        -----------\n        command: :class:`str`\n            The name of the root command to get.\n        guild: Optional[:class:`~discord.abc.Snowflake`]\n            The guild to get the command from. If not given or ``None`` then it\n            gets a global command instead.\n        type: :class:`~discord.AppCommandType`\n            The type of command to get. Defaults to :attr:`~discord.AppCommandType.chat_input`,\n            i.e. slash commands.\n\n        Returns\n        ---------\n        Optional[Union[:class:`Command`, :class:`ContextMenu`, :class:`Group`]]\n            The application command that was found.\n            If nothing was found then ``None`` is returned instead.\n        \"\"\"\n\n        if type is AppCommandType.chat_input:\n            if guild is None:\n                return self._global_commands.get(command)\n            else:\n                try:\n                    commands = self._guild_commands[guild.id]\n                except KeyError:\n                    return None\n                else:\n                    return commands.get(command)\n        elif type in (AppCommandType.user, AppCommandType.message):\n            guild_id = None if guild is None else guild.id\n            key = (command, guild_id, type.value)\n            return self._context_menus.get(key)\n\n    @overload\n    def get_commands(\n        self,\n        *,\n        guild: Optional[Snowflake] = ...,\n        type: Literal[AppCommandType.message, AppCommandType.user],\n    ) -> List[ContextMenu]:\n        ...\n\n    @overload\n    def get_commands(\n        self,\n        *,\n        guild: Optional[Snowflake] = ...,\n        type: Literal[AppCommandType.chat_input],\n    ) -> List[Union[Command[Any, ..., Any], Group]]:\n        ...\n\n    @overload\n    def get_commands(\n        self,\n        *,\n        guild: Optional[Snowflake] = ...,\n        type: AppCommandType,\n    ) -> Union[List[Union[Command[Any, ..., Any], Group]], List[ContextMenu]]:\n        ...\n\n    @overload\n    def get_commands(\n        self,\n        *,\n        guild: Optional[Snowflake] = ...,\n        type: Optional[AppCommandType] = ...,\n    ) -> List[Union[Command[Any, ..., Any], Group, ContextMenu]]:\n        ...\n\n    def get_commands(\n        self,\n        *,\n        guild: Optional[Snowflake] = None,\n        type: Optional[AppCommandType] = None,\n    ) -> Union[\n        List[ContextMenu],\n        List[Union[Command[Any, ..., Any], Group]],\n        List[Union[Command[Any, ..., Any], Group, ContextMenu]],\n    ]:\n        \"\"\"Gets all application commands from the tree.\n\n        Parameters\n        -----------\n        guild: Optional[:class:`~discord.abc.Snowflake`]\n            The guild to get the commands from, not including global commands.\n            If not given or ``None`` then only global commands are returned.\n        type: Optional[:class:`~discord.AppCommandType`]\n            The type of commands to get. When not given or ``None``, then all\n            command types are returned.\n\n        Returns\n        ---------\n        List[Union[:class:`ContextMenu`, :class:`Command`, :class:`Group`]]\n            The application commands from the tree.\n        \"\"\"\n        if type is None:\n            return self._get_all_commands(guild=guild)\n\n        if type is AppCommandType.chat_input:\n            if guild is None:\n                return list(self._global_commands.values())\n            else:\n                try:\n                    commands = self._guild_commands[guild.id]\n                except KeyError:\n                    return []\n                else:\n                    return list(commands.values())\n        else:\n            guild_id = None if guild is None else guild.id\n            value = type.value\n            return [command for ((_, g, t), command) in self._context_menus.items() if g == guild_id and t == value]\n\n    @overload\n    def walk_commands(\n        self,\n        *,\n        guild: Optional[Snowflake] = ...,\n        type: Literal[AppCommandType.message, AppCommandType.user],\n    ) -> Generator[ContextMenu, None, None]:\n        ...\n\n    @overload\n    def walk_commands(\n        self,\n        *,\n        guild: Optional[Snowflake] = ...,\n        type: Literal[AppCommandType.chat_input] = ...,\n    ) -> Generator[Union[Command[Any, ..., Any], Group], None, None]:\n        ...\n\n    @overload\n    def walk_commands(\n        self,\n        *,\n        guild: Optional[Snowflake] = ...,\n        type: AppCommandType,\n    ) -> Union[Generator[Union[Command[Any, ..., Any], Group], None, None], Generator[ContextMenu, None, None]]:\n        ...\n\n    def walk_commands(\n        self,\n        *,\n        guild: Optional[Snowflake] = None,\n        type: AppCommandType = AppCommandType.chat_input,\n    ) -> Union[Generator[Union[Command[Any, ..., Any], Group], None, None], Generator[ContextMenu, None, None]]:\n        \"\"\"An iterator that recursively walks through all application commands and child commands from the tree.\n\n        Parameters\n        -----------\n        guild: Optional[:class:`~discord.abc.Snowflake`]\n            The guild to iterate the commands from, not including global commands.\n            If not given or ``None`` then only global commands are iterated.\n        type: :class:`~discord.AppCommandType`\n            The type of commands to iterate over. Defaults to :attr:`~discord.AppCommandType.chat_input`,\n            i.e. slash commands.\n\n        Yields\n        ---------\n        Union[:class:`ContextMenu`, :class:`Command`, :class:`Group`]\n            The application commands from the tree.\n        \"\"\"\n\n        if type is AppCommandType.chat_input:\n            if guild is None:\n                for cmd in self._global_commands.values():\n                    yield cmd\n                    if isinstance(cmd, Group):\n                        yield from cmd.walk_commands()\n            else:\n                try:\n                    commands = self._guild_commands[guild.id]\n                except KeyError:\n                    return\n                else:\n                    for cmd in commands.values():\n                        yield cmd\n                        if isinstance(cmd, Group):\n                            yield from cmd.walk_commands()\n        else:\n            guild_id = None if guild is None else guild.id\n            value = type.value\n            for (_, g, t), command in self._context_menus.items():\n                if g == guild_id and t == value:\n                    yield command\n\n    def _get_all_commands(\n        self, *, guild: Optional[Snowflake] = None\n    ) -> List[Union[Command[Any, ..., Any], Group, ContextMenu]]:\n        if guild is None:\n            base: List[Union[Command[Any, ..., Any], Group, ContextMenu]] = list(self._global_commands.values())\n            base.extend(cmd for ((_, g, _), cmd) in self._context_menus.items() if g is None)\n            return base\n        else:\n            try:\n                commands = self._guild_commands[guild.id]\n            except KeyError:\n                guild_id = guild.id\n                return [cmd for ((_, g, _), cmd) in self._context_menus.items() if g == guild_id]\n            else:\n                base: List[Union[Command[Any, ..., Any], Group, ContextMenu]] = list(commands.values())\n                guild_id = guild.id\n                base.extend(cmd for ((_, g, _), cmd) in self._context_menus.items() if g == guild_id)\n                return base\n\n    def _remove_with_module(self, name: str) -> None:\n        remove: List[Any] = []\n        for key, cmd in self._context_menus.items():\n            if cmd.module is not None and _is_submodule(name, cmd.module):\n                remove.append(key)\n\n        for key in remove:\n            del self._context_menus[key]\n\n        remove = []\n        for key, cmd in self._global_commands.items():\n            if cmd.module is not None and _is_submodule(name, cmd.module):\n                remove.append(key)\n\n        for key in remove:\n            del self._global_commands[key]\n\n        for mapping in self._guild_commands.values():\n            remove = []\n            for key, cmd in mapping.items():\n                if cmd.module is not None and _is_submodule(name, cmd.module):\n                    remove.append(key)\n\n            for key in remove:\n                del mapping[key]\n\n    async def on_error(self, interaction: Interaction[ClientT], error: AppCommandError, /) -> None:\n        \"\"\"|coro|\n\n        A callback that is called when any command raises an :exc:`AppCommandError`.\n\n        The default implementation logs the exception using the library logger\n        if the command does not have any error handlers attached to it.\n\n        To get the command that failed, :attr:`discord.Interaction.command` should\n        be used.\n\n        Parameters\n        -----------\n        interaction: :class:`~discord.Interaction`\n            The interaction that is being handled.\n        error: :exc:`AppCommandError`\n            The exception that was raised.\n        \"\"\"\n\n        command = interaction.command\n        if command is not None:\n            if command._has_any_error_handlers():\n                return\n\n            _log.error('Ignoring exception in command %r', command.name, exc_info=error)\n        else:\n            _log.error('Ignoring exception in command tree', exc_info=error)\n\n    def error(self, coro: ErrorFunc) -> ErrorFunc:\n        \"\"\"A decorator that registers a coroutine as a local error handler.\n\n        This must match the signature of the :meth:`on_error` callback.\n\n        The error passed will be derived from :exc:`AppCommandError`.\n\n        Parameters\n        -----------\n        coro: :ref:`coroutine <coroutine>`\n            The coroutine to register as the local error handler.\n\n        Raises\n        -------\n        TypeError\n            The coroutine passed is not actually a coroutine or does\n            not match the signature.\n        \"\"\"\n\n        if not inspect.iscoroutinefunction(coro):\n            raise TypeError('The error handler must be a coroutine.')\n\n        params = inspect.signature(coro).parameters\n        if len(params) != 2:\n            raise TypeError('error handler must have 2 parameters')\n\n        self.on_error = coro\n        return coro\n\n    def command(\n        self,\n        *,\n        name: Union[str, locale_str] = MISSING,\n        description: Union[str, locale_str] = MISSING,\n        nsfw: bool = False,\n        guild: Optional[Snowflake] = MISSING,\n        guilds: Sequence[Snowflake] = MISSING,\n        auto_locale_strings: bool = True,\n        extras: Dict[Any, Any] = MISSING,\n    ) -> Callable[[CommandCallback[Group, P, T]], Command[Group, P, T]]:\n        \"\"\"A decorator that creates an application command from a regular function directly under this tree.\n\n        Parameters\n        ------------\n        name: Union[:class:`str`, :class:`locale_str`]\n            The name of the application command. If not given, it defaults to a lower-case\n            version of the callback name.\n        description: Union[:class:`str`, :class:`locale_str`]\n            The description of the application command. This shows up in the UI to describe\n            the application command. If not given, it defaults to the first line of the docstring\n            of the callback shortened to 100 characters.\n        nsfw: :class:`bool`\n            Whether the command is NSFW and should only work in NSFW channels. Defaults to ``False``.\n\n            Due to a Discord limitation, this does not work on subcommands.\n        guild: Optional[:class:`~discord.abc.Snowflake`]\n            The guild to add the command to. If not given or ``None`` then it\n            becomes a global command instead.\n\n            .. note ::\n\n                Due to a Discord limitation, this keyword argument cannot be used in conjunction with\n                contexts (e.g. :func:`.app_commands.allowed_contexts`) or installation types\n                (e.g. :func:`.app_commands.allowed_installs`).\n\n        guilds: List[:class:`~discord.abc.Snowflake`]\n            The list of guilds to add the command to. This cannot be mixed\n            with the ``guild`` parameter. If no guilds are given at all\n            then it becomes a global command instead.\n\n            .. note ::\n\n                Due to a Discord limitation, this keyword argument cannot be used in conjunction with\n                contexts (e.g. :func:`.app_commands.allowed_contexts`) or installation types\n                (e.g. :func:`.app_commands.allowed_installs`).\n\n        auto_locale_strings: :class:`bool`\n            If this is set to ``True``, then all translatable strings will implicitly\n            be wrapped into :class:`locale_str` rather than :class:`str`. This could\n            avoid some repetition and be more ergonomic for certain defaults such\n            as default command names, command descriptions, and parameter names.\n            Defaults to ``True``.\n        extras: :class:`dict`\n            A dictionary that can be used to store extraneous data.\n            The library will not touch any values or keys within this dictionary.\n        \"\"\"\n\n        def decorator(func: CommandCallback[Group, P, T]) -> Command[Group, P, T]:\n            if not inspect.iscoroutinefunction(func):\n                raise TypeError('command function must be a coroutine function')\n\n            if description is MISSING:\n                if func.__doc__ is None:\n                    desc = '…'\n                else:\n                    desc = _shorten(func.__doc__)\n            else:\n                desc = description\n\n            command = Command(\n                name=name if name is not MISSING else func.__name__,\n                description=desc,\n                callback=func,\n                nsfw=nsfw,\n                parent=None,\n                auto_locale_strings=auto_locale_strings,\n                extras=extras,\n            )\n            self.add_command(command, guild=guild, guilds=guilds)\n            return command\n\n        return decorator\n\n    def context_menu(\n        self,\n        *,\n        name: Union[str, locale_str] = MISSING,\n        nsfw: bool = False,\n        guild: Optional[Snowflake] = MISSING,\n        guilds: Sequence[Snowflake] = MISSING,\n        auto_locale_strings: bool = True,\n        extras: Dict[Any, Any] = MISSING,\n    ) -> Callable[[ContextMenuCallback], ContextMenu]:\n        \"\"\"A decorator that creates an application command context menu from a regular function directly under this tree.\n\n        This function must have a signature of :class:`~discord.Interaction` as its first parameter\n        and taking either a :class:`~discord.Member`, :class:`~discord.User`, or :class:`~discord.Message`,\n        or a :obj:`typing.Union` of ``Member`` and ``User`` as its second parameter.\n\n        Examples\n        ---------\n\n        .. code-block:: python3\n\n            @app_commands.context_menu()\n            async def react(interaction: discord.Interaction, message: discord.Message):\n                await interaction.response.send_message('Very cool message!', ephemeral=True)\n\n            @app_commands.context_menu()\n            async def ban(interaction: discord.Interaction, user: discord.Member):\n                await interaction.response.send_message(f'Should I actually ban {user}...', ephemeral=True)\n\n        Parameters\n        ------------\n        name: Union[:class:`str`, :class:`locale_str`]\n            The name of the context menu command. If not given, it defaults to a title-case\n            version of the callback name. Note that unlike regular slash commands this can\n            have spaces and upper case characters in the name.\n        nsfw: :class:`bool`\n            Whether the command is NSFW and should only work in NSFW channels. Defaults to ``False``.\n\n            Due to a Discord limitation, this does not work on subcommands.\n        guild: Optional[:class:`~discord.abc.Snowflake`]\n            The guild to add the command to. If not given or ``None`` then it\n            becomes a global command instead.\n\n            .. note ::\n\n                Due to a Discord limitation, this keyword argument cannot be used in conjunction with\n                contexts (e.g. :func:`.app_commands.allowed_contexts`) or installation types\n                (e.g. :func:`.app_commands.allowed_installs`).\n\n        guilds: List[:class:`~discord.abc.Snowflake`]\n            The list of guilds to add the command to. This cannot be mixed\n            with the ``guild`` parameter. If no guilds are given at all\n            then it becomes a global command instead.\n\n            .. note ::\n\n                Due to a Discord limitation, this keyword argument cannot be used in conjunction with\n                contexts (e.g. :func:`.app_commands.allowed_contexts`) or installation types\n                (e.g. :func:`.app_commands.allowed_installs`).\n\n        auto_locale_strings: :class:`bool`\n            If this is set to ``True``, then all translatable strings will implicitly\n            be wrapped into :class:`locale_str` rather than :class:`str`. This could\n            avoid some repetition and be more ergonomic for certain defaults such\n            as default command names, command descriptions, and parameter names.\n            Defaults to ``True``.\n        extras: :class:`dict`\n            A dictionary that can be used to store extraneous data.\n            The library will not touch any values or keys within this dictionary.\n        \"\"\"\n\n        def decorator(func: ContextMenuCallback) -> ContextMenu:\n            if not inspect.iscoroutinefunction(func):\n                raise TypeError('context menu function must be a coroutine function')\n\n            actual_name = func.__name__.title() if name is MISSING else name\n            context_menu = ContextMenu(\n                name=actual_name,\n                nsfw=nsfw,\n                callback=func,\n                auto_locale_strings=auto_locale_strings,\n                extras=extras,\n            )\n            self.add_command(context_menu, guild=guild, guilds=guilds)\n            return context_menu\n\n        return decorator\n\n    @property\n    def translator(self) -> Optional[Translator]:\n        \"\"\"Optional[:class:`Translator`]: The translator, if any, responsible for handling translation of commands.\n\n        To change the translator, use :meth:`set_translator`.\n        \"\"\"\n        return self._state._translator\n\n    async def set_translator(self, translator: Optional[Translator]) -> None:\n        \"\"\"|coro|\n\n        Sets the translator to use for translating commands.\n\n        If a translator was previously set, it will be unloaded using its\n        :meth:`Translator.unload` method.\n\n        When a translator is set, it will be loaded using its :meth:`Translator.load` method.\n\n        Parameters\n        ------------\n        translator: Optional[:class:`Translator`]\n            The translator to use. If ``None`` then the translator is just removed and unloaded.\n\n        Raises\n        -------\n        TypeError\n            The translator was not ``None`` or a :class:`Translator` instance.\n        \"\"\"\n\n        if translator is not None and not isinstance(translator, Translator):\n            raise TypeError(f'expected None or Translator instance, received {translator.__class__.__name__} instead')\n\n        old_translator = self._state._translator\n        if old_translator is not None:\n            await old_translator.unload()\n\n        if translator is None:\n            self._state._translator = None\n        else:\n            await translator.load()\n            self._state._translator = translator\n\n    async def sync(self, *, guild: Optional[Snowflake] = None) -> List[AppCommand]:\n        \"\"\"|coro|\n\n        Syncs the application commands to Discord.\n\n        This also runs the translator to get the translated strings necessary for\n        feeding back into Discord.\n\n        This must be called for the application commands to show up.\n\n        Parameters\n        -----------\n        guild: Optional[:class:`~discord.abc.Snowflake`]\n            The guild to sync the commands to. If ``None`` then it\n            syncs all global commands instead.\n\n        Raises\n        -------\n        HTTPException\n            Syncing the commands failed.\n        CommandSyncFailure\n            Syncing the commands failed due to a user related error, typically because\n            the command has invalid data. This is equivalent to an HTTP status code of\n            400.\n        Forbidden\n            The client does not have the ``applications.commands`` scope in the guild.\n        MissingApplicationID\n            The client does not have an application ID.\n        TranslationError\n            An error occurred while translating the commands.\n\n        Returns\n        --------\n        List[:class:`AppCommand`]\n            The application's commands that got synced.\n        \"\"\"\n\n        if self.client.application_id is None:\n            raise MissingApplicationID\n\n        commands = self._get_all_commands(guild=guild)\n\n        translator = self.translator\n        if translator:\n            payload = [await command.get_translated_payload(self, translator) for command in commands]\n        else:\n            payload = [command.to_dict(self) for command in commands]\n\n        try:\n            if guild is None:\n                data = await self._http.bulk_upsert_global_commands(self.client.application_id, payload=payload)\n            else:\n                data = await self._http.bulk_upsert_guild_commands(self.client.application_id, guild.id, payload=payload)\n        except HTTPException as e:\n            if e.status == 400 and e.code == 50035:\n                raise CommandSyncFailure(e, commands) from None\n            raise\n\n        return [AppCommand(data=d, state=self._state) for d in data]\n\n    async def _dispatch_error(self, interaction: Interaction[ClientT], error: AppCommandError, /) -> None:\n        command = interaction.command\n        interaction.command_failed = True\n        try:\n            if isinstance(command, Command):\n                await command._invoke_error_handlers(interaction, error)\n        finally:\n            await self.on_error(interaction, error)\n\n    def _from_interaction(self, interaction: Interaction[ClientT]) -> None:\n        async def wrapper():\n            try:\n                await self._call(interaction)\n            except AppCommandError as e:\n                await self._dispatch_error(interaction, e)\n\n        self.client.loop.create_task(wrapper(), name='CommandTree-invoker')\n\n    def _get_context_menu(self, data: ApplicationCommandInteractionData) -> Optional[ContextMenu]:\n        name = data['name']\n        guild_id = _get_as_snowflake(data, 'guild_id')\n        t = data.get('type', 1)\n        cmd = self._context_menus.get((name, guild_id, t))\n        if cmd is None and self.fallback_to_global:\n            return self._context_menus.get((name, None, t))\n        return cmd\n\n    def _get_app_command_options(\n        self, data: ApplicationCommandInteractionData\n    ) -> Tuple[Command[Any, ..., Any], List[ApplicationCommandInteractionDataOption]]:\n        parents: List[str] = []\n        name = data['name']\n\n        command_guild_id = _get_as_snowflake(data, 'guild_id')\n        if command_guild_id:\n            try:\n                guild_commands = self._guild_commands[command_guild_id]\n            except KeyError:\n                command = None if not self.fallback_to_global else self._global_commands.get(name)\n            else:\n                command = guild_commands.get(name)\n                if command is None and self.fallback_to_global:\n                    command = self._global_commands.get(name)\n        else:\n            command = self._global_commands.get(name)\n\n        # If it's not found at this point then it's not gonna be found at any point\n        if command is None:\n            raise CommandNotFound(name, parents)\n\n        # This could be done recursively but it'd be a bother due to the state needed\n        # to be tracked above like the parents, the actual command type, and the\n        # resulting options we care about\n        searching = True\n        options: List[ApplicationCommandInteractionDataOption] = data.get('options', [])\n        while searching:\n            for option in options:\n                # Find subcommands\n                if option.get('type', 0) in (1, 2):\n                    parents.append(name)\n                    name = option['name']\n                    command = command._get_internal_command(name)\n                    if command is None:\n                        raise CommandNotFound(name, parents)\n                    options = option.get('options', [])\n                    break\n                else:\n                    searching = False\n                    break\n            else:\n                break\n\n        if isinstance(command, Group):\n            # Right now, groups can't be invoked. This is a Discord limitation in how they\n            # do slash commands. So if we're here and we have a Group rather than a Command instance\n            # then something in the code is out of date from the data that Discord has.\n            raise CommandSignatureMismatch(command)\n\n        return (command, options)\n\n    async def _call_context_menu(\n        self, interaction: Interaction[ClientT], data: ApplicationCommandInteractionData, type: int\n    ) -> None:\n        name = data['name']\n        guild_id = _get_as_snowflake(data, 'guild_id')\n        ctx_menu = self._context_menus.get((name, guild_id, type))\n        if ctx_menu is None and self.fallback_to_global:\n            ctx_menu = self._context_menus.get((name, None, type))\n\n        # Pre-fill the cached slot to prevent re-computation\n        interaction._cs_command = ctx_menu\n\n        if ctx_menu is None:\n            raise CommandNotFound(name, [], AppCommandType(type))\n\n        resolved = Namespace._get_resolved_items(interaction, data.get('resolved', {}))\n\n        # This is annotated as str | int but realistically this will always be str\n        target_id: Optional[Union[str, int]] = data.get('target_id')\n        # Right now, the only types are message and user\n        # Therefore, there's no conflict with snowflakes\n\n        # This will always work at runtime\n        key = ResolveKey.any_with(target_id)  # type: ignore\n        value = resolved.get(key)\n        if ctx_menu.type.value != type:\n            raise CommandSignatureMismatch(ctx_menu)\n\n        if value is None:\n            raise AppCommandError('This should not happen if Discord sent well-formed data.')\n\n        # I assume I don't have to type check here.\n        try:\n            await ctx_menu._invoke(interaction, value)\n        except AppCommandError as e:\n            if ctx_menu.on_error is not None:\n                await ctx_menu.on_error(interaction, e)\n            await self.on_error(interaction, e)\n        else:\n            self.client.dispatch('app_command_completion', interaction, ctx_menu)\n\n    async def interaction_check(self, interaction: Interaction[ClientT], /) -> bool:\n        \"\"\"|coro|\n\n        A global check to determine if an :class:`~discord.Interaction` should\n        be processed by the tree.\n\n        The default implementation returns True (all interactions are processed),\n        but can be overridden if custom behaviour is desired.\n        \"\"\"\n        return True\n\n    async def _call(self, interaction: Interaction[ClientT]) -> None:\n        if not await self.interaction_check(interaction):\n            interaction.command_failed = True\n            return\n\n        data: ApplicationCommandInteractionData = interaction.data  # type: ignore\n        type = data.get('type', 1)\n        if type != 1:\n            # Context menu command...\n            await self._call_context_menu(interaction, data, type)\n            return\n\n        command, options = self._get_app_command_options(data)\n\n        # Pre-fill the cached slot to prevent re-computation\n        interaction._cs_command = command\n\n        # At this point options refers to the arguments of the command\n        # and command refers to the class type we care about\n        namespace = Namespace(interaction, data.get('resolved', {}), options)\n\n        # Same pre-fill as above\n        interaction._cs_namespace = namespace\n\n        # Auto complete handles the namespace differently... so at this point this is where we decide where that is.\n        if interaction.type is InteractionType.autocomplete:\n            focused = next((opt['name'] for opt in options if opt.get('focused')), None)\n            if focused is None:\n                raise AppCommandError('This should not happen, but there is no focused element. This is a Discord bug.')\n\n            try:\n                await command._invoke_autocomplete(interaction, focused, namespace)\n            except Exception:\n                # Suppress exception since it can't be handled anyway.\n                _log.exception('Ignoring exception in autocomplete for %r', command.qualified_name)\n\n            return\n\n        try:\n            await command._invoke_with_namespace(interaction, namespace)\n        except AppCommandError as e:\n            interaction.command_failed = True\n            await command._invoke_error_handlers(interaction, e)\n            await self.on_error(interaction, e)\n        else:\n            if not interaction.command_failed:\n                self.client.dispatch('app_command_completion', interaction, command)\n"
  },
  {
    "path": "discord/appinfo.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom __future__ import annotations\n\nfrom typing import List, TYPE_CHECKING, Optional\n\nfrom . import utils\nfrom .asset import Asset\nfrom .flags import ApplicationFlags\nfrom .permissions import Permissions\nfrom .utils import MISSING\n\nif TYPE_CHECKING:\n    from typing import Dict, Any\n\n    from .guild import Guild\n    from .types.appinfo import (\n        AppInfo as AppInfoPayload,\n        PartialAppInfo as PartialAppInfoPayload,\n        Team as TeamPayload,\n        InstallParams as InstallParamsPayload,\n    )\n    from .user import User\n    from .state import ConnectionState\n\n__all__ = (\n    'AppInfo',\n    'PartialAppInfo',\n    'AppInstallParams',\n)\n\n\nclass AppInfo:\n    \"\"\"Represents the application info for the bot provided by Discord.\n\n\n    Attributes\n    -------------\n    id: :class:`int`\n        The application ID.\n    name: :class:`str`\n        The application name.\n    owner: :class:`User`\n        The application owner.\n    team: Optional[:class:`Team`]\n        The application's team.\n\n        .. versionadded:: 1.3\n\n    description: :class:`str`\n        The application description.\n    bot_public: :class:`bool`\n        Whether the bot can be invited by anyone or if it is locked\n        to the application owner.\n    bot_require_code_grant: :class:`bool`\n        Whether the bot requires the completion of the full oauth2 code\n        grant flow to join.\n    rpc_origins: Optional[List[:class:`str`]]\n        A list of RPC origin URLs, if RPC is enabled.\n\n    verify_key: :class:`str`\n        The hex encoded key for verification in interactions and the\n        GameSDK's :ddocs:`GetTicket <game-sdk/applications#getticket>`.\n\n        .. versionadded:: 1.3\n\n    guild_id: Optional[:class:`int`]\n        If this application is a game sold on Discord,\n        this field will be the guild to which it has been linked to.\n\n        .. versionadded:: 1.3\n\n    primary_sku_id: Optional[:class:`int`]\n        If this application is a game sold on Discord,\n        this field will be the id of the \"Game SKU\" that is created,\n        if it exists.\n\n        .. versionadded:: 1.3\n\n    slug: Optional[:class:`str`]\n        If this application is a game sold on Discord,\n        this field will be the URL slug that links to the store page.\n\n        .. versionadded:: 1.3\n\n    terms_of_service_url: Optional[:class:`str`]\n        The application's terms of service URL, if set.\n\n        .. versionadded:: 2.0\n\n    privacy_policy_url: Optional[:class:`str`]\n        The application's privacy policy URL, if set.\n\n        .. versionadded:: 2.0\n\n    tags: List[:class:`str`]\n        The list of tags describing the functionality of the application.\n\n        .. versionadded:: 2.0\n\n    custom_install_url: List[:class:`str`]\n        The custom authorization URL for the application, if enabled.\n\n        .. versionadded:: 2.0\n\n    install_params: Optional[:class:`AppInstallParams`]\n        The settings for custom authorization URL of application, if enabled.\n\n        .. versionadded:: 2.0\n    role_connections_verification_url: Optional[:class:`str`]\n        The application's connection verification URL which will render the application as\n        a verification method in the guild's role verification configuration.\n\n        .. versionadded:: 2.2\n    interactions_endpoint_url: Optional[:class:`str`]\n        The interactions endpoint url of the application to receive interactions over this endpoint rather than\n        over the gateway, if configured.\n\n        .. versionadded:: 2.4\n    redirect_uris: List[:class:`str`]\n        A list of authentication redirect URIs.\n\n        .. versionadded:: 2.4\n    approximate_guild_count: :class:`int`\n        The approximate count of the guilds the bot was added to.\n\n        .. versionadded:: 2.4\n    \"\"\"\n\n    __slots__ = (\n        '_state',\n        'description',\n        'id',\n        'name',\n        'rpc_origins',\n        'bot_public',\n        'bot_require_code_grant',\n        'owner',\n        '_icon',\n        'verify_key',\n        'team',\n        'guild_id',\n        'primary_sku_id',\n        'slug',\n        '_cover_image',\n        '_flags',\n        'terms_of_service_url',\n        'privacy_policy_url',\n        'tags',\n        'custom_install_url',\n        'install_params',\n        'role_connections_verification_url',\n        'interactions_endpoint_url',\n        'redirect_uris',\n        'approximate_guild_count',\n    )\n\n    def __init__(self, state: ConnectionState, data: AppInfoPayload):\n        from .team import Team\n\n        self._state: ConnectionState = state\n        self.id: int = int(data['id'])\n        self.name: str = data['name']\n        self.description: str = data['description']\n        self._icon: Optional[str] = data['icon']\n        self.rpc_origins: Optional[List[str]] = data.get('rpc_origins')\n        self.bot_public: bool = data['bot_public']\n        self.bot_require_code_grant: bool = data['bot_require_code_grant']\n        self.owner: User = state.create_user(data['owner'])\n\n        team: Optional[TeamPayload] = data.get('team')\n        self.team: Optional[Team] = Team(state, team) if team else None\n\n        self.verify_key: str = data['verify_key']\n\n        self.guild_id: Optional[int] = utils._get_as_snowflake(data, 'guild_id')\n\n        self.primary_sku_id: Optional[int] = utils._get_as_snowflake(data, 'primary_sku_id')\n        self.slug: Optional[str] = data.get('slug')\n        self._flags: int = data.get('flags', 0)\n        self._cover_image: Optional[str] = data.get('cover_image')\n        self.terms_of_service_url: Optional[str] = data.get('terms_of_service_url')\n        self.privacy_policy_url: Optional[str] = data.get('privacy_policy_url')\n        self.tags: List[str] = data.get('tags', [])\n        self.custom_install_url: Optional[str] = data.get('custom_install_url')\n        self.role_connections_verification_url: Optional[str] = data.get('role_connections_verification_url')\n\n        params = data.get('install_params')\n        self.install_params: Optional[AppInstallParams] = AppInstallParams(params) if params else None\n        self.interactions_endpoint_url: Optional[str] = data.get('interactions_endpoint_url')\n        self.redirect_uris: List[str] = data.get('redirect_uris', [])\n        self.approximate_guild_count: int = data.get('approximate_guild_count', 0)\n\n    def __repr__(self) -> str:\n        return (\n            f'<{self.__class__.__name__} id={self.id} name={self.name!r} '\n            f'description={self.description!r} public={self.bot_public} '\n            f'owner={self.owner!r}>'\n        )\n\n    @property\n    def icon(self) -> Optional[Asset]:\n        \"\"\"Optional[:class:`.Asset`]: Retrieves the application's icon asset, if any.\"\"\"\n        if self._icon is None:\n            return None\n        return Asset._from_icon(self._state, self.id, self._icon, path='app')\n\n    @property\n    def cover_image(self) -> Optional[Asset]:\n        \"\"\"Optional[:class:`.Asset`]: Retrieves the cover image on a store embed, if any.\n\n        This is only available if the application is a game sold on Discord.\n        \"\"\"\n        if self._cover_image is None:\n            return None\n        return Asset._from_cover_image(self._state, self.id, self._cover_image)\n\n    @property\n    def guild(self) -> Optional[Guild]:\n        \"\"\"Optional[:class:`Guild`]: If this application is a game sold on Discord,\n        this field will be the guild to which it has been linked\n\n        .. versionadded:: 1.3\n        \"\"\"\n        return self._state._get_guild(self.guild_id)\n\n    @property\n    def flags(self) -> ApplicationFlags:\n        \"\"\":class:`ApplicationFlags`: The application's flags.\n\n        .. versionadded:: 2.0\n        \"\"\"\n        return ApplicationFlags._from_value(self._flags)\n\n    async def edit(\n        self,\n        *,\n        reason: Optional[str] = MISSING,\n        custom_install_url: Optional[str] = MISSING,\n        description: Optional[str] = MISSING,\n        role_connections_verification_url: Optional[str] = MISSING,\n        install_params_scopes: Optional[List[str]] = MISSING,\n        install_params_permissions: Optional[Permissions] = MISSING,\n        flags: Optional[ApplicationFlags] = MISSING,\n        icon: Optional[bytes] = MISSING,\n        cover_image: Optional[bytes] = MISSING,\n        interactions_endpoint_url: Optional[str] = MISSING,\n        tags: Optional[List[str]] = MISSING,\n    ) -> AppInfo:\n        r\"\"\"|coro|\n\n        Edits the application info.\n\n        .. versionadded:: 2.4\n\n        Parameters\n        ----------\n        custom_install_url: Optional[:class:`str`]\n            The new custom authorization URL for the application. Can be ``None`` to remove the URL.\n        description: Optional[:class:`str`]\n            The new application description. Can be ``None`` to remove the description.\n        role_connections_verification_url: Optional[:class:`str`]\n            The new application’s connection verification URL which will render the application\n            as a verification method in the guild’s role verification configuration. Can be ``None`` to remove the URL.\n        install_params_scopes: Optional[List[:class:`str`]]\n            The new list of :ddocs:`OAuth2 scopes <topics/oauth2#shared-resources-oauth2-scopes>` of\n            the :attr:`~install_params`. Can be ``None`` to remove the scopes.\n        install_params_permissions: Optional[:class:`Permissions`]\n            The new permissions of the :attr:`~install_params`. Can be ``None`` to remove the permissions.\n        flags: Optional[:class:`ApplicationFlags`]\n            The new application’s flags. Only limited intent flags (:attr:`~ApplicationFlags.gateway_presence_limited`,\n            :attr:`~ApplicationFlags.gateway_guild_members_limited`, :attr:`~ApplicationFlags.gateway_message_content_limited`)\n            can be edited. Can be ``None`` to remove the flags.\n\n            .. warning::\n\n                Editing the limited intent flags leads to the termination of the bot.\n\n        icon: Optional[:class:`bytes`]\n            The new application’s icon as a :term:`py:bytes-like object`. Can be ``None`` to remove the icon.\n        cover_image: Optional[:class:`bytes`]\n            The new application’s cover image as a :term:`py:bytes-like object` on a store embed.\n            The cover image is only available if the application is a game sold on Discord.\n            Can be ``None`` to remove the image.\n        interactions_endpoint_url: Optional[:class:`str`]\n            The new interactions endpoint url of the application to receive interactions over this endpoint rather than\n            over the gateway. Can be ``None`` to remove the URL.\n        tags: Optional[List[:class:`str`]]\n            The new list of tags describing the functionality of the application. Can be ``None`` to remove the tags.\n        reason: Optional[:class:`str`]\n            The reason for editing the application. Shows up on the audit log.\n\n        Raises\n        -------\n        HTTPException\n            Editing the application failed\n        ValueError\n            The image format passed in to ``icon`` or ``cover_image`` is invalid. This is also raised\n            when ``install_params_scopes`` and ``install_params_permissions`` are incompatible with each other.\n\n        Returns\n        -------\n        :class:`AppInfo`\n            The newly updated application info.\n        \"\"\"\n        payload: Dict[str, Any] = {}\n\n        if custom_install_url is not MISSING:\n            payload['custom_install_url'] = custom_install_url\n\n        if description is not MISSING:\n            payload['description'] = description\n\n        if role_connections_verification_url is not MISSING:\n            payload['role_connections_verification_url'] = role_connections_verification_url\n\n        if install_params_scopes is not MISSING:\n            install_params: Optional[Dict[str, Any]] = {}\n            if install_params_scopes is None:\n                install_params = None\n            else:\n                if \"bot\" not in install_params_scopes and install_params_permissions is not MISSING:\n                    raise ValueError(\"'bot' must be in install_params_scopes if install_params_permissions is set\")\n\n                install_params['scopes'] = install_params_scopes\n\n                if install_params_permissions is MISSING:\n                    install_params['permissions'] = 0\n                else:\n                    if install_params_permissions is None:\n                        install_params['permissions'] = 0\n                    else:\n                        install_params['permissions'] = install_params_permissions.value\n\n            payload['install_params'] = install_params\n\n        else:\n            if install_params_permissions is not MISSING:\n                raise ValueError(\"install_params_scopes must be set if install_params_permissions is set\")\n\n        if flags is not MISSING:\n            if flags is None:\n                payload['flags'] = flags\n            else:\n                payload['flags'] = flags.value\n\n        if icon is not MISSING:\n            if icon is None:\n                payload['icon'] = icon\n            else:\n                payload['icon'] = utils._bytes_to_base64_data(icon)\n\n        if cover_image is not MISSING:\n            if cover_image is None:\n                payload['cover_image'] = cover_image\n            else:\n                payload['cover_image'] = utils._bytes_to_base64_data(cover_image)\n\n        if interactions_endpoint_url is not MISSING:\n            payload['interactions_endpoint_url'] = interactions_endpoint_url\n\n        if tags is not MISSING:\n            payload['tags'] = tags\n        data = await self._state.http.edit_application_info(reason=reason, payload=payload)\n        return AppInfo(data=data, state=self._state)\n\n\nclass PartialAppInfo:\n    \"\"\"Represents a partial AppInfo given by :func:`~discord.abc.GuildChannel.create_invite`\n\n    .. versionadded:: 2.0\n\n    Attributes\n    -------------\n    id: :class:`int`\n        The application ID.\n    name: :class:`str`\n        The application name.\n    description: :class:`str`\n        The application description.\n    rpc_origins: Optional[List[:class:`str`]]\n        A list of RPC origin URLs, if RPC is enabled.\n    verify_key: :class:`str`\n        The hex encoded key for verification in interactions and the\n        GameSDK's :ddocs:`GetTicket <game-sdk/applications#getticket>`.\n    terms_of_service_url: Optional[:class:`str`]\n        The application's terms of service URL, if set.\n    privacy_policy_url: Optional[:class:`str`]\n        The application's privacy policy URL, if set.\n    approximate_guild_count: :class:`int`\n        The approximate count of the guilds the bot was added to.\n\n        .. versionadded:: 2.3\n    redirect_uris: List[:class:`str`]\n        A list of authentication redirect URIs.\n\n        .. versionadded:: 2.3\n    interactions_endpoint_url: Optional[:class:`str`]\n        The interactions endpoint url of the application to receive interactions over this endpoint rather than\n        over the gateway, if configured.\n\n        .. versionadded:: 2.3\n    role_connections_verification_url: Optional[:class:`str`]\n        The application's connection verification URL which will render the application as\n        a verification method in the guild's role verification configuration.\n\n        .. versionadded:: 2.3\n    \"\"\"\n\n    __slots__ = (\n        '_state',\n        'id',\n        'name',\n        'description',\n        'rpc_origins',\n        'verify_key',\n        'terms_of_service_url',\n        'privacy_policy_url',\n        '_icon',\n        '_flags',\n        '_cover_image',\n        'approximate_guild_count',\n        'redirect_uris',\n        'interactions_endpoint_url',\n        'role_connections_verification_url',\n    )\n\n    def __init__(self, *, state: ConnectionState, data: PartialAppInfoPayload):\n        self._state: ConnectionState = state\n        self.id: int = int(data['id'])\n        self.name: str = data['name']\n        self._icon: Optional[str] = data.get('icon')\n        self._flags: int = data.get('flags', 0)\n        self._cover_image: Optional[str] = data.get('cover_image')\n        self.description: str = data['description']\n        self.rpc_origins: Optional[List[str]] = data.get('rpc_origins')\n        self.verify_key: str = data['verify_key']\n        self.terms_of_service_url: Optional[str] = data.get('terms_of_service_url')\n        self.privacy_policy_url: Optional[str] = data.get('privacy_policy_url')\n        self.approximate_guild_count: int = data.get('approximate_guild_count', 0)\n        self.redirect_uris: List[str] = data.get('redirect_uris', [])\n        self.interactions_endpoint_url: Optional[str] = data.get('interactions_endpoint_url')\n        self.role_connections_verification_url: Optional[str] = data.get('role_connections_verification_url')\n\n    def __repr__(self) -> str:\n        return f'<{self.__class__.__name__} id={self.id} name={self.name!r} description={self.description!r}>'\n\n    @property\n    def icon(self) -> Optional[Asset]:\n        \"\"\"Optional[:class:`.Asset`]: Retrieves the application's icon asset, if any.\"\"\"\n        if self._icon is None:\n            return None\n        return Asset._from_icon(self._state, self.id, self._icon, path='app')\n\n    @property\n    def cover_image(self) -> Optional[Asset]:\n        \"\"\"Optional[:class:`.Asset`]: Retrieves the cover image of the application's default rich presence.\n\n        This is only available if the application is a game sold on Discord.\n\n        .. versionadded:: 2.3\n        \"\"\"\n        if self._cover_image is None:\n            return None\n        return Asset._from_cover_image(self._state, self.id, self._cover_image)\n\n    @property\n    def flags(self) -> ApplicationFlags:\n        \"\"\":class:`ApplicationFlags`: The application's flags.\n\n        .. versionadded:: 2.0\n        \"\"\"\n        return ApplicationFlags._from_value(self._flags)\n\n\nclass AppInstallParams:\n    \"\"\"Represents the settings for custom authorization URL of an application.\n\n    .. versionadded:: 2.0\n\n    Attributes\n    ----------\n    scopes: List[:class:`str`]\n        The list of :ddocs:`OAuth2 scopes <topics/oauth2#shared-resources-oauth2-scopes>`\n        to add the application to a guild with.\n    permissions: :class:`Permissions`\n        The permissions to give to application in the guild.\n    \"\"\"\n\n    __slots__ = ('scopes', 'permissions')\n\n    def __init__(self, data: InstallParamsPayload) -> None:\n        self.scopes: List[str] = data.get('scopes', [])\n        self.permissions: Permissions = Permissions(int(data['permissions']))\n"
  },
  {
    "path": "discord/asset.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom __future__ import annotations\n\nimport io\nimport os\nfrom typing import Any, Literal, Optional, TYPE_CHECKING, Tuple, Union\nfrom .errors import DiscordException\nfrom . import utils\nfrom .file import File\n\nimport yarl\n\n# fmt: off\n__all__ = (\n    'Asset',\n)\n# fmt: on\n\nif TYPE_CHECKING:\n    from typing_extensions import Self\n\n    from .state import ConnectionState\n    from .webhook.async_ import _WebhookState\n\n    _State = Union[ConnectionState, _WebhookState]\n\n    ValidStaticFormatTypes = Literal['webp', 'jpeg', 'jpg', 'png']\n    ValidAssetFormatTypes = Literal['webp', 'jpeg', 'jpg', 'png', 'gif']\n\nVALID_STATIC_FORMATS = frozenset({\"jpeg\", \"jpg\", \"webp\", \"png\"})\nVALID_ASSET_FORMATS = VALID_STATIC_FORMATS | {\"gif\"}\n\n\nMISSING = utils.MISSING\n\n\nclass AssetMixin:\n    __slots__ = ()\n    url: str\n    _state: Optional[Any]\n\n    async def read(self) -> bytes:\n        \"\"\"|coro|\n\n        Retrieves the content of this asset as a :class:`bytes` object.\n\n        Raises\n        ------\n        DiscordException\n            There was no internal connection state.\n        HTTPException\n            Downloading the asset failed.\n        NotFound\n            The asset was deleted.\n\n        Returns\n        -------\n        :class:`bytes`\n            The content of the asset.\n        \"\"\"\n        if self._state is None:\n            raise DiscordException('Invalid state (no ConnectionState provided)')\n\n        return await self._state.http.get_from_cdn(self.url)\n\n    async def save(self, fp: Union[str, bytes, os.PathLike[Any], io.BufferedIOBase], *, seek_begin: bool = True) -> int:\n        \"\"\"|coro|\n\n        Saves this asset into a file-like object.\n\n        Parameters\n        ----------\n        fp: Union[:class:`io.BufferedIOBase`, :class:`os.PathLike`]\n            The file-like object to save this asset to or the filename\n            to use. If a filename is passed then a file is created with that\n            filename and used instead.\n        seek_begin: :class:`bool`\n            Whether to seek to the beginning of the file after saving is\n            successfully done.\n\n        Raises\n        ------\n        DiscordException\n            There was no internal connection state.\n        HTTPException\n            Downloading the asset failed.\n        NotFound\n            The asset was deleted.\n\n        Returns\n        --------\n        :class:`int`\n            The number of bytes written.\n        \"\"\"\n\n        data = await self.read()\n        if isinstance(fp, io.BufferedIOBase):\n            written = fp.write(data)\n            if seek_begin:\n                fp.seek(0)\n            return written\n        else:\n            with open(fp, 'wb') as f:\n                return f.write(data)\n\n    async def to_file(\n        self,\n        *,\n        filename: Optional[str] = MISSING,\n        description: Optional[str] = None,\n        spoiler: bool = False,\n    ) -> File:\n        \"\"\"|coro|\n\n        Converts the asset into a :class:`File` suitable for sending via\n        :meth:`abc.Messageable.send`.\n\n        .. versionadded:: 2.0\n\n        Parameters\n        -----------\n        filename: Optional[:class:`str`]\n            The filename of the file. If not provided, then the filename from\n            the asset's URL is used.\n        description: Optional[:class:`str`]\n            The description for the file.\n        spoiler: :class:`bool`\n            Whether the file is a spoiler.\n\n        Raises\n        ------\n        DiscordException\n            The asset does not have an associated state.\n        ValueError\n            The asset is a unicode emoji.\n        TypeError\n            The asset is a sticker with lottie type.\n        HTTPException\n            Downloading the asset failed.\n        NotFound\n            The asset was deleted.\n\n        Returns\n        -------\n        :class:`File`\n            The asset as a file suitable for sending.\n        \"\"\"\n\n        data = await self.read()\n        file_filename = filename if filename is not MISSING else yarl.URL(self.url).name\n        return File(io.BytesIO(data), filename=file_filename, description=description, spoiler=spoiler)\n\n\nclass Asset(AssetMixin):\n    \"\"\"Represents a CDN asset on Discord.\n\n    .. container:: operations\n\n        .. describe:: str(x)\n\n            Returns the URL of the CDN asset.\n\n        .. describe:: len(x)\n\n            Returns the length of the CDN asset's URL.\n\n        .. describe:: x == y\n\n            Checks if the asset is equal to another asset.\n\n        .. describe:: x != y\n\n            Checks if the asset is not equal to another asset.\n\n        .. describe:: hash(x)\n\n            Returns the hash of the asset.\n    \"\"\"\n\n    __slots__: Tuple[str, ...] = (\n        '_state',\n        '_url',\n        '_animated',\n        '_key',\n    )\n\n    BASE = 'https://cdn.discordapp.com'\n\n    def __init__(self, state: _State, *, url: str, key: str, animated: bool = False) -> None:\n        self._state: _State = state\n        self._url: str = url\n        self._animated: bool = animated\n        self._key: str = key\n\n    @classmethod\n    def _from_default_avatar(cls, state: _State, index: int) -> Self:\n        return cls(\n            state,\n            url=f'{cls.BASE}/embed/avatars/{index}.png',\n            key=str(index),\n            animated=False,\n        )\n\n    @classmethod\n    def _from_avatar(cls, state: _State, user_id: int, avatar: str) -> Self:\n        animated = avatar.startswith('a_')\n        format = 'gif' if animated else 'png'\n        return cls(\n            state,\n            url=f'{cls.BASE}/avatars/{user_id}/{avatar}.{format}?size=1024',\n            key=avatar,\n            animated=animated,\n        )\n\n    @classmethod\n    def _from_guild_avatar(cls, state: _State, guild_id: int, member_id: int, avatar: str) -> Self:\n        animated = avatar.startswith('a_')\n        format = 'gif' if animated else 'png'\n        return cls(\n            state,\n            url=f\"{cls.BASE}/guilds/{guild_id}/users/{member_id}/avatars/{avatar}.{format}?size=1024\",\n            key=avatar,\n            animated=animated,\n        )\n\n    @classmethod\n    def _from_guild_banner(cls, state: _State, guild_id: int, member_id: int, banner: str) -> Self:\n        animated = banner.startswith('a_')\n        format = 'gif' if animated else 'png'\n        return cls(\n            state,\n            url=f\"{cls.BASE}/guilds/{guild_id}/users/{member_id}/banners/{banner}.{format}?size=1024\",\n            key=banner,\n            animated=animated,\n        )\n\n    @classmethod\n    def _from_avatar_decoration(cls, state: _State, avatar_decoration: str) -> Self:\n        return cls(\n            state,\n            url=f'{cls.BASE}/avatar-decoration-presets/{avatar_decoration}.png?size=96',\n            key=avatar_decoration,\n            animated=True,\n        )\n\n    @classmethod\n    def _from_icon(cls, state: _State, object_id: int, icon_hash: str, path: str) -> Self:\n        return cls(\n            state,\n            url=f'{cls.BASE}/{path}-icons/{object_id}/{icon_hash}.png?size=1024',\n            key=icon_hash,\n            animated=False,\n        )\n\n    @classmethod\n    def _from_app_icon(\n        cls, state: _State, object_id: int, icon_hash: str, asset_type: Literal['icon', 'cover_image']\n    ) -> Self:\n        return cls(\n            state,\n            url=f'{cls.BASE}/app-icons/{object_id}/{asset_type}.png?size=1024',\n            key=icon_hash,\n            animated=False,\n        )\n\n    @classmethod\n    def _from_cover_image(cls, state: _State, object_id: int, cover_image_hash: str) -> Self:\n        return cls(\n            state,\n            url=f'{cls.BASE}/app-assets/{object_id}/store/{cover_image_hash}.png?size=1024',\n            key=cover_image_hash,\n            animated=False,\n        )\n\n    @classmethod\n    def _from_scheduled_event_cover_image(cls, state: _State, scheduled_event_id: int, cover_image_hash: str) -> Self:\n        return cls(\n            state,\n            url=f'{cls.BASE}/guild-events/{scheduled_event_id}/{cover_image_hash}.png?size=1024',\n            key=cover_image_hash,\n            animated=False,\n        )\n\n    @classmethod\n    def _from_guild_image(cls, state: _State, guild_id: int, image: str, path: str) -> Self:\n        animated = image.startswith('a_')\n        format = 'gif' if animated else 'png'\n        return cls(\n            state,\n            url=f'{cls.BASE}/{path}/{guild_id}/{image}.{format}?size=1024',\n            key=image,\n            animated=animated,\n        )\n\n    @classmethod\n    def _from_guild_icon(cls, state: _State, guild_id: int, icon_hash: str) -> Self:\n        animated = icon_hash.startswith('a_')\n        format = 'gif' if animated else 'png'\n        return cls(\n            state,\n            url=f'{cls.BASE}/icons/{guild_id}/{icon_hash}.{format}?size=1024',\n            key=icon_hash,\n            animated=animated,\n        )\n\n    @classmethod\n    def _from_sticker_banner(cls, state: _State, banner: int) -> Self:\n        return cls(\n            state,\n            url=f'{cls.BASE}/app-assets/710982414301790216/store/{banner}.png',\n            key=str(banner),\n            animated=False,\n        )\n\n    @classmethod\n    def _from_user_banner(cls, state: _State, user_id: int, banner_hash: str) -> Self:\n        animated = banner_hash.startswith('a_')\n        format = 'gif' if animated else 'png'\n        return cls(\n            state,\n            url=f'{cls.BASE}/banners/{user_id}/{banner_hash}.{format}?size=512',\n            key=banner_hash,\n            animated=animated,\n        )\n\n    def __str__(self) -> str:\n        return self._url\n\n    def __len__(self) -> int:\n        return len(self._url)\n\n    def __repr__(self) -> str:\n        shorten = self._url.replace(self.BASE, '')\n        return f'<Asset url={shorten!r}>'\n\n    def __eq__(self, other: object) -> bool:\n        return isinstance(other, Asset) and self._url == other._url\n\n    def __hash__(self) -> int:\n        return hash(self._url)\n\n    @property\n    def url(self) -> str:\n        \"\"\":class:`str`: Returns the underlying URL of the asset.\"\"\"\n        return self._url\n\n    @property\n    def key(self) -> str:\n        \"\"\":class:`str`: Returns the identifying key of the asset.\"\"\"\n        return self._key\n\n    def is_animated(self) -> bool:\n        \"\"\":class:`bool`: Returns whether the asset is animated.\"\"\"\n        return self._animated\n\n    def replace(\n        self,\n        *,\n        size: int = MISSING,\n        format: ValidAssetFormatTypes = MISSING,\n        static_format: ValidStaticFormatTypes = MISSING,\n    ) -> Self:\n        \"\"\"Returns a new asset with the passed components replaced.\n\n\n        .. versionchanged:: 2.0\n            ``static_format`` is now preferred over ``format``\n            if both are present and the asset is not animated.\n\n        .. versionchanged:: 2.0\n            This function will now raise :exc:`ValueError` instead of\n            ``InvalidArgument``.\n\n        Parameters\n        -----------\n        size: :class:`int`\n            The new size of the asset.\n        format: :class:`str`\n            The new format to change it to. Must be either\n            'webp', 'jpeg', 'jpg', 'png', or 'gif' if it's animated.\n        static_format: :class:`str`\n            The new format to change it to if the asset isn't animated.\n            Must be either 'webp', 'jpeg', 'jpg', or 'png'.\n\n        Raises\n        -------\n        ValueError\n            An invalid size or format was passed.\n\n        Returns\n        --------\n        :class:`Asset`\n            The newly updated asset.\n        \"\"\"\n        url = yarl.URL(self._url)\n        path, _ = os.path.splitext(url.path)\n\n        if format is not MISSING:\n            if self._animated:\n                if format not in VALID_ASSET_FORMATS:\n                    raise ValueError(f'format must be one of {VALID_ASSET_FORMATS}')\n            else:\n                if static_format is MISSING and format not in VALID_STATIC_FORMATS:\n                    raise ValueError(f'format must be one of {VALID_STATIC_FORMATS}')\n            url = url.with_path(f'{path}.{format}')\n\n        if static_format is not MISSING and not self._animated:\n            if static_format not in VALID_STATIC_FORMATS:\n                raise ValueError(f'static_format must be one of {VALID_STATIC_FORMATS}')\n            url = url.with_path(f'{path}.{static_format}')\n\n        if size is not MISSING:\n            if not utils.valid_icon_size(size):\n                raise ValueError('size must be a power of 2 between 16 and 4096')\n            url = url.with_query(size=size)\n        else:\n            url = url.with_query(url.raw_query_string)\n\n        url = str(url)\n        return self.__class__(state=self._state, url=url, key=self._key, animated=self._animated)\n\n    def with_size(self, size: int, /) -> Self:\n        \"\"\"Returns a new asset with the specified size.\n\n        .. versionchanged:: 2.0\n            This function will now raise :exc:`ValueError` instead of\n            ``InvalidArgument``.\n\n        Parameters\n        ------------\n        size: :class:`int`\n            The new size of the asset.\n\n        Raises\n        -------\n        ValueError\n            The asset had an invalid size.\n\n        Returns\n        --------\n        :class:`Asset`\n            The new updated asset.\n        \"\"\"\n        if not utils.valid_icon_size(size):\n            raise ValueError('size must be a power of 2 between 16 and 4096')\n\n        url = str(yarl.URL(self._url).with_query(size=size))\n        return self.__class__(state=self._state, url=url, key=self._key, animated=self._animated)\n\n    def with_format(self, format: ValidAssetFormatTypes, /) -> Self:\n        \"\"\"Returns a new asset with the specified format.\n\n        .. versionchanged:: 2.0\n            This function will now raise :exc:`ValueError` instead of\n            ``InvalidArgument``.\n\n        Parameters\n        ------------\n        format: :class:`str`\n            The new format of the asset.\n\n        Raises\n        -------\n        ValueError\n            The asset had an invalid format.\n\n        Returns\n        --------\n        :class:`Asset`\n            The new updated asset.\n        \"\"\"\n\n        if self._animated:\n            if format not in VALID_ASSET_FORMATS:\n                raise ValueError(f'format must be one of {VALID_ASSET_FORMATS}')\n        else:\n            if format not in VALID_STATIC_FORMATS:\n                raise ValueError(f'format must be one of {VALID_STATIC_FORMATS}')\n\n        url = yarl.URL(self._url)\n        path, _ = os.path.splitext(url.path)\n        url = str(url.with_path(f'{path}.{format}').with_query(url.raw_query_string))\n        return self.__class__(state=self._state, url=url, key=self._key, animated=self._animated)\n\n    def with_static_format(self, format: ValidStaticFormatTypes, /) -> Self:\n        \"\"\"Returns a new asset with the specified static format.\n\n        This only changes the format if the underlying asset is\n        not animated. Otherwise, the asset is not changed.\n\n        .. versionchanged:: 2.0\n            This function will now raise :exc:`ValueError` instead of\n            ``InvalidArgument``.\n\n        Parameters\n        ------------\n        format: :class:`str`\n            The new static format of the asset.\n\n        Raises\n        -------\n        ValueError\n            The asset had an invalid format.\n\n        Returns\n        --------\n        :class:`Asset`\n            The new updated asset.\n        \"\"\"\n\n        if self._animated:\n            return self\n        return self.with_format(format)\n"
  },
  {
    "path": "discord/audit_logs.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom __future__ import annotations\n\nfrom typing import TYPE_CHECKING, Any, Callable, ClassVar, Mapping, Generator, List, Optional, Tuple, Type, TypeVar, Union\n\nfrom . import enums, flags, utils\nfrom .asset import Asset\nfrom .colour import Colour\nfrom .invite import Invite\nfrom .mixins import Hashable\nfrom .object import Object\nfrom .permissions import PermissionOverwrite, Permissions\nfrom .automod import AutoModTrigger, AutoModRuleAction, AutoModRule\nfrom .role import Role\nfrom .emoji import Emoji\nfrom .partial_emoji import PartialEmoji\nfrom .member import Member\nfrom .scheduled_event import ScheduledEvent\nfrom .stage_instance import StageInstance\nfrom .sticker import GuildSticker\nfrom .threads import Thread\nfrom .integrations import PartialIntegration\nfrom .channel import ForumChannel, StageChannel, ForumTag\n\n__all__ = (\n    'AuditLogDiff',\n    'AuditLogChanges',\n    'AuditLogEntry',\n)\n\n\nif TYPE_CHECKING:\n    import datetime\n\n    from . import abc\n    from .guild import Guild\n    from .state import ConnectionState\n    from .types.audit_log import (\n        AuditLogChange as AuditLogChangePayload,\n        AuditLogEntry as AuditLogEntryPayload,\n        _AuditLogChange_TriggerMetadata as AuditLogChangeTriggerMetadataPayload,\n    )\n    from .types.channel import (\n        PermissionOverwrite as PermissionOverwritePayload,\n        ForumTag as ForumTagPayload,\n        DefaultReaction as DefaultReactionPayload,\n    )\n    from .types.invite import Invite as InvitePayload\n    from .types.role import Role as RolePayload\n    from .types.snowflake import Snowflake\n    from .types.command import ApplicationCommandPermissions\n    from .types.automod import AutoModerationAction\n    from .user import User\n    from .app_commands import AppCommand\n    from .webhook import Webhook\n\n    TargetType = Union[\n        Guild,\n        abc.GuildChannel,\n        Member,\n        User,\n        Role,\n        Invite,\n        Emoji,\n        StageInstance,\n        GuildSticker,\n        Thread,\n        Object,\n        PartialIntegration,\n        AutoModRule,\n        ScheduledEvent,\n        Webhook,\n        AppCommand,\n        None,\n    ]\n\n\ndef _transform_timestamp(entry: AuditLogEntry, data: Optional[str]) -> Optional[datetime.datetime]:\n    return utils.parse_time(data)\n\n\ndef _transform_color(entry: AuditLogEntry, data: int) -> Colour:\n    return Colour(data)\n\n\ndef _transform_snowflake(entry: AuditLogEntry, data: Snowflake) -> int:\n    return int(data)\n\n\ndef _transform_channel(entry: AuditLogEntry, data: Optional[Snowflake]) -> Optional[Union[abc.GuildChannel, Object]]:\n    if data is None:\n        return None\n    return entry.guild.get_channel(int(data)) or Object(id=data)\n\n\ndef _transform_channels_or_threads(\n    entry: AuditLogEntry, data: List[Snowflake]\n) -> List[Union[abc.GuildChannel, Thread, Object]]:\n    return [entry.guild.get_channel_or_thread(int(data)) or Object(id=data) for data in data]\n\n\ndef _transform_member_id(entry: AuditLogEntry, data: Optional[Snowflake]) -> Union[Member, User, None]:\n    if data is None:\n        return None\n    return entry._get_member(int(data))\n\n\ndef _transform_guild_id(entry: AuditLogEntry, data: Optional[Snowflake]) -> Optional[Guild]:\n    if data is None:\n        return None\n    return entry._state._get_guild(int(data))\n\n\ndef _transform_roles(entry: AuditLogEntry, data: List[Snowflake]) -> List[Union[Role, Object]]:\n    return [entry.guild.get_role(int(role_id)) or Object(role_id, type=Role) for role_id in data]\n\n\ndef _transform_applied_forum_tags(entry: AuditLogEntry, data: List[Snowflake]) -> List[Union[ForumTag, Object]]:\n    thread = entry.target\n    if isinstance(thread, Thread) and isinstance(thread.parent, ForumChannel):\n        return [thread.parent.get_tag(tag_id) or Object(id=tag_id, type=ForumTag) for tag_id in map(int, data)]\n    return [Object(id=tag_id, type=ForumTag) for tag_id in data]\n\n\ndef _transform_overloaded_flags(entry: AuditLogEntry, data: int) -> Union[int, flags.ChannelFlags]:\n    # The `flags` key is definitely overloaded. Right now it's for channels and threads but\n    # I am aware of `member.flags` and `user.flags` existing. However, this does not impact audit logs\n    # at the moment but better safe than sorry.\n    channel_audit_log_types = (\n        enums.AuditLogAction.channel_create,\n        enums.AuditLogAction.channel_update,\n        enums.AuditLogAction.channel_delete,\n        enums.AuditLogAction.thread_create,\n        enums.AuditLogAction.thread_update,\n        enums.AuditLogAction.thread_delete,\n    )\n\n    if entry.action in channel_audit_log_types:\n        return flags.ChannelFlags._from_value(data)\n    return data\n\n\ndef _transform_forum_tags(entry: AuditLogEntry, data: List[ForumTagPayload]) -> List[ForumTag]:\n    return [ForumTag.from_data(state=entry._state, data=d) for d in data]\n\n\ndef _transform_default_reaction(entry: AuditLogEntry, data: DefaultReactionPayload) -> Optional[PartialEmoji]:\n    if data is None:\n        return None\n\n    emoji_name = data.get('emoji_name') or ''\n    emoji_id = utils._get_as_snowflake(data, 'emoji_id') or None  # Coerce 0 -> None\n    return PartialEmoji.with_state(state=entry._state, name=emoji_name, id=emoji_id)\n\n\ndef _transform_overwrites(\n    entry: AuditLogEntry, data: List[PermissionOverwritePayload]\n) -> List[Tuple[Object, PermissionOverwrite]]:\n    overwrites = []\n    for elem in data:\n        allow = Permissions(int(elem['allow']))\n        deny = Permissions(int(elem['deny']))\n        ow = PermissionOverwrite.from_pair(allow, deny)\n\n        ow_type = elem['type']\n        ow_id = int(elem['id'])\n        target = None\n        if ow_type == '0':\n            target = entry.guild.get_role(ow_id)\n        elif ow_type == '1':\n            target = entry._get_member(ow_id)\n\n        if target is None:\n            target = Object(id=ow_id, type=Role if ow_type == '0' else Member)\n\n        overwrites.append((target, ow))\n\n    return overwrites\n\n\ndef _transform_icon(entry: AuditLogEntry, data: Optional[str]) -> Optional[Asset]:\n    if data is None:\n        return None\n    if entry.action is enums.AuditLogAction.guild_update:\n        return Asset._from_guild_icon(entry._state, entry.guild.id, data)\n    else:\n        return Asset._from_icon(entry._state, entry._target_id, data, path='role')  # type: ignore # target_id won't be None in this case\n\n\ndef _transform_avatar(entry: AuditLogEntry, data: Optional[str]) -> Optional[Asset]:\n    if data is None:\n        return None\n    return Asset._from_avatar(entry._state, entry._target_id, data)  # type: ignore # target_id won't be None in this case\n\n\ndef _transform_cover_image(entry: AuditLogEntry, data: Optional[str]) -> Optional[Asset]:\n    if data is None:\n        return None\n    return Asset._from_scheduled_event_cover_image(entry._state, entry._target_id, data)  # type: ignore # target_id won't be None in this case\n\n\ndef _guild_hash_transformer(path: str) -> Callable[[AuditLogEntry, Optional[str]], Optional[Asset]]:\n    def _transform(entry: AuditLogEntry, data: Optional[str]) -> Optional[Asset]:\n        if data is None:\n            return None\n        return Asset._from_guild_image(entry._state, entry.guild.id, data, path=path)\n\n    return _transform\n\n\ndef _transform_automod_actions(entry: AuditLogEntry, data: List[AutoModerationAction]) -> List[AutoModRuleAction]:\n    return [AutoModRuleAction.from_data(action) for action in data]\n\n\nE = TypeVar('E', bound=enums.Enum)\n\n\ndef _enum_transformer(enum: Type[E]) -> Callable[[AuditLogEntry, int], E]:\n    def _transform(entry: AuditLogEntry, data: int) -> E:\n        return enums.try_enum(enum, data)\n\n    return _transform\n\n\nF = TypeVar('F', bound=flags.BaseFlags)\n\n\ndef _flag_transformer(cls: Type[F]) -> Callable[[AuditLogEntry, Union[int, str]], F]:\n    def _transform(entry: AuditLogEntry, data: Union[int, str]) -> F:\n        return cls._from_value(int(data))\n\n    return _transform\n\n\ndef _transform_type(\n    entry: AuditLogEntry, data: Union[int, str]\n) -> Union[enums.ChannelType, enums.StickerType, enums.WebhookType, str]:\n    if entry.action.name.startswith('sticker_'):\n        return enums.try_enum(enums.StickerType, data)\n    elif entry.action.name.startswith('integration_'):\n        return data  # type: ignore  # integration type is str\n    elif entry.action.name.startswith('webhook_'):\n        return enums.try_enum(enums.WebhookType, data)\n    else:\n        return enums.try_enum(enums.ChannelType, data)\n\n\nclass AuditLogDiff:\n    def __len__(self) -> int:\n        return len(self.__dict__)\n\n    def __iter__(self) -> Generator[Tuple[str, Any], None, None]:\n        yield from self.__dict__.items()\n\n    def __repr__(self) -> str:\n        values = ' '.join('%s=%r' % item for item in self.__dict__.items())\n        return f'<AuditLogDiff {values}>'\n\n    if TYPE_CHECKING:\n\n        def __getattr__(self, item: str) -> Any:\n            ...\n\n        def __setattr__(self, key: str, value: Any) -> Any:\n            ...\n\n\nTransformer = Callable[[\"AuditLogEntry\", Any], Any]\n\n\nclass AuditLogChanges:\n    # fmt: off\n    TRANSFORMERS: ClassVar[Mapping[str, Tuple[Optional[str], Optional[Transformer]]]] = {\n        'verification_level':                    (None, _enum_transformer(enums.VerificationLevel)),\n        'explicit_content_filter':               (None, _enum_transformer(enums.ContentFilter)),\n        'allow':                                 (None, _flag_transformer(Permissions)),\n        'deny':                                  (None, _flag_transformer(Permissions)),\n        'permissions':                           (None, _flag_transformer(Permissions)),\n        'id':                                    (None, _transform_snowflake),\n        'color':                                 ('colour', _transform_color),\n        'owner_id':                              ('owner', _transform_member_id),\n        'inviter_id':                            ('inviter', _transform_member_id),\n        'channel_id':                            ('channel', _transform_channel),\n        'afk_channel_id':                        ('afk_channel', _transform_channel),\n        'system_channel_id':                     ('system_channel', _transform_channel),\n        'system_channel_flags':                  (None, _flag_transformer(flags.SystemChannelFlags)),\n        'widget_channel_id':                     ('widget_channel', _transform_channel),\n        'rules_channel_id':                      ('rules_channel', _transform_channel),\n        'public_updates_channel_id':             ('public_updates_channel', _transform_channel),\n        'permission_overwrites':                 ('overwrites', _transform_overwrites),\n        'splash_hash':                           ('splash', _guild_hash_transformer('splashes')),\n        'banner_hash':                           ('banner', _guild_hash_transformer('banners')),\n        'discovery_splash_hash':                 ('discovery_splash', _guild_hash_transformer('discovery-splashes')),\n        'icon_hash':                             ('icon', _transform_icon),\n        'avatar_hash':                           ('avatar', _transform_avatar),\n        'rate_limit_per_user':                   ('slowmode_delay', None),\n        'default_thread_rate_limit_per_user':    ('default_thread_slowmode_delay', None),\n        'guild_id':                              ('guild', _transform_guild_id),\n        'tags':                                  ('emoji', None),\n        'default_message_notifications':         ('default_notifications', _enum_transformer(enums.NotificationLevel)),\n        'video_quality_mode':                    (None, _enum_transformer(enums.VideoQualityMode)),\n        'privacy_level':                         (None, _enum_transformer(enums.PrivacyLevel)),\n        'format_type':                           (None, _enum_transformer(enums.StickerFormatType)),\n        'type':                                  (None, _transform_type),\n        'communication_disabled_until':          ('timed_out_until', _transform_timestamp),\n        'expire_behavior':                       (None, _enum_transformer(enums.ExpireBehaviour)),\n        'mfa_level':                             (None, _enum_transformer(enums.MFALevel)),\n        'status':                                (None, _enum_transformer(enums.EventStatus)),\n        'entity_type':                           (None, _enum_transformer(enums.EntityType)),\n        'preferred_locale':                      (None, _enum_transformer(enums.Locale)),\n        'image_hash':                            ('cover_image', _transform_cover_image),\n        'trigger_type':                          (None, _enum_transformer(enums.AutoModRuleTriggerType)),\n        'event_type':                            (None, _enum_transformer(enums.AutoModRuleEventType)),\n        'actions':                               (None, _transform_automod_actions),\n        'exempt_channels':                       (None, _transform_channels_or_threads),\n        'exempt_roles':                          (None, _transform_roles),\n        'applied_tags':                          (None, _transform_applied_forum_tags),\n        'available_tags':                        (None, _transform_forum_tags),\n        'flags':                                 (None, _transform_overloaded_flags),\n        'default_reaction_emoji':                (None, _transform_default_reaction),\n    }\n    # fmt: on\n\n    def __init__(self, entry: AuditLogEntry, data: List[AuditLogChangePayload]):\n        self.before: AuditLogDiff = AuditLogDiff()\n        self.after: AuditLogDiff = AuditLogDiff()\n        # special case entire process since each\n        # element in data is a different target\n        # key is the target id\n        if entry.action is enums.AuditLogAction.app_command_permission_update:\n            self.before.app_command_permissions = []\n            self.after.app_command_permissions = []\n\n            for elem in data:\n                self._handle_app_command_permissions(\n                    self.before,\n                    entry,\n                    elem.get('old_value'),  # type: ignore # value will be an ApplicationCommandPermissions if present\n                )\n\n                self._handle_app_command_permissions(\n                    self.after,\n                    entry,\n                    elem.get('new_value'),  # type: ignore # value will be an ApplicationCommandPermissions if present\n                )\n            return\n\n        for elem in data:\n            attr = elem['key']\n\n            # special cases for role add/remove\n            if attr == '$add':\n                self._handle_role(self.before, self.after, entry, elem['new_value'])  # type: ignore # new_value is a list of roles in this case\n                continue\n            elif attr == '$remove':\n                self._handle_role(self.after, self.before, entry, elem['new_value'])  # type: ignore # new_value is a list of roles in this case\n                continue\n\n            # special case for automod trigger\n            if attr == 'trigger_metadata':\n                # given full metadata dict\n                self._handle_trigger_metadata(entry, elem, data)  # type: ignore  # should be trigger metadata\n                continue\n            elif entry.action is enums.AuditLogAction.automod_rule_update and attr.startswith('$'):\n                # on update, some trigger attributes are keys and formatted as $(add/remove)_{attribute}\n                action, _, trigger_attr = attr.partition('_')\n                # new_value should be a list of added/removed strings for keyword_filter, regex_patterns, or allow_list\n                if action == '$add':\n                    self._handle_trigger_attr_update(self.before, self.after, entry, trigger_attr, elem['new_value'])  # type: ignore\n                elif action == '$remove':\n                    self._handle_trigger_attr_update(self.after, self.before, entry, trigger_attr, elem['new_value'])  # type: ignore\n                continue\n\n            try:\n                key, transformer = self.TRANSFORMERS[attr]\n            except (ValueError, KeyError):\n                transformer = None\n            else:\n                if key:\n                    attr = key\n\n            transformer: Optional[Transformer]\n\n            try:\n                before = elem['old_value']\n            except KeyError:\n                before = None\n            else:\n                if transformer:\n                    before = transformer(entry, before)\n\n            setattr(self.before, attr, before)\n\n            try:\n                after = elem['new_value']\n            except KeyError:\n                after = None\n            else:\n                if transformer:\n                    after = transformer(entry, after)\n\n            setattr(self.after, attr, after)\n\n        # add an alias\n        if hasattr(self.after, 'colour'):\n            self.after.color = self.after.colour\n            self.before.color = self.before.colour\n        if hasattr(self.after, 'expire_behavior'):\n            self.after.expire_behaviour = self.after.expire_behavior\n            self.before.expire_behaviour = self.before.expire_behavior\n\n    def __repr__(self) -> str:\n        return f'<AuditLogChanges before={self.before!r} after={self.after!r}>'\n\n    def _handle_role(self, first: AuditLogDiff, second: AuditLogDiff, entry: AuditLogEntry, elem: List[RolePayload]) -> None:\n        if not hasattr(first, 'roles'):\n            setattr(first, 'roles', [])\n\n        data = []\n        g: Guild = entry.guild\n\n        for e in elem:\n            role_id = int(e['id'])\n            role = g.get_role(role_id)\n\n            if role is None:\n                role = Object(id=role_id, type=Role)\n                role.name = e['name']  # type: ignore # Object doesn't usually have name\n\n            data.append(role)\n\n        setattr(second, 'roles', data)\n\n    def _handle_app_command_permissions(\n        self,\n        diff: AuditLogDiff,\n        entry: AuditLogEntry,\n        data: Optional[ApplicationCommandPermissions],\n    ):\n        if data is None:\n            return\n\n        # avoid circular import\n        from discord.app_commands import AppCommandPermissions\n\n        state = entry._state\n        guild = entry.guild\n        diff.app_command_permissions.append(AppCommandPermissions(data=data, guild=guild, state=state))\n\n    def _handle_trigger_metadata(\n        self,\n        entry: AuditLogEntry,\n        data: AuditLogChangeTriggerMetadataPayload,\n        full_data: List[AuditLogChangePayload],\n    ):\n        trigger_value: Optional[int] = None\n        trigger_type: Optional[enums.AutoModRuleTriggerType] = None\n\n        # try to get trigger type from before or after\n        trigger_type = getattr(self.before, 'trigger_type', getattr(self.after, 'trigger_type', None))\n\n        if trigger_type is None:\n            if isinstance(entry.target, AutoModRule):\n                # Trigger type cannot be changed, so it should be the same before and after updates.\n                # Avoids checking which keys are in data to guess trigger type\n                trigger_value = entry.target.trigger.type.value\n        else:\n            # found a trigger type from before or after\n            trigger_value = trigger_type.value\n\n        if trigger_value is None:\n            # try to find trigger type in the full list of changes\n            _elem = utils.find(lambda elem: elem['key'] == 'trigger_type', full_data)\n            if _elem is not None:\n                trigger_value = _elem.get('old_value', _elem.get('new_value'))  # type: ignore  # trigger type values should be int\n\n            if trigger_value is None:\n                # try to infer trigger_type from the keys in old or new value\n                combined = (data.get('old_value') or {}).keys() | (data.get('new_value') or {}).keys()\n                if not combined:\n                    trigger_value = enums.AutoModRuleTriggerType.spam.value\n                elif 'presets' in combined:\n                    trigger_value = enums.AutoModRuleTriggerType.keyword_preset.value\n                elif 'keyword_filter' in combined or 'regex_patterns' in combined:\n                    trigger_value = enums.AutoModRuleTriggerType.keyword.value\n                elif 'mention_total_limit' in combined or 'mention_raid_protection_enabled' in combined:\n                    trigger_value = enums.AutoModRuleTriggerType.mention_spam.value\n                else:\n                    # some unknown type\n                    trigger_value = -1\n\n        self.before.trigger = AutoModTrigger.from_data(trigger_value, data.get('old_value'))\n        self.after.trigger = AutoModTrigger.from_data(trigger_value, data.get('new_value'))\n\n    def _handle_trigger_attr_update(\n        self, first: AuditLogDiff, second: AuditLogDiff, entry: AuditLogEntry, attr: str, data: List[str]\n    ):\n        self._create_trigger(first, entry)\n        trigger = self._create_trigger(second, entry)\n        try:\n            # guard unexpecte non list attributes or non iterable data\n            getattr(trigger, attr).extend(data)\n        except (AttributeError, TypeError):\n            pass\n\n    def _create_trigger(self, diff: AuditLogDiff, entry: AuditLogEntry) -> AutoModTrigger:\n        # check if trigger has already been created\n        if not hasattr(diff, 'trigger'):\n            # create a trigger\n            if isinstance(entry.target, AutoModRule):\n                # get trigger type from the automod rule\n                trigger_type = entry.target.trigger.type\n            else:\n                # unknown trigger type\n                trigger_type = enums.try_enum(enums.AutoModRuleTriggerType, -1)\n\n            diff.trigger = AutoModTrigger(type=trigger_type)\n        return diff.trigger\n\n\nclass _AuditLogProxy:\n    def __init__(self, **kwargs: Any) -> None:\n        for k, v in kwargs.items():\n            setattr(self, k, v)\n\n\nclass _AuditLogProxyMemberPrune(_AuditLogProxy):\n    delete_member_days: int\n    members_removed: int\n\n\nclass _AuditLogProxyMemberMoveOrMessageDelete(_AuditLogProxy):\n    channel: Union[abc.GuildChannel, Thread]\n    count: int\n\n\nclass _AuditLogProxyMemberDisconnect(_AuditLogProxy):\n    count: int\n\n\nclass _AuditLogProxyPinAction(_AuditLogProxy):\n    channel: Union[abc.GuildChannel, Thread]\n    message_id: int\n\n\nclass _AuditLogProxyStageInstanceAction(_AuditLogProxy):\n    channel: abc.GuildChannel\n\n\nclass _AuditLogProxyMessageBulkDelete(_AuditLogProxy):\n    count: int\n\n\nclass _AuditLogProxyAutoModAction(_AuditLogProxy):\n    automod_rule_name: str\n    automod_rule_trigger_type: str\n    channel: Optional[Union[abc.GuildChannel, Thread]]\n\n\nclass _AuditLogProxyMemberKickOrMemberRoleUpdate(_AuditLogProxy):\n    integration_type: Optional[str]\n\n\nclass AuditLogEntry(Hashable):\n    r\"\"\"Represents an Audit Log entry.\n\n    You retrieve these via :meth:`Guild.audit_logs`.\n\n    .. container:: operations\n\n        .. describe:: x == y\n\n            Checks if two entries are equal.\n\n        .. describe:: x != y\n\n            Checks if two entries are not equal.\n\n        .. describe:: hash(x)\n\n            Returns the entry's hash.\n\n    .. versionchanged:: 1.7\n        Audit log entries are now comparable and hashable.\n\n    Attributes\n    -----------\n    action: :class:`AuditLogAction`\n        The action that was done.\n    user: Optional[:class:`abc.User`]\n        The user who initiated this action. Usually a :class:`Member`\\, unless gone\n        then it's a :class:`User`.\n    user_id: Optional[:class:`int`]\n        The user ID who initiated this action.\n\n        .. versionadded:: 2.2\n    id: :class:`int`\n        The entry ID.\n    guild: :class:`Guild`\n        The guild that this entry belongs to.\n    target: Any\n        The target that got changed. The exact type of this depends on\n        the action being done.\n    reason: Optional[:class:`str`]\n        The reason this action was done.\n    extra: Any\n        Extra information that this entry has that might be useful.\n        For most actions, this is ``None``. However in some cases it\n        contains extra information. See :class:`AuditLogAction` for\n        which actions have this field filled out.\n    \"\"\"\n\n    def __init__(\n        self,\n        *,\n        users: Mapping[int, User],\n        integrations: Mapping[int, PartialIntegration],\n        app_commands: Mapping[int, AppCommand],\n        automod_rules: Mapping[int, AutoModRule],\n        webhooks: Mapping[int, Webhook],\n        data: AuditLogEntryPayload,\n        guild: Guild,\n    ):\n        self._state: ConnectionState = guild._state\n        self.guild: Guild = guild\n        self._users: Mapping[int, User] = users\n        self._integrations: Mapping[int, PartialIntegration] = integrations\n        self._app_commands: Mapping[int, AppCommand] = app_commands\n        self._automod_rules: Mapping[int, AutoModRule] = automod_rules\n        self._webhooks: Mapping[int, Webhook] = webhooks\n        self._from_data(data)\n\n    def _from_data(self, data: AuditLogEntryPayload) -> None:\n        self.action: enums.AuditLogAction = enums.try_enum(enums.AuditLogAction, data['action_type'])\n        self.id: int = int(data['id'])\n\n        # this key is technically not usually present\n        self.reason: Optional[str] = data.get('reason')\n        extra = data.get('options')\n\n        # fmt: off\n        self.extra: Union[\n            _AuditLogProxyMemberPrune,\n            _AuditLogProxyMemberMoveOrMessageDelete,\n            _AuditLogProxyMemberDisconnect,\n            _AuditLogProxyPinAction,\n            _AuditLogProxyStageInstanceAction,\n            _AuditLogProxyMessageBulkDelete,\n            _AuditLogProxyAutoModAction,\n            _AuditLogProxyMemberKickOrMemberRoleUpdate,\n            Member, User, None, PartialIntegration,\n            Role, Object\n        ] = None\n        # fmt: on\n\n        if isinstance(self.action, enums.AuditLogAction) and extra:\n            if self.action is enums.AuditLogAction.member_prune:\n                # member prune has two keys with useful information\n                self.extra = _AuditLogProxyMemberPrune(\n                    delete_member_days=int(extra['delete_member_days']),\n                    members_removed=int(extra['members_removed']),\n                )\n            elif self.action is enums.AuditLogAction.member_move or self.action is enums.AuditLogAction.message_delete:\n                channel_id = int(extra['channel_id'])\n                self.extra = _AuditLogProxyMemberMoveOrMessageDelete(\n                    count=int(extra['count']),\n                    channel=self.guild.get_channel_or_thread(channel_id) or Object(id=channel_id),\n                )\n            elif self.action is enums.AuditLogAction.member_disconnect:\n                # The member disconnect action has a dict with some information\n                self.extra = _AuditLogProxyMemberDisconnect(count=int(extra['count']))\n            elif self.action is enums.AuditLogAction.message_bulk_delete:\n                # The bulk message delete action has the number of messages deleted\n                self.extra = _AuditLogProxyMessageBulkDelete(count=int(extra['count']))\n            elif self.action in (enums.AuditLogAction.kick, enums.AuditLogAction.member_role_update):\n                # The member kick action has a dict with some information\n                integration_type = extra.get('integration_type')\n                self.extra = _AuditLogProxyMemberKickOrMemberRoleUpdate(integration_type=integration_type)\n            elif self.action.name.endswith('pin'):\n                # the pin actions have a dict with some information\n                channel_id = int(extra['channel_id'])\n                self.extra = _AuditLogProxyPinAction(\n                    channel=self.guild.get_channel_or_thread(channel_id) or Object(id=channel_id),\n                    message_id=int(extra['message_id']),\n                )\n            elif (\n                self.action is enums.AuditLogAction.automod_block_message\n                or self.action is enums.AuditLogAction.automod_flag_message\n                or self.action is enums.AuditLogAction.automod_timeout_member\n            ):\n                channel_id = utils._get_as_snowflake(extra, 'channel_id')\n                channel = None\n\n                # May be an empty string instead of None due to a Discord issue\n                if channel_id:\n                    channel = self.guild.get_channel_or_thread(channel_id) or Object(id=channel_id)\n\n                self.extra = _AuditLogProxyAutoModAction(\n                    automod_rule_name=extra['auto_moderation_rule_name'],\n                    automod_rule_trigger_type=enums.try_enum(\n                        enums.AutoModRuleTriggerType, extra['auto_moderation_rule_trigger_type']\n                    ),\n                    channel=channel,\n                )\n\n            elif self.action.name.startswith('overwrite_'):\n                # the overwrite_ actions have a dict with some information\n                instance_id = int(extra['id'])\n                the_type = extra.get('type')\n                if the_type == '1':\n                    self.extra = self._get_member(instance_id)\n                elif the_type == '0':\n                    role = self.guild.get_role(instance_id)\n                    if role is None:\n                        role = Object(id=instance_id, type=Role)\n                        role.name = extra.get('role_name')  # type: ignore # Object doesn't usually have name\n                    self.extra = role\n            elif self.action.name.startswith('stage_instance'):\n                channel_id = int(extra['channel_id'])\n                self.extra = _AuditLogProxyStageInstanceAction(\n                    channel=self.guild.get_channel(channel_id) or Object(id=channel_id, type=StageChannel)\n                )\n            elif self.action.name.startswith('app_command'):\n                app_id = int(extra['application_id'])\n                self.extra = self._get_integration_by_app_id(app_id) or Object(app_id, type=PartialIntegration)\n\n        # this key is not present when the above is present, typically.\n        # It's a list of { new_value: a, old_value: b, key: c }\n        # where new_value and old_value are not guaranteed to be there depending\n        # on the action type, so let's just fetch it for now and only turn it\n        # into meaningful data when requested\n        self._changes = data.get('changes', [])\n\n        self.user_id: Optional[int] = utils._get_as_snowflake(data, 'user_id')\n        self.user: Optional[Union[User, Member]] = self._get_member(self.user_id)\n        self._target_id = utils._get_as_snowflake(data, 'target_id')\n\n    def _get_member(self, user_id: Optional[int]) -> Union[Member, User, None]:\n        if user_id is None:\n            return None\n\n        return self.guild.get_member(user_id) or self._users.get(user_id)\n\n    def _get_integration(self, integration_id: Optional[int]) -> Optional[PartialIntegration]:\n        if integration_id is None:\n            return None\n\n        return self._integrations.get(integration_id)\n\n    def _get_integration_by_app_id(self, application_id: Optional[int]) -> Optional[PartialIntegration]:\n        if application_id is None:\n            return None\n\n        # get PartialIntegration by application id\n        return utils.get(self._integrations.values(), application_id=application_id)\n\n    def _get_app_command(self, app_command_id: Optional[int]) -> Optional[AppCommand]:\n        if app_command_id is None:\n            return None\n\n        return self._app_commands.get(app_command_id)\n\n    def __repr__(self) -> str:\n        return f'<AuditLogEntry id={self.id} action={self.action} user={self.user!r}>'\n\n    @utils.cached_property\n    def created_at(self) -> datetime.datetime:\n        \"\"\":class:`datetime.datetime`: Returns the entry's creation time in UTC.\"\"\"\n        return utils.snowflake_time(self.id)\n\n    @utils.cached_property\n    def target(self) -> TargetType:\n        if self.action.target_type is None:\n            return None\n\n        try:\n            converter = getattr(self, '_convert_target_' + self.action.target_type)\n        except AttributeError:\n            if self._target_id is None:\n                return None\n            return Object(id=self._target_id)\n        else:\n            return converter(self._target_id)\n\n    @utils.cached_property\n    def category(self) -> Optional[enums.AuditLogActionCategory]:\n        \"\"\"Optional[:class:`AuditLogActionCategory`]: The category of the action, if applicable.\"\"\"\n        return self.action.category\n\n    @utils.cached_property\n    def changes(self) -> AuditLogChanges:\n        \"\"\":class:`AuditLogChanges`: The list of changes this entry has.\"\"\"\n        obj = AuditLogChanges(self, self._changes)\n        del self._changes\n        return obj\n\n    @utils.cached_property\n    def before(self) -> AuditLogDiff:\n        \"\"\":class:`AuditLogDiff`: The target's prior state.\"\"\"\n        return self.changes.before\n\n    @utils.cached_property\n    def after(self) -> AuditLogDiff:\n        \"\"\":class:`AuditLogDiff`: The target's subsequent state.\"\"\"\n        return self.changes.after\n\n    def _convert_target_guild(self, target_id: int) -> Guild:\n        return self.guild\n\n    def _convert_target_channel(self, target_id: int) -> Union[abc.GuildChannel, Object]:\n        return self.guild.get_channel(target_id) or Object(id=target_id)\n\n    def _convert_target_user(self, target_id: Optional[int]) -> Optional[Union[Member, User, Object]]:\n        # For some reason the member_disconnect and member_move action types\n        # do not have a non-null target_id so safeguard against that\n        if target_id is None:\n            return None\n\n        return self._get_member(target_id) or Object(id=target_id, type=Member)\n\n    def _convert_target_role(self, target_id: int) -> Union[Role, Object]:\n        return self.guild.get_role(target_id) or Object(id=target_id, type=Role)\n\n    def _convert_target_invite(self, target_id: None) -> Invite:\n        # invites have target_id set to null\n        # so figure out which change has the full invite data\n        changeset = self.before if self.action is enums.AuditLogAction.invite_delete else self.after\n\n        fake_payload: InvitePayload = {\n            'max_age': changeset.max_age,\n            'max_uses': changeset.max_uses,\n            'code': changeset.code,\n            'temporary': changeset.temporary,\n            'uses': changeset.uses,\n            'channel': None,  # type: ignore # the channel is passed to the Invite constructor directly\n        }\n\n        obj = Invite(state=self._state, data=fake_payload, guild=self.guild, channel=changeset.channel)\n        try:\n            obj.inviter = changeset.inviter\n        except AttributeError:\n            pass\n        return obj\n\n    def _convert_target_emoji(self, target_id: int) -> Union[Emoji, Object]:\n        return self._state.get_emoji(target_id) or Object(id=target_id, type=Emoji)\n\n    def _convert_target_message(self, target_id: int) -> Union[Member, User, Object]:\n        return self._get_member(target_id) or Object(id=target_id, type=Member)\n\n    def _convert_target_stage_instance(self, target_id: int) -> Union[StageInstance, Object]:\n        return self.guild.get_stage_instance(target_id) or Object(id=target_id, type=StageInstance)\n\n    def _convert_target_sticker(self, target_id: int) -> Union[GuildSticker, Object]:\n        return self._state.get_sticker(target_id) or Object(id=target_id, type=GuildSticker)\n\n    def _convert_target_thread(self, target_id: int) -> Union[Thread, Object]:\n        return self.guild.get_thread(target_id) or Object(id=target_id, type=Thread)\n\n    def _convert_target_guild_scheduled_event(self, target_id: int) -> Union[ScheduledEvent, Object]:\n        return self.guild.get_scheduled_event(target_id) or Object(id=target_id, type=ScheduledEvent)\n\n    def _convert_target_integration(self, target_id: int) -> Union[PartialIntegration, Object]:\n        return self._get_integration(target_id) or Object(target_id, type=PartialIntegration)\n\n    def _convert_target_app_command(self, target_id: int) -> Union[AppCommand, Object]:\n        target = self._get_app_command(target_id)\n        if not target:\n            # circular import\n            from .app_commands import AppCommand\n\n            target = Object(target_id, type=AppCommand)\n\n        return target\n\n    def _convert_target_integration_or_app_command(self, target_id: int) -> Union[PartialIntegration, AppCommand, Object]:\n        target = self._get_integration_by_app_id(target_id) or self._get_app_command(target_id)\n        if not target:\n            try:\n                # circular import\n                from .app_commands import AppCommand\n\n                # get application id from extras\n                # if it matches target id, type should be integration\n                target_app = self.extra\n                # extra should be an Object or PartialIntegration\n                app_id = target_app.application_id if isinstance(target_app, PartialIntegration) else target_app.id  # type: ignore\n                type = PartialIntegration if target_id == app_id else AppCommand\n            except AttributeError:\n                return Object(target_id)\n            else:\n                return Object(target_id, type=type)\n\n        return target\n\n    def _convert_target_auto_moderation(self, target_id: int) -> Union[AutoModRule, Object]:\n        return self._automod_rules.get(target_id) or Object(target_id, type=AutoModRule)\n\n    def _convert_target_webhook(self, target_id: int) -> Union[Webhook, Object]:\n        # circular import\n        from .webhook import Webhook\n\n        return self._webhooks.get(target_id) or Object(target_id, type=Webhook)\n"
  },
  {
    "path": "discord/automod.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom __future__ import annotations\nimport datetime\n\nfrom typing import TYPE_CHECKING, Any, Dict, Optional, List, Set, Union, Sequence, overload, Literal\n\nfrom .enums import AutoModRuleTriggerType, AutoModRuleActionType, AutoModRuleEventType, try_enum\nfrom .flags import AutoModPresets\nfrom . import utils\nfrom .utils import MISSING, cached_slot_property\n\nif TYPE_CHECKING:\n    from typing_extensions import Self\n    from .abc import Snowflake, GuildChannel\n    from .threads import Thread\n    from .guild import Guild\n    from .member import Member\n    from .state import ConnectionState\n    from .types.automod import (\n        AutoModerationRule as AutoModerationRulePayload,\n        AutoModerationTriggerMetadata as AutoModerationTriggerMetadataPayload,\n        AutoModerationAction as AutoModerationActionPayload,\n        AutoModerationActionExecution as AutoModerationActionExecutionPayload,\n    )\n    from .role import Role\n\n__all__ = (\n    'AutoModRuleAction',\n    'AutoModTrigger',\n    'AutoModRule',\n    'AutoModAction',\n)\n\n\nclass AutoModRuleAction:\n    \"\"\"Represents an auto moderation's rule action.\n\n    .. note::\n        Only one of ``channel_id``, ``duration``, or ``custom_message`` can be used.\n\n    .. versionadded:: 2.0\n\n    Attributes\n    -----------\n    type: :class:`AutoModRuleActionType`\n        The type of action to take.\n        Defaults to :attr:`~AutoModRuleActionType.block_message`.\n    channel_id: Optional[:class:`int`]\n        The ID of the channel or thread to send the alert message to, if any.\n        Passing this sets :attr:`type` to :attr:`~AutoModRuleActionType.send_alert_message`.\n    duration: Optional[:class:`datetime.timedelta`]\n        The duration of the timeout to apply, if any.\n        Has a maximum of 28 days.\n        Passing this sets :attr:`type` to :attr:`~AutoModRuleActionType.timeout`.\n    custom_message: Optional[:class:`str`]\n        A custom message which will be shown to a user when their message is blocked.\n        Passing this sets :attr:`type` to :attr:`~AutoModRuleActionType.block_message`.\n\n        .. versionadded:: 2.2\n    \"\"\"\n\n    __slots__ = ('type', 'channel_id', 'duration', 'custom_message')\n\n    @overload\n    def __init__(self, *, channel_id: int = ...) -> None:\n        ...\n\n    @overload\n    def __init__(self, *, type: Literal[AutoModRuleActionType.send_alert_message], channel_id: int = ...) -> None:\n        ...\n\n    @overload\n    def __init__(self, *, duration: datetime.timedelta = ...) -> None:\n        ...\n\n    @overload\n    def __init__(self, *, type: Literal[AutoModRuleActionType.timeout], duration: datetime.timedelta = ...) -> None:\n        ...\n\n    @overload\n    def __init__(self, *, custom_message: str = ...) -> None:\n        ...\n\n    @overload\n    def __init__(self, *, type: Literal[AutoModRuleActionType.block_message]) -> None:\n        ...\n\n    @overload\n    def __init__(self, *, type: Literal[AutoModRuleActionType.block_message], custom_message: Optional[str] = ...) -> None:\n        ...\n\n    @overload\n    def __init__(\n        self,\n        *,\n        type: Optional[AutoModRuleActionType] = ...,\n        channel_id: Optional[int] = ...,\n        duration: Optional[datetime.timedelta] = ...,\n        custom_message: Optional[str] = ...,\n    ) -> None:\n        ...\n\n    def __init__(\n        self,\n        *,\n        type: Optional[AutoModRuleActionType] = None,\n        channel_id: Optional[int] = None,\n        duration: Optional[datetime.timedelta] = None,\n        custom_message: Optional[str] = None,\n    ) -> None:\n        if sum(v is None for v in (channel_id, duration, custom_message)) < 2:\n            raise ValueError('Only one of channel_id, duration, or custom_message can be passed.')\n\n        self.type: AutoModRuleActionType\n        self.channel_id: Optional[int] = None\n        self.duration: Optional[datetime.timedelta] = None\n        self.custom_message: Optional[str] = None\n\n        if type is not None:\n            self.type = type\n        elif channel_id is not None:\n            self.type = AutoModRuleActionType.send_alert_message\n        elif duration is not None:\n            self.type = AutoModRuleActionType.timeout\n        else:\n            self.type = AutoModRuleActionType.block_message\n\n        if self.type is AutoModRuleActionType.send_alert_message:\n            if channel_id is None:\n                raise ValueError('channel_id cannot be None if type is send_alert_message')\n            self.channel_id = channel_id\n\n        if self.type is AutoModRuleActionType.timeout:\n            if duration is None:\n                raise ValueError('duration cannot be None set if type is timeout')\n            self.duration = duration\n\n        if self.type is AutoModRuleActionType.block_message:\n            self.custom_message = custom_message\n\n    def __repr__(self) -> str:\n        return f'<AutoModRuleAction type={self.type.value} channel={self.channel_id} duration={self.duration}>'\n\n    @classmethod\n    def from_data(cls, data: AutoModerationActionPayload) -> Self:\n        if data['type'] == AutoModRuleActionType.timeout.value:\n            duration_seconds = data['metadata']['duration_seconds']\n            return cls(duration=datetime.timedelta(seconds=duration_seconds))\n        elif data['type'] == AutoModRuleActionType.send_alert_message.value:\n            channel_id = int(data['metadata']['channel_id'])\n            return cls(channel_id=channel_id)\n        elif data['type'] == AutoModRuleActionType.block_message.value:\n            custom_message = data.get('metadata', {}).get('custom_message')\n            return cls(type=AutoModRuleActionType.block_message, custom_message=custom_message)\n\n        return cls(type=AutoModRuleActionType.block_member_interactions)\n\n    def to_dict(self) -> Dict[str, Any]:\n        ret = {'type': self.type.value, 'metadata': {}}\n        if self.type is AutoModRuleActionType.block_message and self.custom_message is not None:\n            ret['metadata'] = {'custom_message': self.custom_message}\n        elif self.type is AutoModRuleActionType.timeout:\n            ret['metadata'] = {'duration_seconds': int(self.duration.total_seconds())}  # type: ignore # duration cannot be None here\n        elif self.type is AutoModRuleActionType.send_alert_message:\n            ret['metadata'] = {'channel_id': str(self.channel_id)}\n        return ret\n\n\nclass AutoModTrigger:\n    r\"\"\"Represents a trigger for an auto moderation rule.\n\n    The following table illustrates relevant attributes for each :class:`AutoModRuleTriggerType`:\n\n    +-----------------------------------------------+------------------------------------------------+\n    |                    Type                       |                   Attributes                   |\n    +===============================================+================================================+\n    | :attr:`AutoModRuleTriggerType.keyword`        | :attr:`keyword_filter`, :attr:`regex_patterns`,|\n    |                                               | :attr:`allow_list`                             |\n    +-----------------------------------------------+------------------------------------------------+\n    | :attr:`AutoModRuleTriggerType.spam`           |                                                |\n    +-----------------------------------------------+------------------------------------------------+\n    | :attr:`AutoModRuleTriggerType.keyword_preset` | :attr:`presets`\\, :attr:`allow_list`           |\n    +-----------------------------------------------+------------------------------------------------+\n    | :attr:`AutoModRuleTriggerType.mention_spam`   | :attr:`mention_limit`,                         |\n    |                                               | :attr:`mention_raid_protection`                |\n    +-----------------------------------------------+------------------------------------------------+\n    | :attr:`AutoModRuleTriggerType.member_profile` | :attr:`keyword_filter`, :attr:`regex_patterns`,|\n    |                                               | :attr:`allow_list`                             |\n    +-----------------------------------------------+------------------------------------------------+\n\n    .. versionadded:: 2.0\n\n    Attributes\n    -----------\n    type: :class:`AutoModRuleTriggerType`\n        The type of trigger.\n    keyword_filter: List[:class:`str`]\n        The list of strings that will trigger the filter.\n        Maximum of 1000. Keywords can only be up to 60 characters in length.\n\n        This could be combined with :attr:`regex_patterns`.\n    regex_patterns: List[:class:`str`]\n        The regex pattern that will trigger the filter. The syntax is based off of\n        `Rust's regex syntax <https://docs.rs/regex/latest/regex/#syntax>`_.\n        Maximum of 10. Regex strings can only be up to 260 characters in length.\n\n        This could be combined with :attr:`keyword_filter` and/or :attr:`allow_list`\n\n        .. versionadded:: 2.1\n    presets: :class:`AutoModPresets`\n        The presets used with the preset keyword filter.\n    allow_list: List[:class:`str`]\n        The list of words that are exempt from the commonly flagged words. Maximum of 100.\n        Keywords can only be up to 60 characters in length.\n    mention_limit: :class:`int`\n        The total number of user and role mentions a message can contain.\n        Has a maximum of 50.\n    mention_raid_protection: :class:`bool`\n        Whether mention raid protection is enabled or not.\n\n        .. versionadded:: 2.4\n    \"\"\"\n\n    __slots__ = (\n        'type',\n        'keyword_filter',\n        'presets',\n        'allow_list',\n        'mention_limit',\n        'regex_patterns',\n        'mention_raid_protection',\n    )\n\n    def __init__(\n        self,\n        *,\n        type: Optional[AutoModRuleTriggerType] = None,\n        keyword_filter: Optional[List[str]] = None,\n        presets: Optional[AutoModPresets] = None,\n        allow_list: Optional[List[str]] = None,\n        mention_limit: Optional[int] = None,\n        regex_patterns: Optional[List[str]] = None,\n        mention_raid_protection: Optional[bool] = None,\n    ) -> None:\n        unique_args = (keyword_filter or regex_patterns, presets, mention_limit or mention_raid_protection)\n        if type is None and sum(arg is not None for arg in unique_args) > 1:\n            raise ValueError(\n                'Please pass only one of keyword_filter/regex_patterns, presets, or mention_limit/mention_raid_protection.'\n            )\n\n        if type is not None:\n            self.type = type\n        elif keyword_filter is not None or regex_patterns is not None:\n            self.type = AutoModRuleTriggerType.keyword\n        elif presets is not None:\n            self.type = AutoModRuleTriggerType.keyword_preset\n        elif mention_limit is not None or mention_raid_protection is not None:\n            self.type = AutoModRuleTriggerType.mention_spam\n        else:\n            raise ValueError(\n                'Please pass the trigger type explicitly if not using keyword_filter, regex_patterns, presets, mention_limit, or mention_raid_protection.'\n            )\n\n        self.keyword_filter: List[str] = keyword_filter if keyword_filter is not None else []\n        self.presets: AutoModPresets = presets if presets is not None else AutoModPresets()\n        self.allow_list: List[str] = allow_list if allow_list is not None else []\n        self.mention_limit: int = mention_limit if mention_limit is not None else 0\n        self.mention_raid_protection: bool = mention_raid_protection if mention_raid_protection is not None else False\n        self.regex_patterns: List[str] = regex_patterns if regex_patterns is not None else []\n\n    def __repr__(self) -> str:\n        data = self.to_metadata_dict()\n        if data:\n            joined = ' '.join(f'{k}={v!r}' for k, v in data.items())\n            return f'<AutoModTrigger type={self.type} {joined}>'\n\n        return f'<AutoModTrigger type={self.type}>'\n\n    @classmethod\n    def from_data(cls, type: int, data: Optional[AutoModerationTriggerMetadataPayload]) -> Self:\n        type_ = try_enum(AutoModRuleTriggerType, type)\n        if data is None:\n            return cls(type=type_)\n        elif type_ in (AutoModRuleTriggerType.keyword, AutoModRuleTriggerType.member_profile):\n            return cls(\n                type=type_,\n                keyword_filter=data.get('keyword_filter'),\n                regex_patterns=data.get('regex_patterns'),\n                allow_list=data.get('allow_list'),\n            )\n        elif type_ is AutoModRuleTriggerType.keyword_preset:\n            return cls(\n                type=type_, presets=AutoModPresets._from_value(data.get('presets', [])), allow_list=data.get('allow_list')\n            )\n        elif type_ is AutoModRuleTriggerType.mention_spam:\n            return cls(\n                type=type_,\n                mention_limit=data.get('mention_total_limit'),\n                mention_raid_protection=data.get('mention_raid_protection_enabled'),\n            )\n        else:\n            return cls(type=type_)\n\n    def to_metadata_dict(self) -> Optional[Dict[str, Any]]:\n        if self.type in (AutoModRuleTriggerType.keyword, AutoModRuleTriggerType.member_profile):\n            return {\n                'keyword_filter': self.keyword_filter,\n                'regex_patterns': self.regex_patterns,\n                'allow_list': self.allow_list,\n            }\n        elif self.type is AutoModRuleTriggerType.keyword_preset:\n            return {'presets': self.presets.to_array(), 'allow_list': self.allow_list}\n        elif self.type is AutoModRuleTriggerType.mention_spam:\n            return {\n                'mention_total_limit': self.mention_limit,\n                'mention_raid_protection_enabled': self.mention_raid_protection,\n            }\n\n\nclass AutoModRule:\n    \"\"\"Represents an auto moderation rule.\n\n    .. versionadded:: 2.0\n\n    Attributes\n    -----------\n    id: :class:`int`\n        The ID of the rule.\n    guild: :class:`Guild`\n        The guild the rule is for.\n    name: :class:`str`\n        The name of the rule.\n    creator_id: :class:`int`\n        The ID of the user that created the rule.\n    trigger: :class:`AutoModTrigger`\n        The rule's trigger.\n    enabled: :class:`bool`\n        Whether the rule is enabled.\n    exempt_role_ids: Set[:class:`int`]\n        The IDs of the roles that are exempt from the rule.\n    exempt_channel_ids: Set[:class:`int`]\n        The IDs of the channels that are exempt from the rule.\n    event_type: :class:`AutoModRuleEventType`\n        The type of event that will trigger the the rule.\n    \"\"\"\n\n    __slots__ = (\n        '_state',\n        '_cs_exempt_roles',\n        '_cs_exempt_channels',\n        '_cs_actions',\n        'id',\n        'guild',\n        'name',\n        'creator_id',\n        'event_type',\n        'trigger',\n        'enabled',\n        'exempt_role_ids',\n        'exempt_channel_ids',\n        '_actions',\n    )\n\n    def __init__(self, *, data: AutoModerationRulePayload, guild: Guild, state: ConnectionState) -> None:\n        self._state: ConnectionState = state\n        self.guild: Guild = guild\n        self.id: int = int(data['id'])\n        self.name: str = data['name']\n        self.creator_id = int(data['creator_id'])\n        self.event_type: AutoModRuleEventType = try_enum(AutoModRuleEventType, data['event_type'])\n        self.trigger: AutoModTrigger = AutoModTrigger.from_data(data['trigger_type'], data=data.get('trigger_metadata'))\n        self.enabled: bool = data['enabled']\n        self.exempt_role_ids: Set[int] = {int(role_id) for role_id in data['exempt_roles']}\n        self.exempt_channel_ids: Set[int] = {int(channel_id) for channel_id in data['exempt_channels']}\n        self._actions: List[AutoModerationActionPayload] = data['actions']\n\n    def __repr__(self) -> str:\n        return f'<AutoModRule id={self.id} name={self.name!r} guild={self.guild!r}>'\n\n    def to_dict(self) -> AutoModerationRulePayload:\n        ret: AutoModerationRulePayload = {\n            'id': str(self.id),\n            'guild_id': str(self.guild.id),\n            'name': self.name,\n            'creator_id': str(self.creator_id),\n            'event_type': self.event_type.value,\n            'trigger_type': self.trigger.type.value,\n            'trigger_metadata': self.trigger.to_metadata_dict(),\n            'actions': [action.to_dict() for action in self.actions],\n            'enabled': self.enabled,\n            'exempt_roles': [str(role_id) for role_id in self.exempt_role_ids],\n            'exempt_channels': [str(channel_id) for channel_id in self.exempt_channel_ids],\n        }  # type: ignore # trigger types break the flow here.\n\n        return ret\n\n    @property\n    def creator(self) -> Optional[Member]:\n        \"\"\"Optional[:class:`Member`]: The member that created this rule.\"\"\"\n        return self.guild.get_member(self.creator_id)\n\n    @cached_slot_property('_cs_exempt_roles')\n    def exempt_roles(self) -> List[Role]:\n        \"\"\"List[:class:`Role`]: The roles that are exempt from this rule.\"\"\"\n        result = []\n        get_role = self.guild.get_role\n        for role_id in self.exempt_role_ids:\n            role = get_role(role_id)\n            if role is not None:\n                result.append(role)\n\n        return utils._unique(result)\n\n    @cached_slot_property('_cs_exempt_channels')\n    def exempt_channels(self) -> List[Union[GuildChannel, Thread]]:\n        \"\"\"List[Union[:class:`abc.GuildChannel`, :class:`Thread`]]: The channels that are exempt from this rule.\"\"\"\n        it = filter(None, map(self.guild._resolve_channel, self.exempt_channel_ids))\n        return utils._unique(it)\n\n    @cached_slot_property('_cs_actions')\n    def actions(self) -> List[AutoModRuleAction]:\n        \"\"\"List[:class:`AutoModRuleAction`]: The actions that are taken when this rule is triggered.\"\"\"\n        return [AutoModRuleAction.from_data(action) for action in self._actions]\n\n    def is_exempt(self, obj: Snowflake, /) -> bool:\n        \"\"\"Check if an object is exempt from the automod rule.\n\n        Parameters\n        -----------\n        obj: :class:`abc.Snowflake`\n            The role, channel, or thread to check.\n\n        Returns\n        --------\n        :class:`bool`\n            Whether the object is exempt from the automod rule.\n        \"\"\"\n        return obj.id in self.exempt_channel_ids or obj.id in self.exempt_role_ids\n\n    async def edit(\n        self,\n        *,\n        name: str = MISSING,\n        event_type: AutoModRuleEventType = MISSING,\n        actions: List[AutoModRuleAction] = MISSING,\n        trigger: AutoModTrigger = MISSING,\n        enabled: bool = MISSING,\n        exempt_roles: Sequence[Snowflake] = MISSING,\n        exempt_channels: Sequence[Snowflake] = MISSING,\n        reason: str = MISSING,\n    ) -> Self:\n        \"\"\"|coro|\n\n        Edits this auto moderation rule.\n\n        You must have :attr:`Permissions.manage_guild` to edit rules.\n\n        Parameters\n        -----------\n        name: :class:`str`\n            The new name to change to.\n        event_type: :class:`AutoModRuleEventType`\n            The new event type to change to.\n        actions: List[:class:`AutoModRuleAction`]\n            The new rule actions to update.\n        trigger: :class:`AutoModTrigger`\n            The new trigger to update.\n            You can only change the trigger metadata, not the type.\n        enabled: :class:`bool`\n            Whether the rule should be enabled or not.\n        exempt_roles: Sequence[:class:`abc.Snowflake`]\n            The new roles to exempt from the rule.\n        exempt_channels: Sequence[:class:`abc.Snowflake`]\n            The new channels to exempt from the rule.\n        reason: :class:`str`\n            The reason for updating this rule. Shows up on the audit log.\n\n        Raises\n        -------\n        Forbidden\n            You do not have permission to edit this rule.\n        HTTPException\n            Editing the rule failed.\n\n        Returns\n        --------\n        :class:`AutoModRule`\n            The updated auto moderation rule.\n        \"\"\"\n        payload = {}\n        if actions is not MISSING:\n            payload['actions'] = [action.to_dict() for action in actions]\n\n        if name is not MISSING:\n            payload['name'] = name\n\n        if event_type is not MISSING:\n            payload['event_type'] = event_type.value\n\n        if trigger is not MISSING:\n            trigger_metadata = trigger.to_metadata_dict()\n            if trigger_metadata is not None:\n                payload['trigger_metadata'] = trigger_metadata\n\n        if enabled is not MISSING:\n            payload['enabled'] = enabled\n\n        if exempt_roles is not MISSING:\n            payload['exempt_roles'] = [x.id for x in exempt_roles]\n\n        if exempt_channels is not MISSING:\n            payload['exempt_channels'] = [x.id for x in exempt_channels]\n\n        data = await self._state.http.edit_auto_moderation_rule(\n            self.guild.id,\n            self.id,\n            reason=reason,\n            **payload,\n        )\n\n        return self.__class__(data=data, guild=self.guild, state=self._state)\n\n    async def delete(self, *, reason: str = MISSING) -> None:\n        \"\"\"|coro|\n\n        Deletes the auto moderation rule.\n\n        You must have :attr:`Permissions.manage_guild` to delete rules.\n\n        Parameters\n        -----------\n        reason: :class:`str`\n            The reason for deleting this rule. Shows up on the audit log.\n\n        Raises\n        -------\n        Forbidden\n            You do not have permissions to delete the rule.\n        HTTPException\n            Deleting the rule failed.\n        \"\"\"\n        await self._state.http.delete_auto_moderation_rule(self.guild.id, self.id, reason=reason)\n\n\nclass AutoModAction:\n    \"\"\"Represents an action that was taken as the result of a moderation rule.\n\n    .. versionadded:: 2.0\n\n    Attributes\n    -----------\n    action: :class:`AutoModRuleAction`\n        The action that was taken.\n    message_id: Optional[:class:`int`]\n        The message ID that triggered the action. This is only available if the\n        action is done on an edited message.\n    rule_id: :class:`int`\n        The ID of the rule that was triggered.\n    rule_trigger_type: :class:`AutoModRuleTriggerType`\n        The trigger type of the rule that was triggered.\n    guild_id: :class:`int`\n        The ID of the guild where the rule was triggered.\n    user_id: :class:`int`\n        The ID of the user that triggered the rule.\n    channel_id: :class:`int`\n        The ID of the channel where the rule was triggered.\n    alert_system_message_id: Optional[:class:`int`]\n        The ID of the system message that was sent to the predefined alert channel.\n    content: :class:`str`\n        The content of the message that triggered the rule.\n        Requires the :attr:`Intents.message_content` or it will always return an empty string.\n    matched_keyword: Optional[:class:`str`]\n        The matched keyword from the triggering message.\n    matched_content: Optional[:class:`str`]\n        The matched content from the triggering message.\n        Requires the :attr:`Intents.message_content` or it will always return ``None``.\n    \"\"\"\n\n    __slots__ = (\n        '_state',\n        'action',\n        'rule_id',\n        'rule_trigger_type',\n        'guild_id',\n        'user_id',\n        'channel_id',\n        'message_id',\n        'alert_system_message_id',\n        'content',\n        'matched_keyword',\n        'matched_content',\n    )\n\n    def __init__(self, *, data: AutoModerationActionExecutionPayload, state: ConnectionState) -> None:\n        self._state: ConnectionState = state\n        self.message_id: Optional[int] = utils._get_as_snowflake(data, 'message_id')\n        self.action: AutoModRuleAction = AutoModRuleAction.from_data(data['action'])\n        self.rule_id: int = int(data['rule_id'])\n        self.rule_trigger_type: AutoModRuleTriggerType = try_enum(AutoModRuleTriggerType, data['rule_trigger_type'])\n        self.guild_id: int = int(data['guild_id'])\n        self.channel_id: Optional[int] = utils._get_as_snowflake(data, 'channel_id')\n        self.user_id: int = int(data['user_id'])\n        self.alert_system_message_id: Optional[int] = utils._get_as_snowflake(data, 'alert_system_message_id')\n        self.content: str = data.get('content', '')\n        self.matched_keyword: Optional[str] = data['matched_keyword']\n        self.matched_content: Optional[str] = data.get('matched_content')\n\n    def __repr__(self) -> str:\n        return f'<AutoModRuleExecution rule_id={self.rule_id} action={self.action!r}>'\n\n    @property\n    def guild(self) -> Guild:\n        \"\"\":class:`Guild`: The guild this action was taken in.\"\"\"\n        return self._state._get_or_create_unavailable_guild(self.guild_id)\n\n    @property\n    def channel(self) -> Optional[Union[GuildChannel, Thread]]:\n        \"\"\"Optional[Union[:class:`abc.GuildChannel`, :class:`Thread`]]: The channel this action was taken in.\"\"\"\n        if self.channel_id:\n            return self.guild.get_channel_or_thread(self.channel_id)\n        return None\n\n    @property\n    def member(self) -> Optional[Member]:\n        \"\"\"Optional[:class:`Member`]: The member this action was taken against /who triggered this rule.\"\"\"\n        return self.guild.get_member(self.user_id)\n\n    async def fetch_rule(self) -> AutoModRule:\n        \"\"\"|coro|\n\n        Fetch the rule whose action was taken.\n\n        You must have :attr:`Permissions.manage_guild` to do this.\n\n        Raises\n        -------\n        Forbidden\n            You do not have permissions to view the rule.\n        HTTPException\n            Fetching the rule failed.\n\n        Returns\n        --------\n        :class:`AutoModRule`\n            The rule that was executed.\n        \"\"\"\n\n        data = await self._state.http.get_auto_moderation_rule(self.guild.id, self.rule_id)\n        return AutoModRule(data=data, guild=self.guild, state=self._state)\n"
  },
  {
    "path": "discord/backoff.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom __future__ import annotations\n\n\nimport time\nimport random\nfrom typing import Callable, Generic, Literal, TypeVar, overload, Union\n\nT = TypeVar('T', bool, Literal[True], Literal[False])\n\n# fmt: off\n__all__ = (\n    'ExponentialBackoff',\n)\n# fmt: on\n\n\nclass ExponentialBackoff(Generic[T]):\n    \"\"\"An implementation of the exponential backoff algorithm\n\n    Provides a convenient interface to implement an exponential backoff\n    for reconnecting or retrying transmissions in a distributed network.\n\n    Once instantiated, the delay method will return the next interval to\n    wait for when retrying a connection or transmission.  The maximum\n    delay increases exponentially with each retry up to a maximum of\n    2^10 * base, and is reset if no more attempts are needed in a period\n    of 2^11 * base seconds.\n\n    Parameters\n    ----------\n    base: :class:`int`\n        The base delay in seconds. The first retry-delay will be up to\n        this many seconds.\n    integral: :class:`bool`\n        Set to ``True`` if whole periods of base is desirable, otherwise any\n        number in between may be returned.\n    \"\"\"\n\n    def __init__(self, base: int = 1, *, integral: T = False):\n        self._base: int = base\n\n        self._exp: int = 0\n        self._max: int = 10\n        self._reset_time: int = base * 2**11\n        self._last_invocation: float = time.monotonic()\n\n        # Use our own random instance to avoid messing with global one\n        rand = random.Random()\n        rand.seed()\n\n        self._randfunc: Callable[..., Union[int, float]] = rand.randrange if integral else rand.uniform\n\n    @overload\n    def delay(self: ExponentialBackoff[Literal[False]]) -> float:\n        ...\n\n    @overload\n    def delay(self: ExponentialBackoff[Literal[True]]) -> int:\n        ...\n\n    @overload\n    def delay(self: ExponentialBackoff[bool]) -> Union[int, float]:\n        ...\n\n    def delay(self) -> Union[int, float]:\n        \"\"\"Compute the next delay\n\n        Returns the next delay to wait according to the exponential\n        backoff algorithm.  This is a value between 0 and base * 2^exp\n        where exponent starts off at 1 and is incremented at every\n        invocation of this method up to a maximum of 10.\n\n        If a period of more than base * 2^11 has passed since the last\n        retry, the exponent is reset to 1.\n        \"\"\"\n        invocation = time.monotonic()\n        interval = invocation - self._last_invocation\n        self._last_invocation = invocation\n\n        if interval > self._reset_time:\n            self._exp = 0\n\n        self._exp = min(self._exp + 1, self._max)\n        return self._randfunc(0, self._base * 2**self._exp)\n"
  },
  {
    "path": "discord/bin/COPYING",
    "content": "Copyright (c) 1994-2013 Xiph.Org Foundation and contributors\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n\n- Redistributions of source code must retain the above copyright\nnotice, this list of conditions and the following disclaimer.\n\n- Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n\n- Neither the name of the Xiph.Org Foundation nor the names of its\ncontributors may be used to endorse or promote products derived from\nthis software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\nA PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION\nOR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\nLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\nDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\nTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n"
  },
  {
    "path": "discord/channel.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom __future__ import annotations\n\nfrom typing import (\n    Any,\n    AsyncIterator,\n    Callable,\n    Dict,\n    Iterable,\n    List,\n    Literal,\n    Mapping,\n    NamedTuple,\n    Optional,\n    TYPE_CHECKING,\n    Sequence,\n    Tuple,\n    TypeVar,\n    Union,\n    overload,\n)\nimport datetime\n\nimport discord.abc\nfrom .scheduled_event import ScheduledEvent\nfrom .permissions import PermissionOverwrite, Permissions\nfrom .enums import ChannelType, ForumLayoutType, ForumOrderType, PrivacyLevel, try_enum, VideoQualityMode, EntityType\nfrom .mixins import Hashable\nfrom . import utils\nfrom .utils import MISSING\nfrom .asset import Asset\nfrom .errors import ClientException\nfrom .stage_instance import StageInstance\nfrom .threads import Thread\nfrom .partial_emoji import _EmojiTag, PartialEmoji\nfrom .flags import ChannelFlags\nfrom .http import handle_message_parameters\n\n__all__ = (\n    'TextChannel',\n    'VoiceChannel',\n    'StageChannel',\n    'DMChannel',\n    'CategoryChannel',\n    'ForumTag',\n    'ForumChannel',\n    'GroupChannel',\n    'PartialMessageable',\n)\n\nif TYPE_CHECKING:\n    from typing_extensions import Self\n\n    from .types.threads import ThreadArchiveDuration\n    from .role import Role\n    from .object import Object\n    from .member import Member, VoiceState\n    from .abc import Snowflake, SnowflakeTime\n    from .embeds import Embed\n    from .message import Message, PartialMessage, EmojiInputType\n    from .mentions import AllowedMentions\n    from .webhook import Webhook\n    from .state import ConnectionState\n    from .sticker import GuildSticker, StickerItem\n    from .file import File\n    from .user import ClientUser, User, BaseUser\n    from .guild import Guild, GuildChannel as GuildChannelType\n    from .ui.view import View\n    from .types.channel import (\n        TextChannel as TextChannelPayload,\n        NewsChannel as NewsChannelPayload,\n        VoiceChannel as VoiceChannelPayload,\n        StageChannel as StageChannelPayload,\n        DMChannel as DMChannelPayload,\n        CategoryChannel as CategoryChannelPayload,\n        GroupDMChannel as GroupChannelPayload,\n        ForumChannel as ForumChannelPayload,\n        MediaChannel as MediaChannelPayload,\n        ForumTag as ForumTagPayload,\n    )\n    from .types.snowflake import SnowflakeList\n\n    OverwriteKeyT = TypeVar('OverwriteKeyT', Role, BaseUser, Object, Union[Role, Member, Object])\n\n\nclass ThreadWithMessage(NamedTuple):\n    thread: Thread\n    message: Message\n\n\nclass TextChannel(discord.abc.Messageable, discord.abc.GuildChannel, Hashable):\n    \"\"\"Represents a Discord guild text channel.\n\n    .. container:: operations\n\n        .. describe:: x == y\n\n            Checks if two channels are equal.\n\n        .. describe:: x != y\n\n            Checks if two channels are not equal.\n\n        .. describe:: hash(x)\n\n            Returns the channel's hash.\n\n        .. describe:: str(x)\n\n            Returns the channel's name.\n\n    Attributes\n    -----------\n    name: :class:`str`\n        The channel name.\n    guild: :class:`Guild`\n        The guild the channel belongs to.\n    id: :class:`int`\n        The channel ID.\n    category_id: Optional[:class:`int`]\n        The category channel ID this channel belongs to, if applicable.\n    topic: Optional[:class:`str`]\n        The channel's topic. ``None`` if it doesn't exist.\n    position: :class:`int`\n        The position in the channel list. This is a number that starts at 0. e.g. the\n        top channel is position 0.\n    last_message_id: Optional[:class:`int`]\n        The last message ID of the message sent to this channel. It may\n        *not* point to an existing or valid message.\n    slowmode_delay: :class:`int`\n        The number of seconds a member must wait between sending messages\n        in this channel. A value of ``0`` denotes that it is disabled.\n        Bots and users with :attr:`~Permissions.manage_channels` or\n        :attr:`~Permissions.manage_messages` bypass slowmode.\n    nsfw: :class:`bool`\n        If the channel is marked as \"not safe for work\" or \"age restricted\".\n    default_auto_archive_duration: :class:`int`\n        The default auto archive duration in minutes for threads created in this channel.\n\n        .. versionadded:: 2.0\n    default_thread_slowmode_delay: :class:`int`\n        The default slowmode delay in seconds for threads created in this channel.\n\n        .. versionadded:: 2.3\n    \"\"\"\n\n    __slots__ = (\n        'name',\n        'id',\n        'guild',\n        'topic',\n        '_state',\n        'nsfw',\n        'category_id',\n        'position',\n        'slowmode_delay',\n        '_overwrites',\n        '_type',\n        'last_message_id',\n        'default_auto_archive_duration',\n        'default_thread_slowmode_delay',\n    )\n\n    def __init__(self, *, state: ConnectionState, guild: Guild, data: Union[TextChannelPayload, NewsChannelPayload]):\n        self._state: ConnectionState = state\n        self.id: int = int(data['id'])\n        self._type: Literal[0, 5] = data['type']\n        self._update(guild, data)\n\n    def __repr__(self) -> str:\n        attrs = [\n            ('id', self.id),\n            ('name', self.name),\n            ('position', self.position),\n            ('nsfw', self.nsfw),\n            ('news', self.is_news()),\n            ('category_id', self.category_id),\n        ]\n        joined = ' '.join('%s=%r' % t for t in attrs)\n        return f'<{self.__class__.__name__} {joined}>'\n\n    def _update(self, guild: Guild, data: Union[TextChannelPayload, NewsChannelPayload]) -> None:\n        self.guild: Guild = guild\n        self.name: str = data['name']\n        self.category_id: Optional[int] = utils._get_as_snowflake(data, 'parent_id')\n        self.topic: Optional[str] = data.get('topic')\n        self.position: int = data['position']\n        self.nsfw: bool = data.get('nsfw', False)\n        # Does this need coercion into `int`? No idea yet.\n        self.slowmode_delay: int = data.get('rate_limit_per_user', 0)\n        self.default_auto_archive_duration: ThreadArchiveDuration = data.get('default_auto_archive_duration', 1440)\n        self.default_thread_slowmode_delay: int = data.get('default_thread_rate_limit_per_user', 0)\n        self._type: Literal[0, 5] = data.get('type', self._type)\n        self.last_message_id: Optional[int] = utils._get_as_snowflake(data, 'last_message_id')\n        self._fill_overwrites(data)\n\n    async def _get_channel(self) -> Self:\n        return self\n\n    @property\n    def type(self) -> Literal[ChannelType.text, ChannelType.news]:\n        \"\"\":class:`ChannelType`: The channel's Discord type.\"\"\"\n        if self._type == 0:\n            return ChannelType.text\n        return ChannelType.news\n\n    @property\n    def _sorting_bucket(self) -> int:\n        return ChannelType.text.value\n\n    @property\n    def _scheduled_event_entity_type(self) -> Optional[EntityType]:\n        return None\n\n    @utils.copy_doc(discord.abc.GuildChannel.permissions_for)\n    def permissions_for(self, obj: Union[Member, Role], /) -> Permissions:\n        base = super().permissions_for(obj)\n        self._apply_implicit_permissions(base)\n\n        # text channels do not have voice related permissions\n        denied = Permissions.voice()\n        base.value &= ~denied.value\n        return base\n\n    @property\n    def members(self) -> List[Member]:\n        \"\"\"List[:class:`Member`]: Returns all members that can see this channel.\"\"\"\n        return [m for m in self.guild.members if self.permissions_for(m).read_messages]\n\n    @property\n    def threads(self) -> List[Thread]:\n        \"\"\"List[:class:`Thread`]: Returns all the threads that you can see.\n\n        .. versionadded:: 2.0\n        \"\"\"\n        return [thread for thread in self.guild._threads.values() if thread.parent_id == self.id]\n\n    def is_nsfw(self) -> bool:\n        \"\"\":class:`bool`: Checks if the channel is NSFW.\"\"\"\n        return self.nsfw\n\n    def is_news(self) -> bool:\n        \"\"\":class:`bool`: Checks if the channel is a news channel.\"\"\"\n        return self._type == ChannelType.news.value\n\n    @property\n    def last_message(self) -> Optional[Message]:\n        \"\"\"Retrieves the last message from this channel in cache.\n\n        The message might not be valid or point to an existing message.\n\n        .. admonition:: Reliable Fetching\n            :class: helpful\n\n            For a slightly more reliable method of fetching the\n            last message, consider using either :meth:`history`\n            or :meth:`fetch_message` with the :attr:`last_message_id`\n            attribute.\n\n        Returns\n        ---------\n        Optional[:class:`Message`]\n            The last message in this channel or ``None`` if not found.\n        \"\"\"\n        return self._state._get_message(self.last_message_id) if self.last_message_id else None\n\n    @overload\n    async def edit(self) -> Optional[TextChannel]:\n        ...\n\n    @overload\n    async def edit(self, *, position: int, reason: Optional[str] = ...) -> None:\n        ...\n\n    @overload\n    async def edit(\n        self,\n        *,\n        reason: Optional[str] = ...,\n        name: str = ...,\n        topic: str = ...,\n        position: int = ...,\n        nsfw: bool = ...,\n        sync_permissions: bool = ...,\n        category: Optional[CategoryChannel] = ...,\n        slowmode_delay: int = ...,\n        default_auto_archive_duration: ThreadArchiveDuration = ...,\n        default_thread_slowmode_delay: int = ...,\n        type: ChannelType = ...,\n        overwrites: Mapping[OverwriteKeyT, PermissionOverwrite] = ...,\n    ) -> TextChannel:\n        ...\n\n    async def edit(self, *, reason: Optional[str] = None, **options: Any) -> Optional[TextChannel]:\n        \"\"\"|coro|\n\n        Edits the channel.\n\n        You must have :attr:`~Permissions.manage_channels` to do this.\n\n        .. versionchanged:: 1.3\n            The ``overwrites`` keyword-only parameter was added.\n\n        .. versionchanged:: 1.4\n            The ``type`` keyword-only parameter was added.\n\n        .. versionchanged:: 2.0\n            Edits are no longer in-place, the newly edited channel is returned instead.\n\n        .. versionchanged:: 2.0\n            This function will now raise :exc:`TypeError` or\n            :exc:`ValueError` instead of ``InvalidArgument``.\n\n        Parameters\n        ----------\n        name: :class:`str`\n            The new channel name.\n        topic: :class:`str`\n            The new channel's topic.\n        position: :class:`int`\n            The new channel's position.\n        nsfw: :class:`bool`\n            To mark the channel as NSFW or not.\n        sync_permissions: :class:`bool`\n            Whether to sync permissions with the channel's new or pre-existing\n            category. Defaults to ``False``.\n        category: Optional[:class:`CategoryChannel`]\n            The new category for this channel. Can be ``None`` to remove the\n            category.\n        slowmode_delay: :class:`int`\n            Specifies the slowmode rate limit for user in this channel, in seconds.\n            A value of ``0`` disables slowmode. The maximum value possible is ``21600``.\n        type: :class:`ChannelType`\n            Change the type of this text channel. Currently, only conversion between\n            :attr:`ChannelType.text` and :attr:`ChannelType.news` is supported. This\n            is only available to guilds that contain ``NEWS`` in :attr:`Guild.features`.\n        reason: Optional[:class:`str`]\n            The reason for editing this channel. Shows up on the audit log.\n        overwrites: :class:`Mapping`\n            A :class:`Mapping` of target (either a role or a member) to\n            :class:`PermissionOverwrite` to apply to the channel.\n        default_auto_archive_duration: :class:`int`\n            The new default auto archive duration in minutes for threads created in this channel.\n            Must be one of ``60``, ``1440``, ``4320``, or ``10080``.\n\n            .. versionadded:: 2.0\n        default_thread_slowmode_delay: :class:`int`\n            The new default slowmode delay in seconds for threads created in this channel.\n\n            .. versionadded:: 2.3\n        Raises\n        ------\n        ValueError\n            The new ``position`` is less than 0 or greater than the number of channels.\n        TypeError\n            The permission overwrite information is not in proper form.\n        Forbidden\n            You do not have permissions to edit the channel.\n        HTTPException\n            Editing the channel failed.\n\n        Returns\n        --------\n        Optional[:class:`.TextChannel`]\n            The newly edited text channel. If the edit was only positional\n            then ``None`` is returned instead.\n        \"\"\"\n\n        payload = await self._edit(options, reason=reason)\n        if payload is not None:\n            # the payload will always be the proper channel payload\n            return self.__class__(state=self._state, guild=self.guild, data=payload)  # type: ignore\n\n    @utils.copy_doc(discord.abc.GuildChannel.clone)\n    async def clone(self, *, name: Optional[str] = None, reason: Optional[str] = None) -> TextChannel:\n        return await self._clone_impl(\n            {'topic': self.topic, 'nsfw': self.nsfw, 'rate_limit_per_user': self.slowmode_delay}, name=name, reason=reason\n        )\n\n    async def delete_messages(self, messages: Iterable[Snowflake], *, reason: Optional[str] = None) -> None:\n        \"\"\"|coro|\n\n        Deletes a list of messages. This is similar to :meth:`Message.delete`\n        except it bulk deletes multiple messages.\n\n        As a special case, if the number of messages is 0, then nothing\n        is done. If the number of messages is 1 then single message\n        delete is done. If it's more than two, then bulk delete is used.\n\n        You cannot bulk delete more than 100 messages or messages that\n        are older than 14 days old.\n\n        You must have :attr:`~Permissions.manage_messages` to do this.\n\n        .. versionchanged:: 2.0\n\n            ``messages`` parameter is now positional-only.\n\n            The ``reason`` keyword-only parameter was added.\n\n        Parameters\n        -----------\n        messages: Iterable[:class:`abc.Snowflake`]\n            An iterable of messages denoting which ones to bulk delete.\n        reason: Optional[:class:`str`]\n            The reason for deleting the messages. Shows up on the audit log.\n\n        Raises\n        ------\n        ClientException\n            The number of messages to delete was more than 100.\n        Forbidden\n            You do not have proper permissions to delete the messages.\n        NotFound\n            If single delete, then the message was already deleted.\n        HTTPException\n            Deleting the messages failed.\n        \"\"\"\n        if not isinstance(messages, (list, tuple)):\n            messages = list(messages)\n\n        if len(messages) == 0:\n            return  # do nothing\n\n        if len(messages) == 1:\n            message_id: int = messages[0].id\n            await self._state.http.delete_message(self.id, message_id)\n            return\n\n        if len(messages) > 100:\n            raise ClientException('Can only bulk delete messages up to 100 messages')\n\n        message_ids: SnowflakeList = [m.id for m in messages]\n        await self._state.http.delete_messages(self.id, message_ids, reason=reason)\n\n    async def purge(\n        self,\n        *,\n        limit: Optional[int] = 100,\n        check: Callable[[Message], bool] = MISSING,\n        before: Optional[SnowflakeTime] = None,\n        after: Optional[SnowflakeTime] = None,\n        around: Optional[SnowflakeTime] = None,\n        oldest_first: Optional[bool] = None,\n        bulk: bool = True,\n        reason: Optional[str] = None,\n    ) -> List[Message]:\n        \"\"\"|coro|\n\n        Purges a list of messages that meet the criteria given by the predicate\n        ``check``. If a ``check`` is not provided then all messages are deleted\n        without discrimination.\n\n        You must have :attr:`~Permissions.manage_messages` to\n        delete messages even if they are your own.\n        Having :attr:`~Permissions.read_message_history` is\n        also needed to retrieve message history.\n\n        .. versionchanged:: 2.0\n\n            The ``reason`` keyword-only parameter was added.\n\n        Examples\n        ---------\n\n        Deleting bot's messages ::\n\n            def is_me(m):\n                return m.author == client.user\n\n            deleted = await channel.purge(limit=100, check=is_me)\n            await channel.send(f'Deleted {len(deleted)} message(s)')\n\n        Parameters\n        -----------\n        limit: Optional[:class:`int`]\n            The number of messages to search through. This is not the number\n            of messages that will be deleted, though it can be.\n        check: Callable[[:class:`Message`], :class:`bool`]\n            The function used to check if a message should be deleted.\n            It must take a :class:`Message` as its sole parameter.\n        before: Optional[Union[:class:`abc.Snowflake`, :class:`datetime.datetime`]]\n            Same as ``before`` in :meth:`history`.\n        after: Optional[Union[:class:`abc.Snowflake`, :class:`datetime.datetime`]]\n            Same as ``after`` in :meth:`history`.\n        around: Optional[Union[:class:`abc.Snowflake`, :class:`datetime.datetime`]]\n            Same as ``around`` in :meth:`history`.\n        oldest_first: Optional[:class:`bool`]\n            Same as ``oldest_first`` in :meth:`history`.\n        bulk: :class:`bool`\n            If ``True``, use bulk delete. Setting this to ``False`` is useful for mass-deleting\n            a bot's own messages without :attr:`Permissions.manage_messages`. When ``True``, will\n            fall back to single delete if messages are older than two weeks.\n        reason: Optional[:class:`str`]\n            The reason for purging the messages. Shows up on the audit log.\n\n        Raises\n        -------\n        Forbidden\n            You do not have proper permissions to do the actions required.\n        HTTPException\n            Purging the messages failed.\n\n        Returns\n        --------\n        List[:class:`.Message`]\n            The list of messages that were deleted.\n        \"\"\"\n        return await discord.abc._purge_helper(\n            self,\n            limit=limit,\n            check=check,\n            before=before,\n            after=after,\n            around=around,\n            oldest_first=oldest_first,\n            bulk=bulk,\n            reason=reason,\n        )\n\n    async def webhooks(self) -> List[Webhook]:\n        \"\"\"|coro|\n\n        Gets the list of webhooks from this channel.\n\n        You must have :attr:`~.Permissions.manage_webhooks` to do this.\n\n        Raises\n        -------\n        Forbidden\n            You don't have permissions to get the webhooks.\n\n        Returns\n        --------\n        List[:class:`Webhook`]\n            The webhooks for this channel.\n        \"\"\"\n\n        from .webhook import Webhook\n\n        data = await self._state.http.channel_webhooks(self.id)\n        return [Webhook.from_state(d, state=self._state) for d in data]\n\n    async def create_webhook(self, *, name: str, avatar: Optional[bytes] = None, reason: Optional[str] = None) -> Webhook:\n        \"\"\"|coro|\n\n        Creates a webhook for this channel.\n\n        You must have :attr:`~.Permissions.manage_webhooks` to do this.\n\n        .. versionchanged:: 1.1\n            Added the ``reason`` keyword-only parameter.\n\n        Parameters\n        -------------\n        name: :class:`str`\n            The webhook's name.\n        avatar: Optional[:class:`bytes`]\n            A :term:`py:bytes-like object` representing the webhook's default avatar.\n            This operates similarly to :meth:`~ClientUser.edit`.\n        reason: Optional[:class:`str`]\n            The reason for creating this webhook. Shows up in the audit logs.\n\n        Raises\n        -------\n        HTTPException\n            Creating the webhook failed.\n        Forbidden\n            You do not have permissions to create a webhook.\n\n        Returns\n        --------\n        :class:`Webhook`\n            The created webhook.\n        \"\"\"\n\n        from .webhook import Webhook\n\n        if avatar is not None:\n            avatar = utils._bytes_to_base64_data(avatar)  # type: ignore # Silence reassignment error\n\n        data = await self._state.http.create_webhook(self.id, name=str(name), avatar=avatar, reason=reason)\n        return Webhook.from_state(data, state=self._state)\n\n    async def follow(self, *, destination: TextChannel, reason: Optional[str] = None) -> Webhook:\n        \"\"\"|coro|\n\n        Follows a channel using a webhook.\n\n        Only news channels can be followed.\n\n        .. note::\n\n            The webhook returned will not provide a token to do webhook\n            actions, as Discord does not provide it.\n\n        .. versionadded:: 1.3\n\n        .. versionchanged:: 2.0\n            This function will now raise :exc:`TypeError` instead of\n            ``InvalidArgument``.\n\n        Parameters\n        -----------\n        destination: :class:`TextChannel`\n            The channel you would like to follow from.\n        reason: Optional[:class:`str`]\n            The reason for following the channel. Shows up on the destination guild's audit log.\n\n            .. versionadded:: 1.4\n\n        Raises\n        -------\n        HTTPException\n            Following the channel failed.\n        Forbidden\n            You do not have the permissions to create a webhook.\n        ClientException\n            The channel is not a news channel.\n        TypeError\n            The destination channel is not a text channel.\n\n        Returns\n        --------\n        :class:`Webhook`\n            The created webhook.\n        \"\"\"\n\n        if not self.is_news():\n            raise ClientException('The channel must be a news channel.')\n\n        if not isinstance(destination, TextChannel):\n            raise TypeError(f'Expected TextChannel received {destination.__class__.__name__}')\n\n        from .webhook import Webhook\n\n        data = await self._state.http.follow_webhook(self.id, webhook_channel_id=destination.id, reason=reason)\n        return Webhook._as_follower(data, channel=destination, user=self._state.user)\n\n    def get_partial_message(self, message_id: int, /) -> PartialMessage:\n        \"\"\"Creates a :class:`PartialMessage` from the message ID.\n\n        This is useful if you want to work with a message and only have its ID without\n        doing an unnecessary API call.\n\n        .. versionadded:: 1.6\n\n        .. versionchanged:: 2.0\n\n            ``message_id`` parameter is now positional-only.\n\n        Parameters\n        ------------\n        message_id: :class:`int`\n            The message ID to create a partial message for.\n\n        Returns\n        ---------\n        :class:`PartialMessage`\n            The partial message.\n        \"\"\"\n\n        from .message import PartialMessage\n\n        return PartialMessage(channel=self, id=message_id)\n\n    def get_thread(self, thread_id: int, /) -> Optional[Thread]:\n        \"\"\"Returns a thread with the given ID.\n\n        .. note::\n\n            This does not always retrieve archived threads, as they are not retained in the internal\n            cache. Use :func:`Guild.fetch_channel` instead.\n\n        .. versionadded:: 2.0\n\n        Parameters\n        -----------\n        thread_id: :class:`int`\n            The ID to search for.\n\n        Returns\n        --------\n        Optional[:class:`Thread`]\n            The returned thread or ``None`` if not found.\n        \"\"\"\n        return self.guild.get_thread(thread_id)\n\n    async def create_thread(\n        self,\n        *,\n        name: str,\n        message: Optional[Snowflake] = None,\n        auto_archive_duration: ThreadArchiveDuration = MISSING,\n        type: Optional[ChannelType] = None,\n        reason: Optional[str] = None,\n        invitable: bool = True,\n        slowmode_delay: Optional[int] = None,\n    ) -> Thread:\n        \"\"\"|coro|\n\n        Creates a thread in this text channel.\n\n        To create a public thread, you must have :attr:`~discord.Permissions.create_public_threads`.\n        For a private thread, :attr:`~discord.Permissions.create_private_threads` is needed instead.\n\n        .. versionadded:: 2.0\n\n        Parameters\n        -----------\n        name: :class:`str`\n            The name of the thread.\n        message: Optional[:class:`abc.Snowflake`]\n            A snowflake representing the message to create the thread with.\n            If ``None`` is passed then a private thread is created.\n            Defaults to ``None``.\n        auto_archive_duration: :class:`int`\n            The duration in minutes before a thread is automatically hidden from the channel list.\n            If not provided, the channel's default auto archive duration is used.\n\n            Must be one of ``60``, ``1440``, ``4320``, or ``10080``, if provided.\n        type: Optional[:class:`ChannelType`]\n            The type of thread to create. If a ``message`` is passed then this parameter\n            is ignored, as a thread created with a message is always a public thread.\n            By default this creates a private thread if this is ``None``.\n        reason: :class:`str`\n            The reason for creating a new thread. Shows up on the audit log.\n        invitable: :class:`bool`\n            Whether non-moderators can add users to the thread. Only applicable to private threads.\n            Defaults to ``True``.\n        slowmode_delay: Optional[:class:`int`]\n            Specifies the slowmode rate limit for user in this channel, in seconds.\n            The maximum value possible is ``21600``. By default no slowmode rate limit\n            if this is ``None``.\n\n        Raises\n        -------\n        Forbidden\n            You do not have permissions to create a thread.\n        HTTPException\n            Starting the thread failed.\n\n        Returns\n        --------\n        :class:`Thread`\n            The created thread\n        \"\"\"\n\n        if type is None:\n            type = ChannelType.private_thread\n\n        if message is None:\n            data = await self._state.http.start_thread_without_message(\n                self.id,\n                name=name,\n                auto_archive_duration=auto_archive_duration or self.default_auto_archive_duration,\n                type=type.value,  # type: ignore # we're assuming that the user is passing a valid variant\n                reason=reason,\n                invitable=invitable,\n                rate_limit_per_user=slowmode_delay,\n            )\n        else:\n            data = await self._state.http.start_thread_with_message(\n                self.id,\n                message.id,\n                name=name,\n                auto_archive_duration=auto_archive_duration or self.default_auto_archive_duration,\n                reason=reason,\n                rate_limit_per_user=slowmode_delay,\n            )\n\n        return Thread(guild=self.guild, state=self._state, data=data)\n\n    async def archived_threads(\n        self,\n        *,\n        private: bool = False,\n        joined: bool = False,\n        limit: Optional[int] = 100,\n        before: Optional[Union[Snowflake, datetime.datetime]] = None,\n    ) -> AsyncIterator[Thread]:\n        \"\"\"Returns an :term:`asynchronous iterator` that iterates over all archived threads in this text channel,\n        in order of decreasing ID for joined threads, and decreasing :attr:`Thread.archive_timestamp` otherwise.\n\n        You must have :attr:`~Permissions.read_message_history` to do this. If iterating over private threads\n        then :attr:`~Permissions.manage_threads` is also required.\n\n        .. versionadded:: 2.0\n\n        Parameters\n        -----------\n        limit: Optional[:class:`bool`]\n            The number of threads to retrieve.\n            If ``None``, retrieves every archived thread in the channel. Note, however,\n            that this would make it a slow operation.\n        before: Optional[Union[:class:`abc.Snowflake`, :class:`datetime.datetime`]]\n            Retrieve archived channels before the given date or ID.\n        private: :class:`bool`\n            Whether to retrieve private archived threads.\n        joined: :class:`bool`\n            Whether to retrieve private archived threads that you've joined.\n            You cannot set ``joined`` to ``True`` and ``private`` to ``False``.\n\n        Raises\n        ------\n        Forbidden\n            You do not have permissions to get archived threads.\n        HTTPException\n            The request to get the archived threads failed.\n        ValueError\n            ``joined`` was set to ``True`` and ``private`` was set to ``False``. You cannot retrieve public archived\n            threads that you have joined.\n\n        Yields\n        -------\n        :class:`Thread`\n            The archived threads.\n        \"\"\"\n        if joined and not private:\n            raise ValueError('Cannot retrieve joined public archived threads')\n\n        before_timestamp = None\n\n        if isinstance(before, datetime.datetime):\n            if joined:\n                before_timestamp = str(utils.time_snowflake(before, high=False))\n            else:\n                before_timestamp = before.isoformat()\n        elif before is not None:\n            if joined:\n                before_timestamp = str(before.id)\n            else:\n                before_timestamp = utils.snowflake_time(before.id).isoformat()\n\n        update_before = lambda data: data['thread_metadata']['archive_timestamp']\n        endpoint = self.guild._state.http.get_public_archived_threads\n\n        if joined:\n            update_before = lambda data: data['id']\n            endpoint = self.guild._state.http.get_joined_private_archived_threads\n        elif private:\n            endpoint = self.guild._state.http.get_private_archived_threads\n\n        while True:\n            retrieve = 100\n            if limit is not None:\n                if limit <= 0:\n                    return\n                retrieve = max(2, min(retrieve, limit))\n\n            data = await endpoint(self.id, before=before_timestamp, limit=retrieve)\n\n            threads = data.get('threads', [])\n            for raw_thread in threads:\n                yield Thread(guild=self.guild, state=self.guild._state, data=raw_thread)\n                # Currently the API doesn't let you request less than 2 threads.\n                # Bail out early if we had to retrieve more than what the limit was.\n                if limit is not None:\n                    limit -= 1\n                    if limit <= 0:\n                        return\n\n            if not data.get('has_more', False):\n                return\n\n            before_timestamp = update_before(threads[-1])\n\n\nclass VocalGuildChannel(discord.abc.Messageable, discord.abc.Connectable, discord.abc.GuildChannel, Hashable):\n    __slots__ = (\n        'name',\n        'id',\n        'guild',\n        'nsfw',\n        'bitrate',\n        'user_limit',\n        '_state',\n        'position',\n        'slowmode_delay',\n        '_overwrites',\n        'category_id',\n        'rtc_region',\n        'video_quality_mode',\n        'last_message_id',\n    )\n\n    def __init__(self, *, state: ConnectionState, guild: Guild, data: Union[VoiceChannelPayload, StageChannelPayload]):\n        self._state: ConnectionState = state\n        self.id: int = int(data['id'])\n        self._update(guild, data)\n\n    async def _get_channel(self) -> Self:\n        return self\n\n    def _get_voice_client_key(self) -> Tuple[int, str]:\n        return self.guild.id, 'guild_id'\n\n    def _get_voice_state_pair(self) -> Tuple[int, int]:\n        return self.guild.id, self.id\n\n    def _update(self, guild: Guild, data: Union[VoiceChannelPayload, StageChannelPayload]) -> None:\n        self.guild: Guild = guild\n        self.name: str = data['name']\n        self.nsfw: bool = data.get('nsfw', False)\n        self.rtc_region: Optional[str] = data.get('rtc_region')\n        self.video_quality_mode: VideoQualityMode = try_enum(VideoQualityMode, data.get('video_quality_mode', 1))\n        self.category_id: Optional[int] = utils._get_as_snowflake(data, 'parent_id')\n        self.last_message_id: Optional[int] = utils._get_as_snowflake(data, 'last_message_id')\n        self.position: int = data['position']\n        self.slowmode_delay = data.get('rate_limit_per_user', 0)\n        self.bitrate: int = data['bitrate']\n        self.user_limit: int = data['user_limit']\n        self._fill_overwrites(data)\n\n    @property\n    def _sorting_bucket(self) -> int:\n        return ChannelType.voice.value\n\n    def is_nsfw(self) -> bool:\n        \"\"\":class:`bool`: Checks if the channel is NSFW.\n\n        .. versionadded:: 2.0\n        \"\"\"\n        return self.nsfw\n\n    @property\n    def members(self) -> List[Member]:\n        \"\"\"List[:class:`Member`]: Returns all members that are currently inside this voice channel.\"\"\"\n        ret = []\n        for user_id, state in self.guild._voice_states.items():\n            if state.channel and state.channel.id == self.id:\n                member = self.guild.get_member(user_id)\n                if member is not None:\n                    ret.append(member)\n        return ret\n\n    @property\n    def voice_states(self) -> Dict[int, VoiceState]:\n        \"\"\"Returns a mapping of member IDs who have voice states in this channel.\n\n        .. versionadded:: 1.3\n\n        .. note::\n\n            This function is intentionally low level to replace :attr:`members`\n            when the member cache is unavailable.\n\n        Returns\n        --------\n        Mapping[:class:`int`, :class:`VoiceState`]\n            The mapping of member ID to a voice state.\n        \"\"\"\n        # fmt: off\n        return {\n            key: value\n            for key, value in self.guild._voice_states.items()\n            if value.channel and value.channel.id == self.id\n        }\n        # fmt: on\n\n    @property\n    def scheduled_events(self) -> List[ScheduledEvent]:\n        \"\"\"List[:class:`ScheduledEvent`]: Returns all scheduled events for this channel.\n\n        .. versionadded:: 2.0\n        \"\"\"\n        return [event for event in self.guild.scheduled_events if event.channel_id == self.id]\n\n    @utils.copy_doc(discord.abc.GuildChannel.permissions_for)\n    def permissions_for(self, obj: Union[Member, Role], /) -> Permissions:\n        base = super().permissions_for(obj)\n        self._apply_implicit_permissions(base)\n\n        # voice channels cannot be edited by people who can't connect to them\n        # It also implicitly denies all other voice perms\n        if not base.connect:\n            denied = Permissions.voice()\n            denied.update(manage_channels=True, manage_roles=True)\n            base.value &= ~denied.value\n        return base\n\n    @property\n    def last_message(self) -> Optional[Message]:\n        \"\"\"Retrieves the last message from this channel in cache.\n\n        The message might not be valid or point to an existing message.\n\n        .. versionadded:: 2.0\n\n        .. admonition:: Reliable Fetching\n            :class: helpful\n\n            For a slightly more reliable method of fetching the\n            last message, consider using either :meth:`history`\n            or :meth:`fetch_message` with the :attr:`last_message_id`\n            attribute.\n\n        Returns\n        ---------\n        Optional[:class:`Message`]\n            The last message in this channel or ``None`` if not found.\n        \"\"\"\n        return self._state._get_message(self.last_message_id) if self.last_message_id else None\n\n    def get_partial_message(self, message_id: int, /) -> PartialMessage:\n        \"\"\"Creates a :class:`PartialMessage` from the message ID.\n\n        This is useful if you want to work with a message and only have its ID without\n        doing an unnecessary API call.\n\n        .. versionadded:: 2.0\n\n        Parameters\n        ------------\n        message_id: :class:`int`\n            The message ID to create a partial message for.\n\n        Returns\n        ---------\n        :class:`PartialMessage`\n            The partial message.\n        \"\"\"\n\n        from .message import PartialMessage\n\n        return PartialMessage(channel=self, id=message_id)  # type: ignore # VocalGuildChannel is an impl detail\n\n    async def delete_messages(self, messages: Iterable[Snowflake], *, reason: Optional[str] = None) -> None:\n        \"\"\"|coro|\n\n        Deletes a list of messages. This is similar to :meth:`Message.delete`\n        except it bulk deletes multiple messages.\n\n        As a special case, if the number of messages is 0, then nothing\n        is done. If the number of messages is 1 then single message\n        delete is done. If it's more than two, then bulk delete is used.\n\n        You cannot bulk delete more than 100 messages or messages that\n        are older than 14 days old.\n\n        You must have :attr:`~Permissions.manage_messages` to do this.\n\n        .. versionadded:: 2.0\n\n        Parameters\n        -----------\n        messages: Iterable[:class:`abc.Snowflake`]\n            An iterable of messages denoting which ones to bulk delete.\n        reason: Optional[:class:`str`]\n            The reason for deleting the messages. Shows up on the audit log.\n\n        Raises\n        ------\n        ClientException\n            The number of messages to delete was more than 100.\n        Forbidden\n            You do not have proper permissions to delete the messages.\n        NotFound\n            If single delete, then the message was already deleted.\n        HTTPException\n            Deleting the messages failed.\n        \"\"\"\n        if not isinstance(messages, (list, tuple)):\n            messages = list(messages)\n\n        if len(messages) == 0:\n            return  # do nothing\n\n        if len(messages) == 1:\n            message_id: int = messages[0].id\n            await self._state.http.delete_message(self.id, message_id)\n            return\n\n        if len(messages) > 100:\n            raise ClientException('Can only bulk delete messages up to 100 messages')\n\n        message_ids: SnowflakeList = [m.id for m in messages]\n        await self._state.http.delete_messages(self.id, message_ids, reason=reason)\n\n    async def purge(\n        self,\n        *,\n        limit: Optional[int] = 100,\n        check: Callable[[Message], bool] = MISSING,\n        before: Optional[SnowflakeTime] = None,\n        after: Optional[SnowflakeTime] = None,\n        around: Optional[SnowflakeTime] = None,\n        oldest_first: Optional[bool] = None,\n        bulk: bool = True,\n        reason: Optional[str] = None,\n    ) -> List[Message]:\n        \"\"\"|coro|\n\n        Purges a list of messages that meet the criteria given by the predicate\n        ``check``. If a ``check`` is not provided then all messages are deleted\n        without discrimination.\n\n        You must have :attr:`~Permissions.manage_messages` to\n        delete messages even if they are your own.\n        Having :attr:`~Permissions.read_message_history` is\n        also needed to retrieve message history.\n\n        .. versionadded:: 2.0\n\n        Examples\n        ---------\n\n        Deleting bot's messages ::\n\n            def is_me(m):\n                return m.author == client.user\n\n            deleted = await channel.purge(limit=100, check=is_me)\n            await channel.send(f'Deleted {len(deleted)} message(s)')\n\n        Parameters\n        -----------\n        limit: Optional[:class:`int`]\n            The number of messages to search through. This is not the number\n            of messages that will be deleted, though it can be.\n        check: Callable[[:class:`Message`], :class:`bool`]\n            The function used to check if a message should be deleted.\n            It must take a :class:`Message` as its sole parameter.\n        before: Optional[Union[:class:`abc.Snowflake`, :class:`datetime.datetime`]]\n            Same as ``before`` in :meth:`history`.\n        after: Optional[Union[:class:`abc.Snowflake`, :class:`datetime.datetime`]]\n            Same as ``after`` in :meth:`history`.\n        around: Optional[Union[:class:`abc.Snowflake`, :class:`datetime.datetime`]]\n            Same as ``around`` in :meth:`history`.\n        oldest_first: Optional[:class:`bool`]\n            Same as ``oldest_first`` in :meth:`history`.\n        bulk: :class:`bool`\n            If ``True``, use bulk delete. Setting this to ``False`` is useful for mass-deleting\n            a bot's own messages without :attr:`Permissions.manage_messages`. When ``True``, will\n            fall back to single delete if messages are older than two weeks.\n        reason: Optional[:class:`str`]\n            The reason for purging the messages. Shows up on the audit log.\n\n        Raises\n        -------\n        Forbidden\n            You do not have proper permissions to do the actions required.\n        HTTPException\n            Purging the messages failed.\n\n        Returns\n        --------\n        List[:class:`.Message`]\n            The list of messages that were deleted.\n        \"\"\"\n\n        return await discord.abc._purge_helper(\n            self,\n            limit=limit,\n            check=check,\n            before=before,\n            after=after,\n            around=around,\n            oldest_first=oldest_first,\n            bulk=bulk,\n            reason=reason,\n        )\n\n    async def webhooks(self) -> List[Webhook]:\n        \"\"\"|coro|\n\n        Gets the list of webhooks from this channel.\n\n        You must have :attr:`~.Permissions.manage_webhooks` to do this.\n\n        .. versionadded:: 2.0\n\n        Raises\n        -------\n        Forbidden\n            You don't have permissions to get the webhooks.\n\n        Returns\n        --------\n        List[:class:`Webhook`]\n            The webhooks for this channel.\n        \"\"\"\n\n        from .webhook import Webhook\n\n        data = await self._state.http.channel_webhooks(self.id)\n        return [Webhook.from_state(d, state=self._state) for d in data]\n\n    async def create_webhook(self, *, name: str, avatar: Optional[bytes] = None, reason: Optional[str] = None) -> Webhook:\n        \"\"\"|coro|\n\n        Creates a webhook for this channel.\n\n        You must have :attr:`~.Permissions.manage_webhooks` to do this.\n\n        .. versionadded:: 2.0\n\n        Parameters\n        -------------\n        name: :class:`str`\n            The webhook's name.\n        avatar: Optional[:class:`bytes`]\n            A :term:`py:bytes-like object` representing the webhook's default avatar.\n            This operates similarly to :meth:`~ClientUser.edit`.\n        reason: Optional[:class:`str`]\n            The reason for creating this webhook. Shows up in the audit logs.\n\n        Raises\n        -------\n        HTTPException\n            Creating the webhook failed.\n        Forbidden\n            You do not have permissions to create a webhook.\n\n        Returns\n        --------\n        :class:`Webhook`\n            The created webhook.\n        \"\"\"\n\n        from .webhook import Webhook\n\n        if avatar is not None:\n            avatar = utils._bytes_to_base64_data(avatar)  # type: ignore # Silence reassignment error\n\n        data = await self._state.http.create_webhook(self.id, name=str(name), avatar=avatar, reason=reason)\n        return Webhook.from_state(data, state=self._state)\n\n\nclass VoiceChannel(VocalGuildChannel):\n    \"\"\"Represents a Discord guild voice channel.\n\n    .. container:: operations\n\n        .. describe:: x == y\n\n            Checks if two channels are equal.\n\n        .. describe:: x != y\n\n            Checks if two channels are not equal.\n\n        .. describe:: hash(x)\n\n            Returns the channel's hash.\n\n        .. describe:: str(x)\n\n            Returns the channel's name.\n\n    Attributes\n    -----------\n    name: :class:`str`\n        The channel name.\n    guild: :class:`Guild`\n        The guild the channel belongs to.\n    id: :class:`int`\n        The channel ID.\n    nsfw: :class:`bool`\n        If the channel is marked as \"not safe for work\" or \"age restricted\".\n\n        .. versionadded:: 2.0\n    category_id: Optional[:class:`int`]\n        The category channel ID this channel belongs to, if applicable.\n    position: :class:`int`\n        The position in the channel list. This is a number that starts at 0. e.g. the\n        top channel is position 0.\n    bitrate: :class:`int`\n        The channel's preferred audio bitrate in bits per second.\n    user_limit: :class:`int`\n        The channel's limit for number of members that can be in a voice channel.\n    rtc_region: Optional[:class:`str`]\n        The region for the voice channel's voice communication.\n        A value of ``None`` indicates automatic voice region detection.\n\n        .. versionadded:: 1.7\n\n        .. versionchanged:: 2.0\n            The type of this attribute has changed to :class:`str`.\n    video_quality_mode: :class:`VideoQualityMode`\n        The camera video quality for the voice channel's participants.\n\n        .. versionadded:: 2.0\n    last_message_id: Optional[:class:`int`]\n        The last message ID of the message sent to this channel. It may\n        *not* point to an existing or valid message.\n\n        .. versionadded:: 2.0\n    slowmode_delay: :class:`int`\n        The number of seconds a member must wait between sending messages\n        in this channel. A value of ``0`` denotes that it is disabled.\n        Bots and users with :attr:`~Permissions.manage_channels` or\n        :attr:`~Permissions.manage_messages` bypass slowmode.\n\n        .. versionadded:: 2.2\n    \"\"\"\n\n    __slots__ = ()\n\n    def __repr__(self) -> str:\n        attrs = [\n            ('id', self.id),\n            ('name', self.name),\n            ('rtc_region', self.rtc_region),\n            ('position', self.position),\n            ('bitrate', self.bitrate),\n            ('video_quality_mode', self.video_quality_mode),\n            ('user_limit', self.user_limit),\n            ('category_id', self.category_id),\n        ]\n        joined = ' '.join('%s=%r' % t for t in attrs)\n        return f'<{self.__class__.__name__} {joined}>'\n\n    @property\n    def _scheduled_event_entity_type(self) -> Optional[EntityType]:\n        return EntityType.voice\n\n    @property\n    def type(self) -> Literal[ChannelType.voice]:\n        \"\"\":class:`ChannelType`: The channel's Discord type.\"\"\"\n        return ChannelType.voice\n\n    @utils.copy_doc(discord.abc.GuildChannel.clone)\n    async def clone(self, *, name: Optional[str] = None, reason: Optional[str] = None) -> VoiceChannel:\n        return await self._clone_impl({'bitrate': self.bitrate, 'user_limit': self.user_limit}, name=name, reason=reason)\n\n    @overload\n    async def edit(self) -> None:\n        ...\n\n    @overload\n    async def edit(self, *, position: int, reason: Optional[str] = ...) -> None:\n        ...\n\n    @overload\n    async def edit(\n        self,\n        *,\n        name: str = ...,\n        nsfw: bool = ...,\n        bitrate: int = ...,\n        user_limit: int = ...,\n        position: int = ...,\n        sync_permissions: int = ...,\n        category: Optional[CategoryChannel] = ...,\n        overwrites: Mapping[OverwriteKeyT, PermissionOverwrite] = ...,\n        rtc_region: Optional[str] = ...,\n        video_quality_mode: VideoQualityMode = ...,\n        slowmode_delay: int = ...,\n        status: Optional[str] = ...,\n        reason: Optional[str] = ...,\n    ) -> VoiceChannel:\n        ...\n\n    async def edit(self, *, reason: Optional[str] = None, **options: Any) -> Optional[VoiceChannel]:\n        \"\"\"|coro|\n\n        Edits the channel.\n\n        You must have :attr:`~Permissions.manage_channels` to do this.\n\n        .. versionchanged:: 1.3\n            The ``overwrites`` keyword-only parameter was added.\n\n        .. versionchanged:: 2.0\n            Edits are no longer in-place, the newly edited channel is returned instead.\n\n        .. versionchanged:: 2.0\n            The ``region`` parameter now accepts :class:`str` instead of an enum.\n\n        .. versionchanged:: 2.0\n            This function will now raise :exc:`TypeError` instead of\n            ``InvalidArgument``.\n\n        Parameters\n        ----------\n        name: :class:`str`\n            The new channel's name.\n        bitrate: :class:`int`\n            The new channel's bitrate.\n        nsfw: :class:`bool`\n            To mark the channel as NSFW or not.\n        user_limit: :class:`int`\n            The new channel's user limit.\n        position: :class:`int`\n            The new channel's position.\n        sync_permissions: :class:`bool`\n            Whether to sync permissions with the channel's new or pre-existing\n            category. Defaults to ``False``.\n        category: Optional[:class:`CategoryChannel`]\n            The new category for this channel. Can be ``None`` to remove the\n            category.\n        slowmode_delay: :class:`int`\n            Specifies the slowmode rate limit for user in this channel, in seconds.\n            A value of ``0`` disables slowmode. The maximum value possible is ``21600``.\n        reason: Optional[:class:`str`]\n            The reason for editing this channel. Shows up on the audit log.\n        overwrites: :class:`Mapping`\n            A :class:`Mapping` of target (either a role or a member) to\n            :class:`PermissionOverwrite` to apply to the channel.\n        rtc_region: Optional[:class:`str`]\n            The new region for the voice channel's voice communication.\n            A value of ``None`` indicates automatic voice region detection.\n\n            .. versionadded:: 1.7\n        video_quality_mode: :class:`VideoQualityMode`\n            The camera video quality for the voice channel's participants.\n\n            .. versionadded:: 2.0\n        status: Optional[:class:`str`]\n            The new voice channel status. It can be up to 500 characters.\n            Can be ``None`` to remove the status.\n\n            .. versionadded:: 2.4\n\n        Raises\n        ------\n        TypeError\n            If the permission overwrite information is not in proper form.\n        Forbidden\n            You do not have permissions to edit the channel.\n        HTTPException\n            Editing the channel failed.\n\n        Returns\n        --------\n        Optional[:class:`.VoiceChannel`]\n            The newly edited voice channel. If the edit was only positional\n            then ``None`` is returned instead.\n        \"\"\"\n        payload = await self._edit(options, reason=reason)\n        if payload is not None:\n            # the payload will always be the proper channel payload\n            return self.__class__(state=self._state, guild=self.guild, data=payload)  # type: ignore\n\n\nclass StageChannel(VocalGuildChannel):\n    \"\"\"Represents a Discord guild stage channel.\n\n    .. versionadded:: 1.7\n\n    .. container:: operations\n\n        .. describe:: x == y\n\n            Checks if two channels are equal.\n\n        .. describe:: x != y\n\n            Checks if two channels are not equal.\n\n        .. describe:: hash(x)\n\n            Returns the channel's hash.\n\n        .. describe:: str(x)\n\n            Returns the channel's name.\n\n    Attributes\n    -----------\n    name: :class:`str`\n        The channel name.\n    guild: :class:`Guild`\n        The guild the channel belongs to.\n    id: :class:`int`\n        The channel ID.\n    nsfw: :class:`bool`\n        If the channel is marked as \"not safe for work\" or \"age restricted\".\n\n        .. versionadded:: 2.0\n    topic: Optional[:class:`str`]\n        The channel's topic. ``None`` if it isn't set.\n    category_id: Optional[:class:`int`]\n        The category channel ID this channel belongs to, if applicable.\n    position: :class:`int`\n        The position in the channel list. This is a number that starts at 0. e.g. the\n        top channel is position 0.\n    bitrate: :class:`int`\n        The channel's preferred audio bitrate in bits per second.\n    user_limit: :class:`int`\n        The channel's limit for number of members that can be in a stage channel.\n    rtc_region: Optional[:class:`str`]\n        The region for the stage channel's voice communication.\n        A value of ``None`` indicates automatic voice region detection.\n    video_quality_mode: :class:`VideoQualityMode`\n        The camera video quality for the stage channel's participants.\n\n        .. versionadded:: 2.0\n    last_message_id: Optional[:class:`int`]\n        The last message ID of the message sent to this channel. It may\n        *not* point to an existing or valid message.\n\n        .. versionadded:: 2.2\n    slowmode_delay: :class:`int`\n        The number of seconds a member must wait between sending messages\n        in this channel. A value of ``0`` denotes that it is disabled.\n        Bots and users with :attr:`~Permissions.manage_channels` or\n        :attr:`~Permissions.manage_messages` bypass slowmode.\n\n        .. versionadded:: 2.2\n    \"\"\"\n\n    __slots__ = ('topic',)\n\n    def __repr__(self) -> str:\n        attrs = [\n            ('id', self.id),\n            ('name', self.name),\n            ('topic', self.topic),\n            ('rtc_region', self.rtc_region),\n            ('position', self.position),\n            ('bitrate', self.bitrate),\n            ('video_quality_mode', self.video_quality_mode),\n            ('user_limit', self.user_limit),\n            ('category_id', self.category_id),\n        ]\n        joined = ' '.join('%s=%r' % t for t in attrs)\n        return f'<{self.__class__.__name__} {joined}>'\n\n    def _update(self, guild: Guild, data: StageChannelPayload) -> None:\n        super()._update(guild, data)\n        self.topic: Optional[str] = data.get('topic')\n\n    @property\n    def _scheduled_event_entity_type(self) -> Optional[EntityType]:\n        return EntityType.stage_instance\n\n    @property\n    def requesting_to_speak(self) -> List[Member]:\n        \"\"\"List[:class:`Member`]: A list of members who are requesting to speak in the stage channel.\"\"\"\n        return [member for member in self.members if member.voice and member.voice.requested_to_speak_at is not None]\n\n    @property\n    def speakers(self) -> List[Member]:\n        \"\"\"List[:class:`Member`]: A list of members who have been permitted to speak in the stage channel.\n\n        .. versionadded:: 2.0\n        \"\"\"\n        return [\n            member\n            for member in self.members\n            if member.voice and not member.voice.suppress and member.voice.requested_to_speak_at is None\n        ]\n\n    @property\n    def listeners(self) -> List[Member]:\n        \"\"\"List[:class:`Member`]: A list of members who are listening in the stage channel.\n\n        .. versionadded:: 2.0\n        \"\"\"\n        return [member for member in self.members if member.voice and member.voice.suppress]\n\n    @property\n    def moderators(self) -> List[Member]:\n        \"\"\"List[:class:`Member`]: A list of members who are moderating the stage channel.\n\n        .. versionadded:: 2.0\n        \"\"\"\n        required_permissions = Permissions.stage_moderator()\n        return [member for member in self.members if self.permissions_for(member) >= required_permissions]\n\n    @property\n    def type(self) -> Literal[ChannelType.stage_voice]:\n        \"\"\":class:`ChannelType`: The channel's Discord type.\"\"\"\n        return ChannelType.stage_voice\n\n    @utils.copy_doc(discord.abc.GuildChannel.clone)\n    async def clone(self, *, name: Optional[str] = None, reason: Optional[str] = None) -> StageChannel:\n        return await self._clone_impl({}, name=name, reason=reason)\n\n    @property\n    def instance(self) -> Optional[StageInstance]:\n        \"\"\"Optional[:class:`StageInstance`]: The running stage instance of the stage channel.\n\n        .. versionadded:: 2.0\n        \"\"\"\n        return utils.get(self.guild.stage_instances, channel_id=self.id)\n\n    async def create_instance(\n        self,\n        *,\n        topic: str,\n        privacy_level: PrivacyLevel = MISSING,\n        send_start_notification: bool = False,\n        scheduled_event: Snowflake = MISSING,\n        reason: Optional[str] = None,\n    ) -> StageInstance:\n        \"\"\"|coro|\n\n        Create a stage instance.\n\n        You must have :attr:`~Permissions.manage_channels` to do this.\n\n        .. versionadded:: 2.0\n\n        Parameters\n        -----------\n        topic: :class:`str`\n            The stage instance's topic.\n        privacy_level: :class:`PrivacyLevel`\n            The stage instance's privacy level. Defaults to :attr:`PrivacyLevel.guild_only`.\n        send_start_notification: :class:`bool`\n            Whether to send a start notification. This sends a push notification to @everyone if ``True``. Defaults to ``False``.\n            You must have :attr:`~Permissions.mention_everyone` to do this.\n\n            .. versionadded:: 2.3\n        scheduled_event: :class:`~discord.abc.Snowflake`\n            The guild scheduled event associated with the stage instance.\n\n            .. versionadded:: 2.4\n        reason: :class:`str`\n            The reason the stage instance was created. Shows up on the audit log.\n\n        Raises\n        ------\n        TypeError\n            If the ``privacy_level`` parameter is not the proper type.\n        Forbidden\n            You do not have permissions to create a stage instance.\n        HTTPException\n            Creating a stage instance failed.\n\n        Returns\n        --------\n        :class:`StageInstance`\n            The newly created stage instance.\n        \"\"\"\n\n        payload: Dict[str, Any] = {'channel_id': self.id, 'topic': topic}\n\n        if privacy_level is not MISSING:\n            if not isinstance(privacy_level, PrivacyLevel):\n                raise TypeError('privacy_level field must be of type PrivacyLevel')\n\n            payload['privacy_level'] = privacy_level.value\n\n        if scheduled_event is not MISSING:\n            payload['guild_scheduled_event_id'] = scheduled_event.id\n\n        payload['send_start_notification'] = send_start_notification\n\n        data = await self._state.http.create_stage_instance(**payload, reason=reason)\n        return StageInstance(guild=self.guild, state=self._state, data=data)\n\n    async def fetch_instance(self) -> StageInstance:\n        \"\"\"|coro|\n\n        Gets the running :class:`StageInstance`.\n\n        .. versionadded:: 2.0\n\n        Raises\n        -------\n        NotFound\n            The stage instance or channel could not be found.\n        HTTPException\n            Getting the stage instance failed.\n\n        Returns\n        --------\n        :class:`StageInstance`\n            The stage instance.\n        \"\"\"\n        data = await self._state.http.get_stage_instance(self.id)\n        return StageInstance(guild=self.guild, state=self._state, data=data)\n\n    @overload\n    async def edit(self) -> None:\n        ...\n\n    @overload\n    async def edit(self, *, position: int, reason: Optional[str] = ...) -> None:\n        ...\n\n    @overload\n    async def edit(\n        self,\n        *,\n        name: str = ...,\n        nsfw: bool = ...,\n        bitrate: int = ...,\n        user_limit: int = ...,\n        position: int = ...,\n        sync_permissions: int = ...,\n        category: Optional[CategoryChannel] = ...,\n        overwrites: Mapping[OverwriteKeyT, PermissionOverwrite] = ...,\n        rtc_region: Optional[str] = ...,\n        video_quality_mode: VideoQualityMode = ...,\n        slowmode_delay: int = ...,\n        reason: Optional[str] = ...,\n    ) -> StageChannel:\n        ...\n\n    async def edit(self, *, reason: Optional[str] = None, **options: Any) -> Optional[StageChannel]:\n        \"\"\"|coro|\n\n        Edits the channel.\n\n        You must have :attr:`~Permissions.manage_channels` to do this.\n\n        .. versionchanged:: 2.0\n            The ``topic`` parameter must now be set via :attr:`create_instance`.\n\n        .. versionchanged:: 2.0\n            Edits are no longer in-place, the newly edited channel is returned instead.\n\n        .. versionchanged:: 2.0\n            The ``region`` parameter now accepts :class:`str` instead of an enum.\n\n        .. versionchanged:: 2.0\n            This function will now raise :exc:`TypeError` instead of\n            ``InvalidArgument``.\n\n        Parameters\n        ----------\n        name: :class:`str`\n            The new channel's name.\n        bitrate: :class:`int`\n            The new channel's bitrate.\n        position: :class:`int`\n            The new channel's position.\n        nsfw: :class:`bool`\n            To mark the channel as NSFW or not.\n        user_limit: :class:`int`\n            The new channel's user limit.\n        sync_permissions: :class:`bool`\n            Whether to sync permissions with the channel's new or pre-existing\n            category. Defaults to ``False``.\n        category: Optional[:class:`CategoryChannel`]\n            The new category for this channel. Can be ``None`` to remove the\n            category.\n        slowmode_delay: :class:`int`\n            Specifies the slowmode rate limit for user in this channel, in seconds.\n            A value of ``0`` disables slowmode. The maximum value possible is ``21600``.\n        reason: Optional[:class:`str`]\n            The reason for editing this channel. Shows up on the audit log.\n        overwrites: :class:`Mapping`\n            A :class:`Mapping` of target (either a role or a member) to\n            :class:`PermissionOverwrite` to apply to the channel.\n        rtc_region: Optional[:class:`str`]\n            The new region for the stage channel's voice communication.\n            A value of ``None`` indicates automatic voice region detection.\n        video_quality_mode: :class:`VideoQualityMode`\n            The camera video quality for the stage channel's participants.\n\n            .. versionadded:: 2.0\n\n        Raises\n        ------\n        ValueError\n            If the permission overwrite information is not in proper form.\n        Forbidden\n            You do not have permissions to edit the channel.\n        HTTPException\n            Editing the channel failed.\n\n        Returns\n        --------\n        Optional[:class:`.StageChannel`]\n            The newly edited stage channel. If the edit was only positional\n            then ``None`` is returned instead.\n        \"\"\"\n\n        payload = await self._edit(options, reason=reason)\n        if payload is not None:\n            # the payload will always be the proper channel payload\n            return self.__class__(state=self._state, guild=self.guild, data=payload)  # type: ignore\n\n\nclass CategoryChannel(discord.abc.GuildChannel, Hashable):\n    \"\"\"Represents a Discord channel category.\n\n    These are useful to group channels to logical compartments.\n\n    .. container:: operations\n\n        .. describe:: x == y\n\n            Checks if two channels are equal.\n\n        .. describe:: x != y\n\n            Checks if two channels are not equal.\n\n        .. describe:: hash(x)\n\n            Returns the category's hash.\n\n        .. describe:: str(x)\n\n            Returns the category's name.\n\n    Attributes\n    -----------\n    name: :class:`str`\n        The category name.\n    guild: :class:`Guild`\n        The guild the category belongs to.\n    id: :class:`int`\n        The category channel ID.\n    position: :class:`int`\n        The position in the category list. This is a number that starts at 0. e.g. the\n        top category is position 0.\n    nsfw: :class:`bool`\n        If the channel is marked as \"not safe for work\".\n\n        .. note::\n\n            To check if the channel or the guild of that channel are marked as NSFW, consider :meth:`is_nsfw` instead.\n    \"\"\"\n\n    __slots__ = ('name', 'id', 'guild', 'nsfw', '_state', 'position', '_overwrites', 'category_id')\n\n    def __init__(self, *, state: ConnectionState, guild: Guild, data: CategoryChannelPayload):\n        self._state: ConnectionState = state\n        self.id: int = int(data['id'])\n        self._update(guild, data)\n\n    def __repr__(self) -> str:\n        return f'<CategoryChannel id={self.id} name={self.name!r} position={self.position} nsfw={self.nsfw}>'\n\n    def _update(self, guild: Guild, data: CategoryChannelPayload) -> None:\n        self.guild: Guild = guild\n        self.name: str = data['name']\n        self.category_id: Optional[int] = utils._get_as_snowflake(data, 'parent_id')\n        self.nsfw: bool = data.get('nsfw', False)\n        self.position: int = data['position']\n        self._fill_overwrites(data)\n\n    @property\n    def _sorting_bucket(self) -> int:\n        return ChannelType.category.value\n\n    @property\n    def _scheduled_event_entity_type(self) -> Optional[EntityType]:\n        return None\n\n    @property\n    def type(self) -> Literal[ChannelType.category]:\n        \"\"\":class:`ChannelType`: The channel's Discord type.\"\"\"\n        return ChannelType.category\n\n    def is_nsfw(self) -> bool:\n        \"\"\":class:`bool`: Checks if the category is NSFW.\"\"\"\n        return self.nsfw\n\n    @utils.copy_doc(discord.abc.GuildChannel.clone)\n    async def clone(self, *, name: Optional[str] = None, reason: Optional[str] = None) -> CategoryChannel:\n        return await self._clone_impl({'nsfw': self.nsfw}, name=name, reason=reason)\n\n    @overload\n    async def edit(self) -> None:\n        ...\n\n    @overload\n    async def edit(self, *, position: int, reason: Optional[str] = ...) -> None:\n        ...\n\n    @overload\n    async def edit(\n        self,\n        *,\n        name: str = ...,\n        position: int = ...,\n        nsfw: bool = ...,\n        overwrites: Mapping[OverwriteKeyT, PermissionOverwrite] = ...,\n        reason: Optional[str] = ...,\n    ) -> CategoryChannel:\n        ...\n\n    async def edit(self, *, reason: Optional[str] = None, **options: Any) -> Optional[CategoryChannel]:\n        \"\"\"|coro|\n\n        Edits the channel.\n\n        You must have :attr:`~Permissions.manage_channels` to do this.\n\n        .. versionchanged:: 1.3\n            The ``overwrites`` keyword-only parameter was added.\n\n        .. versionchanged:: 2.0\n            Edits are no longer in-place, the newly edited channel is returned instead.\n\n        .. versionchanged:: 2.0\n            This function will now raise :exc:`TypeError` or\n            :exc:`ValueError` instead of ``InvalidArgument``.\n\n        Parameters\n        ----------\n        name: :class:`str`\n            The new category's name.\n        position: :class:`int`\n            The new category's position.\n        nsfw: :class:`bool`\n            To mark the category as NSFW or not.\n        reason: Optional[:class:`str`]\n            The reason for editing this category. Shows up on the audit log.\n        overwrites: :class:`Mapping`\n            A :class:`Mapping` of target (either a role or a member) to\n            :class:`PermissionOverwrite` to apply to the channel.\n\n        Raises\n        ------\n        ValueError\n            If position is less than 0 or greater than the number of categories.\n        TypeError\n            The overwrite information is not in proper form.\n        Forbidden\n            You do not have permissions to edit the category.\n        HTTPException\n            Editing the category failed.\n\n        Returns\n        --------\n        Optional[:class:`.CategoryChannel`]\n            The newly edited category channel. If the edit was only positional\n            then ``None`` is returned instead.\n        \"\"\"\n\n        payload = await self._edit(options, reason=reason)\n        if payload is not None:\n            # the payload will always be the proper channel payload\n            return self.__class__(state=self._state, guild=self.guild, data=payload)  # type: ignore\n\n    @utils.copy_doc(discord.abc.GuildChannel.move)\n    async def move(self, **kwargs: Any) -> None:\n        kwargs.pop('category', None)\n        await super().move(**kwargs)\n\n    @property\n    def channels(self) -> List[GuildChannelType]:\n        \"\"\"List[:class:`abc.GuildChannel`]: Returns the channels that are under this category.\n\n        These are sorted by the official Discord UI, which places voice channels below the text channels.\n        \"\"\"\n\n        def comparator(channel):\n            return (not isinstance(channel, TextChannel), channel.position)\n\n        ret = [c for c in self.guild.channels if c.category_id == self.id]\n        ret.sort(key=comparator)\n        return ret\n\n    @property\n    def text_channels(self) -> List[TextChannel]:\n        \"\"\"List[:class:`TextChannel`]: Returns the text channels that are under this category.\"\"\"\n        ret = [c for c in self.guild.channels if c.category_id == self.id and isinstance(c, TextChannel)]\n        ret.sort(key=lambda c: (c.position, c.id))\n        return ret\n\n    @property\n    def voice_channels(self) -> List[VoiceChannel]:\n        \"\"\"List[:class:`VoiceChannel`]: Returns the voice channels that are under this category.\"\"\"\n        ret = [c for c in self.guild.channels if c.category_id == self.id and isinstance(c, VoiceChannel)]\n        ret.sort(key=lambda c: (c.position, c.id))\n        return ret\n\n    @property\n    def stage_channels(self) -> List[StageChannel]:\n        \"\"\"List[:class:`StageChannel`]: Returns the stage channels that are under this category.\n\n        .. versionadded:: 1.7\n        \"\"\"\n        ret = [c for c in self.guild.channels if c.category_id == self.id and isinstance(c, StageChannel)]\n        ret.sort(key=lambda c: (c.position, c.id))\n        return ret\n\n    @property\n    def forums(self) -> List[ForumChannel]:\n        \"\"\"List[:class:`ForumChannel`]: Returns the forum channels that are under this category.\n\n        .. versionadded:: 2.4\n        \"\"\"\n        r = [c for c in self.guild.channels if c.category_id == self.id and isinstance(c, ForumChannel)]\n        r.sort(key=lambda c: (c.position, c.id))\n        return r\n\n    async def create_text_channel(self, name: str, **options: Any) -> TextChannel:\n        \"\"\"|coro|\n\n        A shortcut method to :meth:`Guild.create_text_channel` to create a :class:`TextChannel` in the category.\n\n        Returns\n        -------\n        :class:`TextChannel`\n            The channel that was just created.\n        \"\"\"\n        return await self.guild.create_text_channel(name, category=self, **options)\n\n    async def create_voice_channel(self, name: str, **options: Any) -> VoiceChannel:\n        \"\"\"|coro|\n\n        A shortcut method to :meth:`Guild.create_voice_channel` to create a :class:`VoiceChannel` in the category.\n\n        Returns\n        -------\n        :class:`VoiceChannel`\n            The channel that was just created.\n        \"\"\"\n        return await self.guild.create_voice_channel(name, category=self, **options)\n\n    async def create_stage_channel(self, name: str, **options: Any) -> StageChannel:\n        \"\"\"|coro|\n\n        A shortcut method to :meth:`Guild.create_stage_channel` to create a :class:`StageChannel` in the category.\n\n        .. versionadded:: 1.7\n\n        Returns\n        -------\n        :class:`StageChannel`\n            The channel that was just created.\n        \"\"\"\n        return await self.guild.create_stage_channel(name, category=self, **options)\n\n    async def create_forum(self, name: str, **options: Any) -> ForumChannel:\n        \"\"\"|coro|\n\n        A shortcut method to :meth:`Guild.create_forum` to create a :class:`ForumChannel` in the category.\n\n        .. versionadded:: 2.0\n\n        Returns\n        --------\n        :class:`ForumChannel`\n            The channel that was just created.\n        \"\"\"\n        return await self.guild.create_forum(name, category=self, **options)\n\n\nclass ForumTag(Hashable):\n    \"\"\"Represents a forum tag that can be applied to a thread within a :class:`ForumChannel`.\n\n    .. versionadded:: 2.1\n\n    .. container:: operations\n\n        .. describe:: x == y\n\n            Checks if two forum tags are equal.\n\n        .. describe:: x != y\n\n            Checks if two forum tags are not equal.\n\n        .. describe:: hash(x)\n\n            Returns the forum tag's hash.\n\n        .. describe:: str(x)\n\n            Returns the forum tag's name.\n\n\n    Attributes\n    -----------\n    id: :class:`int`\n        The ID of the tag. If this was manually created then the ID will be ``0``.\n    name: :class:`str`\n        The name of the tag. Can only be up to 20 characters.\n    moderated: :class:`bool`\n        Whether this tag can only be added or removed by a moderator with\n        the :attr:`~Permissions.manage_threads` permission.\n    emoji: Optional[:class:`PartialEmoji`]\n        The emoji that is used to represent this tag.\n        Note that if the emoji is a custom emoji, it will *not* have name information.\n    \"\"\"\n\n    __slots__ = ('name', 'id', 'moderated', 'emoji')\n\n    def __init__(self, *, name: str, emoji: Optional[EmojiInputType] = None, moderated: bool = False) -> None:\n        self.name: str = name\n        self.id: int = 0\n        self.moderated: bool = moderated\n        self.emoji: Optional[PartialEmoji] = None\n        if isinstance(emoji, _EmojiTag):\n            self.emoji = emoji._to_partial()\n        elif isinstance(emoji, str):\n            self.emoji = PartialEmoji.from_str(emoji)\n        elif emoji is not None:\n            raise TypeError(f'emoji must be a Emoji, PartialEmoji, str or None not {emoji.__class__.__name__}')\n\n    @classmethod\n    def from_data(cls, *, state: ConnectionState, data: ForumTagPayload) -> Self:\n        self = cls.__new__(cls)\n        self.name = data['name']\n        self.id = int(data['id'])\n        self.moderated = data.get('moderated', False)\n\n        emoji_name = data['emoji_name'] or ''\n        emoji_id = utils._get_as_snowflake(data, 'emoji_id') or None  # Coerce 0 -> None\n        if not emoji_name and not emoji_id:\n            self.emoji = None\n        else:\n            self.emoji = PartialEmoji.with_state(state=state, name=emoji_name, id=emoji_id)\n        return self\n\n    def to_dict(self) -> Dict[str, Any]:\n        payload: Dict[str, Any] = {\n            'name': self.name,\n            'moderated': self.moderated,\n        }\n        if self.emoji is not None:\n            payload.update(self.emoji._to_forum_tag_payload())\n        else:\n            payload.update(emoji_id=None, emoji_name=None)\n\n        if self.id:\n            payload['id'] = self.id\n\n        return payload\n\n    def __repr__(self) -> str:\n        return f'<ForumTag id={self.id} name={self.name!r} emoji={self.emoji!r} moderated={self.moderated}>'\n\n    def __str__(self) -> str:\n        return self.name\n\n\nclass ForumChannel(discord.abc.GuildChannel, Hashable):\n    \"\"\"Represents a Discord guild forum channel.\n\n    .. versionadded:: 2.0\n\n    .. container:: operations\n\n        .. describe:: x == y\n\n            Checks if two forums are equal.\n\n        .. describe:: x != y\n\n            Checks if two forums are not equal.\n\n        .. describe:: hash(x)\n\n            Returns the forum's hash.\n\n        .. describe:: str(x)\n\n            Returns the forum's name.\n\n    Attributes\n    -----------\n    name: :class:`str`\n        The forum name.\n    guild: :class:`Guild`\n        The guild the forum belongs to.\n    id: :class:`int`\n        The forum ID.\n    category_id: Optional[:class:`int`]\n        The category channel ID this forum belongs to, if applicable.\n    topic: Optional[:class:`str`]\n        The forum's topic. ``None`` if it doesn't exist. Called \"Guidelines\" in the UI.\n        Can be up to 4096 characters long.\n    position: :class:`int`\n        The position in the channel list. This is a number that starts at 0. e.g. the\n        top channel is position 0.\n    last_message_id: Optional[:class:`int`]\n        The last thread ID that was created on this forum. This technically also\n        coincides with the message ID that started the thread that was created.\n        It may *not* point to an existing or valid thread or message.\n    slowmode_delay: :class:`int`\n        The number of seconds a member must wait between creating threads\n        in this forum. A value of ``0`` denotes that it is disabled.\n        Bots and users with :attr:`~Permissions.manage_channels` or\n        :attr:`~Permissions.manage_messages` bypass slowmode.\n    nsfw: :class:`bool`\n        If the forum is marked as \"not safe for work\" or \"age restricted\".\n    default_auto_archive_duration: :class:`int`\n        The default auto archive duration in minutes for threads created in this forum.\n    default_thread_slowmode_delay: :class:`int`\n        The default slowmode delay in seconds for threads created in this forum.\n\n        .. versionadded:: 2.1\n    default_reaction_emoji: Optional[:class:`PartialEmoji`]\n        The default reaction emoji for threads created in this forum to show in the\n        add reaction button.\n\n        .. versionadded:: 2.1\n    default_layout: :class:`ForumLayoutType`\n        The default layout for posts in this forum channel.\n        Defaults to :attr:`ForumLayoutType.not_set`.\n\n        .. versionadded:: 2.2\n    default_sort_order: Optional[:class:`ForumOrderType`]\n        The default sort order for posts in this forum channel.\n\n        .. versionadded:: 2.3\n    \"\"\"\n\n    __slots__ = (\n        'name',\n        'id',\n        'guild',\n        'topic',\n        '_state',\n        '_flags',\n        '_type',\n        'nsfw',\n        'category_id',\n        'position',\n        'slowmode_delay',\n        '_overwrites',\n        'last_message_id',\n        'default_auto_archive_duration',\n        'default_thread_slowmode_delay',\n        'default_reaction_emoji',\n        'default_layout',\n        'default_sort_order',\n        '_available_tags',\n        '_flags',\n    )\n\n    def __init__(self, *, state: ConnectionState, guild: Guild, data: Union[ForumChannelPayload, MediaChannelPayload]):\n        self._state: ConnectionState = state\n        self.id: int = int(data['id'])\n        self._type: Literal[15, 16] = data['type']\n        self._update(guild, data)\n\n    def __repr__(self) -> str:\n        attrs = [\n            ('id', self.id),\n            ('name', self.name),\n            ('position', self.position),\n            ('nsfw', self.nsfw),\n            ('category_id', self.category_id),\n        ]\n        joined = ' '.join('%s=%r' % t for t in attrs)\n        return f'<{self.__class__.__name__} {joined}>'\n\n    def _update(self, guild: Guild, data: Union[ForumChannelPayload, MediaChannelPayload]) -> None:\n        self.guild: Guild = guild\n        self.name: str = data['name']\n        self.category_id: Optional[int] = utils._get_as_snowflake(data, 'parent_id')\n        self.topic: Optional[str] = data.get('topic')\n        self.position: int = data['position']\n        self.nsfw: bool = data.get('nsfw', False)\n        self.slowmode_delay: int = data.get('rate_limit_per_user', 0)\n        self.default_auto_archive_duration: ThreadArchiveDuration = data.get('default_auto_archive_duration', 1440)\n        self.last_message_id: Optional[int] = utils._get_as_snowflake(data, 'last_message_id')\n        # This takes advantage of the fact that dicts are ordered since Python 3.7\n        tags = [ForumTag.from_data(state=self._state, data=tag) for tag in data.get('available_tags', [])]\n        self.default_thread_slowmode_delay: int = data.get('default_thread_rate_limit_per_user', 0)\n        self.default_layout: ForumLayoutType = try_enum(ForumLayoutType, data.get('default_forum_layout', 0))\n        self._available_tags: Dict[int, ForumTag] = {tag.id: tag for tag in tags}\n\n        self.default_reaction_emoji: Optional[PartialEmoji] = None\n        default_reaction_emoji = data.get('default_reaction_emoji')\n        if default_reaction_emoji:\n            self.default_reaction_emoji = PartialEmoji.with_state(\n                state=self._state,\n                id=utils._get_as_snowflake(default_reaction_emoji, 'emoji_id') or None,  # Coerce 0 -> None\n                name=default_reaction_emoji.get('emoji_name') or '',\n            )\n\n        self.default_sort_order: Optional[ForumOrderType] = None\n        default_sort_order = data.get('default_sort_order')\n        if default_sort_order is not None:\n            self.default_sort_order = try_enum(ForumOrderType, default_sort_order)\n\n        self._flags: int = data.get('flags', 0)\n        self._fill_overwrites(data)\n\n    @property\n    def type(self) -> Literal[ChannelType.forum, ChannelType.media]:\n        \"\"\":class:`ChannelType`: The channel's Discord type.\"\"\"\n        if self._type == 16:\n            return ChannelType.media\n        return ChannelType.forum\n\n    @property\n    def _sorting_bucket(self) -> int:\n        return ChannelType.text.value\n\n    @property\n    def _scheduled_event_entity_type(self) -> Optional[EntityType]:\n        return None\n\n    @utils.copy_doc(discord.abc.GuildChannel.permissions_for)\n    def permissions_for(self, obj: Union[Member, Role], /) -> Permissions:\n        base = super().permissions_for(obj)\n        self._apply_implicit_permissions(base)\n\n        # text channels do not have voice related permissions\n        denied = Permissions.voice()\n        base.value &= ~denied.value\n        return base\n\n    def get_thread(self, thread_id: int, /) -> Optional[Thread]:\n        \"\"\"Returns a thread with the given ID.\n\n        .. note::\n\n            This does not always retrieve archived threads, as they are not retained in the internal\n            cache. Use :func:`Guild.fetch_channel` instead.\n\n        .. versionadded:: 2.2\n\n        Parameters\n        -----------\n        thread_id: :class:`int`\n            The ID to search for.\n\n        Returns\n        --------\n        Optional[:class:`Thread`]\n            The returned thread or ``None`` if not found.\n        \"\"\"\n        thread = self.guild.get_thread(thread_id)\n        if thread is not None and thread.parent_id == self.id:\n            return thread\n        return None\n\n    @property\n    def threads(self) -> List[Thread]:\n        \"\"\"List[:class:`Thread`]: Returns all the threads that you can see.\"\"\"\n        return [thread for thread in self.guild._threads.values() if thread.parent_id == self.id]\n\n    @property\n    def flags(self) -> ChannelFlags:\n        \"\"\":class:`ChannelFlags`: The flags associated with this thread.\n\n        .. versionadded:: 2.1\n        \"\"\"\n        return ChannelFlags._from_value(self._flags)\n\n    @property\n    def available_tags(self) -> Sequence[ForumTag]:\n        \"\"\"Sequence[:class:`ForumTag`]: Returns all the available tags for this forum.\n\n        .. versionadded:: 2.1\n        \"\"\"\n        return utils.SequenceProxy(self._available_tags.values())\n\n    def get_tag(self, tag_id: int, /) -> Optional[ForumTag]:\n        \"\"\"Returns the tag with the given ID.\n\n        .. versionadded:: 2.1\n\n        Parameters\n        ----------\n        tag_id: :class:`int`\n            The ID to search for.\n\n        Returns\n        -------\n        Optional[:class:`ForumTag`]\n            The tag with the given ID, or ``None`` if not found.\n        \"\"\"\n        return self._available_tags.get(tag_id)\n\n    def is_nsfw(self) -> bool:\n        \"\"\":class:`bool`: Checks if the forum is NSFW.\"\"\"\n        return self.nsfw\n\n    def is_media(self) -> bool:\n        \"\"\":class:`bool`: Checks if the channel is a media channel.\n\n        .. versionadded:: 2.4\n        \"\"\"\n        return self._type == ChannelType.media.value\n\n    @utils.copy_doc(discord.abc.GuildChannel.clone)\n    async def clone(self, *, name: Optional[str] = None, reason: Optional[str] = None) -> ForumChannel:\n        return await self._clone_impl(\n            {'topic': self.topic, 'nsfw': self.nsfw, 'rate_limit_per_user': self.slowmode_delay}, name=name, reason=reason\n        )\n\n    @overload\n    async def edit(self) -> None:\n        ...\n\n    @overload\n    async def edit(self, *, position: int, reason: Optional[str] = ...) -> None:\n        ...\n\n    @overload\n    async def edit(\n        self,\n        *,\n        reason: Optional[str] = ...,\n        name: str = ...,\n        topic: str = ...,\n        position: int = ...,\n        nsfw: bool = ...,\n        sync_permissions: bool = ...,\n        category: Optional[CategoryChannel] = ...,\n        slowmode_delay: int = ...,\n        default_auto_archive_duration: ThreadArchiveDuration = ...,\n        type: ChannelType = ...,\n        overwrites: Mapping[OverwriteKeyT, PermissionOverwrite] = ...,\n        available_tags: Sequence[ForumTag] = ...,\n        default_thread_slowmode_delay: int = ...,\n        default_reaction_emoji: Optional[EmojiInputType] = ...,\n        default_layout: ForumLayoutType = ...,\n        default_sort_order: ForumOrderType = ...,\n        require_tag: bool = ...,\n    ) -> ForumChannel:\n        ...\n\n    async def edit(self, *, reason: Optional[str] = None, **options: Any) -> Optional[ForumChannel]:\n        \"\"\"|coro|\n\n        Edits the forum.\n\n        You must have :attr:`~Permissions.manage_channels` to do this.\n\n        Parameters\n        ----------\n        name: :class:`str`\n            The new forum name.\n        topic: :class:`str`\n            The new forum's topic.\n        position: :class:`int`\n            The new forum's position.\n        nsfw: :class:`bool`\n            To mark the forum as NSFW or not.\n        sync_permissions: :class:`bool`\n            Whether to sync permissions with the forum's new or pre-existing\n            category. Defaults to ``False``.\n        category: Optional[:class:`CategoryChannel`]\n            The new category for this forum. Can be ``None`` to remove the\n            category.\n        slowmode_delay: :class:`int`\n            Specifies the slowmode rate limit for user in this forum, in seconds.\n            A value of ``0`` disables slowmode. The maximum value possible is ``21600``.\n        type: :class:`ChannelType`\n            Change the type of this text forum. Currently, only conversion between\n            :attr:`ChannelType.text` and :attr:`ChannelType.news` is supported. This\n            is only available to guilds that contain ``NEWS`` in :attr:`Guild.features`.\n        reason: Optional[:class:`str`]\n            The reason for editing this forum. Shows up on the audit log.\n        overwrites: :class:`Mapping`\n            A :class:`Mapping` of target (either a role or a member) to\n            :class:`PermissionOverwrite` to apply to the forum.\n        default_auto_archive_duration: :class:`int`\n            The new default auto archive duration in minutes for threads created in this channel.\n            Must be one of ``60``, ``1440``, ``4320``, or ``10080``.\n        available_tags: Sequence[:class:`ForumTag`]\n            The new available tags for this forum.\n\n            .. versionadded:: 2.1\n        default_thread_slowmode_delay: :class:`int`\n            The new default slowmode delay for threads in this channel.\n\n            .. versionadded:: 2.1\n        default_reaction_emoji: Optional[Union[:class:`Emoji`, :class:`PartialEmoji`, :class:`str`]]\n            The new default reaction emoji for threads in this channel.\n\n            .. versionadded:: 2.1\n        default_layout: :class:`ForumLayoutType`\n            The new default layout for posts in this forum.\n\n            .. versionadded:: 2.2\n        default_sort_order: Optional[:class:`ForumOrderType`]\n            The new default sort order for posts in this forum.\n\n            .. versionadded:: 2.3\n        require_tag: :class:`bool`\n            Whether to require a tag for threads in this channel or not.\n\n            .. versionadded:: 2.1\n\n        Raises\n        ------\n        ValueError\n            The new ``position`` is less than 0 or greater than the number of channels.\n        TypeError\n            The permission overwrite information is not in proper form or a type\n            is not the expected type.\n        Forbidden\n            You do not have permissions to edit the forum.\n        HTTPException\n            Editing the forum failed.\n\n        Returns\n        --------\n        Optional[:class:`.ForumChannel`]\n            The newly edited forum channel. If the edit was only positional\n            then ``None`` is returned instead.\n        \"\"\"\n\n        try:\n            tags: Sequence[ForumTag] = options.pop('available_tags')\n        except KeyError:\n            pass\n        else:\n            options['available_tags'] = [tag.to_dict() for tag in tags]\n\n        try:\n            default_reaction_emoji: Optional[EmojiInputType] = options.pop('default_reaction_emoji')\n        except KeyError:\n            pass\n        else:\n            if default_reaction_emoji is None:\n                options['default_reaction_emoji'] = None\n            elif isinstance(default_reaction_emoji, _EmojiTag):\n                options['default_reaction_emoji'] = default_reaction_emoji._to_partial()._to_forum_tag_payload()\n            elif isinstance(default_reaction_emoji, str):\n                options['default_reaction_emoji'] = PartialEmoji.from_str(default_reaction_emoji)._to_forum_tag_payload()\n\n        try:\n            require_tag = options.pop('require_tag')\n        except KeyError:\n            pass\n        else:\n            flags = self.flags\n            flags.require_tag = require_tag\n            options['flags'] = flags.value\n\n        try:\n            layout = options.pop('default_layout')\n        except KeyError:\n            pass\n        else:\n            if not isinstance(layout, ForumLayoutType):\n                raise TypeError(f'default_layout parameter must be a ForumLayoutType not {layout.__class__.__name__}')\n\n            options['default_forum_layout'] = layout.value\n\n        try:\n            sort_order = options.pop('default_sort_order')\n        except KeyError:\n            pass\n        else:\n            if sort_order is None:\n                options['default_sort_order'] = None\n            else:\n                if not isinstance(sort_order, ForumOrderType):\n                    raise TypeError(\n                        f'default_sort_order parameter must be a ForumOrderType not {sort_order.__class__.__name__}'\n                    )\n\n                options['default_sort_order'] = sort_order.value\n\n        payload = await self._edit(options, reason=reason)\n        if payload is not None:\n            # the payload will always be the proper channel payload\n            return self.__class__(state=self._state, guild=self.guild, data=payload)  # type: ignore\n\n    async def create_tag(\n        self,\n        *,\n        name: str,\n        emoji: Optional[PartialEmoji] = None,\n        moderated: bool = False,\n        reason: Optional[str] = None,\n    ) -> ForumTag:\n        \"\"\"|coro|\n\n        Creates a new tag in this forum.\n\n        You must have :attr:`~Permissions.manage_channels` to do this.\n\n        Parameters\n        ----------\n        name: :class:`str`\n            The name of the tag. Can only be up to 20 characters.\n        emoji: Optional[Union[:class:`str`, :class:`PartialEmoji`]]\n            The emoji to use for the tag.\n        moderated: :class:`bool`\n            Whether the tag can only be applied by moderators.\n        reason: Optional[:class:`str`]\n            The reason for creating this tag. Shows up on the audit log.\n\n        Raises\n        ------\n        Forbidden\n            You do not have permissions to create a tag in this forum.\n        HTTPException\n            Creating the tag failed.\n\n        Returns\n        -------\n        :class:`ForumTag`\n            The newly created tag.\n        \"\"\"\n\n        prior = list(self._available_tags.values())\n        result = ForumTag(name=name, emoji=emoji, moderated=moderated)\n        prior.append(result)\n        payload = await self._state.http.edit_channel(\n            self.id, reason=reason, available_tags=[tag.to_dict() for tag in prior]\n        )\n        try:\n            result.id = int(payload['available_tags'][-1]['id'])  # type: ignore\n        except (KeyError, IndexError, ValueError):\n            pass\n\n        return result\n\n    async def create_thread(\n        self,\n        *,\n        name: str,\n        auto_archive_duration: ThreadArchiveDuration = MISSING,\n        slowmode_delay: Optional[int] = None,\n        content: Optional[str] = None,\n        tts: bool = False,\n        embed: Embed = MISSING,\n        embeds: Sequence[Embed] = MISSING,\n        file: File = MISSING,\n        files: Sequence[File] = MISSING,\n        stickers: Sequence[Union[GuildSticker, StickerItem]] = MISSING,\n        allowed_mentions: AllowedMentions = MISSING,\n        mention_author: bool = MISSING,\n        applied_tags: Sequence[ForumTag] = MISSING,\n        view: View = MISSING,\n        suppress_embeds: bool = False,\n        reason: Optional[str] = None,\n    ) -> ThreadWithMessage:\n        \"\"\"|coro|\n\n        Creates a thread in this forum.\n\n        This thread is a public thread with the initial message given. Currently in order\n        to start a thread in this forum, the user needs :attr:`~discord.Permissions.send_messages`.\n\n        You must send at least one of ``content``, ``embed``, ``embeds``, ``file``, ``files``,\n        or ``view`` to create a thread in a forum, since forum channels must have a starter message.\n\n        Parameters\n        -----------\n        name: :class:`str`\n            The name of the thread.\n        auto_archive_duration: :class:`int`\n            The duration in minutes before a thread is automatically hidden from the channel list.\n            If not provided, the channel's default auto archive duration is used.\n\n            Must be one of ``60``, ``1440``, ``4320``, or ``10080``, if provided.\n        slowmode_delay: Optional[:class:`int`]\n            Specifies the slowmode rate limit for user in this channel, in seconds.\n            The maximum value possible is ``21600``. By default no slowmode rate limit\n            if this is ``None``.\n        content: Optional[:class:`str`]\n            The content of the message to send with the thread.\n        tts: :class:`bool`\n            Indicates if the message should be sent using text-to-speech.\n        embed: :class:`~discord.Embed`\n            The rich embed for the content.\n        embeds: List[:class:`~discord.Embed`]\n            A list of embeds to upload. Must be a maximum of 10.\n        file: :class:`~discord.File`\n            The file to upload.\n        files: List[:class:`~discord.File`]\n            A list of files to upload. Must be a maximum of 10.\n        allowed_mentions: :class:`~discord.AllowedMentions`\n            Controls the mentions being processed in this message. If this is\n            passed, then the object is merged with :attr:`~discord.Client.allowed_mentions`.\n            The merging behaviour only overrides attributes that have been explicitly passed\n            to the object, otherwise it uses the attributes set in :attr:`~discord.Client.allowed_mentions`.\n            If no object is passed at all then the defaults given by :attr:`~discord.Client.allowed_mentions`\n            are used instead.\n        mention_author: :class:`bool`\n            If set, overrides the :attr:`~discord.AllowedMentions.replied_user` attribute of ``allowed_mentions``.\n        applied_tags: List[:class:`discord.ForumTag`]\n            A list of tags to apply to the thread.\n        view: :class:`discord.ui.View`\n            A Discord UI View to add to the message.\n        stickers: Sequence[Union[:class:`~discord.GuildSticker`, :class:`~discord.StickerItem`]]\n            A list of stickers to upload. Must be a maximum of 3.\n        suppress_embeds: :class:`bool`\n            Whether to suppress embeds for the message. This sends the message without any embeds if set to ``True``.\n        reason: :class:`str`\n            The reason for creating a new thread. Shows up on the audit log.\n\n        Raises\n        -------\n        Forbidden\n            You do not have permissions to create a thread.\n        HTTPException\n            Starting the thread failed.\n        ValueError\n            The ``files`` or ``embeds`` list is not of the appropriate size.\n        TypeError\n            You specified both ``file`` and ``files``,\n            or you specified both ``embed`` and ``embeds``.\n\n        Returns\n        --------\n        Tuple[:class:`Thread`, :class:`Message`]\n            The created thread with the created message.\n            This is also accessible as a namedtuple with ``thread`` and ``message`` fields.\n        \"\"\"\n\n        state = self._state\n        previous_allowed_mention = state.allowed_mentions\n        if stickers is MISSING:\n            sticker_ids = MISSING\n        else:\n            sticker_ids: SnowflakeList = [s.id for s in stickers]\n\n        if view and not hasattr(view, '__discord_ui_view__'):\n            raise TypeError(f'view parameter must be View not {view.__class__.__name__}')\n\n        if suppress_embeds:\n            from .message import MessageFlags  # circular import\n\n            flags = MessageFlags._from_value(4)\n        else:\n            flags = MISSING\n\n        content = str(content) if content else MISSING\n\n        channel_payload = {\n            'name': name,\n            'auto_archive_duration': auto_archive_duration or self.default_auto_archive_duration,\n            'rate_limit_per_user': slowmode_delay,\n            'type': 11,  # Private threads don't seem to be allowed\n        }\n\n        if applied_tags is not MISSING:\n            channel_payload['applied_tags'] = [str(tag.id) for tag in applied_tags]\n\n        with handle_message_parameters(\n            content=content,\n            tts=tts,\n            file=file,\n            files=files,\n            embed=embed,\n            embeds=embeds,\n            allowed_mentions=allowed_mentions,\n            previous_allowed_mentions=previous_allowed_mention,\n            mention_author=None if mention_author is MISSING else mention_author,\n            stickers=sticker_ids,\n            view=view,\n            flags=flags,\n            channel_payload=channel_payload,\n        ) as params:\n            # Circular import\n            from .message import Message\n\n            data = await state.http.start_thread_in_forum(self.id, params=params, reason=reason)\n            thread = Thread(guild=self.guild, state=self._state, data=data)\n            message = Message(state=self._state, channel=thread, data=data['message'])\n            if view and not view.is_finished():\n                self._state.store_view(view, message.id)\n\n            return ThreadWithMessage(thread=thread, message=message)\n\n    async def webhooks(self) -> List[Webhook]:\n        \"\"\"|coro|\n\n        Gets the list of webhooks from this channel.\n\n        You must have :attr:`~.Permissions.manage_webhooks` to do this.\n\n        Raises\n        -------\n        Forbidden\n            You don't have permissions to get the webhooks.\n\n        Returns\n        --------\n        List[:class:`Webhook`]\n            The webhooks for this channel.\n        \"\"\"\n\n        from .webhook import Webhook\n\n        data = await self._state.http.channel_webhooks(self.id)\n        return [Webhook.from_state(d, state=self._state) for d in data]\n\n    async def create_webhook(self, *, name: str, avatar: Optional[bytes] = None, reason: Optional[str] = None) -> Webhook:\n        \"\"\"|coro|\n\n        Creates a webhook for this channel.\n\n        You must have :attr:`~.Permissions.manage_webhooks` to do this.\n\n        Parameters\n        -------------\n        name: :class:`str`\n            The webhook's name.\n        avatar: Optional[:class:`bytes`]\n            A :term:`py:bytes-like object` representing the webhook's default avatar.\n            This operates similarly to :meth:`~ClientUser.edit`.\n        reason: Optional[:class:`str`]\n            The reason for creating this webhook. Shows up in the audit logs.\n\n        Raises\n        -------\n        HTTPException\n            Creating the webhook failed.\n        Forbidden\n            You do not have permissions to create a webhook.\n\n        Returns\n        --------\n        :class:`Webhook`\n            The created webhook.\n        \"\"\"\n\n        from .webhook import Webhook\n\n        if avatar is not None:\n            avatar = utils._bytes_to_base64_data(avatar)  # type: ignore # Silence reassignment error\n\n        data = await self._state.http.create_webhook(self.id, name=str(name), avatar=avatar, reason=reason)\n        return Webhook.from_state(data, state=self._state)\n\n    async def archived_threads(\n        self,\n        *,\n        limit: Optional[int] = 100,\n        before: Optional[Union[Snowflake, datetime.datetime]] = None,\n    ) -> AsyncIterator[Thread]:\n        \"\"\"Returns an :term:`asynchronous iterator` that iterates over all archived threads in this forum\n        in order of decreasing :attr:`Thread.archive_timestamp`.\n\n        You must have :attr:`~Permissions.read_message_history` to do this.\n\n        .. versionadded:: 2.0\n\n        Parameters\n        -----------\n        limit: Optional[:class:`bool`]\n            The number of threads to retrieve.\n            If ``None``, retrieves every archived thread in the channel. Note, however,\n            that this would make it a slow operation.\n        before: Optional[Union[:class:`abc.Snowflake`, :class:`datetime.datetime`]]\n            Retrieve archived channels before the given date or ID.\n\n        Raises\n        ------\n        Forbidden\n            You do not have permissions to get archived threads.\n        HTTPException\n            The request to get the archived threads failed.\n\n        Yields\n        -------\n        :class:`Thread`\n            The archived threads.\n        \"\"\"\n        before_timestamp = None\n\n        if isinstance(before, datetime.datetime):\n            before_timestamp = before.isoformat()\n        elif before is not None:\n            before_timestamp = utils.snowflake_time(before.id).isoformat()\n\n        update_before = lambda data: data['thread_metadata']['archive_timestamp']\n\n        while True:\n            retrieve = 100\n            if limit is not None:\n                if limit <= 0:\n                    return\n                retrieve = max(2, min(retrieve, limit))\n\n            data = await self.guild._state.http.get_public_archived_threads(self.id, before=before_timestamp, limit=retrieve)\n\n            threads = data.get('threads', [])\n            for raw_thread in threads:\n                yield Thread(guild=self.guild, state=self.guild._state, data=raw_thread)\n                # Currently the API doesn't let you request less than 2 threads.\n                # Bail out early if we had to retrieve more than what the limit was.\n                if limit is not None:\n                    limit -= 1\n                    if limit <= 0:\n                        return\n\n            if not data.get('has_more', False):\n                return\n\n            before_timestamp = update_before(threads[-1])\n\n\nclass DMChannel(discord.abc.Messageable, discord.abc.PrivateChannel, Hashable):\n    \"\"\"Represents a Discord direct message channel.\n\n    .. container:: operations\n\n        .. describe:: x == y\n\n            Checks if two channels are equal.\n\n        .. describe:: x != y\n\n            Checks if two channels are not equal.\n\n        .. describe:: hash(x)\n\n            Returns the channel's hash.\n\n        .. describe:: str(x)\n\n            Returns a string representation of the channel\n\n    Attributes\n    ----------\n    recipient: Optional[:class:`User`]\n        The user you are participating with in the direct message channel.\n        If this channel is received through the gateway, the recipient information\n        may not be always available.\n    recipients: List[:class:`User`]\n        The users you are participating with in the DM channel.\n\n        .. versionadded:: 2.4\n    me: :class:`ClientUser`\n        The user presenting yourself.\n    id: :class:`int`\n        The direct message channel ID.\n    \"\"\"\n\n    __slots__ = ('id', 'recipients', 'me', '_state')\n\n    def __init__(self, *, me: ClientUser, state: ConnectionState, data: DMChannelPayload):\n        self._state: ConnectionState = state\n        self.recipients: List[User] = [state.store_user(u) for u in data.get('recipients', [])]\n        self.me: ClientUser = me\n        self.id: int = int(data['id'])\n\n    async def _get_channel(self) -> Self:\n        return self\n\n    def __str__(self) -> str:\n        if self.recipient:\n            return f'Direct Message with {self.recipient}'\n        return 'Direct Message with Unknown User'\n\n    def __repr__(self) -> str:\n        return f'<DMChannel id={self.id} recipient={self.recipient!r}>'\n\n    @classmethod\n    def _from_message(cls, state: ConnectionState, channel_id: int) -> Self:\n        self = cls.__new__(cls)\n        self._state = state\n        self.id = channel_id\n        self.recipients = []\n        # state.user won't be None here\n        self.me = state.user  # type: ignore\n        return self\n\n    @property\n    def recipient(self) -> Optional[User]:\n        if self.recipients:\n            return self.recipients[0]\n        return None\n\n    @property\n    def type(self) -> Literal[ChannelType.private]:\n        \"\"\":class:`ChannelType`: The channel's Discord type.\"\"\"\n        return ChannelType.private\n\n    @property\n    def guild(self) -> Optional[Guild]:\n        \"\"\"Optional[:class:`Guild`]: The guild this DM channel belongs to. Always ``None``.\n\n        This is mainly provided for compatibility purposes in duck typing.\n\n        .. versionadded:: 2.0\n        \"\"\"\n        return None\n\n    @property\n    def jump_url(self) -> str:\n        \"\"\":class:`str`: Returns a URL that allows the client to jump to the channel.\n\n        .. versionadded:: 2.0\n        \"\"\"\n        return f'https://discord.com/channels/@me/{self.id}'\n\n    @property\n    def created_at(self) -> datetime.datetime:\n        \"\"\":class:`datetime.datetime`: Returns the direct message channel's creation time in UTC.\"\"\"\n        return utils.snowflake_time(self.id)\n\n    def permissions_for(self, obj: Any = None, /) -> Permissions:\n        \"\"\"Handles permission resolution for a :class:`User`.\n\n        This function is there for compatibility with other channel types.\n\n        Actual direct messages do not really have the concept of permissions.\n\n        This returns all the Text related permissions set to ``True`` except:\n\n        - :attr:`~Permissions.send_tts_messages`: You cannot send TTS messages in a DM.\n        - :attr:`~Permissions.manage_messages`: You cannot delete others messages in a DM.\n        - :attr:`~Permissions.create_private_threads`: There are no threads in a DM.\n        - :attr:`~Permissions.create_public_threads`: There are no threads in a DM.\n        - :attr:`~Permissions.manage_threads`: There are no threads in a DM.\n        - :attr:`~Permissions.send_messages_in_threads`: There are no threads in a DM.\n\n        .. versionchanged:: 2.0\n\n            ``obj`` parameter is now positional-only.\n\n        .. versionchanged:: 2.1\n\n            Thread related permissions are now set to ``False``.\n\n        Parameters\n        -----------\n        obj: :class:`User`\n            The user to check permissions for. This parameter is ignored\n            but kept for compatibility with other ``permissions_for`` methods.\n\n        Returns\n        --------\n        :class:`Permissions`\n            The resolved permissions.\n        \"\"\"\n        return Permissions._dm_permissions()\n\n    def get_partial_message(self, message_id: int, /) -> PartialMessage:\n        \"\"\"Creates a :class:`PartialMessage` from the message ID.\n\n        This is useful if you want to work with a message and only have its ID without\n        doing an unnecessary API call.\n\n        .. versionadded:: 1.6\n\n        .. versionchanged:: 2.0\n\n            ``message_id`` parameter is now positional-only.\n\n        Parameters\n        ------------\n        message_id: :class:`int`\n            The message ID to create a partial message for.\n\n        Returns\n        ---------\n        :class:`PartialMessage`\n            The partial message.\n        \"\"\"\n\n        from .message import PartialMessage\n\n        return PartialMessage(channel=self, id=message_id)\n\n\nclass GroupChannel(discord.abc.Messageable, discord.abc.PrivateChannel, Hashable):\n    \"\"\"Represents a Discord group channel.\n\n    .. container:: operations\n\n        .. describe:: x == y\n\n            Checks if two channels are equal.\n\n        .. describe:: x != y\n\n            Checks if two channels are not equal.\n\n        .. describe:: hash(x)\n\n            Returns the channel's hash.\n\n        .. describe:: str(x)\n\n            Returns a string representation of the channel\n\n    Attributes\n    ----------\n    recipients: List[:class:`User`]\n        The users you are participating with in the group channel.\n    me: :class:`ClientUser`\n        The user presenting yourself.\n    id: :class:`int`\n        The group channel ID.\n    owner: Optional[:class:`User`]\n        The user that owns the group channel.\n    owner_id: :class:`int`\n        The owner ID that owns the group channel.\n\n        .. versionadded:: 2.0\n    name: Optional[:class:`str`]\n        The group channel's name if provided.\n    \"\"\"\n\n    __slots__ = ('id', 'recipients', 'owner_id', 'owner', '_icon', 'name', 'me', '_state')\n\n    def __init__(self, *, me: ClientUser, state: ConnectionState, data: GroupChannelPayload):\n        self._state: ConnectionState = state\n        self.id: int = int(data['id'])\n        self.me: ClientUser = me\n        self._update_group(data)\n\n    def _update_group(self, data: GroupChannelPayload) -> None:\n        self.owner_id: Optional[int] = utils._get_as_snowflake(data, 'owner_id')\n        self._icon: Optional[str] = data.get('icon')\n        self.name: Optional[str] = data.get('name')\n        self.recipients: List[User] = [self._state.store_user(u) for u in data.get('recipients', [])]\n\n        self.owner: Optional[BaseUser]\n        if self.owner_id == self.me.id:\n            self.owner = self.me\n        else:\n            self.owner = utils.find(lambda u: u.id == self.owner_id, self.recipients)\n\n    async def _get_channel(self) -> Self:\n        return self\n\n    def __str__(self) -> str:\n        if self.name:\n            return self.name\n\n        if len(self.recipients) == 0:\n            return 'Unnamed'\n\n        return ', '.join(map(lambda x: x.name, self.recipients))\n\n    def __repr__(self) -> str:\n        return f'<GroupChannel id={self.id} name={self.name!r}>'\n\n    @property\n    def type(self) -> Literal[ChannelType.group]:\n        \"\"\":class:`ChannelType`: The channel's Discord type.\"\"\"\n        return ChannelType.group\n\n    @property\n    def guild(self) -> Optional[Guild]:\n        \"\"\"Optional[:class:`Guild`]: The guild this group channel belongs to. Always ``None``.\n\n        This is mainly provided for compatibility purposes in duck typing.\n\n        .. versionadded:: 2.0\n        \"\"\"\n        return None\n\n    @property\n    def icon(self) -> Optional[Asset]:\n        \"\"\"Optional[:class:`Asset`]: Returns the channel's icon asset if available.\"\"\"\n        if self._icon is None:\n            return None\n        return Asset._from_icon(self._state, self.id, self._icon, path='channel')\n\n    @property\n    def created_at(self) -> datetime.datetime:\n        \"\"\":class:`datetime.datetime`: Returns the channel's creation time in UTC.\"\"\"\n        return utils.snowflake_time(self.id)\n\n    @property\n    def jump_url(self) -> str:\n        \"\"\":class:`str`: Returns a URL that allows the client to jump to the channel.\n\n        .. versionadded:: 2.0\n        \"\"\"\n        return f'https://discord.com/channels/@me/{self.id}'\n\n    def permissions_for(self, obj: Snowflake, /) -> Permissions:\n        \"\"\"Handles permission resolution for a :class:`User`.\n\n        This function is there for compatibility with other channel types.\n\n        Actual direct messages do not really have the concept of permissions.\n\n        This returns all the Text related permissions set to ``True`` except:\n\n        - :attr:`~Permissions.send_tts_messages`: You cannot send TTS messages in a DM.\n        - :attr:`~Permissions.manage_messages`: You cannot delete others messages in a DM.\n        - :attr:`~Permissions.create_private_threads`: There are no threads in a DM.\n        - :attr:`~Permissions.create_public_threads`: There are no threads in a DM.\n        - :attr:`~Permissions.manage_threads`: There are no threads in a DM.\n        - :attr:`~Permissions.send_messages_in_threads`: There are no threads in a DM.\n\n        This also checks the kick_members permission if the user is the owner.\n\n        .. versionchanged:: 2.0\n\n            ``obj`` parameter is now positional-only.\n\n        .. versionchanged:: 2.1\n\n            Thread related permissions are now set to ``False``.\n\n        Parameters\n        -----------\n        obj: :class:`~discord.abc.Snowflake`\n            The user to check permissions for.\n\n        Returns\n        --------\n        :class:`Permissions`\n            The resolved permissions for the user.\n        \"\"\"\n\n        base = Permissions._dm_permissions()\n        base.mention_everyone = True\n\n        if obj.id == self.owner_id:\n            base.kick_members = True\n\n        return base\n\n    async def leave(self) -> None:\n        \"\"\"|coro|\n\n        Leave the group.\n\n        If you are the only one in the group, this deletes it as well.\n\n        Raises\n        -------\n        HTTPException\n            Leaving the group failed.\n        \"\"\"\n\n        await self._state.http.leave_group(self.id)\n\n\nclass PartialMessageable(discord.abc.Messageable, Hashable):\n    \"\"\"Represents a partial messageable to aid with working messageable channels when\n    only a channel ID is present.\n\n    The only way to construct this class is through :meth:`Client.get_partial_messageable`.\n\n    Note that this class is trimmed down and has no rich attributes.\n\n    .. versionadded:: 2.0\n\n    .. container:: operations\n\n        .. describe:: x == y\n\n            Checks if two partial messageables are equal.\n\n        .. describe:: x != y\n\n            Checks if two partial messageables are not equal.\n\n        .. describe:: hash(x)\n\n            Returns the partial messageable's hash.\n\n    Attributes\n    -----------\n    id: :class:`int`\n        The channel ID associated with this partial messageable.\n    guild_id: Optional[:class:`int`]\n        The guild ID associated with this partial messageable.\n    type: Optional[:class:`ChannelType`]\n        The channel type associated with this partial messageable, if given.\n    \"\"\"\n\n    def __init__(self, state: ConnectionState, id: int, guild_id: Optional[int] = None, type: Optional[ChannelType] = None):\n        self._state: ConnectionState = state\n        self.id: int = id\n        self.guild_id: Optional[int] = guild_id\n        self.type: Optional[ChannelType] = type\n\n    def __repr__(self) -> str:\n        return f'<{self.__class__.__name__} id={self.id} type={self.type!r}>'\n\n    async def _get_channel(self) -> PartialMessageable:\n        return self\n\n    @property\n    def guild(self) -> Optional[Guild]:\n        \"\"\"Optional[:class:`Guild`]: The guild this partial messageable is in.\"\"\"\n        return self._state._get_guild(self.guild_id)\n\n    @property\n    def jump_url(self) -> str:\n        \"\"\":class:`str`: Returns a URL that allows the client to jump to the channel.\"\"\"\n        if self.guild_id is None:\n            return f'https://discord.com/channels/@me/{self.id}'\n        return f'https://discord.com/channels/{self.guild_id}/{self.id}'\n\n    @property\n    def created_at(self) -> datetime.datetime:\n        \"\"\":class:`datetime.datetime`: Returns the channel's creation time in UTC.\"\"\"\n        return utils.snowflake_time(self.id)\n\n    def permissions_for(self, obj: Any = None, /) -> Permissions:\n        \"\"\"Handles permission resolution for a :class:`User`.\n\n        This function is there for compatibility with other channel types.\n\n        Since partial messageables cannot reasonably have the concept of\n        permissions, this will always return :meth:`Permissions.none`.\n\n        Parameters\n        -----------\n        obj: :class:`User`\n            The user to check permissions for. This parameter is ignored\n            but kept for compatibility with other ``permissions_for`` methods.\n\n        Returns\n        --------\n        :class:`Permissions`\n            The resolved permissions.\n        \"\"\"\n\n        return Permissions.none()\n\n    def get_partial_message(self, message_id: int, /) -> PartialMessage:\n        \"\"\"Creates a :class:`PartialMessage` from the message ID.\n\n        This is useful if you want to work with a message and only have its ID without\n        doing an unnecessary API call.\n\n        Parameters\n        ------------\n        message_id: :class:`int`\n            The message ID to create a partial message for.\n\n        Returns\n        ---------\n        :class:`PartialMessage`\n            The partial message.\n        \"\"\"\n\n        from .message import PartialMessage\n\n        return PartialMessage(channel=self, id=message_id)\n\n\ndef _guild_channel_factory(channel_type: int):\n    value = try_enum(ChannelType, channel_type)\n    if value is ChannelType.text:\n        return TextChannel, value\n    elif value is ChannelType.voice:\n        return VoiceChannel, value\n    elif value is ChannelType.category:\n        return CategoryChannel, value\n    elif value is ChannelType.news:\n        return TextChannel, value\n    elif value is ChannelType.stage_voice:\n        return StageChannel, value\n    elif value is ChannelType.forum:\n        return ForumChannel, value\n    elif value is ChannelType.media:\n        return ForumChannel, value\n    else:\n        return None, value\n\n\ndef _channel_factory(channel_type: int):\n    cls, value = _guild_channel_factory(channel_type)\n    if value is ChannelType.private:\n        return DMChannel, value\n    elif value is ChannelType.group:\n        return GroupChannel, value\n    else:\n        return cls, value\n\n\ndef _threaded_channel_factory(channel_type: int):\n    cls, value = _channel_factory(channel_type)\n    if value in (ChannelType.private_thread, ChannelType.public_thread, ChannelType.news_thread):\n        return Thread, value\n    return cls, value\n\n\ndef _threaded_guild_channel_factory(channel_type: int):\n    cls, value = _guild_channel_factory(channel_type)\n    if value in (ChannelType.private_thread, ChannelType.public_thread, ChannelType.news_thread):\n        return Thread, value\n    return cls, value\n"
  },
  {
    "path": "discord/client.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom __future__ import annotations\n\nimport asyncio\nimport datetime\nimport logging\nfrom typing import (\n    TYPE_CHECKING,\n    Any,\n    AsyncIterator,\n    Callable,\n    Coroutine,\n    Dict,\n    Generator,\n    List,\n    Literal,\n    Optional,\n    Sequence,\n    Tuple,\n    Type,\n    TypeVar,\n    Union,\n    overload,\n)\n\nimport aiohttp\n\nfrom .sku import SKU, Entitlement\nfrom .user import User, ClientUser\nfrom .invite import Invite\nfrom .template import Template\nfrom .widget import Widget\nfrom .guild import Guild\nfrom .emoji import Emoji\nfrom .channel import _threaded_channel_factory, PartialMessageable\nfrom .enums import ChannelType, EntitlementOwnerType\nfrom .mentions import AllowedMentions\nfrom .errors import *\nfrom .enums import Status\nfrom .flags import ApplicationFlags, Intents\nfrom .gateway import *\nfrom .activity import ActivityTypes, BaseActivity, create_activity\nfrom .voice_client import VoiceClient\nfrom .http import HTTPClient\nfrom .state import ConnectionState\nfrom . import utils\nfrom .utils import MISSING, time_snowflake\nfrom .object import Object\nfrom .backoff import ExponentialBackoff\nfrom .webhook import Webhook\nfrom .appinfo import AppInfo\nfrom .ui.view import View\nfrom .ui.dynamic import DynamicItem\nfrom .stage_instance import StageInstance\nfrom .threads import Thread\nfrom .sticker import GuildSticker, StandardSticker, StickerPack, _sticker_factory\n\nif TYPE_CHECKING:\n    from types import TracebackType\n\n    from typing_extensions import Self\n\n    from .abc import Messageable, PrivateChannel, Snowflake, SnowflakeTime\n    from .app_commands import Command, ContextMenu, MissingApplicationID\n    from .automod import AutoModAction, AutoModRule\n    from .channel import DMChannel, GroupChannel\n    from .ext.commands import AutoShardedBot, Bot, Context, CommandError\n    from .guild import GuildChannel\n    from .integrations import Integration\n    from .interactions import Interaction\n    from .member import Member, VoiceState\n    from .message import Message\n    from .raw_models import (\n        RawAppCommandPermissionsUpdateEvent,\n        RawBulkMessageDeleteEvent,\n        RawIntegrationDeleteEvent,\n        RawMemberRemoveEvent,\n        RawMessageDeleteEvent,\n        RawMessageUpdateEvent,\n        RawReactionActionEvent,\n        RawReactionClearEmojiEvent,\n        RawReactionClearEvent,\n        RawThreadDeleteEvent,\n        RawThreadMembersUpdate,\n        RawThreadUpdateEvent,\n        RawTypingEvent,\n        RawPollVoteActionEvent,\n    )\n    from .reaction import Reaction\n    from .role import Role\n    from .scheduled_event import ScheduledEvent\n    from .threads import ThreadMember\n    from .types.guild import Guild as GuildPayload\n    from .ui.item import Item\n    from .voice_client import VoiceProtocol\n    from .audit_logs import AuditLogEntry\n    from .poll import PollAnswer\n\n\n# fmt: off\n__all__ = (\n    'Client',\n)\n# fmt: on\n\nT = TypeVar('T')\nCoro = Coroutine[Any, Any, T]\nCoroT = TypeVar('CoroT', bound=Callable[..., Coro[Any]])\n\n_log = logging.getLogger(__name__)\n\n\nclass _LoopSentinel:\n    __slots__ = ()\n\n    def __getattr__(self, attr: str) -> None:\n        msg = (\n            'loop attribute cannot be accessed in non-async contexts. '\n            'Consider using either an asynchronous main function and passing it to asyncio.run or '\n            'using asynchronous initialisation hooks such as Client.setup_hook'\n        )\n        raise AttributeError(msg)\n\n\n_loop: Any = _LoopSentinel()\n\n\nclass Client:\n    r\"\"\"Represents a client connection that connects to Discord.\n    This class is used to interact with the Discord WebSocket and API.\n\n    .. container:: operations\n\n        .. describe:: async with x\n\n            Asynchronously initialises the client and automatically cleans up.\n\n            .. versionadded:: 2.0\n\n    A number of options can be passed to the :class:`Client`.\n\n    Parameters\n    -----------\n    max_messages: Optional[:class:`int`]\n        The maximum number of messages to store in the internal message cache.\n        This defaults to ``1000``. Passing in ``None`` disables the message cache.\n\n        .. versionchanged:: 1.3\n            Allow disabling the message cache and change the default size to ``1000``.\n    proxy: Optional[:class:`str`]\n        Proxy URL.\n    proxy_auth: Optional[:class:`aiohttp.BasicAuth`]\n        An object that represents proxy HTTP Basic Authorization.\n    shard_id: Optional[:class:`int`]\n        Integer starting at ``0`` and less than :attr:`.shard_count`.\n    shard_count: Optional[:class:`int`]\n        The total number of shards.\n    application_id: :class:`int`\n        The client's application ID.\n    intents: :class:`Intents`\n        The intents that you want to enable for the session. This is a way of\n        disabling and enabling certain gateway events from triggering and being sent.\n\n        .. versionadded:: 1.5\n\n        .. versionchanged:: 2.0\n            Parameter is now required.\n    member_cache_flags: :class:`MemberCacheFlags`\n        Allows for finer control over how the library caches members.\n        If not given, defaults to cache as much as possible with the\n        currently selected intents.\n\n        .. versionadded:: 1.5\n    chunk_guilds_at_startup: :class:`bool`\n        Indicates if :func:`.on_ready` should be delayed to chunk all guilds\n        at start-up if necessary. This operation is incredibly slow for large\n        amounts of guilds. The default is ``True`` if :attr:`Intents.members`\n        is ``True``.\n\n        .. versionadded:: 1.5\n    status: Optional[:class:`.Status`]\n        A status to start your presence with upon logging on to Discord.\n    activity: Optional[:class:`.BaseActivity`]\n        An activity to start your presence with upon logging on to Discord.\n    allowed_mentions: Optional[:class:`AllowedMentions`]\n        Control how the client handles mentions by default on every message sent.\n\n        .. versionadded:: 1.4\n    heartbeat_timeout: :class:`float`\n        The maximum numbers of seconds before timing out and restarting the\n        WebSocket in the case of not receiving a HEARTBEAT_ACK. Useful if\n        processing the initial packets take too long to the point of disconnecting\n        you. The default timeout is 60 seconds.\n    guild_ready_timeout: :class:`float`\n        The maximum number of seconds to wait for the GUILD_CREATE stream to end before\n        preparing the member cache and firing READY. The default timeout is 2 seconds.\n\n        .. versionadded:: 1.4\n    assume_unsync_clock: :class:`bool`\n        Whether to assume the system clock is unsynced. This applies to the ratelimit handling\n        code. If this is set to ``True``, the default, then the library uses the time to reset\n        a rate limit bucket given by Discord. If this is ``False`` then your system clock is\n        used to calculate how long to sleep for. If this is set to ``False`` it is recommended to\n        sync your system clock to Google's NTP server.\n\n        .. versionadded:: 1.3\n    enable_debug_events: :class:`bool`\n        Whether to enable events that are useful only for debugging gateway related information.\n\n        Right now this involves :func:`on_socket_raw_receive` and :func:`on_socket_raw_send`. If\n        this is ``False`` then those events will not be dispatched (due to performance considerations).\n        To enable these events, this must be set to ``True``. Defaults to ``False``.\n\n        .. versionadded:: 2.0\n    http_trace: :class:`aiohttp.TraceConfig`\n        The trace configuration to use for tracking HTTP requests the library does using ``aiohttp``.\n        This allows you to check requests the library is using. For more information, check the\n        `aiohttp documentation <https://docs.aiohttp.org/en/stable/client_advanced.html#client-tracing>`_.\n\n        .. versionadded:: 2.0\n    max_ratelimit_timeout: Optional[:class:`float`]\n        The maximum number of seconds to wait when a non-global rate limit is encountered.\n        If a request requires sleeping for more than the seconds passed in, then\n        :exc:`~discord.RateLimited` will be raised. By default, there is no timeout limit.\n        In order to prevent misuse and unnecessary bans, the minimum value this can be\n        set to is ``30.0`` seconds.\n\n        .. versionadded:: 2.0\n\n    Attributes\n    -----------\n    ws\n        The websocket gateway the client is currently connected to. Could be ``None``.\n    \"\"\"\n\n    def __init__(self, *, intents: Intents, **options: Any) -> None:\n        self.loop: asyncio.AbstractEventLoop = _loop\n        # self.ws is set in the connect method\n        self.ws: DiscordWebSocket = None  # type: ignore\n        self._listeners: Dict[str, List[Tuple[asyncio.Future, Callable[..., bool]]]] = {}\n        self.shard_id: Optional[int] = options.get('shard_id')\n        self.shard_count: Optional[int] = options.get('shard_count')\n\n        proxy: Optional[str] = options.pop('proxy', None)\n        proxy_auth: Optional[aiohttp.BasicAuth] = options.pop('proxy_auth', None)\n        unsync_clock: bool = options.pop('assume_unsync_clock', True)\n        http_trace: Optional[aiohttp.TraceConfig] = options.pop('http_trace', None)\n        max_ratelimit_timeout: Optional[float] = options.pop('max_ratelimit_timeout', None)\n        self.http: HTTPClient = HTTPClient(\n            self.loop,\n            proxy=proxy,\n            proxy_auth=proxy_auth,\n            unsync_clock=unsync_clock,\n            http_trace=http_trace,\n            max_ratelimit_timeout=max_ratelimit_timeout,\n        )\n\n        self._handlers: Dict[str, Callable[..., None]] = {\n            'ready': self._handle_ready,\n        }\n\n        self._hooks: Dict[str, Callable[..., Coroutine[Any, Any, Any]]] = {\n            'before_identify': self._call_before_identify_hook,\n        }\n\n        self._enable_debug_events: bool = options.pop('enable_debug_events', False)\n        self._connection: ConnectionState[Self] = self._get_state(intents=intents, **options)\n        self._connection.shard_count = self.shard_count\n        self._closing_task: Optional[asyncio.Task[None]] = None\n        self._ready: asyncio.Event = MISSING\n        self._application: Optional[AppInfo] = None\n        self._connection._get_websocket = self._get_websocket\n        self._connection._get_client = lambda: self\n\n        if VoiceClient.warn_nacl:\n            VoiceClient.warn_nacl = False\n            _log.warning(\"PyNaCl is not installed, voice will NOT be supported\")\n\n    async def __aenter__(self) -> Self:\n        await self._async_setup_hook()\n        return self\n\n    async def __aexit__(\n        self,\n        exc_type: Optional[Type[BaseException]],\n        exc_value: Optional[BaseException],\n        traceback: Optional[TracebackType],\n    ) -> None:\n        # This avoids double-calling a user-provided .close()\n        if self._closing_task:\n            await self._closing_task\n        else:\n            await self.close()\n\n    # internals\n\n    def _get_websocket(self, guild_id: Optional[int] = None, *, shard_id: Optional[int] = None) -> DiscordWebSocket:\n        return self.ws\n\n    def _get_state(self, **options: Any) -> ConnectionState[Self]:\n        return ConnectionState(dispatch=self.dispatch, handlers=self._handlers, hooks=self._hooks, http=self.http, **options)\n\n    def _handle_ready(self) -> None:\n        self._ready.set()\n\n    @property\n    def latency(self) -> float:\n        \"\"\":class:`float`: Measures latency between a HEARTBEAT and a HEARTBEAT_ACK in seconds.\n\n        This could be referred to as the Discord WebSocket protocol latency.\n        \"\"\"\n        ws = self.ws\n        return float('nan') if not ws else ws.latency\n\n    def is_ws_ratelimited(self) -> bool:\n        \"\"\":class:`bool`: Whether the websocket is currently rate limited.\n\n        This can be useful to know when deciding whether you should query members\n        using HTTP or via the gateway.\n\n        .. versionadded:: 1.6\n        \"\"\"\n        if self.ws:\n            return self.ws.is_ratelimited()\n        return False\n\n    @property\n    def user(self) -> Optional[ClientUser]:\n        \"\"\"Optional[:class:`.ClientUser`]: Represents the connected client. ``None`` if not logged in.\"\"\"\n        return self._connection.user\n\n    @property\n    def guilds(self) -> Sequence[Guild]:\n        \"\"\"Sequence[:class:`.Guild`]: The guilds that the connected client is a member of.\"\"\"\n        return self._connection.guilds\n\n    @property\n    def emojis(self) -> Sequence[Emoji]:\n        \"\"\"Sequence[:class:`.Emoji`]: The emojis that the connected client has.\"\"\"\n        return self._connection.emojis\n\n    @property\n    def stickers(self) -> Sequence[GuildSticker]:\n        \"\"\"Sequence[:class:`.GuildSticker`]: The stickers that the connected client has.\n\n        .. versionadded:: 2.0\n        \"\"\"\n        return self._connection.stickers\n\n    @property\n    def cached_messages(self) -> Sequence[Message]:\n        \"\"\"Sequence[:class:`.Message`]: Read-only list of messages the connected client has cached.\n\n        .. versionadded:: 1.1\n        \"\"\"\n        return utils.SequenceProxy(self._connection._messages or [])\n\n    @property\n    def private_channels(self) -> Sequence[PrivateChannel]:\n        \"\"\"Sequence[:class:`.abc.PrivateChannel`]: The private channels that the connected client is participating on.\n\n        .. note::\n\n            This returns only up to 128 most recent private channels due to an internal working\n            on how Discord deals with private channels.\n        \"\"\"\n        return self._connection.private_channels\n\n    @property\n    def voice_clients(self) -> List[VoiceProtocol]:\n        \"\"\"List[:class:`.VoiceProtocol`]: Represents a list of voice connections.\n\n        These are usually :class:`.VoiceClient` instances.\n        \"\"\"\n        return self._connection.voice_clients\n\n    @property\n    def application_id(self) -> Optional[int]:\n        \"\"\"Optional[:class:`int`]: The client's application ID.\n\n        If this is not passed via ``__init__`` then this is retrieved\n        through the gateway when an event contains the data or after a call\n        to :meth:`~discord.Client.login`. Usually after :func:`~discord.on_connect`\n        is called.\n\n        .. versionadded:: 2.0\n        \"\"\"\n        return self._connection.application_id\n\n    @property\n    def application_flags(self) -> ApplicationFlags:\n        \"\"\":class:`~discord.ApplicationFlags`: The client's application flags.\n\n        .. versionadded:: 2.0\n        \"\"\"\n        return self._connection.application_flags\n\n    @property\n    def application(self) -> Optional[AppInfo]:\n        \"\"\"Optional[:class:`~discord.AppInfo`]: The client's application info.\n\n        This is retrieved on :meth:`~discord.Client.login` and is not updated\n        afterwards. This allows populating the application_id without requiring a\n        gateway connection.\n\n        This is ``None`` if accessed before :meth:`~discord.Client.login` is called.\n\n        .. seealso:: The :meth:`~discord.Client.application_info` API call\n\n        .. versionadded:: 2.0\n        \"\"\"\n        return self._application\n\n    def is_ready(self) -> bool:\n        \"\"\":class:`bool`: Specifies if the client's internal cache is ready for use.\"\"\"\n        return self._ready is not MISSING and self._ready.is_set()\n\n    async def _run_event(\n        self,\n        coro: Callable[..., Coroutine[Any, Any, Any]],\n        event_name: str,\n        *args: Any,\n        **kwargs: Any,\n    ) -> None:\n        try:\n            await coro(*args, **kwargs)\n        except asyncio.CancelledError:\n            pass\n        except Exception:\n            try:\n                await self.on_error(event_name, *args, **kwargs)\n            except asyncio.CancelledError:\n                pass\n\n    def _schedule_event(\n        self,\n        coro: Callable[..., Coroutine[Any, Any, Any]],\n        event_name: str,\n        *args: Any,\n        **kwargs: Any,\n    ) -> asyncio.Task:\n        wrapped = self._run_event(coro, event_name, *args, **kwargs)\n        # Schedules the task\n        return self.loop.create_task(wrapped, name=f'discord.py: {event_name}')\n\n    def dispatch(self, event: str, /, *args: Any, **kwargs: Any) -> None:\n        _log.debug('Dispatching event %s', event)\n        method = 'on_' + event\n\n        listeners = self._listeners.get(event)\n        if listeners:\n            removed = []\n            for i, (future, condition) in enumerate(listeners):\n                if future.cancelled():\n                    removed.append(i)\n                    continue\n\n                try:\n                    result = condition(*args)\n                except Exception as exc:\n                    future.set_exception(exc)\n                    removed.append(i)\n                else:\n                    if result:\n                        if len(args) == 0:\n                            future.set_result(None)\n                        elif len(args) == 1:\n                            future.set_result(args[0])\n                        else:\n                            future.set_result(args)\n                        removed.append(i)\n\n            if len(removed) == len(listeners):\n                self._listeners.pop(event)\n            else:\n                for idx in reversed(removed):\n                    del listeners[idx]\n\n        try:\n            coro = getattr(self, method)\n        except AttributeError:\n            pass\n        else:\n            self._schedule_event(coro, method, *args, **kwargs)\n\n    async def on_error(self, event_method: str, /, *args: Any, **kwargs: Any) -> None:\n        \"\"\"|coro|\n\n        The default error handler provided by the client.\n\n        By default this logs to the library logger however it could be\n        overridden to have a different implementation.\n        Check :func:`~discord.on_error` for more details.\n\n        .. versionchanged:: 2.0\n\n            ``event_method`` parameter is now positional-only\n            and instead of writing to ``sys.stderr`` it logs instead.\n        \"\"\"\n        _log.exception('Ignoring exception in %s', event_method)\n\n    # hooks\n\n    async def _call_before_identify_hook(self, shard_id: Optional[int], *, initial: bool = False) -> None:\n        # This hook is an internal hook that actually calls the public one.\n        # It allows the library to have its own hook without stepping on the\n        # toes of those who need to override their own hook.\n        await self.before_identify_hook(shard_id, initial=initial)\n\n    async def before_identify_hook(self, shard_id: Optional[int], *, initial: bool = False) -> None:\n        \"\"\"|coro|\n\n        A hook that is called before IDENTIFYing a session. This is useful\n        if you wish to have more control over the synchronization of multiple\n        IDENTIFYing clients.\n\n        The default implementation sleeps for 5 seconds.\n\n        .. versionadded:: 1.4\n\n        Parameters\n        ------------\n        shard_id: :class:`int`\n            The shard ID that requested being IDENTIFY'd\n        initial: :class:`bool`\n            Whether this IDENTIFY is the first initial IDENTIFY.\n        \"\"\"\n\n        if not initial:\n            await asyncio.sleep(5.0)\n\n    async def _async_setup_hook(self) -> None:\n        # Called whenever the client needs to initialise asyncio objects with a running loop\n        loop = asyncio.get_running_loop()\n        self.loop = loop\n        self.http.loop = loop\n        self._connection.loop = loop\n\n        self._ready = asyncio.Event()\n\n    async def setup_hook(self) -> None:\n        \"\"\"|coro|\n\n        A coroutine to be called to setup the bot, by default this is blank.\n\n        To perform asynchronous setup after the bot is logged in but before\n        it has connected to the Websocket, overwrite this coroutine.\n\n        This is only called once, in :meth:`login`, and will be called before\n        any events are dispatched, making it a better solution than doing such\n        setup in the :func:`~discord.on_ready` event.\n\n        .. warning::\n\n            Since this is called *before* the websocket connection is made therefore\n            anything that waits for the websocket will deadlock, this includes things\n            like :meth:`wait_for` and :meth:`wait_until_ready`.\n\n        .. versionadded:: 2.0\n        \"\"\"\n        pass\n\n    # login state management\n\n    async def login(self, token: str) -> None:\n        \"\"\"|coro|\n\n        Logs in the client with the specified credentials and\n        calls the :meth:`setup_hook`.\n\n\n        Parameters\n        -----------\n        token: :class:`str`\n            The authentication token. Do not prefix this token with\n            anything as the library will do it for you.\n\n        Raises\n        ------\n        LoginFailure\n            The wrong credentials are passed.\n        HTTPException\n            An unknown HTTP related error occurred,\n            usually when it isn't 200 or the known incorrect credentials\n            passing status code.\n        \"\"\"\n\n        _log.info('logging in using static token')\n\n        if self.loop is _loop:\n            await self._async_setup_hook()\n\n        if not isinstance(token, str):\n            raise TypeError(f'expected token to be a str, received {token.__class__.__name__} instead')\n        token = token.strip()\n\n        data = await self.http.static_login(token)\n        self._connection.user = ClientUser(state=self._connection, data=data)\n        self._application = await self.application_info()\n        if self._connection.application_id is None:\n            self._connection.application_id = self._application.id\n\n        if not self._connection.application_flags:\n            self._connection.application_flags = self._application.flags\n\n        await self.setup_hook()\n\n    async def connect(self, *, reconnect: bool = True) -> None:\n        \"\"\"|coro|\n\n        Creates a websocket connection and lets the websocket listen\n        to messages from Discord. This is a loop that runs the entire\n        event system and miscellaneous aspects of the library. Control\n        is not resumed until the WebSocket connection is terminated.\n\n        Parameters\n        -----------\n        reconnect: :class:`bool`\n            If we should attempt reconnecting, either due to internet\n            failure or a specific failure on Discord's part. Certain\n            disconnects that lead to bad state will not be handled (such as\n            invalid sharding payloads or bad tokens).\n\n        Raises\n        -------\n        GatewayNotFound\n            If the gateway to connect to Discord is not found. Usually if this\n            is thrown then there is a Discord API outage.\n        ConnectionClosed\n            The websocket connection has been terminated.\n        \"\"\"\n\n        backoff = ExponentialBackoff()\n        ws_params = {\n            'initial': True,\n            'shard_id': self.shard_id,\n        }\n        while not self.is_closed():\n            try:\n                coro = DiscordWebSocket.from_client(self, **ws_params)\n                self.ws = await asyncio.wait_for(coro, timeout=60.0)\n                ws_params['initial'] = False\n                while True:\n                    await self.ws.poll_event()\n            except ReconnectWebSocket as e:\n                _log.debug('Got a request to %s the websocket.', e.op)\n                self.dispatch('disconnect')\n                ws_params.update(sequence=self.ws.sequence, resume=e.resume, session=self.ws.session_id)\n                if e.resume:\n                    ws_params['gateway'] = self.ws.gateway\n                continue\n            except (\n                OSError,\n                HTTPException,\n                GatewayNotFound,\n                ConnectionClosed,\n                aiohttp.ClientError,\n                asyncio.TimeoutError,\n            ) as exc:\n                self.dispatch('disconnect')\n                if not reconnect:\n                    await self.close()\n                    if isinstance(exc, ConnectionClosed) and exc.code == 1000:\n                        # clean close, don't re-raise this\n                        return\n                    raise\n\n                if self.is_closed():\n                    return\n\n                # If we get connection reset by peer then try to RESUME\n                if isinstance(exc, OSError) and exc.errno in (54, 10054):\n                    ws_params.update(\n                        sequence=self.ws.sequence,\n                        gateway=self.ws.gateway,\n                        initial=False,\n                        resume=True,\n                        session=self.ws.session_id,\n                    )\n                    continue\n\n                # We should only get this when an unhandled close code happens,\n                # such as a clean disconnect (1000) or a bad state (bad token, no sharding, etc)\n                # sometimes, discord sends us 1000 for unknown reasons so we should reconnect\n                # regardless and rely on is_closed instead\n                if isinstance(exc, ConnectionClosed):\n                    if exc.code == 4014:\n                        raise PrivilegedIntentsRequired(exc.shard_id) from None\n                    if exc.code != 1000:\n                        await self.close()\n                        raise\n\n                retry = backoff.delay()\n                _log.exception(\"Attempting a reconnect in %.2fs\", retry)\n                await asyncio.sleep(retry)\n                # Always try to RESUME the connection\n                # If the connection is not RESUME-able then the gateway will invalidate the session.\n                # This is apparently what the official Discord client does.\n                ws_params.update(\n                    sequence=self.ws.sequence,\n                    gateway=self.ws.gateway,\n                    resume=True,\n                    session=self.ws.session_id,\n                )\n\n    async def close(self) -> None:\n        \"\"\"|coro|\n\n        Closes the connection to Discord.\n        \"\"\"\n        if self._closing_task:\n            return await self._closing_task\n\n        async def _close():\n            await self._connection.close()\n\n            if self.ws is not None and self.ws.open:\n                await self.ws.close(code=1000)\n\n            await self.http.close()\n\n            if self._ready is not MISSING:\n                self._ready.clear()\n\n            self.loop = MISSING\n\n        self._closing_task = asyncio.create_task(_close())\n        await self._closing_task\n\n    def clear(self) -> None:\n        \"\"\"Clears the internal state of the bot.\n\n        After this, the bot can be considered \"re-opened\", i.e. :meth:`is_closed`\n        and :meth:`is_ready` both return ``False`` along with the bot's internal\n        cache cleared.\n        \"\"\"\n        self._closing_task = None\n        self._ready.clear()\n        self._connection.clear()\n        self.http.clear()\n\n    async def start(self, token: str, *, reconnect: bool = True) -> None:\n        \"\"\"|coro|\n\n        A shorthand coroutine for :meth:`login` + :meth:`connect`.\n\n        Parameters\n        -----------\n        token: :class:`str`\n            The authentication token. Do not prefix this token with\n            anything as the library will do it for you.\n        reconnect: :class:`bool`\n            If we should attempt reconnecting, either due to internet\n            failure or a specific failure on Discord's part. Certain\n            disconnects that lead to bad state will not be handled (such as\n            invalid sharding payloads or bad tokens).\n\n        Raises\n        -------\n        TypeError\n            An unexpected keyword argument was received.\n        \"\"\"\n        await self.login(token)\n        await self.connect(reconnect=reconnect)\n\n    def run(\n        self,\n        token: str,\n        *,\n        reconnect: bool = True,\n        log_handler: Optional[logging.Handler] = MISSING,\n        log_formatter: logging.Formatter = MISSING,\n        log_level: int = MISSING,\n        root_logger: bool = False,\n    ) -> None:\n        \"\"\"A blocking call that abstracts away the event loop\n        initialisation from you.\n\n        If you want more control over the event loop then this\n        function should not be used. Use :meth:`start` coroutine\n        or :meth:`connect` + :meth:`login`.\n\n        This function also sets up the logging library to make it easier\n        for beginners to know what is going on with the library. For more\n        advanced users, this can be disabled by passing ``None`` to\n        the ``log_handler`` parameter.\n\n        .. warning::\n\n            This function must be the last function to call due to the fact that it\n            is blocking. That means that registration of events or anything being\n            called after this function call will not execute until it returns.\n\n        Parameters\n        -----------\n        token: :class:`str`\n            The authentication token. Do not prefix this token with\n            anything as the library will do it for you.\n        reconnect: :class:`bool`\n            If we should attempt reconnecting, either due to internet\n            failure or a specific failure on Discord's part. Certain\n            disconnects that lead to bad state will not be handled (such as\n            invalid sharding payloads or bad tokens).\n        log_handler: Optional[:class:`logging.Handler`]\n            The log handler to use for the library's logger. If this is ``None``\n            then the library will not set up anything logging related. Logging\n            will still work if ``None`` is passed, though it is your responsibility\n            to set it up.\n\n            The default log handler if not provided is :class:`logging.StreamHandler`.\n\n            .. versionadded:: 2.0\n        log_formatter: :class:`logging.Formatter`\n            The formatter to use with the given log handler. If not provided then it\n            defaults to a colour based logging formatter (if available).\n\n            .. versionadded:: 2.0\n        log_level: :class:`int`\n            The default log level for the library's logger. This is only applied if the\n            ``log_handler`` parameter is not ``None``. Defaults to ``logging.INFO``.\n\n            .. versionadded:: 2.0\n        root_logger: :class:`bool`\n            Whether to set up the root logger rather than the library logger.\n            By default, only the library logger (``'discord'``) is set up. If this\n            is set to ``True`` then the root logger is set up as well.\n\n            Defaults to ``False``.\n\n            .. versionadded:: 2.0\n        \"\"\"\n\n        async def runner():\n            async with self:\n                await self.start(token, reconnect=reconnect)\n\n        if log_handler is not None:\n            utils.setup_logging(\n                handler=log_handler,\n                formatter=log_formatter,\n                level=log_level,\n                root=root_logger,\n            )\n\n        try:\n            asyncio.run(runner())\n        except KeyboardInterrupt:\n            # nothing to do here\n            # `asyncio.run` handles the loop cleanup\n            # and `self.start` closes all sockets and the HTTPClient instance.\n            return\n\n    # properties\n\n    def is_closed(self) -> bool:\n        \"\"\":class:`bool`: Indicates if the websocket connection is closed.\"\"\"\n        return self._closing_task is not None\n\n    @property\n    def activity(self) -> Optional[ActivityTypes]:\n        \"\"\"Optional[:class:`.BaseActivity`]: The activity being used upon\n        logging in.\n        \"\"\"\n        return create_activity(self._connection._activity, self._connection)\n\n    @activity.setter\n    def activity(self, value: Optional[ActivityTypes]) -> None:\n        if value is None:\n            self._connection._activity = None\n        elif isinstance(value, BaseActivity):\n            # ConnectionState._activity is typehinted as ActivityPayload, we're passing Dict[str, Any]\n            self._connection._activity = value.to_dict()  # type: ignore\n        else:\n            raise TypeError('activity must derive from BaseActivity.')\n\n    @property\n    def status(self) -> Status:\n        \"\"\":class:`.Status`:\n        The status being used upon logging on to Discord.\n\n        .. versionadded: 2.0\n        \"\"\"\n        if self._connection._status in set(state.value for state in Status):\n            return Status(self._connection._status)\n        return Status.online\n\n    @status.setter\n    def status(self, value: Status) -> None:\n        if value is Status.offline:\n            self._connection._status = 'invisible'\n        elif isinstance(value, Status):\n            self._connection._status = str(value)\n        else:\n            raise TypeError('status must derive from Status.')\n\n    @property\n    def allowed_mentions(self) -> Optional[AllowedMentions]:\n        \"\"\"Optional[:class:`~discord.AllowedMentions`]: The allowed mention configuration.\n\n        .. versionadded:: 1.4\n        \"\"\"\n        return self._connection.allowed_mentions\n\n    @allowed_mentions.setter\n    def allowed_mentions(self, value: Optional[AllowedMentions]) -> None:\n        if value is None or isinstance(value, AllowedMentions):\n            self._connection.allowed_mentions = value\n        else:\n            raise TypeError(f'allowed_mentions must be AllowedMentions not {value.__class__.__name__}')\n\n    @property\n    def intents(self) -> Intents:\n        \"\"\":class:`~discord.Intents`: The intents configured for this connection.\n\n        .. versionadded:: 1.5\n        \"\"\"\n        return self._connection.intents\n\n    # helpers/getters\n\n    @property\n    def users(self) -> List[User]:\n        \"\"\"List[:class:`~discord.User`]: Returns a list of all the users the bot can see.\"\"\"\n        return list(self._connection._users.values())\n\n    def get_channel(self, id: int, /) -> Optional[Union[GuildChannel, Thread, PrivateChannel]]:\n        \"\"\"Returns a channel or thread with the given ID.\n\n        .. versionchanged:: 2.0\n\n            ``id`` parameter is now positional-only.\n\n        Parameters\n        -----------\n        id: :class:`int`\n            The ID to search for.\n\n        Returns\n        --------\n        Optional[Union[:class:`.abc.GuildChannel`, :class:`.Thread`, :class:`.abc.PrivateChannel`]]\n            The returned channel or ``None`` if not found.\n        \"\"\"\n        return self._connection.get_channel(id)  # type: ignore # The cache contains all channel types\n\n    def get_partial_messageable(\n        self, id: int, *, guild_id: Optional[int] = None, type: Optional[ChannelType] = None\n    ) -> PartialMessageable:\n        \"\"\"Returns a partial messageable with the given channel ID.\n\n        This is useful if you have a channel_id but don't want to do an API call\n        to send messages to it.\n\n        .. versionadded:: 2.0\n\n        Parameters\n        -----------\n        id: :class:`int`\n            The channel ID to create a partial messageable for.\n        guild_id: Optional[:class:`int`]\n            The optional guild ID to create a partial messageable for.\n\n            This is not required to actually send messages, but it does allow the\n            :meth:`~discord.PartialMessageable.jump_url` and\n            :attr:`~discord.PartialMessageable.guild` properties to function properly.\n        type: Optional[:class:`.ChannelType`]\n            The underlying channel type for the partial messageable.\n\n        Returns\n        --------\n        :class:`.PartialMessageable`\n            The partial messageable\n        \"\"\"\n        return PartialMessageable(state=self._connection, id=id, guild_id=guild_id, type=type)\n\n    def get_stage_instance(self, id: int, /) -> Optional[StageInstance]:\n        \"\"\"Returns a stage instance with the given stage channel ID.\n\n        .. versionadded:: 2.0\n\n        Parameters\n        -----------\n        id: :class:`int`\n            The ID to search for.\n\n        Returns\n        --------\n        Optional[:class:`.StageInstance`]\n            The stage instance or ``None`` if not found.\n        \"\"\"\n        from .channel import StageChannel\n\n        channel = self._connection.get_channel(id)\n\n        if isinstance(channel, StageChannel):\n            return channel.instance\n\n    def get_guild(self, id: int, /) -> Optional[Guild]:\n        \"\"\"Returns a guild with the given ID.\n\n        .. versionchanged:: 2.0\n\n            ``id`` parameter is now positional-only.\n\n        Parameters\n        -----------\n        id: :class:`int`\n            The ID to search for.\n\n        Returns\n        --------\n        Optional[:class:`.Guild`]\n            The guild or ``None`` if not found.\n        \"\"\"\n        return self._connection._get_guild(id)\n\n    def get_user(self, id: int, /) -> Optional[User]:\n        \"\"\"Returns a user with the given ID.\n\n        .. versionchanged:: 2.0\n\n            ``id`` parameter is now positional-only.\n\n        Parameters\n        -----------\n        id: :class:`int`\n            The ID to search for.\n\n        Returns\n        --------\n        Optional[:class:`~discord.User`]\n            The user or ``None`` if not found.\n        \"\"\"\n        return self._connection.get_user(id)\n\n    def get_emoji(self, id: int, /) -> Optional[Emoji]:\n        \"\"\"Returns an emoji with the given ID.\n\n        .. versionchanged:: 2.0\n\n            ``id`` parameter is now positional-only.\n\n        Parameters\n        -----------\n        id: :class:`int`\n            The ID to search for.\n\n        Returns\n        --------\n        Optional[:class:`.Emoji`]\n            The custom emoji or ``None`` if not found.\n        \"\"\"\n        return self._connection.get_emoji(id)\n\n    def get_sticker(self, id: int, /) -> Optional[GuildSticker]:\n        \"\"\"Returns a guild sticker with the given ID.\n\n        .. versionadded:: 2.0\n\n        .. note::\n\n            To retrieve standard stickers, use :meth:`.fetch_sticker`.\n            or :meth:`.fetch_premium_sticker_packs`.\n\n        Returns\n        --------\n        Optional[:class:`.GuildSticker`]\n            The sticker or ``None`` if not found.\n        \"\"\"\n        return self._connection.get_sticker(id)\n\n    def get_all_channels(self) -> Generator[GuildChannel, None, None]:\n        \"\"\"A generator that retrieves every :class:`.abc.GuildChannel` the client can 'access'.\n\n        This is equivalent to: ::\n\n            for guild in client.guilds:\n                for channel in guild.channels:\n                    yield channel\n\n        .. note::\n\n            Just because you receive a :class:`.abc.GuildChannel` does not mean that\n            you can communicate in said channel. :meth:`.abc.GuildChannel.permissions_for` should\n            be used for that.\n\n        Yields\n        ------\n        :class:`.abc.GuildChannel`\n            A channel the client can 'access'.\n        \"\"\"\n\n        for guild in self.guilds:\n            yield from guild.channels\n\n    def get_all_members(self) -> Generator[Member, None, None]:\n        \"\"\"Returns a generator with every :class:`.Member` the client can see.\n\n        This is equivalent to: ::\n\n            for guild in client.guilds:\n                for member in guild.members:\n                    yield member\n\n        Yields\n        ------\n        :class:`.Member`\n            A member the client can see.\n        \"\"\"\n        for guild in self.guilds:\n            yield from guild.members\n\n    # listeners/waiters\n\n    async def wait_until_ready(self) -> None:\n        \"\"\"|coro|\n\n        Waits until the client's internal cache is all ready.\n\n        .. warning::\n\n            Calling this inside :meth:`setup_hook` can lead to a deadlock.\n        \"\"\"\n        if self._ready is not MISSING:\n            await self._ready.wait()\n        else:\n            raise RuntimeError(\n                'Client has not been properly initialised. '\n                'Please use the login method or asynchronous context manager before calling this method'\n            )\n\n    # App Commands\n\n    @overload\n    async def wait_for(\n        self,\n        event: Literal['raw_app_command_permissions_update'],\n        /,\n        *,\n        check: Optional[Callable[[RawAppCommandPermissionsUpdateEvent], bool]],\n        timeout: Optional[float] = None,\n    ) -> RawAppCommandPermissionsUpdateEvent:\n        ...\n\n    @overload\n    async def wait_for(\n        self,\n        event: Literal['app_command_completion'],\n        /,\n        *,\n        check: Optional[Callable[[Interaction[Self], Union[Command[Any, ..., Any], ContextMenu]], bool]],\n        timeout: Optional[float] = None,\n    ) -> Tuple[Interaction[Self], Union[Command[Any, ..., Any], ContextMenu]]:\n        ...\n\n    # AutoMod\n\n    @overload\n    async def wait_for(\n        self,\n        event: Literal['automod_rule_create', 'automod_rule_update', 'automod_rule_delete'],\n        /,\n        *,\n        check: Optional[Callable[[AutoModRule], bool]],\n        timeout: Optional[float] = None,\n    ) -> AutoModRule:\n        ...\n\n    @overload\n    async def wait_for(\n        self,\n        event: Literal['automod_action'],\n        /,\n        *,\n        check: Optional[Callable[[AutoModAction], bool]],\n        timeout: Optional[float] = None,\n    ) -> AutoModAction:\n        ...\n\n    # Channels\n\n    @overload\n    async def wait_for(\n        self,\n        event: Literal['private_channel_update'],\n        /,\n        *,\n        check: Optional[Callable[[GroupChannel, GroupChannel], bool]],\n        timeout: Optional[float] = None,\n    ) -> Tuple[GroupChannel, GroupChannel]:\n        ...\n\n    @overload\n    async def wait_for(\n        self,\n        event: Literal['private_channel_pins_update'],\n        /,\n        *,\n        check: Optional[Callable[[PrivateChannel, datetime.datetime], bool]],\n        timeout: Optional[float] = None,\n    ) -> Tuple[PrivateChannel, datetime.datetime]:\n        ...\n\n    @overload\n    async def wait_for(\n        self,\n        event: Literal['guild_channel_delete', 'guild_channel_create'],\n        /,\n        *,\n        check: Optional[Callable[[GuildChannel], bool]],\n        timeout: Optional[float] = None,\n    ) -> GuildChannel:\n        ...\n\n    @overload\n    async def wait_for(\n        self,\n        event: Literal['guild_channel_update'],\n        /,\n        *,\n        check: Optional[Callable[[GuildChannel, GuildChannel], bool]],\n        timeout: Optional[float] = None,\n    ) -> Tuple[GuildChannel, GuildChannel]:\n        ...\n\n    @overload\n    async def wait_for(\n        self,\n        event: Literal['guild_channel_pins_update'],\n        /,\n        *,\n        check: Optional[\n            Callable[\n                [Union[GuildChannel, Thread], Optional[datetime.datetime]],\n                bool,\n            ]\n        ],\n        timeout: Optional[float] = None,\n    ) -> Tuple[Union[GuildChannel, Thread], Optional[datetime.datetime]]:\n        ...\n\n    @overload\n    async def wait_for(\n        self,\n        event: Literal['typing'],\n        /,\n        *,\n        check: Optional[Callable[[Messageable, Union[User, Member], datetime.datetime], bool]],\n        timeout: Optional[float] = None,\n    ) -> Tuple[Messageable, Union[User, Member], datetime.datetime]:\n        ...\n\n    @overload\n    async def wait_for(\n        self,\n        event: Literal['raw_typing'],\n        /,\n        *,\n        check: Optional[Callable[[RawTypingEvent], bool]],\n        timeout: Optional[float] = None,\n    ) -> RawTypingEvent:\n        ...\n\n    # Debug & Gateway events\n\n    @overload\n    async def wait_for(\n        self,\n        event: Literal['connect', 'disconnect', 'ready', 'resumed'],\n        /,\n        *,\n        check: Optional[Callable[[], bool]],\n        timeout: Optional[float] = None,\n    ) -> None:\n        ...\n\n    @overload\n    async def wait_for(\n        self,\n        event: Literal['shard_connect', 'shard_disconnect', 'shard_ready', 'shard_resumed'],\n        /,\n        *,\n        check: Optional[Callable[[int], bool]],\n        timeout: Optional[float] = None,\n    ) -> int:\n        ...\n\n    @overload\n    async def wait_for(\n        self,\n        event: Literal['socket_event_type', 'socket_raw_receive'],\n        /,\n        *,\n        check: Optional[Callable[[str], bool]],\n        timeout: Optional[float] = None,\n    ) -> str:\n        ...\n\n    @overload\n    async def wait_for(\n        self,\n        event: Literal['socket_raw_send'],\n        /,\n        *,\n        check: Optional[Callable[[Union[str, bytes]], bool]],\n        timeout: Optional[float] = None,\n    ) -> Union[str, bytes]:\n        ...\n\n    # Guilds\n\n    @overload\n    async def wait_for(\n        self,\n        event: Literal[\n            'guild_available',\n            'guild_unavailable',\n            'guild_join',\n            'guild_remove',\n        ],\n        /,\n        *,\n        check: Optional[Callable[[Guild], bool]],\n        timeout: Optional[float] = None,\n    ) -> Guild:\n        ...\n\n    @overload\n    async def wait_for(\n        self,\n        event: Literal['guild_update'],\n        /,\n        *,\n        check: Optional[Callable[[Guild, Guild], bool]],\n        timeout: Optional[float] = None,\n    ) -> Tuple[Guild, Guild]:\n        ...\n\n    @overload\n    async def wait_for(\n        self,\n        event: Literal['guild_emojis_update'],\n        /,\n        *,\n        check: Optional[Callable[[Guild, Sequence[Emoji], Sequence[Emoji]], bool]],\n        timeout: Optional[float] = None,\n    ) -> Tuple[Guild, Sequence[Emoji], Sequence[Emoji]]:\n        ...\n\n    @overload\n    async def wait_for(\n        self,\n        event: Literal['guild_stickers_update'],\n        /,\n        *,\n        check: Optional[Callable[[Guild, Sequence[GuildSticker], Sequence[GuildSticker]], bool]],\n        timeout: Optional[float] = None,\n    ) -> Tuple[Guild, Sequence[GuildSticker], Sequence[GuildSticker]]:\n        ...\n\n    @overload\n    async def wait_for(\n        self,\n        event: Literal['invite_create', 'invite_delete'],\n        /,\n        *,\n        check: Optional[Callable[[Invite], bool]],\n        timeout: Optional[float] = None,\n    ) -> Invite:\n        ...\n\n    @overload\n    async def wait_for(\n        self,\n        event: Literal['audit_log_entry_create'],\n        /,\n        *,\n        check: Optional[Callable[[AuditLogEntry], bool]],\n        timeout: Optional[float] = None,\n    ) -> AuditLogEntry:\n        ...\n\n    # Integrations\n\n    @overload\n    async def wait_for(\n        self,\n        event: Literal['integration_create', 'integration_update'],\n        /,\n        *,\n        check: Optional[Callable[[Integration], bool]],\n        timeout: Optional[float] = None,\n    ) -> Integration:\n        ...\n\n    @overload\n    async def wait_for(\n        self,\n        event: Literal['guild_integrations_update'],\n        /,\n        *,\n        check: Optional[Callable[[Guild], bool]],\n        timeout: Optional[float] = None,\n    ) -> Guild:\n        ...\n\n    @overload\n    async def wait_for(\n        self,\n        event: Literal['webhooks_update'],\n        /,\n        *,\n        check: Optional[Callable[[GuildChannel], bool]],\n        timeout: Optional[float] = None,\n    ) -> GuildChannel:\n        ...\n\n    @overload\n    async def wait_for(\n        self,\n        event: Literal['raw_integration_delete'],\n        /,\n        *,\n        check: Optional[Callable[[RawIntegrationDeleteEvent], bool]],\n        timeout: Optional[float] = None,\n    ) -> RawIntegrationDeleteEvent:\n        ...\n\n    # Interactions\n\n    @overload\n    async def wait_for(\n        self,\n        event: Literal['interaction'],\n        /,\n        *,\n        check: Optional[Callable[[Interaction[Self]], bool]],\n        timeout: Optional[float] = None,\n    ) -> Interaction[Self]:\n        ...\n\n    # Members\n\n    @overload\n    async def wait_for(\n        self,\n        event: Literal['member_join', 'member_remove'],\n        /,\n        *,\n        check: Optional[Callable[[Member], bool]],\n        timeout: Optional[float] = None,\n    ) -> Member:\n        ...\n\n    @overload\n    async def wait_for(\n        self,\n        event: Literal['raw_member_remove'],\n        /,\n        *,\n        check: Optional[Callable[[RawMemberRemoveEvent], bool]],\n        timeout: Optional[float] = None,\n    ) -> RawMemberRemoveEvent:\n        ...\n\n    @overload\n    async def wait_for(\n        self,\n        event: Literal['member_update', 'presence_update'],\n        /,\n        *,\n        check: Optional[Callable[[Member, Member], bool]],\n        timeout: Optional[float] = None,\n    ) -> Tuple[Member, Member]:\n        ...\n\n    @overload\n    async def wait_for(\n        self,\n        event: Literal['user_update'],\n        /,\n        *,\n        check: Optional[Callable[[User, User], bool]],\n        timeout: Optional[float] = None,\n    ) -> Tuple[User, User]:\n        ...\n\n    @overload\n    async def wait_for(\n        self,\n        event: Literal['member_ban'],\n        /,\n        *,\n        check: Optional[Callable[[Guild, Union[User, Member]], bool]],\n        timeout: Optional[float] = None,\n    ) -> Tuple[Guild, Union[User, Member]]:\n        ...\n\n    @overload\n    async def wait_for(\n        self,\n        event: Literal['member_unban'],\n        /,\n        *,\n        check: Optional[Callable[[Guild, User], bool]],\n        timeout: Optional[float] = None,\n    ) -> Tuple[Guild, User]:\n        ...\n\n    # Messages\n\n    @overload\n    async def wait_for(\n        self,\n        event: Literal['message', 'message_delete'],\n        /,\n        *,\n        check: Optional[Callable[[Message], bool]],\n        timeout: Optional[float] = None,\n    ) -> Message:\n        ...\n\n    @overload\n    async def wait_for(\n        self,\n        event: Literal['message_edit'],\n        /,\n        *,\n        check: Optional[Callable[[Message, Message], bool]],\n        timeout: Optional[float] = None,\n    ) -> Tuple[Message, Message]:\n        ...\n\n    @overload\n    async def wait_for(\n        self,\n        event: Literal['bulk_message_delete'],\n        /,\n        *,\n        check: Optional[Callable[[List[Message]], bool]],\n        timeout: Optional[float] = None,\n    ) -> List[Message]:\n        ...\n\n    @overload\n    async def wait_for(\n        self,\n        event: Literal['raw_message_edit'],\n        /,\n        *,\n        check: Optional[Callable[[RawMessageUpdateEvent], bool]],\n        timeout: Optional[float] = None,\n    ) -> RawMessageUpdateEvent:\n        ...\n\n    @overload\n    async def wait_for(\n        self,\n        event: Literal['raw_message_delete'],\n        /,\n        *,\n        check: Optional[Callable[[RawMessageDeleteEvent], bool]],\n        timeout: Optional[float] = None,\n    ) -> RawMessageDeleteEvent:\n        ...\n\n    @overload\n    async def wait_for(\n        self,\n        event: Literal['raw_bulk_message_delete'],\n        /,\n        *,\n        check: Optional[Callable[[RawBulkMessageDeleteEvent], bool]],\n        timeout: Optional[float] = None,\n    ) -> RawBulkMessageDeleteEvent:\n        ...\n\n    # Reactions\n\n    @overload\n    async def wait_for(\n        self,\n        event: Literal['reaction_add', 'reaction_remove'],\n        /,\n        *,\n        check: Optional[Callable[[Reaction, Union[Member, User]], bool]],\n        timeout: Optional[float] = None,\n    ) -> Tuple[Reaction, Union[Member, User]]:\n        ...\n\n    @overload\n    async def wait_for(\n        self,\n        event: Literal['reaction_clear'],\n        /,\n        *,\n        check: Optional[Callable[[Message, List[Reaction]], bool]],\n        timeout: Optional[float] = None,\n    ) -> Tuple[Message, List[Reaction]]:\n        ...\n\n    @overload\n    async def wait_for(\n        self,\n        event: Literal['reaction_clear_emoji'],\n        /,\n        *,\n        check: Optional[Callable[[Reaction], bool]],\n        timeout: Optional[float] = None,\n    ) -> Reaction:\n        ...\n\n    @overload\n    async def wait_for(\n        self,\n        event: Literal['raw_reaction_add', 'raw_reaction_remove'],\n        /,\n        *,\n        check: Optional[Callable[[RawReactionActionEvent], bool]],\n        timeout: Optional[float] = None,\n    ) -> RawReactionActionEvent:\n        ...\n\n    @overload\n    async def wait_for(\n        self,\n        event: Literal['raw_reaction_clear'],\n        /,\n        *,\n        check: Optional[Callable[[RawReactionClearEvent], bool]],\n        timeout: Optional[float] = None,\n    ) -> RawReactionClearEvent:\n        ...\n\n    @overload\n    async def wait_for(\n        self,\n        event: Literal['raw_reaction_clear_emoji'],\n        /,\n        *,\n        check: Optional[Callable[[RawReactionClearEmojiEvent], bool]],\n        timeout: Optional[float] = None,\n    ) -> RawReactionClearEmojiEvent:\n        ...\n\n    # Roles\n\n    @overload\n    async def wait_for(\n        self,\n        event: Literal['guild_role_create', 'guild_role_delete'],\n        /,\n        *,\n        check: Optional[Callable[[Role], bool]],\n        timeout: Optional[float] = None,\n    ) -> Role:\n        ...\n\n    @overload\n    async def wait_for(\n        self,\n        event: Literal['guild_role_update'],\n        /,\n        *,\n        check: Optional[Callable[[Role, Role], bool]],\n        timeout: Optional[float] = None,\n    ) -> Tuple[Role, Role]:\n        ...\n\n    # Scheduled Events\n\n    @overload\n    async def wait_for(\n        self,\n        event: Literal['scheduled_event_create', 'scheduled_event_delete'],\n        /,\n        *,\n        check: Optional[Callable[[ScheduledEvent], bool]],\n        timeout: Optional[float] = None,\n    ) -> ScheduledEvent:\n        ...\n\n    @overload\n    async def wait_for(\n        self,\n        event: Literal['scheduled_event_user_add', 'scheduled_event_user_remove'],\n        /,\n        *,\n        check: Optional[Callable[[ScheduledEvent, User], bool]],\n        timeout: Optional[float] = None,\n    ) -> Tuple[ScheduledEvent, User]:\n        ...\n\n    # Stages\n\n    @overload\n    async def wait_for(\n        self,\n        event: Literal['stage_instance_create', 'stage_instance_delete'],\n        /,\n        *,\n        check: Optional[Callable[[StageInstance], bool]],\n        timeout: Optional[float] = None,\n    ) -> StageInstance:\n        ...\n\n    @overload\n    async def wait_for(\n        self,\n        event: Literal['stage_instance_update'],\n        /,\n        *,\n        check: Optional[Callable[[StageInstance, StageInstance], bool]],\n        timeout: Optional[float] = None,\n    ) -> Coroutine[Any, Any, Tuple[StageInstance, StageInstance]]:\n        ...\n\n    # Threads\n    @overload\n    async def wait_for(\n        self,\n        event: Literal['thread_create', 'thread_join', 'thread_remove', 'thread_delete'],\n        /,\n        *,\n        check: Optional[Callable[[Thread], bool]],\n        timeout: Optional[float] = None,\n    ) -> Thread:\n        ...\n\n    @overload\n    async def wait_for(\n        self,\n        event: Literal['thread_update'],\n        /,\n        *,\n        check: Optional[Callable[[Thread, Thread], bool]],\n        timeout: Optional[float] = None,\n    ) -> Tuple[Thread, Thread]:\n        ...\n\n    @overload\n    async def wait_for(\n        self,\n        event: Literal['raw_thread_update'],\n        /,\n        *,\n        check: Optional[Callable[[RawThreadUpdateEvent], bool]],\n        timeout: Optional[float] = None,\n    ) -> RawThreadUpdateEvent:\n        ...\n\n    @overload\n    async def wait_for(\n        self,\n        event: Literal['raw_thread_delete'],\n        /,\n        *,\n        check: Optional[Callable[[RawThreadDeleteEvent], bool]],\n        timeout: Optional[float] = None,\n    ) -> RawThreadDeleteEvent:\n        ...\n\n    @overload\n    async def wait_for(\n        self,\n        event: Literal['thread_member_join', 'thread_member_remove'],\n        /,\n        *,\n        check: Optional[Callable[[ThreadMember], bool]],\n        timeout: Optional[float] = None,\n    ) -> ThreadMember:\n        ...\n\n    @overload\n    async def wait_for(\n        self,\n        event: Literal['raw_thread_member_remove'],\n        /,\n        *,\n        check: Optional[Callable[[RawThreadMembersUpdate], bool]],\n        timeout: Optional[float] = None,\n    ) -> RawThreadMembersUpdate:\n        ...\n\n    # Voice\n\n    @overload\n    async def wait_for(\n        self,\n        event: Literal['voice_state_update'],\n        /,\n        *,\n        check: Optional[Callable[[Member, VoiceState, VoiceState], bool]],\n        timeout: Optional[float] = None,\n    ) -> Tuple[Member, VoiceState, VoiceState]:\n        ...\n\n    # Polls\n\n    @overload\n    async def wait_for(\n        self,\n        event: Literal['poll_vote_add', 'poll_vote_remove'],\n        /,\n        *,\n        check: Optional[Callable[[Union[User, Member], PollAnswer], bool]] = None,\n        timeout: Optional[float] = None,\n    ) -> Tuple[Union[User, Member], PollAnswer]:\n        ...\n\n    @overload\n    async def wait_for(\n        self,\n        event: Literal['raw_poll_vote_add', 'raw_poll_vote_remove'],\n        /,\n        *,\n        check: Optional[Callable[[RawPollVoteActionEvent], bool]] = None,\n        timeout: Optional[float] = None,\n    ) -> RawPollVoteActionEvent:\n        ...\n\n    # Commands\n\n    @overload\n    async def wait_for(\n        self: Union[Bot, AutoShardedBot],\n        event: Literal[\"command\", \"command_completion\"],\n        /,\n        *,\n        check: Optional[Callable[[Context[Any]], bool]] = None,\n        timeout: Optional[float] = None,\n    ) -> Context[Any]:\n        ...\n\n    @overload\n    async def wait_for(\n        self: Union[Bot, AutoShardedBot],\n        event: Literal[\"command_error\"],\n        /,\n        *,\n        check: Optional[Callable[[Context[Any], CommandError], bool]] = None,\n        timeout: Optional[float] = None,\n    ) -> Tuple[Context[Any], CommandError]:\n        ...\n\n    @overload\n    async def wait_for(\n        self,\n        event: str,\n        /,\n        *,\n        check: Optional[Callable[..., bool]] = None,\n        timeout: Optional[float] = None,\n    ) -> Any:\n        ...\n\n    def wait_for(\n        self,\n        event: str,\n        /,\n        *,\n        check: Optional[Callable[..., bool]] = None,\n        timeout: Optional[float] = None,\n    ) -> Coro[Any]:\n        \"\"\"|coro|\n\n        Waits for a WebSocket event to be dispatched.\n\n        This could be used to wait for a user to reply to a message,\n        or to react to a message, or to edit a message in a self-contained\n        way.\n\n        The ``timeout`` parameter is passed onto :func:`asyncio.wait_for`. By default,\n        it does not timeout. Note that this does propagate the\n        :exc:`asyncio.TimeoutError` for you in case of timeout and is provided for\n        ease of use.\n\n        In case the event returns multiple arguments, a :class:`tuple` containing those\n        arguments is returned instead. Please check the\n        :ref:`documentation <discord-api-events>` for a list of events and their\n        parameters.\n\n        This function returns the **first event that meets the requirements**.\n\n        Examples\n        ---------\n\n        Waiting for a user reply: ::\n\n            @client.event\n            async def on_message(message):\n                if message.content.startswith('$greet'):\n                    channel = message.channel\n                    await channel.send('Say hello!')\n\n                    def check(m):\n                        return m.content == 'hello' and m.channel == channel\n\n                    msg = await client.wait_for('message', check=check)\n                    await channel.send(f'Hello {msg.author}!')\n\n        Waiting for a thumbs up reaction from the message author: ::\n\n            @client.event\n            async def on_message(message):\n                if message.content.startswith('$thumb'):\n                    channel = message.channel\n                    await channel.send('Send me that \\N{THUMBS UP SIGN} reaction, mate')\n\n                    def check(reaction, user):\n                        return user == message.author and str(reaction.emoji) == '\\N{THUMBS UP SIGN}'\n\n                    try:\n                        reaction, user = await client.wait_for('reaction_add', timeout=60.0, check=check)\n                    except asyncio.TimeoutError:\n                        await channel.send('\\N{THUMBS DOWN SIGN}')\n                    else:\n                        await channel.send('\\N{THUMBS UP SIGN}')\n\n        .. versionchanged:: 2.0\n\n            ``event`` parameter is now positional-only.\n\n\n        Parameters\n        ------------\n        event: :class:`str`\n            The event name, similar to the :ref:`event reference <discord-api-events>`,\n            but without the ``on_`` prefix, to wait for.\n        check: Optional[Callable[..., :class:`bool`]]\n            A predicate to check what to wait for. The arguments must meet the\n            parameters of the event being waited for.\n        timeout: Optional[:class:`float`]\n            The number of seconds to wait before timing out and raising\n            :exc:`asyncio.TimeoutError`.\n\n        Raises\n        -------\n        asyncio.TimeoutError\n            If a timeout is provided and it was reached.\n\n        Returns\n        --------\n        Any\n            Returns no arguments, a single argument, or a :class:`tuple` of multiple\n            arguments that mirrors the parameters passed in the\n            :ref:`event reference <discord-api-events>`.\n        \"\"\"\n\n        future = self.loop.create_future()\n        if check is None:\n\n            def _check(*args):\n                return True\n\n            check = _check\n\n        ev = event.lower()\n        try:\n            listeners = self._listeners[ev]\n        except KeyError:\n            listeners = []\n            self._listeners[ev] = listeners\n\n        listeners.append((future, check))\n        return asyncio.wait_for(future, timeout)\n\n    # event registration\n\n    def event(self, coro: CoroT, /) -> CoroT:\n        \"\"\"A decorator that registers an event to listen to.\n\n        You can find more info about the events on the :ref:`documentation below <discord-api-events>`.\n\n        The events must be a :ref:`coroutine <coroutine>`, if not, :exc:`TypeError` is raised.\n\n        Example\n        ---------\n\n        .. code-block:: python3\n\n            @client.event\n            async def on_ready():\n                print('Ready!')\n\n        .. versionchanged:: 2.0\n\n            ``coro`` parameter is now positional-only.\n\n        Raises\n        --------\n        TypeError\n            The coroutine passed is not actually a coroutine.\n        \"\"\"\n\n        if not asyncio.iscoroutinefunction(coro):\n            raise TypeError('event registered must be a coroutine function')\n\n        setattr(self, coro.__name__, coro)\n        _log.debug('%s has successfully been registered as an event', coro.__name__)\n        return coro\n\n    async def change_presence(\n        self,\n        *,\n        activity: Optional[BaseActivity] = None,\n        status: Optional[Status] = None,\n    ) -> None:\n        \"\"\"|coro|\n\n        Changes the client's presence.\n\n        Example\n        ---------\n\n        .. code-block:: python3\n\n            game = discord.Game(\"with the API\")\n            await client.change_presence(status=discord.Status.idle, activity=game)\n\n        .. versionchanged:: 2.0\n            Removed the ``afk`` keyword-only parameter.\n\n        .. versionchanged:: 2.0\n            This function will now raise :exc:`TypeError` instead of\n            ``InvalidArgument``.\n\n        Parameters\n        ----------\n        activity: Optional[:class:`.BaseActivity`]\n            The activity being done. ``None`` if no currently active activity is done.\n        status: Optional[:class:`.Status`]\n            Indicates what status to change to. If ``None``, then\n            :attr:`.Status.online` is used.\n\n        Raises\n        ------\n        TypeError\n            If the ``activity`` parameter is not the proper type.\n        \"\"\"\n\n        if status is None:\n            status_str = 'online'\n            status = Status.online\n        elif status is Status.offline:\n            status_str = 'invisible'\n            status = Status.offline\n        else:\n            status_str = str(status)\n\n        await self.ws.change_presence(activity=activity, status=status_str)\n\n        for guild in self._connection.guilds:\n            me = guild.me\n            if me is None:\n                continue\n\n            if activity is not None:\n                me.activities = (activity,)  # type: ignore # Type checker does not understand the downcast here\n            else:\n                me.activities = ()\n\n            me.status = status\n\n    # Guild stuff\n\n    async def fetch_guilds(\n        self,\n        *,\n        limit: Optional[int] = 200,\n        before: Optional[SnowflakeTime] = None,\n        after: Optional[SnowflakeTime] = None,\n        with_counts: bool = True,\n    ) -> AsyncIterator[Guild]:\n        \"\"\"Retrieves an :term:`asynchronous iterator` that enables receiving your guilds.\n\n        .. note::\n\n            Using this, you will only receive :attr:`.Guild.owner`, :attr:`.Guild.icon`,\n            :attr:`.Guild.id`, :attr:`.Guild.name`, :attr:`.Guild.approximate_member_count`,\n            and :attr:`.Guild.approximate_presence_count` per :class:`.Guild`.\n\n        .. note::\n\n            This method is an API call. For general usage, consider :attr:`guilds` instead.\n\n        Examples\n        ---------\n\n        Usage ::\n\n            async for guild in client.fetch_guilds(limit=150):\n                print(guild.name)\n\n        Flattening into a list ::\n\n            guilds = [guild async for guild in client.fetch_guilds(limit=150)]\n            # guilds is now a list of Guild...\n\n        All parameters are optional.\n\n        Parameters\n        -----------\n        limit: Optional[:class:`int`]\n            The number of guilds to retrieve.\n            If ``None``, it retrieves every guild you have access to. Note, however,\n            that this would make it a slow operation.\n            Defaults to ``200``.\n\n            .. versionchanged:: 2.0\n\n                The default has been changed to 200.\n\n        before: Union[:class:`.abc.Snowflake`, :class:`datetime.datetime`]\n            Retrieves guilds before this date or object.\n            If a datetime is provided, it is recommended to use a UTC aware datetime.\n            If the datetime is naive, it is assumed to be local time.\n        after: Union[:class:`.abc.Snowflake`, :class:`datetime.datetime`]\n            Retrieve guilds after this date or object.\n            If a datetime is provided, it is recommended to use a UTC aware datetime.\n            If the datetime is naive, it is assumed to be local time.\n        with_counts: :class:`bool`\n            Whether to include count information in the guilds. This fills the\n            :attr:`.Guild.approximate_member_count` and :attr:`.Guild.approximate_presence_count`\n            attributes without needing any privileged intents. Defaults to ``True``.\n\n            .. versionadded:: 2.3\n\n        Raises\n        ------\n        HTTPException\n            Getting the guilds failed.\n\n        Yields\n        --------\n        :class:`.Guild`\n            The guild with the guild data parsed.\n        \"\"\"\n\n        async def _before_strategy(retrieve: int, before: Optional[Snowflake], limit: Optional[int]):\n            before_id = before.id if before else None\n            data = await self.http.get_guilds(retrieve, before=before_id, with_counts=with_counts)\n\n            if data:\n                if limit is not None:\n                    limit -= len(data)\n\n                before = Object(id=int(data[0]['id']))\n\n            return data, before, limit\n\n        async def _after_strategy(retrieve: int, after: Optional[Snowflake], limit: Optional[int]):\n            after_id = after.id if after else None\n            data = await self.http.get_guilds(retrieve, after=after_id, with_counts=with_counts)\n\n            if data:\n                if limit is not None:\n                    limit -= len(data)\n\n                after = Object(id=int(data[-1]['id']))\n\n            return data, after, limit\n\n        if isinstance(before, datetime.datetime):\n            before = Object(id=time_snowflake(before, high=False))\n        if isinstance(after, datetime.datetime):\n            after = Object(id=time_snowflake(after, high=True))\n\n        predicate: Optional[Callable[[GuildPayload], bool]] = None\n        strategy, state = _after_strategy, after\n\n        if before:\n            strategy, state = _before_strategy, before\n\n        if before and after:\n            predicate = lambda m: int(m['id']) > after.id\n\n        while True:\n            retrieve = 200 if limit is None else min(limit, 200)\n            if retrieve < 1:\n                return\n\n            data, state, limit = await strategy(retrieve, state, limit)\n\n            if predicate:\n                data = filter(predicate, data)\n\n            count = 0\n\n            for count, raw_guild in enumerate(data, 1):\n                yield Guild(state=self._connection, data=raw_guild)\n\n            if count < 200:\n                # There's no data left after this\n                break\n\n    async def fetch_template(self, code: Union[Template, str]) -> Template:\n        \"\"\"|coro|\n\n        Gets a :class:`.Template` from a discord.new URL or code.\n\n        Parameters\n        -----------\n        code: Union[:class:`.Template`, :class:`str`]\n            The Discord Template Code or URL (must be a discord.new URL).\n\n        Raises\n        -------\n        NotFound\n            The template is invalid.\n        HTTPException\n            Getting the template failed.\n\n        Returns\n        --------\n        :class:`.Template`\n            The template from the URL/code.\n        \"\"\"\n        code = utils.resolve_template(code)\n        data = await self.http.get_template(code)\n        return Template(data=data, state=self._connection)\n\n    async def fetch_guild(self, guild_id: int, /, *, with_counts: bool = True) -> Guild:\n        \"\"\"|coro|\n\n        Retrieves a :class:`.Guild` from an ID.\n\n        .. note::\n\n            Using this, you will **not** receive :attr:`.Guild.channels`, :attr:`.Guild.members`,\n            :attr:`.Member.activity` and :attr:`.Member.voice` per :class:`.Member`.\n\n        .. note::\n\n            This method is an API call. For general usage, consider :meth:`get_guild` instead.\n\n        .. versionchanged:: 2.0\n\n            ``guild_id`` parameter is now positional-only.\n\n\n        Parameters\n        -----------\n        guild_id: :class:`int`\n            The guild's ID to fetch from.\n        with_counts: :class:`bool`\n            Whether to include count information in the guild. This fills the\n            :attr:`.Guild.approximate_member_count` and :attr:`.Guild.approximate_presence_count`\n            attributes without needing any privileged intents. Defaults to ``True``.\n\n            .. versionadded:: 2.0\n\n        Raises\n        ------\n        NotFound\n            The guild doesn't exist or you got no access to it.\n        HTTPException\n            Getting the guild failed.\n\n        Returns\n        --------\n        :class:`.Guild`\n            The guild from the ID.\n        \"\"\"\n        data = await self.http.get_guild(guild_id, with_counts=with_counts)\n        return Guild(data=data, state=self._connection)\n\n    async def create_guild(\n        self,\n        *,\n        name: str,\n        icon: bytes = MISSING,\n        code: str = MISSING,\n    ) -> Guild:\n        \"\"\"|coro|\n\n        Creates a :class:`.Guild`.\n\n        Bot accounts in more than 10 guilds are not allowed to create guilds.\n\n        .. versionchanged:: 2.0\n            ``name`` and ``icon`` parameters are now keyword-only. The ``region`` parameter has been removed.\n\n        .. versionchanged:: 2.0\n            This function will now raise :exc:`ValueError` instead of\n            ``InvalidArgument``.\n\n        Parameters\n        ----------\n        name: :class:`str`\n            The name of the guild.\n        icon: Optional[:class:`bytes`]\n            The :term:`py:bytes-like object` representing the icon. See :meth:`.ClientUser.edit`\n            for more details on what is expected.\n        code: :class:`str`\n            The code for a template to create the guild with.\n\n            .. versionadded:: 1.4\n\n        Raises\n        ------\n        HTTPException\n            Guild creation failed.\n        ValueError\n            Invalid icon image format given. Must be PNG or JPG.\n\n        Returns\n        -------\n        :class:`.Guild`\n            The guild created. This is not the same guild that is\n            added to cache.\n        \"\"\"\n        if icon is not MISSING:\n            icon_base64 = utils._bytes_to_base64_data(icon)\n        else:\n            icon_base64 = None\n\n        if code:\n            data = await self.http.create_from_template(code, name, icon_base64)\n        else:\n            data = await self.http.create_guild(name, icon_base64)\n        return Guild(data=data, state=self._connection)\n\n    async def fetch_stage_instance(self, channel_id: int, /) -> StageInstance:\n        \"\"\"|coro|\n\n        Gets a :class:`.StageInstance` for a stage channel id.\n\n        .. versionadded:: 2.0\n\n        Parameters\n        -----------\n        channel_id: :class:`int`\n            The stage channel ID.\n\n        Raises\n        -------\n        NotFound\n            The stage instance or channel could not be found.\n        HTTPException\n            Getting the stage instance failed.\n\n        Returns\n        --------\n        :class:`.StageInstance`\n            The stage instance from the stage channel ID.\n        \"\"\"\n        data = await self.http.get_stage_instance(channel_id)\n        guild = self.get_guild(int(data['guild_id']))\n        # Guild can technically be None here but this is being explicitly silenced right now.\n        return StageInstance(guild=guild, state=self._connection, data=data)  # type: ignore\n\n    # Invite management\n\n    async def fetch_invite(\n        self,\n        url: Union[Invite, str],\n        *,\n        with_counts: bool = True,\n        with_expiration: bool = True,\n        scheduled_event_id: Optional[int] = None,\n    ) -> Invite:\n        \"\"\"|coro|\n\n        Gets an :class:`.Invite` from a discord.gg URL or ID.\n\n        .. note::\n\n            If the invite is for a guild you have not joined, the guild and channel\n            attributes of the returned :class:`.Invite` will be :class:`.PartialInviteGuild` and\n            :class:`.PartialInviteChannel` respectively.\n\n        Parameters\n        -----------\n        url: Union[:class:`.Invite`, :class:`str`]\n            The Discord invite ID or URL (must be a discord.gg URL).\n        with_counts: :class:`bool`\n            Whether to include count information in the invite. This fills the\n            :attr:`.Invite.approximate_member_count` and :attr:`.Invite.approximate_presence_count`\n            fields.\n        with_expiration: :class:`bool`\n            Whether to include the expiration date of the invite. This fills the\n            :attr:`.Invite.expires_at` field.\n\n            .. versionadded:: 2.0\n        scheduled_event_id: Optional[:class:`int`]\n            The ID of the scheduled event this invite is for.\n\n            .. note::\n\n                It is not possible to provide a url that contains an ``event_id`` parameter\n                when using this parameter.\n\n            .. versionadded:: 2.0\n\n        Raises\n        -------\n        ValueError\n            The url contains an ``event_id``, but ``scheduled_event_id`` has also been provided.\n        NotFound\n            The invite has expired or is invalid.\n        HTTPException\n            Getting the invite failed.\n\n        Returns\n        --------\n        :class:`.Invite`\n            The invite from the URL/ID.\n        \"\"\"\n\n        resolved = utils.resolve_invite(url)\n\n        if scheduled_event_id and resolved.event:\n            raise ValueError('Cannot specify scheduled_event_id and contain an event_id in the url.')\n\n        scheduled_event_id = scheduled_event_id or resolved.event\n\n        data = await self.http.get_invite(\n            resolved.code,\n            with_counts=with_counts,\n            with_expiration=with_expiration,\n            guild_scheduled_event_id=scheduled_event_id,\n        )\n        return Invite.from_incomplete(state=self._connection, data=data)\n\n    async def delete_invite(self, invite: Union[Invite, str], /) -> None:\n        \"\"\"|coro|\n\n        Revokes an :class:`.Invite`, URL, or ID to an invite.\n\n        You must have :attr:`~.Permissions.manage_channels` in\n        the associated guild to do this.\n\n        .. versionchanged:: 2.0\n\n            ``invite`` parameter is now positional-only.\n\n        Parameters\n        ----------\n        invite: Union[:class:`.Invite`, :class:`str`]\n            The invite to revoke.\n\n        Raises\n        -------\n        Forbidden\n            You do not have permissions to revoke invites.\n        NotFound\n            The invite is invalid or expired.\n        HTTPException\n            Revoking the invite failed.\n        \"\"\"\n\n        resolved = utils.resolve_invite(invite)\n        await self.http.delete_invite(resolved.code)\n\n    # Miscellaneous stuff\n\n    async def fetch_widget(self, guild_id: int, /) -> Widget:\n        \"\"\"|coro|\n\n        Gets a :class:`.Widget` from a guild ID.\n\n        .. note::\n\n            The guild must have the widget enabled to get this information.\n\n        .. versionchanged:: 2.0\n\n            ``guild_id`` parameter is now positional-only.\n\n        Parameters\n        -----------\n        guild_id: :class:`int`\n            The ID of the guild.\n\n        Raises\n        -------\n        Forbidden\n            The widget for this guild is disabled.\n        HTTPException\n            Retrieving the widget failed.\n\n        Returns\n        --------\n        :class:`.Widget`\n            The guild's widget.\n        \"\"\"\n        data = await self.http.get_widget(guild_id)\n\n        return Widget(state=self._connection, data=data)\n\n    async def application_info(self) -> AppInfo:\n        \"\"\"|coro|\n\n        Retrieves the bot's application information.\n\n        Raises\n        -------\n        HTTPException\n            Retrieving the information failed somehow.\n\n        Returns\n        --------\n        :class:`.AppInfo`\n            The bot's application information.\n        \"\"\"\n        data = await self.http.application_info()\n        return AppInfo(self._connection, data)\n\n    async def fetch_user(self, user_id: int, /) -> User:\n        \"\"\"|coro|\n\n        Retrieves a :class:`~discord.User` based on their ID.\n        You do not have to share any guilds with the user to get this information,\n        however many operations do require that you do.\n\n        .. note::\n\n            This method is an API call. If you have :attr:`discord.Intents.members` and member cache enabled, consider :meth:`get_user` instead.\n\n        .. versionchanged:: 2.0\n\n            ``user_id`` parameter is now positional-only.\n\n        Parameters\n        -----------\n        user_id: :class:`int`\n            The user's ID to fetch from.\n\n        Raises\n        -------\n        NotFound\n            A user with this ID does not exist.\n        HTTPException\n            Fetching the user failed.\n\n        Returns\n        --------\n        :class:`~discord.User`\n            The user you requested.\n        \"\"\"\n        data = await self.http.get_user(user_id)\n        return User(state=self._connection, data=data)\n\n    async def fetch_channel(self, channel_id: int, /) -> Union[GuildChannel, PrivateChannel, Thread]:\n        \"\"\"|coro|\n\n        Retrieves a :class:`.abc.GuildChannel`, :class:`.abc.PrivateChannel`, or :class:`.Thread` with the specified ID.\n\n        .. note::\n\n            This method is an API call. For general usage, consider :meth:`get_channel` instead.\n\n        .. versionadded:: 1.2\n\n        .. versionchanged:: 2.0\n\n            ``channel_id`` parameter is now positional-only.\n\n        Raises\n        -------\n        InvalidData\n            An unknown channel type was received from Discord.\n        HTTPException\n            Retrieving the channel failed.\n        NotFound\n            Invalid Channel ID.\n        Forbidden\n            You do not have permission to fetch this channel.\n\n        Returns\n        --------\n        Union[:class:`.abc.GuildChannel`, :class:`.abc.PrivateChannel`, :class:`.Thread`]\n            The channel from the ID.\n        \"\"\"\n        data = await self.http.get_channel(channel_id)\n\n        factory, ch_type = _threaded_channel_factory(data['type'])\n        if factory is None:\n            raise InvalidData('Unknown channel type {type} for channel ID {id}.'.format_map(data))\n\n        if ch_type in (ChannelType.group, ChannelType.private):\n            # the factory will be a DMChannel or GroupChannel here\n            channel = factory(me=self.user, data=data, state=self._connection)  # type: ignore\n        else:\n            # the factory can't be a DMChannel or GroupChannel here\n            guild_id = int(data['guild_id'])  # type: ignore\n            guild = self._connection._get_or_create_unavailable_guild(guild_id)\n            # the factory should be a GuildChannel or Thread\n            channel = factory(guild=guild, state=self._connection, data=data)  # type: ignore\n\n        return channel\n\n    async def fetch_webhook(self, webhook_id: int, /) -> Webhook:\n        \"\"\"|coro|\n\n        Retrieves a :class:`.Webhook` with the specified ID.\n\n        .. versionchanged:: 2.0\n\n            ``webhook_id`` parameter is now positional-only.\n\n        Raises\n        --------\n        HTTPException\n            Retrieving the webhook failed.\n        NotFound\n            Invalid webhook ID.\n        Forbidden\n            You do not have permission to fetch this webhook.\n\n        Returns\n        ---------\n        :class:`.Webhook`\n            The webhook you requested.\n        \"\"\"\n        data = await self.http.get_webhook(webhook_id)\n        return Webhook.from_state(data, state=self._connection)\n\n    async def fetch_sticker(self, sticker_id: int, /) -> Union[StandardSticker, GuildSticker]:\n        \"\"\"|coro|\n\n        Retrieves a :class:`.Sticker` with the specified ID.\n\n        .. versionadded:: 2.0\n\n        Raises\n        --------\n        HTTPException\n            Retrieving the sticker failed.\n        NotFound\n            Invalid sticker ID.\n\n        Returns\n        --------\n        Union[:class:`.StandardSticker`, :class:`.GuildSticker`]\n            The sticker you requested.\n        \"\"\"\n        data = await self.http.get_sticker(sticker_id)\n        cls, _ = _sticker_factory(data['type'])\n        # The type checker is not smart enough to figure out the constructor is correct\n        return cls(state=self._connection, data=data)  # type: ignore\n\n    async def fetch_skus(self) -> List[SKU]:\n        \"\"\"|coro|\n\n        Retrieves the bot's available SKUs.\n\n        .. versionadded:: 2.4\n\n        Raises\n        -------\n        MissingApplicationID\n            The application ID could not be found.\n        HTTPException\n            Retrieving the SKUs failed.\n\n        Returns\n        --------\n        List[:class:`.SKU`]\n            The bot's available SKUs.\n        \"\"\"\n\n        if self.application_id is None:\n            raise MissingApplicationID\n\n        data = await self.http.get_skus(self.application_id)\n        return [SKU(state=self._connection, data=sku) for sku in data]\n\n    async def fetch_entitlement(self, entitlement_id: int, /) -> Entitlement:\n        \"\"\"|coro|\n\n        Retrieves a :class:`.Entitlement` with the specified ID.\n\n        .. versionadded:: 2.4\n\n        Parameters\n        -----------\n        entitlement_id: :class:`int`\n            The entitlement's ID to fetch from.\n\n        Raises\n        -------\n        NotFound\n            An entitlement with this ID does not exist.\n        MissingApplicationID\n            The application ID could not be found.\n        HTTPException\n            Fetching the entitlement failed.\n\n        Returns\n        --------\n        :class:`.Entitlement`\n            The entitlement you requested.\n        \"\"\"\n\n        if self.application_id is None:\n            raise MissingApplicationID\n\n        data = await self.http.get_entitlement(self.application_id, entitlement_id)\n        return Entitlement(state=self._connection, data=data)\n\n    async def entitlements(\n        self,\n        *,\n        limit: Optional[int] = 100,\n        before: Optional[SnowflakeTime] = None,\n        after: Optional[SnowflakeTime] = None,\n        skus: Optional[Sequence[Snowflake]] = None,\n        user: Optional[Snowflake] = None,\n        guild: Optional[Snowflake] = None,\n        exclude_ended: bool = False,\n    ) -> AsyncIterator[Entitlement]:\n        \"\"\"Retrieves an :term:`asynchronous iterator` of the :class:`.Entitlement` that applications has.\n\n        .. versionadded:: 2.4\n\n        Examples\n        ---------\n\n        Usage ::\n\n            async for entitlement in client.entitlements(limit=100):\n                print(entitlement.user_id, entitlement.ends_at)\n\n        Flattening into a list ::\n\n            entitlements = [entitlement async for entitlement in client.entitlements(limit=100)]\n            # entitlements is now a list of Entitlement...\n\n        All parameters are optional.\n\n        Parameters\n        -----------\n        limit: Optional[:class:`int`]\n            The number of entitlements to retrieve. If ``None``, it retrieves every entitlement for this application.\n            Note, however, that this would make it a slow operation. Defaults to ``100``.\n        before: Optional[Union[:class:`~discord.abc.Snowflake`, :class:`datetime.datetime`]]\n            Retrieve entitlements before this date or entitlement.\n            If a datetime is provided, it is recommended to use a UTC aware datetime.\n            If the datetime is naive, it is assumed to be local time.\n        after: Optional[Union[:class:`~discord.abc.Snowflake`, :class:`datetime.datetime`]]\n            Retrieve entitlements after this date or entitlement.\n            If a datetime is provided, it is recommended to use a UTC aware datetime.\n            If the datetime is naive, it is assumed to be local time.\n        skus: Optional[Sequence[:class:`~discord.abc.Snowflake`]]\n            A list of SKUs to filter by.\n        user: Optional[:class:`~discord.abc.Snowflake`]\n            The user to filter by.\n        guild: Optional[:class:`~discord.abc.Snowflake`]\n            The guild to filter by.\n        exclude_ended: :class:`bool`\n            Whether to exclude ended entitlements. Defaults to ``False``.\n\n        Raises\n        -------\n        MissingApplicationID\n            The application ID could not be found.\n        HTTPException\n            Fetching the entitlements failed.\n        TypeError\n            Both ``after`` and ``before`` were provided, as Discord does not\n            support this type of pagination.\n\n        Yields\n        --------\n        :class:`.Entitlement`\n            The entitlement with the application.\n        \"\"\"\n\n        if self.application_id is None:\n            raise MissingApplicationID\n\n        if before is not None and after is not None:\n            raise TypeError('entitlements pagination does not support both before and after')\n\n        # This endpoint paginates in ascending order.\n        endpoint = self.http.get_entitlements\n\n        async def _before_strategy(retrieve: int, before: Optional[Snowflake], limit: Optional[int]):\n            before_id = before.id if before else None\n            data = await endpoint(\n                self.application_id,  # type: ignore  # We already check for None above\n                limit=retrieve,\n                before=before_id,\n                sku_ids=[sku.id for sku in skus] if skus else None,\n                user_id=user.id if user else None,\n                guild_id=guild.id if guild else None,\n                exclude_ended=exclude_ended,\n            )\n\n            if data:\n                if limit is not None:\n                    limit -= len(data)\n\n                before = Object(id=int(data[0]['id']))\n\n            return data, before, limit\n\n        async def _after_strategy(retrieve: int, after: Optional[Snowflake], limit: Optional[int]):\n            after_id = after.id if after else None\n            data = await endpoint(\n                self.application_id,  # type: ignore  # We already check for None above\n                limit=retrieve,\n                after=after_id,\n                sku_ids=[sku.id for sku in skus] if skus else None,\n                user_id=user.id if user else None,\n                guild_id=guild.id if guild else None,\n                exclude_ended=exclude_ended,\n            )\n\n            if data:\n                if limit is not None:\n                    limit -= len(data)\n\n                after = Object(id=int(data[-1]['id']))\n\n            return data, after, limit\n\n        if isinstance(before, datetime.datetime):\n            before = Object(id=utils.time_snowflake(before, high=False))\n        if isinstance(after, datetime.datetime):\n            after = Object(id=utils.time_snowflake(after, high=True))\n\n        if before:\n            strategy, state = _before_strategy, before\n        else:\n            strategy, state = _after_strategy, after\n\n        while True:\n            retrieve = 100 if limit is None else min(limit, 100)\n            if retrieve < 1:\n                return\n\n            data, state, limit = await strategy(retrieve, state, limit)\n\n            # Terminate loop on next iteration; there's no data left after this\n            if len(data) < 1000:\n                limit = 0\n\n            for e in data:\n                yield Entitlement(self._connection, e)\n\n    async def create_entitlement(\n        self,\n        sku: Snowflake,\n        owner: Snowflake,\n        owner_type: EntitlementOwnerType,\n    ) -> None:\n        \"\"\"|coro|\n\n        Creates a test :class:`.Entitlement` for the application.\n\n        .. versionadded:: 2.4\n\n        Parameters\n        -----------\n        sku: :class:`~discord.abc.Snowflake`\n            The SKU to create the entitlement for.\n        owner: :class:`~discord.abc.Snowflake`\n            The ID of the owner.\n        owner_type: :class:`.EntitlementOwnerType`\n            The type of the owner.\n\n        Raises\n        -------\n        MissingApplicationID\n            The application ID could not be found.\n        NotFound\n            The SKU or owner could not be found.\n        HTTPException\n            Creating the entitlement failed.\n        \"\"\"\n\n        if self.application_id is None:\n            raise MissingApplicationID\n\n        await self.http.create_entitlement(self.application_id, sku.id, owner.id, owner_type.value)\n\n    async def fetch_premium_sticker_packs(self) -> List[StickerPack]:\n        \"\"\"|coro|\n\n        Retrieves all available premium sticker packs.\n\n        .. versionadded:: 2.0\n\n        Raises\n        -------\n        HTTPException\n            Retrieving the sticker packs failed.\n\n        Returns\n        ---------\n        List[:class:`.StickerPack`]\n            All available premium sticker packs.\n        \"\"\"\n        data = await self.http.list_premium_sticker_packs()\n        return [StickerPack(state=self._connection, data=pack) for pack in data['sticker_packs']]\n\n    async def create_dm(self, user: Snowflake) -> DMChannel:\n        \"\"\"|coro|\n\n        Creates a :class:`.DMChannel` with this user.\n\n        This should be rarely called, as this is done transparently for most\n        people.\n\n        .. versionadded:: 2.0\n\n        Parameters\n        -----------\n        user: :class:`~discord.abc.Snowflake`\n            The user to create a DM with.\n\n        Returns\n        -------\n        :class:`.DMChannel`\n            The channel that was created.\n        \"\"\"\n        state = self._connection\n        found = state._get_private_channel_by_user(user.id)\n        if found:\n            return found\n\n        data = await state.http.start_private_message(user.id)\n        return state.add_dm_channel(data)\n\n    def add_dynamic_items(self, *items: Type[DynamicItem[Item[Any]]]) -> None:\n        r\"\"\"Registers :class:`~discord.ui.DynamicItem` classes for persistent listening.\n\n        This method accepts *class types* rather than instances.\n\n        .. versionadded:: 2.4\n\n        Parameters\n        -----------\n        \\*items: Type[:class:`~discord.ui.DynamicItem`]\n            The classes of dynamic items to add.\n\n        Raises\n        -------\n        TypeError\n            A class is not a subclass of :class:`~discord.ui.DynamicItem`.\n        \"\"\"\n\n        for item in items:\n            if not issubclass(item, DynamicItem):\n                raise TypeError(f'expected subclass of DynamicItem not {item.__name__}')\n\n        self._connection.store_dynamic_items(*items)\n\n    def remove_dynamic_items(self, *items: Type[DynamicItem[Item[Any]]]) -> None:\n        r\"\"\"Removes :class:`~discord.ui.DynamicItem` classes from persistent listening.\n\n        This method accepts *class types* rather than instances.\n\n        .. versionadded:: 2.4\n\n        Parameters\n        -----------\n        \\*items: Type[:class:`~discord.ui.DynamicItem`]\n            The classes of dynamic items to remove.\n\n        Raises\n        -------\n        TypeError\n            A class is not a subclass of :class:`~discord.ui.DynamicItem`.\n        \"\"\"\n\n        for item in items:\n            if not issubclass(item, DynamicItem):\n                raise TypeError(f'expected subclass of DynamicItem not {item.__name__}')\n\n        self._connection.remove_dynamic_items(*items)\n\n    def add_view(self, view: View, *, message_id: Optional[int] = None) -> None:\n        \"\"\"Registers a :class:`~discord.ui.View` for persistent listening.\n\n        This method should be used for when a view is comprised of components\n        that last longer than the lifecycle of the program.\n\n        .. versionadded:: 2.0\n\n        Parameters\n        ------------\n        view: :class:`discord.ui.View`\n            The view to register for dispatching.\n        message_id: Optional[:class:`int`]\n            The message ID that the view is attached to. This is currently used to\n            refresh the view's state during message update events. If not given\n            then message update events are not propagated for the view.\n\n        Raises\n        -------\n        TypeError\n            A view was not passed.\n        ValueError\n            The view is not persistent or is already finished. A persistent view has no timeout\n            and all their components have an explicitly provided custom_id.\n        \"\"\"\n\n        if not isinstance(view, View):\n            raise TypeError(f'expected an instance of View not {view.__class__.__name__}')\n\n        if not view.is_persistent():\n            raise ValueError('View is not persistent. Items need to have a custom_id set and View must have no timeout')\n\n        if view.is_finished():\n            raise ValueError('View is already finished.')\n\n        self._connection.store_view(view, message_id)\n\n    @property\n    def persistent_views(self) -> Sequence[View]:\n        \"\"\"Sequence[:class:`.View`]: A sequence of persistent views added to the client.\n\n        .. versionadded:: 2.0\n        \"\"\"\n        return self._connection.persistent_views\n"
  },
  {
    "path": "discord/colour.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\nfrom __future__ import annotations\n\nimport colorsys\nimport random\nimport re\n\nfrom typing import TYPE_CHECKING, Optional, Tuple, Union\n\nif TYPE_CHECKING:\n    from typing_extensions import Self\n\n__all__ = (\n    'Colour',\n    'Color',\n)\n\nRGB_REGEX = re.compile(r'rgb\\s*\\((?P<r>[0-9.]+%?)\\s*,\\s*(?P<g>[0-9.]+%?)\\s*,\\s*(?P<b>[0-9.]+%?)\\s*\\)')\n\n\ndef parse_hex_number(argument: str) -> Colour:\n    arg = ''.join(i * 2 for i in argument) if len(argument) == 3 else argument\n    try:\n        value = int(arg, base=16)\n        if not (0 <= value <= 0xFFFFFF):\n            raise ValueError('hex number out of range for 24-bit colour')\n    except ValueError:\n        raise ValueError('invalid hex digit given') from None\n    else:\n        return Color(value=value)\n\n\ndef parse_rgb_number(number: str) -> int:\n    if number[-1] == '%':\n        value = float(number[:-1])\n        if not (0 <= value <= 100):\n            raise ValueError('rgb percentage can only be between 0 to 100')\n        return round(255 * (value / 100))\n\n    value = int(number)\n    if not (0 <= value <= 255):\n        raise ValueError('rgb number can only be between 0 to 255')\n    return value\n\n\ndef parse_rgb(argument: str, *, regex: re.Pattern[str] = RGB_REGEX) -> Colour:\n    match = regex.match(argument)\n    if match is None:\n        raise ValueError('invalid rgb syntax found')\n\n    red = parse_rgb_number(match.group('r'))\n    green = parse_rgb_number(match.group('g'))\n    blue = parse_rgb_number(match.group('b'))\n    return Color.from_rgb(red, green, blue)\n\n\nclass Colour:\n    \"\"\"Represents a Discord role colour. This class is similar\n    to a (red, green, blue) :class:`tuple`.\n\n    There is an alias for this called Color.\n\n    .. container:: operations\n\n        .. describe:: x == y\n\n             Checks if two colours are equal.\n\n        .. describe:: x != y\n\n             Checks if two colours are not equal.\n\n        .. describe:: hash(x)\n\n             Return the colour's hash.\n\n        .. describe:: str(x)\n\n             Returns the hex format for the colour.\n\n        .. describe:: int(x)\n\n             Returns the raw colour value.\n\n    .. note::\n\n        The colour values in the classmethods are mostly provided as-is and can change between\n        versions should the Discord client's representation of that colour also change.\n\n    Attributes\n    ------------\n    value: :class:`int`\n        The raw integer colour value.\n    \"\"\"\n\n    __slots__ = ('value',)\n\n    def __init__(self, value: int):\n        if not isinstance(value, int):\n            raise TypeError(f'Expected int parameter, received {value.__class__.__name__} instead.')\n\n        self.value: int = value\n\n    def _get_byte(self, byte: int) -> int:\n        return (self.value >> (8 * byte)) & 0xFF\n\n    def __eq__(self, other: object) -> bool:\n        return isinstance(other, Colour) and self.value == other.value\n\n    def __ne__(self, other: object) -> bool:\n        return not self.__eq__(other)\n\n    def __str__(self) -> str:\n        return f'#{self.value:0>6x}'\n\n    def __int__(self) -> int:\n        return self.value\n\n    def __repr__(self) -> str:\n        return f'<Colour value={self.value}>'\n\n    def __hash__(self) -> int:\n        return hash(self.value)\n\n    @property\n    def r(self) -> int:\n        \"\"\":class:`int`: Returns the red component of the colour.\"\"\"\n        return self._get_byte(2)\n\n    @property\n    def g(self) -> int:\n        \"\"\":class:`int`: Returns the green component of the colour.\"\"\"\n        return self._get_byte(1)\n\n    @property\n    def b(self) -> int:\n        \"\"\":class:`int`: Returns the blue component of the colour.\"\"\"\n        return self._get_byte(0)\n\n    def to_rgb(self) -> Tuple[int, int, int]:\n        \"\"\"Tuple[:class:`int`, :class:`int`, :class:`int`]: Returns an (r, g, b) tuple representing the colour.\"\"\"\n        return (self.r, self.g, self.b)\n\n    @classmethod\n    def from_rgb(cls, r: int, g: int, b: int) -> Self:\n        \"\"\"Constructs a :class:`Colour` from an RGB tuple.\"\"\"\n        return cls((r << 16) + (g << 8) + b)\n\n    @classmethod\n    def from_hsv(cls, h: float, s: float, v: float) -> Self:\n        \"\"\"Constructs a :class:`Colour` from an HSV tuple.\"\"\"\n        rgb = colorsys.hsv_to_rgb(h, s, v)\n        return cls.from_rgb(*(int(x * 255) for x in rgb))\n\n    @classmethod\n    def from_str(cls, value: str) -> Colour:\n        \"\"\"Constructs a :class:`Colour` from a string.\n\n        The following formats are accepted:\n\n        - ``0x<hex>``\n        - ``#<hex>``\n        - ``0x#<hex>``\n        - ``rgb(<number>, <number>, <number>)``\n\n        Like CSS, ``<number>`` can be either 0-255 or 0-100% and ``<hex>`` can be\n        either a 6 digit hex number or a 3 digit hex shortcut (e.g. #FFF).\n\n        .. versionadded:: 2.0\n\n        Raises\n        -------\n        ValueError\n            The string could not be converted into a colour.\n        \"\"\"\n\n        if not value:\n            raise ValueError('unknown colour format given')\n\n        if value[0] == '#':\n            return parse_hex_number(value[1:])\n\n        if value[0:2] == '0x':\n            rest = value[2:]\n            # Legacy backwards compatible syntax\n            if rest.startswith('#'):\n                return parse_hex_number(rest[1:])\n            return parse_hex_number(rest)\n\n        arg = value.lower()\n        if arg[0:3] == 'rgb':\n            return parse_rgb(arg)\n\n        raise ValueError('unknown colour format given')\n\n    @classmethod\n    def default(cls) -> Self:\n        \"\"\"A factory method that returns a :class:`Colour` with a value of ``0``.\n\n        .. colour:: #000000\n        \"\"\"\n        return cls(0)\n\n    @classmethod\n    def random(cls, *, seed: Optional[Union[int, str, float, bytes, bytearray]] = None) -> Self:\n        \"\"\"A factory method that returns a :class:`Colour` with a random hue.\n\n        .. note::\n\n            The random algorithm works by choosing a colour with a random hue but\n            with maxed out saturation and value.\n\n        .. versionadded:: 1.6\n\n        Parameters\n        ------------\n        seed: Optional[Union[:class:`int`, :class:`str`, :class:`float`, :class:`bytes`, :class:`bytearray`]]\n            The seed to initialize the RNG with. If ``None`` is passed the default RNG is used.\n\n            .. versionadded:: 1.7\n        \"\"\"\n        rand = random if seed is None else random.Random(seed)\n        return cls.from_hsv(rand.random(), 1, 1)\n\n    @classmethod\n    def teal(cls) -> Self:\n        \"\"\"A factory method that returns a :class:`Colour` with a value of ``0x1ABC9C``.\n\n        .. colour:: #1ABC9C\n        \"\"\"\n        return cls(0x1ABC9C)\n\n    @classmethod\n    def dark_teal(cls) -> Self:\n        \"\"\"A factory method that returns a :class:`Colour` with a value of ``0x11806A``.\n\n        .. colour:: #11806A\n        \"\"\"\n        return cls(0x11806A)\n\n    @classmethod\n    def brand_green(cls) -> Self:\n        \"\"\"A factory method that returns a :class:`Colour` with a value of ``0x57F287``.\n\n        .. colour:: #57F287\n\n\n        .. versionadded:: 2.0\n        \"\"\"\n        return cls(0x57F287)\n\n    @classmethod\n    def green(cls) -> Self:\n        \"\"\"A factory method that returns a :class:`Colour` with a value of ``0x2ECC71``.\n\n        .. colour:: #2ECC71\n        \"\"\"\n        return cls(0x2ECC71)\n\n    @classmethod\n    def dark_green(cls) -> Self:\n        \"\"\"A factory method that returns a :class:`Colour` with a value of ``0x1F8B4C``.\n\n        .. colour:: #1F8B4C\n        \"\"\"\n        return cls(0x1F8B4C)\n\n    @classmethod\n    def blue(cls) -> Self:\n        \"\"\"A factory method that returns a :class:`Colour` with a value of ``0x3498DB``.\n\n        .. colour:: #3498DB\n        \"\"\"\n        return cls(0x3498DB)\n\n    @classmethod\n    def dark_blue(cls) -> Self:\n        \"\"\"A factory method that returns a :class:`Colour` with a value of ``0x206694``.\n\n        .. colour:: #206694\n        \"\"\"\n        return cls(0x206694)\n\n    @classmethod\n    def purple(cls) -> Self:\n        \"\"\"A factory method that returns a :class:`Colour` with a value of ``0x9B59B6``.\n\n        .. colour:: #9B59B6\n        \"\"\"\n        return cls(0x9B59B6)\n\n    @classmethod\n    def dark_purple(cls) -> Self:\n        \"\"\"A factory method that returns a :class:`Colour` with a value of ``0x71368A``.\n\n        .. colour:: #71368A\n        \"\"\"\n        return cls(0x71368A)\n\n    @classmethod\n    def magenta(cls) -> Self:\n        \"\"\"A factory method that returns a :class:`Colour` with a value of ``0xE91E63``.\n\n        .. colour:: #E91E63\n        \"\"\"\n        return cls(0xE91E63)\n\n    @classmethod\n    def dark_magenta(cls) -> Self:\n        \"\"\"A factory method that returns a :class:`Colour` with a value of ``0xAD1457``.\n\n        .. colour:: #AD1457\n        \"\"\"\n        return cls(0xAD1457)\n\n    @classmethod\n    def gold(cls) -> Self:\n        \"\"\"A factory method that returns a :class:`Colour` with a value of ``0xF1C40F``.\n\n        .. colour:: #F1C40F\n        \"\"\"\n        return cls(0xF1C40F)\n\n    @classmethod\n    def dark_gold(cls) -> Self:\n        \"\"\"A factory method that returns a :class:`Colour` with a value of ``0xC27C0E``.\n\n        .. colour:: #C27C0E\n        \"\"\"\n        return cls(0xC27C0E)\n\n    @classmethod\n    def orange(cls) -> Self:\n        \"\"\"A factory method that returns a :class:`Colour` with a value of ``0xE67E22``.\n\n        .. colour:: #E67E22\n        \"\"\"\n        return cls(0xE67E22)\n\n    @classmethod\n    def dark_orange(cls) -> Self:\n        \"\"\"A factory method that returns a :class:`Colour` with a value of ``0xA84300``.\n\n        .. colour:: #A84300\n        \"\"\"\n        return cls(0xA84300)\n\n    @classmethod\n    def brand_red(cls) -> Self:\n        \"\"\"A factory method that returns a :class:`Colour` with a value of ``0xED4245``.\n\n        .. colour:: #ED4245\n\n        .. versionadded:: 2.0\n        \"\"\"\n        return cls(0xED4245)\n\n    @classmethod\n    def red(cls) -> Self:\n        \"\"\"A factory method that returns a :class:`Colour` with a value of ``0xE74C3C``.\n\n        .. colour:: #E74C3C\n        \"\"\"\n        return cls(0xE74C3C)\n\n    @classmethod\n    def dark_red(cls) -> Self:\n        \"\"\"A factory method that returns a :class:`Colour` with a value of ``0x992D22``.\n\n        .. colour:: #992D22\n        \"\"\"\n        return cls(0x992D22)\n\n    @classmethod\n    def lighter_grey(cls) -> Self:\n        \"\"\"A factory method that returns a :class:`Colour` with a value of ``0x95A5A6``.\n\n        .. colour:: #95A5A6\n        \"\"\"\n        return cls(0x95A5A6)\n\n    lighter_gray = lighter_grey\n\n    @classmethod\n    def dark_grey(cls) -> Self:\n        \"\"\"A factory method that returns a :class:`Colour` with a value of ``0x607d8b``.\n\n        .. colour:: #607d8b\n        \"\"\"\n        return cls(0x607D8B)\n\n    dark_gray = dark_grey\n\n    @classmethod\n    def light_grey(cls) -> Self:\n        \"\"\"A factory method that returns a :class:`Colour` with a value of ``0x979C9F``.\n\n        .. colour:: #979C9F\n        \"\"\"\n        return cls(0x979C9F)\n\n    light_gray = light_grey\n\n    @classmethod\n    def darker_grey(cls) -> Self:\n        \"\"\"A factory method that returns a :class:`Colour` with a value of ``0x546E7A``.\n\n        .. colour:: #546E7A\n        \"\"\"\n        return cls(0x546E7A)\n\n    darker_gray = darker_grey\n\n    @classmethod\n    def og_blurple(cls) -> Self:\n        \"\"\"A factory method that returns a :class:`Colour` with a value of ``0x7289DA``.\n\n        .. colour:: #7289DA\n        \"\"\"\n        return cls(0x7289DA)\n\n    @classmethod\n    def blurple(cls) -> Self:\n        \"\"\"A factory method that returns a :class:`Colour` with a value of ``0x5865F2``.\n\n        .. colour:: #5865F2\n        \"\"\"\n        return cls(0x5865F2)\n\n    @classmethod\n    def greyple(cls) -> Self:\n        \"\"\"A factory method that returns a :class:`Colour` with a value of ``0x99AAB5``.\n\n        .. colour:: #99AAB5\n        \"\"\"\n        return cls(0x99AAB5)\n\n    @classmethod\n    def dark_theme(cls) -> Self:\n        \"\"\"A factory method that returns a :class:`Colour` with a value of ``0x313338``.\n\n        This will appear transparent on Discord's dark theme.\n\n        .. colour:: #313338\n\n        .. versionadded:: 1.5\n\n        .. versionchanged:: 2.2\n            Updated colour from previous ``0x36393F`` to reflect discord theme changes.\n        \"\"\"\n        return cls(0x313338)\n\n    @classmethod\n    def fuchsia(cls) -> Self:\n        \"\"\"A factory method that returns a :class:`Colour` with a value of ``0xEB459E``.\n\n        .. colour:: #EB459E\n\n        .. versionadded:: 2.0\n        \"\"\"\n        return cls(0xEB459E)\n\n    @classmethod\n    def yellow(cls) -> Self:\n        \"\"\"A factory method that returns a :class:`Colour` with a value of ``0xFEE75C``.\n\n        .. colour:: #FEE75C\n\n        .. versionadded:: 2.0\n        \"\"\"\n        return cls(0xFEE75C)\n\n    @classmethod\n    def dark_embed(cls) -> Self:\n        \"\"\"A factory method that returns a :class:`Colour` with a value of ``0x2B2D31``.\n\n        .. colour:: #2B2D31\n\n        .. versionadded:: 2.2\n        \"\"\"\n        return cls(0x2B2D31)\n\n    @classmethod\n    def light_embed(cls) -> Self:\n        \"\"\"A factory method that returns a :class:`Colour` with a value of ``0xEEEFF1``.\n\n        .. colour:: #EEEFF1\n\n        .. versionadded:: 2.2\n        \"\"\"\n        return cls(0xEEEFF1)\n\n    @classmethod\n    def pink(cls) -> Self:\n        \"\"\"A factory method that returns a :class:`Colour` with a value of ``0xEB459F``.\n\n        .. colour:: #EB459F\n\n        .. versionadded:: 2.3\n        \"\"\"\n        return cls(0xEB459F)\n\n\nColor = Colour\n"
  },
  {
    "path": "discord/components.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom __future__ import annotations\n\nfrom typing import ClassVar, List, Literal, Optional, TYPE_CHECKING, Tuple, Union, overload\nfrom .enums import try_enum, ComponentType, ButtonStyle, TextStyle, ChannelType, SelectDefaultValueType\nfrom .utils import get_slots, MISSING\nfrom .partial_emoji import PartialEmoji, _EmojiTag\n\nif TYPE_CHECKING:\n    from typing_extensions import Self\n\n    from .types.components import (\n        Component as ComponentPayload,\n        ButtonComponent as ButtonComponentPayload,\n        SelectMenu as SelectMenuPayload,\n        SelectOption as SelectOptionPayload,\n        ActionRow as ActionRowPayload,\n        TextInput as TextInputPayload,\n        ActionRowChildComponent as ActionRowChildComponentPayload,\n        SelectDefaultValues as SelectDefaultValuesPayload,\n    )\n    from .emoji import Emoji\n    from .abc import Snowflake\n\n    ActionRowChildComponentType = Union['Button', 'SelectMenu', 'TextInput']\n\n\n__all__ = (\n    'Component',\n    'ActionRow',\n    'Button',\n    'SelectMenu',\n    'SelectOption',\n    'TextInput',\n    'SelectDefaultValue',\n)\n\n\nclass Component:\n    \"\"\"Represents a Discord Bot UI Kit Component.\n\n    Currently, the only components supported by Discord are:\n\n    - :class:`ActionRow`\n    - :class:`Button`\n    - :class:`SelectMenu`\n    - :class:`TextInput`\n\n    This class is abstract and cannot be instantiated.\n\n    .. versionadded:: 2.0\n    \"\"\"\n\n    __slots__: Tuple[str, ...] = ()\n\n    __repr_info__: ClassVar[Tuple[str, ...]]\n\n    def __repr__(self) -> str:\n        attrs = ' '.join(f'{key}={getattr(self, key)!r}' for key in self.__repr_info__)\n        return f'<{self.__class__.__name__} {attrs}>'\n\n    @property\n    def type(self) -> ComponentType:\n        \"\"\":class:`ComponentType`: The type of component.\"\"\"\n        raise NotImplementedError\n\n    @classmethod\n    def _raw_construct(cls, **kwargs) -> Self:\n        self = cls.__new__(cls)\n        for slot in get_slots(cls):\n            try:\n                value = kwargs[slot]\n            except KeyError:\n                pass\n            else:\n                setattr(self, slot, value)\n        return self\n\n    def to_dict(self) -> ComponentPayload:\n        raise NotImplementedError\n\n\nclass ActionRow(Component):\n    \"\"\"Represents a Discord Bot UI Kit Action Row.\n\n    This is a component that holds up to 5 children components in a row.\n\n    This inherits from :class:`Component`.\n\n    .. versionadded:: 2.0\n\n    Attributes\n    ------------\n    children: List[Union[:class:`Button`, :class:`SelectMenu`, :class:`TextInput`]]\n        The children components that this holds, if any.\n    \"\"\"\n\n    __slots__: Tuple[str, ...] = ('children',)\n\n    __repr_info__: ClassVar[Tuple[str, ...]] = __slots__\n\n    def __init__(self, data: ActionRowPayload, /) -> None:\n        self.children: List[ActionRowChildComponentType] = []\n\n        for component_data in data.get('components', []):\n            component = _component_factory(component_data)\n\n            if component is not None:\n                self.children.append(component)\n\n    @property\n    def type(self) -> Literal[ComponentType.action_row]:\n        \"\"\":class:`ComponentType`: The type of component.\"\"\"\n        return ComponentType.action_row\n\n    def to_dict(self) -> ActionRowPayload:\n        return {\n            'type': self.type.value,\n            'components': [child.to_dict() for child in self.children],\n        }\n\n\nclass Button(Component):\n    \"\"\"Represents a button from the Discord Bot UI Kit.\n\n    This inherits from :class:`Component`.\n\n    .. note::\n\n        The user constructible and usable type to create a button is :class:`discord.ui.Button`\n        not this one.\n\n    .. versionadded:: 2.0\n\n    Attributes\n    -----------\n    style: :class:`.ButtonStyle`\n        The style of the button.\n    custom_id: Optional[:class:`str`]\n        The ID of the button that gets received during an interaction.\n        If this button is for a URL, it does not have a custom ID.\n    url: Optional[:class:`str`]\n        The URL this button sends you to.\n    disabled: :class:`bool`\n        Whether the button is disabled or not.\n    label: Optional[:class:`str`]\n        The label of the button, if any.\n    emoji: Optional[:class:`PartialEmoji`]\n        The emoji of the button, if available.\n    sku_id: Optional[:class:`int`]\n        The SKU ID this button sends you to, if available.\n\n        .. versionadded:: 2.4\n    \"\"\"\n\n    __slots__: Tuple[str, ...] = (\n        'style',\n        'custom_id',\n        'url',\n        'disabled',\n        'label',\n        'emoji',\n        'sku_id',\n    )\n\n    __repr_info__: ClassVar[Tuple[str, ...]] = __slots__\n\n    def __init__(self, data: ButtonComponentPayload, /) -> None:\n        self.style: ButtonStyle = try_enum(ButtonStyle, data['style'])\n        self.custom_id: Optional[str] = data.get('custom_id')\n        self.url: Optional[str] = data.get('url')\n        self.disabled: bool = data.get('disabled', False)\n        self.label: Optional[str] = data.get('label')\n        self.emoji: Optional[PartialEmoji]\n        try:\n            self.emoji = PartialEmoji.from_dict(data['emoji'])\n        except KeyError:\n            self.emoji = None\n\n        try:\n            self.sku_id: Optional[int] = int(data['sku_id'])\n        except KeyError:\n            self.sku_id = None\n\n    @property\n    def type(self) -> Literal[ComponentType.button]:\n        \"\"\":class:`ComponentType`: The type of component.\"\"\"\n        return ComponentType.button\n\n    def to_dict(self) -> ButtonComponentPayload:\n        payload: ButtonComponentPayload = {\n            'type': 2,\n            'style': self.style.value,\n            'disabled': self.disabled,\n        }\n\n        if self.sku_id:\n            payload['sku_id'] = str(self.sku_id)\n\n        if self.label:\n            payload['label'] = self.label\n\n        if self.custom_id:\n            payload['custom_id'] = self.custom_id\n\n        if self.url:\n            payload['url'] = self.url\n\n        if self.emoji:\n            payload['emoji'] = self.emoji.to_dict()\n\n        return payload\n\n\nclass SelectMenu(Component):\n    \"\"\"Represents a select menu from the Discord Bot UI Kit.\n\n    A select menu is functionally the same as a dropdown, however\n    on mobile it renders a bit differently.\n\n    .. note::\n\n        The user constructible and usable type to create a select menu is\n        :class:`discord.ui.Select` not this one.\n\n    .. versionadded:: 2.0\n\n    Attributes\n    ------------\n    type: :class:`ComponentType`\n        The type of component.\n    custom_id: Optional[:class:`str`]\n        The ID of the select menu that gets received during an interaction.\n    placeholder: Optional[:class:`str`]\n        The placeholder text that is shown if nothing is selected, if any.\n    min_values: :class:`int`\n        The minimum number of items that must be chosen for this select menu.\n        Defaults to 1 and must be between 0 and 25.\n    max_values: :class:`int`\n        The maximum number of items that must be chosen for this select menu.\n        Defaults to 1 and must be between 1 and 25.\n    options: List[:class:`SelectOption`]\n        A list of options that can be selected in this menu.\n    disabled: :class:`bool`\n        Whether the select is disabled or not.\n    channel_types: List[:class:`.ChannelType`]\n        A list of channel types that are allowed to be chosen in this select menu.\n    \"\"\"\n\n    __slots__: Tuple[str, ...] = (\n        'type',\n        'custom_id',\n        'placeholder',\n        'min_values',\n        'max_values',\n        'options',\n        'disabled',\n        'channel_types',\n        'default_values',\n    )\n\n    __repr_info__: ClassVar[Tuple[str, ...]] = __slots__\n\n    def __init__(self, data: SelectMenuPayload, /) -> None:\n        self.type: ComponentType = try_enum(ComponentType, data['type'])\n        self.custom_id: str = data['custom_id']\n        self.placeholder: Optional[str] = data.get('placeholder')\n        self.min_values: int = data.get('min_values', 1)\n        self.max_values: int = data.get('max_values', 1)\n        self.options: List[SelectOption] = [SelectOption.from_dict(option) for option in data.get('options', [])]\n        self.disabled: bool = data.get('disabled', False)\n        self.channel_types: List[ChannelType] = [try_enum(ChannelType, t) for t in data.get('channel_types', [])]\n        self.default_values: List[SelectDefaultValue] = [\n            SelectDefaultValue.from_dict(d) for d in data.get('default_values', [])\n        ]\n\n    def to_dict(self) -> SelectMenuPayload:\n        payload: SelectMenuPayload = {\n            'type': self.type.value,  # type: ignore # we know this is a select menu.\n            'custom_id': self.custom_id,\n            'min_values': self.min_values,\n            'max_values': self.max_values,\n            'disabled': self.disabled,\n        }\n        if self.placeholder:\n            payload['placeholder'] = self.placeholder\n        if self.options:\n            payload['options'] = [op.to_dict() for op in self.options]\n        if self.channel_types:\n            payload['channel_types'] = [t.value for t in self.channel_types]\n        if self.default_values:\n            payload[\"default_values\"] = [v.to_dict() for v in self.default_values]\n\n        return payload\n\n\nclass SelectOption:\n    \"\"\"Represents a select menu's option.\n\n    These can be created by users.\n\n    .. versionadded:: 2.0\n\n    Parameters\n    -----------\n    label: :class:`str`\n        The label of the option. This is displayed to users.\n        Can only be up to 100 characters.\n    value: :class:`str`\n        The value of the option. This is not displayed to users.\n        If not provided when constructed then it defaults to the label.\n        Can only be up to 100 characters.\n    description: Optional[:class:`str`]\n        An additional description of the option, if any.\n        Can only be up to 100 characters.\n    emoji: Optional[Union[:class:`str`, :class:`Emoji`, :class:`PartialEmoji`]]\n        The emoji of the option, if available.\n    default: :class:`bool`\n        Whether this option is selected by default.\n\n    Attributes\n    -----------\n    label: :class:`str`\n        The label of the option. This is displayed to users.\n    value: :class:`str`\n        The value of the option. This is not displayed to users.\n        If not provided when constructed then it defaults to the\n        label.\n    description: Optional[:class:`str`]\n        An additional description of the option, if any.\n    default: :class:`bool`\n        Whether this option is selected by default.\n    \"\"\"\n\n    __slots__: Tuple[str, ...] = (\n        'label',\n        'value',\n        'description',\n        '_emoji',\n        'default',\n    )\n\n    def __init__(\n        self,\n        *,\n        label: str,\n        value: str = MISSING,\n        description: Optional[str] = None,\n        emoji: Optional[Union[str, Emoji, PartialEmoji]] = None,\n        default: bool = False,\n    ) -> None:\n        self.label: str = label\n        self.value: str = label if value is MISSING else value\n        self.description: Optional[str] = description\n\n        self.emoji = emoji\n        self.default: bool = default\n\n    def __repr__(self) -> str:\n        return (\n            f'<SelectOption label={self.label!r} value={self.value!r} description={self.description!r} '\n            f'emoji={self.emoji!r} default={self.default!r}>'\n        )\n\n    def __str__(self) -> str:\n        if self.emoji:\n            base = f'{self.emoji} {self.label}'\n        else:\n            base = self.label\n\n        if self.description:\n            return f'{base}\\n{self.description}'\n        return base\n\n    @property\n    def emoji(self) -> Optional[PartialEmoji]:\n        \"\"\"Optional[:class:`.PartialEmoji`]: The emoji of the option, if available.\"\"\"\n        return self._emoji\n\n    @emoji.setter\n    def emoji(self, value: Optional[Union[str, Emoji, PartialEmoji]]) -> None:\n        if value is not None:\n            if isinstance(value, str):\n                self._emoji = PartialEmoji.from_str(value)\n            elif isinstance(value, _EmojiTag):\n                self._emoji = value._to_partial()\n            else:\n                raise TypeError(f'expected str, Emoji, or PartialEmoji, received {value.__class__.__name__} instead')\n        else:\n            self._emoji = None\n\n    @classmethod\n    def from_dict(cls, data: SelectOptionPayload) -> SelectOption:\n        try:\n            emoji = PartialEmoji.from_dict(data['emoji'])\n        except KeyError:\n            emoji = None\n\n        return cls(\n            label=data['label'],\n            value=data['value'],\n            description=data.get('description'),\n            emoji=emoji,\n            default=data.get('default', False),\n        )\n\n    def to_dict(self) -> SelectOptionPayload:\n        payload: SelectOptionPayload = {\n            'label': self.label,\n            'value': self.value,\n            'default': self.default,\n        }\n\n        if self.emoji:\n            payload['emoji'] = self.emoji.to_dict()\n\n        if self.description:\n            payload['description'] = self.description\n\n        return payload\n\n\nclass TextInput(Component):\n    \"\"\"Represents a text input from the Discord Bot UI Kit.\n\n    .. note::\n        The user constructible and usable type to create a text input is\n        :class:`discord.ui.TextInput` not this one.\n\n    .. versionadded:: 2.0\n\n    Attributes\n    ------------\n    custom_id: Optional[:class:`str`]\n        The ID of the text input that gets received during an interaction.\n    label: :class:`str`\n        The label to display above the text input.\n    style: :class:`TextStyle`\n        The style of the text input.\n    placeholder: Optional[:class:`str`]\n        The placeholder text to display when the text input is empty.\n    value: Optional[:class:`str`]\n        The default value of the text input.\n    required: :class:`bool`\n        Whether the text input is required.\n    min_length: Optional[:class:`int`]\n        The minimum length of the text input.\n    max_length: Optional[:class:`int`]\n        The maximum length of the text input.\n    \"\"\"\n\n    __slots__: Tuple[str, ...] = (\n        'style',\n        'label',\n        'custom_id',\n        'placeholder',\n        'value',\n        'required',\n        'min_length',\n        'max_length',\n    )\n\n    __repr_info__: ClassVar[Tuple[str, ...]] = __slots__\n\n    def __init__(self, data: TextInputPayload, /) -> None:\n        self.style: TextStyle = try_enum(TextStyle, data['style'])\n        self.label: str = data['label']\n        self.custom_id: str = data['custom_id']\n        self.placeholder: Optional[str] = data.get('placeholder')\n        self.value: Optional[str] = data.get('value')\n        self.required: bool = data.get('required', True)\n        self.min_length: Optional[int] = data.get('min_length')\n        self.max_length: Optional[int] = data.get('max_length')\n\n    @property\n    def type(self) -> Literal[ComponentType.text_input]:\n        \"\"\":class:`ComponentType`: The type of component.\"\"\"\n        return ComponentType.text_input\n\n    def to_dict(self) -> TextInputPayload:\n        payload: TextInputPayload = {\n            'type': self.type.value,\n            'style': self.style.value,\n            'label': self.label,\n            'custom_id': self.custom_id,\n            'required': self.required,\n        }\n\n        if self.placeholder:\n            payload['placeholder'] = self.placeholder\n\n        if self.value:\n            payload['value'] = self.value\n\n        if self.min_length:\n            payload['min_length'] = self.min_length\n\n        if self.max_length:\n            payload['max_length'] = self.max_length\n\n        return payload\n\n    @property\n    def default(self) -> Optional[str]:\n        \"\"\"Optional[:class:`str`]: The default value of the text input.\n\n        This is an alias to :attr:`value`.\n        \"\"\"\n        return self.value\n\n\nclass SelectDefaultValue:\n    \"\"\"Represents a select menu's default value.\n\n    These can be created by users.\n\n    .. versionadded:: 2.4\n\n    Parameters\n    -----------\n    id: :class:`int`\n        The id of a role, user, or channel.\n    type: :class:`SelectDefaultValueType`\n        The type of value that ``id`` represents.\n    \"\"\"\n\n    def __init__(\n        self,\n        *,\n        id: int,\n        type: SelectDefaultValueType,\n    ) -> None:\n        self.id: int = id\n        self._type: SelectDefaultValueType = type\n\n    @property\n    def type(self) -> SelectDefaultValueType:\n        \"\"\":class:`SelectDefaultValueType`: The type of value that ``id`` represents.\"\"\"\n        return self._type\n\n    @type.setter\n    def type(self, value: SelectDefaultValueType) -> None:\n        if not isinstance(value, SelectDefaultValueType):\n            raise TypeError(f'expected SelectDefaultValueType, received {value.__class__.__name__} instead')\n\n        self._type = value\n\n    def __repr__(self) -> str:\n        return f'<SelectDefaultValue id={self.id!r} type={self.type!r}>'\n\n    @classmethod\n    def from_dict(cls, data: SelectDefaultValuesPayload) -> SelectDefaultValue:\n        return cls(\n            id=data['id'],\n            type=try_enum(SelectDefaultValueType, data['type']),\n        )\n\n    def to_dict(self) -> SelectDefaultValuesPayload:\n        return {\n            'id': self.id,\n            'type': self._type.value,\n        }\n\n    @classmethod\n    def from_channel(cls, channel: Snowflake, /) -> Self:\n        \"\"\"Creates a :class:`SelectDefaultValue` with the type set to :attr:`~SelectDefaultValueType.channel`.\n\n        Parameters\n        -----------\n        channel: :class:`~discord.abc.Snowflake`\n            The channel to create the default value for.\n\n        Returns\n        --------\n        :class:`SelectDefaultValue`\n            The default value created with the channel.\n        \"\"\"\n        return cls(\n            id=channel.id,\n            type=SelectDefaultValueType.channel,\n        )\n\n    @classmethod\n    def from_role(cls, role: Snowflake, /) -> Self:\n        \"\"\"Creates a :class:`SelectDefaultValue` with the type set to :attr:`~SelectDefaultValueType.role`.\n\n        Parameters\n        -----------\n        role: :class:`~discord.abc.Snowflake`\n            The role to create the default value for.\n\n        Returns\n        --------\n        :class:`SelectDefaultValue`\n            The default value created with the role.\n        \"\"\"\n        return cls(\n            id=role.id,\n            type=SelectDefaultValueType.role,\n        )\n\n    @classmethod\n    def from_user(cls, user: Snowflake, /) -> Self:\n        \"\"\"Creates a :class:`SelectDefaultValue` with the type set to :attr:`~SelectDefaultValueType.user`.\n\n        Parameters\n        -----------\n        user: :class:`~discord.abc.Snowflake`\n            The user to create the default value for.\n\n        Returns\n        --------\n        :class:`SelectDefaultValue`\n            The default value created with the user.\n        \"\"\"\n        return cls(\n            id=user.id,\n            type=SelectDefaultValueType.user,\n        )\n\n\n@overload\ndef _component_factory(data: ActionRowChildComponentPayload) -> Optional[ActionRowChildComponentType]:\n    ...\n\n\n@overload\ndef _component_factory(data: ComponentPayload) -> Optional[Union[ActionRow, ActionRowChildComponentType]]:\n    ...\n\n\ndef _component_factory(data: ComponentPayload) -> Optional[Union[ActionRow, ActionRowChildComponentType]]:\n    if data['type'] == 1:\n        return ActionRow(data)\n    elif data['type'] == 2:\n        return Button(data)\n    elif data['type'] == 4:\n        return TextInput(data)\n    elif data['type'] in (3, 5, 6, 7, 8):\n        return SelectMenu(data)\n"
  },
  {
    "path": "discord/context_managers.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom __future__ import annotations\n\nimport asyncio\nfrom typing import TYPE_CHECKING, Generator, Optional, Type, TypeVar\n\nif TYPE_CHECKING:\n    from .abc import Messageable, MessageableChannel\n\n    from types import TracebackType\n\n    BE = TypeVar('BE', bound=BaseException)\n\n# fmt: off\n__all__ = (\n    'Typing',\n)\n# fmt: on\n\n\ndef _typing_done_callback(fut: asyncio.Future) -> None:\n    # just retrieve any exception and call it a day\n    try:\n        fut.exception()\n    except (asyncio.CancelledError, Exception):\n        pass\n\n\nclass Typing:\n    def __init__(self, messageable: Messageable) -> None:\n        self.loop: asyncio.AbstractEventLoop = messageable._state.loop\n        self.messageable: Messageable = messageable\n        self.channel: Optional[MessageableChannel] = None\n\n    async def _get_channel(self) -> MessageableChannel:\n        if self.channel:\n            return self.channel\n\n        self.channel = channel = await self.messageable._get_channel()\n        return channel\n\n    async def wrapped_typer(self) -> None:\n        channel = await self._get_channel()\n        await channel._state.http.send_typing(channel.id)\n\n    def __await__(self) -> Generator[None, None, None]:\n        return self.wrapped_typer().__await__()\n\n    async def do_typing(self) -> None:\n        channel = await self._get_channel()\n        typing = channel._state.http.send_typing\n\n        while True:\n            await asyncio.sleep(5)\n            await typing(channel.id)\n\n    async def __aenter__(self) -> None:\n        channel = await self._get_channel()\n        await channel._state.http.send_typing(channel.id)\n        self.task: asyncio.Task[None] = self.loop.create_task(self.do_typing())\n        self.task.add_done_callback(_typing_done_callback)\n\n    async def __aexit__(\n        self,\n        exc_type: Optional[Type[BE]],\n        exc: Optional[BE],\n        traceback: Optional[TracebackType],\n    ) -> None:\n        self.task.cancel()\n"
  },
  {
    "path": "discord/embeds.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom __future__ import annotations\n\nimport datetime\nfrom typing import Any, Dict, List, Mapping, Optional, Protocol, TYPE_CHECKING, TypeVar, Union\n\nfrom . import utils\nfrom .colour import Colour\n\n# fmt: off\n__all__ = (\n    'Embed',\n)\n# fmt: on\n\n\nclass EmbedProxy:\n    def __init__(self, layer: Dict[str, Any]):\n        self.__dict__.update(layer)\n\n    def __len__(self) -> int:\n        return len(self.__dict__)\n\n    def __repr__(self) -> str:\n        inner = ', '.join((f'{k}={v!r}' for k, v in self.__dict__.items() if not k.startswith('_')))\n        return f'EmbedProxy({inner})'\n\n    def __getattr__(self, attr: str) -> None:\n        return None\n\n    def __eq__(self, other: object) -> bool:\n        return isinstance(other, EmbedProxy) and self.__dict__ == other.__dict__\n\n\nif TYPE_CHECKING:\n    from typing_extensions import Self\n\n    from .types.embed import Embed as EmbedData, EmbedType\n\n    T = TypeVar('T')\n\n    class _EmbedFooterProxy(Protocol):\n        text: Optional[str]\n        icon_url: Optional[str]\n\n    class _EmbedFieldProxy(Protocol):\n        name: Optional[str]\n        value: Optional[str]\n        inline: bool\n\n    class _EmbedMediaProxy(Protocol):\n        url: Optional[str]\n        proxy_url: Optional[str]\n        height: Optional[int]\n        width: Optional[int]\n\n    class _EmbedVideoProxy(Protocol):\n        url: Optional[str]\n        height: Optional[int]\n        width: Optional[int]\n\n    class _EmbedProviderProxy(Protocol):\n        name: Optional[str]\n        url: Optional[str]\n\n    class _EmbedAuthorProxy(Protocol):\n        name: Optional[str]\n        url: Optional[str]\n        icon_url: Optional[str]\n        proxy_icon_url: Optional[str]\n\n\nclass Embed:\n    \"\"\"Represents a Discord embed.\n\n    .. container:: operations\n\n        .. describe:: len(x)\n\n            Returns the total size of the embed.\n            Useful for checking if it's within the 6000 character limit.\n\n        .. describe:: bool(b)\n\n            Returns whether the embed has any data set.\n\n            .. versionadded:: 2.0\n\n        .. describe:: x == y\n\n            Checks if two embeds are equal.\n\n            .. versionadded:: 2.0\n\n    For ease of use, all parameters that expect a :class:`str` are implicitly\n    casted to :class:`str` for you.\n\n    .. versionchanged:: 2.0\n        ``Embed.Empty`` has been removed in favour of ``None``.\n\n    Attributes\n    -----------\n    title: Optional[:class:`str`]\n        The title of the embed.\n        This can be set during initialisation.\n        Can only be up to 256 characters.\n    type: :class:`str`\n        The type of embed. Usually \"rich\".\n        This can be set during initialisation.\n        Possible strings for embed types can be found on discord's\n        :ddocs:`api docs <resources/channel#embed-object-embed-types>`\n    description: Optional[:class:`str`]\n        The description of the embed.\n        This can be set during initialisation.\n        Can only be up to 4096 characters.\n    url: Optional[:class:`str`]\n        The URL of the embed.\n        This can be set during initialisation.\n    timestamp: Optional[:class:`datetime.datetime`]\n        The timestamp of the embed content. This is an aware datetime.\n        If a naive datetime is passed, it is converted to an aware\n        datetime with the local timezone.\n    colour: Optional[Union[:class:`Colour`, :class:`int`]]\n        The colour code of the embed. Aliased to ``color`` as well.\n        This can be set during initialisation.\n    \"\"\"\n\n    __slots__ = (\n        'title',\n        'url',\n        'type',\n        '_timestamp',\n        '_colour',\n        '_footer',\n        '_image',\n        '_thumbnail',\n        '_video',\n        '_provider',\n        '_author',\n        '_fields',\n        'description',\n    )\n\n    def __init__(\n        self,\n        *,\n        colour: Optional[Union[int, Colour]] = None,\n        color: Optional[Union[int, Colour]] = None,\n        title: Optional[Any] = None,\n        type: EmbedType = 'rich',\n        url: Optional[Any] = None,\n        description: Optional[Any] = None,\n        timestamp: Optional[datetime.datetime] = None,\n    ):\n\n        self.colour = colour if colour is not None else color\n        self.title: Optional[str] = title\n        self.type: EmbedType = type\n        self.url: Optional[str] = url\n        self.description: Optional[str] = description\n\n        if self.title is not None:\n            self.title = str(self.title)\n\n        if self.description is not None:\n            self.description = str(self.description)\n\n        if self.url is not None:\n            self.url = str(self.url)\n\n        if timestamp is not None:\n            self.timestamp = timestamp\n\n    @classmethod\n    def from_dict(cls, data: Mapping[str, Any]) -> Self:\n        \"\"\"Converts a :class:`dict` to a :class:`Embed` provided it is in the\n        format that Discord expects it to be in.\n\n        You can find out about this format in the :ddocs:`official Discord documentation <resources/channel#embed-object>`.\n\n        Parameters\n        -----------\n        data: :class:`dict`\n            The dictionary to convert into an embed.\n        \"\"\"\n        # we are bypassing __init__ here since it doesn't apply here\n        self = cls.__new__(cls)\n\n        # fill in the basic fields\n\n        self.title = data.get('title', None)\n        self.type = data.get('type', None)\n        self.description = data.get('description', None)\n        self.url = data.get('url', None)\n\n        if self.title is not None:\n            self.title = str(self.title)\n\n        if self.description is not None:\n            self.description = str(self.description)\n\n        if self.url is not None:\n            self.url = str(self.url)\n\n        # try to fill in the more rich fields\n\n        try:\n            self._colour = Colour(value=data['color'])\n        except KeyError:\n            pass\n\n        try:\n            self._timestamp = utils.parse_time(data['timestamp'])\n        except KeyError:\n            pass\n\n        for attr in ('thumbnail', 'video', 'provider', 'author', 'fields', 'image', 'footer'):\n            try:\n                value = data[attr]\n            except KeyError:\n                continue\n            else:\n                setattr(self, '_' + attr, value)\n\n        return self\n\n    def copy(self) -> Self:\n        \"\"\"Returns a shallow copy of the embed.\"\"\"\n        return self.__class__.from_dict(self.to_dict())\n\n    def __len__(self) -> int:\n        total = len(self.title or '') + len(self.description or '')\n        for field in getattr(self, '_fields', []):\n            total += len(field['name']) + len(field['value'])\n\n        try:\n            footer_text = self._footer['text']\n        except (AttributeError, KeyError):\n            pass\n        else:\n            total += len(footer_text)\n\n        try:\n            author = self._author\n        except AttributeError:\n            pass\n        else:\n            total += len(author['name'])\n\n        return total\n\n    def __bool__(self) -> bool:\n        return any(\n            (\n                self.title,\n                self.url,\n                self.description,\n                self.colour,\n                self.fields,\n                self.timestamp,\n                self.author,\n                self.thumbnail,\n                self.footer,\n                self.image,\n                self.provider,\n                self.video,\n            )\n        )\n\n    def __eq__(self, other: Embed) -> bool:\n        return isinstance(other, Embed) and (\n            self.type == other.type\n            and self.title == other.title\n            and self.url == other.url\n            and self.description == other.description\n            and self.colour == other.colour\n            and self.fields == other.fields\n            and self.timestamp == other.timestamp\n            and self.author == other.author\n            and self.thumbnail == other.thumbnail\n            and self.footer == other.footer\n            and self.image == other.image\n            and self.provider == other.provider\n            and self.video == other.video\n        )\n\n    @property\n    def colour(self) -> Optional[Colour]:\n        return getattr(self, '_colour', None)\n\n    @colour.setter\n    def colour(self, value: Optional[Union[int, Colour]]) -> None:\n        if value is None:\n            self._colour = None\n        elif isinstance(value, Colour):\n            self._colour = value\n        elif isinstance(value, int):\n            self._colour = Colour(value=value)\n        else:\n            raise TypeError(f'Expected discord.Colour, int, or None but received {value.__class__.__name__} instead.')\n\n    color = colour\n\n    @property\n    def timestamp(self) -> Optional[datetime.datetime]:\n        return getattr(self, '_timestamp', None)\n\n    @timestamp.setter\n    def timestamp(self, value: Optional[datetime.datetime]) -> None:\n        if isinstance(value, datetime.datetime):\n            if value.tzinfo is None:\n                value = value.astimezone()\n            self._timestamp = value\n        elif value is None:\n            self._timestamp = None\n        else:\n            raise TypeError(f\"Expected datetime.datetime or None received {value.__class__.__name__} instead\")\n\n    @property\n    def footer(self) -> _EmbedFooterProxy:\n        \"\"\"Returns an ``EmbedProxy`` denoting the footer contents.\n\n        See :meth:`set_footer` for possible values you can access.\n\n        If the attribute has no value then ``None`` is returned.\n        \"\"\"\n        # Lying to the type checker for better developer UX.\n        return EmbedProxy(getattr(self, '_footer', {}))  # type: ignore\n\n    def set_footer(self, *, text: Optional[Any] = None, icon_url: Optional[Any] = None) -> Self:\n        \"\"\"Sets the footer for the embed content.\n\n        This function returns the class instance to allow for fluent-style\n        chaining.\n\n        Parameters\n        -----------\n        text: :class:`str`\n            The footer text. Can only be up to 2048 characters.\n        icon_url: :class:`str`\n            The URL of the footer icon. Only HTTP(S) is supported.\n            Inline attachment URLs are also supported, see :ref:`local_image`.\n        \"\"\"\n\n        self._footer = {}\n        if text is not None:\n            self._footer['text'] = str(text)\n\n        if icon_url is not None:\n            self._footer['icon_url'] = str(icon_url)\n\n        return self\n\n    def remove_footer(self) -> Self:\n        \"\"\"Clears embed's footer information.\n\n        This function returns the class instance to allow for fluent-style\n        chaining.\n\n        .. versionadded:: 2.0\n        \"\"\"\n        try:\n            del self._footer\n        except AttributeError:\n            pass\n\n        return self\n\n    @property\n    def image(self) -> _EmbedMediaProxy:\n        \"\"\"Returns an ``EmbedProxy`` denoting the image contents.\n\n        Possible attributes you can access are:\n\n        - ``url``\n        - ``proxy_url``\n        - ``width``\n        - ``height``\n\n        If the attribute has no value then ``None`` is returned.\n        \"\"\"\n        # Lying to the type checker for better developer UX.\n        return EmbedProxy(getattr(self, '_image', {}))  # type: ignore\n\n    def set_image(self, *, url: Optional[Any]) -> Self:\n        \"\"\"Sets the image for the embed content.\n\n        This function returns the class instance to allow for fluent-style\n        chaining.\n\n        Parameters\n        -----------\n        url: :class:`str`\n            The source URL for the image. Only HTTP(S) is supported.\n            Inline attachment URLs are also supported, see :ref:`local_image`.\n        \"\"\"\n\n        if url is None:\n            try:\n                del self._image\n            except AttributeError:\n                pass\n        else:\n            self._image = {\n                'url': str(url),\n            }\n\n        return self\n\n    @property\n    def thumbnail(self) -> _EmbedMediaProxy:\n        \"\"\"Returns an ``EmbedProxy`` denoting the thumbnail contents.\n\n        Possible attributes you can access are:\n\n        - ``url``\n        - ``proxy_url``\n        - ``width``\n        - ``height``\n\n        If the attribute has no value then ``None`` is returned.\n        \"\"\"\n        # Lying to the type checker for better developer UX.\n        return EmbedProxy(getattr(self, '_thumbnail', {}))  # type: ignore\n\n    def set_thumbnail(self, *, url: Optional[Any]) -> Self:\n        \"\"\"Sets the thumbnail for the embed content.\n\n        This function returns the class instance to allow for fluent-style\n        chaining.\n\n        .. versionchanged:: 1.4\n            Passing ``None`` removes the thumbnail.\n\n        Parameters\n        -----------\n        url: :class:`str`\n            The source URL for the thumbnail. Only HTTP(S) is supported.\n            Inline attachment URLs are also supported, see :ref:`local_image`.\n        \"\"\"\n\n        if url is None:\n            try:\n                del self._thumbnail\n            except AttributeError:\n                pass\n        else:\n            self._thumbnail = {\n                'url': str(url),\n            }\n\n        return self\n\n    @property\n    def video(self) -> _EmbedVideoProxy:\n        \"\"\"Returns an ``EmbedProxy`` denoting the video contents.\n\n        Possible attributes include:\n\n        - ``url`` for the video URL.\n        - ``height`` for the video height.\n        - ``width`` for the video width.\n\n        If the attribute has no value then ``None`` is returned.\n        \"\"\"\n        # Lying to the type checker for better developer UX.\n        return EmbedProxy(getattr(self, '_video', {}))  # type: ignore\n\n    @property\n    def provider(self) -> _EmbedProviderProxy:\n        \"\"\"Returns an ``EmbedProxy`` denoting the provider contents.\n\n        The only attributes that might be accessed are ``name`` and ``url``.\n\n        If the attribute has no value then ``None`` is returned.\n        \"\"\"\n        # Lying to the type checker for better developer UX.\n        return EmbedProxy(getattr(self, '_provider', {}))  # type: ignore\n\n    @property\n    def author(self) -> _EmbedAuthorProxy:\n        \"\"\"Returns an ``EmbedProxy`` denoting the author contents.\n\n        See :meth:`set_author` for possible values you can access.\n\n        If the attribute has no value then ``None`` is returned.\n        \"\"\"\n        # Lying to the type checker for better developer UX.\n        return EmbedProxy(getattr(self, '_author', {}))  # type: ignore\n\n    def set_author(self, *, name: Any, url: Optional[Any] = None, icon_url: Optional[Any] = None) -> Self:\n        \"\"\"Sets the author for the embed content.\n\n        This function returns the class instance to allow for fluent-style\n        chaining.\n\n        Parameters\n        -----------\n        name: :class:`str`\n            The name of the author. Can only be up to 256 characters.\n        url: :class:`str`\n            The URL for the author.\n        icon_url: :class:`str`\n            The URL of the author icon. Only HTTP(S) is supported.\n            Inline attachment URLs are also supported, see :ref:`local_image`.\n        \"\"\"\n\n        self._author = {\n            'name': str(name),\n        }\n\n        if url is not None:\n            self._author['url'] = str(url)\n\n        if icon_url is not None:\n            self._author['icon_url'] = str(icon_url)\n\n        return self\n\n    def remove_author(self) -> Self:\n        \"\"\"Clears embed's author information.\n\n        This function returns the class instance to allow for fluent-style\n        chaining.\n\n        .. versionadded:: 1.4\n        \"\"\"\n        try:\n            del self._author\n        except AttributeError:\n            pass\n\n        return self\n\n    @property\n    def fields(self) -> List[_EmbedFieldProxy]:\n        \"\"\"List[``EmbedProxy``]: Returns a :class:`list` of ``EmbedProxy`` denoting the field contents.\n\n        See :meth:`add_field` for possible values you can access.\n\n        If the attribute has no value then ``None`` is returned.\n        \"\"\"\n        # Lying to the type checker for better developer UX.\n        return [EmbedProxy(d) for d in getattr(self, '_fields', [])]  # type: ignore\n\n    def add_field(self, *, name: Any, value: Any, inline: bool = True) -> Self:\n        \"\"\"Adds a field to the embed object.\n\n        This function returns the class instance to allow for fluent-style\n        chaining. Can only be up to 25 fields.\n\n        Parameters\n        -----------\n        name: :class:`str`\n            The name of the field. Can only be up to 256 characters.\n        value: :class:`str`\n            The value of the field. Can only be up to 1024 characters.\n        inline: :class:`bool`\n            Whether the field should be displayed inline.\n        \"\"\"\n\n        field = {\n            'inline': inline,\n            'name': str(name),\n            'value': str(value),\n        }\n\n        try:\n            self._fields.append(field)\n        except AttributeError:\n            self._fields = [field]\n\n        return self\n\n    def insert_field_at(self, index: int, *, name: Any, value: Any, inline: bool = True) -> Self:\n        \"\"\"Inserts a field before a specified index to the embed.\n\n        This function returns the class instance to allow for fluent-style\n        chaining. Can only be up to 25 fields.\n\n        .. versionadded:: 1.2\n\n        Parameters\n        -----------\n        index: :class:`int`\n            The index of where to insert the field.\n        name: :class:`str`\n            The name of the field. Can only be up to 256 characters.\n        value: :class:`str`\n            The value of the field. Can only be up to 1024 characters.\n        inline: :class:`bool`\n            Whether the field should be displayed inline.\n        \"\"\"\n\n        field = {\n            'inline': inline,\n            'name': str(name),\n            'value': str(value),\n        }\n\n        try:\n            self._fields.insert(index, field)\n        except AttributeError:\n            self._fields = [field]\n\n        return self\n\n    def clear_fields(self) -> Self:\n        \"\"\"Removes all fields from this embed.\n\n        This function returns the class instance to allow for fluent-style\n        chaining.\n\n        .. versionchanged:: 2.0\n            This function now returns the class instance.\n        \"\"\"\n        try:\n            self._fields.clear()\n        except AttributeError:\n            self._fields = []\n\n        return self\n\n    def remove_field(self, index: int) -> Self:\n        \"\"\"Removes a field at a specified index.\n\n        If the index is invalid or out of bounds then the error is\n        silently swallowed.\n\n        This function returns the class instance to allow for fluent-style\n        chaining.\n\n        .. note::\n\n            When deleting a field by index, the index of the other fields\n            shift to fill the gap just like a regular list.\n\n        .. versionchanged:: 2.0\n            This function now returns the class instance.\n\n        Parameters\n        -----------\n        index: :class:`int`\n            The index of the field to remove.\n        \"\"\"\n        try:\n            del self._fields[index]\n        except (AttributeError, IndexError):\n            pass\n\n        return self\n\n    def set_field_at(self, index: int, *, name: Any, value: Any, inline: bool = True) -> Self:\n        \"\"\"Modifies a field to the embed object.\n\n        The index must point to a valid pre-existing field. Can only be up to 25 fields.\n\n        This function returns the class instance to allow for fluent-style\n        chaining.\n\n        Parameters\n        -----------\n        index: :class:`int`\n            The index of the field to modify.\n        name: :class:`str`\n            The name of the field. Can only be up to 256 characters.\n        value: :class:`str`\n            The value of the field. Can only be up to 1024 characters.\n        inline: :class:`bool`\n            Whether the field should be displayed inline.\n\n        Raises\n        -------\n        IndexError\n            An invalid index was provided.\n        \"\"\"\n\n        try:\n            field = self._fields[index]\n        except (TypeError, IndexError, AttributeError):\n            raise IndexError('field index out of range')\n\n        field['name'] = str(name)\n        field['value'] = str(value)\n        field['inline'] = inline\n        return self\n\n    def to_dict(self) -> EmbedData:\n        \"\"\"Converts this embed object into a dict.\"\"\"\n\n        # add in the raw data into the dict\n        # fmt: off\n        result = {\n            key[1:]: getattr(self, key)\n            for key in self.__slots__\n            if key[0] == '_' and hasattr(self, key)\n        }\n        # fmt: on\n\n        # deal with basic convenience wrappers\n\n        try:\n            colour = result.pop('colour')\n        except KeyError:\n            pass\n        else:\n            if colour:\n                result['color'] = colour.value\n\n        try:\n            timestamp = result.pop('timestamp')\n        except KeyError:\n            pass\n        else:\n            if timestamp:\n                if timestamp.tzinfo:\n                    result['timestamp'] = timestamp.astimezone(tz=datetime.timezone.utc).isoformat()\n                else:\n                    result['timestamp'] = timestamp.replace(tzinfo=datetime.timezone.utc).isoformat()\n\n        # add in the non raw attribute ones\n        if self.type:\n            result['type'] = self.type\n\n        if self.description:\n            result['description'] = self.description\n\n        if self.url:\n            result['url'] = self.url\n\n        if self.title:\n            result['title'] = self.title\n\n        return result  # type: ignore # This payload is equivalent to the EmbedData type\n"
  },
  {
    "path": "discord/emoji.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom __future__ import annotations\nfrom typing import Any, Collection, Iterator, List, Optional, TYPE_CHECKING, Tuple\n\nfrom .asset import Asset, AssetMixin\nfrom .utils import SnowflakeList, snowflake_time, MISSING\nfrom .partial_emoji import _EmojiTag, PartialEmoji\nfrom .user import User\n\n# fmt: off\n__all__ = (\n    'Emoji',\n)\n# fmt: on\n\nif TYPE_CHECKING:\n    from .types.emoji import Emoji as EmojiPayload\n    from .guild import Guild\n    from .state import ConnectionState\n    from .abc import Snowflake\n    from .role import Role\n    from datetime import datetime\n\n\nclass Emoji(_EmojiTag, AssetMixin):\n    \"\"\"Represents a custom emoji.\n\n    Depending on the way this object was created, some of the attributes can\n    have a value of ``None``.\n\n    .. container:: operations\n\n        .. describe:: x == y\n\n            Checks if two emoji are the same.\n\n        .. describe:: x != y\n\n            Checks if two emoji are not the same.\n\n        .. describe:: hash(x)\n\n            Return the emoji's hash.\n\n        .. describe:: iter(x)\n\n            Returns an iterator of ``(field, value)`` pairs. This allows this class\n            to be used as an iterable in list/dict/etc constructions.\n\n        .. describe:: str(x)\n\n            Returns the emoji rendered for discord.\n\n    Attributes\n    -----------\n    name: :class:`str`\n        The name of the emoji.\n    id: :class:`int`\n        The emoji's ID.\n    require_colons: :class:`bool`\n        If colons are required to use this emoji in the client (:PJSalt: vs PJSalt).\n    animated: :class:`bool`\n        Whether an emoji is animated or not.\n    managed: :class:`bool`\n        If this emoji is managed by a Twitch integration.\n    guild_id: :class:`int`\n        The guild ID the emoji belongs to.\n    available: :class:`bool`\n        Whether the emoji is available for use.\n    user: Optional[:class:`User`]\n        The user that created the emoji. This can only be retrieved using :meth:`Guild.fetch_emoji` and\n        having :attr:`~Permissions.manage_emojis`.\n    \"\"\"\n\n    __slots__: Tuple[str, ...] = (\n        'require_colons',\n        'animated',\n        'managed',\n        'id',\n        'name',\n        '_roles',\n        'guild_id',\n        '_state',\n        'user',\n        'available',\n    )\n\n    def __init__(self, *, guild: Guild, state: ConnectionState, data: EmojiPayload) -> None:\n        self.guild_id: int = guild.id\n        self._state: ConnectionState = state\n        self._from_data(data)\n\n    def _from_data(self, emoji: EmojiPayload) -> None:\n        self.require_colons: bool = emoji.get('require_colons', False)\n        self.managed: bool = emoji.get('managed', False)\n        self.id: int = int(emoji['id'])  # type: ignore # This won't be None for full emoji objects.\n        self.name: str = emoji['name']  # type: ignore # This won't be None for full emoji objects.\n        self.animated: bool = emoji.get('animated', False)\n        self.available: bool = emoji.get('available', True)\n        self._roles: SnowflakeList = SnowflakeList(map(int, emoji.get('roles', [])))\n        user = emoji.get('user')\n        self.user: Optional[User] = User(state=self._state, data=user) if user else None\n\n    def _to_partial(self) -> PartialEmoji:\n        return PartialEmoji(name=self.name, animated=self.animated, id=self.id)\n\n    def __iter__(self) -> Iterator[Tuple[str, Any]]:\n        for attr in self.__slots__:\n            if attr[0] != '_':\n                value = getattr(self, attr, None)\n                if value is not None:\n                    yield (attr, value)\n\n    def __str__(self) -> str:\n        if self.animated:\n            return f'<a:{self.name}:{self.id}>'\n        return f'<:{self.name}:{self.id}>'\n\n    def __repr__(self) -> str:\n        return f'<Emoji id={self.id} name={self.name!r} animated={self.animated} managed={self.managed}>'\n\n    def __eq__(self, other: object) -> bool:\n        return isinstance(other, _EmojiTag) and self.id == other.id\n\n    def __ne__(self, other: object) -> bool:\n        return not self.__eq__(other)\n\n    def __hash__(self) -> int:\n        return self.id >> 22\n\n    @property\n    def created_at(self) -> datetime:\n        \"\"\":class:`datetime.datetime`: Returns the emoji's creation time in UTC.\"\"\"\n        return snowflake_time(self.id)\n\n    @property\n    def url(self) -> str:\n        \"\"\":class:`str`: Returns the URL of the emoji.\"\"\"\n        fmt = 'gif' if self.animated else 'png'\n        return f'{Asset.BASE}/emojis/{self.id}.{fmt}'\n\n    @property\n    def roles(self) -> List[Role]:\n        \"\"\"List[:class:`Role`]: A :class:`list` of roles that is allowed to use this emoji.\n\n        If roles is empty, the emoji is unrestricted.\n        \"\"\"\n        guild = self.guild\n        if guild is None:\n            return []\n\n        return [role for role in guild.roles if self._roles.has(role.id)]\n\n    @property\n    def guild(self) -> Optional[Guild]:\n        \"\"\":class:`Guild`: The guild this emoji belongs to.\"\"\"\n        return self._state._get_guild(self.guild_id)\n\n    def is_usable(self) -> bool:\n        \"\"\":class:`bool`: Whether the bot can use this emoji.\n\n        .. versionadded:: 1.3\n        \"\"\"\n        if not self.available or not self.guild or self.guild.unavailable:\n            return False\n        if not self._roles:\n            return True\n        emoji_roles, my_roles = self._roles, self.guild.me._roles\n        return any(my_roles.has(role_id) for role_id in emoji_roles)\n\n    async def delete(self, *, reason: Optional[str] = None) -> None:\n        \"\"\"|coro|\n\n        Deletes the custom emoji.\n\n        You must have :attr:`~Permissions.manage_emojis` to do this.\n\n        Parameters\n        -----------\n        reason: Optional[:class:`str`]\n            The reason for deleting this emoji. Shows up on the audit log.\n\n        Raises\n        -------\n        Forbidden\n            You are not allowed to delete emojis.\n        HTTPException\n            An error occurred deleting the emoji.\n        \"\"\"\n\n        await self._state.http.delete_custom_emoji(self.guild_id, self.id, reason=reason)\n\n    async def edit(\n        self, *, name: str = MISSING, roles: Collection[Snowflake] = MISSING, reason: Optional[str] = None\n    ) -> Emoji:\n        r\"\"\"|coro|\n\n        Edits the custom emoji.\n\n        You must have :attr:`~Permissions.manage_emojis` to do this.\n\n        .. versionchanged:: 2.0\n            The newly updated emoji is returned.\n\n        Parameters\n        -----------\n        name: :class:`str`\n            The new emoji name.\n        roles: List[:class:`~discord.abc.Snowflake`]\n            A list of roles that can use this emoji. An empty list can be passed to make it available to everyone.\n        reason: Optional[:class:`str`]\n            The reason for editing this emoji. Shows up on the audit log.\n\n        Raises\n        -------\n        Forbidden\n            You are not allowed to edit emojis.\n        HTTPException\n            An error occurred editing the emoji.\n\n        Returns\n        --------\n        :class:`Emoji`\n            The newly updated emoji.\n        \"\"\"\n\n        payload = {}\n        if name is not MISSING:\n            payload['name'] = name\n        if roles is not MISSING:\n            payload['roles'] = [role.id for role in roles]\n\n        data = await self._state.http.edit_custom_emoji(self.guild_id, self.id, payload=payload, reason=reason)\n        return Emoji(guild=self.guild, data=data, state=self._state)  # type: ignore # if guild is None, the http request would have failed\n"
  },
  {
    "path": "discord/enums.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\nfrom __future__ import annotations\n\nimport types\nfrom collections import namedtuple\nfrom typing import Any, ClassVar, Dict, List, Optional, TYPE_CHECKING, Tuple, Type, TypeVar, Iterator, Mapping\n\n__all__ = (\n    'Enum',\n    'ChannelType',\n    'MessageType',\n    'SpeakingState',\n    'VerificationLevel',\n    'ContentFilter',\n    'Status',\n    'DefaultAvatar',\n    'AuditLogAction',\n    'AuditLogActionCategory',\n    'UserFlags',\n    'ActivityType',\n    'NotificationLevel',\n    'TeamMembershipState',\n    'TeamMemberRole',\n    'WebhookType',\n    'ExpireBehaviour',\n    'ExpireBehavior',\n    'StickerType',\n    'StickerFormatType',\n    'InviteTarget',\n    'VideoQualityMode',\n    'ComponentType',\n    'ButtonStyle',\n    'TextStyle',\n    'PrivacyLevel',\n    'InteractionType',\n    'InteractionResponseType',\n    'NSFWLevel',\n    'MFALevel',\n    'Locale',\n    'EntityType',\n    'EventStatus',\n    'AppCommandType',\n    'AppCommandOptionType',\n    'AppCommandPermissionType',\n    'AutoModRuleTriggerType',\n    'AutoModRuleEventType',\n    'AutoModRuleActionType',\n    'ForumLayoutType',\n    'ForumOrderType',\n    'SelectDefaultValueType',\n    'SKUType',\n    'EntitlementType',\n    'EntitlementOwnerType',\n    'PollLayoutType',\n)\n\n\ndef _create_value_cls(name: str, comparable: bool):\n    # All the type ignores here are due to the type checker being unable to recognise\n    # Runtime type creation without exploding.\n    cls = namedtuple('_EnumValue_' + name, 'name value')\n    cls.__repr__ = lambda self: f'<{name}.{self.name}: {self.value!r}>'  # type: ignore\n    cls.__str__ = lambda self: f'{name}.{self.name}'  # type: ignore\n    if comparable:\n        cls.__le__ = lambda self, other: isinstance(other, self.__class__) and self.value <= other.value  # type: ignore\n        cls.__ge__ = lambda self, other: isinstance(other, self.__class__) and self.value >= other.value  # type: ignore\n        cls.__lt__ = lambda self, other: isinstance(other, self.__class__) and self.value < other.value  # type: ignore\n        cls.__gt__ = lambda self, other: isinstance(other, self.__class__) and self.value > other.value  # type: ignore\n    return cls\n\n\ndef _is_descriptor(obj):\n    return hasattr(obj, '__get__') or hasattr(obj, '__set__') or hasattr(obj, '__delete__')\n\n\nclass EnumMeta(type):\n    if TYPE_CHECKING:\n        __name__: ClassVar[str]\n        _enum_member_names_: ClassVar[List[str]]\n        _enum_member_map_: ClassVar[Dict[str, Any]]\n        _enum_value_map_: ClassVar[Dict[Any, Any]]\n\n    def __new__(\n        cls,\n        name: str,\n        bases: Tuple[type, ...],\n        attrs: Dict[str, Any],\n        *,\n        comparable: bool = False,\n    ) -> EnumMeta:\n        value_mapping = {}\n        member_mapping = {}\n        member_names = []\n\n        value_cls = _create_value_cls(name, comparable)\n        for key, value in list(attrs.items()):\n            is_descriptor = _is_descriptor(value)\n            if key[0] == '_' and not is_descriptor:\n                continue\n\n            # Special case classmethod to just pass through\n            if isinstance(value, classmethod):\n                continue\n\n            if is_descriptor:\n                setattr(value_cls, key, value)\n                del attrs[key]\n                continue\n\n            try:\n                new_value = value_mapping[value]\n            except KeyError:\n                new_value = value_cls(name=key, value=value)\n                value_mapping[value] = new_value\n                member_names.append(key)\n\n            member_mapping[key] = new_value\n            attrs[key] = new_value\n\n        attrs['_enum_value_map_'] = value_mapping\n        attrs['_enum_member_map_'] = member_mapping\n        attrs['_enum_member_names_'] = member_names\n        attrs['_enum_value_cls_'] = value_cls\n        actual_cls = super().__new__(cls, name, bases, attrs)\n        value_cls._actual_enum_cls_ = actual_cls  # type: ignore # Runtime attribute isn't understood\n        return actual_cls\n\n    def __iter__(cls) -> Iterator[Any]:\n        return (cls._enum_member_map_[name] for name in cls._enum_member_names_)\n\n    def __reversed__(cls) -> Iterator[Any]:\n        return (cls._enum_member_map_[name] for name in reversed(cls._enum_member_names_))\n\n    def __len__(cls) -> int:\n        return len(cls._enum_member_names_)\n\n    def __repr__(cls) -> str:\n        return f'<enum {cls.__name__}>'\n\n    @property\n    def __members__(cls) -> Mapping[str, Any]:\n        return types.MappingProxyType(cls._enum_member_map_)\n\n    def __call__(cls, value: str) -> Any:\n        try:\n            return cls._enum_value_map_[value]\n        except (KeyError, TypeError):\n            raise ValueError(f\"{value!r} is not a valid {cls.__name__}\")\n\n    def __getitem__(cls, key: str) -> Any:\n        return cls._enum_member_map_[key]\n\n    def __setattr__(cls, name: str, value: Any) -> None:\n        raise TypeError('Enums are immutable.')\n\n    def __delattr__(cls, attr: str) -> None:\n        raise TypeError('Enums are immutable')\n\n    def __instancecheck__(self, instance: Any) -> bool:\n        # isinstance(x, Y)\n        # -> __instancecheck__(Y, x)\n        try:\n            return instance._actual_enum_cls_ is self\n        except AttributeError:\n            return False\n\n\nif TYPE_CHECKING:\n    from enum import Enum\nelse:\n\n    class Enum(metaclass=EnumMeta):\n        @classmethod\n        def try_value(cls, value):\n            try:\n                return cls._enum_value_map_[value]\n            except (KeyError, TypeError):\n                return value\n\n\nclass ChannelType(Enum):\n    text = 0\n    private = 1\n    voice = 2\n    group = 3\n    category = 4\n    news = 5\n    news_thread = 10\n    public_thread = 11\n    private_thread = 12\n    stage_voice = 13\n    forum = 15\n    media = 16\n\n    def __str__(self) -> str:\n        return self.name\n\n\nclass MessageType(Enum):\n    default = 0\n    recipient_add = 1\n    recipient_remove = 2\n    call = 3\n    channel_name_change = 4\n    channel_icon_change = 5\n    pins_add = 6\n    new_member = 7\n    premium_guild_subscription = 8\n    premium_guild_tier_1 = 9\n    premium_guild_tier_2 = 10\n    premium_guild_tier_3 = 11\n    channel_follow_add = 12\n    guild_stream = 13\n    guild_discovery_disqualified = 14\n    guild_discovery_requalified = 15\n    guild_discovery_grace_period_initial_warning = 16\n    guild_discovery_grace_period_final_warning = 17\n    thread_created = 18\n    reply = 19\n    chat_input_command = 20\n    thread_starter_message = 21\n    guild_invite_reminder = 22\n    context_menu_command = 23\n    auto_moderation_action = 24\n    role_subscription_purchase = 25\n    interaction_premium_upsell = 26\n    stage_start = 27\n    stage_end = 28\n    stage_speaker = 29\n    stage_raise_hand = 30\n    stage_topic = 31\n    guild_application_premium_subscription = 32\n    guild_incident_alert_mode_enabled = 36\n    guild_incident_alert_mode_disabled = 37\n    guild_incident_report_raid = 38\n    guild_incident_report_false_alarm = 39\n\n\nclass SpeakingState(Enum):\n    none = 0\n    voice = 1\n    soundshare = 2\n    priority = 4\n\n    def __str__(self) -> str:\n        return self.name\n\n    def __int__(self) -> int:\n        return self.value\n\n\nclass VerificationLevel(Enum, comparable=True):\n    none = 0\n    low = 1\n    medium = 2\n    high = 3\n    highest = 4\n\n    def __str__(self) -> str:\n        return self.name\n\n\nclass ContentFilter(Enum, comparable=True):\n    disabled = 0\n    no_role = 1\n    all_members = 2\n\n    def __str__(self) -> str:\n        return self.name\n\n\nclass Status(Enum):\n    online = 'online'\n    offline = 'offline'\n    idle = 'idle'\n    dnd = 'dnd'\n    do_not_disturb = 'dnd'\n    invisible = 'invisible'\n\n    def __str__(self) -> str:\n        return self.value\n\n\nclass DefaultAvatar(Enum):\n    blurple = 0\n    grey = 1\n    gray = 1\n    green = 2\n    orange = 3\n    red = 4\n    pink = 5\n\n    def __str__(self) -> str:\n        return self.name\n\n\nclass NotificationLevel(Enum, comparable=True):\n    all_messages = 0\n    only_mentions = 1\n\n\nclass AuditLogActionCategory(Enum):\n    create = 1\n    delete = 2\n    update = 3\n\n\nclass AuditLogAction(Enum):\n    # fmt: off\n    guild_update                                      = 1\n    channel_create                                    = 10\n    channel_update                                    = 11\n    channel_delete                                    = 12\n    overwrite_create                                  = 13\n    overwrite_update                                  = 14\n    overwrite_delete                                  = 15\n    kick                                              = 20\n    member_prune                                      = 21\n    ban                                               = 22\n    unban                                             = 23\n    member_update                                     = 24\n    member_role_update                                = 25\n    member_move                                       = 26\n    member_disconnect                                 = 27\n    bot_add                                           = 28\n    role_create                                       = 30\n    role_update                                       = 31\n    role_delete                                       = 32\n    invite_create                                     = 40\n    invite_update                                     = 41\n    invite_delete                                     = 42\n    webhook_create                                    = 50\n    webhook_update                                    = 51\n    webhook_delete                                    = 52\n    emoji_create                                      = 60\n    emoji_update                                      = 61\n    emoji_delete                                      = 62\n    message_delete                                    = 72\n    message_bulk_delete                               = 73\n    message_pin                                       = 74\n    message_unpin                                     = 75\n    integration_create                                = 80\n    integration_update                                = 81\n    integration_delete                                = 82\n    stage_instance_create                             = 83\n    stage_instance_update                             = 84\n    stage_instance_delete                             = 85\n    sticker_create                                    = 90\n    sticker_update                                    = 91\n    sticker_delete                                    = 92\n    scheduled_event_create                            = 100\n    scheduled_event_update                            = 101\n    scheduled_event_delete                            = 102\n    thread_create                                     = 110\n    thread_update                                     = 111\n    thread_delete                                     = 112\n    app_command_permission_update                     = 121\n    automod_rule_create                               = 140\n    automod_rule_update                               = 141\n    automod_rule_delete                               = 142\n    automod_block_message                             = 143\n    automod_flag_message                              = 144\n    automod_timeout_member                            = 145\n    creator_monetization_request_created              = 150\n    creator_monetization_terms_accepted               = 151\n    # fmt: on\n\n    @property\n    def category(self) -> Optional[AuditLogActionCategory]:\n        # fmt: off\n        lookup: Dict[AuditLogAction, Optional[AuditLogActionCategory]] = {\n            AuditLogAction.guild_update:                             AuditLogActionCategory.update,\n            AuditLogAction.channel_create:                           AuditLogActionCategory.create,\n            AuditLogAction.channel_update:                           AuditLogActionCategory.update,\n            AuditLogAction.channel_delete:                           AuditLogActionCategory.delete,\n            AuditLogAction.overwrite_create:                         AuditLogActionCategory.create,\n            AuditLogAction.overwrite_update:                         AuditLogActionCategory.update,\n            AuditLogAction.overwrite_delete:                         AuditLogActionCategory.delete,\n            AuditLogAction.kick:                                     None,\n            AuditLogAction.member_prune:                             None,\n            AuditLogAction.ban:                                      None,\n            AuditLogAction.unban:                                    None,\n            AuditLogAction.member_update:                            AuditLogActionCategory.update,\n            AuditLogAction.member_role_update:                       AuditLogActionCategory.update,\n            AuditLogAction.member_move:                              None,\n            AuditLogAction.member_disconnect:                        None,\n            AuditLogAction.bot_add:                                  None,\n            AuditLogAction.role_create:                              AuditLogActionCategory.create,\n            AuditLogAction.role_update:                              AuditLogActionCategory.update,\n            AuditLogAction.role_delete:                              AuditLogActionCategory.delete,\n            AuditLogAction.invite_create:                            AuditLogActionCategory.create,\n            AuditLogAction.invite_update:                            AuditLogActionCategory.update,\n            AuditLogAction.invite_delete:                            AuditLogActionCategory.delete,\n            AuditLogAction.webhook_create:                           AuditLogActionCategory.create,\n            AuditLogAction.webhook_update:                           AuditLogActionCategory.update,\n            AuditLogAction.webhook_delete:                           AuditLogActionCategory.delete,\n            AuditLogAction.emoji_create:                             AuditLogActionCategory.create,\n            AuditLogAction.emoji_update:                             AuditLogActionCategory.update,\n            AuditLogAction.emoji_delete:                             AuditLogActionCategory.delete,\n            AuditLogAction.message_delete:                           AuditLogActionCategory.delete,\n            AuditLogAction.message_bulk_delete:                      AuditLogActionCategory.delete,\n            AuditLogAction.message_pin:                              None,\n            AuditLogAction.message_unpin:                            None,\n            AuditLogAction.integration_create:                       AuditLogActionCategory.create,\n            AuditLogAction.integration_update:                       AuditLogActionCategory.update,\n            AuditLogAction.integration_delete:                       AuditLogActionCategory.delete,\n            AuditLogAction.stage_instance_create:                    AuditLogActionCategory.create,\n            AuditLogAction.stage_instance_update:                    AuditLogActionCategory.update,\n            AuditLogAction.stage_instance_delete:                    AuditLogActionCategory.delete,\n            AuditLogAction.sticker_create:                           AuditLogActionCategory.create,\n            AuditLogAction.sticker_update:                           AuditLogActionCategory.update,\n            AuditLogAction.sticker_delete:                           AuditLogActionCategory.delete,\n            AuditLogAction.scheduled_event_create:                   AuditLogActionCategory.create,\n            AuditLogAction.scheduled_event_update:                   AuditLogActionCategory.update,\n            AuditLogAction.scheduled_event_delete:                   AuditLogActionCategory.delete,\n            AuditLogAction.thread_create:                            AuditLogActionCategory.create,\n            AuditLogAction.thread_delete:                            AuditLogActionCategory.delete,\n            AuditLogAction.thread_update:                            AuditLogActionCategory.update,\n            AuditLogAction.app_command_permission_update:            AuditLogActionCategory.update,\n            AuditLogAction.automod_rule_create:                      AuditLogActionCategory.create,\n            AuditLogAction.automod_rule_update:                      AuditLogActionCategory.update,\n            AuditLogAction.automod_rule_delete:                      AuditLogActionCategory.delete,\n            AuditLogAction.automod_block_message:                    None,\n            AuditLogAction.automod_flag_message:                     None,\n            AuditLogAction.automod_timeout_member:                   None,\n            AuditLogAction.creator_monetization_request_created:     None,\n            AuditLogAction.creator_monetization_terms_accepted:      None,\n        }\n        # fmt: on\n        return lookup[self]\n\n    @property\n    def target_type(self) -> Optional[str]:\n        v = self.value\n        if v == -1:\n            return 'all'\n        elif v < 10:\n            return 'guild'\n        elif v < 20:\n            return 'channel'\n        elif v < 30:\n            return 'user'\n        elif v < 40:\n            return 'role'\n        elif v < 50:\n            return 'invite'\n        elif v < 60:\n            return 'webhook'\n        elif v < 70:\n            return 'emoji'\n        elif v == 73:\n            return 'channel'\n        elif v < 80:\n            return 'message'\n        elif v < 83:\n            return 'integration'\n        elif v < 90:\n            return 'stage_instance'\n        elif v < 93:\n            return 'sticker'\n        elif v < 103:\n            return 'guild_scheduled_event'\n        elif v < 113:\n            return 'thread'\n        elif v < 122:\n            return 'integration_or_app_command'\n        elif 139 < v < 143:\n            return 'auto_moderation'\n        elif v < 146:\n            return 'user'\n        elif v < 152:\n            return 'creator_monetization'\n\n\nclass UserFlags(Enum):\n    staff = 1\n    partner = 2\n    hypesquad = 4\n    bug_hunter = 8\n    mfa_sms = 16\n    premium_promo_dismissed = 32\n    hypesquad_bravery = 64\n    hypesquad_brilliance = 128\n    hypesquad_balance = 256\n    early_supporter = 512\n    team_user = 1024\n    system = 4096\n    has_unread_urgent_messages = 8192\n    bug_hunter_level_2 = 16384\n    verified_bot = 65536\n    verified_bot_developer = 131072\n    discord_certified_moderator = 262144\n    bot_http_interactions = 524288\n    spammer = 1048576\n    active_developer = 4194304\n\n\nclass ActivityType(Enum):\n    unknown = -1\n    playing = 0\n    streaming = 1\n    listening = 2\n    watching = 3\n    custom = 4\n    competing = 5\n\n    def __int__(self) -> int:\n        return self.value\n\n\nclass TeamMembershipState(Enum):\n    invited = 1\n    accepted = 2\n\n\nclass TeamMemberRole(Enum):\n    admin = 'admin'\n    developer = 'developer'\n    read_only = 'read_only'\n\n\nclass WebhookType(Enum):\n    incoming = 1\n    channel_follower = 2\n    application = 3\n\n\nclass ExpireBehaviour(Enum):\n    remove_role = 0\n    kick = 1\n\n\nExpireBehavior = ExpireBehaviour\n\n\nclass StickerType(Enum):\n    standard = 1\n    guild = 2\n\n\nclass StickerFormatType(Enum):\n    png = 1\n    apng = 2\n    lottie = 3\n    gif = 4\n\n    @property\n    def file_extension(self) -> str:\n        # fmt: off\n        lookup: Dict[StickerFormatType, str] = {\n            StickerFormatType.png: 'png',\n            StickerFormatType.apng: 'png',\n            StickerFormatType.lottie: 'json',\n            StickerFormatType.gif: 'gif',\n        }\n        # fmt: on\n        return lookup.get(self, 'png')\n\n\nclass InviteTarget(Enum):\n    unknown = 0\n    stream = 1\n    embedded_application = 2\n\n\nclass InteractionType(Enum):\n    ping = 1\n    application_command = 2\n    component = 3\n    autocomplete = 4\n    modal_submit = 5\n\n\nclass InteractionResponseType(Enum):\n    pong = 1\n    # ack = 2 (deprecated)\n    # channel_message = 3 (deprecated)\n    channel_message = 4  # (with source)\n    deferred_channel_message = 5  # (with source)\n    deferred_message_update = 6  # for components\n    message_update = 7  # for components\n    autocomplete_result = 8\n    modal = 9  # for modals\n    # premium_required = 10 (deprecated)\n\n\nclass VideoQualityMode(Enum):\n    auto = 1\n    full = 2\n\n    def __int__(self) -> int:\n        return self.value\n\n\nclass ComponentType(Enum):\n    action_row = 1\n    button = 2\n    select = 3\n    string_select = 3\n    text_input = 4\n    user_select = 5\n    role_select = 6\n    mentionable_select = 7\n    channel_select = 8\n\n    def __int__(self) -> int:\n        return self.value\n\n\nclass ButtonStyle(Enum):\n    primary = 1\n    secondary = 2\n    success = 3\n    danger = 4\n    link = 5\n    premium = 6\n\n    # Aliases\n    blurple = 1\n    grey = 2\n    gray = 2\n    green = 3\n    red = 4\n    url = 5\n\n    def __int__(self) -> int:\n        return self.value\n\n\nclass TextStyle(Enum):\n    short = 1\n    paragraph = 2\n\n    # Aliases\n    long = 2\n\n    def __int__(self) -> int:\n        return self.value\n\n\nclass PrivacyLevel(Enum):\n    guild_only = 2\n\n\nclass NSFWLevel(Enum, comparable=True):\n    default = 0\n    explicit = 1\n    safe = 2\n    age_restricted = 3\n\n\nclass MFALevel(Enum, comparable=True):\n    disabled = 0\n    require_2fa = 1\n\n\nclass Locale(Enum):\n    american_english = 'en-US'\n    british_english = 'en-GB'\n    bulgarian = 'bg'\n    chinese = 'zh-CN'\n    taiwan_chinese = 'zh-TW'\n    croatian = 'hr'\n    czech = 'cs'\n    indonesian = 'id'\n    danish = 'da'\n    dutch = 'nl'\n    finnish = 'fi'\n    french = 'fr'\n    german = 'de'\n    greek = 'el'\n    hindi = 'hi'\n    hungarian = 'hu'\n    italian = 'it'\n    japanese = 'ja'\n    korean = 'ko'\n    latin_american_spanish = 'es-419'\n    lithuanian = 'lt'\n    norwegian = 'no'\n    polish = 'pl'\n    brazil_portuguese = 'pt-BR'\n    romanian = 'ro'\n    russian = 'ru'\n    spain_spanish = 'es-ES'\n    swedish = 'sv-SE'\n    thai = 'th'\n    turkish = 'tr'\n    ukrainian = 'uk'\n    vietnamese = 'vi'\n\n    def __str__(self) -> str:\n        return self.value\n\n\nE = TypeVar('E', bound='Enum')\n\n\nclass EntityType(Enum):\n    stage_instance = 1\n    voice = 2\n    external = 3\n\n\nclass EventStatus(Enum):\n    scheduled = 1\n    active = 2\n    completed = 3\n    canceled = 4\n\n    ended = 3\n    cancelled = 4\n\n\nclass AppCommandOptionType(Enum):\n    subcommand = 1\n    subcommand_group = 2\n    string = 3\n    integer = 4\n    boolean = 5\n    user = 6\n    channel = 7\n    role = 8\n    mentionable = 9\n    number = 10\n    attachment = 11\n\n\nclass AppCommandType(Enum):\n    chat_input = 1\n    user = 2\n    message = 3\n\n\nclass AppCommandPermissionType(Enum):\n    role = 1\n    user = 2\n    channel = 3\n\n\nclass AutoModRuleTriggerType(Enum):\n    keyword = 1\n    harmful_link = 2\n    spam = 3\n    keyword_preset = 4\n    mention_spam = 5\n    member_profile = 6\n\n\nclass AutoModRuleEventType(Enum):\n    message_send = 1\n    member_update = 2\n\n\nclass AutoModRuleActionType(Enum):\n    block_message = 1\n    send_alert_message = 2\n    timeout = 3\n    block_member_interactions = 4\n\n\nclass ForumLayoutType(Enum):\n    not_set = 0\n    list_view = 1\n    gallery_view = 2\n\n\nclass ForumOrderType(Enum):\n    latest_activity = 0\n    creation_date = 1\n\n\nclass SelectDefaultValueType(Enum):\n    user = 'user'\n    role = 'role'\n    channel = 'channel'\n\n\nclass SKUType(Enum):\n    durable = 2\n    consumable = 3\n    subscription = 5\n    subscription_group = 6\n\n\nclass EntitlementType(Enum):\n    purchase = 1\n    premium_subscription = 2\n    developer_gift = 3\n    test_mode_purchase = 4\n    free_purchase = 5\n    user_gift = 6\n    premium_purchase = 7\n    application_subscription = 8\n\n\nclass EntitlementOwnerType(Enum):\n    guild = 1\n    user = 2\n\n\nclass PollLayoutType(Enum):\n    default = 1\n\n\nclass InviteType(Enum):\n    guild = 0\n    group_dm = 1\n    friend = 2\n\n\nclass ReactionType(Enum):\n    normal = 0\n    burst = 1\n\n\ndef create_unknown_value(cls: Type[E], val: Any) -> E:\n    value_cls = cls._enum_value_cls_  # type: ignore # This is narrowed below\n    name = f'unknown_{val}'\n    return value_cls(name=name, value=val)\n\n\ndef try_enum(cls: Type[E], val: Any) -> E:\n    \"\"\"A function that tries to turn the value into enum ``cls``.\n\n    If it fails it returns a proxy invalid value instead.\n    \"\"\"\n\n    try:\n        return cls._enum_value_map_[val]  # type: ignore # All errors are caught below\n    except (KeyError, TypeError, AttributeError):\n        return create_unknown_value(cls, val)\n"
  },
  {
    "path": "discord/errors.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom __future__ import annotations\nfrom typing import Dict, List, Optional, TYPE_CHECKING, Any, Tuple, Union\n\nif TYPE_CHECKING:\n    from aiohttp import ClientResponse, ClientWebSocketResponse\n    from requests import Response\n\n    _ResponseType = Union[ClientResponse, Response]\n\n    from .interactions import Interaction\n\n__all__ = (\n    'DiscordException',\n    'ClientException',\n    'GatewayNotFound',\n    'HTTPException',\n    'RateLimited',\n    'Forbidden',\n    'NotFound',\n    'DiscordServerError',\n    'InvalidData',\n    'LoginFailure',\n    'ConnectionClosed',\n    'PrivilegedIntentsRequired',\n    'InteractionResponded',\n)\n\n\nclass DiscordException(Exception):\n    \"\"\"Base exception class for discord.py\n\n    Ideally speaking, this could be caught to handle any exceptions raised from this library.\n    \"\"\"\n\n    pass\n\n\nclass ClientException(DiscordException):\n    \"\"\"Exception that's raised when an operation in the :class:`Client` fails.\n\n    These are usually for exceptions that happened due to user input.\n    \"\"\"\n\n    pass\n\n\nclass GatewayNotFound(DiscordException):\n    \"\"\"An exception that is raised when the gateway for Discord could not be found\"\"\"\n\n    def __init__(self):\n        message = 'The gateway to connect to discord was not found.'\n        super().__init__(message)\n\n\ndef _flatten_error_dict(d: Dict[str, Any], key: str = '') -> Dict[str, str]:\n    items: List[Tuple[str, str]] = []\n    for k, v in d.items():\n        new_key = key + '.' + k if key else k\n\n        if isinstance(v, dict):\n            try:\n                _errors: List[Dict[str, Any]] = v['_errors']\n            except KeyError:\n                items.extend(_flatten_error_dict(v, new_key).items())\n            else:\n                items.append((new_key, ' '.join(x.get('message', '') for x in _errors)))\n        else:\n            items.append((new_key, v))\n\n    return dict(items)\n\n\nclass HTTPException(DiscordException):\n    \"\"\"Exception that's raised when an HTTP request operation fails.\n\n    Attributes\n    ------------\n    response: :class:`aiohttp.ClientResponse`\n        The response of the failed HTTP request. This is an\n        instance of :class:`aiohttp.ClientResponse`. In some cases\n        this could also be a :class:`requests.Response`.\n\n    text: :class:`str`\n        The text of the error. Could be an empty string.\n    status: :class:`int`\n        The status code of the HTTP request.\n    code: :class:`int`\n        The Discord specific error code for the failure.\n    \"\"\"\n\n    def __init__(self, response: _ResponseType, message: Optional[Union[str, Dict[str, Any]]]):\n        self.response: _ResponseType = response\n        self.status: int = response.status  # type: ignore # This attribute is filled by the library even if using requests\n        self.code: int\n        self.text: str\n        if isinstance(message, dict):\n            self.code = message.get('code', 0)\n            base = message.get('message', '')\n            errors = message.get('errors')\n            self._errors: Optional[Dict[str, Any]] = errors\n            if errors:\n                errors = _flatten_error_dict(errors)\n                helpful = '\\n'.join('In %s: %s' % t for t in errors.items())\n                self.text = base + '\\n' + helpful\n            else:\n                self.text = base\n        else:\n            self.text = message or ''\n            self.code = 0\n\n        fmt = '{0.status} {0.reason} (error code: {1})'\n        if len(self.text):\n            fmt += ': {2}'\n\n        super().__init__(fmt.format(self.response, self.code, self.text))\n\n\nclass RateLimited(DiscordException):\n    \"\"\"Exception that's raised for when status code 429 occurs\n    and the timeout is greater than the configured maximum using\n    the ``max_ratelimit_timeout`` parameter in :class:`Client`.\n\n    This is not raised during global ratelimits.\n\n    Since sometimes requests are halted pre-emptively before they're\n    even made, this **does not** subclass :exc:`HTTPException`.\n\n    .. versionadded:: 2.0\n\n    Attributes\n    ------------\n    retry_after: :class:`float`\n        The amount of seconds that the client should wait before retrying\n        the request.\n    \"\"\"\n\n    def __init__(self, retry_after: float):\n        self.retry_after = retry_after\n        super().__init__(f'Too many requests. Retry in {retry_after:.2f} seconds.')\n\n\nclass Forbidden(HTTPException):\n    \"\"\"Exception that's raised for when status code 403 occurs.\n\n    Subclass of :exc:`HTTPException`\n    \"\"\"\n\n    pass\n\n\nclass NotFound(HTTPException):\n    \"\"\"Exception that's raised for when status code 404 occurs.\n\n    Subclass of :exc:`HTTPException`\n    \"\"\"\n\n    pass\n\n\nclass DiscordServerError(HTTPException):\n    \"\"\"Exception that's raised for when a 500 range status code occurs.\n\n    Subclass of :exc:`HTTPException`.\n\n    .. versionadded:: 1.5\n    \"\"\"\n\n    pass\n\n\nclass InvalidData(ClientException):\n    \"\"\"Exception that's raised when the library encounters unknown\n    or invalid data from Discord.\n    \"\"\"\n\n    pass\n\n\nclass LoginFailure(ClientException):\n    \"\"\"Exception that's raised when the :meth:`Client.login` function\n    fails to log you in from improper credentials or some other misc.\n    failure.\n    \"\"\"\n\n    pass\n\n\nclass ConnectionClosed(ClientException):\n    \"\"\"Exception that's raised when the gateway connection is\n    closed for reasons that could not be handled internally.\n\n    Attributes\n    -----------\n    code: :class:`int`\n        The close code of the websocket.\n    reason: :class:`str`\n        The reason provided for the closure.\n    shard_id: Optional[:class:`int`]\n        The shard ID that got closed if applicable.\n    \"\"\"\n\n    def __init__(self, socket: ClientWebSocketResponse, *, shard_id: Optional[int], code: Optional[int] = None):\n        # This exception is just the same exception except\n        # reconfigured to subclass ClientException for users\n        self.code: int = code or socket.close_code or -1\n        # aiohttp doesn't seem to consistently provide close reason\n        self.reason: str = ''\n        self.shard_id: Optional[int] = shard_id\n        super().__init__(f'Shard ID {self.shard_id} WebSocket closed with {self.code}')\n\n\nclass PrivilegedIntentsRequired(ClientException):\n    \"\"\"Exception that's raised when the gateway is requesting privileged intents\n    but they're not ticked in the developer page yet.\n\n    Go to https://discord.com/developers/applications/ and enable the intents\n    that are required. Currently these are as follows:\n\n    - :attr:`Intents.members`\n    - :attr:`Intents.presences`\n    - :attr:`Intents.message_content`\n\n    Attributes\n    -----------\n    shard_id: Optional[:class:`int`]\n        The shard ID that got closed if applicable.\n    \"\"\"\n\n    def __init__(self, shard_id: Optional[int]):\n        self.shard_id: Optional[int] = shard_id\n        msg = (\n            'Shard ID %s is requesting privileged intents that have not been explicitly enabled in the '\n            'developer portal. It is recommended to go to https://discord.com/developers/applications/ '\n            'and explicitly enable the privileged intents within your application\\'s page. If this is not '\n            'possible, then consider disabling the privileged intents instead.'\n        )\n        super().__init__(msg % shard_id)\n\n\nclass InteractionResponded(ClientException):\n    \"\"\"Exception that's raised when sending another interaction response using\n    :class:`InteractionResponse` when one has already been done before.\n\n    An interaction can only respond once.\n\n    .. versionadded:: 2.0\n\n    Attributes\n    -----------\n    interaction: :class:`Interaction`\n        The interaction that's already been responded to.\n    \"\"\"\n\n    def __init__(self, interaction: Interaction):\n        self.interaction: Interaction = interaction\n        super().__init__('This interaction has already been responded to before')\n"
  },
  {
    "path": "discord/ext/commands/__init__.py",
    "content": "\"\"\"\ndiscord.ext.commands\n~~~~~~~~~~~~~~~~~~~~~\n\nAn extension module to facilitate creation of bot commands.\n\n:copyright: (c) 2015-present Rapptz\n:license: MIT, see LICENSE for more details.\n\"\"\"\n\nfrom .bot import *\nfrom .cog import *\nfrom .context import *\nfrom .converter import *\nfrom .cooldowns import *\nfrom .core import *\nfrom .errors import *\nfrom .flags import *\nfrom .help import *\nfrom .parameters import *\nfrom .hybrid import *\n"
  },
  {
    "path": "discord/ext/commands/_types.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\n\nfrom typing import Any, Awaitable, Callable, Coroutine, TYPE_CHECKING, Protocol, TypeVar, Union, Tuple, Optional\n\n\nT = TypeVar('T')\n\nif TYPE_CHECKING:\n    from typing_extensions import ParamSpec\n\n    from .bot import Bot, AutoShardedBot\n    from .context import Context\n    from .cog import Cog\n    from .errors import CommandError\n\n    P = ParamSpec('P')\n    MaybeAwaitableFunc = Callable[P, 'MaybeAwaitable[T]']\nelse:\n    P = TypeVar('P')\n    MaybeAwaitableFunc = Tuple[P, T]\n\n_Bot = Union['Bot', 'AutoShardedBot']\nCoro = Coroutine[Any, Any, T]\nCoroFunc = Callable[..., Coro[Any]]\nMaybeCoro = Union[T, Coro[T]]\nMaybeAwaitable = Union[T, Awaitable[T]]\n\nCogT = TypeVar('CogT', bound='Optional[Cog]')\nUserCheck = Callable[[\"ContextT\"], MaybeCoro[bool]]\nHook = Union[Callable[[\"CogT\", \"ContextT\"], Coro[Any]], Callable[[\"ContextT\"], Coro[Any]]]\nError = Union[Callable[[\"CogT\", \"ContextT\", \"CommandError\"], Coro[Any]], Callable[[\"ContextT\", \"CommandError\"], Coro[Any]]]\n\nContextT = TypeVar('ContextT', bound='Context[Any]')\nBotT = TypeVar('BotT', bound=_Bot, covariant=True)\n\nContextT_co = TypeVar('ContextT_co', bound='Context[Any]', covariant=True)\n\n\nclass Check(Protocol[ContextT_co]):  # type: ignore # TypeVar is expected to be invariant\n\n    predicate: Callable[[ContextT_co], Coroutine[Any, Any, bool]]\n\n    def __call__(self, coro_or_commands: T) -> T:\n        ...\n\n\n# This is merely a tag type to avoid circular import issues.\n# Yes, this is a terrible solution but ultimately it is the only solution.\nclass _BaseCommand:\n    __slots__ = ()\n"
  },
  {
    "path": "discord/ext/commands/bot.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom __future__ import annotations\n\n\nimport asyncio\nimport collections\nimport collections.abc\nimport inspect\nimport importlib.util\nimport sys\nimport logging\nimport types\nfrom typing import (\n    Any,\n    Callable,\n    Mapping,\n    List,\n    Dict,\n    TYPE_CHECKING,\n    Optional,\n    Sequence,\n    TypeVar,\n    Type,\n    Union,\n    Iterable,\n    Collection,\n    overload,\n)\n\nimport discord\nfrom discord import app_commands\nfrom discord.app_commands.tree import _retrieve_guild_ids\nfrom discord.utils import MISSING, _is_submodule\n\nfrom .core import GroupMixin\nfrom .view import StringView\nfrom .context import Context\nfrom . import errors\nfrom .help import HelpCommand, DefaultHelpCommand\nfrom .cog import Cog\nfrom .hybrid import hybrid_command, hybrid_group, HybridCommand, HybridGroup\n\nif TYPE_CHECKING:\n    from typing_extensions import Self\n\n    import importlib.machinery\n\n    from discord.message import Message\n    from discord.interactions import Interaction\n    from discord.abc import User, Snowflake\n    from ._types import (\n        _Bot,\n        BotT,\n        UserCheck,\n        CoroFunc,\n        ContextT,\n        MaybeAwaitableFunc,\n    )\n    from .core import Command\n    from .hybrid import CommandCallback, ContextT, P\n\n    _Prefix = Union[Iterable[str], str]\n    _PrefixCallable = MaybeAwaitableFunc[[BotT, Message], _Prefix]\n    PrefixType = Union[_Prefix, _PrefixCallable[BotT]]\n\n__all__ = (\n    'when_mentioned',\n    'when_mentioned_or',\n    'Bot',\n    'AutoShardedBot',\n)\n\nT = TypeVar('T')\nCFT = TypeVar('CFT', bound='CoroFunc')\n\n_log = logging.getLogger(__name__)\n\n\ndef when_mentioned(bot: _Bot, msg: Message, /) -> List[str]:\n    \"\"\"A callable that implements a command prefix equivalent to being mentioned.\n\n    These are meant to be passed into the :attr:`.Bot.command_prefix` attribute.\n\n        .. versionchanged:: 2.0\n\n            ``bot`` and ``msg`` parameters are now positional-only.\n    \"\"\"\n    # bot.user will never be None when this is called\n    return [f'<@{bot.user.id}> ', f'<@!{bot.user.id}> ']  # type: ignore\n\n\ndef when_mentioned_or(*prefixes: str) -> Callable[[_Bot, Message], List[str]]:\n    \"\"\"A callable that implements when mentioned or other prefixes provided.\n\n    These are meant to be passed into the :attr:`.Bot.command_prefix` attribute.\n\n    Example\n    --------\n\n    .. code-block:: python3\n\n        bot = commands.Bot(command_prefix=commands.when_mentioned_or('!'))\n\n\n    .. note::\n\n        This callable returns another callable, so if this is done inside a custom\n        callable, you must call the returned callable, for example:\n\n        .. code-block:: python3\n\n            async def get_prefix(bot, message):\n                extras = await prefixes_for(message.guild) # returns a list\n                return commands.when_mentioned_or(*extras)(bot, message)\n\n\n    See Also\n    ----------\n    :func:`.when_mentioned`\n    \"\"\"\n\n    def inner(bot, msg):\n        r = list(prefixes)\n        r = when_mentioned(bot, msg) + r\n        return r\n\n    return inner\n\n\nclass _DefaultRepr:\n    def __repr__(self):\n        return '<default-help-command>'\n\n\n_default: Any = _DefaultRepr()\n\n\nclass BotBase(GroupMixin[None]):\n    def __init__(\n        self,\n        command_prefix: PrefixType[BotT],\n        *,\n        help_command: Optional[HelpCommand] = _default,\n        tree_cls: Type[app_commands.CommandTree[Any]] = app_commands.CommandTree,\n        description: Optional[str] = None,\n        allowed_contexts: app_commands.AppCommandContext = MISSING,\n        allowed_installs: app_commands.AppInstallationType = MISSING,\n        intents: discord.Intents,\n        **options: Any,\n    ) -> None:\n        super().__init__(intents=intents, **options)\n        self.command_prefix: PrefixType[BotT] = command_prefix\n        self.extra_events: Dict[str, List[CoroFunc]] = {}\n        # Self doesn't have the ClientT bound, but since this is a mixin it technically does\n        self.__tree: app_commands.CommandTree[Self] = tree_cls(self)  # type: ignore\n        if allowed_contexts is not MISSING:\n            self.__tree.allowed_contexts = allowed_contexts\n        if allowed_installs is not MISSING:\n            self.__tree.allowed_installs = allowed_installs\n\n        self.__cogs: Dict[str, Cog] = {}\n        self.__extensions: Dict[str, types.ModuleType] = {}\n        self._checks: List[UserCheck] = []\n        self._check_once: List[UserCheck] = []\n        self._before_invoke: Optional[CoroFunc] = None\n        self._after_invoke: Optional[CoroFunc] = None\n        self._help_command: Optional[HelpCommand] = None\n        self.description: str = inspect.cleandoc(description) if description else ''\n        self.owner_id: Optional[int] = options.get('owner_id')\n        self.owner_ids: Optional[Collection[int]] = options.get('owner_ids', set())\n        self.strip_after_prefix: bool = options.get('strip_after_prefix', False)\n\n        if self.owner_id and self.owner_ids:\n            raise TypeError('Both owner_id and owner_ids are set.')\n\n        if self.owner_ids and not isinstance(self.owner_ids, collections.abc.Collection):\n            raise TypeError(f'owner_ids must be a collection not {self.owner_ids.__class__.__name__}')\n\n        if help_command is _default:\n            self.help_command = DefaultHelpCommand()\n        else:\n            self.help_command = help_command\n\n    # internal helpers\n\n    async def _async_setup_hook(self) -> None:\n        # self/super() resolves to Client/AutoShardedClient\n        await super()._async_setup_hook()  # type: ignore\n        prefix = self.command_prefix\n\n        # This has to be here because for the default logging set up to capture\n        # the logging calls, they have to come after the `Client.run` call.\n        # The best place to do this is in an async init scenario\n        if not self.intents.message_content:  # type: ignore\n            trigger_warning = (\n                (callable(prefix) and prefix is not when_mentioned)\n                or isinstance(prefix, str)\n                or (isinstance(prefix, collections.abc.Iterable) and len(list(prefix)) >= 1)\n            )\n            if trigger_warning:\n                _log.warning('Privileged message content intent is missing, commands may not work as expected.')\n\n    def dispatch(self, event_name: str, /, *args: Any, **kwargs: Any) -> None:\n        # super() will resolve to Client\n        super().dispatch(event_name, *args, **kwargs)  # type: ignore\n        ev = 'on_' + event_name\n        for event in self.extra_events.get(ev, []):\n            self._schedule_event(event, ev, *args, **kwargs)  # type: ignore\n\n    @discord.utils.copy_doc(discord.Client.close)\n    async def close(self) -> None:\n        for extension in tuple(self.__extensions):\n            try:\n                await self.unload_extension(extension)\n            except Exception:\n                pass\n\n        for cog in tuple(self.__cogs):\n            try:\n                await self.remove_cog(cog)\n            except Exception:\n                pass\n\n        await super().close()  # type: ignore\n\n    # GroupMixin overrides\n\n    @discord.utils.copy_doc(GroupMixin.add_command)\n    def add_command(self, command: Command[Any, ..., Any], /) -> None:\n        super().add_command(command)\n        if isinstance(command, (HybridCommand, HybridGroup)) and command.app_command:\n            # If a cog is also inheriting from app_commands.Group then it'll also\n            # add the hybrid commands as text commands, which would recursively add the\n            # hybrid commands as slash commands. This check just terminates that recursion\n            # from happening\n            if command.cog is None or not command.cog.__cog_is_app_commands_group__:\n                self.tree.add_command(command.app_command)\n\n    @discord.utils.copy_doc(GroupMixin.remove_command)\n    def remove_command(self, name: str, /) -> Optional[Command[Any, ..., Any]]:\n        cmd: Optional[Command[Any, ..., Any]] = super().remove_command(name)\n        if isinstance(cmd, (HybridCommand, HybridGroup)) and cmd.app_command:\n            # See above\n            if cmd.cog is not None and cmd.cog.__cog_is_app_commands_group__:\n                return cmd\n\n            guild_ids: Optional[List[int]] = cmd.app_command._guild_ids\n            if guild_ids is None:\n                self.__tree.remove_command(name)\n            else:\n                for guild_id in guild_ids:\n                    self.__tree.remove_command(name, guild=discord.Object(id=guild_id))\n\n        return cmd\n\n    def hybrid_command(\n        self,\n        name: Union[str, app_commands.locale_str] = MISSING,\n        with_app_command: bool = True,\n        *args: Any,\n        **kwargs: Any,\n    ) -> Callable[[CommandCallback[Any, ContextT, P, T]], HybridCommand[Any, P, T]]:\n        \"\"\"A shortcut decorator that invokes :func:`~discord.ext.commands.hybrid_command` and adds it to\n        the internal command list via :meth:`add_command`.\n\n        Returns\n        --------\n        Callable[..., :class:`HybridCommand`]\n            A decorator that converts the provided method into a Command, adds it to the bot, then returns it.\n        \"\"\"\n\n        def decorator(func: CommandCallback[Any, ContextT, P, T]):\n            kwargs.setdefault('parent', self)\n            result = hybrid_command(name=name, *args, with_app_command=with_app_command, **kwargs)(func)\n            self.add_command(result)\n            return result\n\n        return decorator\n\n    def hybrid_group(\n        self,\n        name: Union[str, app_commands.locale_str] = MISSING,\n        with_app_command: bool = True,\n        *args: Any,\n        **kwargs: Any,\n    ) -> Callable[[CommandCallback[Any, ContextT, P, T]], HybridGroup[Any, P, T]]:\n        \"\"\"A shortcut decorator that invokes :func:`~discord.ext.commands.hybrid_group` and adds it to\n        the internal command list via :meth:`add_command`.\n\n        Returns\n        --------\n        Callable[..., :class:`HybridGroup`]\n            A decorator that converts the provided method into a Group, adds it to the bot, then returns it.\n        \"\"\"\n\n        def decorator(func: CommandCallback[Any, ContextT, P, T]):\n            kwargs.setdefault('parent', self)\n            result = hybrid_group(name=name, *args, with_app_command=with_app_command, **kwargs)(func)\n            self.add_command(result)\n            return result\n\n        return decorator\n\n    # Error handler\n\n    async def on_command_error(self, context: Context[BotT], exception: errors.CommandError, /) -> None:\n        \"\"\"|coro|\n\n        The default command error handler provided by the bot.\n\n        By default this logs to the library logger, however it could be\n        overridden to have a different implementation.\n\n        This only fires if you do not specify any listeners for command error.\n\n        .. versionchanged:: 2.0\n\n            ``context`` and ``exception`` parameters are now positional-only.\n            Instead of writing to ``sys.stderr`` this now uses the library logger.\n        \"\"\"\n        if self.extra_events.get('on_command_error', None):\n            return\n\n        command = context.command\n        if command and command.has_error_handler():\n            return\n\n        cog = context.cog\n        if cog and cog.has_error_handler():\n            return\n\n        _log.error('Ignoring exception in command %s', command, exc_info=exception)\n\n    # global check registration\n\n    def check(self, func: T, /) -> T:\n        r\"\"\"A decorator that adds a global check to the bot.\n\n        A global check is similar to a :func:`.check` that is applied\n        on a per command basis except it is run before any command checks\n        have been verified and applies to every command the bot has.\n\n        .. note::\n\n            This function can either be a regular function or a coroutine.\n\n        Similar to a command :func:`.check`\\, this takes a single parameter\n        of type :class:`.Context` and can only raise exceptions inherited from\n        :exc:`.CommandError`.\n\n        Example\n        ---------\n\n        .. code-block:: python3\n\n            @bot.check\n            def check_commands(ctx):\n                return ctx.command.qualified_name in allowed_commands\n\n        .. versionchanged:: 2.0\n\n            ``func`` parameter is now positional-only.\n        \"\"\"\n        # T was used instead of Check to ensure the type matches on return\n        self.add_check(func)  # type: ignore\n        return func\n\n    def add_check(self, func: UserCheck[ContextT], /, *, call_once: bool = False) -> None:\n        \"\"\"Adds a global check to the bot.\n\n        This is the non-decorator interface to :meth:`.check`\n        and :meth:`.check_once`.\n\n        .. versionchanged:: 2.0\n\n            ``func`` parameter is now positional-only.\n\n        .. seealso:: The :func:`~discord.ext.commands.check` decorator\n\n        Parameters\n        -----------\n        func\n            The function that was used as a global check.\n        call_once: :class:`bool`\n            If the function should only be called once per\n            :meth:`.invoke` call.\n        \"\"\"\n\n        if call_once:\n            self._check_once.append(func)\n        else:\n            self._checks.append(func)\n\n    def remove_check(self, func: UserCheck[ContextT], /, *, call_once: bool = False) -> None:\n        \"\"\"Removes a global check from the bot.\n\n        This function is idempotent and will not raise an exception\n        if the function is not in the global checks.\n\n        .. versionchanged:: 2.0\n\n            ``func`` parameter is now positional-only.\n\n        Parameters\n        -----------\n        func\n            The function to remove from the global checks.\n        call_once: :class:`bool`\n            If the function was added with ``call_once=True`` in\n            the :meth:`.Bot.add_check` call or using :meth:`.check_once`.\n        \"\"\"\n        l = self._check_once if call_once else self._checks\n\n        try:\n            l.remove(func)\n        except ValueError:\n            pass\n\n    def check_once(self, func: CFT, /) -> CFT:\n        r\"\"\"A decorator that adds a \"call once\" global check to the bot.\n\n        Unlike regular global checks, this one is called only once\n        per :meth:`.invoke` call.\n\n        Regular global checks are called whenever a command is called\n        or :meth:`.Command.can_run` is called. This type of check\n        bypasses that and ensures that it's called only once, even inside\n        the default help command.\n\n        .. note::\n\n            When using this function the :class:`.Context` sent to a group subcommand\n            may only parse the parent command and not the subcommands due to it\n            being invoked once per :meth:`.Bot.invoke` call.\n\n        .. note::\n\n            This function can either be a regular function or a coroutine.\n\n        Similar to a command :func:`.check`\\, this takes a single parameter\n        of type :class:`.Context` and can only raise exceptions inherited from\n        :exc:`.CommandError`.\n\n        Example\n        ---------\n\n        .. code-block:: python3\n\n            @bot.check_once\n            def whitelist(ctx):\n                return ctx.message.author.id in my_whitelist\n\n        .. versionchanged:: 2.0\n\n            ``func`` parameter is now positional-only.\n\n        \"\"\"\n        self.add_check(func, call_once=True)\n        return func\n\n    async def can_run(self, ctx: Context[BotT], /, *, call_once: bool = False) -> bool:\n        data = self._check_once if call_once else self._checks\n\n        if len(data) == 0:\n            return True\n\n        return await discord.utils.async_all(f(ctx) for f in data)\n\n    async def is_owner(self, user: User, /) -> bool:\n        \"\"\"|coro|\n\n        Checks if a :class:`~discord.User` or :class:`~discord.Member` is the owner of\n        this bot.\n\n        If an :attr:`owner_id` is not set, it is fetched automatically\n        through the use of :meth:`~.Bot.application_info`.\n\n        .. versionchanged:: 1.3\n            The function also checks if the application is team-owned if\n            :attr:`owner_ids` is not set.\n\n        .. versionchanged:: 2.0\n\n            ``user`` parameter is now positional-only.\n\n        .. versionchanged:: 2.4\n\n            This function now respects the team member roles if the bot is team-owned.\n            In order to be considered an owner, they must be either an admin or\n            a developer.\n\n        Parameters\n        -----------\n        user: :class:`.abc.User`\n            The user to check for.\n\n        Returns\n        --------\n        :class:`bool`\n            Whether the user is the owner.\n        \"\"\"\n\n        if self.owner_id:\n            return user.id == self.owner_id\n        elif self.owner_ids:\n            return user.id in self.owner_ids\n        else:\n            app: discord.AppInfo = await self.application_info()  # type: ignore\n            if app.team:\n                self.owner_ids = ids = {\n                    m.id\n                    for m in app.team.members\n                    if m.role in (discord.TeamMemberRole.admin, discord.TeamMemberRole.developer)\n                }\n                return user.id in ids\n            else:\n                self.owner_id = owner_id = app.owner.id\n                return user.id == owner_id\n\n    def before_invoke(self, coro: CFT, /) -> CFT:\n        \"\"\"A decorator that registers a coroutine as a pre-invoke hook.\n\n        A pre-invoke hook is called directly before the command is\n        called. This makes it a useful function to set up database\n        connections or any type of set up required.\n\n        This pre-invoke hook takes a sole parameter, a :class:`.Context`.\n\n        .. note::\n\n            The :meth:`~.Bot.before_invoke` and :meth:`~.Bot.after_invoke` hooks are\n            only called if all checks and argument parsing procedures pass\n            without error. If any check or argument parsing procedures fail\n            then the hooks are not called.\n\n        .. versionchanged:: 2.0\n\n            ``coro`` parameter is now positional-only.\n\n        Parameters\n        -----------\n        coro: :ref:`coroutine <coroutine>`\n            The coroutine to register as the pre-invoke hook.\n\n        Raises\n        -------\n        TypeError\n            The coroutine passed is not actually a coroutine.\n        \"\"\"\n        if not asyncio.iscoroutinefunction(coro):\n            raise TypeError('The pre-invoke hook must be a coroutine.')\n\n        self._before_invoke = coro\n        return coro\n\n    def after_invoke(self, coro: CFT, /) -> CFT:\n        r\"\"\"A decorator that registers a coroutine as a post-invoke hook.\n\n        A post-invoke hook is called directly after the command is\n        called. This makes it a useful function to clean-up database\n        connections or any type of clean up required.\n\n        This post-invoke hook takes a sole parameter, a :class:`.Context`.\n\n        .. note::\n\n            Similar to :meth:`~.Bot.before_invoke`\\, this is not called unless\n            checks and argument parsing procedures succeed. This hook is,\n            however, **always** called regardless of the internal command\n            callback raising an error (i.e. :exc:`.CommandInvokeError`\\).\n            This makes it ideal for clean-up scenarios.\n\n        .. versionchanged:: 2.0\n\n            ``coro`` parameter is now positional-only.\n\n        Parameters\n        -----------\n        coro: :ref:`coroutine <coroutine>`\n            The coroutine to register as the post-invoke hook.\n\n        Raises\n        -------\n        TypeError\n            The coroutine passed is not actually a coroutine.\n        \"\"\"\n        if not asyncio.iscoroutinefunction(coro):\n            raise TypeError('The post-invoke hook must be a coroutine.')\n\n        self._after_invoke = coro\n        return coro\n\n    # listener registration\n\n    def add_listener(self, func: CoroFunc, /, name: str = MISSING) -> None:\n        \"\"\"The non decorator alternative to :meth:`.listen`.\n\n        .. versionchanged:: 2.0\n\n            ``func`` parameter is now positional-only.\n\n        Parameters\n        -----------\n        func: :ref:`coroutine <coroutine>`\n            The function to call.\n        name: :class:`str`\n            The name of the event to listen for. Defaults to ``func.__name__``.\n\n        Example\n        --------\n\n        .. code-block:: python3\n\n            async def on_ready(): pass\n            async def my_message(message): pass\n\n            bot.add_listener(on_ready)\n            bot.add_listener(my_message, 'on_message')\n\n        \"\"\"\n        name = func.__name__ if name is MISSING else name\n\n        if not asyncio.iscoroutinefunction(func):\n            raise TypeError('Listeners must be coroutines')\n\n        if name in self.extra_events:\n            self.extra_events[name].append(func)\n        else:\n            self.extra_events[name] = [func]\n\n    def remove_listener(self, func: CoroFunc, /, name: str = MISSING) -> None:\n        \"\"\"Removes a listener from the pool of listeners.\n\n        .. versionchanged:: 2.0\n\n            ``func`` parameter is now positional-only.\n\n        Parameters\n        -----------\n        func\n            The function that was used as a listener to remove.\n        name: :class:`str`\n            The name of the event we want to remove. Defaults to\n            ``func.__name__``.\n        \"\"\"\n\n        name = func.__name__ if name is MISSING else name\n\n        if name in self.extra_events:\n            try:\n                self.extra_events[name].remove(func)\n            except ValueError:\n                pass\n\n    def listen(self, name: str = MISSING) -> Callable[[CFT], CFT]:\n        \"\"\"A decorator that registers another function as an external\n        event listener. Basically this allows you to listen to multiple\n        events from different places e.g. such as :func:`.on_ready`\n\n        The functions being listened to must be a :ref:`coroutine <coroutine>`.\n\n        Example\n        --------\n\n        .. code-block:: python3\n\n            @bot.listen()\n            async def on_message(message):\n                print('one')\n\n            # in some other file...\n\n            @bot.listen('on_message')\n            async def my_message(message):\n                print('two')\n\n        Would print one and two in an unspecified order.\n\n        Raises\n        -------\n        TypeError\n            The function being listened to is not a coroutine.\n        \"\"\"\n\n        def decorator(func: CFT) -> CFT:\n            self.add_listener(func, name)\n            return func\n\n        return decorator\n\n    # cogs\n\n    async def add_cog(\n        self,\n        cog: Cog,\n        /,\n        *,\n        override: bool = False,\n        guild: Optional[Snowflake] = MISSING,\n        guilds: Sequence[Snowflake] = MISSING,\n    ) -> None:\n        \"\"\"|coro|\n\n        Adds a \"cog\" to the bot.\n\n        A cog is a class that has its own event listeners and commands.\n\n        If the cog is a :class:`.app_commands.Group` then it is added to\n        the bot's :class:`~discord.app_commands.CommandTree` as well.\n\n        .. note::\n\n            Exceptions raised inside a :class:`.Cog`'s :meth:`~.Cog.cog_load` method will be\n            propagated to the caller.\n\n        .. versionchanged:: 2.0\n\n            :exc:`.ClientException` is raised when a cog with the same name\n            is already loaded.\n\n        .. versionchanged:: 2.0\n\n            ``cog`` parameter is now positional-only.\n\n        .. versionchanged:: 2.0\n\n            This method is now a :term:`coroutine`.\n\n        Parameters\n        -----------\n        cog: :class:`.Cog`\n            The cog to register to the bot.\n        override: :class:`bool`\n            If a previously loaded cog with the same name should be ejected\n            instead of raising an error.\n\n            .. versionadded:: 2.0\n        guild: Optional[:class:`~discord.abc.Snowflake`]\n            If the cog is an application command group, then this would be the\n            guild where the cog group would be added to. If not given then\n            it becomes a global command instead.\n\n            .. versionadded:: 2.0\n        guilds: List[:class:`~discord.abc.Snowflake`]\n            If the cog is an application command group, then this would be the\n            guilds where the cog group would be added to. If not given then\n            it becomes a global command instead. Cannot be mixed with\n            ``guild``.\n\n            .. versionadded:: 2.0\n\n        Raises\n        -------\n        TypeError\n            The cog does not inherit from :class:`.Cog`.\n        CommandError\n            An error happened during loading.\n        ClientException\n            A cog with the same name is already loaded.\n        \"\"\"\n\n        if not isinstance(cog, Cog):\n            raise TypeError('cogs must derive from Cog')\n\n        cog_name = cog.__cog_name__\n        existing = self.__cogs.get(cog_name)\n\n        if existing is not None:\n            if not override:\n                raise discord.ClientException(f'Cog named {cog_name!r} already loaded')\n            await self.remove_cog(cog_name, guild=guild, guilds=guilds)\n\n        if cog.__cog_app_commands_group__:\n            self.__tree.add_command(cog.__cog_app_commands_group__, override=override, guild=guild, guilds=guilds)\n\n        cog = await cog._inject(self, override=override, guild=guild, guilds=guilds)\n        self.__cogs[cog_name] = cog\n\n    def get_cog(self, name: str, /) -> Optional[Cog]:\n        \"\"\"Gets the cog instance requested.\n\n        If the cog is not found, ``None`` is returned instead.\n\n        .. versionchanged:: 2.0\n\n            ``name`` parameter is now positional-only.\n\n        Parameters\n        -----------\n        name: :class:`str`\n            The name of the cog you are requesting.\n            This is equivalent to the name passed via keyword\n            argument in class creation or the class name if unspecified.\n\n        Returns\n        --------\n        Optional[:class:`Cog`]\n            The cog that was requested. If not found, returns ``None``.\n        \"\"\"\n        return self.__cogs.get(name)\n\n    async def remove_cog(\n        self,\n        name: str,\n        /,\n        *,\n        guild: Optional[Snowflake] = MISSING,\n        guilds: Sequence[Snowflake] = MISSING,\n    ) -> Optional[Cog]:\n        \"\"\"|coro|\n\n        Removes a cog from the bot and returns it.\n\n        All registered commands and event listeners that the\n        cog has registered will be removed as well.\n\n        If no cog is found then this method has no effect.\n\n        .. versionchanged:: 2.0\n\n            ``name`` parameter is now positional-only.\n\n        .. versionchanged:: 2.0\n\n            This method is now a :term:`coroutine`.\n\n        Parameters\n        -----------\n        name: :class:`str`\n            The name of the cog to remove.\n        guild: Optional[:class:`~discord.abc.Snowflake`]\n            If the cog is an application command group, then this would be the\n            guild where the cog group would be removed from. If not given then\n            a global command is removed instead instead.\n\n            .. versionadded:: 2.0\n        guilds: List[:class:`~discord.abc.Snowflake`]\n            If the cog is an application command group, then this would be the\n            guilds where the cog group would be removed from. If not given then\n            a global command is removed instead instead. Cannot be mixed with\n            ``guild``.\n\n            .. versionadded:: 2.0\n\n        Returns\n        -------\n        Optional[:class:`.Cog`]\n             The cog that was removed. ``None`` if not found.\n        \"\"\"\n\n        cog = self.__cogs.pop(name, None)\n        if cog is None:\n            return\n\n        help_command = self._help_command\n        if help_command and help_command.cog is cog:\n            help_command.cog = None\n\n        guild_ids = _retrieve_guild_ids(cog, guild, guilds)\n        if cog.__cog_app_commands_group__:\n            if guild_ids is None:\n                self.__tree.remove_command(name)\n            else:\n                for guild_id in guild_ids:\n                    self.__tree.remove_command(name, guild=discord.Object(guild_id))\n\n        await cog._eject(self, guild_ids=guild_ids)\n\n        return cog\n\n    @property\n    def cogs(self) -> Mapping[str, Cog]:\n        \"\"\"Mapping[:class:`str`, :class:`Cog`]: A read-only mapping of cog name to cog.\"\"\"\n        return types.MappingProxyType(self.__cogs)\n\n    # extensions\n\n    async def _remove_module_references(self, name: str) -> None:\n        # find all references to the module\n        # remove the cogs registered from the module\n        for cogname, cog in self.__cogs.copy().items():\n            if _is_submodule(name, cog.__module__):\n                await self.remove_cog(cogname)\n\n        # remove all the commands from the module\n        for cmd in self.all_commands.copy().values():\n            if cmd.module is not None and _is_submodule(name, cmd.module):\n                if isinstance(cmd, GroupMixin):\n                    cmd.recursively_remove_all_commands()\n                self.remove_command(cmd.name)\n\n        # remove all the listeners from the module\n        for event_list in self.extra_events.copy().values():\n            remove = []\n            for index, event in enumerate(event_list):\n                if event.__module__ is not None and _is_submodule(name, event.__module__):\n                    remove.append(index)\n\n            for index in reversed(remove):\n                del event_list[index]\n\n        # remove all relevant application commands from the tree\n        self.__tree._remove_with_module(name)\n\n    async def _call_module_finalizers(self, lib: types.ModuleType, key: str) -> None:\n        try:\n            func = getattr(lib, 'teardown')\n        except AttributeError:\n            pass\n        else:\n            try:\n                await func(self)\n            except Exception:\n                pass\n        finally:\n            self.__extensions.pop(key, None)\n            sys.modules.pop(key, None)\n            name = lib.__name__\n            for module in list(sys.modules.keys()):\n                if _is_submodule(name, module):\n                    del sys.modules[module]\n\n    async def _load_from_module_spec(self, spec: importlib.machinery.ModuleSpec, key: str) -> None:\n        # precondition: key not in self.__extensions\n        lib = importlib.util.module_from_spec(spec)\n        sys.modules[key] = lib\n        try:\n            spec.loader.exec_module(lib)  # type: ignore\n        except Exception as e:\n            del sys.modules[key]\n            raise errors.ExtensionFailed(key, e) from e\n\n        try:\n            setup = getattr(lib, 'setup')\n        except AttributeError:\n            del sys.modules[key]\n            raise errors.NoEntryPointError(key)\n\n        try:\n            await setup(self)\n        except Exception as e:\n            del sys.modules[key]\n            await self._remove_module_references(lib.__name__)\n            await self._call_module_finalizers(lib, key)\n            raise errors.ExtensionFailed(key, e) from e\n        else:\n            self.__extensions[key] = lib\n\n    def _resolve_name(self, name: str, package: Optional[str]) -> str:\n        try:\n            return importlib.util.resolve_name(name, package)\n        except ImportError:\n            raise errors.ExtensionNotFound(name)\n\n    async def load_extension(self, name: str, *, package: Optional[str] = None) -> None:\n        \"\"\"|coro|\n\n        Loads an extension.\n\n        An extension is a python module that contains commands, cogs, or\n        listeners.\n\n        An extension must have a global function, ``setup`` defined as\n        the entry point on what to do when the extension is loaded. This entry\n        point must have a single argument, the ``bot``.\n\n        .. versionchanged:: 2.0\n\n            This method is now a :term:`coroutine`.\n\n        Parameters\n        ------------\n        name: :class:`str`\n            The extension name to load. It must be dot separated like\n            regular Python imports if accessing a sub-module. e.g.\n            ``foo.test`` if you want to import ``foo/test.py``.\n        package: Optional[:class:`str`]\n            The package name to resolve relative imports with.\n            This is required when loading an extension using a relative path, e.g ``.foo.test``.\n            Defaults to ``None``.\n\n            .. versionadded:: 1.7\n\n        Raises\n        --------\n        ExtensionNotFound\n            The extension could not be imported.\n            This is also raised if the name of the extension could not\n            be resolved using the provided ``package`` parameter.\n        ExtensionAlreadyLoaded\n            The extension is already loaded.\n        NoEntryPointError\n            The extension does not have a setup function.\n        ExtensionFailed\n            The extension or its setup function had an execution error.\n        \"\"\"\n\n        name = self._resolve_name(name, package)\n        if name in self.__extensions:\n            raise errors.ExtensionAlreadyLoaded(name)\n\n        spec = importlib.util.find_spec(name)\n        if spec is None:\n            raise errors.ExtensionNotFound(name)\n\n        await self._load_from_module_spec(spec, name)\n\n    async def unload_extension(self, name: str, *, package: Optional[str] = None) -> None:\n        \"\"\"|coro|\n\n        Unloads an extension.\n\n        When the extension is unloaded, all commands, listeners, and cogs are\n        removed from the bot and the module is un-imported.\n\n        The extension can provide an optional global function, ``teardown``,\n        to do miscellaneous clean-up if necessary. This function takes a single\n        parameter, the ``bot``, similar to ``setup`` from\n        :meth:`~.Bot.load_extension`.\n\n        .. versionchanged:: 2.0\n\n            This method is now a :term:`coroutine`.\n\n        Parameters\n        ------------\n        name: :class:`str`\n            The extension name to unload. It must be dot separated like\n            regular Python imports if accessing a sub-module. e.g.\n            ``foo.test`` if you want to import ``foo/test.py``.\n        package: Optional[:class:`str`]\n            The package name to resolve relative imports with.\n            This is required when unloading an extension using a relative path, e.g ``.foo.test``.\n            Defaults to ``None``.\n\n            .. versionadded:: 1.7\n\n        Raises\n        -------\n        ExtensionNotFound\n            The name of the extension could not\n            be resolved using the provided ``package`` parameter.\n        ExtensionNotLoaded\n            The extension was not loaded.\n        \"\"\"\n\n        name = self._resolve_name(name, package)\n        lib = self.__extensions.get(name)\n        if lib is None:\n            raise errors.ExtensionNotLoaded(name)\n\n        await self._remove_module_references(lib.__name__)\n        await self._call_module_finalizers(lib, name)\n\n    async def reload_extension(self, name: str, *, package: Optional[str] = None) -> None:\n        \"\"\"|coro|\n\n        Atomically reloads an extension.\n\n        This replaces the extension with the same extension, only refreshed. This is\n        equivalent to a :meth:`unload_extension` followed by a :meth:`load_extension`\n        except done in an atomic way. That is, if an operation fails mid-reload then\n        the bot will roll-back to the prior working state.\n\n        Parameters\n        ------------\n        name: :class:`str`\n            The extension name to reload. It must be dot separated like\n            regular Python imports if accessing a sub-module. e.g.\n            ``foo.test`` if you want to import ``foo/test.py``.\n        package: Optional[:class:`str`]\n            The package name to resolve relative imports with.\n            This is required when reloading an extension using a relative path, e.g ``.foo.test``.\n            Defaults to ``None``.\n\n            .. versionadded:: 1.7\n\n        Raises\n        -------\n        ExtensionNotLoaded\n            The extension was not loaded.\n        ExtensionNotFound\n            The extension could not be imported.\n            This is also raised if the name of the extension could not\n            be resolved using the provided ``package`` parameter.\n        NoEntryPointError\n            The extension does not have a setup function.\n        ExtensionFailed\n            The extension setup function had an execution error.\n        \"\"\"\n\n        name = self._resolve_name(name, package)\n        lib = self.__extensions.get(name)\n        if lib is None:\n            raise errors.ExtensionNotLoaded(name)\n\n        # get the previous module states from sys modules\n        # fmt: off\n        modules = {\n            name: module\n            for name, module in sys.modules.items()\n            if _is_submodule(lib.__name__, name)\n        }\n        # fmt: on\n\n        try:\n            # Unload and then load the module...\n            await self._remove_module_references(lib.__name__)\n            await self._call_module_finalizers(lib, name)\n            await self.load_extension(name)\n        except Exception:\n            # if the load failed, the remnants should have been\n            # cleaned from the load_extension function call\n            # so let's load it from our old compiled library.\n            await lib.setup(self)\n            self.__extensions[name] = lib\n\n            # revert sys.modules back to normal and raise back to caller\n            sys.modules.update(modules)\n            raise\n\n    @property\n    def extensions(self) -> Mapping[str, types.ModuleType]:\n        \"\"\"Mapping[:class:`str`, :class:`py:types.ModuleType`]: A read-only mapping of extension name to extension.\"\"\"\n        return types.MappingProxyType(self.__extensions)\n\n    # help command stuff\n\n    @property\n    def help_command(self) -> Optional[HelpCommand]:\n        return self._help_command\n\n    @help_command.setter\n    def help_command(self, value: Optional[HelpCommand]) -> None:\n        if value is not None:\n            if not isinstance(value, HelpCommand):\n                raise TypeError('help_command must be a subclass of HelpCommand')\n            if self._help_command is not None:\n                self._help_command._remove_from_bot(self)\n            self._help_command = value\n            value._add_to_bot(self)\n        elif self._help_command is not None:\n            self._help_command._remove_from_bot(self)\n            self._help_command = None\n        else:\n            self._help_command = None\n\n    # application command interop\n\n    # As mentioned above, this is a mixin so the Self type hint fails here.\n    # However, since the only classes that can use this are subclasses of Client\n    # anyway, then this is sound.\n    @property\n    def tree(self) -> app_commands.CommandTree[Self]:  # type: ignore\n        \"\"\":class:`~discord.app_commands.CommandTree`: The command tree responsible for handling the application commands\n        in this bot.\n\n        .. versionadded:: 2.0\n        \"\"\"\n        return self.__tree\n\n    # command processing\n\n    async def get_prefix(self, message: Message, /) -> Union[List[str], str]:\n        \"\"\"|coro|\n\n        Retrieves the prefix the bot is listening to\n        with the message as a context.\n\n        .. versionchanged:: 2.0\n\n            ``message`` parameter is now positional-only.\n\n        Parameters\n        -----------\n        message: :class:`discord.Message`\n            The message context to get the prefix of.\n\n        Returns\n        --------\n        Union[List[:class:`str`], :class:`str`]\n            A list of prefixes or a single prefix that the bot is\n            listening for.\n        \"\"\"\n        prefix = ret = self.command_prefix\n\n        if callable(prefix):\n            # self will be a Bot or AutoShardedBot\n            ret = await discord.utils.maybe_coroutine(prefix, self, message)  # type: ignore\n\n        if not isinstance(ret, str):\n            try:\n                ret = list(ret)  # type: ignore\n            except TypeError:\n                # It's possible that a generator raised this exception.  Don't\n                # replace it with our own error if that's the case.\n                if isinstance(ret, collections.abc.Iterable):\n                    raise\n\n                raise TypeError(\n                    \"command_prefix must be plain string, iterable of strings, or callable \"\n                    f\"returning either of these, not {ret.__class__.__name__}\"\n                )\n\n        return ret\n\n    @overload\n    async def get_context(\n        self,\n        origin: Union[Message, Interaction],\n        /,\n    ) -> Context[Self]:  # type: ignore\n        ...\n\n    @overload\n    async def get_context(\n        self,\n        origin: Union[Message, Interaction],\n        /,\n        *,\n        cls: Type[ContextT],\n    ) -> ContextT:\n        ...\n\n    async def get_context(\n        self,\n        origin: Union[Message, Interaction],\n        /,\n        *,\n        cls: Type[ContextT] = MISSING,\n    ) -> Any:\n        r\"\"\"|coro|\n\n        Returns the invocation context from the message or interaction.\n\n        This is a more low-level counter-part for :meth:`.process_commands`\n        to allow users more fine grained control over the processing.\n\n        The returned context is not guaranteed to be a valid invocation\n        context, :attr:`.Context.valid` must be checked to make sure it is.\n        If the context is not valid then it is not a valid candidate to be\n        invoked under :meth:`~.Bot.invoke`.\n\n        .. note::\n\n            In order for the custom context to be used inside an interaction-based\n            context (such as :class:`HybridCommand`) then this method must be\n            overridden to return that class.\n\n        .. versionchanged:: 2.0\n\n            ``message`` parameter is now positional-only and renamed to ``origin``.\n\n        Parameters\n        -----------\n        origin: Union[:class:`discord.Message`, :class:`discord.Interaction`]\n            The message or interaction to get the invocation context from.\n        cls\n            The factory class that will be used to create the context.\n            By default, this is :class:`.Context`. Should a custom\n            class be provided, it must be similar enough to :class:`.Context`\\'s\n            interface.\n\n        Returns\n        --------\n        :class:`.Context`\n            The invocation context. The type of this can change via the\n            ``cls`` parameter.\n        \"\"\"\n        if cls is MISSING:\n            cls = Context  # type: ignore\n\n        if isinstance(origin, discord.Interaction):\n            return await cls.from_interaction(origin)\n\n        view = StringView(origin.content)\n        ctx = cls(prefix=None, view=view, bot=self, message=origin)\n\n        if origin.author.id == self.user.id:  # type: ignore\n            return ctx\n\n        prefix = await self.get_prefix(origin)\n        invoked_prefix = prefix\n\n        if isinstance(prefix, str):\n            if not view.skip_string(prefix):\n                return ctx\n        else:\n            try:\n                # if the context class' __init__ consumes something from the view this\n                # will be wrong.  That seems unreasonable though.\n                if origin.content.startswith(tuple(prefix)):\n                    invoked_prefix = discord.utils.find(view.skip_string, prefix)\n                else:\n                    return ctx\n\n            except TypeError:\n                if not isinstance(prefix, list):\n                    raise TypeError(\n                        \"get_prefix must return either a string or a list of string, \" f\"not {prefix.__class__.__name__}\"\n                    )\n\n                # It's possible a bad command_prefix got us here.\n                for value in prefix:\n                    if not isinstance(value, str):\n                        raise TypeError(\n                            \"Iterable command_prefix or list returned from get_prefix must \"\n                            f\"contain only strings, not {value.__class__.__name__}\"\n                        )\n\n                # Getting here shouldn't happen\n                raise\n\n        if self.strip_after_prefix:\n            view.skip_ws()\n\n        invoker = view.get_word()\n        ctx.invoked_with = invoker\n        # type-checker fails to narrow invoked_prefix type.\n        ctx.prefix = invoked_prefix  # type: ignore\n        ctx.command = self.all_commands.get(invoker)\n        return ctx\n\n    async def invoke(self, ctx: Context[BotT], /) -> None:\n        \"\"\"|coro|\n\n        Invokes the command given under the invocation context and\n        handles all the internal event dispatch mechanisms.\n\n        .. versionchanged:: 2.0\n\n            ``ctx`` parameter is now positional-only.\n\n        Parameters\n        -----------\n        ctx: :class:`.Context`\n            The invocation context to invoke.\n        \"\"\"\n        if ctx.command is not None:\n            self.dispatch('command', ctx)\n            try:\n                if await self.can_run(ctx, call_once=True):\n                    await ctx.command.invoke(ctx)\n                else:\n                    raise errors.CheckFailure('The global check once functions failed.')\n            except errors.CommandError as exc:\n                await ctx.command.dispatch_error(ctx, exc)\n            else:\n                self.dispatch('command_completion', ctx)\n        elif ctx.invoked_with:\n            exc = errors.CommandNotFound(f'Command \"{ctx.invoked_with}\" is not found')\n            self.dispatch('command_error', ctx, exc)\n\n    async def process_commands(self, message: Message, /) -> None:\n        \"\"\"|coro|\n\n        This function processes the commands that have been registered\n        to the bot and other groups. Without this coroutine, none of the\n        commands will be triggered.\n\n        By default, this coroutine is called inside the :func:`.on_message`\n        event. If you choose to override the :func:`.on_message` event, then\n        you should invoke this coroutine as well.\n\n        This is built using other low level tools, and is equivalent to a\n        call to :meth:`~.Bot.get_context` followed by a call to :meth:`~.Bot.invoke`.\n\n        This also checks if the message's author is a bot and doesn't\n        call :meth:`~.Bot.get_context` or :meth:`~.Bot.invoke` if so.\n\n        .. versionchanged:: 2.0\n\n            ``message`` parameter is now positional-only.\n\n        Parameters\n        -----------\n        message: :class:`discord.Message`\n            The message to process commands for.\n        \"\"\"\n        if message.author.bot:\n            return\n\n        ctx = await self.get_context(message)\n        # the type of the invocation context's bot attribute will be correct\n        await self.invoke(ctx)  # type: ignore\n\n    async def on_message(self, message: Message, /) -> None:\n        await self.process_commands(message)\n\n\nclass Bot(BotBase, discord.Client):\n    \"\"\"Represents a Discord bot.\n\n    This class is a subclass of :class:`discord.Client` and as a result\n    anything that you can do with a :class:`discord.Client` you can do with\n    this bot.\n\n    This class also subclasses :class:`.GroupMixin` to provide the functionality\n    to manage commands.\n\n    Unlike :class:`discord.Client`, this class does not require manually setting\n    a :class:`~discord.app_commands.CommandTree` and is automatically set upon\n    instantiating the class.\n\n    .. container:: operations\n\n        .. describe:: async with x\n\n            Asynchronously initialises the bot and automatically cleans up.\n\n            .. versionadded:: 2.0\n\n    Attributes\n    -----------\n    command_prefix\n        The command prefix is what the message content must contain initially\n        to have a command invoked. This prefix could either be a string to\n        indicate what the prefix should be, or a callable that takes in the bot\n        as its first parameter and :class:`discord.Message` as its second\n        parameter and returns the prefix. This is to facilitate \"dynamic\"\n        command prefixes. This callable can be either a regular function or\n        a coroutine.\n\n        An empty string as the prefix always matches, enabling prefix-less\n        command invocation. While this may be useful in DMs it should be avoided\n        in servers, as it's likely to cause performance issues and unintended\n        command invocations.\n\n        The command prefix could also be an iterable of strings indicating that\n        multiple checks for the prefix should be used and the first one to\n        match will be the invocation prefix. You can get this prefix via\n        :attr:`.Context.prefix`.\n\n        .. note::\n\n            When passing multiple prefixes be careful to not pass a prefix\n            that matches a longer prefix occurring later in the sequence.  For\n            example, if the command prefix is ``('!', '!?')``  the ``'!?'``\n            prefix will never be matched to any message as the previous one\n            matches messages starting with ``!?``. This is especially important\n            when passing an empty string, it should always be last as no prefix\n            after it will be matched.\n    case_insensitive: :class:`bool`\n        Whether the commands should be case insensitive. Defaults to ``False``. This\n        attribute does not carry over to groups. You must set it to every group if\n        you require group commands to be case insensitive as well.\n    description: :class:`str`\n        The content prefixed into the default help message.\n    help_command: Optional[:class:`.HelpCommand`]\n        The help command implementation to use. This can be dynamically\n        set at runtime. To remove the help command pass ``None``. For more\n        information on implementing a help command, see :ref:`ext_commands_help_command`.\n    owner_id: Optional[:class:`int`]\n        The user ID that owns the bot. If this is not set and is then queried via\n        :meth:`.is_owner` then it is fetched automatically using\n        :meth:`~.Bot.application_info`.\n    owner_ids: Optional[Collection[:class:`int`]]\n        The user IDs that owns the bot. This is similar to :attr:`owner_id`.\n        If this is not set and the application is team based, then it is\n        fetched automatically using :meth:`~.Bot.application_info`.\n        For performance reasons it is recommended to use a :class:`set`\n        for the collection. You cannot set both ``owner_id`` and ``owner_ids``.\n\n        .. versionadded:: 1.3\n    strip_after_prefix: :class:`bool`\n        Whether to strip whitespace characters after encountering the command\n        prefix. This allows for ``!   hello`` and ``!hello`` to both work if\n        the ``command_prefix`` is set to ``!``. Defaults to ``False``.\n\n        .. versionadded:: 1.7\n    tree_cls: Type[:class:`~discord.app_commands.CommandTree`]\n        The type of application command tree to use. Defaults to :class:`~discord.app_commands.CommandTree`.\n\n        .. versionadded:: 2.0\n    allowed_contexts: :class:`~discord.app_commands.AppCommandContext`\n        The default allowed contexts that applies to all application commands\n        in the application command tree.\n\n        Note that you can override this on a per command basis.\n\n        .. versionadded:: 2.4\n    allowed_installs: :class:`~discord.app_commands.AppInstallationType`\n        The default allowed install locations that apply to all application commands\n        in the application command tree.\n\n        Note that you can override this on a per command basis.\n\n        .. versionadded:: 2.4\n    \"\"\"\n\n    pass\n\n\nclass AutoShardedBot(BotBase, discord.AutoShardedClient):\n    \"\"\"This is similar to :class:`.Bot` except that it is inherited from\n    :class:`discord.AutoShardedClient` instead.\n\n    .. container:: operations\n\n        .. describe:: async with x\n\n            Asynchronously initialises the bot and automatically cleans.\n\n            .. versionadded:: 2.0\n    \"\"\"\n\n    pass\n"
  },
  {
    "path": "discord/ext/commands/cog.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\nfrom __future__ import annotations\n\nimport inspect\nimport discord\nimport logging\nfrom discord import app_commands\nfrom discord.utils import maybe_coroutine, _to_kebab_case\n\nfrom typing import (\n    Any,\n    Callable,\n    ClassVar,\n    Coroutine,\n    Dict,\n    Generator,\n    Iterable,\n    List,\n    Optional,\n    TYPE_CHECKING,\n    Sequence,\n    Tuple,\n    TypeVar,\n    Union,\n)\n\nfrom ._types import _BaseCommand, BotT\n\nif TYPE_CHECKING:\n    from typing_extensions import Self\n    from discord.abc import Snowflake\n    from discord._types import ClientT\n\n    from .bot import BotBase\n    from .context import Context\n    from .core import Command\n\n__all__ = (\n    'CogMeta',\n    'Cog',\n    'GroupCog',\n)\n\nFuncT = TypeVar('FuncT', bound=Callable[..., Any])\n\nMISSING: Any = discord.utils.MISSING\n_log = logging.getLogger(__name__)\n\n\nclass CogMeta(type):\n    \"\"\"A metaclass for defining a cog.\n\n    Note that you should probably not use this directly. It is exposed\n    purely for documentation purposes along with making custom metaclasses to intermix\n    with other metaclasses such as the :class:`abc.ABCMeta` metaclass.\n\n    For example, to create an abstract cog mixin class, the following would be done.\n\n    .. code-block:: python3\n\n        import abc\n\n        class CogABCMeta(commands.CogMeta, abc.ABCMeta):\n            pass\n\n        class SomeMixin(metaclass=abc.ABCMeta):\n            pass\n\n        class SomeCogMixin(SomeMixin, commands.Cog, metaclass=CogABCMeta):\n            pass\n\n    .. note::\n\n        When passing an attribute of a metaclass that is documented below, note\n        that you must pass it as a keyword-only argument to the class creation\n        like the following example:\n\n        .. code-block:: python3\n\n            class MyCog(commands.Cog, name='My Cog'):\n                pass\n\n    Attributes\n    -----------\n    name: :class:`str`\n        The cog name. By default, it is the name of the class with no modification.\n    description: :class:`str`\n        The cog description. By default, it is the cleaned docstring of the class.\n\n        .. versionadded:: 1.6\n\n    command_attrs: :class:`dict`\n        A list of attributes to apply to every command inside this cog. The dictionary\n        is passed into the :class:`Command` options at ``__init__``.\n        If you specify attributes inside the command attribute in the class, it will\n        override the one specified inside this attribute. For example:\n\n        .. code-block:: python3\n\n            class MyCog(commands.Cog, command_attrs=dict(hidden=True)):\n                @commands.command()\n                async def foo(self, ctx):\n                    pass # hidden -> True\n\n                @commands.command(hidden=False)\n                async def bar(self, ctx):\n                    pass # hidden -> False\n\n    group_name: Union[:class:`str`, :class:`~discord.app_commands.locale_str`]\n        The group name of a cog. This is only applicable for :class:`GroupCog` instances.\n        By default, it's the same value as :attr:`name`.\n\n        .. versionadded:: 2.0\n    group_description: Union[:class:`str`, :class:`~discord.app_commands.locale_str`]\n        The group description of a cog. This is only applicable for :class:`GroupCog` instances.\n        By default, it's the same value as :attr:`description`.\n\n        .. versionadded:: 2.0\n    group_nsfw: :class:`bool`\n        Whether the application command group is NSFW. This is only applicable for :class:`GroupCog` instances.\n        By default, it's ``False``.\n\n        .. versionadded:: 2.0\n    group_auto_locale_strings: :class:`bool`\n        If this is set to ``True``, then all translatable strings will implicitly\n        be wrapped into :class:`~discord.app_commands.locale_str` rather\n        than :class:`str`. Defaults to ``True``.\n\n        .. versionadded:: 2.0\n    group_extras: :class:`dict`\n        A dictionary that can be used to store extraneous data.\n        This is only applicable for :class:`GroupCog` instances.\n        The library will not touch any values or keys within this dictionary.\n\n        .. versionadded:: 2.1\n    \"\"\"\n\n    __cog_name__: str\n    __cog_description__: str\n    __cog_group_name__: Union[str, app_commands.locale_str]\n    __cog_group_description__: Union[str, app_commands.locale_str]\n    __cog_group_nsfw__: bool\n    __cog_group_auto_locale_strings__: bool\n    __cog_group_extras__: Dict[Any, Any]\n    __cog_settings__: Dict[str, Any]\n    __cog_commands__: List[Command[Any, ..., Any]]\n    __cog_app_commands__: List[Union[app_commands.Group, app_commands.Command[Any, ..., Any]]]\n    __cog_listeners__: List[Tuple[str, str]]\n\n    def __new__(cls, *args: Any, **kwargs: Any) -> CogMeta:\n        name, bases, attrs = args\n        if any(issubclass(base, app_commands.Group) for base in bases):\n            raise TypeError(\n                'Cannot inherit from app_commands.Group with commands.Cog, consider using commands.GroupCog instead'\n            )\n\n        # If name='...' is given but not group_name='...' then name='...' is used for both.\n        # If neither is given then cog name is the class name but group name is kebab case\n        try:\n            cog_name = kwargs.pop('name')\n        except KeyError:\n            cog_name = name\n            try:\n                group_name = kwargs.pop('group_name')\n            except KeyError:\n                group_name = _to_kebab_case(name)\n        else:\n            group_name = kwargs.pop('group_name', cog_name)\n\n        attrs['__cog_settings__'] = kwargs.pop('command_attrs', {})\n        attrs['__cog_name__'] = cog_name\n        attrs['__cog_group_name__'] = group_name\n        attrs['__cog_group_nsfw__'] = kwargs.pop('group_nsfw', False)\n        attrs['__cog_group_auto_locale_strings__'] = kwargs.pop('group_auto_locale_strings', True)\n        attrs['__cog_group_extras__'] = kwargs.pop('group_extras', {})\n\n        description = kwargs.pop('description', None)\n        if description is None:\n            description = inspect.cleandoc(attrs.get('__doc__', ''))\n\n        attrs['__cog_description__'] = description\n        attrs['__cog_group_description__'] = kwargs.pop('group_description', description or '\\u2026')\n\n        commands = {}\n        cog_app_commands = {}\n        listeners = {}\n        no_bot_cog = 'Commands or listeners must not start with cog_ or bot_ (in method {0.__name__}.{1})'\n\n        new_cls = super().__new__(cls, name, bases, attrs, **kwargs)\n        for base in reversed(new_cls.__mro__):\n            for elem, value in base.__dict__.items():\n                if elem in commands:\n                    del commands[elem]\n                if elem in listeners:\n                    del listeners[elem]\n\n                is_static_method = isinstance(value, staticmethod)\n                if is_static_method:\n                    value = value.__func__\n                if isinstance(value, _BaseCommand):\n                    if is_static_method:\n                        raise TypeError(f'Command in method {base}.{elem!r} must not be staticmethod.')\n                    if elem.startswith(('cog_', 'bot_')):\n                        raise TypeError(no_bot_cog.format(base, elem))\n                    commands[elem] = value\n                elif isinstance(value, (app_commands.Group, app_commands.Command)) and value.parent is None:\n                    if is_static_method:\n                        raise TypeError(f'Command in method {base}.{elem!r} must not be staticmethod.')\n                    if elem.startswith(('cog_', 'bot_')):\n                        raise TypeError(no_bot_cog.format(base, elem))\n                    cog_app_commands[elem] = value\n                elif inspect.iscoroutinefunction(value):\n                    try:\n                        getattr(value, '__cog_listener__')\n                    except AttributeError:\n                        continue\n                    else:\n                        if elem.startswith(('cog_', 'bot_')):\n                            raise TypeError(no_bot_cog.format(base, elem))\n                        listeners[elem] = value\n\n        new_cls.__cog_commands__ = list(commands.values())  # this will be copied in Cog.__new__\n        new_cls.__cog_app_commands__ = list(cog_app_commands.values())\n\n        listeners_as_list = []\n        for listener in listeners.values():\n            for listener_name in listener.__cog_listener_names__:\n                # I use __name__ instead of just storing the value so I can inject\n                # the self attribute when the time comes to add them to the bot\n                listeners_as_list.append((listener_name, listener.__name__))\n\n        new_cls.__cog_listeners__ = listeners_as_list\n        return new_cls\n\n    def __init__(self, *args: Any, **kwargs: Any) -> None:\n        super().__init__(*args)\n\n    @classmethod\n    def qualified_name(cls) -> str:\n        return cls.__cog_name__\n\n\ndef _cog_special_method(func: FuncT) -> FuncT:\n    func.__cog_special_method__ = None\n    return func\n\n\nclass Cog(metaclass=CogMeta):\n    \"\"\"The base class that all cogs must inherit from.\n\n    A cog is a collection of commands, listeners, and optional state to\n    help group commands together. More information on them can be found on\n    the :ref:`ext_commands_cogs` page.\n\n    When inheriting from this class, the options shown in :class:`CogMeta`\n    are equally valid here.\n    \"\"\"\n\n    __cog_name__: str\n    __cog_description__: str\n    __cog_group_name__: Union[str, app_commands.locale_str]\n    __cog_group_description__: Union[str, app_commands.locale_str]\n    __cog_settings__: Dict[str, Any]\n    __cog_commands__: List[Command[Self, ..., Any]]\n    __cog_app_commands__: List[Union[app_commands.Group, app_commands.Command[Self, ..., Any]]]\n    __cog_listeners__: List[Tuple[str, str]]\n    __cog_is_app_commands_group__: ClassVar[bool] = False\n    __cog_app_commands_group__: Optional[app_commands.Group]\n    __discord_app_commands_error_handler__: Optional[\n        Callable[[discord.Interaction, app_commands.AppCommandError], Coroutine[Any, Any, None]]\n    ]\n\n    def __new__(cls, *args: Any, **kwargs: Any) -> Self:\n        # For issue 426, we need to store a copy of the command objects\n        # since we modify them to inject `self` to them.\n        # To do this, we need to interfere with the Cog creation process.\n        self = super().__new__(cls)\n        cmd_attrs = cls.__cog_settings__\n\n        # Either update the command with the cog provided defaults or copy it.\n        # r.e type ignore, type-checker complains about overriding a ClassVar\n        self.__cog_commands__ = tuple(c._update_copy(cmd_attrs) for c in cls.__cog_commands__)  # type: ignore\n\n        lookup = {cmd.qualified_name: cmd for cmd in self.__cog_commands__}\n\n        # Register the application commands\n        children: List[Union[app_commands.Group, app_commands.Command[Self, ..., Any]]] = []\n        app_command_refs: Dict[str, Union[app_commands.Group, app_commands.Command[Self, ..., Any]]] = {}\n\n        if cls.__cog_is_app_commands_group__:\n            group = app_commands.Group(\n                name=cls.__cog_group_name__,\n                description=cls.__cog_group_description__,\n                nsfw=cls.__cog_group_nsfw__,\n                auto_locale_strings=cls.__cog_group_auto_locale_strings__,\n                parent=None,\n                guild_ids=getattr(cls, '__discord_app_commands_default_guilds__', None),\n                guild_only=getattr(cls, '__discord_app_commands_guild_only__', False),\n                allowed_contexts=getattr(cls, '__discord_app_commands_contexts__', None),\n                allowed_installs=getattr(cls, '__discord_app_commands_installation_types__', None),\n                default_permissions=getattr(cls, '__discord_app_commands_default_permissions__', None),\n                extras=cls.__cog_group_extras__,\n            )\n        else:\n            group = None\n\n        self.__cog_app_commands_group__ = group\n\n        # Update the Command instances dynamically as well\n        for command in self.__cog_commands__:\n            setattr(self, command.callback.__name__, command)\n            parent = command.parent\n            if parent is not None:\n                # Get the latest parent reference\n                parent = lookup[parent.qualified_name]  # type: ignore\n\n                # Hybrid commands already deal with updating the reference\n                # Due to the copy below, so we need to handle them specially\n                if hasattr(parent, '__commands_is_hybrid__') and hasattr(command, '__commands_is_hybrid__'):\n                    current: Optional[Union[app_commands.Group, app_commands.Command[Self, ..., Any]]] = getattr(\n                        command, 'app_command', None\n                    )\n                    updated = app_command_refs.get(command.qualified_name)\n                    if current and updated:\n                        command.app_command = updated  # type: ignore  # Safe attribute access\n\n                # Update our parent's reference to our self\n                parent.remove_command(command.name)  # type: ignore\n                parent.add_command(command)  # type: ignore\n\n            if hasattr(command, '__commands_is_hybrid__') and parent is None:\n                app_command: Optional[Union[app_commands.Group, app_commands.Command[Self, ..., Any]]] = getattr(\n                    command, 'app_command', None\n                )\n                if app_command:\n                    group_parent = self.__cog_app_commands_group__\n                    app_command = app_command._copy_with(parent=group_parent, binding=self)\n                    # The type checker does not see the app_command attribute even though it exists\n                    command.app_command = app_command  # type: ignore\n\n                    # Update all the references to point to the new copy\n                    if isinstance(app_command, app_commands.Group):\n                        for child in app_command.walk_commands():\n                            app_command_refs[child.qualified_name] = child\n                            if hasattr(child, '__commands_is_hybrid_app_command__') and child.qualified_name in lookup:\n                                child.wrapped = lookup[child.qualified_name]  # type: ignore\n\n                    if self.__cog_app_commands_group__:\n                        children.append(app_command)\n\n        if Cog._get_overridden_method(self.cog_app_command_error) is not None:\n            error_handler = self.cog_app_command_error\n        else:\n            error_handler = None\n\n        self.__discord_app_commands_error_handler__ = error_handler\n\n        for command in cls.__cog_app_commands__:\n            copy = command._copy_with(parent=self.__cog_app_commands_group__, binding=self)\n\n            # Update set bindings\n            if copy._attr:\n                setattr(self, copy._attr, copy)\n\n            if isinstance(copy, app_commands.Group):\n                copy.__discord_app_commands_error_handler__ = error_handler\n                for command in copy._children.values():\n                    if isinstance(command, app_commands.Group):\n                        command.__discord_app_commands_error_handler__ = error_handler\n\n            children.append(copy)\n\n        self.__cog_app_commands__ = children\n        if self.__cog_app_commands_group__:\n            self.__cog_app_commands_group__.module = cls.__module__\n            mapping = {cmd.name: cmd for cmd in children}\n            if len(mapping) > 25:\n                raise TypeError('maximum number of application command children exceeded')\n\n            self.__cog_app_commands_group__._children = mapping\n\n        return self\n\n    def get_commands(self) -> List[Command[Self, ..., Any]]:\n        r\"\"\"Returns the commands that are defined inside this cog.\n\n        This does *not* include :class:`discord.app_commands.Command` or :class:`discord.app_commands.Group`\n        instances.\n\n        Returns\n        --------\n        List[:class:`.Command`]\n            A :class:`list` of :class:`.Command`\\s that are\n            defined inside this cog, not including subcommands.\n        \"\"\"\n        return [c for c in self.__cog_commands__ if c.parent is None]\n\n    def get_app_commands(self) -> List[Union[app_commands.Command[Self, ..., Any], app_commands.Group]]:\n        r\"\"\"Returns the app commands that are defined inside this cog.\n\n        Returns\n        --------\n        List[Union[:class:`discord.app_commands.Command`, :class:`discord.app_commands.Group`]]\n            A :class:`list` of :class:`discord.app_commands.Command`\\s and :class:`discord.app_commands.Group`\\s that are\n            defined inside this cog, not including subcommands.\n        \"\"\"\n        return [c for c in self.__cog_app_commands__ if c.parent is None]\n\n    @property\n    def qualified_name(self) -> str:\n        \"\"\":class:`str`: Returns the cog's specified name, not the class name.\"\"\"\n        return self.__cog_name__\n\n    @property\n    def description(self) -> str:\n        \"\"\":class:`str`: Returns the cog's description, typically the cleaned docstring.\"\"\"\n        return self.__cog_description__\n\n    @description.setter\n    def description(self, description: str) -> None:\n        self.__cog_description__ = description\n\n    def walk_commands(self) -> Generator[Command[Self, ..., Any], None, None]:\n        \"\"\"An iterator that recursively walks through this cog's commands and subcommands.\n\n        Yields\n        ------\n        Union[:class:`.Command`, :class:`.Group`]\n            A command or group from the cog.\n        \"\"\"\n        from .core import GroupMixin\n\n        for command in self.__cog_commands__:\n            if command.parent is None:\n                yield command\n                if isinstance(command, GroupMixin):\n                    yield from command.walk_commands()\n\n    def walk_app_commands(self) -> Generator[Union[app_commands.Command[Self, ..., Any], app_commands.Group], None, None]:\n        \"\"\"An iterator that recursively walks through this cog's app commands and subcommands.\n\n        Yields\n        ------\n        Union[:class:`discord.app_commands.Command`, :class:`discord.app_commands.Group`]\n            An app command or group from the cog.\n        \"\"\"\n        for command in self.__cog_app_commands__:\n            yield command\n            if isinstance(command, app_commands.Group):\n                yield from command.walk_commands()\n\n    @property\n    def app_command(self) -> Optional[app_commands.Group]:\n        \"\"\"Optional[:class:`discord.app_commands.Group`]: Returns the associated group with this cog.\n\n        This is only available if inheriting from :class:`GroupCog`.\n        \"\"\"\n        return self.__cog_app_commands_group__\n\n    def get_listeners(self) -> List[Tuple[str, Callable[..., Any]]]:\n        \"\"\"Returns a :class:`list` of (name, function) listener pairs that are defined in this cog.\n\n        Returns\n        --------\n        List[Tuple[:class:`str`, :ref:`coroutine <coroutine>`]]\n            The listeners defined in this cog.\n        \"\"\"\n        return [(name, getattr(self, method_name)) for name, method_name in self.__cog_listeners__]\n\n    @classmethod\n    def _get_overridden_method(cls, method: FuncT) -> Optional[FuncT]:\n        \"\"\"Return None if the method is not overridden. Otherwise returns the overridden method.\"\"\"\n        return getattr(method.__func__, '__cog_special_method__', method)\n\n    @classmethod\n    def listener(cls, name: str = MISSING) -> Callable[[FuncT], FuncT]:\n        \"\"\"A decorator that marks a function as a listener.\n\n        This is the cog equivalent of :meth:`.Bot.listen`.\n\n        Parameters\n        ------------\n        name: :class:`str`\n            The name of the event being listened to. If not provided, it\n            defaults to the function's name.\n\n        Raises\n        --------\n        TypeError\n            The function is not a coroutine function or a string was not passed as\n            the name.\n        \"\"\"\n\n        if name is not MISSING and not isinstance(name, str):\n            raise TypeError(f'Cog.listener expected str but received {name.__class__.__name__} instead.')\n\n        def decorator(func: FuncT) -> FuncT:\n            actual = func\n            if isinstance(actual, staticmethod):\n                actual = actual.__func__\n            if not inspect.iscoroutinefunction(actual):\n                raise TypeError('Listener function must be a coroutine function.')\n            actual.__cog_listener__ = True\n            to_assign = name or actual.__name__\n            try:\n                actual.__cog_listener_names__.append(to_assign)\n            except AttributeError:\n                actual.__cog_listener_names__ = [to_assign]\n            # we have to return `func` instead of `actual` because\n            # we need the type to be `staticmethod` for the metaclass\n            # to pick it up but the metaclass unfurls the function and\n            # thus the assignments need to be on the actual function\n            return func\n\n        return decorator\n\n    def has_error_handler(self) -> bool:\n        \"\"\":class:`bool`: Checks whether the cog has an error handler.\n\n        .. versionadded:: 1.7\n        \"\"\"\n        return not hasattr(self.cog_command_error.__func__, '__cog_special_method__')\n\n    def has_app_command_error_handler(self) -> bool:\n        \"\"\":class:`bool`: Checks whether the cog has an app error handler.\n\n        .. versionadded:: 2.1\n        \"\"\"\n        return not hasattr(self.cog_app_command_error.__func__, '__cog_special_method__')\n\n    @_cog_special_method\n    async def cog_load(self) -> None:\n        \"\"\"|maybecoro|\n\n        A special method that is called when the cog gets loaded.\n\n        Subclasses must replace this if they want special asynchronous loading behaviour.\n        Note that the ``__init__`` special method does not allow asynchronous code to run\n        inside it, thus this is helpful for setting up code that needs to be asynchronous.\n\n        .. versionadded:: 2.0\n        \"\"\"\n        pass\n\n    @_cog_special_method\n    async def cog_unload(self) -> None:\n        \"\"\"|maybecoro|\n\n        A special method that is called when the cog gets removed.\n\n        Subclasses must replace this if they want special unloading behaviour.\n\n        Exceptions raised in this method are ignored during extension unloading.\n\n        .. versionchanged:: 2.0\n\n            This method can now be a :term:`coroutine`.\n        \"\"\"\n        pass\n\n    @_cog_special_method\n    def bot_check_once(self, ctx: Context[BotT]) -> bool:\n        \"\"\"A special method that registers as a :meth:`.Bot.check_once`\n        check.\n\n        This function **can** be a coroutine and must take a sole parameter,\n        ``ctx``, to represent the :class:`.Context`.\n        \"\"\"\n        return True\n\n    @_cog_special_method\n    def bot_check(self, ctx: Context[BotT]) -> bool:\n        \"\"\"A special method that registers as a :meth:`.Bot.check`\n        check.\n\n        This function **can** be a coroutine and must take a sole parameter,\n        ``ctx``, to represent the :class:`.Context`.\n        \"\"\"\n        return True\n\n    @_cog_special_method\n    def cog_check(self, ctx: Context[BotT]) -> bool:\n        \"\"\"A special method that registers as a :func:`~discord.ext.commands.check`\n        for every command and subcommand in this cog.\n\n        This function **can** be a coroutine and must take a sole parameter,\n        ``ctx``, to represent the :class:`.Context`.\n        \"\"\"\n        return True\n\n    @_cog_special_method\n    def interaction_check(self, interaction: discord.Interaction[ClientT], /) -> bool:\n        \"\"\"A special method that registers as a :func:`discord.app_commands.check`\n        for every app command and subcommand in this cog.\n\n        This function **can** be a coroutine and must take a sole parameter,\n        ``interaction``, to represent the :class:`~discord.Interaction`.\n\n        .. versionadded:: 2.0\n        \"\"\"\n        return True\n\n    @_cog_special_method\n    async def cog_command_error(self, ctx: Context[BotT], error: Exception) -> None:\n        \"\"\"|coro|\n\n        A special method that is called whenever an error\n        is dispatched inside this cog.\n\n        This is similar to :func:`.on_command_error` except only applying\n        to the commands inside this cog.\n\n        This **must** be a coroutine.\n\n        Parameters\n        -----------\n        ctx: :class:`.Context`\n            The invocation context where the error happened.\n        error: :class:`CommandError`\n            The error that happened.\n        \"\"\"\n        pass\n\n    @_cog_special_method\n    async def cog_app_command_error(self, interaction: discord.Interaction, error: app_commands.AppCommandError) -> None:\n        \"\"\"|coro|\n\n        A special method that is called whenever an error within\n        an application command is dispatched inside this cog.\n\n        This is similar to :func:`discord.app_commands.CommandTree.on_error` except\n        only applying to the application commands inside this cog.\n\n        This **must** be a coroutine.\n\n        Parameters\n        -----------\n        interaction: :class:`~discord.Interaction`\n            The interaction that is being handled.\n        error: :exc:`~discord.app_commands.AppCommandError`\n            The exception that was raised.\n        \"\"\"\n        pass\n\n    @_cog_special_method\n    async def cog_before_invoke(self, ctx: Context[BotT]) -> None:\n        \"\"\"|coro|\n\n        A special method that acts as a cog local pre-invoke hook.\n\n        This is similar to :meth:`.Command.before_invoke`.\n\n        This **must** be a coroutine.\n\n        Parameters\n        -----------\n        ctx: :class:`.Context`\n            The invocation context.\n        \"\"\"\n        pass\n\n    @_cog_special_method\n    async def cog_after_invoke(self, ctx: Context[BotT]) -> None:\n        \"\"\"|coro|\n\n        A special method that acts as a cog local post-invoke hook.\n\n        This is similar to :meth:`.Command.after_invoke`.\n\n        This **must** be a coroutine.\n\n        Parameters\n        -----------\n        ctx: :class:`.Context`\n            The invocation context.\n        \"\"\"\n        pass\n\n    async def _inject(self, bot: BotBase, override: bool, guild: Optional[Snowflake], guilds: Sequence[Snowflake]) -> Self:\n        cls = self.__class__\n\n        # we'll call this first so that errors can propagate without\n        # having to worry about undoing anything\n        await maybe_coroutine(self.cog_load)\n\n        # realistically, the only thing that can cause loading errors\n        # is essentially just the command loading, which raises if there are\n        # duplicates. When this condition is met, we want to undo all what\n        # we've added so far for some form of atomic loading.\n        for index, command in enumerate(self.__cog_commands__):\n            command.cog = self\n            if command.parent is None:\n                try:\n                    bot.add_command(command)\n                except Exception as e:\n                    # undo our additions\n                    for to_undo in self.__cog_commands__[:index]:\n                        if to_undo.parent is None:\n                            bot.remove_command(to_undo.name)\n                    try:\n                        await maybe_coroutine(self.cog_unload)\n                    finally:\n                        raise e\n\n        # check if we're overriding the default\n        if cls.bot_check is not Cog.bot_check:\n            bot.add_check(self.bot_check)\n\n        if cls.bot_check_once is not Cog.bot_check_once:\n            bot.add_check(self.bot_check_once, call_once=True)\n\n        # while Bot.add_listener can raise if it's not a coroutine,\n        # this precondition is already met by the listener decorator\n        # already, thus this should never raise.\n        # Outside of, memory errors and the like...\n        for name, method_name in self.__cog_listeners__:\n            bot.add_listener(getattr(self, method_name), name)\n\n        # Only do this if these are \"top level\" commands\n        if not self.__cog_app_commands_group__:\n            for command in self.__cog_app_commands__:\n                # This is already atomic\n                bot.tree.add_command(command, override=override, guild=guild, guilds=guilds)\n\n        return self\n\n    async def _eject(self, bot: BotBase, guild_ids: Optional[Iterable[int]]) -> None:\n        cls = self.__class__\n\n        try:\n            for command in self.__cog_commands__:\n                if command.parent is None:\n                    bot.remove_command(command.name)\n\n            if not self.__cog_app_commands_group__:\n                for command in self.__cog_app_commands__:\n                    guild_ids = guild_ids or command._guild_ids\n                    if guild_ids is None:\n                        bot.tree.remove_command(command.name)\n                    else:\n                        for guild_id in guild_ids:\n                            bot.tree.remove_command(command.name, guild=discord.Object(id=guild_id))\n\n            for name, method_name in self.__cog_listeners__:\n                bot.remove_listener(getattr(self, method_name), name)\n\n            if cls.bot_check is not Cog.bot_check:\n                bot.remove_check(self.bot_check)\n\n            if cls.bot_check_once is not Cog.bot_check_once:\n                bot.remove_check(self.bot_check_once, call_once=True)\n        finally:\n            try:\n                await maybe_coroutine(self.cog_unload)\n            except Exception:\n                _log.exception('Ignoring exception in cog unload for Cog %r (%r)', cls, self.qualified_name)\n\n\nclass GroupCog(Cog):\n    \"\"\"Represents a cog that also doubles as a parent :class:`discord.app_commands.Group` for\n    the application commands defined within it.\n\n    This inherits from :class:`Cog` and the options in :class:`CogMeta` also apply to this.\n    See the :class:`Cog` documentation for methods.\n\n    Decorators such as :func:`~discord.app_commands.guild_only`, :func:`~discord.app_commands.guilds`,\n    and :func:`~discord.app_commands.default_permissions` will apply to the group if used on top of the\n    cog.\n\n    Hybrid commands will also be added to the Group, giving the ability to categorize slash commands into\n    groups, while keeping the prefix-style command as a root-level command.\n\n    For example:\n\n    .. code-block:: python3\n\n        from discord import app_commands\n        from discord.ext import commands\n\n        @app_commands.guild_only()\n        class MyCog(commands.GroupCog, group_name='my-cog'):\n            pass\n\n    .. versionadded:: 2.0\n    \"\"\"\n\n    __cog_is_app_commands_group__: ClassVar[bool] = True\n"
  },
  {
    "path": "discord/ext/commands/context.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\nfrom __future__ import annotations\n\nimport re\nfrom typing import TYPE_CHECKING, Any, Dict, Generator, Generic, List, Optional, TypeVar, Union, Sequence, Type, overload\n\nimport discord.abc\nimport discord.utils\nfrom discord import Interaction, Message, Attachment, MessageType, User, PartialMessageable, Permissions, ChannelType, Thread\nfrom discord.context_managers import Typing\nfrom .view import StringView\n\nfrom ._types import BotT\n\nif TYPE_CHECKING:\n    from typing_extensions import Self, ParamSpec, TypeGuard\n\n    from discord.abc import MessageableChannel\n    from discord.guild import Guild\n    from discord.member import Member\n    from discord.state import ConnectionState\n    from discord.user import ClientUser\n    from discord.voice_client import VoiceProtocol\n    from discord.embeds import Embed\n    from discord.file import File\n    from discord.mentions import AllowedMentions\n    from discord.sticker import GuildSticker, StickerItem\n    from discord.message import MessageReference, PartialMessage\n    from discord.ui import View\n    from discord.types.interactions import ApplicationCommandInteractionData\n    from discord.poll import Poll\n\n    from .cog import Cog\n    from .core import Command\n    from .parameters import Parameter\n\n    from types import TracebackType\n\n    BE = TypeVar('BE', bound=BaseException)\n\n# fmt: off\n__all__ = (\n    'Context',\n)\n# fmt: on\n\nMISSING: Any = discord.utils.MISSING\n\n\nT = TypeVar('T')\nCogT = TypeVar('CogT', bound=\"Cog\")\n\nif TYPE_CHECKING:\n    P = ParamSpec('P')\nelse:\n    P = TypeVar('P')\n\n\ndef is_cog(obj: Any) -> TypeGuard[Cog]:\n    return hasattr(obj, '__cog_commands__')\n\n\nclass DeferTyping:\n    def __init__(self, ctx: Context[BotT], *, ephemeral: bool):\n        self.ctx: Context[BotT] = ctx\n        self.ephemeral: bool = ephemeral\n\n    def __await__(self) -> Generator[Any, None, None]:\n        return self.ctx.defer(ephemeral=self.ephemeral).__await__()\n\n    async def __aenter__(self) -> None:\n        await self.ctx.defer(ephemeral=self.ephemeral)\n\n    async def __aexit__(\n        self,\n        exc_type: Optional[Type[BE]],\n        exc: Optional[BE],\n        traceback: Optional[TracebackType],\n    ) -> None:\n        pass\n\n\nclass Context(discord.abc.Messageable, Generic[BotT]):\n    r\"\"\"Represents the context in which a command is being invoked under.\n\n    This class contains a lot of meta data to help you understand more about\n    the invocation context. This class is not created manually and is instead\n    passed around to commands as the first parameter.\n\n    This class implements the :class:`~discord.abc.Messageable` ABC.\n\n    Attributes\n    -----------\n    message: :class:`.Message`\n        The message that triggered the command being executed.\n\n        .. note::\n\n            In the case of an interaction based context, this message is \"synthetic\"\n            and does not actually exist. Therefore, the ID on it is invalid similar\n            to ephemeral messages.\n    bot: :class:`.Bot`\n        The bot that contains the command being executed.\n    args: :class:`list`\n        The list of transformed arguments that were passed into the command.\n        If this is accessed during the :func:`.on_command_error` event\n        then this list could be incomplete.\n    kwargs: :class:`dict`\n        A dictionary of transformed arguments that were passed into the command.\n        Similar to :attr:`args`\\, if this is accessed in the\n        :func:`.on_command_error` event then this dict could be incomplete.\n    current_parameter: Optional[:class:`Parameter`]\n        The parameter that is currently being inspected and converted.\n        This is only of use for within converters.\n\n        .. versionadded:: 2.0\n    current_argument: Optional[:class:`str`]\n        The argument string of the :attr:`current_parameter` that is currently being converted.\n        This is only of use for within converters.\n\n        .. versionadded:: 2.0\n    interaction: Optional[:class:`~discord.Interaction`]\n        The interaction associated with this context.\n\n        .. versionadded:: 2.0\n    prefix: Optional[:class:`str`]\n        The prefix that was used to invoke the command. For interaction based contexts,\n        this is ``/`` for slash commands and ``\\u200b`` for context menu commands.\n    command: Optional[:class:`Command`]\n        The command that is being invoked currently.\n    invoked_with: Optional[:class:`str`]\n        The command name that triggered this invocation. Useful for finding out\n        which alias called the command.\n    invoked_parents: List[:class:`str`]\n        The command names of the parents that triggered this invocation. Useful for\n        finding out which aliases called the command.\n\n        For example in commands ``?a b c test``, the invoked parents are ``['a', 'b', 'c']``.\n\n        .. versionadded:: 1.7\n\n    invoked_subcommand: Optional[:class:`Command`]\n        The subcommand that was invoked.\n        If no valid subcommand was invoked then this is equal to ``None``.\n    subcommand_passed: Optional[:class:`str`]\n        The string that was attempted to call a subcommand. This does not have\n        to point to a valid registered subcommand and could just point to a\n        nonsense string. If nothing was passed to attempt a call to a\n        subcommand then this is set to ``None``.\n    command_failed: :class:`bool`\n        A boolean that indicates if the command failed to be parsed, checked,\n        or invoked.\n    \"\"\"\n\n    def __init__(\n        self,\n        *,\n        message: Message,\n        bot: BotT,\n        view: StringView,\n        args: List[Any] = MISSING,\n        kwargs: Dict[str, Any] = MISSING,\n        prefix: Optional[str] = None,\n        command: Optional[Command[Any, ..., Any]] = None,\n        invoked_with: Optional[str] = None,\n        invoked_parents: List[str] = MISSING,\n        invoked_subcommand: Optional[Command[Any, ..., Any]] = None,\n        subcommand_passed: Optional[str] = None,\n        command_failed: bool = False,\n        current_parameter: Optional[Parameter] = None,\n        current_argument: Optional[str] = None,\n        interaction: Optional[Interaction[BotT]] = None,\n    ):\n        self.message: Message = message\n        self.bot: BotT = bot\n        self.args: List[Any] = args or []\n        self.kwargs: Dict[str, Any] = kwargs or {}\n        self.prefix: Optional[str] = prefix\n        self.command: Optional[Command[Any, ..., Any]] = command\n        self.view: StringView = view\n        self.invoked_with: Optional[str] = invoked_with\n        self.invoked_parents: List[str] = invoked_parents or []\n        self.invoked_subcommand: Optional[Command[Any, ..., Any]] = invoked_subcommand\n        self.subcommand_passed: Optional[str] = subcommand_passed\n        self.command_failed: bool = command_failed\n        self.current_parameter: Optional[Parameter] = current_parameter\n        self.current_argument: Optional[str] = current_argument\n        self.interaction: Optional[Interaction[BotT]] = interaction\n        self._state: ConnectionState = self.message._state\n\n    @classmethod\n    async def from_interaction(cls, interaction: Interaction[BotT], /) -> Self:\n        \"\"\"|coro|\n\n        Creates a context from a :class:`discord.Interaction`. This only\n        works on application command based interactions, such as slash commands\n        or context menus.\n\n        On slash command based interactions this creates a synthetic :class:`~discord.Message`\n        that points to an ephemeral message that the command invoker has executed. This means\n        that :attr:`Context.author` returns the member that invoked the command.\n\n        In a message context menu based interaction, the :attr:`Context.message` attribute\n        is the message that the command is being executed on. This means that :attr:`Context.author`\n        returns the author of the message being targetted. To get the member that invoked\n        the command then :attr:`discord.Interaction.user` should be used instead.\n\n        .. versionadded:: 2.0\n\n        Parameters\n        -----------\n        interaction: :class:`discord.Interaction`\n            The interaction to create a context with.\n\n        Raises\n        -------\n        ValueError\n            The interaction does not have a valid command.\n        TypeError\n            The interaction client is not derived from :class:`Bot` or :class:`AutoShardedBot`.\n        \"\"\"\n\n        # Circular import\n        from .bot import BotBase\n\n        if not isinstance(interaction.client, BotBase):\n            raise TypeError('Interaction client is not derived from commands.Bot or commands.AutoShardedBot')\n\n        command = interaction.command\n        if command is None:\n            raise ValueError('interaction does not have command data')\n\n        bot: BotT = interaction.client\n        data: ApplicationCommandInteractionData = interaction.data  # type: ignore\n        if interaction.message is None:\n            synthetic_payload = {\n                'id': interaction.id,\n                'reactions': [],\n                'embeds': [],\n                'mention_everyone': False,\n                'tts': False,\n                'pinned': False,\n                'edited_timestamp': None,\n                'type': MessageType.chat_input_command if data.get('type', 1) == 1 else MessageType.context_menu_command,\n                'flags': 64,\n                'content': '',\n                'mentions': [],\n                'mention_roles': [],\n                'attachments': [],\n            }\n\n            if interaction.channel_id is None:\n                raise RuntimeError('interaction channel ID is null, this is probably a Discord bug')\n\n            channel = interaction.channel or PartialMessageable(\n                state=interaction._state, guild_id=interaction.guild_id, id=interaction.channel_id\n            )\n            message = Message(state=interaction._state, channel=channel, data=synthetic_payload)  # type: ignore\n            message.author = interaction.user\n            message.attachments = [a for _, a in interaction.namespace if isinstance(a, Attachment)]\n        else:\n            message = interaction.message\n\n        prefix = '/' if data.get('type', 1) == 1 else '\\u200b'  # Mock the prefix\n        ctx = cls(\n            message=message,\n            bot=bot,\n            view=StringView(''),\n            args=[],\n            kwargs={},\n            prefix=prefix,\n            interaction=interaction,\n            invoked_with=command.name,\n            command=command,  # type: ignore # this will be a hybrid command, technically\n        )\n        interaction._baton = ctx\n        ctx.command_failed = interaction.command_failed\n        return ctx\n\n    async def invoke(self, command: Command[CogT, P, T], /, *args: P.args, **kwargs: P.kwargs) -> T:\n        r\"\"\"|coro|\n\n        Calls a command with the arguments given.\n\n        This is useful if you want to just call the callback that a\n        :class:`.Command` holds internally.\n\n        .. note::\n\n            This does not handle converters, checks, cooldowns, pre-invoke,\n            or after-invoke hooks in any matter. It calls the internal callback\n            directly as-if it was a regular function.\n\n            You must take care in passing the proper arguments when\n            using this function.\n\n        .. versionchanged:: 2.0\n\n            ``command`` parameter is now positional-only.\n\n        Parameters\n        -----------\n        command: :class:`.Command`\n            The command that is going to be called.\n        \\*args\n            The arguments to use.\n        \\*\\*kwargs\n            The keyword arguments to use.\n\n        Raises\n        -------\n        TypeError\n            The command argument to invoke is missing.\n        \"\"\"\n        return await command(self, *args, **kwargs)\n\n    async def reinvoke(self, *, call_hooks: bool = False, restart: bool = True) -> None:\n        \"\"\"|coro|\n\n        Calls the command again.\n\n        This is similar to :meth:`~.Context.invoke` except that it bypasses\n        checks, cooldowns, and error handlers.\n\n        .. note::\n\n            If you want to bypass :exc:`.UserInputError` derived exceptions,\n            it is recommended to use the regular :meth:`~.Context.invoke`\n            as it will work more naturally. After all, this will end up\n            using the old arguments the user has used and will thus just\n            fail again.\n\n        Parameters\n        ------------\n        call_hooks: :class:`bool`\n            Whether to call the before and after invoke hooks.\n        restart: :class:`bool`\n            Whether to start the call chain from the very beginning\n            or where we left off (i.e. the command that caused the error).\n            The default is to start where we left off.\n\n        Raises\n        -------\n        ValueError\n            The context to reinvoke is not valid.\n        \"\"\"\n        cmd = self.command\n        view = self.view\n        if cmd is None:\n            raise ValueError('This context is not valid.')\n\n        # some state to revert to when we're done\n        index, previous = view.index, view.previous\n        invoked_with = self.invoked_with\n        invoked_subcommand = self.invoked_subcommand\n        invoked_parents = self.invoked_parents\n        subcommand_passed = self.subcommand_passed\n\n        if restart:\n            to_call = cmd.root_parent or cmd\n            view.index = len(self.prefix or '')\n            view.previous = 0\n            self.invoked_parents = []\n            self.invoked_with = view.get_word()  # advance to get the root command\n        else:\n            to_call = cmd\n\n        try:\n            await to_call.reinvoke(self, call_hooks=call_hooks)\n        finally:\n            self.command = cmd\n            view.index = index\n            view.previous = previous\n            self.invoked_with = invoked_with\n            self.invoked_subcommand = invoked_subcommand\n            self.invoked_parents = invoked_parents\n            self.subcommand_passed = subcommand_passed\n\n    @property\n    def valid(self) -> bool:\n        \"\"\":class:`bool`: Checks if the invocation context is valid to be invoked with.\"\"\"\n        return self.prefix is not None and self.command is not None\n\n    async def _get_channel(self) -> discord.abc.Messageable:\n        return self.channel\n\n    @property\n    def clean_prefix(self) -> str:\n        \"\"\":class:`str`: The cleaned up invoke prefix. i.e. mentions are ``@name`` instead of ``<@id>``.\n\n        .. versionadded:: 2.0\n        \"\"\"\n        if self.prefix is None:\n            return ''\n\n        user = self.me\n        # this breaks if the prefix mention is not the bot itself but I\n        # consider this to be an *incredibly* strange use case. I'd rather go\n        # for this common use case rather than waste performance for the\n        # odd one.\n        pattern = re.compile(r\"<@!?%s>\" % user.id)\n        return pattern.sub(\"@%s\" % user.display_name.replace('\\\\', r'\\\\'), self.prefix)\n\n    @property\n    def cog(self) -> Optional[Cog]:\n        \"\"\"Optional[:class:`.Cog`]: Returns the cog associated with this context's command. None if it does not exist.\"\"\"\n\n        if self.command is None:\n            return None\n        return self.command.cog\n\n    @property\n    def filesize_limit(self) -> int:\n        \"\"\":class:`int`: Returns the maximum number of bytes files can have when uploaded to this guild or DM channel associated with this context.\n\n        .. versionadded:: 2.3\n        \"\"\"\n        return self.guild.filesize_limit if self.guild is not None else discord.utils.DEFAULT_FILE_SIZE_LIMIT_BYTES\n\n    @discord.utils.cached_property\n    def guild(self) -> Optional[Guild]:\n        \"\"\"Optional[:class:`.Guild`]: Returns the guild associated with this context's command. None if not available.\"\"\"\n        return self.message.guild\n\n    @discord.utils.cached_property\n    def channel(self) -> MessageableChannel:\n        \"\"\"Union[:class:`.abc.Messageable`]: Returns the channel associated with this context's command.\n        Shorthand for :attr:`.Message.channel`.\n        \"\"\"\n        return self.message.channel\n\n    @discord.utils.cached_property\n    def author(self) -> Union[User, Member]:\n        \"\"\"Union[:class:`~discord.User`, :class:`.Member`]:\n        Returns the author associated with this context's command. Shorthand for :attr:`.Message.author`\n        \"\"\"\n        return self.message.author\n\n    @discord.utils.cached_property\n    def me(self) -> Union[Member, ClientUser]:\n        \"\"\"Union[:class:`.Member`, :class:`.ClientUser`]:\n        Similar to :attr:`.Guild.me` except it may return the :class:`.ClientUser` in private message contexts.\n        \"\"\"\n        # bot.user will never be None at this point.\n        return self.guild.me if self.guild is not None else self.bot.user  # type: ignore\n\n    @discord.utils.cached_property\n    def permissions(self) -> Permissions:\n        \"\"\":class:`.Permissions`: Returns the resolved permissions for the invoking user in this channel.\n        Shorthand for :meth:`.abc.GuildChannel.permissions_for` or :attr:`.Interaction.permissions`.\n\n        .. versionadded:: 2.0\n        \"\"\"\n        if self.interaction is None and self.channel.type is ChannelType.private:\n            return Permissions._dm_permissions()\n        if not self.interaction:\n            # channel and author will always match relevant types here\n            return self.channel.permissions_for(self.author)  # type: ignore\n        base = self.interaction.permissions\n        if self.channel.type in (ChannelType.voice, ChannelType.stage_voice):\n            if not base.connect:\n                # voice channels cannot be edited by people who can't connect to them\n                # It also implicitly denies all other voice perms\n                denied = Permissions.voice()\n                denied.update(manage_channels=True, manage_roles=True)\n                base.value &= ~denied.value\n        else:\n            # text channels do not have voice related permissions\n            denied = Permissions.voice()\n            base.value &= ~denied.value\n        return base\n\n    @discord.utils.cached_property\n    def bot_permissions(self) -> Permissions:\n        \"\"\":class:`.Permissions`: Returns the resolved permissions for the bot in this channel.\n        Shorthand for :meth:`.abc.GuildChannel.permissions_for` or :attr:`.Interaction.app_permissions`.\n\n        For interaction-based commands, this will reflect the effective permissions\n        for :class:`Context` calls, which may differ from calls through\n        other :class:`.abc.Messageable` endpoints, like :attr:`channel`.\n\n        Notably, sending messages, embedding links, and attaching files are always\n        permitted, while reading messages might not be.\n\n        .. versionadded:: 2.0\n        \"\"\"\n        channel = self.channel\n        if self.interaction is None and channel.type == ChannelType.private:\n            return Permissions._dm_permissions()\n        if not self.interaction:\n            # channel and me will always match relevant types here\n            return channel.permissions_for(self.me)  # type: ignore\n        guild = channel.guild\n        base = self.interaction.app_permissions\n        if self.channel.type in (ChannelType.voice, ChannelType.stage_voice):\n            if not base.connect:\n                # voice channels cannot be edited by people who can't connect to them\n                # It also implicitly denies all other voice perms\n                denied = Permissions.voice()\n                denied.update(manage_channels=True, manage_roles=True)\n                base.value &= ~denied.value\n        else:\n            # text channels do not have voice related permissions\n            denied = Permissions.voice()\n            base.value &= ~denied.value\n        base.update(\n            embed_links=True,\n            attach_files=True,\n            send_tts_messages=False,\n        )\n        if isinstance(channel, Thread):\n            base.send_messages_in_threads = True\n        else:\n            base.send_messages = True\n        return base\n\n    @property\n    def voice_client(self) -> Optional[VoiceProtocol]:\n        r\"\"\"Optional[:class:`.VoiceProtocol`]: A shortcut to :attr:`.Guild.voice_client`\\, if applicable.\"\"\"\n        g = self.guild\n        return g.voice_client if g else None\n\n    async def send_help(self, *args: Any) -> Any:\n        \"\"\"send_help(entity=<bot>)\n\n        |coro|\n\n        Shows the help command for the specified entity if given.\n        The entity can be a command or a cog.\n\n        If no entity is given, then it'll show help for the\n        entire bot.\n\n        If the entity is a string, then it looks up whether it's a\n        :class:`Cog` or a :class:`Command`.\n\n        .. note::\n\n            Due to the way this function works, instead of returning\n            something similar to :meth:`~.commands.HelpCommand.command_not_found`\n            this returns ``None`` on bad input or no help command.\n\n        Parameters\n        ------------\n        entity: Optional[Union[:class:`Command`, :class:`Cog`, :class:`str`]]\n            The entity to show help for.\n\n        Returns\n        --------\n        Any\n            The result of the help command, if any.\n        \"\"\"\n        from .core import Command, Group, wrap_callback\n        from .errors import CommandError\n\n        bot = self.bot\n        cmd = bot.help_command\n\n        if cmd is None:\n            return None\n\n        cmd = cmd.copy()\n        cmd.context = self\n\n        if len(args) == 0:\n            await cmd.prepare_help_command(self, None)\n            mapping = cmd.get_bot_mapping()\n            injected = wrap_callback(cmd.send_bot_help)\n            try:\n                return await injected(mapping)\n            except CommandError as e:\n                await cmd.on_help_command_error(self, e)\n                return None\n\n        entity = args[0]\n        if isinstance(entity, str):\n            entity = bot.get_cog(entity) or bot.get_command(entity)\n\n        if entity is None:\n            return None\n\n        try:\n            entity.qualified_name\n        except AttributeError:\n            # if we're here then it's not a cog, group, or command.\n            return None\n\n        await cmd.prepare_help_command(self, entity.qualified_name)\n\n        try:\n            if is_cog(entity):\n                injected = wrap_callback(cmd.send_cog_help)\n                return await injected(entity)\n            elif isinstance(entity, Group):\n                injected = wrap_callback(cmd.send_group_help)\n                return await injected(entity)\n            elif isinstance(entity, Command):\n                injected = wrap_callback(cmd.send_command_help)\n                return await injected(entity)\n            else:\n                return None\n        except CommandError as e:\n            await cmd.on_help_command_error(self, e)\n\n    @overload\n    async def reply(\n        self,\n        content: Optional[str] = ...,\n        *,\n        tts: bool = ...,\n        embed: Embed = ...,\n        file: File = ...,\n        stickers: Sequence[Union[GuildSticker, StickerItem]] = ...,\n        delete_after: float = ...,\n        nonce: Union[str, int] = ...,\n        allowed_mentions: AllowedMentions = ...,\n        reference: Union[Message, MessageReference, PartialMessage] = ...,\n        mention_author: bool = ...,\n        view: View = ...,\n        suppress_embeds: bool = ...,\n        ephemeral: bool = ...,\n        silent: bool = ...,\n        poll: Poll = ...,\n    ) -> Message:\n        ...\n\n    @overload\n    async def reply(\n        self,\n        content: Optional[str] = ...,\n        *,\n        tts: bool = ...,\n        embed: Embed = ...,\n        files: Sequence[File] = ...,\n        stickers: Sequence[Union[GuildSticker, StickerItem]] = ...,\n        delete_after: float = ...,\n        nonce: Union[str, int] = ...,\n        allowed_mentions: AllowedMentions = ...,\n        reference: Union[Message, MessageReference, PartialMessage] = ...,\n        mention_author: bool = ...,\n        view: View = ...,\n        suppress_embeds: bool = ...,\n        ephemeral: bool = ...,\n        silent: bool = ...,\n        poll: Poll = ...,\n    ) -> Message:\n        ...\n\n    @overload\n    async def reply(\n        self,\n        content: Optional[str] = ...,\n        *,\n        tts: bool = ...,\n        embeds: Sequence[Embed] = ...,\n        file: File = ...,\n        stickers: Sequence[Union[GuildSticker, StickerItem]] = ...,\n        delete_after: float = ...,\n        nonce: Union[str, int] = ...,\n        allowed_mentions: AllowedMentions = ...,\n        reference: Union[Message, MessageReference, PartialMessage] = ...,\n        mention_author: bool = ...,\n        view: View = ...,\n        suppress_embeds: bool = ...,\n        ephemeral: bool = ...,\n        silent: bool = ...,\n        poll: Poll = ...,\n    ) -> Message:\n        ...\n\n    @overload\n    async def reply(\n        self,\n        content: Optional[str] = ...,\n        *,\n        tts: bool = ...,\n        embeds: Sequence[Embed] = ...,\n        files: Sequence[File] = ...,\n        stickers: Sequence[Union[GuildSticker, StickerItem]] = ...,\n        delete_after: float = ...,\n        nonce: Union[str, int] = ...,\n        allowed_mentions: AllowedMentions = ...,\n        reference: Union[Message, MessageReference, PartialMessage] = ...,\n        mention_author: bool = ...,\n        view: View = ...,\n        suppress_embeds: bool = ...,\n        ephemeral: bool = ...,\n        silent: bool = ...,\n        poll: Poll = ...,\n    ) -> Message:\n        ...\n\n    async def reply(self, content: Optional[str] = None, **kwargs: Any) -> Message:\n        \"\"\"|coro|\n\n        A shortcut method to :meth:`send` to reply to the\n        :class:`~discord.Message` referenced by this context.\n\n        For interaction based contexts, this is the same as :meth:`send`.\n\n        .. versionadded:: 1.6\n\n        .. versionchanged:: 2.0\n            This function will now raise :exc:`TypeError` or\n            :exc:`ValueError` instead of ``InvalidArgument``.\n\n        Raises\n        --------\n        ~discord.HTTPException\n            Sending the message failed.\n        ~discord.Forbidden\n            You do not have the proper permissions to send the message.\n        ValueError\n            The ``files`` list is not of the appropriate size\n        TypeError\n            You specified both ``file`` and ``files``.\n\n        Returns\n        ---------\n        :class:`~discord.Message`\n            The message that was sent.\n        \"\"\"\n        if self.interaction is None:\n            return await self.send(content, reference=self.message, **kwargs)\n        else:\n            return await self.send(content, **kwargs)\n\n    def typing(self, *, ephemeral: bool = False) -> Union[Typing, DeferTyping]:\n        \"\"\"Returns an asynchronous context manager that allows you to send a typing indicator to\n        the destination for an indefinite period of time, or 10 seconds if the context manager\n        is called using ``await``.\n\n        In an interaction based context, this is equivalent to a :meth:`defer` call and\n        does not do any typing calls.\n\n        Example Usage: ::\n\n            async with channel.typing():\n                # simulate something heavy\n                await asyncio.sleep(20)\n\n            await channel.send('Done!')\n\n        Example Usage: ::\n\n            await channel.typing()\n            # Do some computational magic for about 10 seconds\n            await channel.send('Done!')\n\n        .. versionchanged:: 2.0\n            This no longer works with the ``with`` syntax, ``async with`` must be used instead.\n\n        .. versionchanged:: 2.0\n            Added functionality to ``await`` the context manager to send a typing indicator for 10 seconds.\n\n        Parameters\n        -----------\n        ephemeral: :class:`bool`\n            Indicates whether the deferred message will eventually be ephemeral.\n            Only valid for interaction based contexts.\n\n            .. versionadded:: 2.0\n        \"\"\"\n        if self.interaction is None:\n            return Typing(self)\n        return DeferTyping(self, ephemeral=ephemeral)\n\n    async def defer(self, *, ephemeral: bool = False) -> None:\n        \"\"\"|coro|\n\n        Defers the interaction based contexts.\n\n        This is typically used when the interaction is acknowledged\n        and a secondary action will be done later.\n\n        If this isn't an interaction based context then it does nothing.\n\n        Parameters\n        -----------\n        ephemeral: :class:`bool`\n            Indicates whether the deferred message will eventually be ephemeral.\n\n        Raises\n        -------\n        HTTPException\n            Deferring the interaction failed.\n        InteractionResponded\n            This interaction has already been responded to before.\n        \"\"\"\n\n        if self.interaction:\n            await self.interaction.response.defer(ephemeral=ephemeral)\n\n    @overload\n    async def send(\n        self,\n        content: Optional[str] = ...,\n        *,\n        tts: bool = ...,\n        embed: Embed = ...,\n        file: File = ...,\n        stickers: Sequence[Union[GuildSticker, StickerItem]] = ...,\n        delete_after: float = ...,\n        nonce: Union[str, int] = ...,\n        allowed_mentions: AllowedMentions = ...,\n        reference: Union[Message, MessageReference, PartialMessage] = ...,\n        mention_author: bool = ...,\n        view: View = ...,\n        suppress_embeds: bool = ...,\n        ephemeral: bool = ...,\n        silent: bool = ...,\n        poll: Poll = ...,\n    ) -> Message:\n        ...\n\n    @overload\n    async def send(\n        self,\n        content: Optional[str] = ...,\n        *,\n        tts: bool = ...,\n        embed: Embed = ...,\n        files: Sequence[File] = ...,\n        stickers: Sequence[Union[GuildSticker, StickerItem]] = ...,\n        delete_after: float = ...,\n        nonce: Union[str, int] = ...,\n        allowed_mentions: AllowedMentions = ...,\n        reference: Union[Message, MessageReference, PartialMessage] = ...,\n        mention_author: bool = ...,\n        view: View = ...,\n        suppress_embeds: bool = ...,\n        ephemeral: bool = ...,\n        silent: bool = ...,\n        poll: Poll = ...,\n    ) -> Message:\n        ...\n\n    @overload\n    async def send(\n        self,\n        content: Optional[str] = ...,\n        *,\n        tts: bool = ...,\n        embeds: Sequence[Embed] = ...,\n        file: File = ...,\n        stickers: Sequence[Union[GuildSticker, StickerItem]] = ...,\n        delete_after: float = ...,\n        nonce: Union[str, int] = ...,\n        allowed_mentions: AllowedMentions = ...,\n        reference: Union[Message, MessageReference, PartialMessage] = ...,\n        mention_author: bool = ...,\n        view: View = ...,\n        suppress_embeds: bool = ...,\n        ephemeral: bool = ...,\n        silent: bool = ...,\n        poll: Poll = ...,\n    ) -> Message:\n        ...\n\n    @overload\n    async def send(\n        self,\n        content: Optional[str] = ...,\n        *,\n        tts: bool = ...,\n        embeds: Sequence[Embed] = ...,\n        files: Sequence[File] = ...,\n        stickers: Sequence[Union[GuildSticker, StickerItem]] = ...,\n        delete_after: float = ...,\n        nonce: Union[str, int] = ...,\n        allowed_mentions: AllowedMentions = ...,\n        reference: Union[Message, MessageReference, PartialMessage] = ...,\n        mention_author: bool = ...,\n        view: View = ...,\n        suppress_embeds: bool = ...,\n        ephemeral: bool = ...,\n        silent: bool = ...,\n        poll: Poll = ...,\n    ) -> Message:\n        ...\n\n    async def send(\n        self,\n        content: Optional[str] = None,\n        *,\n        tts: bool = False,\n        embed: Optional[Embed] = None,\n        embeds: Optional[Sequence[Embed]] = None,\n        file: Optional[File] = None,\n        files: Optional[Sequence[File]] = None,\n        stickers: Optional[Sequence[Union[GuildSticker, StickerItem]]] = None,\n        delete_after: Optional[float] = None,\n        nonce: Optional[Union[str, int]] = None,\n        allowed_mentions: Optional[AllowedMentions] = None,\n        reference: Optional[Union[Message, MessageReference, PartialMessage]] = None,\n        mention_author: Optional[bool] = None,\n        view: Optional[View] = None,\n        suppress_embeds: bool = False,\n        ephemeral: bool = False,\n        silent: bool = False,\n        poll: Poll = MISSING,\n    ) -> Message:\n        \"\"\"|coro|\n\n        Sends a message to the destination with the content given.\n\n        This works similarly to :meth:`~discord.abc.Messageable.send` for non-interaction contexts.\n\n        For interaction based contexts this does one of the following:\n\n        - :meth:`discord.InteractionResponse.send_message` if no response has been given.\n        - A followup message if a response has been given.\n        - Regular send if the interaction has expired\n\n        .. versionchanged:: 2.0\n            This function will now raise :exc:`TypeError` or\n            :exc:`ValueError` instead of ``InvalidArgument``.\n\n        Parameters\n        ------------\n        content: Optional[:class:`str`]\n            The content of the message to send.\n        tts: :class:`bool`\n            Indicates if the message should be sent using text-to-speech.\n        embed: :class:`~discord.Embed`\n            The rich embed for the content.\n        file: :class:`~discord.File`\n            The file to upload.\n        files: List[:class:`~discord.File`]\n            A list of files to upload. Must be a maximum of 10.\n        nonce: :class:`int`\n            The nonce to use for sending this message. If the message was successfully sent,\n            then the message will have a nonce with this value.\n        delete_after: :class:`float`\n            If provided, the number of seconds to wait in the background\n            before deleting the message we just sent. If the deletion fails,\n            then it is silently ignored.\n        allowed_mentions: :class:`~discord.AllowedMentions`\n            Controls the mentions being processed in this message. If this is\n            passed, then the object is merged with :attr:`~discord.Client.allowed_mentions`.\n            The merging behaviour only overrides attributes that have been explicitly passed\n            to the object, otherwise it uses the attributes set in :attr:`~discord.Client.allowed_mentions`.\n            If no object is passed at all then the defaults given by :attr:`~discord.Client.allowed_mentions`\n            are used instead.\n\n            .. versionadded:: 1.4\n\n        reference: Union[:class:`~discord.Message`, :class:`~discord.MessageReference`, :class:`~discord.PartialMessage`]\n            A reference to the :class:`~discord.Message` to which you are replying, this can be created using\n            :meth:`~discord.Message.to_reference` or passed directly as a :class:`~discord.Message`. You can control\n            whether this mentions the author of the referenced message using the :attr:`~discord.AllowedMentions.replied_user`\n            attribute of ``allowed_mentions`` or by setting ``mention_author``.\n\n            This is ignored for interaction based contexts.\n\n            .. versionadded:: 1.6\n\n        mention_author: Optional[:class:`bool`]\n            If set, overrides the :attr:`~discord.AllowedMentions.replied_user` attribute of ``allowed_mentions``.\n            This is ignored for interaction based contexts.\n\n            .. versionadded:: 1.6\n        view: :class:`discord.ui.View`\n            A Discord UI View to add to the message.\n\n            .. versionadded:: 2.0\n        embeds: List[:class:`~discord.Embed`]\n            A list of embeds to upload. Must be a maximum of 10.\n\n            .. versionadded:: 2.0\n        stickers: Sequence[Union[:class:`~discord.GuildSticker`, :class:`~discord.StickerItem`]]\n            A list of stickers to upload. Must be a maximum of 3. This is ignored for interaction based contexts.\n\n            .. versionadded:: 2.0\n        suppress_embeds: :class:`bool`\n            Whether to suppress embeds for the message. This sends the message without any embeds if set to ``True``.\n\n            .. versionadded:: 2.0\n        ephemeral: :class:`bool`\n            Indicates if the message should only be visible to the user who started the interaction.\n            If a view is sent with an ephemeral message and it has no timeout set then the timeout\n            is set to 15 minutes. **This is only applicable in contexts with an interaction**.\n\n            .. versionadded:: 2.0\n        silent: :class:`bool`\n            Whether to suppress push and desktop notifications for the message. This will increment the mention counter\n            in the UI, but will not actually send a notification.\n\n            .. versionadded:: 2.2\n\n        poll: :class:`~discord.Poll`\n            The poll to send with this message.\n\n            .. versionadded:: 2.4\n\n        Raises\n        --------\n        ~discord.HTTPException\n            Sending the message failed.\n        ~discord.Forbidden\n            You do not have the proper permissions to send the message.\n        ValueError\n            The ``files`` list is not of the appropriate size.\n        TypeError\n            You specified both ``file`` and ``files``,\n            or you specified both ``embed`` and ``embeds``,\n            or the ``reference`` object is not a :class:`~discord.Message`,\n            :class:`~discord.MessageReference` or :class:`~discord.PartialMessage`.\n\n        Returns\n        ---------\n        :class:`~discord.Message`\n            The message that was sent.\n        \"\"\"\n\n        if self.interaction is None or self.interaction.is_expired():\n            return await super().send(\n                content=content,\n                tts=tts,\n                embed=embed,\n                embeds=embeds,\n                file=file,\n                files=files,\n                stickers=stickers,\n                delete_after=delete_after,\n                nonce=nonce,\n                allowed_mentions=allowed_mentions,\n                reference=reference,\n                mention_author=mention_author,\n                view=view,\n                suppress_embeds=suppress_embeds,\n                silent=silent,\n                poll=poll,\n            )  # type: ignore # The overloads don't support Optional but the implementation does\n\n        # Convert the kwargs from None to MISSING to appease the remaining implementations\n        kwargs = {\n            'content': content,\n            'tts': tts,\n            'embed': MISSING if embed is None else embed,\n            'embeds': MISSING if embeds is None else embeds,\n            'file': MISSING if file is None else file,\n            'files': MISSING if files is None else files,\n            'allowed_mentions': MISSING if allowed_mentions is None else allowed_mentions,\n            'view': MISSING if view is None else view,\n            'suppress_embeds': suppress_embeds,\n            'ephemeral': ephemeral,\n            'silent': silent,\n            'poll': poll,\n        }\n\n        if self.interaction.response.is_done():\n            msg = await self.interaction.followup.send(**kwargs, wait=True)\n        else:\n            await self.interaction.response.send_message(**kwargs)\n            msg = await self.interaction.original_response()\n\n        if delete_after is not None:\n            await msg.delete(delay=delete_after)\n        return msg\n"
  },
  {
    "path": "discord/ext/commands/converter.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom __future__ import annotations\n\nimport inspect\nimport re\nfrom typing import (\n    TYPE_CHECKING,\n    Any,\n    Dict,\n    Generic,\n    Iterable,\n    List,\n    Literal,\n    Optional,\n    overload,\n    Protocol,\n    Tuple,\n    Type,\n    TypeVar,\n    Union,\n    runtime_checkable,\n)\nimport types\n\nimport discord\n\nfrom .errors import *\n\nif TYPE_CHECKING:\n    from discord.state import Channel\n    from discord.threads import Thread\n\n    from .parameters import Parameter\n    from ._types import BotT, _Bot\n    from .context import Context\n\n__all__ = (\n    'Converter',\n    'ObjectConverter',\n    'MemberConverter',\n    'UserConverter',\n    'MessageConverter',\n    'PartialMessageConverter',\n    'TextChannelConverter',\n    'InviteConverter',\n    'GuildConverter',\n    'RoleConverter',\n    'GameConverter',\n    'ColourConverter',\n    'ColorConverter',\n    'VoiceChannelConverter',\n    'StageChannelConverter',\n    'EmojiConverter',\n    'PartialEmojiConverter',\n    'CategoryChannelConverter',\n    'ForumChannelConverter',\n    'IDConverter',\n    'ThreadConverter',\n    'GuildChannelConverter',\n    'GuildStickerConverter',\n    'ScheduledEventConverter',\n    'clean_content',\n    'Greedy',\n    'Range',\n    'run_converters',\n)\n\n\ndef _get_from_guilds(bot: _Bot, getter: str, argument: Any) -> Any:\n    result = None\n    for guild in bot.guilds:\n        result = getattr(guild, getter)(argument)\n        if result:\n            return result\n    return result\n\n\n_utils_get = discord.utils.get\nT = TypeVar('T')\nT_co = TypeVar('T_co', covariant=True)\nCT = TypeVar('CT', bound=discord.abc.GuildChannel)\nTT = TypeVar('TT', bound=discord.Thread)\n\n\n@runtime_checkable\nclass Converter(Protocol[T_co]):\n    \"\"\"The base class of custom converters that require the :class:`.Context`\n    to be passed to be useful.\n\n    This allows you to implement converters that function similar to the\n    special cased ``discord`` classes.\n\n    Classes that derive from this should override the :meth:`~.Converter.convert`\n    method to do its conversion logic. This method must be a :ref:`coroutine <coroutine>`.\n    \"\"\"\n\n    async def convert(self, ctx: Context[BotT], argument: str) -> T_co:\n        \"\"\"|coro|\n\n        The method to override to do conversion logic.\n\n        If an error is found while converting, it is recommended to\n        raise a :exc:`.CommandError` derived exception as it will\n        properly propagate to the error handlers.\n\n        Note that if this method is called manually, :exc:`Exception`\n        should be caught to handle the cases where a subclass does\n        not explicitly inherit from :exc:`.CommandError`.\n\n        Parameters\n        -----------\n        ctx: :class:`.Context`\n            The invocation context that the argument is being used in.\n        argument: :class:`str`\n            The argument that is being converted.\n\n        Raises\n        -------\n        CommandError\n            A generic exception occurred when converting the argument.\n        BadArgument\n            The converter failed to convert the argument.\n        \"\"\"\n        raise NotImplementedError('Derived classes need to implement this.')\n\n\n_ID_REGEX = re.compile(r'([0-9]{15,20})$')\n\n\nclass IDConverter(Converter[T_co]):\n    @staticmethod\n    def _get_id_match(argument):\n        return _ID_REGEX.match(argument)\n\n\nclass ObjectConverter(IDConverter[discord.Object]):\n    \"\"\"Converts to a :class:`~discord.Object`.\n\n    The argument must follow the valid ID or mention formats (e.g. ``<@80088516616269824>``).\n\n    .. versionadded:: 2.0\n\n    The lookup strategy is as follows (in order):\n\n    1. Lookup by ID.\n    2. Lookup by member, role, or channel mention.\n    \"\"\"\n\n    async def convert(self, ctx: Context[BotT], argument: str) -> discord.Object:\n        match = self._get_id_match(argument) or re.match(r'<(?:@(?:!|&)?|#)([0-9]{15,20})>$', argument)\n\n        if match is None:\n            raise ObjectNotFound(argument)\n\n        result = int(match.group(1))\n\n        return discord.Object(id=result)\n\n\nclass MemberConverter(IDConverter[discord.Member]):\n    \"\"\"Converts to a :class:`~discord.Member`.\n\n    All lookups are via the local guild. If in a DM context, then the lookup\n    is done by the global cache.\n\n    The lookup strategy is as follows (in order):\n\n    1. Lookup by ID.\n    2. Lookup by mention.\n    3. Lookup by username#discriminator (deprecated).\n    4. Lookup by username#0 (deprecated, only gets users that migrated from their discriminator).\n    5. Lookup by user name.\n    6. Lookup by global name.\n    7. Lookup by guild nickname.\n\n    .. versionchanged:: 1.5\n         Raise :exc:`.MemberNotFound` instead of generic :exc:`.BadArgument`\n\n    .. versionchanged:: 1.5.1\n        This converter now lazily fetches members from the gateway and HTTP APIs,\n        optionally caching the result if :attr:`.MemberCacheFlags.joined` is enabled.\n\n    .. deprecated:: 2.3\n        Looking up users by discriminator will be removed in a future version due to\n        the removal of discriminators in an API change.\n    \"\"\"\n\n    async def query_member_named(self, guild: discord.Guild, argument: str) -> Optional[discord.Member]:\n        cache = guild._state.member_cache_flags.joined\n        username, _, discriminator = argument.rpartition('#')\n\n        # If # isn't found then \"discriminator\" actually has the username\n        if not username:\n            discriminator, username = username, discriminator\n\n        if discriminator == '0' or (len(discriminator) == 4 and discriminator.isdigit()):\n            lookup = username\n            predicate = lambda m: m.name == username and m.discriminator == discriminator\n        else:\n            lookup = argument\n            predicate = lambda m: m.name == argument or m.global_name == argument or m.nick == argument\n\n        members = await guild.query_members(lookup, limit=100, cache=cache)\n        return discord.utils.find(predicate, members)\n\n    async def query_member_by_id(self, bot: _Bot, guild: discord.Guild, user_id: int) -> Optional[discord.Member]:\n        ws = bot._get_websocket(shard_id=guild.shard_id)\n        cache = guild._state.member_cache_flags.joined\n        if ws.is_ratelimited():\n            # If we're being rate limited on the WS, then fall back to using the HTTP API\n            # So we don't have to wait ~60 seconds for the query to finish\n            try:\n                member = await guild.fetch_member(user_id)\n            except discord.HTTPException:\n                return None\n\n            if cache:\n                guild._add_member(member)\n            return member\n\n        # If we're not being rate limited then we can use the websocket to actually query\n        members = await guild.query_members(limit=1, user_ids=[user_id], cache=cache)\n        if not members:\n            return None\n        return members[0]\n\n    async def convert(self, ctx: Context[BotT], argument: str) -> discord.Member:\n        bot = ctx.bot\n        match = self._get_id_match(argument) or re.match(r'<@!?([0-9]{15,20})>$', argument)\n        guild = ctx.guild\n        result = None\n        user_id = None\n\n        if match is None:\n            # not a mention...\n            if guild:\n                result = guild.get_member_named(argument)\n            else:\n                result = _get_from_guilds(bot, 'get_member_named', argument)\n        else:\n            user_id = int(match.group(1))\n            if guild:\n                result = guild.get_member(user_id) or _utils_get(ctx.message.mentions, id=user_id)\n            else:\n                result = _get_from_guilds(bot, 'get_member', user_id)\n\n        if not isinstance(result, discord.Member):\n            if guild is None:\n                raise MemberNotFound(argument)\n\n            if user_id is not None:\n                result = await self.query_member_by_id(bot, guild, user_id)\n            else:\n                result = await self.query_member_named(guild, argument)\n\n            if not result:\n                raise MemberNotFound(argument)\n\n        return result\n\n\nclass UserConverter(IDConverter[discord.User]):\n    \"\"\"Converts to a :class:`~discord.User`.\n\n    All lookups are via the global user cache.\n\n    The lookup strategy is as follows (in order):\n\n    1. Lookup by ID.\n    2. Lookup by mention.\n    3. Lookup by username#discriminator (deprecated).\n    4. Lookup by username#0 (deprecated, only gets users that migrated from their discriminator).\n    5. Lookup by user name.\n    6. Lookup by global name.\n\n    .. versionchanged:: 1.5\n         Raise :exc:`.UserNotFound` instead of generic :exc:`.BadArgument`\n\n    .. versionchanged:: 1.6\n        This converter now lazily fetches users from the HTTP APIs if an ID is passed\n        and it's not available in cache.\n\n    .. deprecated:: 2.3\n        Looking up users by discriminator will be removed in a future version due to\n        the removal of discriminators in an API change.\n    \"\"\"\n\n    async def convert(self, ctx: Context[BotT], argument: str) -> discord.User:\n        match = self._get_id_match(argument) or re.match(r'<@!?([0-9]{15,20})>$', argument)\n        result = None\n        state = ctx._state\n\n        if match is not None:\n            user_id = int(match.group(1))\n            result = ctx.bot.get_user(user_id) or _utils_get(ctx.message.mentions, id=user_id)\n            if result is None:\n                try:\n                    result = await ctx.bot.fetch_user(user_id)\n                except discord.HTTPException:\n                    raise UserNotFound(argument) from None\n\n            return result  # type: ignore\n\n        username, _, discriminator = argument.rpartition('#')\n\n        # If # isn't found then \"discriminator\" actually has the username\n        if not username:\n            discriminator, username = username, discriminator\n\n        if discriminator == '0' or (len(discriminator) == 4 and discriminator.isdigit()):\n            predicate = lambda u: u.name == username and u.discriminator == discriminator\n        else:\n            predicate = lambda u: u.name == argument or u.global_name == argument\n\n        result = discord.utils.find(predicate, state._users.values())\n        if result is None:\n            raise UserNotFound(argument)\n\n        return result\n\n\nclass PartialMessageConverter(Converter[discord.PartialMessage]):\n    \"\"\"Converts to a :class:`discord.PartialMessage`.\n\n    .. versionadded:: 1.7\n\n    The creation strategy is as follows (in order):\n\n    1. By \"{channel ID}-{message ID}\" (retrieved by shift-clicking on \"Copy ID\")\n    2. By message ID (The message is assumed to be in the context channel.)\n    3. By message URL\n    \"\"\"\n\n    @staticmethod\n    def _get_id_matches(ctx: Context[BotT], argument: str) -> Tuple[Optional[int], int, int]:\n        id_regex = re.compile(r'(?:(?P<channel_id>[0-9]{15,20})-)?(?P<message_id>[0-9]{15,20})$')\n        link_regex = re.compile(\n            r'https?://(?:(ptb|canary|www)\\.)?discord(?:app)?\\.com/channels/'\n            r'(?P<guild_id>[0-9]{15,20}|@me)'\n            r'/(?P<channel_id>[0-9]{15,20})/(?P<message_id>[0-9]{15,20})/?$'\n        )\n        match = id_regex.match(argument) or link_regex.match(argument)\n        if not match:\n            raise MessageNotFound(argument)\n        data = match.groupdict()\n        channel_id = discord.utils._get_as_snowflake(data, 'channel_id') or ctx.channel.id\n        message_id = int(data['message_id'])\n        guild_id = data.get('guild_id')\n        if guild_id is None:\n            guild_id = ctx.guild and ctx.guild.id\n        elif guild_id == '@me':\n            guild_id = None\n        else:\n            guild_id = int(guild_id)\n        return guild_id, message_id, channel_id\n\n    @staticmethod\n    def _resolve_channel(\n        ctx: Context[BotT], guild_id: Optional[int], channel_id: Optional[int]\n    ) -> Optional[Union[Channel, Thread]]:\n        if channel_id is None:\n            # we were passed just a message id so we can assume the channel is the current context channel\n            return ctx.channel\n\n        if guild_id is not None:\n            guild = ctx.bot.get_guild(guild_id)\n            if guild is None:\n                return None\n            return guild._resolve_channel(channel_id)\n\n        return ctx.bot.get_channel(channel_id)\n\n    async def convert(self, ctx: Context[BotT], argument: str) -> discord.PartialMessage:\n        guild_id, message_id, channel_id = self._get_id_matches(ctx, argument)\n        channel = self._resolve_channel(ctx, guild_id, channel_id)\n        if not channel or not isinstance(channel, discord.abc.Messageable):\n            raise ChannelNotFound(channel_id)\n        return discord.PartialMessage(channel=channel, id=message_id)\n\n\nclass MessageConverter(IDConverter[discord.Message]):\n    \"\"\"Converts to a :class:`discord.Message`.\n\n    .. versionadded:: 1.1\n\n    The lookup strategy is as follows (in order):\n\n    1. Lookup by \"{channel ID}-{message ID}\" (retrieved by shift-clicking on \"Copy ID\")\n    2. Lookup by message ID (the message **must** be in the context channel)\n    3. Lookup by message URL\n\n    .. versionchanged:: 1.5\n         Raise :exc:`.ChannelNotFound`, :exc:`.MessageNotFound` or :exc:`.ChannelNotReadable` instead of generic :exc:`.BadArgument`\n    \"\"\"\n\n    async def convert(self, ctx: Context[BotT], argument: str) -> discord.Message:\n        guild_id, message_id, channel_id = PartialMessageConverter._get_id_matches(ctx, argument)\n        message = ctx.bot._connection._get_message(message_id)\n        if message:\n            return message\n        channel = PartialMessageConverter._resolve_channel(ctx, guild_id, channel_id)\n        if not channel or not isinstance(channel, discord.abc.Messageable):\n            raise ChannelNotFound(channel_id)\n        try:\n            return await channel.fetch_message(message_id)\n        except discord.NotFound:\n            raise MessageNotFound(argument)\n        except discord.Forbidden:\n            raise ChannelNotReadable(channel)  # type: ignore # type-checker thinks channel could be a DMChannel at this point\n\n\nclass GuildChannelConverter(IDConverter[discord.abc.GuildChannel]):\n    \"\"\"Converts to a :class:`~discord.abc.GuildChannel`.\n\n    All lookups are via the local guild. If in a DM context, then the lookup\n    is done by the global cache.\n\n    The lookup strategy is as follows (in order):\n\n    1. Lookup by ID.\n    2. Lookup by mention.\n    3. Lookup by channel URL.\n    4. Lookup by name.\n\n    .. versionadded:: 2.0\n\n    .. versionchanged:: 2.4\n        Add lookup by channel URL, accessed via \"Copy Link\" in the Discord client within channels.\n    \"\"\"\n\n    async def convert(self, ctx: Context[BotT], argument: str) -> discord.abc.GuildChannel:\n        return self._resolve_channel(ctx, argument, 'channels', discord.abc.GuildChannel)\n\n    @staticmethod\n    def _parse_from_url(argument: str) -> Optional[re.Match[str]]:\n        link_regex = re.compile(\n            r'https?://(?:(?:ptb|canary|www)\\.)?discord(?:app)?\\.com/channels/'\n            r'(?:[0-9]{15,20}|@me)'\n            r'/([0-9]{15,20})(?:/(?:[0-9]{15,20})/?)?$'\n        )\n        return link_regex.match(argument)\n\n    @staticmethod\n    def _resolve_channel(ctx: Context[BotT], argument: str, attribute: str, type: Type[CT]) -> CT:\n        bot = ctx.bot\n\n        match = (\n            IDConverter._get_id_match(argument)\n            or re.match(r'<#([0-9]{15,20})>$', argument)\n            or GuildChannelConverter._parse_from_url(argument)\n        )\n        result = None\n        guild = ctx.guild\n\n        if match is None:\n            # not a mention\n            if guild:\n                iterable: Iterable[CT] = getattr(guild, attribute)\n                result: Optional[CT] = discord.utils.get(iterable, name=argument)\n            else:\n\n                def check(c):\n                    return isinstance(c, type) and c.name == argument\n\n                result = discord.utils.find(check, bot.get_all_channels())  # type: ignore\n        else:\n            channel_id = int(match.group(1))\n            if guild:\n                # guild.get_channel returns an explicit union instead of the base class\n                result = guild.get_channel(channel_id)  # type: ignore\n            else:\n                result = _get_from_guilds(bot, 'get_channel', channel_id)\n\n        if not isinstance(result, type):\n            raise ChannelNotFound(argument)\n\n        return result\n\n    @staticmethod\n    def _resolve_thread(ctx: Context[BotT], argument: str, attribute: str, type: Type[TT]) -> TT:\n        match = (\n            IDConverter._get_id_match(argument)\n            or re.match(r'<#([0-9]{15,20})>$', argument)\n            or GuildChannelConverter._parse_from_url(argument)\n        )\n        result = None\n        guild = ctx.guild\n\n        if match is None:\n            # not a mention\n            if guild:\n                iterable: Iterable[TT] = getattr(guild, attribute)\n                result: Optional[TT] = discord.utils.get(iterable, name=argument)\n        else:\n            thread_id = int(match.group(1))\n            if guild:\n                result = guild.get_thread(thread_id)  # type: ignore\n\n        if not result or not isinstance(result, type):\n            raise ThreadNotFound(argument)\n\n        return result\n\n\nclass TextChannelConverter(IDConverter[discord.TextChannel]):\n    \"\"\"Converts to a :class:`~discord.TextChannel`.\n\n    All lookups are via the local guild. If in a DM context, then the lookup\n    is done by the global cache.\n\n    The lookup strategy is as follows (in order):\n\n    1. Lookup by ID.\n    2. Lookup by mention.\n    3. Lookup by channel URL.\n    4. Lookup by name\n\n    .. versionchanged:: 1.5\n         Raise :exc:`.ChannelNotFound` instead of generic :exc:`.BadArgument`\n\n    .. versionchanged:: 2.4\n        Add lookup by channel URL, accessed via \"Copy Link\" in the Discord client within channels.\n    \"\"\"\n\n    async def convert(self, ctx: Context[BotT], argument: str) -> discord.TextChannel:\n        return GuildChannelConverter._resolve_channel(ctx, argument, 'text_channels', discord.TextChannel)\n\n\nclass VoiceChannelConverter(IDConverter[discord.VoiceChannel]):\n    \"\"\"Converts to a :class:`~discord.VoiceChannel`.\n\n    All lookups are via the local guild. If in a DM context, then the lookup\n    is done by the global cache.\n\n    The lookup strategy is as follows (in order):\n\n    1. Lookup by ID.\n    2. Lookup by mention.\n    3. Lookup by channel URL.\n    4. Lookup by name\n\n    .. versionchanged:: 1.5\n         Raise :exc:`.ChannelNotFound` instead of generic :exc:`.BadArgument`\n\n    .. versionchanged:: 2.4\n        Add lookup by channel URL, accessed via \"Copy Link\" in the Discord client within channels.\n    \"\"\"\n\n    async def convert(self, ctx: Context[BotT], argument: str) -> discord.VoiceChannel:\n        return GuildChannelConverter._resolve_channel(ctx, argument, 'voice_channels', discord.VoiceChannel)\n\n\nclass StageChannelConverter(IDConverter[discord.StageChannel]):\n    \"\"\"Converts to a :class:`~discord.StageChannel`.\n\n    .. versionadded:: 1.7\n\n    All lookups are via the local guild. If in a DM context, then the lookup\n    is done by the global cache.\n\n    The lookup strategy is as follows (in order):\n\n    1. Lookup by ID.\n    2. Lookup by mention.\n    3. Lookup by channel URL.\n    4. Lookup by name\n\n    .. versionchanged:: 2.4\n        Add lookup by channel URL, accessed via \"Copy Link\" in the Discord client within channels.\n    \"\"\"\n\n    async def convert(self, ctx: Context[BotT], argument: str) -> discord.StageChannel:\n        return GuildChannelConverter._resolve_channel(ctx, argument, 'stage_channels', discord.StageChannel)\n\n\nclass CategoryChannelConverter(IDConverter[discord.CategoryChannel]):\n    \"\"\"Converts to a :class:`~discord.CategoryChannel`.\n\n    All lookups are via the local guild. If in a DM context, then the lookup\n    is done by the global cache.\n\n    The lookup strategy is as follows (in order):\n\n    1. Lookup by ID.\n    2. Lookup by mention.\n    3. Lookup by channel URL.\n    4. Lookup by name\n\n    .. versionchanged:: 2.4\n        Add lookup by channel URL, accessed via \"Copy Link\" in the Discord client within channels.\n\n    .. versionchanged:: 1.5\n         Raise :exc:`.ChannelNotFound` instead of generic :exc:`.BadArgument`\n    \"\"\"\n\n    async def convert(self, ctx: Context[BotT], argument: str) -> discord.CategoryChannel:\n        return GuildChannelConverter._resolve_channel(ctx, argument, 'categories', discord.CategoryChannel)\n\n\nclass ThreadConverter(IDConverter[discord.Thread]):\n    \"\"\"Converts to a :class:`~discord.Thread`.\n\n    All lookups are via the local guild.\n\n    The lookup strategy is as follows (in order):\n\n    1. Lookup by ID.\n    2. Lookup by mention.\n    3. Lookup by channel URL.\n    4. Lookup by name.\n\n    .. versionadded: 2.0\n\n    .. versionchanged:: 2.4\n        Add lookup by channel URL, accessed via \"Copy Link\" in the Discord client within channels.\n    \"\"\"\n\n    async def convert(self, ctx: Context[BotT], argument: str) -> discord.Thread:\n        return GuildChannelConverter._resolve_thread(ctx, argument, 'threads', discord.Thread)\n\n\nclass ForumChannelConverter(IDConverter[discord.ForumChannel]):\n    \"\"\"Converts to a :class:`~discord.ForumChannel`.\n\n    All lookups are via the local guild. If in a DM context, then the lookup\n    is done by the global cache.\n\n    The lookup strategy is as follows (in order):\n\n    1. Lookup by ID.\n    2. Lookup by mention.\n    3. Lookup by channel URL.\n    4. Lookup by name\n\n    .. versionadded:: 2.0\n\n    .. versionchanged:: 2.4\n        Add lookup by channel URL, accessed via \"Copy Link\" in the Discord client within channels.\n    \"\"\"\n\n    async def convert(self, ctx: Context[BotT], argument: str) -> discord.ForumChannel:\n        return GuildChannelConverter._resolve_channel(ctx, argument, 'forums', discord.ForumChannel)\n\n\nclass ColourConverter(Converter[discord.Colour]):\n    \"\"\"Converts to a :class:`~discord.Colour`.\n\n    .. versionchanged:: 1.5\n        Add an alias named ColorConverter\n\n    The following formats are accepted:\n\n    - ``0x<hex>``\n    - ``#<hex>``\n    - ``0x#<hex>``\n    - ``rgb(<number>, <number>, <number>)``\n    - Any of the ``classmethod`` in :class:`~discord.Colour`\n\n        - The ``_`` in the name can be optionally replaced with spaces.\n\n    Like CSS, ``<number>`` can be either 0-255 or 0-100% and ``<hex>`` can be\n    either a 6 digit hex number or a 3 digit hex shortcut (e.g. #fff).\n\n    .. versionchanged:: 1.5\n         Raise :exc:`.BadColourArgument` instead of generic :exc:`.BadArgument`\n\n    .. versionchanged:: 1.7\n        Added support for ``rgb`` function and 3-digit hex shortcuts\n    \"\"\"\n\n    async def convert(self, ctx: Context[BotT], argument: str) -> discord.Colour:\n        try:\n            return discord.Colour.from_str(argument)\n        except ValueError:\n            arg = argument.lower().replace(' ', '_')\n            method = getattr(discord.Colour, arg, None)\n            if arg.startswith('from_') or method is None or not inspect.ismethod(method):\n                raise BadColourArgument(arg)\n            return method()\n\n\nColorConverter = ColourConverter\n\n\nclass RoleConverter(IDConverter[discord.Role]):\n    \"\"\"Converts to a :class:`~discord.Role`.\n\n    All lookups are via the local guild. If in a DM context, the converter raises\n    :exc:`.NoPrivateMessage` exception.\n\n    The lookup strategy is as follows (in order):\n\n    1. Lookup by ID.\n    2. Lookup by mention.\n    3. Lookup by name\n\n    .. versionchanged:: 1.5\n         Raise :exc:`.RoleNotFound` instead of generic :exc:`.BadArgument`\n    \"\"\"\n\n    async def convert(self, ctx: Context[BotT], argument: str) -> discord.Role:\n        guild = ctx.guild\n        if not guild:\n            raise NoPrivateMessage()\n\n        match = self._get_id_match(argument) or re.match(r'<@&([0-9]{15,20})>$', argument)\n        if match:\n            result = guild.get_role(int(match.group(1)))\n        else:\n            result = discord.utils.get(guild._roles.values(), name=argument)\n\n        if result is None:\n            raise RoleNotFound(argument)\n        return result\n\n\nclass GameConverter(Converter[discord.Game]):\n    \"\"\"Converts to a :class:`~discord.Game`.\"\"\"\n\n    async def convert(self, ctx: Context[BotT], argument: str) -> discord.Game:\n        return discord.Game(name=argument)\n\n\nclass InviteConverter(Converter[discord.Invite]):\n    \"\"\"Converts to a :class:`~discord.Invite`.\n\n    This is done via an HTTP request using :meth:`.Bot.fetch_invite`.\n\n    .. versionchanged:: 1.5\n         Raise :exc:`.BadInviteArgument` instead of generic :exc:`.BadArgument`\n    \"\"\"\n\n    async def convert(self, ctx: Context[BotT], argument: str) -> discord.Invite:\n        try:\n            invite = await ctx.bot.fetch_invite(argument)\n            return invite\n        except Exception as exc:\n            raise BadInviteArgument(argument) from exc\n\n\nclass GuildConverter(IDConverter[discord.Guild]):\n    \"\"\"Converts to a :class:`~discord.Guild`.\n\n    The lookup strategy is as follows (in order):\n\n    1. Lookup by ID.\n    2. Lookup by name. (There is no disambiguation for Guilds with multiple matching names).\n\n    .. versionadded:: 1.7\n    \"\"\"\n\n    async def convert(self, ctx: Context[BotT], argument: str) -> discord.Guild:\n        match = self._get_id_match(argument)\n        result = None\n\n        if match is not None:\n            guild_id = int(match.group(1))\n            result = ctx.bot.get_guild(guild_id)\n\n        if result is None:\n            result = discord.utils.get(ctx.bot.guilds, name=argument)\n\n            if result is None:\n                raise GuildNotFound(argument)\n        return result\n\n\nclass EmojiConverter(IDConverter[discord.Emoji]):\n    \"\"\"Converts to a :class:`~discord.Emoji`.\n\n    All lookups are done for the local guild first, if available. If that lookup\n    fails, then it checks the client's global cache.\n\n    The lookup strategy is as follows (in order):\n\n    1. Lookup by ID.\n    2. Lookup by extracting ID from the emoji.\n    3. Lookup by name\n\n    .. versionchanged:: 1.5\n         Raise :exc:`.EmojiNotFound` instead of generic :exc:`.BadArgument`\n    \"\"\"\n\n    async def convert(self, ctx: Context[BotT], argument: str) -> discord.Emoji:\n        match = self._get_id_match(argument) or re.match(r'<a?:[a-zA-Z0-9\\_]{1,32}:([0-9]{15,20})>$', argument)\n        result = None\n        bot = ctx.bot\n        guild = ctx.guild\n\n        if match is None:\n            # Try to get the emoji by name. Try local guild first.\n            if guild:\n                result = discord.utils.get(guild.emojis, name=argument)\n\n            if result is None:\n                result = discord.utils.get(bot.emojis, name=argument)\n        else:\n            emoji_id = int(match.group(1))\n\n            # Try to look up emoji by id.\n            result = bot.get_emoji(emoji_id)\n\n        if result is None:\n            raise EmojiNotFound(argument)\n\n        return result\n\n\nclass PartialEmojiConverter(Converter[discord.PartialEmoji]):\n    \"\"\"Converts to a :class:`~discord.PartialEmoji`.\n\n    This is done by extracting the animated flag, name and ID from the emoji.\n\n    .. versionchanged:: 1.5\n         Raise :exc:`.PartialEmojiConversionFailure` instead of generic :exc:`.BadArgument`\n    \"\"\"\n\n    async def convert(self, ctx: Context[BotT], argument: str) -> discord.PartialEmoji:\n        match = re.match(r'<(a?):([a-zA-Z0-9\\_]{1,32}):([0-9]{15,20})>$', argument)\n\n        if match:\n            emoji_animated = bool(match.group(1))\n            emoji_name = match.group(2)\n            emoji_id = int(match.group(3))\n\n            return discord.PartialEmoji.with_state(\n                ctx.bot._connection, animated=emoji_animated, name=emoji_name, id=emoji_id\n            )\n\n        raise PartialEmojiConversionFailure(argument)\n\n\nclass GuildStickerConverter(IDConverter[discord.GuildSticker]):\n    \"\"\"Converts to a :class:`~discord.GuildSticker`.\n\n    All lookups are done for the local guild first, if available. If that lookup\n    fails, then it checks the client's global cache.\n\n    The lookup strategy is as follows (in order):\n\n    1. Lookup by ID.\n    2. Lookup by name.\n\n    .. versionadded:: 2.0\n    \"\"\"\n\n    async def convert(self, ctx: Context[BotT], argument: str) -> discord.GuildSticker:\n        match = self._get_id_match(argument)\n        result = None\n        bot = ctx.bot\n        guild = ctx.guild\n\n        if match is None:\n            # Try to get the sticker by name. Try local guild first.\n            if guild:\n                result = discord.utils.get(guild.stickers, name=argument)\n\n            if result is None:\n                result = discord.utils.get(bot.stickers, name=argument)\n        else:\n            sticker_id = int(match.group(1))\n\n            # Try to look up sticker by id.\n            result = bot.get_sticker(sticker_id)\n\n        if result is None:\n            raise GuildStickerNotFound(argument)\n\n        return result\n\n\nclass ScheduledEventConverter(IDConverter[discord.ScheduledEvent]):\n    \"\"\"Converts to a :class:`~discord.ScheduledEvent`.\n\n    Lookups are done for the local guild if available. Otherwise, for a DM context,\n    lookup is done by the global cache.\n\n    The lookup strategy is as follows (in order):\n\n    1. Lookup by ID.\n    2. Lookup by url.\n    3. Lookup by name.\n\n    .. versionadded:: 2.0\n    \"\"\"\n\n    async def convert(self, ctx: Context[BotT], argument: str) -> discord.ScheduledEvent:\n        guild = ctx.guild\n        match = self._get_id_match(argument)\n        result = None\n\n        if match:\n            # ID match\n            event_id = int(match.group(1))\n            if guild:\n                result = guild.get_scheduled_event(event_id)\n            else:\n                for guild in ctx.bot.guilds:\n                    result = guild.get_scheduled_event(event_id)\n                    if result:\n                        break\n        else:\n            pattern = (\n                r'https?://(?:(ptb|canary|www)\\.)?discord\\.com/events/'\n                r'(?P<guild_id>[0-9]{15,20})/'\n                r'(?P<event_id>[0-9]{15,20})$'\n            )\n            match = re.match(pattern, argument, flags=re.I)\n            if match:\n                # URL match\n                guild = ctx.bot.get_guild(int(match.group('guild_id')))\n\n                if guild:\n                    event_id = int(match.group('event_id'))\n                    result = guild.get_scheduled_event(event_id)\n            else:\n                # lookup by name\n                if guild:\n                    result = discord.utils.get(guild.scheduled_events, name=argument)\n                else:\n                    for guild in ctx.bot.guilds:\n                        result = discord.utils.get(guild.scheduled_events, name=argument)\n                        if result:\n                            break\n        if result is None:\n            raise ScheduledEventNotFound(argument)\n\n        return result\n\n\nclass clean_content(Converter[str]):\n    \"\"\"Converts the argument to mention scrubbed version of\n    said content.\n\n    This behaves similarly to :attr:`~discord.Message.clean_content`.\n\n    Attributes\n    ------------\n    fix_channel_mentions: :class:`bool`\n        Whether to clean channel mentions.\n    use_nicknames: :class:`bool`\n        Whether to use nicknames when transforming mentions.\n    escape_markdown: :class:`bool`\n        Whether to also escape special markdown characters.\n    remove_markdown: :class:`bool`\n        Whether to also remove special markdown characters. This option is not supported with ``escape_markdown``\n\n        .. versionadded:: 1.7\n    \"\"\"\n\n    def __init__(\n        self,\n        *,\n        fix_channel_mentions: bool = False,\n        use_nicknames: bool = True,\n        escape_markdown: bool = False,\n        remove_markdown: bool = False,\n    ) -> None:\n        self.fix_channel_mentions = fix_channel_mentions\n        self.use_nicknames = use_nicknames\n        self.escape_markdown = escape_markdown\n        self.remove_markdown = remove_markdown\n\n    async def convert(self, ctx: Context[BotT], argument: str) -> str:\n        msg = ctx.message\n\n        if ctx.guild:\n\n            def resolve_member(id: int) -> str:\n                m = _utils_get(msg.mentions, id=id) or ctx.guild.get_member(id)  # type: ignore\n                return f'@{m.display_name if self.use_nicknames else m.name}' if m else '@deleted-user'\n\n            def resolve_role(id: int) -> str:\n                r = _utils_get(msg.role_mentions, id=id) or ctx.guild.get_role(id)  # type: ignore\n                return f'@{r.name}' if r else '@deleted-role'\n\n        else:\n\n            def resolve_member(id: int) -> str:\n                m = _utils_get(msg.mentions, id=id) or ctx.bot.get_user(id)\n                return f'@{m.display_name}' if m else '@deleted-user'\n\n            def resolve_role(id: int) -> str:\n                return '@deleted-role'\n\n        if self.fix_channel_mentions and ctx.guild:\n\n            def resolve_channel(id: int) -> str:\n                c = ctx.guild._resolve_channel(id)  # type: ignore\n                return f'#{c.name}' if c else '#deleted-channel'\n\n        else:\n\n            def resolve_channel(id: int) -> str:\n                return f'<#{id}>'\n\n        transforms = {\n            '@': resolve_member,\n            '@!': resolve_member,\n            '#': resolve_channel,\n            '@&': resolve_role,\n        }\n\n        def repl(match: re.Match) -> str:\n            type = match[1]\n            id = int(match[2])\n            transformed = transforms[type](id)\n            return transformed\n\n        result = re.sub(r'<(@[!&]?|#)([0-9]{15,20})>', repl, argument)\n        if self.escape_markdown:\n            result = discord.utils.escape_markdown(result)\n        elif self.remove_markdown:\n            result = discord.utils.remove_markdown(result)\n\n        # Completely ensure no mentions escape:\n        return discord.utils.escape_mentions(result)\n\n\nclass Greedy(List[T]):\n    r\"\"\"A special converter that greedily consumes arguments until it can't.\n    As a consequence of this behaviour, most input errors are silently discarded,\n    since it is used as an indicator of when to stop parsing.\n\n    When a parser error is met the greedy converter stops converting, undoes the\n    internal string parsing routine, and continues parsing regularly.\n\n    For example, in the following code:\n\n    .. code-block:: python3\n\n        @commands.command()\n        async def test(ctx, numbers: Greedy[int], reason: str):\n            await ctx.send(\"numbers: {}, reason: {}\".format(numbers, reason))\n\n    An invocation of ``[p]test 1 2 3 4 5 6 hello`` would pass ``numbers`` with\n    ``[1, 2, 3, 4, 5, 6]`` and ``reason`` with ``hello``\\.\n\n    For more information, check :ref:`ext_commands_special_converters`.\n\n    .. note::\n\n        For interaction based contexts the conversion error is propagated\n        rather than swallowed due to the difference in user experience with\n        application commands.\n    \"\"\"\n\n    __slots__ = ('converter',)\n\n    def __init__(self, *, converter: T) -> None:\n        self.converter: T = converter\n\n    def __repr__(self) -> str:\n        converter = getattr(self.converter, '__name__', repr(self.converter))\n        return f'Greedy[{converter}]'\n\n    def __class_getitem__(cls, params: Union[Tuple[T], T]) -> Greedy[T]:\n        if not isinstance(params, tuple):\n            params = (params,)\n        if len(params) != 1:\n            raise TypeError('Greedy[...] only takes a single argument')\n        converter = params[0]\n\n        args = getattr(converter, '__args__', ())\n        if discord.utils.PY_310 and converter.__class__ is types.UnionType:  # type: ignore\n            converter = Union[args]  # type: ignore\n\n        origin = getattr(converter, '__origin__', None)\n\n        if not (callable(converter) or isinstance(converter, Converter) or origin is not None):\n            raise TypeError('Greedy[...] expects a type or a Converter instance.')\n\n        if converter in (str, type(None)) or origin is Greedy:\n            raise TypeError(f'Greedy[{converter.__name__}] is invalid.')  # type: ignore\n\n        if origin is Union and type(None) in args:\n            raise TypeError(f'Greedy[{converter!r}] is invalid.')\n\n        return cls(converter=converter)\n\n    @property\n    def constructed_converter(self) -> Any:\n        # Only construct a converter once in order to maintain state between convert calls\n        if (\n            inspect.isclass(self.converter)\n            and issubclass(self.converter, Converter)\n            and not inspect.ismethod(self.converter.convert)\n        ):\n            return self.converter()\n        return self.converter\n\n\nif TYPE_CHECKING:\n    from typing_extensions import Annotated as Range\nelse:\n\n    class Range:\n        \"\"\"A special converter that can be applied to a parameter to require a numeric\n        or string type to fit within the range provided.\n\n        During type checking time this is equivalent to :obj:`typing.Annotated` so type checkers understand\n        the intent of the code.\n\n        Some example ranges:\n\n        - ``Range[int, 10]`` means the minimum is 10 with no maximum.\n        - ``Range[int, None, 10]`` means the maximum is 10 with no minimum.\n        - ``Range[int, 1, 10]`` means the minimum is 1 and the maximum is 10.\n        - ``Range[float, 1.0, 5.0]`` means the minimum is 1.0 and the maximum is 5.0.\n        - ``Range[str, 1, 10]`` means the minimum length is 1 and the maximum length is 10.\n\n        Inside a :class:`HybridCommand` this functions equivalently to :class:`discord.app_commands.Range`.\n\n        If the value cannot be converted to the provided type or is outside the given range,\n        :class:`~.ext.commands.BadArgument` or :class:`~.ext.commands.RangeError` is raised to\n        the appropriate error handlers respectively.\n\n        .. versionadded:: 2.0\n\n        Examples\n        ----------\n\n        .. code-block:: python3\n\n            @bot.command()\n            async def range(ctx: commands.Context, value: commands.Range[int, 10, 12]):\n                await ctx.send(f'Your value is {value}')\n        \"\"\"\n\n        def __init__(\n            self,\n            *,\n            annotation: Any,\n            min: Optional[Union[int, float]] = None,\n            max: Optional[Union[int, float]] = None,\n        ) -> None:\n            self.annotation: Any = annotation\n            self.min: Optional[Union[int, float]] = min\n            self.max: Optional[Union[int, float]] = max\n\n            if min and max and min > max:\n                raise TypeError('minimum cannot be larger than maximum')\n\n        async def convert(self, ctx: Context[BotT], value: str) -> Union[int, float]:\n            try:\n                count = converted = self.annotation(value)\n            except ValueError:\n                raise BadArgument(\n                    f'Converting to \"{self.annotation.__name__}\" failed for parameter \"{ctx.current_parameter.name}\".'\n                )\n\n            if self.annotation is str:\n                count = len(value)\n\n            if (self.min is not None and count < self.min) or (self.max is not None and count > self.max):\n                raise RangeError(converted, minimum=self.min, maximum=self.max)\n\n            return converted\n\n        def __call__(self) -> None:\n            # Trick to allow it inside typing.Union\n            pass\n\n        def __or__(self, rhs) -> Any:\n            return Union[self, rhs]\n\n        def __repr__(self) -> str:\n            return f'{self.__class__.__name__}[{self.annotation.__name__}, {self.min}, {self.max}]'\n\n        def __class_getitem__(cls, obj) -> Range:\n            if not isinstance(obj, tuple):\n                raise TypeError(f'expected tuple for arguments, received {obj.__class__.__name__} instead')\n\n            if len(obj) == 2:\n                obj = (*obj, None)\n            elif len(obj) != 3:\n                raise TypeError('Range accepts either two or three arguments with the first being the type of range.')\n\n            annotation, min, max = obj\n\n            if min is None and max is None:\n                raise TypeError('Range must not be empty')\n\n            if min is not None and max is not None:\n                # At this point max and min are both not none\n                if type(min) != type(max):\n                    raise TypeError('Both min and max in Range must be the same type')\n\n            if annotation not in (int, float, str):\n                raise TypeError(f'expected int, float, or str as range type, received {annotation!r} instead')\n\n            if annotation in (str, int):\n                cast = int\n            else:\n                cast = float\n\n            return cls(\n                annotation=annotation,\n                min=cast(min) if min is not None else None,\n                max=cast(max) if max is not None else None,\n            )\n\n\ndef _convert_to_bool(argument: str) -> bool:\n    lowered = argument.lower()\n    if lowered in ('yes', 'y', 'true', 't', '1', 'enable', 'on'):\n        return True\n    elif lowered in ('no', 'n', 'false', 'f', '0', 'disable', 'off'):\n        return False\n    else:\n        raise BadBoolArgument(lowered)\n\n\n_GenericAlias = type(List[T])  # type: ignore\n\n\ndef is_generic_type(tp: Any, *, _GenericAlias: type = _GenericAlias) -> bool:\n    return isinstance(tp, type) and issubclass(tp, Generic) or isinstance(tp, _GenericAlias)\n\n\nCONVERTER_MAPPING: Dict[type, Any] = {\n    discord.Object: ObjectConverter,\n    discord.Member: MemberConverter,\n    discord.User: UserConverter,\n    discord.Message: MessageConverter,\n    discord.PartialMessage: PartialMessageConverter,\n    discord.TextChannel: TextChannelConverter,\n    discord.Invite: InviteConverter,\n    discord.Guild: GuildConverter,\n    discord.Role: RoleConverter,\n    discord.Game: GameConverter,\n    discord.Colour: ColourConverter,\n    discord.VoiceChannel: VoiceChannelConverter,\n    discord.StageChannel: StageChannelConverter,\n    discord.Emoji: EmojiConverter,\n    discord.PartialEmoji: PartialEmojiConverter,\n    discord.CategoryChannel: CategoryChannelConverter,\n    discord.Thread: ThreadConverter,\n    discord.abc.GuildChannel: GuildChannelConverter,\n    discord.GuildSticker: GuildStickerConverter,\n    discord.ScheduledEvent: ScheduledEventConverter,\n    discord.ForumChannel: ForumChannelConverter,\n}\n\n\nasync def _actual_conversion(ctx: Context[BotT], converter: Any, argument: str, param: inspect.Parameter):\n    if converter is bool:\n        return _convert_to_bool(argument)\n\n    try:\n        module = converter.__module__\n    except AttributeError:\n        pass\n    else:\n        if module is not None and (module.startswith('discord.') and not module.endswith('converter')):\n            converter = CONVERTER_MAPPING.get(converter, converter)\n\n    try:\n        if inspect.isclass(converter) and issubclass(converter, Converter):\n            if inspect.ismethod(converter.convert):\n                return await converter.convert(ctx, argument)\n            else:\n                return await converter().convert(ctx, argument)\n        elif isinstance(converter, Converter):\n            return await converter.convert(ctx, argument)  # type: ignore\n    except CommandError:\n        raise\n    except Exception as exc:\n        raise ConversionError(converter, exc) from exc  # type: ignore\n\n    try:\n        return converter(argument)\n    except CommandError:\n        raise\n    except Exception as exc:\n        try:\n            name = converter.__name__\n        except AttributeError:\n            name = converter.__class__.__name__\n\n        raise BadArgument(f'Converting to \"{name}\" failed for parameter \"{param.name}\".') from exc\n\n\n@overload\nasync def run_converters(\n    ctx: Context[BotT], converter: Union[Type[Converter[T]], Converter[T]], argument: str, param: Parameter\n) -> T:\n    ...\n\n\n@overload\nasync def run_converters(ctx: Context[BotT], converter: Any, argument: str, param: Parameter) -> Any:\n    ...\n\n\nasync def run_converters(ctx: Context[BotT], converter: Any, argument: str, param: Parameter) -> Any:\n    \"\"\"|coro|\n\n    Runs converters for a given converter, argument, and parameter.\n\n    This function does the same work that the library does under the hood.\n\n    .. versionadded:: 2.0\n\n    Parameters\n    ------------\n    ctx: :class:`Context`\n        The invocation context to run the converters under.\n    converter: Any\n        The converter to run, this corresponds to the annotation in the function.\n    argument: :class:`str`\n        The argument to convert to.\n    param: :class:`Parameter`\n        The parameter being converted. This is mainly for error reporting.\n\n    Raises\n    -------\n    CommandError\n        The converter failed to convert.\n\n    Returns\n    --------\n    Any\n        The resulting conversion.\n    \"\"\"\n    origin = getattr(converter, '__origin__', None)\n\n    if origin is Union:\n        errors = []\n        _NoneType = type(None)\n        union_args = converter.__args__\n        for conv in union_args:\n            # if we got to this part in the code, then the previous conversions have failed\n            # so we should just undo the view, return the default, and allow parsing to continue\n            # with the other parameters\n            if conv is _NoneType and param.kind != param.VAR_POSITIONAL:\n                ctx.view.undo()\n                return None if param.required else await param.get_default(ctx)\n\n            try:\n                value = await run_converters(ctx, conv, argument, param)\n            except CommandError as exc:\n                errors.append(exc)\n            else:\n                return value\n\n        # if we're here, then we failed all the converters\n        raise BadUnionArgument(param, union_args, errors)\n\n    if origin is Literal:\n        errors = []\n        conversions = {}\n        literal_args = converter.__args__\n        for literal in literal_args:\n            literal_type = type(literal)\n            try:\n                value = conversions[literal_type]\n            except KeyError:\n                try:\n                    value = await _actual_conversion(ctx, literal_type, argument, param)\n                except CommandError as exc:\n                    errors.append(exc)\n                    conversions[literal_type] = object()\n                    continue\n                else:\n                    conversions[literal_type] = value\n\n            if value == literal:\n                return value\n\n        # if we're here, then we failed to match all the literals\n        raise BadLiteralArgument(param, literal_args, errors, argument)\n\n    # This must be the last if-clause in the chain of origin checking\n    # Nearly every type is a generic type within the typing library\n    # So care must be taken to make sure a more specialised origin handle\n    # isn't overwritten by the widest if clause\n    if origin is not None and is_generic_type(converter):\n        converter = origin\n\n    return await _actual_conversion(ctx, converter, argument, param)\n"
  },
  {
    "path": "discord/ext/commands/cooldowns.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom __future__ import annotations\n\n\nfrom typing import Any, Callable, Deque, Dict, Optional, Union, Generic, TypeVar, TYPE_CHECKING\nfrom discord.enums import Enum\nfrom discord.abc import PrivateChannel\nimport time\nimport asyncio\nfrom collections import deque\n\nfrom .errors import MaxConcurrencyReached\nfrom .context import Context\nfrom discord.app_commands import Cooldown as Cooldown\n\nif TYPE_CHECKING:\n    from typing_extensions import Self\n\n    from ...message import Message\n\n__all__ = (\n    'BucketType',\n    'Cooldown',\n    'CooldownMapping',\n    'DynamicCooldownMapping',\n    'MaxConcurrency',\n)\n\nT_contra = TypeVar('T_contra', contravariant=True)\n\n\nclass BucketType(Enum):\n    default = 0\n    user = 1\n    guild = 2\n    channel = 3\n    member = 4\n    category = 5\n    role = 6\n\n    def get_key(self, msg: Union[Message, Context[Any]]) -> Any:\n        if self is BucketType.user:\n            return msg.author.id\n        elif self is BucketType.guild:\n            return (msg.guild or msg.author).id\n        elif self is BucketType.channel:\n            return msg.channel.id\n        elif self is BucketType.member:\n            return ((msg.guild and msg.guild.id), msg.author.id)\n        elif self is BucketType.category:\n            return (msg.channel.category or msg.channel).id  # type: ignore\n        elif self is BucketType.role:\n            # we return the channel id of a private-channel as there are only roles in guilds\n            # and that yields the same result as for a guild with only the @everyone role\n            # NOTE: PrivateChannel doesn't actually have an id attribute but we assume we are\n            # receiving a DMChannel or GroupChannel which inherit from PrivateChannel and do\n            return (msg.channel if isinstance(msg.channel, PrivateChannel) else msg.author.top_role).id  # type: ignore\n\n    def __call__(self, msg: Union[Message, Context[Any]]) -> Any:\n        return self.get_key(msg)\n\n\nclass CooldownMapping(Generic[T_contra]):\n    def __init__(\n        self,\n        original: Optional[Cooldown],\n        type: Callable[[T_contra], Any],\n    ) -> None:\n        if not callable(type):\n            raise TypeError('Cooldown type must be a BucketType or callable')\n\n        self._cache: Dict[Any, Cooldown] = {}\n        self._cooldown: Optional[Cooldown] = original\n        self._type: Callable[[T_contra], Any] = type\n\n    def copy(self) -> CooldownMapping[T_contra]:\n        ret = CooldownMapping(self._cooldown, self._type)\n        ret._cache = self._cache.copy()\n        return ret\n\n    @property\n    def valid(self) -> bool:\n        return self._cooldown is not None\n\n    @property\n    def type(self) -> Callable[[T_contra], Any]:\n        return self._type\n\n    @classmethod\n    def from_cooldown(cls, rate: float, per: float, type: Callable[[T_contra], Any]) -> Self:\n        return cls(Cooldown(rate, per), type)\n\n    def _bucket_key(self, msg: T_contra) -> Any:\n        return self._type(msg)\n\n    def _verify_cache_integrity(self, current: Optional[float] = None) -> None:\n        # we want to delete all cache objects that haven't been used\n        # in a cooldown window. e.g. if we have a  command that has a\n        # cooldown of 60s and it has not been used in 60s then that key should be deleted\n        current = current or time.time()\n        dead_keys = [k for k, v in self._cache.items() if current > v._last + v.per]\n        for k in dead_keys:\n            del self._cache[k]\n\n    def create_bucket(self, message: T_contra) -> Cooldown:\n        return self._cooldown.copy()  # type: ignore\n\n    def get_bucket(self, message: T_contra, current: Optional[float] = None) -> Optional[Cooldown]:\n        if self._type is BucketType.default:\n            return self._cooldown\n\n        self._verify_cache_integrity(current)\n        key = self._bucket_key(message)\n        if key not in self._cache:\n            bucket = self.create_bucket(message)\n            if bucket is not None:\n                self._cache[key] = bucket\n        else:\n            bucket = self._cache[key]\n\n        return bucket\n\n    def update_rate_limit(self, message: T_contra, current: Optional[float] = None, tokens: int = 1) -> Optional[float]:\n        bucket = self.get_bucket(message, current)\n        if bucket is None:\n            return None\n        return bucket.update_rate_limit(current, tokens=tokens)\n\n\nclass DynamicCooldownMapping(CooldownMapping[T_contra]):\n    def __init__(\n        self,\n        factory: Callable[[T_contra], Optional[Cooldown]],\n        type: Callable[[T_contra], Any],\n    ) -> None:\n        super().__init__(None, type)\n        self._factory: Callable[[T_contra], Optional[Cooldown]] = factory\n\n    def copy(self) -> DynamicCooldownMapping[T_contra]:\n        ret = DynamicCooldownMapping(self._factory, self._type)\n        ret._cache = self._cache.copy()\n        return ret\n\n    @property\n    def valid(self) -> bool:\n        return True\n\n    def create_bucket(self, message: T_contra) -> Optional[Cooldown]:\n        return self._factory(message)\n\n\nclass _Semaphore:\n    \"\"\"This class is a version of a semaphore.\n\n    If you're wondering why asyncio.Semaphore isn't being used,\n    it's because it doesn't expose the internal value. This internal\n    value is necessary because I need to support both `wait=True` and\n    `wait=False`.\n\n    An asyncio.Queue could have been used to do this as well -- but it is\n    not as inefficient since internally that uses two queues and is a bit\n    overkill for what is basically a counter.\n    \"\"\"\n\n    __slots__ = ('value', 'loop', '_waiters')\n\n    def __init__(self, number: int) -> None:\n        self.value: int = number\n        self.loop: asyncio.AbstractEventLoop = asyncio.get_running_loop()\n        self._waiters: Deque[asyncio.Future] = deque()\n\n    def __repr__(self) -> str:\n        return f'<_Semaphore value={self.value} waiters={len(self._waiters)}>'\n\n    def locked(self) -> bool:\n        return self.value == 0\n\n    def is_active(self) -> bool:\n        return len(self._waiters) > 0\n\n    def wake_up(self) -> None:\n        while self._waiters:\n            future = self._waiters.popleft()\n            if not future.done():\n                future.set_result(None)\n                return\n\n    async def acquire(self, *, wait: bool = False) -> bool:\n        if not wait and self.value <= 0:\n            # signal that we're not acquiring\n            return False\n\n        while self.value <= 0:\n            future = self.loop.create_future()\n            self._waiters.append(future)\n            try:\n                await future\n            except:\n                future.cancel()\n                if self.value > 0 and not future.cancelled():\n                    self.wake_up()\n                raise\n\n        self.value -= 1\n        return True\n\n    def release(self) -> None:\n        self.value += 1\n        self.wake_up()\n\n\nclass MaxConcurrency:\n    __slots__ = ('number', 'per', 'wait', '_mapping')\n\n    def __init__(self, number: int, *, per: BucketType, wait: bool) -> None:\n        self._mapping: Dict[Any, _Semaphore] = {}\n        self.per: BucketType = per\n        self.number: int = number\n        self.wait: bool = wait\n\n        if number <= 0:\n            raise ValueError('max_concurrency \\'number\\' cannot be less than 1')\n\n        if not isinstance(per, BucketType):\n            raise TypeError(f'max_concurrency \\'per\\' must be of type BucketType not {type(per)!r}')\n\n    def copy(self) -> Self:\n        return self.__class__(self.number, per=self.per, wait=self.wait)\n\n    def __repr__(self) -> str:\n        return f'<MaxConcurrency per={self.per!r} number={self.number} wait={self.wait}>'\n\n    def get_key(self, message: Union[Message, Context[Any]]) -> Any:\n        return self.per.get_key(message)\n\n    async def acquire(self, message: Union[Message, Context[Any]]) -> None:\n        key = self.get_key(message)\n\n        try:\n            sem = self._mapping[key]\n        except KeyError:\n            self._mapping[key] = sem = _Semaphore(self.number)\n\n        acquired = await sem.acquire(wait=self.wait)\n        if not acquired:\n            raise MaxConcurrencyReached(self.number, self.per)\n\n    async def release(self, message: Union[Message, Context[Any]]) -> None:\n        # Technically there's no reason for this function to be async\n        # But it might be more useful in the future\n        key = self.get_key(message)\n\n        try:\n            sem = self._mapping[key]\n        except KeyError:\n            # ...? peculiar\n            return\n        else:\n            sem.release()\n\n        if sem.value >= self.number and not sem.is_active():\n            del self._mapping[key]\n"
  },
  {
    "path": "discord/ext/commands/core.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\nfrom __future__ import annotations\n\nimport asyncio\nimport datetime\nimport functools\nimport inspect\nfrom typing import (\n    TYPE_CHECKING,\n    Any,\n    Callable,\n    Dict,\n    Generator,\n    Generic,\n    List,\n    Literal,\n    Optional,\n    Set,\n    Tuple,\n    Type,\n    TypeVar,\n    Union,\n    overload,\n)\nimport re\n\nimport discord\n\nfrom ._types import _BaseCommand, CogT\nfrom .cog import Cog\nfrom .context import Context\nfrom .converter import Greedy, run_converters\nfrom .cooldowns import BucketType, Cooldown, CooldownMapping, DynamicCooldownMapping, MaxConcurrency\nfrom .errors import *\nfrom .parameters import Parameter, Signature\nfrom discord.app_commands.commands import NUMPY_DOCSTRING_ARG_REGEX\n\nif TYPE_CHECKING:\n    from typing_extensions import Concatenate, ParamSpec, Self\n\n    from ._types import BotT, Check, ContextT, Coro, CoroFunc, Error, Hook, UserCheck\n\n\n__all__ = (\n    'Command',\n    'Group',\n    'GroupMixin',\n    'command',\n    'group',\n    'has_role',\n    'has_permissions',\n    'has_any_role',\n    'check',\n    'check_any',\n    'before_invoke',\n    'after_invoke',\n    'bot_has_role',\n    'bot_has_permissions',\n    'bot_has_any_role',\n    'cooldown',\n    'dynamic_cooldown',\n    'max_concurrency',\n    'dm_only',\n    'guild_only',\n    'is_owner',\n    'is_nsfw',\n    'has_guild_permissions',\n    'bot_has_guild_permissions',\n)\n\nMISSING: Any = discord.utils.MISSING\n\nT = TypeVar('T')\nCommandT = TypeVar('CommandT', bound='Command[Any, ..., Any]')\n# CHT = TypeVar('CHT', bound='Check')\nGroupT = TypeVar('GroupT', bound='Group[Any, ..., Any]')\n\nif TYPE_CHECKING:\n    P = ParamSpec('P')\nelse:\n    P = TypeVar('P')\n\n\ndef unwrap_function(function: Callable[..., Any], /) -> Callable[..., Any]:\n    partial = functools.partial\n    while True:\n        if hasattr(function, '__wrapped__'):\n            function = function.__wrapped__\n        elif isinstance(function, partial):\n            function = function.func\n        else:\n            return function\n\n\ndef get_signature_parameters(\n    function: Callable[..., Any],\n    globalns: Dict[str, Any],\n    /,\n    *,\n    skip_parameters: Optional[int] = None,\n) -> Dict[str, Parameter]:\n    signature = Signature.from_callable(function)\n    params: Dict[str, Parameter] = {}\n    cache: Dict[str, Any] = {}\n    eval_annotation = discord.utils.evaluate_annotation\n    required_params = discord.utils.is_inside_class(function) + 1 if skip_parameters is None else skip_parameters\n    if len(signature.parameters) < required_params:\n        raise TypeError(f'Command signature requires at least {required_params - 1} parameter(s)')\n\n    iterator = iter(signature.parameters.items())\n    for _ in range(0, required_params):\n        next(iterator)\n\n    for name, parameter in iterator:\n        default = parameter.default\n        if isinstance(default, Parameter):  # update from the default\n            if default.annotation is not Parameter.empty:\n                # There are a few cases to care about here.\n                # x: TextChannel = commands.CurrentChannel\n                # x = commands.CurrentChannel\n                # In both of these cases, the default parameter has an explicit annotation\n                # but in the second case it's only used as the fallback.\n                if default._fallback:\n                    if parameter.annotation is Parameter.empty:\n                        parameter._annotation = default.annotation\n                else:\n                    parameter._annotation = default.annotation\n\n            parameter._default = default.default\n            parameter._description = default._description\n            parameter._displayed_default = default._displayed_default\n            parameter._displayed_name = default._displayed_name\n\n        annotation = parameter.annotation\n\n        if annotation is None:\n            params[name] = parameter.replace(annotation=type(None))\n            continue\n\n        annotation = eval_annotation(annotation, globalns, globalns, cache)\n        if annotation is Greedy:\n            raise TypeError('Unparameterized Greedy[...] is disallowed in signature.')\n\n        params[name] = parameter.replace(annotation=annotation)\n\n    return params\n\n\nPARAMETER_HEADING_REGEX = re.compile(r'Parameters?\\n---+\\n', re.I)\n\n\ndef _fold_text(input: str) -> str:\n    \"\"\"Turns a single newline into a space, and multiple newlines into a newline.\"\"\"\n\n    def replacer(m: re.Match[str]) -> str:\n        if len(m.group()) <= 1:\n            return ' '\n        return '\\n'\n\n    return re.sub(r'\\n+', replacer, inspect.cleandoc(input))\n\n\ndef extract_descriptions_from_docstring(function: Callable[..., Any], params: Dict[str, Parameter], /) -> Optional[str]:\n    docstring = inspect.getdoc(function)\n\n    if docstring is None:\n        return None\n\n    divide = PARAMETER_HEADING_REGEX.split(docstring, 1)\n    if len(divide) == 1:\n        return docstring\n\n    description, param_docstring = divide\n    for match in NUMPY_DOCSTRING_ARG_REGEX.finditer(param_docstring):\n        name = match.group('name')\n\n        if name not in params:\n            is_display_name = discord.utils.get(params.values(), displayed_name=name)\n            if is_display_name:\n                name = is_display_name.name\n            else:\n                continue\n\n        param = params[name]\n        if param.description is None:\n            param._description = _fold_text(match.group('description'))\n\n    return _fold_text(description.strip())\n\n\ndef wrap_callback(coro: Callable[P, Coro[T]], /) -> Callable[P, Coro[Optional[T]]]:\n    @functools.wraps(coro)\n    async def wrapped(*args: P.args, **kwargs: P.kwargs) -> Optional[T]:\n        try:\n            ret = await coro(*args, **kwargs)\n        except CommandError:\n            raise\n        except asyncio.CancelledError:\n            return\n        except Exception as exc:\n            raise CommandInvokeError(exc) from exc\n        return ret\n\n    return wrapped\n\n\ndef hooked_wrapped_callback(\n    command: Command[Any, ..., Any], ctx: Context[BotT], coro: Callable[P, Coro[T]], /\n) -> Callable[P, Coro[Optional[T]]]:\n    @functools.wraps(coro)\n    async def wrapped(*args: P.args, **kwargs: P.kwargs) -> Optional[T]:\n        try:\n            ret = await coro(*args, **kwargs)\n        except CommandError:\n            ctx.command_failed = True\n            raise\n        except asyncio.CancelledError:\n            ctx.command_failed = True\n            return\n        except Exception as exc:\n            ctx.command_failed = True\n            raise CommandInvokeError(exc) from exc\n        finally:\n            if command._max_concurrency is not None:\n                await command._max_concurrency.release(ctx.message)\n\n            await command.call_after_hooks(ctx)\n        return ret\n\n    return wrapped\n\n\nclass _CaseInsensitiveDict(dict):\n    def __contains__(self, k):\n        return super().__contains__(k.casefold())\n\n    def __delitem__(self, k):\n        return super().__delitem__(k.casefold())\n\n    def __getitem__(self, k):\n        return super().__getitem__(k.casefold())\n\n    def get(self, k, default=None):\n        return super().get(k.casefold(), default)\n\n    def pop(self, k, default=None):\n        return super().pop(k.casefold(), default)\n\n    def __setitem__(self, k, v):\n        super().__setitem__(k.casefold(), v)\n\n\nclass _AttachmentIterator:\n    def __init__(self, data: List[discord.Attachment]):\n        self.data: List[discord.Attachment] = data\n        self.index: int = 0\n\n    def __iter__(self) -> Self:\n        return self\n\n    def __next__(self) -> discord.Attachment:\n        try:\n            value = self.data[self.index]\n        except IndexError:\n            raise StopIteration\n        else:\n            self.index += 1\n            return value\n\n    def is_empty(self) -> bool:\n        return self.index >= len(self.data)\n\n\nclass Command(_BaseCommand, Generic[CogT, P, T]):\n    r\"\"\"A class that implements the protocol for a bot text command.\n\n    These are not created manually, instead they are created via the\n    decorator or functional interface.\n\n    Attributes\n    -----------\n    name: :class:`str`\n        The name of the command.\n    callback: :ref:`coroutine <coroutine>`\n        The coroutine that is executed when the command is called.\n    help: Optional[:class:`str`]\n        The long help text for the command.\n    brief: Optional[:class:`str`]\n        The short help text for the command.\n    usage: Optional[:class:`str`]\n        A replacement for arguments in the default help text.\n    aliases: Union[List[:class:`str`], Tuple[:class:`str`]]\n        The list of aliases the command can be invoked under.\n    enabled: :class:`bool`\n        A boolean that indicates if the command is currently enabled.\n        If the command is invoked while it is disabled, then\n        :exc:`.DisabledCommand` is raised to the :func:`.on_command_error`\n        event. Defaults to ``True``.\n    parent: Optional[:class:`Group`]\n        The parent group that this command belongs to. ``None`` if there\n        isn't one.\n    cog: Optional[:class:`Cog`]\n        The cog that this command belongs to. ``None`` if there isn't one.\n    checks: List[Callable[[:class:`.Context`], :class:`bool`]]\n        A list of predicates that verifies if the command could be executed\n        with the given :class:`.Context` as the sole parameter. If an exception\n        is necessary to be thrown to signal failure, then one inherited from\n        :exc:`.CommandError` should be used. Note that if the checks fail then\n        :exc:`.CheckFailure` exception is raised to the :func:`.on_command_error`\n        event.\n    description: :class:`str`\n        The message prefixed into the default help command.\n    hidden: :class:`bool`\n        If ``True``\\, the default help command does not show this in the\n        help output.\n    rest_is_raw: :class:`bool`\n        If ``False`` and a keyword-only argument is provided then the keyword\n        only argument is stripped and handled as if it was a regular argument\n        that handles :exc:`.MissingRequiredArgument` and default values in a\n        regular matter rather than passing the rest completely raw. If ``True``\n        then the keyword-only argument will pass in the rest of the arguments\n        in a completely raw matter. Defaults to ``False``.\n    invoked_subcommand: Optional[:class:`Command`]\n        The subcommand that was invoked, if any.\n    require_var_positional: :class:`bool`\n        If ``True`` and a variadic positional argument is specified, requires\n        the user to specify at least one argument. Defaults to ``False``.\n\n        .. versionadded:: 1.5\n\n    ignore_extra: :class:`bool`\n        If ``True``\\, ignores extraneous strings passed to a command if all its\n        requirements are met (e.g. ``?foo a b c`` when only expecting ``a``\n        and ``b``). Otherwise :func:`.on_command_error` and local error handlers\n        are called with :exc:`.TooManyArguments`. Defaults to ``True``.\n    cooldown_after_parsing: :class:`bool`\n        If ``True``\\, cooldown processing is done after argument parsing,\n        which calls converters. If ``False`` then cooldown processing is done\n        first and then the converters are called second. Defaults to ``False``.\n    extras: :class:`dict`\n        A dict of user provided extras to attach to the Command.\n\n        .. note::\n            This object may be copied by the library.\n\n\n        .. versionadded:: 2.0\n    \"\"\"\n    __original_kwargs__: Dict[str, Any]\n\n    def __new__(cls, *args: Any, **kwargs: Any) -> Self:\n        # if you're wondering why this is done, it's because we need to ensure\n        # we have a complete original copy of **kwargs even for classes that\n        # mess with it by popping before delegating to the subclass __init__.\n        # In order to do this, we need to control the instance creation and\n        # inject the original kwargs through __new__ rather than doing it\n        # inside __init__.\n        self = super().__new__(cls)\n\n        # we do a shallow copy because it's probably the most common use case.\n        # this could potentially break if someone modifies a list or something\n        # while it's in movement, but for now this is the cheapest and\n        # fastest way to do what we want.\n        self.__original_kwargs__ = kwargs.copy()\n        return self\n\n    def __init__(\n        self,\n        func: Union[\n            Callable[Concatenate[CogT, Context[Any], P], Coro[T]],\n            Callable[Concatenate[Context[Any], P], Coro[T]],\n        ],\n        /,\n        **kwargs: Any,\n    ) -> None:\n        if not asyncio.iscoroutinefunction(func):\n            raise TypeError('Callback must be a coroutine.')\n\n        name = kwargs.get('name') or func.__name__\n        if not isinstance(name, str):\n            raise TypeError('Name of a command must be a string.')\n        self.name: str = name\n\n        self.callback = func\n        self.enabled: bool = kwargs.get('enabled', True)\n\n        help_doc = kwargs.get('help')\n        if help_doc is not None:\n            help_doc = inspect.cleandoc(help_doc)\n        else:\n            help_doc = extract_descriptions_from_docstring(func, self.params)\n\n        self.help: Optional[str] = help_doc\n\n        self.brief: Optional[str] = kwargs.get('brief')\n        self.usage: Optional[str] = kwargs.get('usage')\n        self.rest_is_raw: bool = kwargs.get('rest_is_raw', False)\n        self.aliases: Union[List[str], Tuple[str]] = kwargs.get('aliases', [])\n        self.extras: Dict[Any, Any] = kwargs.get('extras', {})\n\n        if not isinstance(self.aliases, (list, tuple)):\n            raise TypeError(\"Aliases of a command must be a list or a tuple of strings.\")\n\n        self.description: str = inspect.cleandoc(kwargs.get('description', ''))\n        self.hidden: bool = kwargs.get('hidden', False)\n\n        try:\n            checks = func.__commands_checks__\n            checks.reverse()\n        except AttributeError:\n            checks = kwargs.get('checks', [])\n\n        self.checks: List[UserCheck[Context[Any]]] = checks\n\n        try:\n            cooldown = func.__commands_cooldown__\n        except AttributeError:\n            cooldown = kwargs.get('cooldown')\n\n        if cooldown is None:\n            buckets = CooldownMapping(cooldown, BucketType.default)\n        elif isinstance(cooldown, CooldownMapping):\n            buckets: CooldownMapping[Context[Any]] = cooldown\n        else:\n            raise TypeError(\"Cooldown must be an instance of CooldownMapping or None.\")\n        self._buckets: CooldownMapping[Context[Any]] = buckets\n\n        try:\n            max_concurrency = func.__commands_max_concurrency__\n        except AttributeError:\n            max_concurrency = kwargs.get('max_concurrency')\n\n        self._max_concurrency: Optional[MaxConcurrency] = max_concurrency\n\n        self.require_var_positional: bool = kwargs.get('require_var_positional', False)\n        self.ignore_extra: bool = kwargs.get('ignore_extra', True)\n        self.cooldown_after_parsing: bool = kwargs.get('cooldown_after_parsing', False)\n        self._cog: CogT = None  # type: ignore # This breaks every other pyright release\n\n        # bandaid for the fact that sometimes parent can be the bot instance\n        parent: Optional[GroupMixin[Any]] = kwargs.get('parent')\n        self.parent: Optional[GroupMixin[Any]] = parent if isinstance(parent, _BaseCommand) else None\n\n        self._before_invoke: Optional[Hook] = None\n        try:\n            before_invoke = func.__before_invoke__\n        except AttributeError:\n            pass\n        else:\n            self.before_invoke(before_invoke)\n\n        self._after_invoke: Optional[Hook] = None\n        try:\n            after_invoke = func.__after_invoke__\n        except AttributeError:\n            pass\n        else:\n            self.after_invoke(after_invoke)\n\n    @property\n    def cog(self) -> CogT:\n        return self._cog\n\n    @cog.setter\n    def cog(self, value: CogT) -> None:\n        self._cog = value\n\n    @property\n    def callback(\n        self,\n    ) -> Union[Callable[Concatenate[CogT, Context[Any], P], Coro[T]], Callable[Concatenate[Context[Any], P], Coro[T]],]:\n        return self._callback\n\n    @callback.setter\n    def callback(\n        self,\n        function: Union[\n            Callable[Concatenate[CogT, Context[Any], P], Coro[T]],\n            Callable[Concatenate[Context[Any], P], Coro[T]],\n        ],\n    ) -> None:\n        self._callback = function\n        unwrap = unwrap_function(function)\n        self.module: str = unwrap.__module__\n\n        try:\n            globalns = unwrap.__globals__\n        except AttributeError:\n            globalns = {}\n\n        self.params: Dict[str, Parameter] = get_signature_parameters(function, globalns)\n\n    def add_check(self, func: UserCheck[Context[Any]], /) -> None:\n        \"\"\"Adds a check to the command.\n\n        This is the non-decorator interface to :func:`.check`.\n\n        .. versionadded:: 1.3\n\n        .. versionchanged:: 2.0\n\n            ``func`` parameter is now positional-only.\n\n        .. seealso:: The :func:`~discord.ext.commands.check` decorator\n\n        Parameters\n        -----------\n        func\n            The function that will be used as a check.\n        \"\"\"\n\n        self.checks.append(func)\n\n    def remove_check(self, func: UserCheck[Context[Any]], /) -> None:\n        \"\"\"Removes a check from the command.\n\n        This function is idempotent and will not raise an exception\n        if the function is not in the command's checks.\n\n        .. versionadded:: 1.3\n\n        .. versionchanged:: 2.0\n\n            ``func`` parameter is now positional-only.\n\n        Parameters\n        -----------\n        func\n            The function to remove from the checks.\n        \"\"\"\n\n        try:\n            self.checks.remove(func)\n        except ValueError:\n            pass\n\n    def update(self, **kwargs: Any) -> None:\n        \"\"\"Updates :class:`Command` instance with updated attribute.\n\n        This works similarly to the :func:`~discord.ext.commands.command` decorator in terms\n        of parameters in that they are passed to the :class:`Command` or\n        subclass constructors, sans the name and callback.\n        \"\"\"\n        cog = self.cog\n        self.__init__(self.callback, **dict(self.__original_kwargs__, **kwargs))\n        self.cog = cog\n\n    async def __call__(self, context: Context[BotT], /, *args: P.args, **kwargs: P.kwargs) -> T:\n        \"\"\"|coro|\n\n        Calls the internal callback that the command holds.\n\n        .. note::\n\n            This bypasses all mechanisms -- including checks, converters,\n            invoke hooks, cooldowns, etc. You must take care to pass\n            the proper arguments and types to this function.\n\n        .. versionadded:: 1.3\n\n        .. versionchanged:: 2.0\n\n            ``context`` parameter is now positional-only.\n        \"\"\"\n        if self.cog is not None:\n            return await self.callback(self.cog, context, *args, **kwargs)  # type: ignore\n        else:\n            return await self.callback(context, *args, **kwargs)  # type: ignore\n\n    def _ensure_assignment_on_copy(self, other: Self) -> Self:\n        other._before_invoke = self._before_invoke\n        other._after_invoke = self._after_invoke\n        other.extras = self.extras\n        if self.checks != other.checks:\n            other.checks = self.checks.copy()\n        if self._buckets.valid and not other._buckets.valid:\n            other._buckets = self._buckets.copy()\n        if self._max_concurrency and self._max_concurrency != other._max_concurrency:\n            other._max_concurrency = self._max_concurrency.copy()\n\n        try:\n            other.on_error = self.on_error\n        except AttributeError:\n            pass\n        return other\n\n    def copy(self) -> Self:\n        \"\"\"Creates a copy of this command.\n\n        Returns\n        --------\n        :class:`Command`\n            A new instance of this command.\n        \"\"\"\n        ret = self.__class__(self.callback, **self.__original_kwargs__)\n        return self._ensure_assignment_on_copy(ret)\n\n    def _update_copy(self, kwargs: Dict[str, Any]) -> Self:\n        if kwargs:\n            kw = kwargs.copy()\n            kw.update(self.__original_kwargs__)\n            copy = self.__class__(self.callback, **kw)\n            return self._ensure_assignment_on_copy(copy)\n        else:\n            return self.copy()\n\n    async def dispatch_error(self, ctx: Context[BotT], error: CommandError, /) -> None:\n        ctx.command_failed = True\n        cog = self.cog\n        try:\n            coro = self.on_error\n        except AttributeError:\n            pass\n        else:\n            injected = wrap_callback(coro)  # type: ignore\n            if cog is not None:\n                await injected(cog, ctx, error)\n            else:\n                await injected(ctx, error)  # type: ignore\n\n        try:\n            if cog is not None:\n                local = Cog._get_overridden_method(cog.cog_command_error)\n                if local is not None:\n                    wrapped = wrap_callback(local)\n                    await wrapped(ctx, error)\n        finally:\n            ctx.bot.dispatch('command_error', ctx, error)\n\n    async def transform(self, ctx: Context[BotT], param: Parameter, attachments: _AttachmentIterator, /) -> Any:\n        converter = param.converter\n        consume_rest_is_special = param.kind == param.KEYWORD_ONLY and not self.rest_is_raw\n        view = ctx.view\n        view.skip_ws()\n\n        # The greedy converter is simple -- it keeps going until it fails in which case,\n        # it undos the view ready for the next parameter to use instead\n        if isinstance(converter, Greedy):\n            # Special case for Greedy[discord.Attachment] to consume the attachments iterator\n            if converter.converter is discord.Attachment:\n                return list(attachments)\n\n            if param.kind in (param.POSITIONAL_OR_KEYWORD, param.POSITIONAL_ONLY):\n                return await self._transform_greedy_pos(ctx, param, param.required, converter.constructed_converter)\n            elif param.kind == param.VAR_POSITIONAL:\n                return await self._transform_greedy_var_pos(ctx, param, converter.constructed_converter)\n            else:\n                # if we're here, then it's a KEYWORD_ONLY param type\n                # since this is mostly useless, we'll helpfully transform Greedy[X]\n                # into just X and do the parsing that way.\n                converter = converter.constructed_converter\n\n        # Try to detect Optional[discord.Attachment] or discord.Attachment special converter\n        if converter is discord.Attachment:\n            try:\n                return next(attachments)\n            except StopIteration:\n                raise MissingRequiredAttachment(param)\n\n        if self._is_typing_optional(param.annotation) and param.annotation.__args__[0] is discord.Attachment:\n            if attachments.is_empty():\n                # I have no idea who would be doing Optional[discord.Attachment] = 1\n                # but for those cases then 1 should be returned instead of None\n                return None if param.default is param.empty else param.default\n            return next(attachments)\n\n        if view.eof:\n            if param.kind == param.VAR_POSITIONAL:\n                raise RuntimeError()  # break the loop\n            if param.required:\n                if self._is_typing_optional(param.annotation):\n                    return None\n                if hasattr(converter, '__commands_is_flag__') and converter._can_be_constructible():\n                    return await converter._construct_default(ctx)\n                raise MissingRequiredArgument(param)\n            return await param.get_default(ctx)\n\n        previous = view.index\n        if consume_rest_is_special:\n            ctx.current_argument = argument = view.read_rest().strip()\n        else:\n            try:\n                ctx.current_argument = argument = view.get_quoted_word()\n            except ArgumentParsingError as exc:\n                if self._is_typing_optional(param.annotation):\n                    view.index = previous\n                    return None if param.required else await param.get_default(ctx)\n                else:\n                    raise exc\n        view.previous = previous\n\n        # type-checker fails to narrow argument\n        return await run_converters(ctx, converter, argument, param)  # type: ignore\n\n    async def _transform_greedy_pos(self, ctx: Context[BotT], param: Parameter, required: bool, converter: Any) -> Any:\n        view = ctx.view\n        result = []\n        while not view.eof:\n            # for use with a manual undo\n            previous = view.index\n\n            view.skip_ws()\n            try:\n                ctx.current_argument = argument = view.get_quoted_word()\n                value = await run_converters(ctx, converter, argument, param)  # type: ignore\n            except (CommandError, ArgumentParsingError):\n                view.index = previous\n                break\n            else:\n                result.append(value)\n\n        if not result and not required:\n            return await param.get_default(ctx)\n        return result\n\n    async def _transform_greedy_var_pos(self, ctx: Context[BotT], param: Parameter, converter: Any) -> Any:\n        view = ctx.view\n        previous = view.index\n        try:\n            ctx.current_argument = argument = view.get_quoted_word()\n            value = await run_converters(ctx, converter, argument, param)  # type: ignore\n        except (CommandError, ArgumentParsingError):\n            view.index = previous\n            raise RuntimeError() from None  # break loop\n        else:\n            return value\n\n    @property\n    def clean_params(self) -> Dict[str, Parameter]:\n        \"\"\"Dict[:class:`str`, :class:`Parameter`]:\n        Retrieves the parameter dictionary without the context or self parameters.\n\n        Useful for inspecting signature.\n        \"\"\"\n        return self.params.copy()\n\n    @property\n    def cooldown(self) -> Optional[Cooldown]:\n        \"\"\"Optional[:class:`~discord.app_commands.Cooldown`]: The cooldown of a command when invoked\n        or ``None`` if the command doesn't have a registered cooldown.\n\n        .. versionadded:: 2.0\n        \"\"\"\n        return self._buckets._cooldown\n\n    @property\n    def full_parent_name(self) -> str:\n        \"\"\":class:`str`: Retrieves the fully qualified parent command name.\n\n        This the base command name required to execute it. For example,\n        in ``?one two three`` the parent name would be ``one two``.\n        \"\"\"\n        entries = []\n        command = self\n        # command.parent is type-hinted as GroupMixin some attributes are resolved via MRO\n        while command.parent is not None:  # type: ignore\n            command = command.parent  # type: ignore\n            entries.append(command.name)  # type: ignore\n\n        return ' '.join(reversed(entries))\n\n    @property\n    def parents(self) -> List[Group[Any, ..., Any]]:\n        \"\"\"List[:class:`Group`]: Retrieves the parents of this command.\n\n        If the command has no parents then it returns an empty :class:`list`.\n\n        For example in commands ``?a b c test``, the parents are ``[c, b, a]``.\n\n        .. versionadded:: 1.1\n        \"\"\"\n        entries = []\n        command = self\n        while command.parent is not None:  # type: ignore\n            command = command.parent  # type: ignore\n            entries.append(command)\n\n        return entries\n\n    @property\n    def root_parent(self) -> Optional[Group[Any, ..., Any]]:\n        \"\"\"Optional[:class:`Group`]: Retrieves the root parent of this command.\n\n        If the command has no parents then it returns ``None``.\n\n        For example in commands ``?a b c test``, the root parent is ``a``.\n        \"\"\"\n        if not self.parent:\n            return None\n        return self.parents[-1]\n\n    @property\n    def qualified_name(self) -> str:\n        \"\"\":class:`str`: Retrieves the fully qualified command name.\n\n        This is the full parent name with the command name as well.\n        For example, in ``?one two three`` the qualified name would be\n        ``one two three``.\n        \"\"\"\n\n        parent = self.full_parent_name\n        if parent:\n            return parent + ' ' + self.name\n        else:\n            return self.name\n\n    def __str__(self) -> str:\n        return self.qualified_name\n\n    async def _parse_arguments(self, ctx: Context[BotT]) -> None:\n        ctx.args = [ctx] if self.cog is None else [self.cog, ctx]\n        ctx.kwargs = {}\n        args = ctx.args\n        kwargs = ctx.kwargs\n        attachments = _AttachmentIterator(ctx.message.attachments)\n\n        view = ctx.view\n        iterator = iter(self.params.items())\n\n        for name, param in iterator:\n            ctx.current_parameter = param\n            if param.kind in (param.POSITIONAL_OR_KEYWORD, param.POSITIONAL_ONLY):\n                transformed = await self.transform(ctx, param, attachments)\n                args.append(transformed)\n            elif param.kind == param.KEYWORD_ONLY:\n                # kwarg only param denotes \"consume rest\" semantics\n                if self.rest_is_raw:\n                    ctx.current_argument = argument = view.read_rest()\n                    kwargs[name] = await run_converters(ctx, param.converter, argument, param)\n                else:\n                    kwargs[name] = await self.transform(ctx, param, attachments)\n                break\n            elif param.kind == param.VAR_POSITIONAL:\n                if view.eof and self.require_var_positional:\n                    raise MissingRequiredArgument(param)\n                while not view.eof:\n                    try:\n                        transformed = await self.transform(ctx, param, attachments)\n                        args.append(transformed)\n                    except RuntimeError:\n                        break\n\n        if not self.ignore_extra and not view.eof:\n            raise TooManyArguments('Too many arguments passed to ' + self.qualified_name)\n\n    async def call_before_hooks(self, ctx: Context[BotT], /) -> None:\n        # now that we're done preparing we can call the pre-command hooks\n        # first, call the command local hook:\n        cog = self.cog\n        if self._before_invoke is not None:\n            # should be cog if @commands.before_invoke is used\n            instance = getattr(self._before_invoke, '__self__', cog)\n            # __self__ only exists for methods, not functions\n            # however, if @command.before_invoke is used, it will be a function\n            if instance:\n                await self._before_invoke(instance, ctx)  # type: ignore\n            else:\n                await self._before_invoke(ctx)  # type: ignore\n\n        # call the cog local hook if applicable:\n        if cog is not None:\n            hook = Cog._get_overridden_method(cog.cog_before_invoke)\n            if hook is not None:\n                await hook(ctx)\n\n        # call the bot global hook if necessary\n        hook = ctx.bot._before_invoke\n        if hook is not None:\n            await hook(ctx)\n\n    async def call_after_hooks(self, ctx: Context[BotT], /) -> None:\n        cog = self.cog\n        if self._after_invoke is not None:\n            instance = getattr(self._after_invoke, '__self__', cog)\n            if instance:\n                await self._after_invoke(instance, ctx)  # type: ignore\n            else:\n                await self._after_invoke(ctx)  # type: ignore\n\n        # call the cog local hook if applicable:\n        if cog is not None:\n            hook = Cog._get_overridden_method(cog.cog_after_invoke)\n            if hook is not None:\n                await hook(ctx)\n\n        hook = ctx.bot._after_invoke\n        if hook is not None:\n            await hook(ctx)\n\n    def _prepare_cooldowns(self, ctx: Context[BotT]) -> None:\n        if self._buckets.valid:\n            dt = ctx.message.edited_at or ctx.message.created_at\n            current = dt.replace(tzinfo=datetime.timezone.utc).timestamp()\n            bucket = self._buckets.get_bucket(ctx, current)\n            if bucket is not None:\n                retry_after = bucket.update_rate_limit(current)\n                if retry_after:\n                    raise CommandOnCooldown(bucket, retry_after, self._buckets.type)  # type: ignore\n\n    async def prepare(self, ctx: Context[BotT], /) -> None:\n        ctx.command = self\n\n        if not await self.can_run(ctx):\n            raise CheckFailure(f'The check functions for command {self.qualified_name} failed.')\n\n        if self._max_concurrency is not None:\n            # For this application, context can be duck-typed as a Message\n            await self._max_concurrency.acquire(ctx)\n\n        try:\n            if self.cooldown_after_parsing:\n                await self._parse_arguments(ctx)\n                self._prepare_cooldowns(ctx)\n            else:\n                self._prepare_cooldowns(ctx)\n                await self._parse_arguments(ctx)\n\n            await self.call_before_hooks(ctx)\n        except:\n            if self._max_concurrency is not None:\n                await self._max_concurrency.release(ctx)\n            raise\n\n    def is_on_cooldown(self, ctx: Context[BotT], /) -> bool:\n        \"\"\"Checks whether the command is currently on cooldown.\n\n        .. versionchanged:: 2.0\n\n            ``ctx`` parameter is now positional-only.\n\n        Parameters\n        -----------\n        ctx: :class:`.Context`\n            The invocation context to use when checking the commands cooldown status.\n\n        Returns\n        --------\n        :class:`bool`\n            A boolean indicating if the command is on cooldown.\n        \"\"\"\n        if not self._buckets.valid:\n            return False\n\n        bucket = self._buckets.get_bucket(ctx)\n        if bucket is None:\n            return False\n        dt = ctx.message.edited_at or ctx.message.created_at\n        current = dt.replace(tzinfo=datetime.timezone.utc).timestamp()\n        return bucket.get_tokens(current) == 0\n\n    def reset_cooldown(self, ctx: Context[BotT], /) -> None:\n        \"\"\"Resets the cooldown on this command.\n\n        .. versionchanged:: 2.0\n\n            ``ctx`` parameter is now positional-only.\n\n        Parameters\n        -----------\n        ctx: :class:`.Context`\n            The invocation context to reset the cooldown under.\n        \"\"\"\n        if self._buckets.valid:\n            bucket = self._buckets.get_bucket(ctx)\n            if bucket is not None:\n                bucket.reset()\n\n    def get_cooldown_retry_after(self, ctx: Context[BotT], /) -> float:\n        \"\"\"Retrieves the amount of seconds before this command can be tried again.\n\n        .. versionadded:: 1.4\n\n        .. versionchanged:: 2.0\n\n            ``ctx`` parameter is now positional-only.\n\n        Parameters\n        -----------\n        ctx: :class:`.Context`\n            The invocation context to retrieve the cooldown from.\n\n        Returns\n        --------\n        :class:`float`\n            The amount of time left on this command's cooldown in seconds.\n            If this is ``0.0`` then the command isn't on cooldown.\n        \"\"\"\n        if self._buckets.valid:\n            bucket = self._buckets.get_bucket(ctx)\n            if bucket is None:\n                return 0.0\n            dt = ctx.message.edited_at or ctx.message.created_at\n            current = dt.replace(tzinfo=datetime.timezone.utc).timestamp()\n            return bucket.get_retry_after(current)\n\n        return 0.0\n\n    async def invoke(self, ctx: Context[BotT], /) -> None:\n        await self.prepare(ctx)\n\n        # terminate the invoked_subcommand chain.\n        # since we're in a regular command (and not a group) then\n        # the invoked subcommand is None.\n        ctx.invoked_subcommand = None\n        ctx.subcommand_passed = None\n        injected = hooked_wrapped_callback(self, ctx, self.callback)  # type: ignore\n        await injected(*ctx.args, **ctx.kwargs)  # type: ignore\n\n    async def reinvoke(self, ctx: Context[BotT], /, *, call_hooks: bool = False) -> None:\n        ctx.command = self\n        await self._parse_arguments(ctx)\n\n        if call_hooks:\n            await self.call_before_hooks(ctx)\n\n        ctx.invoked_subcommand = None\n        try:\n            await self.callback(*ctx.args, **ctx.kwargs)  # type: ignore\n        except:\n            ctx.command_failed = True\n            raise\n        finally:\n            if call_hooks:\n                await self.call_after_hooks(ctx)\n\n    def error(self, coro: Error[CogT, ContextT], /) -> Error[CogT, ContextT]:\n        \"\"\"A decorator that registers a coroutine as a local error handler.\n\n        A local error handler is an :func:`.on_command_error` event limited to\n        a single command. However, the :func:`.on_command_error` is still\n        invoked afterwards as the catch-all.\n\n        .. versionchanged:: 2.0\n\n            ``coro`` parameter is now positional-only.\n\n        Parameters\n        -----------\n        coro: :ref:`coroutine <coroutine>`\n            The coroutine to register as the local error handler.\n\n        Raises\n        -------\n        TypeError\n            The coroutine passed is not actually a coroutine.\n        \"\"\"\n\n        if not asyncio.iscoroutinefunction(coro):\n            raise TypeError('The error handler must be a coroutine.')\n\n        self.on_error: Error[CogT, Any] = coro\n        return coro\n\n    def has_error_handler(self) -> bool:\n        \"\"\":class:`bool`: Checks whether the command has an error handler registered.\n\n        .. versionadded:: 1.7\n        \"\"\"\n        return hasattr(self, 'on_error')\n\n    def before_invoke(self, coro: Hook[CogT, ContextT], /) -> Hook[CogT, ContextT]:\n        \"\"\"A decorator that registers a coroutine as a pre-invoke hook.\n\n        A pre-invoke hook is called directly before the command is\n        called. This makes it a useful function to set up database\n        connections or any type of set up required.\n\n        This pre-invoke hook takes a sole parameter, a :class:`.Context`.\n\n        See :meth:`.Bot.before_invoke` for more info.\n\n        .. versionchanged:: 2.0\n\n            ``coro`` parameter is now positional-only.\n\n        Parameters\n        -----------\n        coro: :ref:`coroutine <coroutine>`\n            The coroutine to register as the pre-invoke hook.\n\n        Raises\n        -------\n        TypeError\n            The coroutine passed is not actually a coroutine.\n        \"\"\"\n        if not asyncio.iscoroutinefunction(coro):\n            raise TypeError('The pre-invoke hook must be a coroutine.')\n\n        self._before_invoke = coro\n        return coro\n\n    def after_invoke(self, coro: Hook[CogT, ContextT], /) -> Hook[CogT, ContextT]:\n        \"\"\"A decorator that registers a coroutine as a post-invoke hook.\n\n        A post-invoke hook is called directly after the command is\n        called. This makes it a useful function to clean-up database\n        connections or any type of clean up required.\n\n        This post-invoke hook takes a sole parameter, a :class:`.Context`.\n\n        See :meth:`.Bot.after_invoke` for more info.\n\n        .. versionchanged:: 2.0\n\n            ``coro`` parameter is now positional-only.\n\n        Parameters\n        -----------\n        coro: :ref:`coroutine <coroutine>`\n            The coroutine to register as the post-invoke hook.\n\n        Raises\n        -------\n        TypeError\n            The coroutine passed is not actually a coroutine.\n        \"\"\"\n        if not asyncio.iscoroutinefunction(coro):\n            raise TypeError('The post-invoke hook must be a coroutine.')\n\n        self._after_invoke = coro\n        return coro\n\n    @property\n    def cog_name(self) -> Optional[str]:\n        \"\"\"Optional[:class:`str`]: The name of the cog this command belongs to, if any.\"\"\"\n        return type(self.cog).__cog_name__ if self.cog is not None else None\n\n    @property\n    def short_doc(self) -> str:\n        \"\"\":class:`str`: Gets the \"short\" documentation of a command.\n\n        By default, this is the :attr:`.brief` attribute.\n        If that lookup leads to an empty string then the first line of the\n        :attr:`.help` attribute is used instead.\n        \"\"\"\n        if self.brief is not None:\n            return self.brief\n        if self.help is not None:\n            return self.help.split('\\n', 1)[0]\n        return ''\n\n    def _is_typing_optional(self, annotation: Union[T, Optional[T]]) -> bool:\n        return getattr(annotation, '__origin__', None) is Union and type(None) in annotation.__args__  # type: ignore\n\n    @property\n    def signature(self) -> str:\n        \"\"\":class:`str`: Returns a POSIX-like signature useful for help command output.\"\"\"\n        if self.usage is not None:\n            return self.usage\n\n        params = self.clean_params\n        if not params:\n            return ''\n\n        result = []\n        for param in params.values():\n            name = param.displayed_name or param.name\n\n            greedy = isinstance(param.converter, Greedy)\n            optional = False  # postpone evaluation of if it's an optional argument\n\n            annotation: Any = param.converter.converter if greedy else param.converter\n            origin = getattr(annotation, '__origin__', None)\n            if not greedy and origin is Union:\n                none_cls = type(None)\n                union_args = annotation.__args__\n                optional = union_args[-1] is none_cls\n                if len(union_args) == 2 and optional:\n                    annotation = union_args[0]\n                    origin = getattr(annotation, '__origin__', None)\n\n            if annotation is discord.Attachment:\n                # For discord.Attachment we need to signal to the user that it's an attachment\n                # It's not exactly pretty but it's enough to differentiate\n                if optional:\n                    result.append(f'[{name} (upload a file)]')\n                elif greedy:\n                    result.append(f'[{name} (upload files)]...')\n                else:\n                    result.append(f'<{name} (upload a file)>')\n                continue\n\n            # for typing.Literal[...], typing.Optional[typing.Literal[...]], and Greedy[typing.Literal[...]], the\n            # parameter signature is a literal list of it's values\n            if origin is Literal:\n                name = '|'.join(f'\"{v}\"' if isinstance(v, str) else str(v) for v in annotation.__args__)\n            if not param.required:\n                # We don't want None or '' to trigger the [name=value] case and instead it should\n                # do [name] since [name=None] or [name=] are not exactly useful for the user.\n                if param.displayed_default:\n                    result.append(\n                        f'[{name}={param.displayed_default}]' if not greedy else f'[{name}={param.displayed_default}]...'\n                    )\n                    continue\n                else:\n                    result.append(f'[{name}]')\n\n            elif param.kind == param.VAR_POSITIONAL:\n                if self.require_var_positional:\n                    result.append(f'<{name}...>')\n                else:\n                    result.append(f'[{name}...]')\n            elif greedy:\n                result.append(f'[{name}]...')\n            elif optional:\n                result.append(f'[{name}]')\n            else:\n                result.append(f'<{name}>')\n\n        return ' '.join(result)\n\n    async def can_run(self, ctx: Context[BotT], /) -> bool:\n        \"\"\"|coro|\n\n        Checks if the command can be executed by checking all the predicates\n        inside the :attr:`~Command.checks` attribute. This also checks whether the\n        command is disabled.\n\n        .. versionchanged:: 1.3\n            Checks whether the command is disabled or not\n\n        .. versionchanged:: 2.0\n\n            ``ctx`` parameter is now positional-only.\n\n        Parameters\n        -----------\n        ctx: :class:`.Context`\n            The ctx of the command currently being invoked.\n\n        Raises\n        -------\n        :class:`CommandError`\n            Any command error that was raised during a check call will be propagated\n            by this function.\n\n        Returns\n        --------\n        :class:`bool`\n            A boolean indicating if the command can be invoked.\n        \"\"\"\n\n        if not self.enabled:\n            raise DisabledCommand(f'{self.name} command is disabled')\n\n        original = ctx.command\n        ctx.command = self\n\n        try:\n            if not await ctx.bot.can_run(ctx):\n                raise CheckFailure(f'The global check functions for command {self.qualified_name} failed.')\n\n            cog = self.cog\n            if cog is not None:\n                local_check = Cog._get_overridden_method(cog.cog_check)\n                if local_check is not None:\n                    ret = await discord.utils.maybe_coroutine(local_check, ctx)\n                    if not ret:\n                        return False\n\n            predicates = self.checks\n            if not predicates:\n                # since we have no checks, then we just return True.\n                return True\n\n            return await discord.utils.async_all(predicate(ctx) for predicate in predicates)\n        finally:\n            ctx.command = original\n\n\nclass GroupMixin(Generic[CogT]):\n    \"\"\"A mixin that implements common functionality for classes that behave\n    similar to :class:`.Group` and are allowed to register commands.\n\n    Attributes\n    -----------\n    all_commands: :class:`dict`\n        A mapping of command name to :class:`.Command`\n        objects.\n    case_insensitive: :class:`bool`\n        Whether the commands should be case insensitive. Defaults to ``False``.\n    \"\"\"\n\n    def __init__(self, *args: Any, **kwargs: Any) -> None:\n        case_insensitive = kwargs.get('case_insensitive', False)\n        self.all_commands: Dict[str, Command[CogT, ..., Any]] = _CaseInsensitiveDict() if case_insensitive else {}\n        self.case_insensitive: bool = case_insensitive\n        super().__init__(*args, **kwargs)\n\n    @property\n    def commands(self) -> Set[Command[CogT, ..., Any]]:\n        \"\"\"Set[:class:`.Command`]: A unique set of commands without aliases that are registered.\"\"\"\n        return set(self.all_commands.values())\n\n    def recursively_remove_all_commands(self) -> None:\n        for command in self.all_commands.copy().values():\n            if isinstance(command, GroupMixin):\n                command.recursively_remove_all_commands()\n            self.remove_command(command.name)\n\n    def add_command(self, command: Command[CogT, ..., Any], /) -> None:\n        \"\"\"Adds a :class:`.Command` into the internal list of commands.\n\n        This is usually not called, instead the :meth:`~.GroupMixin.command` or\n        :meth:`~.GroupMixin.group` shortcut decorators are used instead.\n\n        .. versionchanged:: 1.4\n             Raise :exc:`.CommandRegistrationError` instead of generic :exc:`.ClientException`\n\n        .. versionchanged:: 2.0\n\n            ``command`` parameter is now positional-only.\n\n        Parameters\n        -----------\n        command: :class:`Command`\n            The command to add.\n\n        Raises\n        -------\n        CommandRegistrationError\n            If the command or its alias is already registered by different command.\n        TypeError\n            If the command passed is not a subclass of :class:`.Command`.\n        \"\"\"\n\n        if not isinstance(command, Command):\n            raise TypeError('The command passed must be a subclass of Command')\n\n        if isinstance(self, Command):\n            command.parent = self\n\n        if command.name in self.all_commands:\n            raise CommandRegistrationError(command.name)\n\n        self.all_commands[command.name] = command\n        for alias in command.aliases:\n            if alias in self.all_commands:\n                self.remove_command(command.name)\n                raise CommandRegistrationError(alias, alias_conflict=True)\n            self.all_commands[alias] = command\n\n    def remove_command(self, name: str, /) -> Optional[Command[CogT, ..., Any]]:\n        \"\"\"Remove a :class:`.Command` from the internal list\n        of commands.\n\n        This could also be used as a way to remove aliases.\n\n        .. versionchanged:: 2.0\n\n            ``name`` parameter is now positional-only.\n\n        Parameters\n        -----------\n        name: :class:`str`\n            The name of the command to remove.\n\n        Returns\n        --------\n        Optional[:class:`.Command`]\n            The command that was removed. If the name is not valid then\n            ``None`` is returned instead.\n        \"\"\"\n        command = self.all_commands.pop(name, None)\n\n        # does not exist\n        if command is None:\n            return None\n\n        if name in command.aliases:\n            # we're removing an alias so we don't want to remove the rest\n            return command\n\n        # we're not removing the alias so let's delete the rest of them.\n        for alias in command.aliases:\n            cmd = self.all_commands.pop(alias, None)\n            # in the case of a CommandRegistrationError, an alias might conflict\n            # with an already existing command. If this is the case, we want to\n            # make sure the pre-existing command is not removed.\n            if cmd is not None and cmd != command:\n                self.all_commands[alias] = cmd\n        return command\n\n    def walk_commands(self) -> Generator[Command[CogT, ..., Any], None, None]:\n        \"\"\"An iterator that recursively walks through all commands and subcommands.\n\n        .. versionchanged:: 1.4\n            Duplicates due to aliases are no longer returned\n\n        Yields\n        ------\n        Union[:class:`.Command`, :class:`.Group`]\n            A command or group from the internal list of commands.\n        \"\"\"\n        for command in self.commands:\n            yield command\n            if isinstance(command, GroupMixin):\n                yield from command.walk_commands()\n\n    def get_command(self, name: str, /) -> Optional[Command[CogT, ..., Any]]:\n        \"\"\"Get a :class:`.Command` from the internal list\n        of commands.\n\n        This could also be used as a way to get aliases.\n\n        The name could be fully qualified (e.g. ``'foo bar'``) will get\n        the subcommand ``bar`` of the group command ``foo``. If a\n        subcommand is not found then ``None`` is returned just as usual.\n\n        .. versionchanged:: 2.0\n\n            ``name`` parameter is now positional-only.\n\n        Parameters\n        -----------\n        name: :class:`str`\n            The name of the command to get.\n\n        Returns\n        --------\n        Optional[:class:`Command`]\n            The command that was requested. If not found, returns ``None``.\n        \"\"\"\n\n        # fast path, no space in name.\n        if ' ' not in name:\n            return self.all_commands.get(name)\n\n        names = name.split()\n        if not names:\n            return None\n        obj = self.all_commands.get(names[0])\n        if not isinstance(obj, GroupMixin):\n            return obj\n\n        for name in names[1:]:\n            try:\n                obj = obj.all_commands[name]  # type: ignore\n            except (AttributeError, KeyError):\n                return None\n\n        return obj\n\n    @overload\n    def command(\n        self: GroupMixin[CogT],\n        name: str = ...,\n        *args: Any,\n        **kwargs: Any,\n    ) -> Callable[\n        [\n            Union[\n                Callable[Concatenate[CogT, ContextT, P], Coro[T]],\n                Callable[Concatenate[ContextT, P], Coro[T]],\n            ]\n        ],\n        Command[CogT, P, T],\n    ]:\n        ...\n\n    @overload\n    def command(\n        self: GroupMixin[CogT],\n        name: str = ...,\n        cls: Type[CommandT] = ...,  # type: ignore  # previous overload handles case where cls is not set\n        *args: Any,\n        **kwargs: Any,\n    ) -> Callable[\n        [\n            Union[\n                Callable[Concatenate[CogT, ContextT, P], Coro[T]],\n                Callable[Concatenate[ContextT, P], Coro[T]],\n            ]\n        ],\n        CommandT,\n    ]:\n        ...\n\n    def command(\n        self,\n        name: str = MISSING,\n        cls: Type[Command[Any, ..., Any]] = MISSING,\n        *args: Any,\n        **kwargs: Any,\n    ) -> Any:\n        \"\"\"A shortcut decorator that invokes :func:`~discord.ext.commands.command` and adds it to\n        the internal command list via :meth:`~.GroupMixin.add_command`.\n\n        Returns\n        --------\n        Callable[..., :class:`Command`]\n            A decorator that converts the provided method into a Command, adds it to the bot, then returns it.\n        \"\"\"\n\n        def decorator(func):\n\n            kwargs.setdefault('parent', self)\n            result = command(name=name, cls=cls, *args, **kwargs)(func)\n            self.add_command(result)\n            return result\n\n        return decorator\n\n    @overload\n    def group(\n        self: GroupMixin[CogT],\n        name: str = ...,\n        *args: Any,\n        **kwargs: Any,\n    ) -> Callable[\n        [\n            Union[\n                Callable[Concatenate[CogT, ContextT, P], Coro[T]],\n                Callable[Concatenate[ContextT, P], Coro[T]],\n            ]\n        ],\n        Group[CogT, P, T],\n    ]:\n        ...\n\n    @overload\n    def group(\n        self: GroupMixin[CogT],\n        name: str = ...,\n        cls: Type[GroupT] = ...,  # type: ignore  # previous overload handles case where cls is not set\n        *args: Any,\n        **kwargs: Any,\n    ) -> Callable[\n        [\n            Union[\n                Callable[Concatenate[CogT, ContextT, P], Coro[T]],\n                Callable[Concatenate[ContextT, P], Coro[T]],\n            ]\n        ],\n        GroupT,\n    ]:\n        ...\n\n    def group(\n        self,\n        name: str = MISSING,\n        cls: Type[Group[Any, ..., Any]] = MISSING,\n        *args: Any,\n        **kwargs: Any,\n    ) -> Any:\n        \"\"\"A shortcut decorator that invokes :func:`.group` and adds it to\n        the internal command list via :meth:`~.GroupMixin.add_command`.\n\n        Returns\n        --------\n        Callable[..., :class:`Group`]\n            A decorator that converts the provided method into a Group, adds it to the bot, then returns it.\n        \"\"\"\n\n        def decorator(func):\n            kwargs.setdefault('parent', self)\n            result = group(name=name, cls=cls, *args, **kwargs)(func)\n            self.add_command(result)\n            return result\n\n        return decorator\n\n\nclass Group(GroupMixin[CogT], Command[CogT, P, T]):\n    \"\"\"A class that implements a grouping protocol for commands to be\n    executed as subcommands.\n\n    This class is a subclass of :class:`.Command` and thus all options\n    valid in :class:`.Command` are valid in here as well.\n\n    Attributes\n    -----------\n    invoke_without_command: :class:`bool`\n        Indicates if the group callback should begin parsing and\n        invocation only if no subcommand was found. Useful for\n        making it an error handling function to tell the user that\n        no subcommand was found or to have different functionality\n        in case no subcommand was found. If this is ``False``, then\n        the group callback will always be invoked first. This means\n        that the checks and the parsing dictated by its parameters\n        will be executed. Defaults to ``False``.\n    case_insensitive: :class:`bool`\n        Indicates if the group's commands should be case insensitive.\n        Defaults to ``False``.\n    \"\"\"\n\n    def __init__(self, *args: Any, **attrs: Any) -> None:\n        self.invoke_without_command: bool = attrs.pop('invoke_without_command', False)\n        super().__init__(*args, **attrs)\n\n    def copy(self) -> Self:\n        \"\"\"Creates a copy of this :class:`Group`.\n\n        Returns\n        --------\n        :class:`Group`\n            A new instance of this group.\n        \"\"\"\n        ret = super().copy()\n        for cmd in self.commands:\n            ret.add_command(cmd.copy())\n        return ret\n\n    async def invoke(self, ctx: Context[BotT], /) -> None:\n        ctx.invoked_subcommand = None\n        ctx.subcommand_passed = None\n        early_invoke = not self.invoke_without_command\n        if early_invoke:\n            await self.prepare(ctx)\n\n        view = ctx.view\n        previous = view.index\n        view.skip_ws()\n        trigger = view.get_word()\n\n        if trigger:\n            ctx.subcommand_passed = trigger\n            ctx.invoked_subcommand = self.all_commands.get(trigger, None)\n\n        if early_invoke:\n            injected = hooked_wrapped_callback(self, ctx, self.callback)  # type: ignore\n            await injected(*ctx.args, **ctx.kwargs)  # type: ignore\n\n        ctx.invoked_parents.append(ctx.invoked_with)  # type: ignore\n\n        if trigger and ctx.invoked_subcommand:\n            ctx.invoked_with = trigger\n            await ctx.invoked_subcommand.invoke(ctx)\n        elif not early_invoke:\n            # undo the trigger parsing\n            view.index = previous\n            view.previous = previous\n            await super().invoke(ctx)\n\n    async def reinvoke(self, ctx: Context[BotT], /, *, call_hooks: bool = False) -> None:\n        ctx.invoked_subcommand = None\n        early_invoke = not self.invoke_without_command\n        if early_invoke:\n            ctx.command = self\n            await self._parse_arguments(ctx)\n\n            if call_hooks:\n                await self.call_before_hooks(ctx)\n\n        view = ctx.view\n        previous = view.index\n        view.skip_ws()\n        trigger = view.get_word()\n\n        if trigger:\n            ctx.subcommand_passed = trigger\n            ctx.invoked_subcommand = self.all_commands.get(trigger, None)\n\n        if early_invoke:\n            try:\n                await self.callback(*ctx.args, **ctx.kwargs)  # type: ignore\n            except:\n                ctx.command_failed = True\n                raise\n            finally:\n                if call_hooks:\n                    await self.call_after_hooks(ctx)\n\n        ctx.invoked_parents.append(ctx.invoked_with)  # type: ignore\n\n        if trigger and ctx.invoked_subcommand:\n            ctx.invoked_with = trigger\n            await ctx.invoked_subcommand.reinvoke(ctx, call_hooks=call_hooks)\n        elif not early_invoke:\n            # undo the trigger parsing\n            view.index = previous\n            view.previous = previous\n            await super().reinvoke(ctx, call_hooks=call_hooks)\n\n\n# Decorators\n\nif TYPE_CHECKING:\n    # Using a class to emulate a function allows for overloading the inner function in the decorator.\n\n    class _CommandDecorator:\n        @overload\n        def __call__(self, func: Callable[Concatenate[CogT, ContextT, P], Coro[T]], /) -> Command[CogT, P, T]:\n            ...\n\n        @overload\n        def __call__(self, func: Callable[Concatenate[ContextT, P], Coro[T]], /) -> Command[None, P, T]:\n            ...\n\n        def __call__(self, func: Callable[..., Coro[T]], /) -> Any:\n            ...\n\n    class _GroupDecorator:\n        @overload\n        def __call__(self, func: Callable[Concatenate[CogT, ContextT, P], Coro[T]], /) -> Group[CogT, P, T]:\n            ...\n\n        @overload\n        def __call__(self, func: Callable[Concatenate[ContextT, P], Coro[T]], /) -> Group[None, P, T]:\n            ...\n\n        def __call__(self, func: Callable[..., Coro[T]], /) -> Any:\n            ...\n\n\n@overload\ndef command(\n    name: str = ...,\n    **attrs: Any,\n) -> _CommandDecorator:\n    ...\n\n\n@overload\ndef command(\n    name: str = ...,\n    cls: Type[CommandT] = ...,  # type: ignore  # previous overload handles case where cls is not set\n    **attrs: Any,\n) -> Callable[\n    [\n        Union[\n            Callable[Concatenate[ContextT, P], Coro[Any]],\n            Callable[Concatenate[CogT, ContextT, P], Coro[Any]],  # type: ignore # CogT is used here to allow covariance\n        ]\n    ],\n    CommandT,\n]:\n    ...\n\n\ndef command(\n    name: str = MISSING,\n    cls: Type[Command[Any, ..., Any]] = MISSING,\n    **attrs: Any,\n) -> Any:\n    \"\"\"A decorator that transforms a function into a :class:`.Command`\n    or if called with :func:`.group`, :class:`.Group`.\n\n    By default the ``help`` attribute is received automatically from the\n    docstring of the function and is cleaned up with the use of\n    ``inspect.cleandoc``. If the docstring is ``bytes``, then it is decoded\n    into :class:`str` using utf-8 encoding.\n\n    All checks added using the :func:`.check` & co. decorators are added into\n    the function. There is no way to supply your own checks through this\n    decorator.\n\n    Parameters\n    -----------\n    name: :class:`str`\n        The name to create the command with. By default this uses the\n        function name unchanged.\n    cls\n        The class to construct with. By default this is :class:`.Command`.\n        You usually do not change this.\n    attrs\n        Keyword arguments to pass into the construction of the class denoted\n        by ``cls``.\n\n    Raises\n    -------\n    TypeError\n        If the function is not a coroutine or is already a command.\n    \"\"\"\n    if cls is MISSING:\n        cls = Command\n\n    def decorator(func):\n        if isinstance(func, Command):\n            raise TypeError('Callback is already a command.')\n        return cls(func, name=name, **attrs)\n\n    return decorator\n\n\n@overload\ndef group(\n    name: str = ...,\n    **attrs: Any,\n) -> _GroupDecorator:\n    ...\n\n\n@overload\ndef group(\n    name: str = ...,\n    cls: Type[GroupT] = ...,  # type: ignore  # previous overload handles case where cls is not set\n    **attrs: Any,\n) -> Callable[\n    [\n        Union[\n            Callable[Concatenate[CogT, ContextT, P], Coro[Any]],  # type: ignore # CogT is used here to allow covariance\n            Callable[Concatenate[ContextT, P], Coro[Any]],\n        ]\n    ],\n    GroupT,\n]:\n    ...\n\n\ndef group(\n    name: str = MISSING,\n    cls: Type[Group[Any, ..., Any]] = MISSING,\n    **attrs: Any,\n) -> Any:\n    \"\"\"A decorator that transforms a function into a :class:`.Group`.\n\n    This is similar to the :func:`~discord.ext.commands.command` decorator but the ``cls``\n    parameter is set to :class:`Group` by default.\n\n    .. versionchanged:: 1.1\n        The ``cls`` parameter can now be passed.\n    \"\"\"\n    if cls is MISSING:\n        cls = Group\n\n    return command(name=name, cls=cls, **attrs)\n\n\ndef check(predicate: UserCheck[ContextT], /) -> Check[ContextT]:\n    r\"\"\"A decorator that adds a check to the :class:`.Command` or its\n    subclasses. These checks could be accessed via :attr:`.Command.checks`.\n\n    These checks should be predicates that take in a single parameter taking\n    a :class:`.Context`. If the check returns a ``False``\\-like value then\n    during invocation a :exc:`.CheckFailure` exception is raised and sent to\n    the :func:`.on_command_error` event.\n\n    If an exception should be thrown in the predicate then it should be a\n    subclass of :exc:`.CommandError`. Any exception not subclassed from it\n    will be propagated while those subclassed will be sent to\n    :func:`.on_command_error`.\n\n    A special attribute named ``predicate`` is bound to the value\n    returned by this decorator to retrieve the predicate passed to the\n    decorator. This allows the following introspection and chaining to be done:\n\n    .. code-block:: python3\n\n        def owner_or_permissions(**perms):\n            original = commands.has_permissions(**perms).predicate\n            async def extended_check(ctx):\n                if ctx.guild is None:\n                    return False\n                return ctx.guild.owner_id == ctx.author.id or await original(ctx)\n            return commands.check(extended_check)\n\n    .. note::\n\n        The function returned by ``predicate`` is **always** a coroutine,\n        even if the original function was not a coroutine.\n\n    .. versionchanged:: 1.3\n        The ``predicate`` attribute was added.\n\n    Examples\n    ---------\n\n    Creating a basic check to see if the command invoker is you.\n\n    .. code-block:: python3\n\n        def check_if_it_is_me(ctx):\n            return ctx.message.author.id == 85309593344815104\n\n        @bot.command()\n        @commands.check(check_if_it_is_me)\n        async def only_for_me(ctx):\n            await ctx.send('I know you!')\n\n    Transforming common checks into its own decorator:\n\n    .. code-block:: python3\n\n        def is_me():\n            def predicate(ctx):\n                return ctx.message.author.id == 85309593344815104\n            return commands.check(predicate)\n\n        @bot.command()\n        @is_me()\n        async def only_me(ctx):\n            await ctx.send('Only you!')\n\n    .. versionchanged:: 2.0\n\n        ``predicate`` parameter is now positional-only.\n\n    Parameters\n    -----------\n    predicate: Callable[[:class:`Context`], :class:`bool`]\n        The predicate to check if the command should be invoked.\n    \"\"\"\n\n    def decorator(func: Union[Command[Any, ..., Any], CoroFunc]) -> Union[Command[Any, ..., Any], CoroFunc]:\n        if isinstance(func, Command):\n            func.checks.append(predicate)  # type: ignore\n        else:\n            if not hasattr(func, '__commands_checks__'):\n                func.__commands_checks__ = []\n\n            func.__commands_checks__.append(predicate)\n\n        return func\n\n    if inspect.iscoroutinefunction(predicate):\n        decorator.predicate = predicate\n    else:\n\n        @functools.wraps(predicate)\n        async def wrapper(ctx: ContextT):\n            return predicate(ctx)\n\n        decorator.predicate = wrapper\n\n    return decorator  # type: ignore\n\n\ndef check_any(*checks: Check[ContextT]) -> Check[ContextT]:\n    r\"\"\"A :func:`check` that is added that checks if any of the checks passed\n    will pass, i.e. using logical OR.\n\n    If all checks fail then :exc:`.CheckAnyFailure` is raised to signal the failure.\n    It inherits from :exc:`.CheckFailure`.\n\n    .. note::\n\n        The ``predicate`` attribute for this function **is** a coroutine.\n\n    .. versionadded:: 1.3\n\n    Parameters\n    ------------\n    \\*checks: Callable[[:class:`Context`], :class:`bool`]\n        An argument list of checks that have been decorated with\n        the :func:`check` decorator.\n\n    Raises\n    -------\n    TypeError\n        A check passed has not been decorated with the :func:`check`\n        decorator.\n\n    Examples\n    ---------\n\n    Creating a basic check to see if it's the bot owner or\n    the server owner:\n\n    .. code-block:: python3\n\n        def is_guild_owner():\n            def predicate(ctx):\n                return ctx.guild is not None and ctx.guild.owner_id == ctx.author.id\n            return commands.check(predicate)\n\n        @bot.command()\n        @commands.check_any(commands.is_owner(), is_guild_owner())\n        async def only_for_owners(ctx):\n            await ctx.send('Hello mister owner!')\n    \"\"\"\n\n    unwrapped = []\n    for wrapped in checks:\n        try:\n            pred = wrapped.predicate\n        except AttributeError:\n            raise TypeError(f'{wrapped!r} must be wrapped by commands.check decorator') from None\n        else:\n            unwrapped.append(pred)\n\n    async def predicate(ctx: Context[BotT]) -> bool:\n        errors = []\n        for func in unwrapped:\n            try:\n                value = await func(ctx)\n            except CheckFailure as e:\n                errors.append(e)\n            else:\n                if value:\n                    return True\n        # if we're here, all checks failed\n        raise CheckAnyFailure(unwrapped, errors)\n\n    return check(predicate)\n\n\ndef has_role(item: Union[int, str], /) -> Check[Any]:\n    \"\"\"A :func:`.check` that is added that checks if the member invoking the\n    command has the role specified via the name or ID specified.\n\n    If a string is specified, you must give the exact name of the role, including\n    caps and spelling.\n\n    If an integer is specified, you must give the exact snowflake ID of the role.\n\n    If the message is invoked in a private message context then the check will\n    return ``False``.\n\n    This check raises one of two special exceptions, :exc:`.MissingRole` if the user\n    is missing a role, or :exc:`.NoPrivateMessage` if it is used in a private message.\n    Both inherit from :exc:`.CheckFailure`.\n\n    .. versionchanged:: 1.1\n\n        Raise :exc:`.MissingRole` or :exc:`.NoPrivateMessage`\n        instead of generic :exc:`.CheckFailure`\n\n    .. versionchanged:: 2.0\n\n        ``item`` parameter is now positional-only.\n\n    Parameters\n    -----------\n    item: Union[:class:`int`, :class:`str`]\n        The name or ID of the role to check.\n    \"\"\"\n\n    def predicate(ctx: Context[BotT]) -> bool:\n        if ctx.guild is None:\n            raise NoPrivateMessage()\n\n        # ctx.guild is None doesn't narrow ctx.author to Member\n        if isinstance(item, int):\n            role = ctx.author.get_role(item)  # type: ignore\n        else:\n            role = discord.utils.get(ctx.author.roles, name=item)  # type: ignore\n        if role is None:\n            raise MissingRole(item)\n        return True\n\n    return check(predicate)\n\n\ndef has_any_role(*items: Union[int, str]) -> Callable[[T], T]:\n    r\"\"\"A :func:`.check` that is added that checks if the member invoking the\n    command has **any** of the roles specified. This means that if they have\n    one out of the three roles specified, then this check will return ``True``.\n\n    Similar to :func:`.has_role`\\, the names or IDs passed in must be exact.\n\n    This check raises one of two special exceptions, :exc:`.MissingAnyRole` if the user\n    is missing all roles, or :exc:`.NoPrivateMessage` if it is used in a private message.\n    Both inherit from :exc:`.CheckFailure`.\n\n    .. versionchanged:: 1.1\n\n        Raise :exc:`.MissingAnyRole` or :exc:`.NoPrivateMessage`\n        instead of generic :exc:`.CheckFailure`\n\n    Parameters\n    -----------\n    items: List[Union[:class:`str`, :class:`int`]]\n        An argument list of names or IDs to check that the member has roles wise.\n\n    Example\n    --------\n\n    .. code-block:: python3\n\n        @bot.command()\n        @commands.has_any_role('Library Devs', 'Moderators', 492212595072434186)\n        async def cool(ctx):\n            await ctx.send('You are cool indeed')\n    \"\"\"\n\n    def predicate(ctx):\n        if ctx.guild is None:\n            raise NoPrivateMessage()\n\n        # ctx.guild is None doesn't narrow ctx.author to Member\n        if any(\n            ctx.author.get_role(item) is not None\n            if isinstance(item, int)\n            else discord.utils.get(ctx.author.roles, name=item) is not None\n            for item in items\n        ):\n            return True\n        raise MissingAnyRole(list(items))\n\n    return check(predicate)\n\n\ndef bot_has_role(item: int, /) -> Callable[[T], T]:\n    \"\"\"Similar to :func:`.has_role` except checks if the bot itself has the\n    role.\n\n    This check raises one of two special exceptions, :exc:`.BotMissingRole` if the bot\n    is missing the role, or :exc:`.NoPrivateMessage` if it is used in a private message.\n    Both inherit from :exc:`.CheckFailure`.\n\n    .. versionchanged:: 1.1\n\n        Raise :exc:`.BotMissingRole` or :exc:`.NoPrivateMessage`\n        instead of generic :exc:`.CheckFailure`\n\n    .. versionchanged:: 2.0\n\n        ``item`` parameter is now positional-only.\n    \"\"\"\n\n    def predicate(ctx):\n        if ctx.guild is None:\n            raise NoPrivateMessage()\n\n        if isinstance(item, int):\n            role = ctx.me.get_role(item)\n        else:\n            role = discord.utils.get(ctx.me.roles, name=item)\n        if role is None:\n            raise BotMissingRole(item)\n        return True\n\n    return check(predicate)\n\n\ndef bot_has_any_role(*items: int) -> Callable[[T], T]:\n    \"\"\"Similar to :func:`.has_any_role` except checks if the bot itself has\n    any of the roles listed.\n\n    This check raises one of two special exceptions, :exc:`.BotMissingAnyRole` if the bot\n    is missing all roles, or :exc:`.NoPrivateMessage` if it is used in a private message.\n    Both inherit from :exc:`.CheckFailure`.\n\n    .. versionchanged:: 1.1\n\n        Raise :exc:`.BotMissingAnyRole` or :exc:`.NoPrivateMessage`\n        instead of generic checkfailure\n    \"\"\"\n\n    def predicate(ctx):\n        if ctx.guild is None:\n            raise NoPrivateMessage()\n\n        me = ctx.me\n        if any(\n            me.get_role(item) is not None if isinstance(item, int) else discord.utils.get(me.roles, name=item) is not None\n            for item in items\n        ):\n            return True\n        raise BotMissingAnyRole(list(items))\n\n    return check(predicate)\n\n\ndef has_permissions(**perms: bool) -> Check[Any]:\n    \"\"\"A :func:`.check` that is added that checks if the member has all of\n    the permissions necessary.\n\n    Note that this check operates on the current channel permissions, not the\n    guild wide permissions.\n\n    The permissions passed in must be exactly like the properties shown under\n    :class:`.discord.Permissions`.\n\n    This check raises a special exception, :exc:`.MissingPermissions`\n    that is inherited from :exc:`.CheckFailure`.\n\n    Parameters\n    ------------\n    perms\n        An argument list of permissions to check for.\n\n    Example\n    ---------\n\n    .. code-block:: python3\n\n        @bot.command()\n        @commands.has_permissions(manage_messages=True)\n        async def test(ctx):\n            await ctx.send('You can manage messages.')\n\n    \"\"\"\n\n    invalid = set(perms) - set(discord.Permissions.VALID_FLAGS)\n    if invalid:\n        raise TypeError(f\"Invalid permission(s): {', '.join(invalid)}\")\n\n    def predicate(ctx: Context[BotT]) -> bool:\n        permissions = ctx.permissions\n\n        missing = [perm for perm, value in perms.items() if getattr(permissions, perm) != value]\n\n        if not missing:\n            return True\n\n        raise MissingPermissions(missing)\n\n    return check(predicate)\n\n\ndef bot_has_permissions(**perms: bool) -> Check[Any]:\n    \"\"\"Similar to :func:`.has_permissions` except checks if the bot itself has\n    the permissions listed.\n\n    This check raises a special exception, :exc:`.BotMissingPermissions`\n    that is inherited from :exc:`.CheckFailure`.\n    \"\"\"\n\n    invalid = set(perms) - set(discord.Permissions.VALID_FLAGS)\n    if invalid:\n        raise TypeError(f\"Invalid permission(s): {', '.join(invalid)}\")\n\n    def predicate(ctx: Context[BotT]) -> bool:\n        permissions = ctx.bot_permissions\n\n        missing = [perm for perm, value in perms.items() if getattr(permissions, perm) != value]\n\n        if not missing:\n            return True\n\n        raise BotMissingPermissions(missing)\n\n    return check(predicate)\n\n\ndef has_guild_permissions(**perms: bool) -> Check[Any]:\n    \"\"\"Similar to :func:`.has_permissions`, but operates on guild wide\n    permissions instead of the current channel permissions.\n\n    If this check is called in a DM context, it will raise an\n    exception, :exc:`.NoPrivateMessage`.\n\n    .. versionadded:: 1.3\n    \"\"\"\n\n    invalid = set(perms) - set(discord.Permissions.VALID_FLAGS)\n    if invalid:\n        raise TypeError(f\"Invalid permission(s): {', '.join(invalid)}\")\n\n    def predicate(ctx: Context[BotT]) -> bool:\n        if not ctx.guild:\n            raise NoPrivateMessage\n\n        permissions = ctx.author.guild_permissions  # type: ignore\n        missing = [perm for perm, value in perms.items() if getattr(permissions, perm) != value]\n\n        if not missing:\n            return True\n\n        raise MissingPermissions(missing)\n\n    return check(predicate)\n\n\ndef bot_has_guild_permissions(**perms: bool) -> Check[Any]:\n    \"\"\"Similar to :func:`.has_guild_permissions`, but checks the bot\n    members guild permissions.\n\n    .. versionadded:: 1.3\n    \"\"\"\n\n    invalid = set(perms) - set(discord.Permissions.VALID_FLAGS)\n    if invalid:\n        raise TypeError(f\"Invalid permission(s): {', '.join(invalid)}\")\n\n    def predicate(ctx: Context[BotT]) -> bool:\n        if not ctx.guild:\n            raise NoPrivateMessage\n\n        permissions = ctx.me.guild_permissions  # type: ignore\n        missing = [perm for perm, value in perms.items() if getattr(permissions, perm) != value]\n\n        if not missing:\n            return True\n\n        raise BotMissingPermissions(missing)\n\n    return check(predicate)\n\n\ndef dm_only() -> Check[Any]:\n    \"\"\"A :func:`.check` that indicates this command must only be used in a\n    DM context. Only private messages are allowed when\n    using the command.\n\n    This check raises a special exception, :exc:`.PrivateMessageOnly`\n    that is inherited from :exc:`.CheckFailure`.\n\n    .. versionadded:: 1.1\n    \"\"\"\n\n    def predicate(ctx: Context[BotT]) -> bool:\n        if ctx.guild is not None:\n            raise PrivateMessageOnly()\n        return True\n\n    return check(predicate)\n\n\ndef guild_only() -> Check[Any]:\n    \"\"\"A :func:`.check` that indicates this command must only be used in a\n    guild context only. Basically, no private messages are allowed when\n    using the command.\n\n    This check raises a special exception, :exc:`.NoPrivateMessage`\n    that is inherited from :exc:`.CheckFailure`.\n\n    If used on hybrid commands, this will be equivalent to the\n    :func:`discord.app_commands.guild_only` decorator. In an unsupported\n    context, such as a subcommand, this will still fallback to applying the\n    check.\n    \"\"\"\n\n    # Due to implementation quirks, this check has to be re-implemented completely\n    # to work with both app_commands and the command framework.\n\n    def predicate(ctx: Context[BotT]) -> bool:\n        if ctx.guild is None:\n            raise NoPrivateMessage()\n        return True\n\n    def decorator(func: Union[Command, CoroFunc]) -> Union[Command, CoroFunc]:\n        if isinstance(func, Command):\n            func.checks.append(predicate)\n            if hasattr(func, '__commands_is_hybrid__'):\n                app_command = getattr(func, 'app_command', None)\n                if app_command:\n                    app_command.guild_only = True\n        else:\n            if not hasattr(func, '__commands_checks__'):\n                func.__commands_checks__ = []\n\n            func.__commands_checks__.append(predicate)\n            func.__discord_app_commands_guild_only__ = True\n\n        return func\n\n    if inspect.iscoroutinefunction(predicate):\n        decorator.predicate = predicate\n    else:\n\n        @functools.wraps(predicate)\n        async def wrapper(ctx: Context[BotT]):\n            return predicate(ctx)\n\n        decorator.predicate = wrapper\n\n    return decorator  # type: ignore\n\n\ndef is_owner() -> Check[Any]:\n    \"\"\"A :func:`.check` that checks if the person invoking this command is the\n    owner of the bot.\n\n    This is powered by :meth:`.Bot.is_owner`.\n\n    This check raises a special exception, :exc:`.NotOwner` that is derived\n    from :exc:`.CheckFailure`.\n    \"\"\"\n\n    async def predicate(ctx: Context[BotT]) -> bool:\n        if not await ctx.bot.is_owner(ctx.author):\n            raise NotOwner('You do not own this bot.')\n        return True\n\n    return check(predicate)\n\n\ndef is_nsfw() -> Check[Any]:\n    \"\"\"A :func:`.check` that checks if the channel is a NSFW channel.\n\n    This check raises a special exception, :exc:`.NSFWChannelRequired`\n    that is derived from :exc:`.CheckFailure`.\n\n    If used on hybrid commands, this will be equivalent to setting the\n    application command's ``nsfw`` attribute to ``True``. In an unsupported\n    context, such as a subcommand, this will still fallback to applying the\n    check.\n\n    .. versionchanged:: 1.1\n\n        Raise :exc:`.NSFWChannelRequired` instead of generic :exc:`.CheckFailure`.\n        DM channels will also now pass this check.\n    \"\"\"\n\n    # Due to implementation quirks, this check has to be re-implemented completely\n    # to work with both app_commands and the command framework.\n\n    def predicate(ctx: Context[BotT]) -> bool:\n        ch = ctx.channel\n        if ctx.guild is None or (\n            isinstance(ch, (discord.TextChannel, discord.Thread, discord.VoiceChannel)) and ch.is_nsfw()\n        ):\n            return True\n        raise NSFWChannelRequired(ch)  # type: ignore\n\n    def decorator(func: Union[Command, CoroFunc]) -> Union[Command, CoroFunc]:\n        if isinstance(func, Command):\n            func.checks.append(predicate)\n            if hasattr(func, '__commands_is_hybrid__'):\n                app_command = getattr(func, 'app_command', None)\n                if app_command:\n                    app_command.nsfw = True\n        else:\n            if not hasattr(func, '__commands_checks__'):\n                func.__commands_checks__ = []\n\n            func.__commands_checks__.append(predicate)\n            func.__discord_app_commands_is_nsfw__ = True\n\n        return func\n\n    if inspect.iscoroutinefunction(predicate):\n        decorator.predicate = predicate\n    else:\n\n        @functools.wraps(predicate)\n        async def wrapper(ctx: Context[BotT]):\n            return predicate(ctx)\n\n        decorator.predicate = wrapper\n\n    return decorator  # type: ignore\n\n\ndef cooldown(\n    rate: int,\n    per: float,\n    type: Union[BucketType, Callable[[Context[Any]], Any]] = BucketType.default,\n) -> Callable[[T], T]:\n    \"\"\"A decorator that adds a cooldown to a :class:`.Command`\n\n    A cooldown allows a command to only be used a specific amount\n    of times in a specific time frame. These cooldowns can be based\n    either on a per-guild, per-channel, per-user, per-role or global basis.\n    Denoted by the third argument of ``type`` which must be of enum\n    type :class:`.BucketType`.\n\n    If a cooldown is triggered, then :exc:`.CommandOnCooldown` is triggered in\n    :func:`.on_command_error` and the local error handler.\n\n    A command can only have a single cooldown.\n\n    Parameters\n    ------------\n    rate: :class:`int`\n        The number of times a command can be used before triggering a cooldown.\n    per: :class:`float`\n        The amount of seconds to wait for a cooldown when it's been triggered.\n    type: Union[:class:`.BucketType`, Callable[[:class:`.Context`], Any]]\n        The type of cooldown to have. If callable, should return a key for the mapping.\n\n        .. versionchanged:: 1.7\n            Callables are now supported for custom bucket types.\n\n        .. versionchanged:: 2.0\n            When passing a callable, it now needs to accept :class:`.Context`\n            rather than :class:`~discord.Message` as its only argument.\n    \"\"\"\n\n    def decorator(func: Union[Command, CoroFunc]) -> Union[Command, CoroFunc]:\n        if isinstance(func, Command):\n            func._buckets = CooldownMapping(Cooldown(rate, per), type)\n        else:\n            func.__commands_cooldown__ = CooldownMapping(Cooldown(rate, per), type)\n        return func\n\n    return decorator  # type: ignore\n\n\ndef dynamic_cooldown(\n    cooldown: Callable[[Context[Any]], Optional[Cooldown]],\n    type: Union[BucketType, Callable[[Context[Any]], Any]],\n) -> Callable[[T], T]:\n    \"\"\"A decorator that adds a dynamic cooldown to a :class:`.Command`\n\n    This differs from :func:`.cooldown` in that it takes a function that\n    accepts a single parameter of type :class:`.Context` and must\n    return a :class:`~discord.app_commands.Cooldown` or ``None``.\n    If ``None`` is returned then that cooldown is effectively bypassed.\n\n    A cooldown allows a command to only be used a specific amount\n    of times in a specific time frame. These cooldowns can be based\n    either on a per-guild, per-channel, per-user, per-role or global basis.\n    Denoted by the third argument of ``type`` which must be of enum\n    type :class:`.BucketType`.\n\n    If a cooldown is triggered, then :exc:`.CommandOnCooldown` is triggered in\n    :func:`.on_command_error` and the local error handler.\n\n    A command can only have a single cooldown.\n\n    .. versionadded:: 2.0\n\n    Parameters\n    ------------\n    cooldown: Callable[[:class:`.Context`], Optional[:class:`~discord.app_commands.Cooldown`]]\n        A function that takes a message and returns a cooldown that will\n        apply to this invocation or ``None`` if the cooldown should be bypassed.\n    type: :class:`.BucketType`\n        The type of cooldown to have.\n    \"\"\"\n    if not callable(cooldown):\n        raise TypeError(\"A callable must be provided\")\n\n    if type is BucketType.default:\n        raise ValueError('BucketType.default cannot be used in dynamic cooldowns')\n\n    def decorator(func: Union[Command, CoroFunc]) -> Union[Command, CoroFunc]:\n        if isinstance(func, Command):\n            func._buckets = DynamicCooldownMapping(cooldown, type)\n        else:\n            func.__commands_cooldown__ = DynamicCooldownMapping(cooldown, type)\n        return func\n\n    return decorator  # type: ignore\n\n\ndef max_concurrency(number: int, per: BucketType = BucketType.default, *, wait: bool = False) -> Callable[[T], T]:\n    \"\"\"A decorator that adds a maximum concurrency to a :class:`.Command` or its subclasses.\n\n    This enables you to only allow a certain number of command invocations at the same time,\n    for example if a command takes too long or if only one user can use it at a time. This\n    differs from a cooldown in that there is no set waiting period or token bucket -- only\n    a set number of people can run the command.\n\n    .. versionadded:: 1.3\n\n    Parameters\n    -------------\n    number: :class:`int`\n        The maximum number of invocations of this command that can be running at the same time.\n    per: :class:`.BucketType`\n        The bucket that this concurrency is based on, e.g. ``BucketType.guild`` would allow\n        it to be used up to ``number`` times per guild.\n    wait: :class:`bool`\n        Whether the command should wait for the queue to be over. If this is set to ``False``\n        then instead of waiting until the command can run again, the command raises\n        :exc:`.MaxConcurrencyReached` to its error handler. If this is set to ``True``\n        then the command waits until it can be executed.\n    \"\"\"\n\n    def decorator(func: Union[Command, CoroFunc]) -> Union[Command, CoroFunc]:\n        value = MaxConcurrency(number, per=per, wait=wait)\n        if isinstance(func, Command):\n            func._max_concurrency = value\n        else:\n            func.__commands_max_concurrency__ = value\n        return func\n\n    return decorator  # type: ignore\n\n\ndef before_invoke(coro: Hook[CogT, ContextT], /) -> Callable[[T], T]:\n    \"\"\"A decorator that registers a coroutine as a pre-invoke hook.\n\n    This allows you to refer to one before invoke hook for several commands that\n    do not have to be within the same cog.\n\n    .. versionadded:: 1.4\n\n    .. versionchanged:: 2.0\n\n        ``coro`` parameter is now positional-only.\n\n    Example\n    ---------\n\n    .. code-block:: python3\n\n        async def record_usage(ctx):\n            print(ctx.author, 'used', ctx.command, 'at', ctx.message.created_at)\n\n        @bot.command()\n        @commands.before_invoke(record_usage)\n        async def who(ctx): # Output: <User> used who at <Time>\n            await ctx.send('i am a bot')\n\n        class What(commands.Cog):\n\n            @commands.before_invoke(record_usage)\n            @commands.command()\n            async def when(self, ctx): # Output: <User> used when at <Time>\n                await ctx.send(f'and i have existed since {ctx.bot.user.created_at}')\n\n            @commands.command()\n            async def where(self, ctx): # Output: <Nothing>\n                await ctx.send('on Discord')\n\n            @commands.command()\n            async def why(self, ctx): # Output: <Nothing>\n                await ctx.send('because someone made me')\n\n    \"\"\"\n\n    def decorator(func: Union[Command, CoroFunc]) -> Union[Command, CoroFunc]:\n        if isinstance(func, Command):\n            func.before_invoke(coro)\n        else:\n            func.__before_invoke__ = coro\n        return func\n\n    return decorator  # type: ignore\n\n\ndef after_invoke(coro: Hook[CogT, ContextT], /) -> Callable[[T], T]:\n    \"\"\"A decorator that registers a coroutine as a post-invoke hook.\n\n    This allows you to refer to one after invoke hook for several commands that\n    do not have to be within the same cog.\n\n    .. versionadded:: 1.4\n\n    .. versionchanged:: 2.0\n\n        ``coro`` parameter is now positional-only.\n    \"\"\"\n\n    def decorator(func: Union[Command, CoroFunc]) -> Union[Command, CoroFunc]:\n        if isinstance(func, Command):\n            func.after_invoke(coro)\n        else:\n            func.__after_invoke__ = coro\n        return func\n\n    return decorator  # type: ignore\n"
  },
  {
    "path": "discord/ext/commands/errors.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom __future__ import annotations\n\nfrom typing import TYPE_CHECKING, Any, Callable, List, Optional, Tuple, Union\n\nfrom discord.errors import ClientException, DiscordException\nfrom discord.utils import _human_join\n\nif TYPE_CHECKING:\n    from discord.abc import GuildChannel\n    from discord.threads import Thread\n    from discord.types.snowflake import Snowflake, SnowflakeList\n    from discord.app_commands import AppCommandError\n\n    from ._types import BotT\n    from .context import Context\n    from .converter import Converter\n    from .cooldowns import BucketType, Cooldown\n    from .flags import Flag\n    from .parameters import Parameter\n\n\n__all__ = (\n    'CommandError',\n    'MissingRequiredArgument',\n    'MissingRequiredAttachment',\n    'BadArgument',\n    'PrivateMessageOnly',\n    'NoPrivateMessage',\n    'CheckFailure',\n    'CheckAnyFailure',\n    'CommandNotFound',\n    'DisabledCommand',\n    'CommandInvokeError',\n    'TooManyArguments',\n    'UserInputError',\n    'CommandOnCooldown',\n    'MaxConcurrencyReached',\n    'NotOwner',\n    'MessageNotFound',\n    'ObjectNotFound',\n    'MemberNotFound',\n    'GuildNotFound',\n    'UserNotFound',\n    'ChannelNotFound',\n    'ThreadNotFound',\n    'ChannelNotReadable',\n    'BadColourArgument',\n    'BadColorArgument',\n    'RoleNotFound',\n    'BadInviteArgument',\n    'EmojiNotFound',\n    'GuildStickerNotFound',\n    'ScheduledEventNotFound',\n    'PartialEmojiConversionFailure',\n    'BadBoolArgument',\n    'MissingRole',\n    'BotMissingRole',\n    'MissingAnyRole',\n    'BotMissingAnyRole',\n    'MissingPermissions',\n    'BotMissingPermissions',\n    'NSFWChannelRequired',\n    'ConversionError',\n    'BadUnionArgument',\n    'BadLiteralArgument',\n    'ArgumentParsingError',\n    'UnexpectedQuoteError',\n    'InvalidEndOfQuotedStringError',\n    'ExpectedClosingQuoteError',\n    'ExtensionError',\n    'ExtensionAlreadyLoaded',\n    'ExtensionNotLoaded',\n    'NoEntryPointError',\n    'ExtensionFailed',\n    'ExtensionNotFound',\n    'CommandRegistrationError',\n    'FlagError',\n    'BadFlagArgument',\n    'MissingFlagArgument',\n    'TooManyFlags',\n    'MissingRequiredFlag',\n    'HybridCommandError',\n    'RangeError',\n)\n\n\nclass CommandError(DiscordException):\n    r\"\"\"The base exception type for all command related errors.\n\n    This inherits from :exc:`discord.DiscordException`.\n\n    This exception and exceptions inherited from it are handled\n    in a special way as they are caught and passed into a special event\n    from :class:`.Bot`\\, :func:`.on_command_error`.\n    \"\"\"\n\n    def __init__(self, message: Optional[str] = None, *args: Any) -> None:\n        if message is not None:\n            # clean-up @everyone and @here mentions\n            m = message.replace('@everyone', '@\\u200beveryone').replace('@here', '@\\u200bhere')\n            super().__init__(m, *args)\n        else:\n            super().__init__(*args)\n\n\nclass ConversionError(CommandError):\n    \"\"\"Exception raised when a Converter class raises non-CommandError.\n\n    This inherits from :exc:`CommandError`.\n\n    Attributes\n    ----------\n    converter: :class:`discord.ext.commands.Converter`\n        The converter that failed.\n    original: :exc:`Exception`\n        The original exception that was raised. You can also get this via\n        the ``__cause__`` attribute.\n    \"\"\"\n\n    def __init__(self, converter: Converter[Any], original: Exception) -> None:\n        self.converter: Converter[Any] = converter\n        self.original: Exception = original\n\n\nclass UserInputError(CommandError):\n    \"\"\"The base exception type for errors that involve errors\n    regarding user input.\n\n    This inherits from :exc:`CommandError`.\n    \"\"\"\n\n    pass\n\n\nclass CommandNotFound(CommandError):\n    \"\"\"Exception raised when a command is attempted to be invoked\n    but no command under that name is found.\n\n    This is not raised for invalid subcommands, rather just the\n    initial main command that is attempted to be invoked.\n\n    This inherits from :exc:`CommandError`.\n    \"\"\"\n\n    pass\n\n\nclass MissingRequiredArgument(UserInputError):\n    \"\"\"Exception raised when parsing a command and a parameter\n    that is required is not encountered.\n\n    This inherits from :exc:`UserInputError`\n\n    Attributes\n    -----------\n    param: :class:`Parameter`\n        The argument that is missing.\n    \"\"\"\n\n    def __init__(self, param: Parameter) -> None:\n        self.param: Parameter = param\n        super().__init__(f'{param.displayed_name or param.name} is a required argument that is missing.')\n\n\nclass MissingRequiredAttachment(UserInputError):\n    \"\"\"Exception raised when parsing a command and a parameter\n    that requires an attachment is not given.\n\n    This inherits from :exc:`UserInputError`\n\n    .. versionadded:: 2.0\n\n    Attributes\n    -----------\n    param: :class:`Parameter`\n        The argument that is missing an attachment.\n    \"\"\"\n\n    def __init__(self, param: Parameter) -> None:\n        self.param: Parameter = param\n        super().__init__(f'{param.displayed_name or param.name} is a required argument that is missing an attachment.')\n\n\nclass TooManyArguments(UserInputError):\n    \"\"\"Exception raised when the command was passed too many arguments and its\n    :attr:`.Command.ignore_extra` attribute was not set to ``True``.\n\n    This inherits from :exc:`UserInputError`\n    \"\"\"\n\n    pass\n\n\nclass BadArgument(UserInputError):\n    \"\"\"Exception raised when a parsing or conversion failure is encountered\n    on an argument to pass into a command.\n\n    This inherits from :exc:`UserInputError`\n    \"\"\"\n\n    pass\n\n\nclass CheckFailure(CommandError):\n    \"\"\"Exception raised when the predicates in :attr:`.Command.checks` have failed.\n\n    This inherits from :exc:`CommandError`\n    \"\"\"\n\n    pass\n\n\nclass CheckAnyFailure(CheckFailure):\n    \"\"\"Exception raised when all predicates in :func:`check_any` fail.\n\n    This inherits from :exc:`CheckFailure`.\n\n    .. versionadded:: 1.3\n\n    Attributes\n    ------------\n    errors: List[:class:`CheckFailure`]\n        A list of errors that were caught during execution.\n    checks: List[Callable[[:class:`Context`], :class:`bool`]]\n        A list of check predicates that failed.\n    \"\"\"\n\n    def __init__(self, checks: List[Callable[[Context[BotT]], bool]], errors: List[CheckFailure]) -> None:\n        self.checks: List[Callable[[Context[BotT]], bool]] = checks\n        self.errors: List[CheckFailure] = errors\n        super().__init__('You do not have permission to run this command.')\n\n\nclass PrivateMessageOnly(CheckFailure):\n    \"\"\"Exception raised when an operation does not work outside of private\n    message contexts.\n\n    This inherits from :exc:`CheckFailure`\n    \"\"\"\n\n    def __init__(self, message: Optional[str] = None) -> None:\n        super().__init__(message or 'This command can only be used in private messages.')\n\n\nclass NoPrivateMessage(CheckFailure):\n    \"\"\"Exception raised when an operation does not work in private message\n    contexts.\n\n    This inherits from :exc:`CheckFailure`\n    \"\"\"\n\n    def __init__(self, message: Optional[str] = None) -> None:\n        super().__init__(message or 'This command cannot be used in private messages.')\n\n\nclass NotOwner(CheckFailure):\n    \"\"\"Exception raised when the message author is not the owner of the bot.\n\n    This inherits from :exc:`CheckFailure`\n    \"\"\"\n\n    pass\n\n\nclass ObjectNotFound(BadArgument):\n    \"\"\"Exception raised when the argument provided did not match the format\n    of an ID or a mention.\n\n    This inherits from :exc:`BadArgument`\n\n    .. versionadded:: 2.0\n\n    Attributes\n    -----------\n    argument: :class:`str`\n        The argument supplied by the caller that was not matched\n    \"\"\"\n\n    def __init__(self, argument: str) -> None:\n        self.argument: str = argument\n        super().__init__(f'{argument!r} does not follow a valid ID or mention format.')\n\n\nclass MemberNotFound(BadArgument):\n    \"\"\"Exception raised when the member provided was not found in the bot's\n    cache.\n\n    This inherits from :exc:`BadArgument`\n\n    .. versionadded:: 1.5\n\n    Attributes\n    -----------\n    argument: :class:`str`\n        The member supplied by the caller that was not found\n    \"\"\"\n\n    def __init__(self, argument: str) -> None:\n        self.argument: str = argument\n        super().__init__(f'Member \"{argument}\" not found.')\n\n\nclass GuildNotFound(BadArgument):\n    \"\"\"Exception raised when the guild provided was not found in the bot's cache.\n\n    This inherits from :exc:`BadArgument`\n\n    .. versionadded:: 1.7\n\n    Attributes\n    -----------\n    argument: :class:`str`\n        The guild supplied by the called that was not found\n    \"\"\"\n\n    def __init__(self, argument: str) -> None:\n        self.argument: str = argument\n        super().__init__(f'Guild \"{argument}\" not found.')\n\n\nclass UserNotFound(BadArgument):\n    \"\"\"Exception raised when the user provided was not found in the bot's\n    cache.\n\n    This inherits from :exc:`BadArgument`\n\n    .. versionadded:: 1.5\n\n    Attributes\n    -----------\n    argument: :class:`str`\n        The user supplied by the caller that was not found\n    \"\"\"\n\n    def __init__(self, argument: str) -> None:\n        self.argument: str = argument\n        super().__init__(f'User \"{argument}\" not found.')\n\n\nclass MessageNotFound(BadArgument):\n    \"\"\"Exception raised when the message provided was not found in the channel.\n\n    This inherits from :exc:`BadArgument`\n\n    .. versionadded:: 1.5\n\n    Attributes\n    -----------\n    argument: :class:`str`\n        The message supplied by the caller that was not found\n    \"\"\"\n\n    def __init__(self, argument: str) -> None:\n        self.argument: str = argument\n        super().__init__(f'Message \"{argument}\" not found.')\n\n\nclass ChannelNotReadable(BadArgument):\n    \"\"\"Exception raised when the bot does not have permission to read messages\n    in the channel.\n\n    This inherits from :exc:`BadArgument`\n\n    .. versionadded:: 1.5\n\n    Attributes\n    -----------\n    argument: Union[:class:`.abc.GuildChannel`, :class:`.Thread`]\n        The channel supplied by the caller that was not readable\n    \"\"\"\n\n    def __init__(self, argument: Union[GuildChannel, Thread]) -> None:\n        self.argument: Union[GuildChannel, Thread] = argument\n        super().__init__(f\"Can't read messages in {argument.mention}.\")\n\n\nclass ChannelNotFound(BadArgument):\n    \"\"\"Exception raised when the bot can not find the channel.\n\n    This inherits from :exc:`BadArgument`\n\n    .. versionadded:: 1.5\n\n    Attributes\n    -----------\n    argument: Union[:class:`int`, :class:`str`]\n        The channel supplied by the caller that was not found\n    \"\"\"\n\n    def __init__(self, argument: Union[int, str]) -> None:\n        self.argument: Union[int, str] = argument\n        super().__init__(f'Channel \"{argument}\" not found.')\n\n\nclass ThreadNotFound(BadArgument):\n    \"\"\"Exception raised when the bot can not find the thread.\n\n    This inherits from :exc:`BadArgument`\n\n    .. versionadded:: 2.0\n\n    Attributes\n    -----------\n    argument: :class:`str`\n        The thread supplied by the caller that was not found\n    \"\"\"\n\n    def __init__(self, argument: str) -> None:\n        self.argument: str = argument\n        super().__init__(f'Thread \"{argument}\" not found.')\n\n\nclass BadColourArgument(BadArgument):\n    \"\"\"Exception raised when the colour is not valid.\n\n    This inherits from :exc:`BadArgument`\n\n    .. versionadded:: 1.5\n\n    Attributes\n    -----------\n    argument: :class:`str`\n        The colour supplied by the caller that was not valid\n    \"\"\"\n\n    def __init__(self, argument: str) -> None:\n        self.argument: str = argument\n        super().__init__(f'Colour \"{argument}\" is invalid.')\n\n\nBadColorArgument = BadColourArgument\n\n\nclass RoleNotFound(BadArgument):\n    \"\"\"Exception raised when the bot can not find the role.\n\n    This inherits from :exc:`BadArgument`\n\n    .. versionadded:: 1.5\n\n    Attributes\n    -----------\n    argument: :class:`str`\n        The role supplied by the caller that was not found\n    \"\"\"\n\n    def __init__(self, argument: str) -> None:\n        self.argument: str = argument\n        super().__init__(f'Role \"{argument}\" not found.')\n\n\nclass BadInviteArgument(BadArgument):\n    \"\"\"Exception raised when the invite is invalid or expired.\n\n    This inherits from :exc:`BadArgument`\n\n    .. versionadded:: 1.5\n\n    Attributes\n    -----------\n    argument: :class:`str`\n        The invite supplied by the caller that was not valid\n    \"\"\"\n\n    def __init__(self, argument: str) -> None:\n        self.argument: str = argument\n        super().__init__(f'Invite \"{argument}\" is invalid or expired.')\n\n\nclass EmojiNotFound(BadArgument):\n    \"\"\"Exception raised when the bot can not find the emoji.\n\n    This inherits from :exc:`BadArgument`\n\n    .. versionadded:: 1.5\n\n    Attributes\n    -----------\n    argument: :class:`str`\n        The emoji supplied by the caller that was not found\n    \"\"\"\n\n    def __init__(self, argument: str) -> None:\n        self.argument: str = argument\n        super().__init__(f'Emoji \"{argument}\" not found.')\n\n\nclass PartialEmojiConversionFailure(BadArgument):\n    \"\"\"Exception raised when the emoji provided does not match the correct\n    format.\n\n    This inherits from :exc:`BadArgument`\n\n    .. versionadded:: 1.5\n\n    Attributes\n    -----------\n    argument: :class:`str`\n        The emoji supplied by the caller that did not match the regex\n    \"\"\"\n\n    def __init__(self, argument: str) -> None:\n        self.argument: str = argument\n        super().__init__(f'Couldn\\'t convert \"{argument}\" to PartialEmoji.')\n\n\nclass GuildStickerNotFound(BadArgument):\n    \"\"\"Exception raised when the bot can not find the sticker.\n\n    This inherits from :exc:`BadArgument`\n\n    .. versionadded:: 2.0\n\n    Attributes\n    -----------\n    argument: :class:`str`\n        The sticker supplied by the caller that was not found\n    \"\"\"\n\n    def __init__(self, argument: str) -> None:\n        self.argument: str = argument\n        super().__init__(f'Sticker \"{argument}\" not found.')\n\n\nclass ScheduledEventNotFound(BadArgument):\n    \"\"\"Exception raised when the bot can not find the scheduled event.\n\n    This inherits from :exc:`BadArgument`\n\n    .. versionadded:: 2.0\n\n    Attributes\n    -----------\n    argument: :class:`str`\n        The event supplied by the caller that was not found\n    \"\"\"\n\n    def __init__(self, argument: str) -> None:\n        self.argument: str = argument\n        super().__init__(f'ScheduledEvent \"{argument}\" not found.')\n\n\nclass BadBoolArgument(BadArgument):\n    \"\"\"Exception raised when a boolean argument was not convertable.\n\n    This inherits from :exc:`BadArgument`\n\n    .. versionadded:: 1.5\n\n    Attributes\n    -----------\n    argument: :class:`str`\n        The boolean argument supplied by the caller that is not in the predefined list\n    \"\"\"\n\n    def __init__(self, argument: str) -> None:\n        self.argument: str = argument\n        super().__init__(f'{argument} is not a recognised boolean option')\n\n\nclass RangeError(BadArgument):\n    \"\"\"Exception raised when an argument is out of range.\n\n    This inherits from :exc:`BadArgument`\n\n    .. versionadded:: 2.0\n\n    Attributes\n    -----------\n    minimum: Optional[Union[:class:`int`, :class:`float`]]\n        The minimum value expected or ``None`` if there wasn't one\n    maximum: Optional[Union[:class:`int`, :class:`float`]]\n        The maximum value expected or ``None`` if there wasn't one\n    value: Union[:class:`int`, :class:`float`, :class:`str`]\n        The value that was out of range.\n    \"\"\"\n\n    def __init__(\n        self,\n        value: Union[int, float, str],\n        minimum: Optional[Union[int, float]],\n        maximum: Optional[Union[int, float]],\n    ) -> None:\n        self.value: Union[int, float, str] = value\n        self.minimum: Optional[Union[int, float]] = minimum\n        self.maximum: Optional[Union[int, float]] = maximum\n\n        label: str = ''\n        if minimum is None and maximum is not None:\n            label = f'no more than {maximum}'\n        elif minimum is not None and maximum is None:\n            label = f'no less than {minimum}'\n        elif maximum is not None and minimum is not None:\n            label = f'between {minimum} and {maximum}'\n\n        if label and isinstance(value, str):\n            label += ' characters'\n            count = len(value)\n            if count == 1:\n                value = '1 character'\n            else:\n                value = f'{count} characters'\n\n        super().__init__(f'value must be {label} but received {value}')\n\n\nclass DisabledCommand(CommandError):\n    \"\"\"Exception raised when the command being invoked is disabled.\n\n    This inherits from :exc:`CommandError`\n    \"\"\"\n\n    pass\n\n\nclass CommandInvokeError(CommandError):\n    \"\"\"Exception raised when the command being invoked raised an exception.\n\n    This inherits from :exc:`CommandError`\n\n    Attributes\n    -----------\n    original: :exc:`Exception`\n        The original exception that was raised. You can also get this via\n        the ``__cause__`` attribute.\n    \"\"\"\n\n    def __init__(self, e: Exception) -> None:\n        self.original: Exception = e\n        super().__init__(f'Command raised an exception: {e.__class__.__name__}: {e}')\n\n\nclass CommandOnCooldown(CommandError):\n    \"\"\"Exception raised when the command being invoked is on cooldown.\n\n    This inherits from :exc:`CommandError`\n\n    Attributes\n    -----------\n    cooldown: :class:`~discord.app_commands.Cooldown`\n        A class with attributes ``rate`` and ``per`` similar to the\n        :func:`.cooldown` decorator.\n    type: :class:`BucketType`\n        The type associated with the cooldown.\n    retry_after: :class:`float`\n        The amount of seconds to wait before you can retry again.\n    \"\"\"\n\n    def __init__(self, cooldown: Cooldown, retry_after: float, type: BucketType) -> None:\n        self.cooldown: Cooldown = cooldown\n        self.retry_after: float = retry_after\n        self.type: BucketType = type\n        super().__init__(f'You are on cooldown. Try again in {retry_after:.2f}s')\n\n\nclass MaxConcurrencyReached(CommandError):\n    \"\"\"Exception raised when the command being invoked has reached its maximum concurrency.\n\n    This inherits from :exc:`CommandError`.\n\n    Attributes\n    ------------\n    number: :class:`int`\n        The maximum number of concurrent invokers allowed.\n    per: :class:`.BucketType`\n        The bucket type passed to the :func:`.max_concurrency` decorator.\n    \"\"\"\n\n    def __init__(self, number: int, per: BucketType) -> None:\n        self.number: int = number\n        self.per: BucketType = per\n        name = per.name\n        suffix = 'per %s' % name if per.name != 'default' else 'globally'\n        plural = '%s times %s' if number > 1 else '%s time %s'\n        fmt = plural % (number, suffix)\n        super().__init__(f'Too many people are using this command. It can only be used {fmt} concurrently.')\n\n\nclass MissingRole(CheckFailure):\n    \"\"\"Exception raised when the command invoker lacks a role to run a command.\n\n    This inherits from :exc:`CheckFailure`\n\n    .. versionadded:: 1.1\n\n    Attributes\n    -----------\n    missing_role: Union[:class:`str`, :class:`int`]\n        The required role that is missing.\n        This is the parameter passed to :func:`~.commands.has_role`.\n    \"\"\"\n\n    def __init__(self, missing_role: Snowflake) -> None:\n        self.missing_role: Snowflake = missing_role\n        message = f'Role {missing_role!r} is required to run this command.'\n        super().__init__(message)\n\n\nclass BotMissingRole(CheckFailure):\n    \"\"\"Exception raised when the bot's member lacks a role to run a command.\n\n    This inherits from :exc:`CheckFailure`\n\n    .. versionadded:: 1.1\n\n    Attributes\n    -----------\n    missing_role: Union[:class:`str`, :class:`int`]\n        The required role that is missing.\n        This is the parameter passed to :func:`~.commands.has_role`.\n    \"\"\"\n\n    def __init__(self, missing_role: Snowflake) -> None:\n        self.missing_role: Snowflake = missing_role\n        message = f'Bot requires the role {missing_role!r} to run this command'\n        super().__init__(message)\n\n\nclass MissingAnyRole(CheckFailure):\n    \"\"\"Exception raised when the command invoker lacks any of\n    the roles specified to run a command.\n\n    This inherits from :exc:`CheckFailure`\n\n    .. versionadded:: 1.1\n\n    Attributes\n    -----------\n    missing_roles: List[Union[:class:`str`, :class:`int`]]\n        The roles that the invoker is missing.\n        These are the parameters passed to :func:`~.commands.has_any_role`.\n    \"\"\"\n\n    def __init__(self, missing_roles: SnowflakeList) -> None:\n        self.missing_roles: SnowflakeList = missing_roles\n\n        missing = [f\"'{role}'\" for role in missing_roles]\n        fmt = _human_join(missing)\n        message = f'You are missing at least one of the required roles: {fmt}'\n        super().__init__(message)\n\n\nclass BotMissingAnyRole(CheckFailure):\n    \"\"\"Exception raised when the bot's member lacks any of\n    the roles specified to run a command.\n\n    This inherits from :exc:`CheckFailure`\n\n    .. versionadded:: 1.1\n\n    Attributes\n    -----------\n    missing_roles: List[Union[:class:`str`, :class:`int`]]\n        The roles that the bot's member is missing.\n        These are the parameters passed to :func:`~.commands.has_any_role`.\n\n    \"\"\"\n\n    def __init__(self, missing_roles: SnowflakeList) -> None:\n        self.missing_roles: SnowflakeList = missing_roles\n\n        missing = [f\"'{role}'\" for role in missing_roles]\n        fmt = _human_join(missing)\n        message = f'Bot is missing at least one of the required roles: {fmt}'\n        super().__init__(message)\n\n\nclass NSFWChannelRequired(CheckFailure):\n    \"\"\"Exception raised when a channel does not have the required NSFW setting.\n\n    This inherits from :exc:`CheckFailure`.\n\n    .. versionadded:: 1.1\n\n    Attributes\n    -----------\n    channel: Union[:class:`.abc.GuildChannel`, :class:`.Thread`]\n        The channel that does not have NSFW enabled.\n    \"\"\"\n\n    def __init__(self, channel: Union[GuildChannel, Thread]) -> None:\n        self.channel: Union[GuildChannel, Thread] = channel\n        super().__init__(f\"Channel '{channel}' needs to be NSFW for this command to work.\")\n\n\nclass MissingPermissions(CheckFailure):\n    \"\"\"Exception raised when the command invoker lacks permissions to run a\n    command.\n\n    This inherits from :exc:`CheckFailure`\n\n    Attributes\n    -----------\n    missing_permissions: List[:class:`str`]\n        The required permissions that are missing.\n    \"\"\"\n\n    def __init__(self, missing_permissions: List[str], *args: Any) -> None:\n        self.missing_permissions: List[str] = missing_permissions\n\n        missing = [perm.replace('_', ' ').replace('guild', 'server').title() for perm in missing_permissions]\n        fmt = _human_join(missing, final='and')\n        message = f'You are missing {fmt} permission(s) to run this command.'\n        super().__init__(message, *args)\n\n\nclass BotMissingPermissions(CheckFailure):\n    \"\"\"Exception raised when the bot's member lacks permissions to run a\n    command.\n\n    This inherits from :exc:`CheckFailure`\n\n    Attributes\n    -----------\n    missing_permissions: List[:class:`str`]\n        The required permissions that are missing.\n    \"\"\"\n\n    def __init__(self, missing_permissions: List[str], *args: Any) -> None:\n        self.missing_permissions: List[str] = missing_permissions\n\n        missing = [perm.replace('_', ' ').replace('guild', 'server').title() for perm in missing_permissions]\n        fmt = _human_join(missing, final='and')\n        message = f'Bot requires {fmt} permission(s) to run this command.'\n        super().__init__(message, *args)\n\n\nclass BadUnionArgument(UserInputError):\n    \"\"\"Exception raised when a :data:`typing.Union` converter fails for all\n    its associated types.\n\n    This inherits from :exc:`UserInputError`\n\n    Attributes\n    -----------\n    param: :class:`inspect.Parameter`\n        The parameter that failed being converted.\n    converters: Tuple[Type, ``...``]\n        A tuple of converters attempted in conversion, in order of failure.\n    errors: List[:class:`CommandError`]\n        A list of errors that were caught from failing the conversion.\n    \"\"\"\n\n    def __init__(self, param: Parameter, converters: Tuple[type, ...], errors: List[CommandError]) -> None:\n        self.param: Parameter = param\n        self.converters: Tuple[type, ...] = converters\n        self.errors: List[CommandError] = errors\n\n        def _get_name(x):\n            try:\n                return x.__name__\n            except AttributeError:\n                if hasattr(x, '__origin__'):\n                    return repr(x)\n                return x.__class__.__name__\n\n        to_string = [_get_name(x) for x in converters]\n        fmt = _human_join(to_string)\n        super().__init__(f'Could not convert \"{param.displayed_name or param.name}\" into {fmt}.')\n\n\nclass BadLiteralArgument(UserInputError):\n    \"\"\"Exception raised when a :data:`typing.Literal` converter fails for all\n    its associated values.\n\n    This inherits from :exc:`UserInputError`\n\n    .. versionadded:: 2.0\n\n    Attributes\n    -----------\n    param: :class:`inspect.Parameter`\n        The parameter that failed being converted.\n    literals: Tuple[Any, ``...``]\n        A tuple of values compared against in conversion, in order of failure.\n    errors: List[:class:`CommandError`]\n        A list of errors that were caught from failing the conversion.\n    argument: :class:`str`\n        The argument's value that failed to be converted. Defaults to an empty string.\n\n        .. versionadded:: 2.3\n    \"\"\"\n\n    def __init__(self, param: Parameter, literals: Tuple[Any, ...], errors: List[CommandError], argument: str = \"\") -> None:\n        self.param: Parameter = param\n        self.literals: Tuple[Any, ...] = literals\n        self.errors: List[CommandError] = errors\n        self.argument: str = argument\n\n        to_string = [repr(l) for l in literals]\n        fmt = _human_join(to_string)\n        super().__init__(f'Could not convert \"{param.displayed_name or param.name}\" into the literal {fmt}.')\n\n\nclass ArgumentParsingError(UserInputError):\n    \"\"\"An exception raised when the parser fails to parse a user's input.\n\n    This inherits from :exc:`UserInputError`.\n\n    There are child classes that implement more granular parsing errors for\n    i18n purposes.\n    \"\"\"\n\n    pass\n\n\nclass UnexpectedQuoteError(ArgumentParsingError):\n    \"\"\"An exception raised when the parser encounters a quote mark inside a non-quoted string.\n\n    This inherits from :exc:`ArgumentParsingError`.\n\n    Attributes\n    ------------\n    quote: :class:`str`\n        The quote mark that was found inside the non-quoted string.\n    \"\"\"\n\n    def __init__(self, quote: str) -> None:\n        self.quote: str = quote\n        super().__init__(f'Unexpected quote mark, {quote!r}, in non-quoted string')\n\n\nclass InvalidEndOfQuotedStringError(ArgumentParsingError):\n    \"\"\"An exception raised when a space is expected after the closing quote in a string\n    but a different character is found.\n\n    This inherits from :exc:`ArgumentParsingError`.\n\n    Attributes\n    -----------\n    char: :class:`str`\n        The character found instead of the expected string.\n    \"\"\"\n\n    def __init__(self, char: str) -> None:\n        self.char: str = char\n        super().__init__(f'Expected space after closing quotation but received {char!r}')\n\n\nclass ExpectedClosingQuoteError(ArgumentParsingError):\n    \"\"\"An exception raised when a quote character is expected but not found.\n\n    This inherits from :exc:`ArgumentParsingError`.\n\n    Attributes\n    -----------\n    close_quote: :class:`str`\n        The quote character expected.\n    \"\"\"\n\n    def __init__(self, close_quote: str) -> None:\n        self.close_quote: str = close_quote\n        super().__init__(f'Expected closing {close_quote}.')\n\n\nclass ExtensionError(DiscordException):\n    \"\"\"Base exception for extension related errors.\n\n    This inherits from :exc:`~discord.DiscordException`.\n\n    Attributes\n    ------------\n    name: :class:`str`\n        The extension that had an error.\n    \"\"\"\n\n    def __init__(self, message: Optional[str] = None, *args: Any, name: str) -> None:\n        self.name: str = name\n        message = message or f'Extension {name!r} had an error.'\n        # clean-up @everyone and @here mentions\n        m = message.replace('@everyone', '@\\u200beveryone').replace('@here', '@\\u200bhere')\n        super().__init__(m, *args)\n\n\nclass ExtensionAlreadyLoaded(ExtensionError):\n    \"\"\"An exception raised when an extension has already been loaded.\n\n    This inherits from :exc:`ExtensionError`\n    \"\"\"\n\n    def __init__(self, name: str) -> None:\n        super().__init__(f'Extension {name!r} is already loaded.', name=name)\n\n\nclass ExtensionNotLoaded(ExtensionError):\n    \"\"\"An exception raised when an extension was not loaded.\n\n    This inherits from :exc:`ExtensionError`\n    \"\"\"\n\n    def __init__(self, name: str) -> None:\n        super().__init__(f'Extension {name!r} has not been loaded.', name=name)\n\n\nclass NoEntryPointError(ExtensionError):\n    \"\"\"An exception raised when an extension does not have a ``setup`` entry point function.\n\n    This inherits from :exc:`ExtensionError`\n    \"\"\"\n\n    def __init__(self, name: str) -> None:\n        super().__init__(f\"Extension {name!r} has no 'setup' function.\", name=name)\n\n\nclass ExtensionFailed(ExtensionError):\n    \"\"\"An exception raised when an extension failed to load during execution of the module or ``setup`` entry point.\n\n    This inherits from :exc:`ExtensionError`\n\n    Attributes\n    -----------\n    name: :class:`str`\n        The extension that had the error.\n    original: :exc:`Exception`\n        The original exception that was raised. You can also get this via\n        the ``__cause__`` attribute.\n    \"\"\"\n\n    def __init__(self, name: str, original: Exception) -> None:\n        self.original: Exception = original\n        msg = f'Extension {name!r} raised an error: {original.__class__.__name__}: {original}'\n        super().__init__(msg, name=name)\n\n\nclass ExtensionNotFound(ExtensionError):\n    \"\"\"An exception raised when an extension is not found.\n\n    This inherits from :exc:`ExtensionError`\n\n    .. versionchanged:: 1.3\n        Made the ``original`` attribute always None.\n\n    Attributes\n    -----------\n    name: :class:`str`\n        The extension that had the error.\n    \"\"\"\n\n    def __init__(self, name: str) -> None:\n        msg = f'Extension {name!r} could not be loaded.'\n        super().__init__(msg, name=name)\n\n\nclass CommandRegistrationError(ClientException):\n    \"\"\"An exception raised when the command can't be added\n    because the name is already taken by a different command.\n\n    This inherits from :exc:`discord.ClientException`\n\n    .. versionadded:: 1.4\n\n    Attributes\n    ----------\n    name: :class:`str`\n        The command name that had the error.\n    alias_conflict: :class:`bool`\n        Whether the name that conflicts is an alias of the command we try to add.\n    \"\"\"\n\n    def __init__(self, name: str, *, alias_conflict: bool = False) -> None:\n        self.name: str = name\n        self.alias_conflict: bool = alias_conflict\n        type_ = 'alias' if alias_conflict else 'command'\n        super().__init__(f'The {type_} {name} is already an existing command or alias.')\n\n\nclass FlagError(BadArgument):\n    \"\"\"The base exception type for all flag parsing related errors.\n\n    This inherits from :exc:`BadArgument`.\n\n    .. versionadded:: 2.0\n    \"\"\"\n\n    pass\n\n\nclass TooManyFlags(FlagError):\n    \"\"\"An exception raised when a flag has received too many values.\n\n    This inherits from :exc:`FlagError`.\n\n    .. versionadded:: 2.0\n\n    Attributes\n    ------------\n    flag: :class:`~discord.ext.commands.Flag`\n        The flag that received too many values.\n    values: List[:class:`str`]\n        The values that were passed.\n    \"\"\"\n\n    def __init__(self, flag: Flag, values: List[str]) -> None:\n        self.flag: Flag = flag\n        self.values: List[str] = values\n        super().__init__(f'Too many flag values, expected {flag.max_args} but received {len(values)}.')\n\n\nclass BadFlagArgument(FlagError):\n    \"\"\"An exception raised when a flag failed to convert a value.\n\n    This inherits from :exc:`FlagError`\n\n    .. versionadded:: 2.0\n\n    Attributes\n    -----------\n    flag: :class:`~discord.ext.commands.Flag`\n        The flag that failed to convert.\n    argument: :class:`str`\n        The argument supplied by the caller that was not able to be converted.\n    original: :class:`Exception`\n        The original exception that was raised. You can also get this via\n        the ``__cause__`` attribute.\n    \"\"\"\n\n    def __init__(self, flag: Flag, argument: str, original: Exception) -> None:\n        self.flag: Flag = flag\n        try:\n            name = flag.annotation.__name__\n        except AttributeError:\n            name = flag.annotation.__class__.__name__\n\n        self.argument: str = argument\n        self.original: Exception = original\n\n        super().__init__(f'Could not convert to {name!r} for flag {flag.name!r}')\n\n\nclass MissingRequiredFlag(FlagError):\n    \"\"\"An exception raised when a required flag was not given.\n\n    This inherits from :exc:`FlagError`\n\n    .. versionadded:: 2.0\n\n    Attributes\n    -----------\n    flag: :class:`~discord.ext.commands.Flag`\n        The required flag that was not found.\n    \"\"\"\n\n    def __init__(self, flag: Flag) -> None:\n        self.flag: Flag = flag\n        super().__init__(f'Flag {flag.name!r} is required and missing')\n\n\nclass MissingFlagArgument(FlagError):\n    \"\"\"An exception raised when a flag did not get a value.\n\n    This inherits from :exc:`FlagError`\n\n    .. versionadded:: 2.0\n\n    Attributes\n    -----------\n    flag: :class:`~discord.ext.commands.Flag`\n        The flag that did not get a value.\n    \"\"\"\n\n    def __init__(self, flag: Flag) -> None:\n        self.flag: Flag = flag\n        super().__init__(f'Flag {flag.name!r} does not have an argument')\n\n\nclass HybridCommandError(CommandError):\n    \"\"\"An exception raised when a :class:`~discord.ext.commands.HybridCommand` raises\n    an :exc:`~discord.app_commands.AppCommandError` derived exception that could not be\n    sufficiently converted to an equivalent :exc:`CommandError` exception.\n\n    .. versionadded:: 2.0\n\n    Attributes\n    -----------\n    original: :exc:`~discord.app_commands.AppCommandError`\n        The original exception that was raised. You can also get this via\n        the ``__cause__`` attribute.\n    \"\"\"\n\n    def __init__(self, original: AppCommandError) -> None:\n        self.original: AppCommandError = original\n        super().__init__(f'Hybrid command raised an error: {original}')\n"
  },
  {
    "path": "discord/ext/commands/flags.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom __future__ import annotations\n\nimport inspect\nimport re\nimport sys\nfrom dataclasses import dataclass, field\nfrom typing import TYPE_CHECKING, Any, Dict, Iterator, List, Literal, Optional, Pattern, Set, Tuple, Type, Union\n\nfrom discord.utils import MISSING, maybe_coroutine, resolve_annotation\n\nfrom .converter import run_converters\nfrom .errors import BadFlagArgument, MissingFlagArgument, MissingRequiredFlag, TooManyFlags, TooManyArguments\nfrom .view import StringView\n\n__all__ = (\n    'Flag',\n    'flag',\n    'FlagConverter',\n)\n\n\nif TYPE_CHECKING:\n    from typing_extensions import Self, TypeGuard\n\n    from ._types import BotT\n    from .context import Context\n    from .parameters import Parameter\n\n\n@dataclass\nclass Flag:\n    \"\"\"Represents a flag parameter for :class:`FlagConverter`.\n\n    The :func:`~discord.ext.commands.flag` function helps\n    create these flag objects, but it is not necessary to\n    do so. These cannot be constructed manually.\n\n    Attributes\n    ------------\n    name: :class:`str`\n        The name of the flag.\n    aliases: List[:class:`str`]\n        The aliases of the flag name.\n    attribute: :class:`str`\n        The attribute in the class that corresponds to this flag.\n    default: Any\n        The default value of the flag, if available.\n    annotation: Any\n        The underlying evaluated annotation of the flag.\n    max_args: :class:`int`\n        The maximum number of arguments the flag can accept.\n        A negative value indicates an unlimited amount of arguments.\n    override: :class:`bool`\n        Whether multiple given values overrides the previous value.\n    description: :class:`str`\n        The description of the flag. Shown for hybrid commands when they're\n        used as application commands.\n    positional: :class:`bool`\n        Whether the flag is positional or not. There can only be one positional flag.\n\n        .. versionadded:: 2.4\n    \"\"\"\n\n    name: str = MISSING\n    aliases: List[str] = field(default_factory=list)\n    attribute: str = MISSING\n    annotation: Any = MISSING\n    default: Any = MISSING\n    max_args: int = MISSING\n    override: bool = MISSING\n    description: str = MISSING\n    positional: bool = MISSING\n    cast_to_dict: bool = False\n\n    @property\n    def required(self) -> bool:\n        \"\"\":class:`bool`: Whether the flag is required.\n\n        A required flag has no default value.\n        \"\"\"\n        return self.default is MISSING\n\n\ndef flag(\n    *,\n    name: str = MISSING,\n    aliases: List[str] = MISSING,\n    default: Any = MISSING,\n    max_args: int = MISSING,\n    override: bool = MISSING,\n    converter: Any = MISSING,\n    description: str = MISSING,\n    positional: bool = MISSING,\n) -> Any:\n    \"\"\"Override default functionality and parameters of the underlying :class:`FlagConverter`\n    class attributes.\n\n    Parameters\n    ------------\n    name: :class:`str`\n        The flag name. If not given, defaults to the attribute name.\n    aliases: List[:class:`str`]\n        Aliases to the flag name. If not given no aliases are set.\n    default: Any\n        The default parameter. This could be either a value or a callable that takes\n        :class:`Context` as its sole parameter. If not given then it defaults to\n        the default value given to the attribute.\n    max_args: :class:`int`\n        The maximum number of arguments the flag can accept.\n        A negative value indicates an unlimited amount of arguments.\n        The default value depends on the annotation given.\n    override: :class:`bool`\n        Whether multiple given values overrides the previous value. The default\n        value depends on the annotation given.\n    converter: Any\n        The converter to use for this flag. This replaces the annotation at\n        runtime which is transparent to type checkers.\n    description: :class:`str`\n        The description of the flag. Shown for hybrid commands when they're\n        used as application commands.\n    positional: :class:`bool`\n        Whether the flag is positional or not. There can only be one positional flag.\n\n        .. versionadded:: 2.4\n    \"\"\"\n    return Flag(\n        name=name,\n        aliases=aliases,\n        default=default,\n        max_args=max_args,\n        override=override,\n        annotation=converter,\n        description=description,\n        positional=positional,\n    )\n\n\ndef is_flag(obj: Any) -> TypeGuard[Type[FlagConverter]]:\n    return hasattr(obj, '__commands_is_flag__')\n\n\ndef validate_flag_name(name: str, forbidden: Set[str]) -> None:\n    if not name:\n        raise ValueError('flag names should not be empty')\n\n    for ch in name:\n        if ch.isspace():\n            raise ValueError(f'flag name {name!r} cannot have spaces')\n        if ch == '\\\\':\n            raise ValueError(f'flag name {name!r} cannot have backslashes')\n        if ch in forbidden:\n            raise ValueError(f'flag name {name!r} cannot have any of {forbidden!r} within them')\n\n\ndef get_flags(namespace: Dict[str, Any], globals: Dict[str, Any], locals: Dict[str, Any]) -> Dict[str, Flag]:\n    annotations = namespace.get('__annotations__', {})\n    case_insensitive = namespace['__commands_flag_case_insensitive__']\n    flags: Dict[str, Flag] = {}\n    cache: Dict[str, Any] = {}\n    names: Set[str] = set()\n    positional: Optional[Flag] = None\n    for name, annotation in annotations.items():\n        flag = namespace.pop(name, MISSING)\n        if isinstance(flag, Flag):\n            if flag.annotation is MISSING:\n                flag.annotation = annotation\n        else:\n            flag = Flag(name=name, annotation=annotation, default=flag)\n\n        flag.attribute = name\n        if flag.name is MISSING:\n            flag.name = name\n\n        if flag.positional:\n            if positional is not None:\n                raise TypeError(f\"{flag.name!r} positional flag conflicts with {positional.name!r} flag.\")\n            positional = flag\n\n        annotation = flag.annotation = resolve_annotation(flag.annotation, globals, locals, cache)\n\n        if flag.default is MISSING and hasattr(annotation, '__commands_is_flag__') and annotation._can_be_constructible():\n            flag.default = annotation._construct_default\n\n        if flag.aliases is MISSING:\n            flag.aliases = []\n\n        # Add sensible defaults based off of the type annotation\n        # <type> -> (max_args=1)\n        # List[str] -> (max_args=-1)\n        # Tuple[int, ...] -> (max_args=1)\n        # Dict[K, V] -> (max_args=-1, override=True)\n        # Union[str, int] -> (max_args=1)\n        # Optional[str] -> (default=None, max_args=1)\n\n        try:\n            origin = annotation.__origin__\n        except AttributeError:\n            # A regular type hint\n            if flag.max_args is MISSING:\n                flag.max_args = 1\n        else:\n            if origin is Union:\n                # typing.Union\n                if flag.max_args is MISSING:\n                    flag.max_args = 1\n                if annotation.__args__[-1] is type(None) and flag.default is MISSING:\n                    # typing.Optional\n                    flag.default = None\n            elif origin is tuple:\n                # typing.Tuple\n                # tuple parsing is e.g. `flag: peter 20`\n                # for Tuple[str, int] would give you flag: ('peter', 20)\n                if flag.max_args is MISSING:\n                    flag.max_args = 1\n            elif origin is list:\n                # typing.List\n                if flag.max_args is MISSING:\n                    flag.max_args = -1\n            elif origin is dict:\n                # typing.Dict[K, V]\n                # Equivalent to:\n                # typing.List[typing.Tuple[K, V]]\n                flag.cast_to_dict = True\n                if flag.max_args is MISSING:\n                    flag.max_args = -1\n                if flag.override is MISSING:\n                    flag.override = True\n            elif origin is Literal:\n                if flag.max_args is MISSING:\n                    flag.max_args = 1\n            else:\n                raise TypeError(f'Unsupported typing annotation {annotation!r} for {flag.name!r} flag')\n\n        if flag.override is MISSING:\n            flag.override = False\n\n        # Validate flag names are unique\n        name = flag.name.casefold() if case_insensitive else flag.name\n        if name in names:\n            raise TypeError(f'{flag.name!r} flag conflicts with previous flag or alias.')\n        else:\n            names.add(name)\n\n        for alias in flag.aliases:\n            # Validate alias is unique\n            alias = alias.casefold() if case_insensitive else alias\n            if alias in names:\n                raise TypeError(f'{flag.name!r} flag alias {alias!r} conflicts with previous flag or alias.')\n            else:\n                names.add(alias)\n\n        flags[flag.name] = flag\n\n    return flags\n\n\nclass FlagsMeta(type):\n    if TYPE_CHECKING:\n        __commands_is_flag__: bool\n        __commands_flags__: Dict[str, Flag]\n        __commands_flag_aliases__: Dict[str, str]\n        __commands_flag_regex__: Pattern[str]\n        __commands_flag_case_insensitive__: bool\n        __commands_flag_delimiter__: str\n        __commands_flag_prefix__: str\n        __commands_flag_positional__: Optional[Flag]\n\n    def __new__(\n        cls,\n        name: str,\n        bases: Tuple[type, ...],\n        attrs: Dict[str, Any],\n        *,\n        case_insensitive: bool = MISSING,\n        delimiter: str = MISSING,\n        prefix: str = MISSING,\n    ) -> FlagsMeta:\n        attrs['__commands_is_flag__'] = True\n\n        try:\n            global_ns = sys.modules[attrs['__module__']].__dict__\n        except KeyError:\n            global_ns = {}\n\n        frame = inspect.currentframe()\n        try:\n            if frame is None:\n                local_ns = {}\n            else:\n                if frame.f_back is None:\n                    local_ns = frame.f_locals\n                else:\n                    local_ns = frame.f_back.f_locals\n        finally:\n            del frame\n\n        flags: Dict[str, Flag] = {}\n        aliases: Dict[str, str] = {}\n        for base in reversed(bases):\n            if base.__dict__.get('__commands_is_flag__', False):\n                flags.update(base.__dict__['__commands_flags__'])\n                aliases.update(base.__dict__['__commands_flag_aliases__'])\n                if case_insensitive is MISSING:\n                    attrs['__commands_flag_case_insensitive__'] = base.__dict__['__commands_flag_case_insensitive__']\n                if delimiter is MISSING:\n                    attrs['__commands_flag_delimiter__'] = base.__dict__['__commands_flag_delimiter__']\n                if prefix is MISSING:\n                    attrs['__commands_flag_prefix__'] = base.__dict__['__commands_flag_prefix__']\n\n        if case_insensitive is not MISSING:\n            attrs['__commands_flag_case_insensitive__'] = case_insensitive\n        if delimiter is not MISSING:\n            attrs['__commands_flag_delimiter__'] = delimiter\n        if prefix is not MISSING:\n            attrs['__commands_flag_prefix__'] = prefix\n\n        case_insensitive = attrs.setdefault('__commands_flag_case_insensitive__', False)\n        delimiter = attrs.setdefault('__commands_flag_delimiter__', ':')\n        prefix = attrs.setdefault('__commands_flag_prefix__', '')\n\n        positional: Optional[Flag] = None\n        for flag_name, flag in get_flags(attrs, global_ns, local_ns).items():\n            flags[flag_name] = flag\n            aliases.update({alias_name: flag_name for alias_name in flag.aliases})\n            if flag.positional:\n                positional = flag\n        attrs['__commands_flag_positional__'] = positional\n\n        forbidden = set(delimiter).union(prefix)\n        for flag_name in flags:\n            validate_flag_name(flag_name, forbidden)\n        for alias_name in aliases:\n            validate_flag_name(alias_name, forbidden)\n\n        regex_flags = 0\n        if case_insensitive:\n            flags = {key.casefold(): value for key, value in flags.items()}\n            aliases = {key.casefold(): value.casefold() for key, value in aliases.items()}\n            regex_flags = re.IGNORECASE\n\n        keys = [re.escape(k) for k in flags]\n        keys.extend(re.escape(a) for a in aliases)\n        keys = sorted(keys, key=len, reverse=True)\n\n        joined = '|'.join(keys)\n        pattern = re.compile(f'(({re.escape(prefix)})(?P<flag>{joined}){re.escape(delimiter)})', regex_flags)\n        attrs['__commands_flag_regex__'] = pattern\n        attrs['__commands_flags__'] = flags\n        attrs['__commands_flag_aliases__'] = aliases\n\n        return type.__new__(cls, name, bases, attrs)\n\n\nasync def tuple_convert_all(ctx: Context[BotT], argument: str, flag: Flag, converter: Any) -> Tuple[Any, ...]:\n    view = StringView(argument)\n    results = []\n    param: Parameter = ctx.current_parameter  # type: ignore\n    while not view.eof:\n        view.skip_ws()\n        if view.eof:\n            break\n\n        word = view.get_quoted_word()\n        if word is None:\n            break\n\n        try:\n            converted = await run_converters(ctx, converter, word, param)\n        except Exception as e:\n            raise BadFlagArgument(flag, word, e) from e\n        else:\n            results.append(converted)\n\n    return tuple(results)\n\n\nasync def tuple_convert_flag(ctx: Context[BotT], argument: str, flag: Flag, converters: Any) -> Tuple[Any, ...]:\n    view = StringView(argument)\n    results = []\n    param: Parameter = ctx.current_parameter  # type: ignore\n    for converter in converters:\n        view.skip_ws()\n        if view.eof:\n            break\n\n        word = view.get_quoted_word()\n        if word is None:\n            break\n\n        try:\n            converted = await run_converters(ctx, converter, word, param)\n        except Exception as e:\n            raise BadFlagArgument(flag, word, e) from e\n        else:\n            results.append(converted)\n\n    if len(results) != len(converters):\n        raise MissingFlagArgument(flag)\n\n    return tuple(results)\n\n\nasync def convert_flag(ctx: Context[BotT], argument: str, flag: Flag, annotation: Any = None) -> Any:\n    param: Parameter = ctx.current_parameter  # type: ignore\n    annotation = annotation or flag.annotation\n    try:\n        origin = annotation.__origin__\n    except AttributeError:\n        pass\n    else:\n        if origin is tuple:\n            if annotation.__args__[-1] is Ellipsis:\n                return await tuple_convert_all(ctx, argument, flag, annotation.__args__[0])\n            else:\n                return await tuple_convert_flag(ctx, argument, flag, annotation.__args__)\n        elif origin is list:\n            # typing.List[x]\n            annotation = annotation.__args__[0]\n            return await convert_flag(ctx, argument, flag, annotation)\n        elif origin is Union and type(None) in annotation.__args__:\n            # typing.Optional[x]\n            annotation = Union[tuple(arg for arg in annotation.__args__ if arg is not type(None))]  # type: ignore\n            return await run_converters(ctx, annotation, argument, param)\n        elif origin is dict:\n            # typing.Dict[K, V] -> typing.Tuple[K, V]\n            return await tuple_convert_flag(ctx, argument, flag, annotation.__args__)\n\n    try:\n        return await run_converters(ctx, annotation, argument, param)\n    except Exception as e:\n        raise BadFlagArgument(flag, argument, e) from e\n\n\nclass FlagConverter(metaclass=FlagsMeta):\n    \"\"\"A converter that allows for a user-friendly flag syntax.\n\n    The flags are defined using :pep:`526` type annotations similar\n    to the :mod:`dataclasses` Python module. For more information on\n    how this converter works, check the appropriate\n    :ref:`documentation <ext_commands_flag_converter>`.\n\n    .. container:: operations\n\n        .. describe:: iter(x)\n\n            Returns an iterator of ``(flag_name, flag_value)`` pairs. This allows it\n            to be, for example, constructed as a dict or a list of pairs.\n            Note that aliases are not shown.\n\n    .. versionadded:: 2.0\n\n    Parameters\n    -----------\n    case_insensitive: :class:`bool`\n        A class parameter to toggle case insensitivity of the flag parsing.\n        If ``True`` then flags are parsed in a case insensitive manner.\n        Defaults to ``False``.\n    prefix: :class:`str`\n        The prefix that all flags must be prefixed with. By default\n        there is no prefix.\n    delimiter: :class:`str`\n        The delimiter that separates a flag's argument from the flag's name.\n        By default this is ``:``.\n    \"\"\"\n\n    @classmethod\n    def get_flags(cls) -> Dict[str, Flag]:\n        \"\"\"Dict[:class:`str`, :class:`Flag`]: A mapping of flag name to flag object this converter has.\"\"\"\n        return cls.__commands_flags__.copy()\n\n    @classmethod\n    def _can_be_constructible(cls) -> bool:\n        return all(not flag.required for flag in cls.__commands_flags__.values())\n\n    def __iter__(self) -> Iterator[Tuple[str, Any]]:\n        for flag in self.__class__.__commands_flags__.values():\n            yield (flag.name, getattr(self, flag.attribute))\n\n    @classmethod\n    async def _construct_default(cls, ctx: Context[BotT]) -> Self:\n        self = cls.__new__(cls)\n        flags = cls.__commands_flags__\n        for flag in flags.values():\n            if callable(flag.default):\n                # Type checker does not understand that flag.default is a Callable\n                default = await maybe_coroutine(flag.default, ctx)\n                setattr(self, flag.attribute, default)\n            else:\n                setattr(self, flag.attribute, flag.default)\n        return self\n\n    def __repr__(self) -> str:\n        pairs = ' '.join([f'{flag.attribute}={getattr(self, flag.attribute)!r}' for flag in self.get_flags().values()])\n        return f'<{self.__class__.__name__} {pairs}>'\n\n    @classmethod\n    def parse_flags(cls, argument: str, *, ignore_extra: bool = True) -> Dict[str, List[str]]:\n        result: Dict[str, List[str]] = {}\n        flags = cls.__commands_flags__\n        aliases = cls.__commands_flag_aliases__\n        positional_flag = cls.__commands_flag_positional__\n        last_position = 0\n        last_flag: Optional[Flag] = None\n\n        case_insensitive = cls.__commands_flag_case_insensitive__\n\n        if positional_flag is not None:\n            match = cls.__commands_flag_regex__.search(argument)\n            if match is not None:\n                begin, end = match.span(0)\n                value = argument[:begin].strip()\n            else:\n                value = argument.strip()\n                last_position = len(argument)\n\n            if value:\n                name = positional_flag.name.casefold() if case_insensitive else positional_flag.name\n                result[name] = [value]\n\n        for match in cls.__commands_flag_regex__.finditer(argument):\n            begin, end = match.span(0)\n            key = match.group('flag')\n            if case_insensitive:\n                key = key.casefold()\n\n            if key in aliases:\n                key = aliases[key]\n\n            flag = flags.get(key)\n            if last_position and last_flag is not None:\n                value = argument[last_position : begin - 1].lstrip()\n                if not value:\n                    raise MissingFlagArgument(last_flag)\n\n                name = last_flag.name.casefold() if case_insensitive else last_flag.name\n\n                try:\n                    values = result[name]\n                except KeyError:\n                    result[name] = [value]\n                else:\n                    values.append(value)\n\n            last_position = end\n            last_flag = flag\n\n        # Get the remaining string, if applicable\n        value = argument[last_position:].strip()\n\n        # Add the remaining string to the last available flag\n        if last_flag is not None:\n            if not value:\n                raise MissingFlagArgument(last_flag)\n\n            name = last_flag.name.casefold() if case_insensitive else last_flag.name\n\n            try:\n                values = result[name]\n            except KeyError:\n                result[name] = [value]\n            else:\n                values.append(value)\n        elif value and not ignore_extra:\n            # If we're here then we passed extra arguments that aren't flags\n            raise TooManyArguments(f'Too many arguments passed to {cls.__name__}')\n\n        # Verification of values will come at a later stage\n        return result\n\n    @classmethod\n    async def convert(cls, ctx: Context[BotT], argument: str) -> Self:\n        \"\"\"|coro|\n\n        The method that actually converters an argument to the flag mapping.\n\n        Parameters\n        ----------\n        ctx: :class:`Context`\n            The invocation context.\n        argument: :class:`str`\n            The argument to convert from.\n\n        Raises\n        --------\n        FlagError\n            A flag related parsing error.\n\n        Returns\n        --------\n        :class:`FlagConverter`\n            The flag converter instance with all flags parsed.\n        \"\"\"\n\n        # Only respect ignore_extra if the parameter is a keyword-only parameter\n        ignore_extra = True\n        if (\n            ctx.command is not None\n            and ctx.current_parameter is not None\n            and ctx.current_parameter.kind == ctx.current_parameter.KEYWORD_ONLY\n        ):\n            ignore_extra = ctx.command.ignore_extra\n\n        arguments = cls.parse_flags(argument, ignore_extra=ignore_extra)\n        flags = cls.__commands_flags__\n\n        self = cls.__new__(cls)\n        for name, flag in flags.items():\n            try:\n                values = arguments[name]\n            except KeyError:\n                if flag.required:\n                    raise MissingRequiredFlag(flag)\n                else:\n                    if callable(flag.default):\n                        # Type checker does not understand flag.default is a Callable\n                        default = await maybe_coroutine(flag.default, ctx)\n                        setattr(self, flag.attribute, default)\n                    else:\n                        setattr(self, flag.attribute, flag.default)\n                    continue\n\n            if flag.max_args > 0 and len(values) > flag.max_args:\n                if flag.override:\n                    values = values[-flag.max_args :]\n                else:\n                    raise TooManyFlags(flag, values)\n\n            # Special case:\n            if flag.max_args == 1:\n                value = await convert_flag(ctx, values[0], flag)\n                setattr(self, flag.attribute, value)\n                continue\n\n            # Another special case, tuple parsing.\n            # Tuple parsing is basically converting arguments within the flag\n            # So, given flag: hello 20 as the input and Tuple[str, int] as the type hint\n            # We would receive ('hello', 20) as the resulting value\n            # This uses the same whitespace and quoting rules as regular parameters.\n            values = [await convert_flag(ctx, value, flag) for value in values]\n\n            if flag.cast_to_dict:\n                values = dict(values)\n\n            setattr(self, flag.attribute, values)\n\n        return self\n"
  },
  {
    "path": "discord/ext/commands/help.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom __future__ import annotations\n\nimport itertools\nimport copy\nimport functools\nimport re\n\nfrom typing import (\n    TYPE_CHECKING,\n    Optional,\n    Generator,\n    List,\n    TypeVar,\n    Callable,\n    Any,\n    Dict,\n    Tuple,\n    Iterable,\n    Sequence,\n    Mapping,\n)\n\nimport discord.utils\n\nfrom .core import Group, Command, get_signature_parameters\nfrom .errors import CommandError\n\nif TYPE_CHECKING:\n    from typing_extensions import Self\n\n    import discord.abc\n\n    from .bot import BotBase\n    from .context import Context\n    from .cog import Cog\n    from .parameters import Parameter\n\n    from ._types import (\n        UserCheck,\n        BotT,\n        _Bot,\n    )\n\n__all__ = (\n    'Paginator',\n    'HelpCommand',\n    'DefaultHelpCommand',\n    'MinimalHelpCommand',\n)\n\nFuncT = TypeVar('FuncT', bound=Callable[..., Any])\n\nMISSING: Any = discord.utils.MISSING\n\n# help -> shows info of bot on top/bottom and lists subcommands\n# help command -> shows detailed info of command\n# help command <subcommand chain> -> same as above\n\n# <description>\n\n# <command signature with aliases>\n\n# <long doc>\n\n# Cog:\n#   <command> <shortdoc>\n#   <command> <shortdoc>\n# Other Cog:\n#   <command> <shortdoc>\n# No Category:\n#   <command> <shortdoc>\n\n# Type <prefix>help command for more info on a command.\n# You can also type <prefix>help category for more info on a category.\n\n\nclass Paginator:\n    \"\"\"A class that aids in paginating code blocks for Discord messages.\n\n    .. container:: operations\n\n        .. describe:: len(x)\n\n            Returns the total number of characters in the paginator.\n\n    Attributes\n    -----------\n    prefix: Optional[:class:`str`]\n        The prefix inserted to every page. e.g. three backticks, if any.\n    suffix: Optional[:class:`str`]\n        The suffix appended at the end of every page. e.g. three backticks, if any.\n    max_size: :class:`int`\n        The maximum amount of codepoints allowed in a page.\n    linesep: :class:`str`\n        The character string inserted between lines. e.g. a newline character.\n            .. versionadded:: 1.7\n    \"\"\"\n\n    def __init__(\n        self, prefix: Optional[str] = '```', suffix: Optional[str] = '```', max_size: int = 2000, linesep: str = '\\n'\n    ) -> None:\n        self.prefix: Optional[str] = prefix\n        self.suffix: Optional[str] = suffix\n        self.max_size: int = max_size\n        self.linesep: str = linesep\n        self.clear()\n\n    def clear(self) -> None:\n        \"\"\"Clears the paginator to have no pages.\"\"\"\n        if self.prefix is not None:\n            self._current_page: List[str] = [self.prefix]\n            self._count: int = len(self.prefix) + self._linesep_len  # prefix + newline\n        else:\n            self._current_page = []\n            self._count = 0\n        self._pages: List[str] = []\n\n    @property\n    def _prefix_len(self) -> int:\n        return len(self.prefix) if self.prefix else 0\n\n    @property\n    def _suffix_len(self) -> int:\n        return len(self.suffix) if self.suffix else 0\n\n    @property\n    def _linesep_len(self) -> int:\n        return len(self.linesep)\n\n    def add_line(self, line: str = '', *, empty: bool = False) -> None:\n        \"\"\"Adds a line to the current page.\n\n        If the line exceeds the :attr:`max_size` then an exception\n        is raised.\n\n        Parameters\n        -----------\n        line: :class:`str`\n            The line to add.\n        empty: :class:`bool`\n            Indicates if another empty line should be added.\n\n        Raises\n        ------\n        RuntimeError\n            The line was too big for the current :attr:`max_size`.\n        \"\"\"\n        max_page_size = self.max_size - self._prefix_len - self._suffix_len - 2 * self._linesep_len\n        if len(line) > max_page_size:\n            raise RuntimeError(f'Line exceeds maximum page size {max_page_size}')\n\n        if self._count + len(line) + self._linesep_len > self.max_size - self._suffix_len:\n            self.close_page()\n\n        self._count += len(line) + self._linesep_len\n        self._current_page.append(line)\n\n        if empty:\n            self._current_page.append('')\n            self._count += self._linesep_len\n\n    def close_page(self) -> None:\n        \"\"\"Prematurely terminate a page.\"\"\"\n        if self.suffix is not None:\n            self._current_page.append(self.suffix)\n        self._pages.append(self.linesep.join(self._current_page))\n\n        if self.prefix is not None:\n            self._current_page = [self.prefix]\n            self._count = len(self.prefix) + self._linesep_len  # prefix + linesep\n        else:\n            self._current_page = []\n            self._count = 0\n\n    def __len__(self) -> int:\n        total = sum(len(p) for p in self._pages)\n        return total + self._count\n\n    @property\n    def pages(self) -> List[str]:\n        \"\"\"List[:class:`str`]: Returns the rendered list of pages.\"\"\"\n        # we have more than just the prefix in our current page\n        if len(self._current_page) > (0 if self.prefix is None else 1):\n            # Render and include current page without closing\n            current_page = self.linesep.join(\n                [*self._current_page, self.suffix] if self.suffix is not None else self._current_page\n            )\n            return [*self._pages, current_page]\n\n        return self._pages\n\n    def __repr__(self) -> str:\n        fmt = '<Paginator prefix: {0.prefix!r} suffix: {0.suffix!r} linesep: {0.linesep!r} max_size: {0.max_size} count: {0._count}>'\n        return fmt.format(self)\n\n\ndef _not_overridden(f: FuncT) -> FuncT:\n    f.__help_command_not_overridden__ = True\n    return f\n\n\nclass _HelpCommandImpl(Command):\n    def __init__(self, inject: HelpCommand, *args: Any, **kwargs: Any) -> None:\n        super().__init__(inject.command_callback, *args, **kwargs)\n        self._original: HelpCommand = inject\n        self._injected: HelpCommand = inject\n        self.params: Dict[str, Parameter] = get_signature_parameters(inject.command_callback, globals(), skip_parameters=1)\n\n    async def prepare(self, ctx: Context[Any]) -> None:\n        self._injected = injected = self._original.copy()\n        injected.context = ctx\n        self.callback = injected.command_callback\n        self.params = get_signature_parameters(injected.command_callback, globals(), skip_parameters=1)\n\n        on_error = injected.on_help_command_error\n        if not hasattr(on_error, '__help_command_not_overridden__'):\n            if self.cog is not None:\n                self.on_error = self._on_error_cog_implementation\n            else:\n                self.on_error = on_error\n\n        await super().prepare(ctx)\n\n    async def _parse_arguments(self, ctx: Context[BotT]) -> None:\n        # Make the parser think we don't have a cog so it doesn't\n        # inject the parameter into `ctx.args`.\n        original_cog = self.cog\n        self.cog = None\n        try:\n            await super()._parse_arguments(ctx)\n        finally:\n            self.cog = original_cog\n\n    async def _on_error_cog_implementation(self, _, ctx: Context[BotT], error: CommandError) -> None:\n        await self._injected.on_help_command_error(ctx, error)\n\n    def _inject_into_cog(self, cog: Cog) -> None:\n        # Warning: hacky\n\n        # Make the cog think that get_commands returns this command\n        # as well if we inject it without modifying __cog_commands__\n        # since that's used for the injection and ejection of cogs.\n        def wrapped_get_commands(\n            *, _original: Callable[[], List[Command[Any, ..., Any]]] = cog.get_commands\n        ) -> List[Command[Any, ..., Any]]:\n            ret = _original()\n            ret.append(self)\n            return ret\n\n        # Ditto here\n        def wrapped_walk_commands(\n            *, _original: Callable[[], Generator[Command[Any, ..., Any], None, None]] = cog.walk_commands\n        ):\n            yield from _original()\n            yield self\n\n        functools.update_wrapper(wrapped_get_commands, cog.get_commands)\n        functools.update_wrapper(wrapped_walk_commands, cog.walk_commands)\n        cog.get_commands = wrapped_get_commands\n        cog.walk_commands = wrapped_walk_commands\n        self.cog = cog\n\n    def _eject_cog(self) -> None:\n        if self.cog is None:\n            return\n\n        # revert back into their original methods\n        cog = self.cog\n        cog.get_commands = cog.get_commands.__wrapped__\n        cog.walk_commands = cog.walk_commands.__wrapped__\n        self.cog = None\n\n        # Revert `on_error` to use the original one in case of race conditions\n        self.on_error = self._injected.on_help_command_error\n\n    def update(self, **kwargs: Any) -> None:\n        cog = self.cog\n        self.__init__(self._original, **dict(self.__original_kwargs__, **kwargs))\n        self.cog = cog\n\n\nclass HelpCommand:\n    r\"\"\"The base implementation for help command formatting.\n\n    .. note::\n\n        Internally instances of this class are deep copied every time\n        the command itself is invoked to prevent a race condition\n        mentioned in :issue:`2123`.\n\n        This means that relying on the state of this class to be\n        the same between command invocations would not work as expected.\n\n    Attributes\n    ------------\n    context: Optional[:class:`Context`]\n        The context that invoked this help formatter. This is generally set after\n        the help command assigned, :func:`command_callback`\\, has been called.\n    show_hidden: :class:`bool`\n        Specifies if hidden commands should be shown in the output.\n        Defaults to ``False``.\n    verify_checks: Optional[:class:`bool`]\n        Specifies if commands should have their :attr:`.Command.checks` called\n        and verified. If ``True``, always calls :attr:`.Command.checks`.\n        If ``None``, only calls :attr:`.Command.checks` in a guild setting.\n        If ``False``, never calls :attr:`.Command.checks`. Defaults to ``True``.\n\n        .. versionchanged:: 1.7\n    command_attrs: :class:`dict`\n        A dictionary of options to pass in for the construction of the help command.\n        This allows you to change the command behaviour without actually changing\n        the implementation of the command. The attributes will be the same as the\n        ones passed in the :class:`.Command` constructor.\n    \"\"\"\n\n    MENTION_TRANSFORMS = {\n        '@everyone': '@\\u200beveryone',\n        '@here': '@\\u200bhere',\n        r'<@!?[0-9]{17,22}>': '@deleted-user',\n        r'<@&[0-9]{17,22}>': '@deleted-role',\n    }\n\n    MENTION_PATTERN = re.compile('|'.join(MENTION_TRANSFORMS.keys()))\n\n    if TYPE_CHECKING:\n        __original_kwargs__: Dict[str, Any]\n        __original_args__: Tuple[Any, ...]\n\n    def __new__(cls, *args: Any, **kwargs: Any) -> Self:\n        # To prevent race conditions of a single instance while also allowing\n        # for settings to be passed the original arguments passed must be assigned\n        # to allow for easier copies (which will be made when the help command is actually called)\n        # see issue 2123\n        self = super().__new__(cls)\n\n        # Shallow copies cannot be used in this case since it is not unusual to pass\n        # instances that need state, e.g. Paginator or what have you into the function\n        # The keys can be safely copied as-is since they're 99.99% certain of being\n        # string keys\n        deepcopy = copy.deepcopy\n        self.__original_kwargs__ = {k: deepcopy(v) for k, v in kwargs.items()}\n        self.__original_args__ = deepcopy(args)\n        return self\n\n    def __init__(self, **options: Any) -> None:\n        self.show_hidden: bool = options.pop('show_hidden', False)\n        self.verify_checks: bool = options.pop('verify_checks', True)\n        self.command_attrs: Dict[str, Any]\n        self.command_attrs = attrs = options.pop('command_attrs', {})\n        attrs.setdefault('name', 'help')\n        attrs.setdefault('help', 'Shows this message')\n        self.context: Context[_Bot] = MISSING\n        self._command_impl = _HelpCommandImpl(self, **self.command_attrs)\n\n    def copy(self) -> Self:\n        obj = self.__class__(*self.__original_args__, **self.__original_kwargs__)\n        obj._command_impl = self._command_impl\n        return obj\n\n    def _add_to_bot(self, bot: BotBase) -> None:\n        self._command_impl.update(**self.command_attrs)\n        bot.add_command(self._command_impl)\n\n    def _remove_from_bot(self, bot: BotBase) -> None:\n        bot.remove_command(self._command_impl.name)\n        self._command_impl._eject_cog()\n\n    def add_check(self, func: UserCheck[Context[Any]], /) -> None:\n        \"\"\"\n        Adds a check to the help command.\n\n        .. versionadded:: 1.4\n\n        .. versionchanged:: 2.0\n\n            ``func`` parameter is now positional-only.\n\n        .. seealso:: The :func:`~discord.ext.commands.check` decorator\n\n        Parameters\n        ----------\n        func\n            The function that will be used as a check.\n        \"\"\"\n\n        self._command_impl.add_check(func)\n\n    def remove_check(self, func: UserCheck[Context[Any]], /) -> None:\n        \"\"\"\n        Removes a check from the help command.\n\n        This function is idempotent and will not raise an exception if\n        the function is not in the command's checks.\n\n        .. versionadded:: 1.4\n\n        .. versionchanged:: 2.0\n\n            ``func`` parameter is now positional-only.\n\n        Parameters\n        ----------\n        func\n            The function to remove from the checks.\n        \"\"\"\n\n        self._command_impl.remove_check(func)\n\n    def get_bot_mapping(self) -> Dict[Optional[Cog], List[Command[Any, ..., Any]]]:\n        \"\"\"Retrieves the bot mapping passed to :meth:`send_bot_help`.\"\"\"\n        bot = self.context.bot\n        mapping: Dict[Optional[Cog], List[Command[Any, ..., Any]]] = {cog: cog.get_commands() for cog in bot.cogs.values()}\n        mapping[None] = [c for c in bot.commands if c.cog is None]\n        return mapping\n\n    @property\n    def invoked_with(self) -> Optional[str]:\n        \"\"\"Similar to :attr:`Context.invoked_with` except properly handles\n        the case where :meth:`Context.send_help` is used.\n\n        If the help command was used regularly then this returns\n        the :attr:`Context.invoked_with` attribute. Otherwise, if\n        it the help command was called using :meth:`Context.send_help`\n        then it returns the internal command name of the help command.\n\n        Returns\n        ---------\n        Optional[:class:`str`]\n            The command name that triggered this invocation.\n        \"\"\"\n        command_name = self._command_impl.name\n        ctx = self.context\n        if ctx is MISSING or ctx.command is None or ctx.command.qualified_name != command_name:\n            return command_name\n        return ctx.invoked_with\n\n    def get_command_signature(self, command: Command[Any, ..., Any], /) -> str:\n        \"\"\"Retrieves the signature portion of the help page.\n\n        .. versionchanged:: 2.0\n\n            ``command`` parameter is now positional-only.\n\n        Parameters\n        ------------\n        command: :class:`Command`\n            The command to get the signature of.\n\n        Returns\n        --------\n        :class:`str`\n            The signature for the command.\n        \"\"\"\n        parent: Optional[Group[Any, ..., Any]] = command.parent  # type: ignore # the parent will be a Group\n        entries = []\n        while parent is not None:\n            if not parent.signature or parent.invoke_without_command:\n                entries.append(parent.name)\n            else:\n                entries.append(parent.name + ' ' + parent.signature)\n            parent = parent.parent  # type: ignore\n        parent_sig = ' '.join(reversed(entries))\n\n        if len(command.aliases) > 0:\n            aliases = '|'.join(command.aliases)\n            fmt = f'[{command.name}|{aliases}]'\n            if parent_sig:\n                fmt = parent_sig + ' ' + fmt\n            alias = fmt\n        else:\n            alias = command.name if not parent_sig else parent_sig + ' ' + command.name\n\n        return f'{self.context.clean_prefix}{alias} {command.signature}'\n\n    def remove_mentions(self, string: str, /) -> str:\n        \"\"\"Removes mentions from the string to prevent abuse.\n\n        This includes ``@everyone``, ``@here``, member mentions and role mentions.\n\n        .. versionchanged:: 2.0\n\n            ``string`` parameter is now positional-only.\n\n        Returns\n        -------\n        :class:`str`\n            The string with mentions removed.\n        \"\"\"\n\n        def replace(obj: re.Match, *, transforms: Dict[str, str] = self.MENTION_TRANSFORMS) -> str:\n            return transforms.get(obj.group(0), '@invalid')\n\n        return self.MENTION_PATTERN.sub(replace, string)\n\n    @property\n    def cog(self) -> Optional[Cog]:\n        \"\"\"A property for retrieving or setting the cog for the help command.\n\n        When a cog is set for the help command, it is as-if the help command\n        belongs to that cog. All cog special methods will apply to the help\n        command and it will be automatically unset on unload.\n\n        To unbind the cog from the help command, you can set it to ``None``.\n\n        Returns\n        --------\n        Optional[:class:`Cog`]\n            The cog that is currently set for the help command.\n        \"\"\"\n        return self._command_impl.cog\n\n    @cog.setter\n    def cog(self, cog: Optional[Cog]) -> None:\n        # Remove whatever cog is currently valid, if any\n        self._command_impl._eject_cog()\n\n        # If a new cog is set then inject it.\n        if cog is not None:\n            self._command_impl._inject_into_cog(cog)\n\n    def command_not_found(self, string: str, /) -> str:\n        \"\"\"|maybecoro|\n\n        A method called when a command is not found in the help command.\n        This is useful to override for i18n.\n\n        Defaults to ``No command called {0} found.``\n\n        .. versionchanged:: 2.0\n\n            ``string`` parameter is now positional-only.\n\n        Parameters\n        ------------\n        string: :class:`str`\n            The string that contains the invalid command. Note that this has\n            had mentions removed to prevent abuse.\n\n        Returns\n        ---------\n        :class:`str`\n            The string to use when a command has not been found.\n        \"\"\"\n        return f'No command called \"{string}\" found.'\n\n    def subcommand_not_found(self, command: Command[Any, ..., Any], string: str, /) -> str:\n        \"\"\"|maybecoro|\n\n        A method called when a command did not have a subcommand requested in the help command.\n        This is useful to override for i18n.\n\n        Defaults to either:\n\n        - ``'Command \"{command.qualified_name}\" has no subcommands.'``\n            - If there is no subcommand in the ``command`` parameter.\n        - ``'Command \"{command.qualified_name}\" has no subcommand named {string}'``\n            - If the ``command`` parameter has subcommands but not one named ``string``.\n\n        .. versionchanged:: 2.0\n\n            ``command`` and ``string`` parameters are now positional-only.\n\n        Parameters\n        ------------\n        command: :class:`Command`\n            The command that did not have the subcommand requested.\n        string: :class:`str`\n            The string that contains the invalid subcommand. Note that this has\n            had mentions removed to prevent abuse.\n\n        Returns\n        ---------\n        :class:`str`\n            The string to use when the command did not have the subcommand requested.\n        \"\"\"\n        if isinstance(command, Group) and len(command.all_commands) > 0:\n            return f'Command \"{command.qualified_name}\" has no subcommand named {string}'\n        return f'Command \"{command.qualified_name}\" has no subcommands.'\n\n    async def filter_commands(\n        self,\n        commands: Iterable[Command[Any, ..., Any]],\n        /,\n        *,\n        sort: bool = False,\n        key: Optional[Callable[[Command[Any, ..., Any]], Any]] = None,\n    ) -> List[Command[Any, ..., Any]]:\n        \"\"\"|coro|\n\n        Returns a filtered list of commands and optionally sorts them.\n\n        This takes into account the :attr:`verify_checks` and :attr:`show_hidden`\n        attributes.\n\n        .. versionchanged:: 2.0\n\n            ``commands`` parameter is now positional-only.\n\n        Parameters\n        ------------\n        commands: Iterable[:class:`Command`]\n            An iterable of commands that are getting filtered.\n        sort: :class:`bool`\n            Whether to sort the result.\n        key: Optional[Callable[[:class:`Command`], Any]]\n            An optional key function to pass to :func:`py:sorted` that\n            takes a :class:`Command` as its sole parameter. If ``sort`` is\n            passed as ``True`` then this will default as the command name.\n\n        Returns\n        ---------\n        List[:class:`Command`]\n            A list of commands that passed the filter.\n        \"\"\"\n\n        if sort and key is None:\n            key = lambda c: c.name\n\n        iterator = commands if self.show_hidden else filter(lambda c: not c.hidden, commands)\n\n        if self.verify_checks is False:\n            # if we do not need to verify the checks then we can just\n            # run it straight through normally without using await.\n            return sorted(iterator, key=key) if sort else list(iterator)  # type: ignore # the key shouldn't be None\n\n        if self.verify_checks is None and not self.context.guild:\n            # if verify_checks is None and we're in a DM, don't verify\n            return sorted(iterator, key=key) if sort else list(iterator)  # type: ignore\n\n        # if we're here then we need to check every command if it can run\n        async def predicate(cmd: Command[Any, ..., Any]) -> bool:\n            try:\n                return await cmd.can_run(self.context)\n            except CommandError:\n                return False\n\n        ret = []\n        for cmd in iterator:\n            valid = await predicate(cmd)\n            if valid:\n                ret.append(cmd)\n\n        if sort:\n            ret.sort(key=key)\n        return ret\n\n    def get_max_size(self, commands: Sequence[Command[Any, ..., Any]], /) -> int:\n        \"\"\"Returns the largest name length of the specified command list.\n\n        .. versionchanged:: 2.0\n\n            ``commands`` parameter is now positional-only.\n\n        Parameters\n        ------------\n        commands: Sequence[:class:`Command`]\n            A sequence of commands to check for the largest size.\n\n        Returns\n        --------\n        :class:`int`\n            The maximum width of the commands.\n        \"\"\"\n\n        as_lengths = (discord.utils._string_width(c.name) for c in commands)\n        return max(as_lengths, default=0)\n\n    def get_destination(self) -> discord.abc.MessageableChannel:\n        \"\"\"Returns the :class:`~discord.abc.Messageable` where the help command will be output.\n\n        You can override this method to customise the behaviour.\n\n        By default this returns the context's channel.\n\n        Returns\n        -------\n        :class:`.abc.Messageable`\n            The destination where the help command will be output.\n        \"\"\"\n        return self.context.channel\n\n    async def send_error_message(self, error: str, /) -> None:\n        \"\"\"|coro|\n\n        Handles the implementation when an error happens in the help command.\n        For example, the result of :meth:`command_not_found` will be passed here.\n\n        You can override this method to customise the behaviour.\n\n        By default, this sends the error message to the destination\n        specified by :meth:`get_destination`.\n\n        .. note::\n\n            You can access the invocation context with :attr:`HelpCommand.context`.\n\n        .. versionchanged:: 2.0\n\n            ``error`` parameter is now positional-only.\n\n        Parameters\n        ------------\n        error: :class:`str`\n            The error message to display to the user. Note that this has\n            had mentions removed to prevent abuse.\n        \"\"\"\n        destination = self.get_destination()\n        await destination.send(error)\n\n    @_not_overridden\n    async def on_help_command_error(self, ctx: Context[BotT], error: CommandError, /) -> None:\n        \"\"\"|coro|\n\n        The help command's error handler, as specified by :ref:`ext_commands_error_handler`.\n\n        Useful to override if you need some specific behaviour when the error handler\n        is called.\n\n        By default this method does nothing and just propagates to the default\n        error handlers.\n\n        .. versionchanged:: 2.0\n\n            ``ctx`` and ``error`` parameters are now positional-only.\n\n        Parameters\n        ------------\n        ctx: :class:`Context`\n            The invocation context.\n        error: :class:`CommandError`\n            The error that was raised.\n        \"\"\"\n        pass\n\n    async def send_bot_help(self, mapping: Mapping[Optional[Cog], List[Command[Any, ..., Any]]], /) -> None:\n        \"\"\"|coro|\n\n        Handles the implementation of the bot command page in the help command.\n        This function is called when the help command is called with no arguments.\n\n        It should be noted that this method does not return anything -- rather the\n        actual message sending should be done inside this method. Well behaved subclasses\n        should use :meth:`get_destination` to know where to send, as this is a customisation\n        point for other users.\n\n        You can override this method to customise the behaviour.\n\n        .. note::\n\n            You can access the invocation context with :attr:`HelpCommand.context`.\n\n            Also, the commands in the mapping are not filtered. To do the filtering\n            you will have to call :meth:`filter_commands` yourself.\n\n        .. versionchanged:: 2.0\n\n            ``mapping`` parameter is now positional-only.\n\n        Parameters\n        ------------\n        mapping: Mapping[Optional[:class:`Cog`], List[:class:`Command`]]\n            A mapping of cogs to commands that have been requested by the user for help.\n            The key of the mapping is the :class:`~.commands.Cog` that the command belongs to, or\n            ``None`` if there isn't one, and the value is a list of commands that belongs to that cog.\n        \"\"\"\n        return None\n\n    async def send_cog_help(self, cog: Cog, /) -> None:\n        \"\"\"|coro|\n\n        Handles the implementation of the cog page in the help command.\n        This function is called when the help command is called with a cog as the argument.\n\n        It should be noted that this method does not return anything -- rather the\n        actual message sending should be done inside this method. Well behaved subclasses\n        should use :meth:`get_destination` to know where to send, as this is a customisation\n        point for other users.\n\n        You can override this method to customise the behaviour.\n\n        .. note::\n\n            You can access the invocation context with :attr:`HelpCommand.context`.\n\n            To get the commands that belong to this cog see :meth:`Cog.get_commands`.\n            The commands returned not filtered. To do the filtering you will have to call\n            :meth:`filter_commands` yourself.\n\n        .. versionchanged:: 2.0\n\n            ``cog`` parameter is now positional-only.\n\n        Parameters\n        -----------\n        cog: :class:`Cog`\n            The cog that was requested for help.\n        \"\"\"\n        return None\n\n    async def send_group_help(self, group: Group[Any, ..., Any], /) -> None:\n        \"\"\"|coro|\n\n        Handles the implementation of the group page in the help command.\n        This function is called when the help command is called with a group as the argument.\n\n        It should be noted that this method does not return anything -- rather the\n        actual message sending should be done inside this method. Well behaved subclasses\n        should use :meth:`get_destination` to know where to send, as this is a customisation\n        point for other users.\n\n        You can override this method to customise the behaviour.\n\n        .. note::\n\n            You can access the invocation context with :attr:`HelpCommand.context`.\n\n            To get the commands that belong to this group without aliases see\n            :attr:`Group.commands`. The commands returned not filtered. To do the\n            filtering you will have to call :meth:`filter_commands` yourself.\n\n        .. versionchanged:: 2.0\n\n            ``group`` parameter is now positional-only.\n\n        Parameters\n        -----------\n        group: :class:`Group`\n            The group that was requested for help.\n        \"\"\"\n        return None\n\n    async def send_command_help(self, command: Command[Any, ..., Any], /) -> None:\n        \"\"\"|coro|\n\n        Handles the implementation of the single command page in the help command.\n\n        It should be noted that this method does not return anything -- rather the\n        actual message sending should be done inside this method. Well behaved subclasses\n        should use :meth:`get_destination` to know where to send, as this is a customisation\n        point for other users.\n\n        You can override this method to customise the behaviour.\n\n        .. note::\n\n            You can access the invocation context with :attr:`HelpCommand.context`.\n\n        .. admonition:: Showing Help\n            :class: helpful\n\n            There are certain attributes and methods that are helpful for a help command\n            to show such as the following:\n\n            - :attr:`Command.help`\n            - :attr:`Command.brief`\n            - :attr:`Command.short_doc`\n            - :attr:`Command.description`\n            - :meth:`get_command_signature`\n\n            There are more than just these attributes but feel free to play around with\n            these to help you get started to get the output that you want.\n\n        .. versionchanged:: 2.0\n\n            ``command`` parameter is now positional-only.\n\n        Parameters\n        -----------\n        command: :class:`Command`\n            The command that was requested for help.\n        \"\"\"\n        return None\n\n    async def prepare_help_command(self, ctx: Context[BotT], command: Optional[str] = None, /) -> None:\n        \"\"\"|coro|\n\n        A low level method that can be used to prepare the help command\n        before it does anything. For example, if you need to prepare\n        some state in your subclass before the command does its processing\n        then this would be the place to do it.\n\n        The default implementation does nothing.\n\n        .. note::\n\n            This is called *inside* the help command callback body. So all\n            the usual rules that happen inside apply here as well.\n\n        .. versionchanged:: 2.0\n\n            ``ctx`` and ``command`` parameters are now positional-only.\n\n        Parameters\n        -----------\n        ctx: :class:`Context`\n            The invocation context.\n        command: Optional[:class:`str`]\n            The argument passed to the help command.\n        \"\"\"\n        pass\n\n    async def command_callback(self, ctx: Context[BotT], /, *, command: Optional[str] = None) -> None:\n        \"\"\"|coro|\n\n        The actual implementation of the help command.\n\n        It is not recommended to override this method and instead change\n        the behaviour through the methods that actually get dispatched.\n\n        - :meth:`send_bot_help`\n        - :meth:`send_cog_help`\n        - :meth:`send_group_help`\n        - :meth:`send_command_help`\n        - :meth:`get_destination`\n        - :meth:`command_not_found`\n        - :meth:`subcommand_not_found`\n        - :meth:`send_error_message`\n        - :meth:`on_help_command_error`\n        - :meth:`prepare_help_command`\n\n        .. versionchanged:: 2.0\n\n            ``ctx`` parameter is now positional-only.\n        \"\"\"\n        await self.prepare_help_command(ctx, command)\n\n        bot = ctx.bot\n\n        if command is None:\n            mapping = self.get_bot_mapping()\n            return await self.send_bot_help(mapping)\n\n        # Check if it's a cog\n        cog = bot.get_cog(command)\n        if cog is not None:\n            return await self.send_cog_help(cog)\n\n        maybe_coro = discord.utils.maybe_coroutine\n\n        # If it's not a cog then it's a command.\n        # Since we want to have detailed errors when someone\n        # passes an invalid subcommand, we need to walk through\n        # the command group chain ourselves.\n        keys = command.split(' ')\n        cmd = bot.all_commands.get(keys[0])\n        if cmd is None:\n            string = await maybe_coro(self.command_not_found, self.remove_mentions(keys[0]))\n            return await self.send_error_message(string)\n\n        for key in keys[1:]:\n            try:\n                found = cmd.all_commands.get(key)  # type: ignore\n            except AttributeError:\n                string = await maybe_coro(self.subcommand_not_found, cmd, self.remove_mentions(key))\n                return await self.send_error_message(string)\n            else:\n                if found is None:\n                    string = await maybe_coro(self.subcommand_not_found, cmd, self.remove_mentions(key))\n                    return await self.send_error_message(string)\n                cmd = found\n\n        if isinstance(cmd, Group):\n            return await self.send_group_help(cmd)\n        else:\n            return await self.send_command_help(cmd)\n\n\nclass DefaultHelpCommand(HelpCommand):\n    \"\"\"The implementation of the default help command.\n\n    This inherits from :class:`HelpCommand`.\n\n    It extends it with the following attributes.\n\n    Attributes\n    ------------\n    width: :class:`int`\n        The maximum number of characters that fit in a line.\n        Defaults to 80.\n    sort_commands: :class:`bool`\n        Whether to sort the commands in the output alphabetically. Defaults to ``True``.\n    dm_help: Optional[:class:`bool`]\n        A tribool that indicates if the help command should DM the user instead of\n        sending it to the channel it received it from. If the boolean is set to\n        ``True``, then all help output is DM'd. If ``False``, none of the help\n        output is DM'd. If ``None``, then the bot will only DM when the help\n        message becomes too long (dictated by more than :attr:`dm_help_threshold` characters).\n        Defaults to ``False``.\n    dm_help_threshold: Optional[:class:`int`]\n        The number of characters the paginator must accumulate before getting DM'd to the\n        user if :attr:`dm_help` is set to ``None``. Defaults to 1000.\n    indent: :class:`int`\n        How much to indent the commands from a heading. Defaults to ``2``.\n    arguments_heading: :class:`str`\n        The arguments list's heading string used when the help command is invoked with a command name.\n        Useful for i18n. Defaults to ``\"Arguments:\"``.\n        Shown when :attr:`.show_parameter_descriptions` is ``True``.\n\n        .. versionadded:: 2.0\n    show_parameter_descriptions: :class:`bool`\n        Whether to show the parameter descriptions. Defaults to ``True``.\n        Setting this to ``False`` will revert to showing the :attr:`~.commands.Command.signature` instead.\n\n        .. versionadded:: 2.0\n    commands_heading: :class:`str`\n        The command list's heading string used when the help command is invoked with a category name.\n        Useful for i18n. Defaults to ``\"Commands:\"``\n    default_argument_description: :class:`str`\n        The default argument description string used when the argument's :attr:`~.commands.Parameter.description` is ``None``.\n        Useful for i18n. Defaults to ``\"No description given.\"``\n\n        .. versionadded:: 2.0\n    no_category: :class:`str`\n        The string used when there is a command which does not belong to any category(cog).\n        Useful for i18n. Defaults to ``\"No Category\"``\n    paginator: :class:`Paginator`\n        The paginator used to paginate the help command output.\n    \"\"\"\n\n    def __init__(self, **options: Any) -> None:\n        self.width: int = options.pop('width', 80)\n        self.indent: int = options.pop('indent', 2)\n        self.sort_commands: bool = options.pop('sort_commands', True)\n        self.dm_help: bool = options.pop('dm_help', False)\n        self.dm_help_threshold: int = options.pop('dm_help_threshold', 1000)\n        self.arguments_heading: str = options.pop('arguments_heading', \"Arguments:\")\n        self.commands_heading: str = options.pop('commands_heading', 'Commands:')\n        self.default_argument_description: str = options.pop('default_argument_description', 'No description given')\n        self.no_category: str = options.pop('no_category', 'No Category')\n        self.paginator: Paginator = options.pop('paginator', None)\n        self.show_parameter_descriptions: bool = options.pop('show_parameter_descriptions', True)\n\n        if self.paginator is None:\n            self.paginator: Paginator = Paginator()\n\n        super().__init__(**options)\n\n    def shorten_text(self, text: str, /) -> str:\n        \"\"\":class:`str`: Shortens text to fit into the :attr:`width`.\n\n        .. versionchanged:: 2.0\n\n            ``text`` parameter is now positional-only.\n        \"\"\"\n        if len(text) > self.width:\n            return text[: self.width - 3].rstrip() + '...'\n        return text\n\n    def get_ending_note(self) -> str:\n        \"\"\":class:`str`: Returns help command's ending note. This is mainly useful to override for i18n purposes.\"\"\"\n        command_name = self.invoked_with\n        return (\n            f'Type {self.context.clean_prefix}{command_name} command for more info on a command.\\n'\n            f'You can also type {self.context.clean_prefix}{command_name} category for more info on a category.'\n        )\n\n    def get_command_signature(self, command: Command[Any, ..., Any], /) -> str:\n        \"\"\"Retrieves the signature portion of the help page.\n\n        Calls :meth:`~.HelpCommand.get_command_signature` if :attr:`show_parameter_descriptions` is ``False``\n        else returns a modified signature where the command parameters are not shown.\n\n        .. versionadded:: 2.0\n\n        Parameters\n        ------------\n        command: :class:`Command`\n            The command to get the signature of.\n\n        Returns\n        --------\n        :class:`str`\n            The signature for the command.\n        \"\"\"\n        if not self.show_parameter_descriptions:\n            return super().get_command_signature(command)\n\n        name = command.name\n        if len(command.aliases) > 0:\n            aliases = '|'.join(command.aliases)\n            name = f'[{command.name}|{aliases}]'\n\n        return f'{self.context.clean_prefix}{name}'\n\n    def add_indented_commands(\n        self, commands: Sequence[Command[Any, ..., Any]], /, *, heading: str, max_size: Optional[int] = None\n    ) -> None:\n        \"\"\"Indents a list of commands after the specified heading.\n\n        The formatting is added to the :attr:`paginator`.\n\n        The default implementation is the command name indented by\n        :attr:`indent` spaces, padded to ``max_size`` followed by\n        the command's :attr:`Command.short_doc` and then shortened\n        to fit into the :attr:`width`.\n\n        .. versionchanged:: 2.0\n            ``commands`` parameter is now positional-only.\n\n        Parameters\n        -----------\n        commands: Sequence[:class:`Command`]\n            A list of commands to indent for output.\n        heading: :class:`str`\n            The heading to add to the output. This is only added\n            if the list of commands is greater than 0.\n        max_size: Optional[:class:`int`]\n            The max size to use for the gap between indents.\n            If unspecified, calls :meth:`~HelpCommand.get_max_size` on the\n            commands parameter.\n        \"\"\"\n\n        if not commands:\n            return\n\n        self.paginator.add_line(heading)\n        max_size = max_size or self.get_max_size(commands)\n\n        get_width = discord.utils._string_width\n        for command in commands:\n            name = command.name\n            width = max_size - (get_width(name) - len(name))\n            entry = f'{self.indent * \" \"}{name:<{width}} {command.short_doc}'\n            self.paginator.add_line(self.shorten_text(entry))\n\n    def add_command_arguments(self, command: Command[Any, ..., Any], /) -> None:\n        \"\"\"Indents a list of command arguments after the :attr:`.arguments_heading`.\n\n        The default implementation is the argument :attr:`~.commands.Parameter.name` indented by\n        :attr:`indent` spaces, padded to ``max_size`` using :meth:`~HelpCommand.get_max_size`\n        followed by the argument's :attr:`~.commands.Parameter.description` or\n        :attr:`.default_argument_description` and then shortened\n        to fit into the :attr:`width` and then :attr:`~.commands.Parameter.displayed_default`\n        between () if one is present after that.\n\n        .. versionadded:: 2.0\n\n        Parameters\n        -----------\n        command: :class:`Command`\n            The command to list the arguments for.\n        \"\"\"\n        arguments = command.clean_params.values()\n        if not arguments:\n            return\n\n        self.paginator.add_line(self.arguments_heading)\n        max_size = self.get_max_size(arguments)  # type: ignore # not a command\n\n        get_width = discord.utils._string_width\n        for argument in arguments:\n            name = argument.displayed_name or argument.name\n            width = max_size - (get_width(name) - len(name))\n            entry = f'{self.indent * \" \"}{name:<{width}} {argument.description or self.default_argument_description}'\n            # we do not want to shorten the default value, if any.\n            entry = self.shorten_text(entry)\n            if argument.displayed_default is not None:\n                entry += f' (default: {argument.displayed_default})'\n\n            self.paginator.add_line(entry)\n\n    async def send_pages(self) -> None:\n        \"\"\"|coro|\n\n        A helper utility to send the page output from :attr:`paginator` to the destination.\n        \"\"\"\n        destination = self.get_destination()\n        for page in self.paginator.pages:\n            await destination.send(page)\n\n    def add_command_formatting(self, command: Command[Any, ..., Any], /) -> None:\n        \"\"\"A utility function to format the non-indented block of commands and groups.\n\n        .. versionchanged:: 2.0\n\n            ``command`` parameter is now positional-only.\n\n        .. versionchanged:: 2.0\n            :meth:`.add_command_arguments` is now called if :attr:`.show_parameter_descriptions` is ``True``.\n\n        Parameters\n        ------------\n        command: :class:`Command`\n            The command to format.\n        \"\"\"\n\n        if command.description:\n            self.paginator.add_line(command.description, empty=True)\n\n        signature = self.get_command_signature(command)\n        self.paginator.add_line(signature, empty=True)\n\n        if command.help:\n            try:\n                self.paginator.add_line(command.help, empty=True)\n            except RuntimeError:\n                for line in command.help.splitlines():\n                    self.paginator.add_line(line)\n                self.paginator.add_line()\n\n        if self.show_parameter_descriptions:\n            self.add_command_arguments(command)\n\n    def get_destination(self) -> discord.abc.Messageable:\n        ctx = self.context\n        if self.dm_help is True:\n            return ctx.author\n        elif self.dm_help is None and len(self.paginator) > self.dm_help_threshold:\n            return ctx.author\n        else:\n            return ctx.channel\n\n    async def prepare_help_command(self, ctx: Context[BotT], command: Optional[str], /) -> None:\n        self.paginator.clear()\n        await super().prepare_help_command(ctx, command)\n\n    async def send_bot_help(self, mapping: Mapping[Optional[Cog], List[Command[Any, ..., Any]]], /) -> None:\n        ctx = self.context\n        bot = ctx.bot\n\n        if bot.description:\n            # <description> portion\n            self.paginator.add_line(bot.description, empty=True)\n\n        no_category = f'\\u200b{self.no_category}:'\n\n        def get_category(command, *, no_category=no_category):\n            cog = command.cog\n            return cog.qualified_name + ':' if cog is not None else no_category\n\n        filtered = await self.filter_commands(bot.commands, sort=True, key=get_category)\n        max_size = self.get_max_size(filtered)\n        to_iterate = itertools.groupby(filtered, key=get_category)\n\n        # Now we can add the commands to the page.\n        for category, commands in to_iterate:\n            commands = sorted(commands, key=lambda c: c.name) if self.sort_commands else list(commands)\n            self.add_indented_commands(commands, heading=category, max_size=max_size)\n\n        note = self.get_ending_note()\n        if note:\n            self.paginator.add_line()\n            self.paginator.add_line(note)\n\n        await self.send_pages()\n\n    async def send_command_help(self, command: Command[Any, ..., Any], /) -> None:\n        self.add_command_formatting(command)\n        self.paginator.close_page()\n        await self.send_pages()\n\n    async def send_group_help(self, group: Group[Any, ..., Any], /) -> None:\n        self.add_command_formatting(group)\n\n        filtered = await self.filter_commands(group.commands, sort=self.sort_commands)\n        self.add_indented_commands(filtered, heading=self.commands_heading)\n\n        if filtered:\n            note = self.get_ending_note()\n            if note:\n                self.paginator.add_line()\n                self.paginator.add_line(note)\n\n        await self.send_pages()\n\n    async def send_cog_help(self, cog: Cog, /) -> None:\n        if cog.description:\n            self.paginator.add_line(cog.description, empty=True)\n\n        filtered = await self.filter_commands(cog.get_commands(), sort=self.sort_commands)\n        self.add_indented_commands(filtered, heading=self.commands_heading)\n\n        note = self.get_ending_note()\n        if note:\n            self.paginator.add_line()\n            self.paginator.add_line(note)\n\n        await self.send_pages()\n\n\nclass MinimalHelpCommand(HelpCommand):\n    \"\"\"An implementation of a help command with minimal output.\n\n    This inherits from :class:`HelpCommand`.\n\n    Attributes\n    ------------\n    sort_commands: :class:`bool`\n        Whether to sort the commands in the output alphabetically. Defaults to ``True``.\n    commands_heading: :class:`str`\n        The command list's heading string used when the help command is invoked with a category name.\n        Useful for i18n. Defaults to ``\"Commands\"``\n    aliases_heading: :class:`str`\n        The alias list's heading string used to list the aliases of the command. Useful for i18n.\n        Defaults to ``\"Aliases:\"``.\n    dm_help: Optional[:class:`bool`]\n        A tribool that indicates if the help command should DM the user instead of\n        sending it to the channel it received it from. If the boolean is set to\n        ``True``, then all help output is DM'd. If ``False``, none of the help\n        output is DM'd. If ``None``, then the bot will only DM when the help\n        message becomes too long (dictated by more than :attr:`dm_help_threshold` characters).\n        Defaults to ``False``.\n    dm_help_threshold: Optional[:class:`int`]\n        The number of characters the paginator must accumulate before getting DM'd to the\n        user if :attr:`dm_help` is set to ``None``. Defaults to 1000.\n    no_category: :class:`str`\n        The string used when there is a command which does not belong to any category(cog).\n        Useful for i18n. Defaults to ``\"No Category\"``\n    paginator: :class:`Paginator`\n        The paginator used to paginate the help command output.\n    \"\"\"\n\n    def __init__(self, **options: Any) -> None:\n        self.sort_commands: bool = options.pop('sort_commands', True)\n        self.commands_heading: str = options.pop('commands_heading', 'Commands')\n        self.dm_help: bool = options.pop('dm_help', False)\n        self.dm_help_threshold: int = options.pop('dm_help_threshold', 1000)\n        self.aliases_heading: str = options.pop('aliases_heading', 'Aliases:')\n        self.no_category: str = options.pop('no_category', 'No Category')\n        self.paginator: Paginator = options.pop('paginator', None)\n\n        if self.paginator is None:\n            self.paginator: Paginator = Paginator(suffix=None, prefix=None)\n\n        super().__init__(**options)\n\n    async def send_pages(self) -> None:\n        \"\"\"|coro|\n\n        A helper utility to send the page output from :attr:`paginator` to the destination.\n        \"\"\"\n        destination = self.get_destination()\n        for page in self.paginator.pages:\n            await destination.send(page)\n\n    def get_opening_note(self) -> str:\n        \"\"\"Returns help command's opening note. This is mainly useful to override for i18n purposes.\n\n        The default implementation returns ::\n\n            Use `{prefix}{command_name} [command]` for more info on a command.\n            You can also use `{prefix}{command_name} [category]` for more info on a category.\n\n        Returns\n        -------\n        :class:`str`\n            The help command opening note.\n        \"\"\"\n        command_name = self.invoked_with\n        return (\n            f'Use `{self.context.clean_prefix}{command_name} [command]` for more info on a command.\\n'\n            f'You can also use `{self.context.clean_prefix}{command_name} [category]` for more info on a category.'\n        )\n\n    def get_command_signature(self, command: Command[Any, ..., Any], /) -> str:\n        return f'{self.context.clean_prefix}{command.qualified_name} {command.signature}'\n\n    def get_ending_note(self) -> str:\n        \"\"\"Return the help command's ending note. This is mainly useful to override for i18n purposes.\n\n        The default implementation does nothing.\n\n        Returns\n        -------\n        :class:`str`\n            The help command ending note.\n        \"\"\"\n        return ''\n\n    def add_bot_commands_formatting(self, commands: Sequence[Command[Any, ..., Any]], heading: str, /) -> None:\n        \"\"\"Adds the minified bot heading with commands to the output.\n\n        The formatting should be added to the :attr:`paginator`.\n\n        The default implementation is a bold underline heading followed\n        by commands separated by an EN SPACE (U+2002) in the next line.\n\n        .. versionchanged:: 2.0\n\n            ``commands`` and ``heading`` parameters are now positional-only.\n\n        Parameters\n        -----------\n        commands: Sequence[:class:`Command`]\n            A list of commands that belong to the heading.\n        heading: :class:`str`\n            The heading to add to the line.\n        \"\"\"\n        if commands:\n            # U+2002 Middle Dot\n            joined = '\\u2002'.join(c.name for c in commands)\n            self.paginator.add_line(f'__**{heading}**__')\n            self.paginator.add_line(joined)\n\n    def add_subcommand_formatting(self, command: Command[Any, ..., Any], /) -> None:\n        \"\"\"Adds formatting information on a subcommand.\n\n        The formatting should be added to the :attr:`paginator`.\n\n        The default implementation is the prefix and the :attr:`Command.qualified_name`\n        optionally followed by an En dash and the command's :attr:`Command.short_doc`.\n\n        .. versionchanged:: 2.0\n\n            ``command`` parameter is now positional-only.\n\n        Parameters\n        -----------\n        command: :class:`Command`\n            The command to show information of.\n        \"\"\"\n        fmt = '{0}{1} \\N{EN DASH} {2}' if command.short_doc else '{0}{1}'\n        self.paginator.add_line(fmt.format(self.context.clean_prefix, command.qualified_name, command.short_doc))\n\n    def add_aliases_formatting(self, aliases: Sequence[str], /) -> None:\n        \"\"\"Adds the formatting information on a command's aliases.\n\n        The formatting should be added to the :attr:`paginator`.\n\n        The default implementation is the :attr:`aliases_heading` bolded\n        followed by a comma separated list of aliases.\n\n        This is not called if there are no aliases to format.\n\n        .. versionchanged:: 2.0\n\n            ``aliases`` parameter is now positional-only.\n\n        Parameters\n        -----------\n        aliases: Sequence[:class:`str`]\n            A list of aliases to format.\n        \"\"\"\n        self.paginator.add_line(f'**{self.aliases_heading}** {\", \".join(aliases)}', empty=True)\n\n    def add_command_formatting(self, command: Command[Any, ..., Any], /) -> None:\n        \"\"\"A utility function to format commands and groups.\n\n        .. versionchanged:: 2.0\n\n            ``command`` parameter is now positional-only.\n\n        Parameters\n        ------------\n        command: :class:`Command`\n            The command to format.\n        \"\"\"\n\n        if command.description:\n            self.paginator.add_line(command.description, empty=True)\n\n        signature = self.get_command_signature(command)\n        if command.aliases:\n            self.paginator.add_line(signature)\n            self.add_aliases_formatting(command.aliases)\n        else:\n            self.paginator.add_line(signature, empty=True)\n\n        if command.help:\n            try:\n                self.paginator.add_line(command.help, empty=True)\n            except RuntimeError:\n                for line in command.help.splitlines():\n                    self.paginator.add_line(line)\n                self.paginator.add_line()\n\n    def get_destination(self) -> discord.abc.Messageable:\n        ctx = self.context\n        if self.dm_help is True:\n            return ctx.author\n        elif self.dm_help is None and len(self.paginator) > self.dm_help_threshold:\n            return ctx.author\n        else:\n            return ctx.channel\n\n    async def prepare_help_command(self, ctx: Context[BotT], command: Optional[str], /) -> None:\n        self.paginator.clear()\n        await super().prepare_help_command(ctx, command)\n\n    async def send_bot_help(self, mapping: Mapping[Optional[Cog], List[Command[Any, ..., Any]]], /) -> None:\n        ctx = self.context\n        bot = ctx.bot\n\n        if bot.description:\n            self.paginator.add_line(bot.description, empty=True)\n\n        note = self.get_opening_note()\n        if note:\n            self.paginator.add_line(note, empty=True)\n\n        no_category = f'\\u200b{self.no_category}'\n\n        def get_category(command: Command[Any, ..., Any], *, no_category: str = no_category) -> str:\n            cog = command.cog\n            return cog.qualified_name if cog is not None else no_category\n\n        filtered = await self.filter_commands(bot.commands, sort=True, key=get_category)\n        to_iterate = itertools.groupby(filtered, key=get_category)\n\n        for category, commands in to_iterate:\n            commands = sorted(commands, key=lambda c: c.name) if self.sort_commands else list(commands)\n            self.add_bot_commands_formatting(commands, category)\n\n        note = self.get_ending_note()\n        if note:\n            self.paginator.add_line()\n            self.paginator.add_line(note)\n\n        await self.send_pages()\n\n    async def send_cog_help(self, cog: Cog, /) -> None:\n        bot = self.context.bot\n        if bot.description:\n            self.paginator.add_line(bot.description, empty=True)\n\n        note = self.get_opening_note()\n        if note:\n            self.paginator.add_line(note, empty=True)\n\n        if cog.description:\n            self.paginator.add_line(cog.description, empty=True)\n\n        filtered = await self.filter_commands(cog.get_commands(), sort=self.sort_commands)\n        if filtered:\n            self.paginator.add_line(f'**{cog.qualified_name} {self.commands_heading}**')\n            for command in filtered:\n                self.add_subcommand_formatting(command)\n\n            note = self.get_ending_note()\n            if note:\n                self.paginator.add_line()\n                self.paginator.add_line(note)\n\n        await self.send_pages()\n\n    async def send_group_help(self, group: Group[Any, ..., Any], /) -> None:\n        self.add_command_formatting(group)\n\n        filtered = await self.filter_commands(group.commands, sort=self.sort_commands)\n        if filtered:\n            note = self.get_opening_note()\n            if note:\n                self.paginator.add_line(note, empty=True)\n\n            self.paginator.add_line(f'**{self.commands_heading}**')\n            for command in filtered:\n                self.add_subcommand_formatting(command)\n\n            note = self.get_ending_note()\n            if note:\n                self.paginator.add_line()\n                self.paginator.add_line(note)\n\n        await self.send_pages()\n\n    async def send_command_help(self, command: Command[Any, ..., Any], /) -> None:\n        self.add_command_formatting(command)\n        self.paginator.close_page()\n        await self.send_pages()\n"
  },
  {
    "path": "discord/ext/commands/hybrid.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom __future__ import annotations\n\nfrom typing import (\n    TYPE_CHECKING,\n    Any,\n    Callable,\n    ClassVar,\n    Dict,\n    List,\n    Tuple,\n    Type,\n    TypeVar,\n    Union,\n    Optional,\n)\n\nimport discord\nimport inspect\nfrom discord import app_commands\nfrom discord.utils import MISSING, maybe_coroutine, async_all\nfrom .core import Command, Group\nfrom .errors import BadArgument, CommandRegistrationError, CommandError, HybridCommandError, ConversionError\nfrom .converter import Converter, Range, Greedy, run_converters, CONVERTER_MAPPING\nfrom .parameters import Parameter\nfrom .flags import is_flag, FlagConverter\nfrom .cog import Cog\nfrom .view import StringView\n\nif TYPE_CHECKING:\n    from typing_extensions import Self, ParamSpec, Concatenate\n    from ._types import ContextT, Coro, BotT\n    from .bot import Bot\n    from .context import Context\n    from discord.app_commands.commands import (\n        Check as AppCommandCheck,\n        AutocompleteCallback,\n        ChoiceT,\n    )\n\n\n__all__ = (\n    'HybridCommand',\n    'HybridGroup',\n    'hybrid_command',\n    'hybrid_group',\n)\n\nT = TypeVar('T')\nU = TypeVar('U')\nCogT = TypeVar('CogT', bound='Cog')\nCommandT = TypeVar('CommandT', bound='Command[Any, ..., Any]')\n# CHT = TypeVar('CHT', bound='Check')\nGroupT = TypeVar('GroupT', bound='Group[Any, ..., Any]')\n_NoneType = type(None)\n\nif TYPE_CHECKING:\n    P = ParamSpec('P')\n    P2 = ParamSpec('P2')\n\n    CommandCallback = Union[\n        Callable[Concatenate[CogT, ContextT, P], Coro[T]],\n        Callable[Concatenate[ContextT, P], Coro[T]],\n    ]\nelse:\n    P = TypeVar('P')\n    P2 = TypeVar('P2')\n\n\nclass _CallableDefault:\n    __slots__ = ('func',)\n\n    def __init__(self, func: Callable[[Context], Any]) -> None:\n        self.func: Callable[[Context], Any] = func\n\n    @property\n    def __class__(self) -> Any:\n        return _NoneType\n\n\ndef is_converter(converter: Any) -> bool:\n    return (inspect.isclass(converter) and issubclass(converter, Converter)) or isinstance(converter, Converter)\n\n\ndef is_transformer(converter: Any) -> bool:\n    return hasattr(converter, '__discord_app_commands_transformer__') or hasattr(\n        converter, '__discord_app_commands_transform__'\n    )\n\n\ndef required_pos_arguments(func: Callable[..., Any]) -> int:\n    sig = inspect.signature(func)\n    return sum(p.default is p.empty for p in sig.parameters.values())\n\n\nclass ConverterTransformer(app_commands.Transformer):\n    def __init__(self, converter: Any, parameter: Parameter) -> None:\n        super().__init__()\n        self.converter: Any = converter\n        self.parameter: Parameter = parameter\n\n        try:\n            module = converter.__module__\n        except AttributeError:\n            pass\n        else:\n            if module is not None and (module.startswith('discord.') and not module.endswith('converter')):\n                self.converter = CONVERTER_MAPPING.get(converter, converter)\n\n    async def transform(self, interaction: discord.Interaction, value: str, /) -> Any:\n        ctx = interaction._baton\n        converter = self.converter\n        ctx.current_parameter = self.parameter\n        ctx.current_argument = value\n        try:\n            if inspect.isclass(converter) and issubclass(converter, Converter):\n                if inspect.ismethod(converter.convert):\n                    return await converter.convert(ctx, value)\n                else:\n                    return await converter().convert(ctx, value)\n            elif isinstance(converter, Converter):\n                return await converter.convert(ctx, value)\n        except CommandError:\n            raise\n        except Exception as exc:\n            raise ConversionError(converter, exc) from exc  # type: ignore\n\n\nclass CallableTransformer(app_commands.Transformer):\n    def __init__(self, func: Callable[[str], Any]) -> None:\n        super().__init__()\n        self.func: Callable[[str], Any] = func\n\n    async def transform(self, interaction: discord.Interaction, value: str, /) -> Any:\n        try:\n            return self.func(value)\n        except CommandError:\n            raise\n        except Exception as exc:\n            raise BadArgument(f'Converting to \"{self.func.__name__}\" failed') from exc\n\n\nclass GreedyTransformer(app_commands.Transformer):\n    def __init__(self, converter: Any, parameter: Parameter) -> None:\n        super().__init__()\n        self.converter: Any = converter\n        self.parameter: Parameter = parameter\n\n    async def transform(self, interaction: discord.Interaction, value: str, /) -> Any:\n        view = StringView(value)\n        result = []\n        ctx = interaction._baton\n        ctx.current_parameter = parameter = self.parameter\n        converter = self.converter\n\n        while True:\n            view.skip_ws()\n            ctx.current_argument = arg = view.get_quoted_word()\n            if arg is None:\n                break\n\n            # This propagates the exception\n            converted = await run_converters(ctx, converter, arg, parameter)\n            result.append(converted)\n\n        return result\n\n\ndef replace_parameter(\n    param: inspect.Parameter,\n    converter: Any,\n    callback: Callable[..., Any],\n    original: Parameter,\n    mapping: Dict[str, inspect.Parameter],\n) -> inspect.Parameter:\n    try:\n        # If it's a supported annotation (i.e. a transformer) just let it pass as-is.\n        app_commands.transformers.get_supported_annotation(converter)\n    except TypeError:\n        # Fallback to see if the behaviour needs changing\n        origin = getattr(converter, '__origin__', None)\n        args = getattr(converter, '__args__', [])\n        if isinstance(converter, Range):\n            r = converter\n            param = param.replace(annotation=app_commands.Range[r.annotation, r.min, r.max])\n        elif isinstance(converter, Greedy):\n            # Greedy is \"optional\" in ext.commands\n            # However, in here, it probably makes sense to make it required.\n            # I'm unsure how to allow the user to choose right now.\n            inner = converter.converter\n            if inner is discord.Attachment:\n                raise TypeError('discord.Attachment with Greedy is not supported in hybrid commands')\n\n            param = param.replace(annotation=GreedyTransformer(inner, original))\n        elif is_flag(converter):\n            callback.__hybrid_command_flag__ = (param.name, converter)\n            descriptions = {}\n            renames = {}\n            for flag in converter.__commands_flags__.values():\n                name = flag.attribute\n                flag_param = inspect.Parameter(\n                    name=name,\n                    kind=param.kind,\n                    default=flag.default if flag.default is not MISSING else inspect.Parameter.empty,\n                    annotation=flag.annotation,\n                )\n                pseudo = replace_parameter(flag_param, flag.annotation, callback, original, mapping)\n                if name in mapping:\n                    raise TypeError(f'{name!r} flag would shadow a pre-existing parameter')\n                if flag.description is not MISSING:\n                    descriptions[name] = flag.description\n                if flag.name != flag.attribute:\n                    renames[name] = flag.name\n\n                mapping[name] = pseudo\n\n            # Manually call the decorators\n            if descriptions:\n                app_commands.describe(**descriptions)(callback)\n            if renames:\n                app_commands.rename(**renames)(callback)\n\n        elif is_converter(converter) or converter in CONVERTER_MAPPING:\n            param = param.replace(annotation=ConverterTransformer(converter, original))\n        elif origin is Union:\n            if len(args) == 2 and args[-1] is _NoneType:\n                # Special case Optional[X] where X is a single type that can optionally be a converter\n                inner = args[0]\n                is_inner_transformer = is_transformer(inner)\n                if is_converter(inner) and not is_inner_transformer:\n                    param = param.replace(annotation=Optional[ConverterTransformer(inner, original)])  # type: ignore\n            else:\n                raise\n        elif origin:\n            # Unsupported typing.X annotation e.g. typing.Dict, typing.Tuple, typing.List, etc.\n            raise\n        elif callable(converter) and not inspect.isclass(converter):\n            param_count = required_pos_arguments(converter)\n            if param_count != 1:\n                raise\n            param = param.replace(annotation=CallableTransformer(converter))\n\n    return param\n\n\ndef replace_parameters(\n    parameters: Dict[str, Parameter], callback: Callable[..., Any], signature: inspect.Signature\n) -> List[inspect.Parameter]:\n    # Need to convert commands.Parameter back to inspect.Parameter so this will be a bit ugly\n    params = signature.parameters.copy()\n    for name, parameter in parameters.items():\n        converter = parameter.converter\n        # Parameter.converter properly infers from the default and has a str default\n        # This allows the actual signature to inherit this property\n        param = params[name].replace(annotation=converter)\n        param = replace_parameter(param, converter, callback, parameter, params)\n\n        if parameter.default is not parameter.empty:\n            default = _CallableDefault(parameter.default) if callable(parameter.default) else parameter.default\n            param = param.replace(default=default)\n\n        if isinstance(param.default, Parameter):\n            # If we're here, then then it hasn't been handled yet so it should be removed completely\n            param = param.replace(default=parameter.empty)\n\n        # Flags are flattened out and thus don't get their parameter in the actual mapping\n        if hasattr(converter, '__commands_is_flag__'):\n            del params[name]\n            continue\n\n        params[name] = param\n\n    return list(params.values())\n\n\nclass HybridAppCommand(discord.app_commands.Command[CogT, P, T]):\n    __commands_is_hybrid_app_command__: ClassVar[bool] = True\n\n    def __init__(\n        self,\n        wrapped: Union[HybridCommand[CogT, ..., T], HybridGroup[CogT, ..., T]],\n        name: Optional[Union[str, app_commands.locale_str]] = None,\n    ) -> None:\n        signature = inspect.signature(wrapped.callback)\n        params = replace_parameters(wrapped.params, wrapped.callback, signature)\n        wrapped.callback.__signature__ = signature.replace(parameters=params)\n        nsfw = getattr(wrapped.callback, '__discord_app_commands_is_nsfw__', False)\n        try:\n            super().__init__(\n                name=name or wrapped._locale_name or wrapped.name,\n                callback=wrapped.callback,  # type: ignore # Signature doesn't match but we're overriding the invoke\n                description=wrapped._locale_description or wrapped.description or wrapped.short_doc or '…',\n                nsfw=nsfw,\n            )\n        finally:\n            del wrapped.callback.__signature__\n\n        self.wrapped: Union[HybridCommand[CogT, ..., T], HybridGroup[CogT, ..., T]] = wrapped\n        self.binding: Optional[CogT] = wrapped.cog\n        # This technically means only one flag converter is supported\n        self.flag_converter: Optional[Tuple[str, Type[FlagConverter]]] = getattr(\n            wrapped.callback, '__hybrid_command_flag__', None\n        )\n        self.module = wrapped.module\n\n    def _copy_with(self, **kwargs) -> Self:\n        copy: Self = super()._copy_with(**kwargs)  # type: ignore\n        copy.wrapped = self.wrapped\n        copy.flag_converter = self.flag_converter\n        return copy\n\n    def copy(self) -> Self:\n        bindings = {\n            self.binding: self.binding,\n        }\n        return self._copy_with(parent=self.parent, binding=self.binding, bindings=bindings)\n\n    async def _transform_arguments(\n        self, interaction: discord.Interaction, namespace: app_commands.Namespace\n    ) -> Dict[str, Any]:\n        values = namespace.__dict__\n        transformed_values = {}\n\n        for param in self._params.values():\n            try:\n                value = values[param.display_name]\n            except KeyError:\n                if not param.required:\n                    if isinstance(param.default, _CallableDefault):\n                        transformed_values[param.name] = await maybe_coroutine(param.default.func, interaction._baton)\n                    else:\n                        transformed_values[param.name] = param.default\n                else:\n                    raise app_commands.CommandSignatureMismatch(self) from None\n            else:\n                transformed_values[param.name] = await param.transform(interaction, value)\n\n        if self.flag_converter is not None:\n            param_name, flag_cls = self.flag_converter\n            flag = flag_cls.__new__(flag_cls)\n            for f in flag_cls.__commands_flags__.values():\n                try:\n                    value = transformed_values.pop(f.attribute)\n                except KeyError:\n                    raise app_commands.CommandSignatureMismatch(self) from None\n                else:\n                    setattr(flag, f.attribute, value)\n\n            transformed_values[param_name] = flag\n\n        return transformed_values\n\n    async def _check_can_run(self, interaction: discord.Interaction) -> bool:\n        # Hybrid checks must run like so:\n        # - Bot global check once\n        # - Bot global check\n        # - Parent interaction check\n        # - Cog/group interaction check\n        # - Cog check\n        # - Local interaction checks\n        # - Local command checks\n\n        bot: Bot = interaction.client  # type: ignore\n        ctx: Context[Bot] = interaction._baton\n\n        if not await bot.can_run(ctx, call_once=True):\n            return False\n\n        if not await bot.can_run(ctx):\n            return False\n\n        if self.parent is not None and self.parent is not self.binding:\n            # For commands with a parent which isn't the binding, i.e.\n            # <binding>\n            #     <parent>\n            #         <command>\n            # The parent check needs to be called first\n            if not await maybe_coroutine(self.parent.interaction_check, interaction):\n                return False\n\n        if self.binding is not None:\n            try:\n                # Type checker does not like runtime attribute retrieval\n                check: AppCommandCheck = self.binding.interaction_check\n            except AttributeError:\n                pass\n            else:\n                ret = await maybe_coroutine(check, interaction)\n                if not ret:\n                    return False\n\n            local_check = Cog._get_overridden_method(self.binding.cog_check)\n            if local_check is not None:\n                ret = await maybe_coroutine(local_check, ctx)\n                if not ret:\n                    return False\n\n        if self.checks and not await async_all(f(interaction) for f in self.checks):\n            return False\n\n        if self.wrapped.checks and not await async_all(f(ctx) for f in self.wrapped.checks):\n            return False\n\n        return True\n\n    async def _invoke_with_namespace(self, interaction: discord.Interaction, namespace: app_commands.Namespace) -> Any:\n        # Wrap the interaction into a Context\n        bot: Bot = interaction.client  # type: ignore\n\n        # Unfortunately, `get_context` has to be called for this to work.\n        # If someone doesn't inherit this to replace it with their custom class\n        # then this doesn't work.\n        interaction._baton = ctx = await bot.get_context(interaction)\n        command = self.wrapped\n        bot.dispatch('command', ctx)\n        value = None\n        callback_completed = False\n        try:\n            await command.prepare(ctx)\n            # This lies and just always passes a Context instead of an Interaction.\n            value = await self._do_call(ctx, ctx.kwargs)  # type: ignore\n            callback_completed = True\n        except app_commands.CommandSignatureMismatch:\n            raise\n        except (app_commands.TransformerError, app_commands.CommandInvokeError) as e:\n            if isinstance(e.__cause__, CommandError):\n                exc = e.__cause__\n            else:\n                exc = HybridCommandError(e)\n                exc.__cause__ = e\n            await command.dispatch_error(ctx, exc.with_traceback(e.__traceback__))\n        except app_commands.AppCommandError as e:\n            exc = HybridCommandError(e)\n            exc.__cause__ = e\n            await command.dispatch_error(ctx, exc.with_traceback(e.__traceback__))\n        except CommandError as e:\n            await command.dispatch_error(ctx, e)\n        finally:\n            if command._max_concurrency is not None:\n                await command._max_concurrency.release(ctx.message)\n\n            if callback_completed:\n                await command.call_after_hooks(ctx)\n\n        if not ctx.command_failed:\n            bot.dispatch('command_completion', ctx)\n\n        interaction.command_failed = ctx.command_failed\n        return value\n\n\nclass HybridCommand(Command[CogT, P, T]):\n    r\"\"\"A class that is both an application command and a regular text command.\n\n    This has the same parameters and attributes as a regular :class:`~discord.ext.commands.Command`.\n    However, it also doubles as an :class:`application command <discord.app_commands.Command>`. In order\n    for this to work, the callbacks must have the same subset that is supported by application\n    commands.\n\n    These are not created manually, instead they are created via the\n    decorator or functional interface.\n\n    .. versionadded:: 2.0\n    \"\"\"\n\n    __commands_is_hybrid__: ClassVar[bool] = True\n\n    def __init__(\n        self,\n        func: CommandCallback[CogT, Context[Any], P, T],\n        /,\n        *,\n        name: Union[str, app_commands.locale_str] = MISSING,\n        description: Union[str, app_commands.locale_str] = MISSING,\n        **kwargs: Any,\n    ) -> None:\n        name, name_locale = (name.message, name) if isinstance(name, app_commands.locale_str) else (name, None)\n        if name is not MISSING:\n            kwargs['name'] = name\n        description, description_locale = (\n            (description.message, description) if isinstance(description, app_commands.locale_str) else (description, None)\n        )\n        if description is not MISSING:\n            kwargs['description'] = description\n\n        super().__init__(func, **kwargs)\n        self.with_app_command: bool = kwargs.pop('with_app_command', True)\n        self._locale_name: Optional[app_commands.locale_str] = name_locale\n        self._locale_description: Optional[app_commands.locale_str] = description_locale\n\n        self.app_command: Optional[HybridAppCommand[CogT, Any, T]] = (\n            HybridAppCommand(self) if self.with_app_command else None\n        )\n\n    @property\n    def cog(self) -> CogT:\n        return self._cog\n\n    @cog.setter\n    def cog(self, value: CogT) -> None:\n        self._cog = value\n        if self.app_command is not None:\n            self.app_command.binding = value\n\n    async def can_run(self, ctx: Context[BotT], /) -> bool:\n        if ctx.interaction is not None and self.app_command:\n            return await self.app_command._check_can_run(ctx.interaction)\n        else:\n            return await super().can_run(ctx)\n\n    async def _parse_arguments(self, ctx: Context[BotT]) -> None:\n        interaction = ctx.interaction\n        if interaction is None:\n            return await super()._parse_arguments(ctx)\n        elif self.app_command:\n            ctx.kwargs = await self.app_command._transform_arguments(interaction, interaction.namespace)\n\n    def _ensure_assignment_on_copy(self, other: Self) -> Self:\n        copy = super()._ensure_assignment_on_copy(other)\n        if self.app_command is None:\n            copy.app_command = None\n        else:\n            copy.app_command = self.app_command.copy()\n            copy.app_command.wrapped = copy\n        return copy\n\n    def autocomplete(\n        self, name: str\n    ) -> Callable[[AutocompleteCallback[CogT, ChoiceT]], AutocompleteCallback[CogT, ChoiceT]]:\n        \"\"\"A decorator that registers a coroutine as an autocomplete prompt for a parameter.\n\n        This is the same as :meth:`~discord.app_commands.Command.autocomplete`. It is only\n        applicable for the application command and doesn't do anything if the command is\n        a regular command.\n\n        .. note::\n\n            Similar to the :meth:`~discord.app_commands.Command.autocomplete` method, this\n            takes :class:`~discord.Interaction` as a parameter rather than a :class:`Context`.\n\n        Parameters\n        -----------\n        name: :class:`str`\n            The parameter name to register as autocomplete.\n\n        Raises\n        -------\n        TypeError\n            The coroutine passed is not actually a coroutine or\n            the parameter is not found or of an invalid type.\n        \"\"\"\n        if self.app_command is None:\n            raise TypeError('This command does not have a registered application command')\n\n        return self.app_command.autocomplete(name)\n\n\nclass HybridGroup(Group[CogT, P, T]):\n    r\"\"\"A class that is both an application command group and a regular text group.\n\n    This has the same parameters and attributes as a regular :class:`~discord.ext.commands.Group`.\n    However, it also doubles as an :class:`application command group <discord.app_commands.Group>`.\n    Note that application commands groups cannot have callbacks associated with them, so the callback\n    is only called if it's not invoked as an application command.\n\n    Hybrid groups will always have :attr:`Group.invoke_without_command` set to ``True``.\n\n    These are not created manually, instead they are created via the\n    decorator or functional interface.\n\n    .. versionadded:: 2.0\n\n    Attributes\n    -----------\n    fallback: Optional[:class:`str`]\n        The command name to use as a fallback for the application command. Since\n        application command groups cannot be invoked, this creates a subcommand within\n        the group that can be invoked with the given group callback. If ``None``\n        then no fallback command is given. Defaults to ``None``.\n    fallback_locale: Optional[:class:`~discord.app_commands.locale_str`]\n        The fallback command name's locale string, if available.\n    \"\"\"\n\n    __commands_is_hybrid__: ClassVar[bool] = True\n\n    def __init__(\n        self,\n        *args: Any,\n        name: Union[str, app_commands.locale_str] = MISSING,\n        description: Union[str, app_commands.locale_str] = MISSING,\n        fallback: Optional[Union[str, app_commands.locale_str]] = None,\n        **attrs: Any,\n    ) -> None:\n        name, name_locale = (name.message, name) if isinstance(name, app_commands.locale_str) else (name, None)\n        if name is not MISSING:\n            attrs['name'] = name\n        description, description_locale = (\n            (description.message, description) if isinstance(description, app_commands.locale_str) else (description, None)\n        )\n        if description is not MISSING:\n            attrs['description'] = description\n        super().__init__(*args, **attrs)\n        self.invoke_without_command = True\n        self.with_app_command: bool = attrs.pop('with_app_command', True)\n        self._locale_name: Optional[app_commands.locale_str] = name_locale\n        self._locale_description: Optional[app_commands.locale_str] = description_locale\n\n        parent = None\n        if self.parent is not None:\n            if isinstance(self.parent, HybridGroup):\n                parent = self.parent.app_command\n            else:\n                raise TypeError(f'HybridGroup parent must be HybridGroup not {self.parent.__class__}')\n\n        # I would love for this to be Optional[app_commands.Group]\n        # However, Python does not have conditional typing so it's very hard to\n        # make this type depend on the with_app_command bool without a lot of needless repetition\n        self.app_command: app_commands.Group = MISSING\n\n        fallback, fallback_locale = (\n            (fallback.message, fallback) if isinstance(fallback, app_commands.locale_str) else (fallback, None)\n        )\n        self.fallback: Optional[str] = fallback\n        self.fallback_locale: Optional[app_commands.locale_str] = fallback_locale\n\n        if self.with_app_command:\n            guild_ids = attrs.pop('guild_ids', None) or getattr(\n                self.callback, '__discord_app_commands_default_guilds__', None\n            )\n            guild_only = getattr(self.callback, '__discord_app_commands_guild_only__', False)\n            default_permissions = getattr(self.callback, '__discord_app_commands_default_permissions__', None)\n            nsfw = getattr(self.callback, '__discord_app_commands_is_nsfw__', False)\n            contexts = getattr(self.callback, '__discord_app_commands_contexts__', MISSING)\n            installs = getattr(self.callback, '__discord_app_commands_installation_types__', MISSING)\n            self.app_command = app_commands.Group(\n                name=self._locale_name or self.name,\n                description=self._locale_description or self.description or self.short_doc or '…',\n                guild_ids=guild_ids,\n                guild_only=guild_only,\n                default_permissions=default_permissions,\n                nsfw=nsfw,\n                allowed_installs=installs,\n                allowed_contexts=contexts,\n            )\n\n            # This prevents the group from re-adding the command at __init__\n            self.app_command.parent = parent\n            self.app_command.module = self.module\n\n            if fallback is not None:\n                command = HybridAppCommand(self, name=fallback_locale or fallback)\n                self.app_command.add_command(command)\n\n    @property\n    def _fallback_command(self) -> Optional[HybridAppCommand[CogT, ..., T]]:\n        if self.app_command is MISSING:\n            return None\n        return self.app_command.get_command(self.fallback)  # type: ignore\n\n    @property\n    def cog(self) -> CogT:\n        return self._cog\n\n    @cog.setter\n    def cog(self, value: CogT) -> None:\n        self._cog = value\n        fallback = self._fallback_command\n        if fallback:\n            fallback.binding = value\n\n    async def can_run(self, ctx: Context[BotT], /) -> bool:\n        fallback = self._fallback_command\n        if ctx.interaction is not None and fallback:\n            return await fallback._check_can_run(ctx.interaction)\n        else:\n            return await super().can_run(ctx)\n\n    async def _parse_arguments(self, ctx: Context[BotT]) -> None:\n        interaction = ctx.interaction\n        fallback = self._fallback_command\n        if interaction is not None and fallback:\n            ctx.kwargs = await fallback._transform_arguments(interaction, interaction.namespace)\n        else:\n            return await super()._parse_arguments(ctx)\n\n    def _ensure_assignment_on_copy(self, other: Self) -> Self:\n        copy = super()._ensure_assignment_on_copy(other)\n        copy.fallback = self.fallback\n        return copy\n\n    def _update_copy(self, kwargs: Dict[str, Any]) -> Self:\n        copy = super()._update_copy(kwargs)\n        # This is only really called inside CogMeta\n        # I want to ensure that the children of the app command are copied\n        # For example, if someone defines an app command using the app_command property\n        # while inside the cog. This copy is not propagated in normal means.\n        # For some reason doing this copy above will lead to duplicates.\n        if copy.app_command and self.app_command:\n            # This is a very lazy copy because the CogMeta will properly copy it\n            # with bindings and all later\n            copy.app_command._children = self.app_command._children.copy()\n\n        # Ensure the copy's fallback wraps the copy\n        if copy._fallback_command and self._fallback_command:\n            copy._fallback_command.wrapped = copy\n\n        return copy\n\n    def autocomplete(\n        self, name: str\n    ) -> Callable[[AutocompleteCallback[CogT, ChoiceT]], AutocompleteCallback[CogT, ChoiceT]]:\n        \"\"\"A decorator that registers a coroutine as an autocomplete prompt for a parameter.\n\n        This is the same as :meth:`~discord.app_commands.Command.autocomplete`. It is only\n        applicable for the application command and doesn't do anything if the command is\n        a regular command.\n\n        This is only available if the group has a fallback application command registered.\n\n        .. note::\n\n            Similar to the :meth:`~discord.app_commands.Command.autocomplete` method, this\n            takes :class:`~discord.Interaction` as a parameter rather than a :class:`Context`.\n\n        Parameters\n        -----------\n        name: :class:`str`\n            The parameter name to register as autocomplete.\n\n        Raises\n        -------\n        TypeError\n            The coroutine passed is not actually a coroutine or\n            the parameter is not found or of an invalid type.\n        \"\"\"\n        if self._fallback_command:\n            return self._fallback_command.autocomplete(name)\n        else:\n\n            def decorator(func: AutocompleteCallback[CogT, ChoiceT]) -> AutocompleteCallback[CogT, ChoiceT]:\n                return func\n\n            return decorator\n\n    def add_command(self, command: Union[HybridGroup[CogT, ..., Any], HybridCommand[CogT, ..., Any]], /) -> None:\n        \"\"\"Adds a :class:`.HybridCommand` into the internal list of commands.\n\n        This is usually not called, instead the :meth:`~.GroupMixin.command` or\n        :meth:`~.GroupMixin.group` shortcut decorators are used instead.\n\n        Parameters\n        -----------\n        command: :class:`HybridCommand`\n            The command to add.\n\n        Raises\n        -------\n        CommandRegistrationError\n            If the command or its alias is already registered by different command.\n        TypeError\n            If the command passed is not a subclass of :class:`.HybridCommand`.\n        \"\"\"\n\n        if not isinstance(command, (HybridCommand, HybridGroup)):\n            raise TypeError('The command passed must be a subclass of HybridCommand or HybridGroup')\n\n        if isinstance(command, HybridGroup) and self.parent is not None:\n            raise ValueError(f'{command.qualified_name!r} is too nested, groups can only be nested at most one level')\n\n        if command.app_command and self.app_command:\n            self.app_command.add_command(command.app_command)\n\n        command.parent = self\n\n        if command.name in self.all_commands:\n            raise CommandRegistrationError(command.name)\n\n        self.all_commands[command.name] = command\n        for alias in command.aliases:\n            if alias in self.all_commands:\n                self.remove_command(command.name)\n                raise CommandRegistrationError(alias, alias_conflict=True)\n            self.all_commands[alias] = command\n\n    def remove_command(self, name: str, /) -> Optional[Command[CogT, ..., Any]]:\n        cmd = super().remove_command(name)\n        if self.app_command:\n            self.app_command.remove_command(name)\n        return cmd\n\n    def command(\n        self,\n        name: Union[str, app_commands.locale_str] = MISSING,\n        *args: Any,\n        with_app_command: bool = True,\n        **kwargs: Any,\n    ) -> Callable[[CommandCallback[CogT, ContextT, P2, U]], HybridCommand[CogT, P2, U]]:\n        \"\"\"A shortcut decorator that invokes :func:`~discord.ext.commands.hybrid_command` and adds it to\n        the internal command list via :meth:`add_command`.\n\n        Returns\n        --------\n        Callable[..., :class:`HybridCommand`]\n            A decorator that converts the provided method into a Command, adds it to the bot, then returns it.\n        \"\"\"\n\n        def decorator(func: CommandCallback[CogT, ContextT, P2, U]):\n            kwargs.setdefault('parent', self)\n            result = hybrid_command(name=name, *args, with_app_command=with_app_command, **kwargs)(func)\n            self.add_command(result)\n            return result\n\n        return decorator\n\n    def group(\n        self,\n        name: Union[str, app_commands.locale_str] = MISSING,\n        *args: Any,\n        with_app_command: bool = True,\n        **kwargs: Any,\n    ) -> Callable[[CommandCallback[CogT, ContextT, P2, U]], HybridGroup[CogT, P2, U]]:\n        \"\"\"A shortcut decorator that invokes :func:`~discord.ext.commands.hybrid_group` and adds it to\n        the internal command list via :meth:`~.GroupMixin.add_command`.\n\n        Returns\n        --------\n        Callable[..., :class:`HybridGroup`]\n            A decorator that converts the provided method into a Group, adds it to the bot, then returns it.\n        \"\"\"\n\n        def decorator(func: CommandCallback[CogT, ContextT, P2, U]):\n            kwargs.setdefault('parent', self)\n            result = hybrid_group(name=name, *args, with_app_command=with_app_command, **kwargs)(func)\n            self.add_command(result)\n            return result\n\n        return decorator\n\n\ndef hybrid_command(\n    name: Union[str, app_commands.locale_str] = MISSING,\n    *,\n    with_app_command: bool = True,\n    **attrs: Any,\n) -> Callable[[CommandCallback[CogT, ContextT, P, T]], HybridCommand[CogT, P, T]]:\n    r\"\"\"A decorator that transforms a function into a :class:`.HybridCommand`.\n\n    A hybrid command is one that functions both as a regular :class:`.Command`\n    and one that is also a :class:`app_commands.Command <discord.app_commands.Command>`.\n\n    The callback being attached to the command must be representable as an\n    application command callback. Converters are silently converted into a\n    :class:`~discord.app_commands.Transformer` with a\n    :attr:`discord.AppCommandOptionType.string` type.\n\n    Checks and error handlers are dispatched and called as-if they were commands\n    similar to :class:`.Command`. This means that they take :class:`Context` as\n    a parameter rather than :class:`discord.Interaction`.\n\n    All checks added using the :func:`.check` & co. decorators are added into\n    the function. There is no way to supply your own checks through this\n    decorator.\n\n    .. versionadded:: 2.0\n\n    Parameters\n    -----------\n    name: Union[:class:`str`, :class:`~discord.app_commands.locale_str`]\n        The name to create the command with. By default this uses the\n        function name unchanged.\n    with_app_command: :class:`bool`\n        Whether to register the command also as an application command.\n    \\*\\*attrs\n        Keyword arguments to pass into the construction of the\n        hybrid command.\n\n    Raises\n    -------\n    TypeError\n        If the function is not a coroutine or is already a command.\n    \"\"\"\n\n    def decorator(func: CommandCallback[CogT, ContextT, P, T]) -> HybridCommand[CogT, P, T]:\n        if isinstance(func, Command):\n            raise TypeError('Callback is already a command.')\n        return HybridCommand(func, name=name, with_app_command=with_app_command, **attrs)\n\n    return decorator\n\n\ndef hybrid_group(\n    name: Union[str, app_commands.locale_str] = MISSING,\n    *,\n    with_app_command: bool = True,\n    **attrs: Any,\n) -> Callable[[CommandCallback[CogT, ContextT, P, T]], HybridGroup[CogT, P, T]]:\n    \"\"\"A decorator that transforms a function into a :class:`.HybridGroup`.\n\n    This is similar to the :func:`~discord.ext.commands.group` decorator except it creates\n    a hybrid group instead.\n\n    Parameters\n    -----------\n    name: Union[:class:`str`, :class:`~discord.app_commands.locale_str`]\n        The name to create the group with. By default this uses the\n        function name unchanged.\n    with_app_command: :class:`bool`\n        Whether to register the command also as an application command.\n\n    Raises\n    -------\n    TypeError\n        If the function is not a coroutine or is already a command.\n    \"\"\"\n\n    def decorator(func: CommandCallback[CogT, ContextT, P, T]) -> HybridGroup[CogT, P, T]:\n        if isinstance(func, Command):\n            raise TypeError('Callback is already a command.')\n        return HybridGroup(func, name=name, with_app_command=with_app_command, **attrs)\n\n    return decorator\n"
  },
  {
    "path": "discord/ext/commands/parameters.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom __future__ import annotations\n\nimport inspect\nfrom operator import attrgetter\nfrom typing import TYPE_CHECKING, Any, Literal, Optional, OrderedDict, Union, Protocol\n\nfrom discord.utils import MISSING, maybe_coroutine\n\nfrom .errors import NoPrivateMessage\nfrom .converter import GuildConverter\n\nfrom discord import (\n    Member,\n    User,\n    TextChannel,\n    VoiceChannel,\n    DMChannel,\n    Thread,\n)\n\nif TYPE_CHECKING:\n    from typing_extensions import Self\n\n    from discord import Guild\n\n    from .context import Context\n\n__all__ = (\n    'Parameter',\n    'parameter',\n    'param',\n    'Author',\n    'CurrentChannel',\n    'CurrentGuild',\n)\n\n\nParamKinds = Union[\n    Literal[inspect.Parameter.POSITIONAL_ONLY],\n    Literal[inspect.Parameter.POSITIONAL_OR_KEYWORD],\n    Literal[inspect.Parameter.VAR_POSITIONAL],\n    Literal[inspect.Parameter.KEYWORD_ONLY],\n    Literal[inspect.Parameter.VAR_KEYWORD],\n]\n\nempty: Any = inspect.Parameter.empty\n\n\ndef _gen_property(name: str) -> property:\n    attr = f'_{name}'\n    return property(\n        attrgetter(attr),\n        lambda self, value: setattr(self, attr, value),\n        doc=f\"The parameter's {name}.\",\n    )\n\n\nclass Parameter(inspect.Parameter):\n    r\"\"\"A class that stores information on a :class:`Command`\\'s parameter.\n\n    This is a subclass of :class:`inspect.Parameter`.\n\n    .. versionadded:: 2.0\n    \"\"\"\n\n    __slots__ = ('_displayed_default', '_description', '_fallback', '_displayed_name')\n\n    def __init__(\n        self,\n        name: str,\n        kind: ParamKinds,\n        default: Any = empty,\n        annotation: Any = empty,\n        description: str = empty,\n        displayed_default: str = empty,\n        displayed_name: str = empty,\n    ) -> None:\n        super().__init__(name=name, kind=kind, default=default, annotation=annotation)\n        self._name = name\n        self._kind = kind\n        self._description = description\n        self._default = default\n        self._annotation = annotation\n        self._displayed_default = displayed_default\n        self._fallback = False\n        self._displayed_name = displayed_name\n\n    def replace(\n        self,\n        *,\n        name: str = MISSING,  # MISSING here cause empty is valid\n        kind: ParamKinds = MISSING,\n        default: Any = MISSING,\n        annotation: Any = MISSING,\n        description: str = MISSING,\n        displayed_default: Any = MISSING,\n        displayed_name: Any = MISSING,\n    ) -> Self:\n        if name is MISSING:\n            name = self._name\n        if kind is MISSING:\n            kind = self._kind  # type: ignore  # this assignment is actually safe\n        if default is MISSING:\n            default = self._default\n        if annotation is MISSING:\n            annotation = self._annotation\n        if description is MISSING:\n            description = self._description\n        if displayed_default is MISSING:\n            displayed_default = self._displayed_default\n        if displayed_name is MISSING:\n            displayed_name = self._displayed_name\n\n        return self.__class__(\n            name=name,\n            kind=kind,\n            default=default,\n            annotation=annotation,\n            description=description,\n            displayed_default=displayed_default,\n            displayed_name=displayed_name,\n        )\n\n    if not TYPE_CHECKING:  # this is to prevent anything breaking if inspect internals change\n        name = _gen_property('name')\n        kind = _gen_property('kind')\n        default = _gen_property('default')\n        annotation = _gen_property('annotation')\n\n    @property\n    def required(self) -> bool:\n        \"\"\":class:`bool`: Whether this parameter is required.\"\"\"\n        return self.default is empty\n\n    @property\n    def converter(self) -> Any:\n        \"\"\"The converter that should be used for this parameter.\"\"\"\n        if self.annotation is empty:\n            return type(self.default) if self.default not in (empty, None) else str\n\n        return self.annotation\n\n    @property\n    def description(self) -> Optional[str]:\n        \"\"\"Optional[:class:`str`]: The description of this parameter.\"\"\"\n        return self._description if self._description is not empty else None\n\n    @property\n    def displayed_default(self) -> Optional[str]:\n        \"\"\"Optional[:class:`str`]: The displayed default in :class:`Command.signature`.\"\"\"\n        if self._displayed_default is not empty:\n            return self._displayed_default\n\n        if self.required:\n            return None\n\n        if callable(self.default) or self.default is None:\n            return None\n\n        return str(self.default)\n\n    @property\n    def displayed_name(self) -> Optional[str]:\n        \"\"\"Optional[:class:`str`]: The name that is displayed to the user.\n\n        .. versionadded:: 2.3\n        \"\"\"\n        return self._displayed_name if self._displayed_name is not empty else None\n\n    async def get_default(self, ctx: Context[Any]) -> Any:\n        \"\"\"|coro|\n\n        Gets this parameter's default value.\n\n        Parameters\n        ----------\n        ctx: :class:`Context`\n            The invocation context that is used to get the default argument.\n        \"\"\"\n        # pre-condition: required is False\n        if callable(self.default):\n            return await maybe_coroutine(self.default, ctx)\n        return self.default\n\n\ndef parameter(\n    *,\n    converter: Any = empty,\n    default: Any = empty,\n    description: str = empty,\n    displayed_default: str = empty,\n    displayed_name: str = empty,\n) -> Any:\n    r\"\"\"parameter(\\*, converter=..., default=..., description=..., displayed_default=..., displayed_name=...)\n\n    A way to assign custom metadata for a :class:`Command`\\'s parameter.\n\n    .. versionadded:: 2.0\n\n    Examples\n    --------\n    A custom default can be used to have late binding behaviour.\n\n    .. code-block:: python3\n\n        @bot.command()\n        async def wave(ctx, to: discord.User = commands.parameter(default=lambda ctx: ctx.author)):\n            await ctx.send(f'Hello {to.mention} :wave:')\n\n    Parameters\n    ----------\n    converter: Any\n        The converter to use for this parameter, this replaces the annotation at runtime which is transparent to type checkers.\n    default: Any\n        The default value for the parameter, if this is a :term:`callable` or a |coroutine_link|_ it is called with a\n        positional :class:`Context` argument.\n    description: :class:`str`\n        The description of this parameter.\n    displayed_default: :class:`str`\n        The displayed default in :attr:`Command.signature`.\n    displayed_name: :class:`str`\n        The name that is displayed to the user.\n\n        .. versionadded:: 2.3\n    \"\"\"\n    return Parameter(\n        name='empty',\n        kind=inspect.Parameter.POSITIONAL_OR_KEYWORD,\n        annotation=converter,\n        default=default,\n        description=description,\n        displayed_default=displayed_default,\n        displayed_name=displayed_name,\n    )\n\n\nclass ParameterAlias(Protocol):\n    def __call__(\n        self,\n        *,\n        converter: Any = empty,\n        default: Any = empty,\n        description: str = empty,\n        displayed_default: str = empty,\n        displayed_name: str = empty,\n    ) -> Any:\n        ...\n\n\nparam: ParameterAlias = parameter\nr\"\"\"param(\\*, converter=..., default=..., description=..., displayed_default=..., displayed_name=...)\n\nAn alias for :func:`parameter`.\n\n.. versionadded:: 2.0\n\"\"\"\n\n# some handy defaults\nAuthor = parameter(\n    default=attrgetter('author'),\n    displayed_default='<you>',\n    converter=Union[Member, User],\n)\nAuthor._fallback = True\n\nCurrentChannel = parameter(\n    default=attrgetter('channel'),\n    displayed_default='<this channel>',\n    converter=Union[TextChannel, DMChannel, Thread, VoiceChannel],\n)\nCurrentChannel._fallback = True\n\n\ndef default_guild(ctx: Context[Any]) -> Guild:\n    if ctx.guild is not None:\n        return ctx.guild\n    raise NoPrivateMessage()\n\n\nCurrentGuild = parameter(\n    default=default_guild,\n    displayed_default='<this server>',\n    converter=GuildConverter,\n)\nCurrentGuild._fallback = True\n\n\nclass Signature(inspect.Signature):\n    _parameter_cls = Parameter\n    parameters: OrderedDict[str, Parameter]\n"
  },
  {
    "path": "discord/ext/commands/view.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom __future__ import annotations\n\nfrom typing import Optional\n\nfrom .errors import UnexpectedQuoteError, InvalidEndOfQuotedStringError, ExpectedClosingQuoteError\n\n# map from opening quotes to closing quotes\n_quotes = {\n    '\"': '\"',\n    \"‘\": \"’\",\n    \"‚\": \"‛\",\n    \"“\": \"”\",\n    \"„\": \"‟\",\n    \"⹂\": \"⹂\",\n    \"「\": \"」\",\n    \"『\": \"』\",\n    \"〝\": \"〞\",\n    \"﹁\": \"﹂\",\n    \"﹃\": \"﹄\",\n    \"＂\": \"＂\",\n    \"｢\": \"｣\",\n    \"«\": \"»\",\n    \"‹\": \"›\",\n    \"《\": \"》\",\n    \"〈\": \"〉\",\n}\n_all_quotes = set(_quotes.keys()) | set(_quotes.values())\n\n\nclass StringView:\n    def __init__(self, buffer: str) -> None:\n        self.index: int = 0\n        self.buffer: str = buffer\n        self.end: int = len(buffer)\n        self.previous = 0\n\n    @property\n    def current(self) -> Optional[str]:\n        return None if self.eof else self.buffer[self.index]\n\n    @property\n    def eof(self) -> bool:\n        return self.index >= self.end\n\n    def undo(self) -> None:\n        self.index = self.previous\n\n    def skip_ws(self) -> bool:\n        pos = 0\n        while not self.eof:\n            try:\n                current = self.buffer[self.index + pos]\n                if not current.isspace():\n                    break\n                pos += 1\n            except IndexError:\n                break\n\n        self.previous = self.index\n        self.index += pos\n        return self.previous != self.index\n\n    def skip_string(self, string: str) -> bool:\n        strlen = len(string)\n        if self.buffer[self.index : self.index + strlen] == string:\n            self.previous = self.index\n            self.index += strlen\n            return True\n        return False\n\n    def read_rest(self) -> str:\n        result = self.buffer[self.index :]\n        self.previous = self.index\n        self.index = self.end\n        return result\n\n    def read(self, n: int) -> str:\n        result = self.buffer[self.index : self.index + n]\n        self.previous = self.index\n        self.index += n\n        return result\n\n    def get(self) -> Optional[str]:\n        try:\n            result = self.buffer[self.index + 1]\n        except IndexError:\n            result = None\n\n        self.previous = self.index\n        self.index += 1\n        return result\n\n    def get_word(self) -> str:\n        pos = 0\n        while not self.eof:\n            try:\n                current = self.buffer[self.index + pos]\n                if current.isspace():\n                    break\n                pos += 1\n            except IndexError:\n                break\n        self.previous: int = self.index\n        result = self.buffer[self.index : self.index + pos]\n        self.index += pos\n        return result\n\n    def get_quoted_word(self) -> Optional[str]:\n        current = self.current\n        if current is None:\n            return None\n\n        close_quote = _quotes.get(current)\n        is_quoted = bool(close_quote)\n        if is_quoted:\n            result = []\n            _escaped_quotes = (current, close_quote)\n        else:\n            result = [current]\n            _escaped_quotes = _all_quotes\n\n        while not self.eof:\n            current = self.get()\n            if not current:\n                if is_quoted:\n                    # unexpected EOF\n                    raise ExpectedClosingQuoteError(close_quote)\n                return ''.join(result)\n\n            # currently we accept strings in the format of \"hello world\"\n            # to embed a quote inside the string you must escape it: \"a \\\"world\\\"\"\n            if current == '\\\\':\n                next_char = self.get()\n                if not next_char:\n                    # string ends with \\ and no character after it\n                    if is_quoted:\n                        # if we're quoted then we're expecting a closing quote\n                        raise ExpectedClosingQuoteError(close_quote)\n                    # if we aren't then we just let it through\n                    return ''.join(result)\n\n                if next_char in _escaped_quotes:\n                    # escaped quote\n                    result.append(next_char)\n                else:\n                    # different escape character, ignore it\n                    self.undo()\n                    result.append(current)\n                continue\n\n            if not is_quoted and current in _all_quotes:\n                # we aren't quoted\n                raise UnexpectedQuoteError(current)\n\n            # closing quote\n            if is_quoted and current == close_quote:\n                next_char = self.get()\n                valid_eof = not next_char or next_char.isspace()\n                if not valid_eof:\n                    raise InvalidEndOfQuotedStringError(next_char)  # type: ignore # this will always be a string\n\n                # we're quoted so it's okay\n                return ''.join(result)\n\n            if current.isspace() and not is_quoted:\n                # end of word found\n                return ''.join(result)\n\n            result.append(current)\n\n    def __repr__(self) -> str:\n        return f'<StringView pos: {self.index} prev: {self.previous} end: {self.end} eof: {self.eof}>'\n"
  },
  {
    "path": "discord/ext/tasks/__init__.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom __future__ import annotations\n\nimport asyncio\nimport datetime\nimport logging\nfrom typing import (\n    Any,\n    Callable,\n    Coroutine,\n    Generic,\n    List,\n    Optional,\n    Type,\n    TypeVar,\n    Union,\n)\n\nimport aiohttp\nimport discord\nimport inspect\n\nfrom collections.abc import Sequence\nfrom discord.backoff import ExponentialBackoff\nfrom discord.utils import MISSING\n\n_log = logging.getLogger(__name__)\n\n# fmt: off\n__all__ = (\n    'loop',\n)\n# fmt: on\n\nT = TypeVar('T')\n_func = Callable[..., Coroutine[Any, Any, Any]]\nLF = TypeVar('LF', bound=_func)\nFT = TypeVar('FT', bound=_func)\nET = TypeVar('ET', bound=Callable[[Any, BaseException], Coroutine[Any, Any, Any]])\n\n\ndef is_ambiguous(dt: datetime.datetime) -> bool:\n    if dt.tzinfo is None or isinstance(dt.tzinfo, datetime.timezone):\n        # Naive or fixed timezones are never ambiguous\n        return False\n\n    before = dt.replace(fold=0)\n    after = dt.replace(fold=1)\n\n    same_offset = before.utcoffset() == after.utcoffset()\n    same_dst = before.dst() == after.dst()\n    return not (same_offset and same_dst)\n\n\ndef is_imaginary(dt: datetime.datetime) -> bool:\n    if dt.tzinfo is None or isinstance(dt.tzinfo, datetime.timezone):\n        # Naive or fixed timezones are never imaginary\n        return False\n\n    tz = dt.tzinfo\n    dt = dt.replace(tzinfo=None)\n    roundtrip = dt.replace(tzinfo=tz).astimezone(datetime.timezone.utc).astimezone(tz).replace(tzinfo=None)\n    return dt != roundtrip\n\n\ndef resolve_datetime(dt: datetime.datetime) -> datetime.datetime:\n    if dt.tzinfo is None or isinstance(dt.tzinfo, datetime.timezone):\n        # Naive or fixed requires no resolution\n        return dt\n\n    if is_imaginary(dt):\n        # Largest gap is probably 24 hours\n        tomorrow = dt + datetime.timedelta(days=1)\n        yesterday = dt - datetime.timedelta(days=1)\n        # utcoffset shouldn't return None since these are aware instances\n        # If it returns None then the timezone implementation was broken from the get go\n        return dt + (tomorrow.utcoffset() - yesterday.utcoffset())  # type: ignore\n    elif is_ambiguous(dt):\n        return dt.replace(fold=1)\n    else:\n        return dt\n\n\nclass SleepHandle:\n    __slots__ = ('future', 'loop', 'handle')\n\n    def __init__(self, dt: datetime.datetime, *, loop: asyncio.AbstractEventLoop) -> None:\n        self.loop: asyncio.AbstractEventLoop = loop\n        self.future: asyncio.Future[None] = loop.create_future()\n        relative_delta = discord.utils.compute_timedelta(dt)\n        self.handle = loop.call_later(relative_delta, self.future.set_result, None)\n\n    def recalculate(self, dt: datetime.datetime) -> None:\n        self.handle.cancel()\n        relative_delta = discord.utils.compute_timedelta(dt)\n        self.handle: asyncio.TimerHandle = self.loop.call_later(relative_delta, self.future.set_result, None)\n\n    def wait(self) -> asyncio.Future[Any]:\n        return self.future\n\n    def done(self) -> bool:\n        return self.future.done()\n\n    def cancel(self) -> None:\n        self.handle.cancel()\n        self.future.cancel()\n\n\nclass Loop(Generic[LF]):\n    \"\"\"A background task helper that abstracts the loop and reconnection logic for you.\n\n    The main interface to create this is through :func:`loop`.\n    \"\"\"\n\n    def __init__(\n        self,\n        coro: LF,\n        seconds: float,\n        hours: float,\n        minutes: float,\n        time: Union[datetime.time, Sequence[datetime.time]],\n        count: Optional[int],\n        reconnect: bool,\n        name: Optional[str],\n    ) -> None:\n        self.coro: LF = coro\n        self.reconnect: bool = reconnect\n        self.count: Optional[int] = count\n        self._current_loop = 0\n        self._handle: Optional[SleepHandle] = None\n        self._task: Optional[asyncio.Task[None]] = None\n        self._injected = None\n        self._valid_exception = (\n            OSError,\n            discord.GatewayNotFound,\n            discord.ConnectionClosed,\n            aiohttp.ClientError,\n            asyncio.TimeoutError,\n        )\n\n        self._before_loop = None\n        self._after_loop = None\n        self._is_being_cancelled = False\n        self._has_failed = False\n        self._stop_next_iteration = False\n        self._name: str = f'discord-ext-tasks: {coro.__qualname__}' if name is None else name\n\n        if self.count is not None and self.count <= 0:\n            raise ValueError('count must be greater than 0 or None.')\n\n        self.change_interval(seconds=seconds, minutes=minutes, hours=hours, time=time)\n        self._last_iteration_failed = False\n        self._last_iteration: datetime.datetime = MISSING\n        self._next_iteration = None\n\n        if not inspect.iscoroutinefunction(self.coro):\n            raise TypeError(f'Expected coroutine function, not {type(self.coro).__name__!r}.')\n\n    async def _call_loop_function(self, name: str, *args: Any, **kwargs: Any) -> None:\n        coro = getattr(self, '_' + name)\n        if coro is None:\n            return\n\n        if self._injected is not None:\n            await coro(self._injected, *args, **kwargs)\n        else:\n            await coro(*args, **kwargs)\n\n    def _try_sleep_until(self, dt: datetime.datetime):\n        self._handle = SleepHandle(dt=dt, loop=asyncio.get_running_loop())\n        return self._handle.wait()\n\n    def _is_relative_time(self) -> bool:\n        return self._time is MISSING\n\n    def _is_explicit_time(self) -> bool:\n        return self._time is not MISSING\n\n    async def _loop(self, *args: Any, **kwargs: Any) -> None:\n        backoff = ExponentialBackoff()\n        await self._call_loop_function('before_loop')\n        self._last_iteration_failed = False\n        if self._is_explicit_time():\n            self._next_iteration = self._get_next_sleep_time()\n        else:\n            self._next_iteration = datetime.datetime.now(datetime.timezone.utc)\n            await asyncio.sleep(0)  # allows canceling in before_loop\n        try:\n            if self._stop_next_iteration:  # allow calling stop() before first iteration\n                return\n            while True:\n                # sleep before the body of the task for explicit time intervals\n                if self._is_explicit_time():\n                    await self._try_sleep_until(self._next_iteration)\n                if not self._last_iteration_failed:\n                    self._last_iteration = self._next_iteration\n                    self._next_iteration = self._get_next_sleep_time()\n\n                    # In order to account for clock drift, we need to ensure that\n                    # the next iteration always follows the last iteration.\n                    # Sometimes asyncio is cheeky and wakes up a few microseconds before our target\n                    # time, causing it to repeat a run.\n                    while self._is_explicit_time() and self._next_iteration <= self._last_iteration:\n                        _log.warn(\n                            (\n                                'Clock drift detected for task %s. Woke up at %s but needed to sleep until %s. '\n                                'Sleeping until %s again to correct clock'\n                            ),\n                            self.coro.__qualname__,\n                            discord.utils.utcnow(),\n                            self._next_iteration,\n                            self._next_iteration,\n                        )\n                        await self._try_sleep_until(self._next_iteration)\n                        self._next_iteration = self._get_next_sleep_time()\n\n                try:\n                    await self.coro(*args, **kwargs)\n                    self._last_iteration_failed = False\n                except self._valid_exception:\n                    self._last_iteration_failed = True\n                    if not self.reconnect:\n                        raise\n                    await asyncio.sleep(backoff.delay())\n                else:\n                    if self._stop_next_iteration:\n                        return\n\n                    # sleep after the body of the task for relative time intervals\n                    if self._is_relative_time():\n                        await self._try_sleep_until(self._next_iteration)\n\n                    self._current_loop += 1\n                    if self._current_loop == self.count:\n                        break\n\n        except asyncio.CancelledError:\n            self._is_being_cancelled = True\n            raise\n        except Exception as exc:\n            self._has_failed = True\n            await self._call_loop_function('error', exc)\n            raise exc\n        finally:\n            await self._call_loop_function('after_loop')\n            if self._handle:\n                self._handle.cancel()\n            self._is_being_cancelled = False\n            self._current_loop = 0\n            self._stop_next_iteration = False\n\n    def __get__(self, obj: T, objtype: Type[T]) -> Loop[LF]:\n        if obj is None:\n            return self\n\n        copy: Loop[LF] = Loop(\n            self.coro,\n            seconds=self._seconds,\n            hours=self._hours,\n            minutes=self._minutes,\n            time=self._time,\n            count=self.count,\n            reconnect=self.reconnect,\n            name=self._name,\n        )\n        copy._injected = obj\n        copy._before_loop = self._before_loop\n        copy._after_loop = self._after_loop\n        copy._error = self._error\n        setattr(obj, self.coro.__name__, copy)\n        return copy\n\n    @property\n    def seconds(self) -> Optional[float]:\n        \"\"\"Optional[:class:`float`]: Read-only value for the number of seconds\n        between each iteration. ``None`` if an explicit ``time`` value was passed instead.\n\n        .. versionadded:: 2.0\n        \"\"\"\n        if self._seconds is not MISSING:\n            return self._seconds\n\n    @property\n    def minutes(self) -> Optional[float]:\n        \"\"\"Optional[:class:`float`]: Read-only value for the number of minutes\n        between each iteration. ``None`` if an explicit ``time`` value was passed instead.\n\n        .. versionadded:: 2.0\n        \"\"\"\n        if self._minutes is not MISSING:\n            return self._minutes\n\n    @property\n    def hours(self) -> Optional[float]:\n        \"\"\"Optional[:class:`float`]: Read-only value for the number of hours\n        between each iteration. ``None`` if an explicit ``time`` value was passed instead.\n\n        .. versionadded:: 2.0\n        \"\"\"\n        if self._hours is not MISSING:\n            return self._hours\n\n    @property\n    def time(self) -> Optional[List[datetime.time]]:\n        \"\"\"Optional[List[:class:`datetime.time`]]: Read-only list for the exact times this loop runs at.\n        ``None`` if relative times were passed instead.\n\n        .. versionadded:: 2.0\n        \"\"\"\n        if self._time is not MISSING:\n            return self._time.copy()\n\n    @property\n    def current_loop(self) -> int:\n        \"\"\":class:`int`: The current iteration of the loop.\"\"\"\n        return self._current_loop\n\n    @property\n    def next_iteration(self) -> Optional[datetime.datetime]:\n        \"\"\"Optional[:class:`datetime.datetime`]: When the next iteration of the loop will occur.\n\n        .. versionadded:: 1.3\n        \"\"\"\n        if self._task is MISSING:\n            return None\n        elif self._task and self._task.done() or self._stop_next_iteration:\n            return None\n        return self._next_iteration\n\n    async def __call__(self, *args: Any, **kwargs: Any) -> Any:\n        r\"\"\"|coro|\n\n        Calls the internal callback that the task holds.\n\n        .. versionadded:: 1.6\n\n        Parameters\n        ------------\n        \\*args\n            The arguments to use.\n        \\*\\*kwargs\n            The keyword arguments to use.\n        \"\"\"\n\n        if self._injected is not None:\n            args = (self._injected, *args)\n\n        return await self.coro(*args, **kwargs)\n\n    def start(self, *args: Any, **kwargs: Any) -> asyncio.Task[None]:\n        r\"\"\"Starts the internal task in the event loop.\n\n        Parameters\n        ------------\n        \\*args\n            The arguments to use.\n        \\*\\*kwargs\n            The keyword arguments to use.\n\n        Raises\n        --------\n        RuntimeError\n            A task has already been launched and is running.\n\n        Returns\n        ---------\n        :class:`asyncio.Task`\n            The task that has been created.\n        \"\"\"\n\n        if self._task and not self._task.done():\n            raise RuntimeError('Task is already launched and is not completed.')\n\n        if self._injected is not None:\n            args = (self._injected, *args)\n\n        self._has_failed = False\n        self._task = asyncio.create_task(self._loop(*args, **kwargs), name=self._name)\n        return self._task\n\n    def stop(self) -> None:\n        r\"\"\"Gracefully stops the task from running.\n\n        Unlike :meth:`cancel`\\, this allows the task to finish its\n        current iteration before gracefully exiting.\n\n        .. note::\n\n            If the internal function raises an error that can be\n            handled before finishing then it will retry until\n            it succeeds.\n\n            If this is undesirable, either remove the error handling\n            before stopping via :meth:`clear_exception_types` or\n            use :meth:`cancel` instead.\n\n        .. versionchanged:: 2.0\n            Calling this method in :meth:`before_loop` will stop the loop before the initial iteration is run.\n\n        .. versionadded:: 1.2\n        \"\"\"\n        if self._task and not self._task.done():\n            self._stop_next_iteration = True\n\n    def _can_be_cancelled(self) -> bool:\n        return bool(not self._is_being_cancelled and self._task and not self._task.done())\n\n    def cancel(self) -> None:\n        \"\"\"Cancels the internal task, if it is running.\"\"\"\n        if self._can_be_cancelled() and self._task:\n            self._task.cancel()\n\n    def restart(self, *args: Any, **kwargs: Any) -> None:\n        r\"\"\"A convenience method to restart the internal task.\n\n        .. note::\n\n            Due to the way this function works, the task is not\n            returned like :meth:`start`.\n\n        Parameters\n        ------------\n        \\*args\n            The arguments to use.\n        \\*\\*kwargs\n            The keyword arguments to use.\n        \"\"\"\n\n        def restart_when_over(fut: Any, *, args: Any = args, kwargs: Any = kwargs) -> None:\n            if self._task:\n                self._task.remove_done_callback(restart_when_over)\n            self.start(*args, **kwargs)\n\n        if self._can_be_cancelled() and self._task:\n            self._task.add_done_callback(restart_when_over)\n            self._task.cancel()\n\n    def add_exception_type(self, *exceptions: Type[BaseException]) -> None:\n        r\"\"\"Adds exception types to be handled during the reconnect logic.\n\n        By default the exception types handled are those handled by\n        :meth:`discord.Client.connect`\\, which includes a lot of internet disconnection\n        errors.\n\n        This function is useful if you're interacting with a 3rd party library that\n        raises its own set of exceptions.\n\n        Parameters\n        ------------\n        \\*exceptions: Type[:class:`BaseException`]\n            An argument list of exception classes to handle.\n\n        Raises\n        --------\n        TypeError\n            An exception passed is either not a class or not inherited from :class:`BaseException`.\n        \"\"\"\n\n        for exc in exceptions:\n            if not inspect.isclass(exc):\n                raise TypeError(f'{exc!r} must be a class.')\n            if not issubclass(exc, BaseException):\n                raise TypeError(f'{exc!r} must inherit from BaseException.')\n\n        self._valid_exception = (*self._valid_exception, *exceptions)\n\n    def clear_exception_types(self) -> None:\n        \"\"\"Removes all exception types that are handled.\n\n        .. note::\n\n            This operation obviously cannot be undone!\n        \"\"\"\n        self._valid_exception = ()\n\n    def remove_exception_type(self, *exceptions: Type[BaseException]) -> bool:\n        r\"\"\"Removes exception types from being handled during the reconnect logic.\n\n        Parameters\n        ------------\n        \\*exceptions: Type[:class:`BaseException`]\n            An argument list of exception classes to handle.\n\n        Returns\n        ---------\n        :class:`bool`\n            Whether all exceptions were successfully removed.\n        \"\"\"\n        old_length = len(self._valid_exception)\n        self._valid_exception = tuple(x for x in self._valid_exception if x not in exceptions)\n        return len(self._valid_exception) == old_length - len(exceptions)\n\n    def get_task(self) -> Optional[asyncio.Task[None]]:\n        \"\"\"Optional[:class:`asyncio.Task`]: Fetches the internal task or ``None`` if there isn't one running.\"\"\"\n        return self._task if self._task is not MISSING else None\n\n    def is_being_cancelled(self) -> bool:\n        \"\"\"Whether the task is being cancelled.\"\"\"\n        return self._is_being_cancelled\n\n    def failed(self) -> bool:\n        \"\"\":class:`bool`: Whether the internal task has failed.\n\n        .. versionadded:: 1.2\n        \"\"\"\n        return self._has_failed\n\n    def is_running(self) -> bool:\n        \"\"\":class:`bool`: Check if the task is currently running.\n\n        .. versionadded:: 1.4\n        \"\"\"\n        return not bool(self._task.done()) if self._task else False\n\n    async def _error(self, *args: Any) -> None:\n        exception: Exception = args[-1]\n        _log.error('Unhandled exception in internal background task %r.', self.coro.__name__, exc_info=exception)\n\n    def before_loop(self, coro: FT) -> FT:\n        \"\"\"A decorator that registers a coroutine to be called before the loop starts running.\n\n        This is useful if you want to wait for some bot state before the loop starts,\n        such as :meth:`discord.Client.wait_until_ready`.\n\n        The coroutine must take no arguments (except ``self`` in a class context).\n\n        .. versionchanged:: 2.0\n            Calling :meth:`stop` in this coroutine will stop the loop before the initial iteration is run.\n\n        Parameters\n        ------------\n        coro: :ref:`coroutine <coroutine>`\n            The coroutine to register before the loop runs.\n\n        Raises\n        -------\n        TypeError\n            The function was not a coroutine.\n        \"\"\"\n\n        if not inspect.iscoroutinefunction(coro):\n            raise TypeError(f'Expected coroutine function, received {coro.__class__.__name__}.')\n\n        self._before_loop = coro\n        return coro\n\n    def after_loop(self, coro: FT) -> FT:\n        \"\"\"A decorator that registers a coroutine to be called after the loop finishes running.\n\n        The coroutine must take no arguments (except ``self`` in a class context).\n\n        .. note::\n\n            This coroutine is called even during cancellation. If it is desirable\n            to tell apart whether something was cancelled or not, check to see\n            whether :meth:`is_being_cancelled` is ``True`` or not.\n\n        Parameters\n        ------------\n        coro: :ref:`coroutine <coroutine>`\n            The coroutine to register after the loop finishes.\n\n        Raises\n        -------\n        TypeError\n            The function was not a coroutine.\n        \"\"\"\n\n        if not inspect.iscoroutinefunction(coro):\n            raise TypeError(f'Expected coroutine function, received {coro.__class__.__name__}.')\n\n        self._after_loop = coro\n        return coro\n\n    def error(self, coro: ET) -> ET:\n        \"\"\"A decorator that registers a coroutine to be called if the task encounters an unhandled exception.\n\n        The coroutine must take only one argument the exception raised (except ``self`` in a class context).\n\n        By default this logs to the library logger however it could be\n        overridden to have a different implementation.\n\n        .. versionadded:: 1.4\n\n        .. versionchanged:: 2.0\n\n            Instead of writing to ``sys.stderr``, the library's logger is used.\n\n        Parameters\n        ------------\n        coro: :ref:`coroutine <coroutine>`\n            The coroutine to register in the event of an unhandled exception.\n\n        Raises\n        -------\n        TypeError\n            The function was not a coroutine.\n        \"\"\"\n        if not inspect.iscoroutinefunction(coro):\n            raise TypeError(f'Expected coroutine function, received {coro.__class__.__name__}.')\n\n        self._error = coro  # type: ignore\n        return coro\n\n    def _get_next_sleep_time(self, now: datetime.datetime = MISSING) -> datetime.datetime:\n        if self._sleep is not MISSING:\n            return self._last_iteration + datetime.timedelta(seconds=self._sleep)\n\n        if now is MISSING:\n            now = datetime.datetime.now(datetime.timezone.utc)\n\n        index = self._start_time_relative_to(now)\n\n        if index is None:\n            time = self._time[0]\n            tomorrow = now.astimezone(time.tzinfo) + datetime.timedelta(days=1)\n            date = tomorrow.date()\n        else:\n            time = self._time[index]\n            date = now.astimezone(time.tzinfo).date()\n\n        dt = datetime.datetime.combine(date, time, tzinfo=time.tzinfo)\n        return resolve_datetime(dt)\n\n    def _start_time_relative_to(self, now: datetime.datetime) -> Optional[int]:\n        # now kwarg should be a datetime.datetime representing the time \"now\"\n        # to calculate the next time index from\n\n        # pre-condition: self._time is set\n\n        # Sole time comparisons are apparently broken, therefore, attach today's date\n        # to it in order to make the comparisons make sense.\n        # For example, if given a list of times [0, 3, 18]\n        # If it's 04:00 today then we know we have to wait until 18:00 today\n        # If it's 19:00 today then we know we we have to wait until 00:00 tomorrow\n        # Note that timezones need to be taken into consideration for this to work.\n        # If the timezone is set to UTC+9 and the now timezone is UTC\n        # A conversion needs to be done.\n        # i.e. 03:00 UTC+9 -> 18:00 UTC the previous day\n        for idx, time in enumerate(self._time):\n            # Convert the current time to the target timezone\n            # e.g. 18:00 UTC -> 03:00 UTC+9\n            # Then compare the time instances to see if they're the same\n            start = now.astimezone(time.tzinfo)\n            if time >= start.timetz():\n                return idx\n        else:\n            return None\n\n    def _get_time_parameter(\n        self,\n        time: Union[datetime.time, Sequence[datetime.time]],\n        *,\n        dt: Type[datetime.time] = datetime.time,\n        utc: datetime.timezone = datetime.timezone.utc,\n    ) -> List[datetime.time]:\n        if isinstance(time, dt):\n            inner = time if time.tzinfo is not None else time.replace(tzinfo=utc)\n            return [inner]\n        if not isinstance(time, Sequence):\n            raise TypeError(\n                f'Expected datetime.time or a sequence of datetime.time for ``time``, received {type(time)!r} instead.'\n            )\n        if not time:\n            raise ValueError('time parameter must not be an empty sequence.')\n\n        ret: List[datetime.time] = []\n        for index, t in enumerate(time):\n            if not isinstance(t, dt):\n                raise TypeError(\n                    f'Expected a sequence of {dt!r} for ``time``, received {type(t).__name__!r} at index {index} instead.'\n                )\n            ret.append(t if t.tzinfo is not None else t.replace(tzinfo=utc))\n\n        ret = sorted(set(ret))  # de-dupe and sort times\n        return ret\n\n    def change_interval(\n        self,\n        *,\n        seconds: float = 0,\n        minutes: float = 0,\n        hours: float = 0,\n        time: Union[datetime.time, Sequence[datetime.time]] = MISSING,\n    ) -> None:\n        \"\"\"Changes the interval for the sleep time.\n\n        .. versionadded:: 1.2\n\n        Parameters\n        ------------\n        seconds: :class:`float`\n            The number of seconds between every iteration.\n        minutes: :class:`float`\n            The number of minutes between every iteration.\n        hours: :class:`float`\n            The number of hours between every iteration.\n        time: Union[:class:`datetime.time`, Sequence[:class:`datetime.time`]]\n            The exact times to run this loop at. Either a non-empty list or a single\n            value of :class:`datetime.time` should be passed.\n            This cannot be used in conjunction with the relative time parameters.\n\n            .. versionadded:: 2.0\n\n            .. note::\n\n                Duplicate times will be ignored, and only run once.\n\n        Raises\n        -------\n        ValueError\n            An invalid value was given.\n        TypeError\n            An invalid value for the ``time`` parameter was passed, or the\n            ``time`` parameter was passed in conjunction with relative time parameters.\n        \"\"\"\n\n        if time is MISSING:\n            seconds = seconds or 0\n            minutes = minutes or 0\n            hours = hours or 0\n            sleep = seconds + (minutes * 60.0) + (hours * 3600.0)\n            if sleep < 0:\n                raise ValueError('Total number of seconds cannot be less than zero.')\n\n            self._sleep = sleep\n            self._seconds = float(seconds)\n            self._hours = float(hours)\n            self._minutes = float(minutes)\n            self._time: List[datetime.time] = MISSING\n        else:\n            if any((seconds, minutes, hours)):\n                raise TypeError('Cannot mix explicit time with relative time')\n            self._time = self._get_time_parameter(time)\n            self._sleep = self._seconds = self._minutes = self._hours = MISSING\n\n        # Only update the interval if we've ran the body at least once\n        if self.is_running() and self._last_iteration is not MISSING:\n            self._next_iteration = self._get_next_sleep_time()\n            if self._handle and not self._handle.done():\n                # the loop is sleeping, recalculate based on new interval\n                self._handle.recalculate(self._next_iteration)\n\n\ndef loop(\n    *,\n    seconds: float = MISSING,\n    minutes: float = MISSING,\n    hours: float = MISSING,\n    time: Union[datetime.time, Sequence[datetime.time]] = MISSING,\n    count: Optional[int] = None,\n    reconnect: bool = True,\n    name: Optional[str] = None,\n) -> Callable[[LF], Loop[LF]]:\n    \"\"\"A decorator that schedules a task in the background for you with\n    optional reconnect logic. The decorator returns a :class:`Loop`.\n\n    Parameters\n    ------------\n    seconds: :class:`float`\n        The number of seconds between every iteration.\n    minutes: :class:`float`\n        The number of minutes between every iteration.\n    hours: :class:`float`\n        The number of hours between every iteration.\n    time: Union[:class:`datetime.time`, Sequence[:class:`datetime.time`]]\n        The exact times to run this loop at. Either a non-empty list or a single\n        value of :class:`datetime.time` should be passed. Timezones are supported.\n        If no timezone is given for the times, it is assumed to represent UTC time.\n\n        This cannot be used in conjunction with the relative time parameters.\n\n        .. note::\n\n            Duplicate times will be ignored, and only run once.\n\n        .. versionadded:: 2.0\n\n    count: Optional[:class:`int`]\n        The number of loops to do, ``None`` if it should be an\n        infinite loop.\n    reconnect: :class:`bool`\n        Whether to handle errors and restart the task\n        using an exponential back-off algorithm similar to the\n        one used in :meth:`discord.Client.connect`.\n    name: Optional[:class:`str`]\n        The name to assign to the internal task. By default\n        it is assigned a name based off of the callable name\n        such as ``discord-ext-tasks: function_name``.\n\n        .. versionadded:: 2.4\n\n    Raises\n    --------\n    ValueError\n        An invalid value was given.\n    TypeError\n        The function was not a coroutine, an invalid value for the ``time`` parameter was passed,\n        or ``time`` parameter was passed in conjunction with relative time parameters.\n    \"\"\"\n\n    def decorator(func: LF) -> Loop[LF]:\n        return Loop[LF](\n            func,\n            seconds=seconds,\n            minutes=minutes,\n            hours=hours,\n            count=count,\n            time=time,\n            reconnect=reconnect,\n            name=name,\n        )\n\n    return decorator\n"
  },
  {
    "path": "discord/file.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom __future__ import annotations\nfrom typing import Any, Dict, Optional, Tuple, Union\n\nimport os\nimport io\n\nfrom .utils import MISSING\n\n# fmt: off\n__all__ = (\n    'File',\n)\n# fmt: on\n\n\ndef _strip_spoiler(filename: str) -> Tuple[str, bool]:\n    stripped = filename\n    while stripped.startswith('SPOILER_'):\n        stripped = stripped[8:]  # len('SPOILER_')\n    spoiler = stripped != filename\n    return stripped, spoiler\n\n\nclass File:\n    r\"\"\"A parameter object used for :meth:`abc.Messageable.send`\n    for sending file objects.\n\n    .. note::\n\n        File objects are single use and are not meant to be reused in\n        multiple :meth:`abc.Messageable.send`\\s.\n\n    Attributes\n    -----------\n    fp: Union[:class:`os.PathLike`, :class:`io.BufferedIOBase`]\n        A file-like object opened in binary mode and read mode\n        or a filename representing a file in the hard drive to\n        open.\n\n        .. note::\n\n            If the file-like object passed is opened via ``open`` then the\n            modes 'rb' should be used.\n\n            To pass binary data, consider usage of ``io.BytesIO``.\n\n    spoiler: :class:`bool`\n        Whether the attachment is a spoiler. If left unspecified, the :attr:`~File.filename` is used\n        to determine if the file is a spoiler.\n    description: Optional[:class:`str`]\n        The file description to display, currently only supported for images.\n\n        .. versionadded:: 2.0\n    \"\"\"\n\n    __slots__ = ('fp', '_filename', 'spoiler', 'description', '_original_pos', '_owner', '_closer')\n\n    def __init__(\n        self,\n        fp: Union[str, bytes, os.PathLike[Any], io.BufferedIOBase],\n        filename: Optional[str] = None,\n        *,\n        spoiler: bool = MISSING,\n        description: Optional[str] = None,\n    ):\n        if isinstance(fp, io.IOBase):\n            if not (fp.seekable() and fp.readable()):\n                raise ValueError(f'File buffer {fp!r} must be seekable and readable')\n            self.fp: io.BufferedIOBase = fp\n            self._original_pos = fp.tell()\n            self._owner = False\n        else:\n            self.fp = open(fp, 'rb')\n            self._original_pos = 0\n            self._owner = True\n\n        # aiohttp only uses two methods from IOBase\n        # read and close, since I want to control when the files\n        # close, I need to stub it so it doesn't close unless\n        # I tell it to\n        self._closer = self.fp.close\n        self.fp.close = lambda: None\n\n        if filename is None:\n            if isinstance(fp, str):\n                _, filename = os.path.split(fp)\n            else:\n                filename = getattr(fp, 'name', 'untitled')\n\n        self._filename, filename_spoiler = _strip_spoiler(filename)  # type: ignore  # pyright doesn't understand the above getattr\n        if spoiler is MISSING:\n            spoiler = filename_spoiler\n\n        self.spoiler: bool = spoiler\n        self.description: Optional[str] = description\n\n    @property\n    def filename(self) -> str:\n        \"\"\":class:`str`: The filename to display when uploading to Discord.\n        If this is not given then it defaults to ``fp.name`` or if ``fp`` is\n        a string then the ``filename`` will default to the string given.\n        \"\"\"\n        return 'SPOILER_' + self._filename if self.spoiler else self._filename\n\n    @filename.setter\n    def filename(self, value: str) -> None:\n        self._filename, self.spoiler = _strip_spoiler(value)\n\n    def reset(self, *, seek: Union[int, bool] = True) -> None:\n        # The `seek` parameter is needed because\n        # the retry-loop is iterated over multiple times\n        # starting from 0, as an implementation quirk\n        # the resetting must be done at the beginning\n        # before a request is done, since the first index\n        # is 0, and thus false, then this prevents an\n        # unnecessary seek since it's the first request\n        # done.\n        if seek:\n            self.fp.seek(self._original_pos)\n\n    def close(self) -> None:\n        self.fp.close = self._closer\n        if self._owner:\n            self._closer()\n\n    def to_dict(self, index: int) -> Dict[str, Any]:\n        payload = {\n            'id': index,\n            'filename': self.filename,\n        }\n\n        if self.description is not None:\n            payload['description'] = self.description\n\n        return payload\n"
  },
  {
    "path": "discord/flags.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom __future__ import annotations\n\nfrom functools import reduce\nfrom operator import or_\nfrom typing import (\n    TYPE_CHECKING,\n    Any,\n    Callable,\n    ClassVar,\n    Dict,\n    Iterator,\n    List,\n    Optional,\n    Sequence,\n    Tuple,\n    Type,\n    TypeVar,\n    overload,\n)\n\nfrom .enums import UserFlags\n\nif TYPE_CHECKING:\n    from typing_extensions import Self\n\n\n__all__ = (\n    'SystemChannelFlags',\n    'MessageFlags',\n    'PublicUserFlags',\n    'Intents',\n    'MemberCacheFlags',\n    'ApplicationFlags',\n    'ChannelFlags',\n    'AutoModPresets',\n    'MemberFlags',\n    'AppCommandContext',\n    'AttachmentFlags',\n    'RoleFlags',\n    'AppInstallationType',\n    'SKUFlags',\n)\n\nBF = TypeVar('BF', bound='BaseFlags')\n\n\nclass flag_value:\n    def __init__(self, func: Callable[[Any], int]):\n        self.flag: int = func(None)\n        self.__doc__: Optional[str] = func.__doc__\n\n    @overload\n    def __get__(self, instance: None, owner: Type[BF]) -> Self:\n        ...\n\n    @overload\n    def __get__(self, instance: BF, owner: Type[BF]) -> bool:\n        ...\n\n    def __get__(self, instance: Optional[BF], owner: Type[BF]) -> Any:\n        if instance is None:\n            return self\n        return instance._has_flag(self.flag)\n\n    def __set__(self, instance: BaseFlags, value: bool) -> None:\n        instance._set_flag(self.flag, value)\n\n    def __repr__(self) -> str:\n        return f'<flag_value flag={self.flag!r}>'\n\n\nclass alias_flag_value(flag_value):\n    pass\n\n\ndef fill_with_flags(*, inverted: bool = False) -> Callable[[Type[BF]], Type[BF]]:\n    def decorator(cls: Type[BF]) -> Type[BF]:\n        # fmt: off\n        cls.VALID_FLAGS = {\n            name: value.flag\n            for name, value in cls.__dict__.items()\n            if isinstance(value, flag_value)\n        }\n        # fmt: on\n\n        if inverted:\n            max_bits = max(cls.VALID_FLAGS.values()).bit_length()\n            cls.DEFAULT_VALUE = -1 + (2**max_bits)\n        else:\n            cls.DEFAULT_VALUE = 0\n\n        return cls\n\n    return decorator\n\n\n# n.b. flags must inherit from this and use the decorator above\nclass BaseFlags:\n    VALID_FLAGS: ClassVar[Dict[str, int]]\n    DEFAULT_VALUE: ClassVar[int]\n\n    value: int\n\n    __slots__ = ('value',)\n\n    def __init__(self, **kwargs: bool):\n        self.value = self.DEFAULT_VALUE\n        for key, value in kwargs.items():\n            if key not in self.VALID_FLAGS:\n                raise TypeError(f'{key!r} is not a valid flag name.')\n            setattr(self, key, value)\n\n    @classmethod\n    def _from_value(cls, value):\n        self = cls.__new__(cls)\n        self.value = value\n        return self\n\n    def __or__(self, other: Self) -> Self:\n        return self._from_value(self.value | other.value)\n\n    def __and__(self, other: Self) -> Self:\n        return self._from_value(self.value & other.value)\n\n    def __xor__(self, other: Self) -> Self:\n        return self._from_value(self.value ^ other.value)\n\n    def __ior__(self, other: Self) -> Self:\n        self.value |= other.value\n        return self\n\n    def __iand__(self, other: Self) -> Self:\n        self.value &= other.value\n        return self\n\n    def __ixor__(self, other: Self) -> Self:\n        self.value ^= other.value\n        return self\n\n    def __invert__(self) -> Self:\n        max_bits = max(self.VALID_FLAGS.values()).bit_length()\n        max_value = -1 + (2**max_bits)\n        return self._from_value(self.value ^ max_value)\n\n    def __bool__(self) -> bool:\n        return self.value != self.DEFAULT_VALUE\n\n    def __eq__(self, other: object) -> bool:\n        return isinstance(other, self.__class__) and self.value == other.value\n\n    def __ne__(self, other: object) -> bool:\n        return not self.__eq__(other)\n\n    def __hash__(self) -> int:\n        return hash(self.value)\n\n    def __repr__(self) -> str:\n        return f'<{self.__class__.__name__} value={self.value}>'\n\n    def __iter__(self) -> Iterator[Tuple[str, bool]]:\n        for name, value in self.__class__.__dict__.items():\n            if isinstance(value, alias_flag_value):\n                continue\n\n            if isinstance(value, flag_value):\n                yield (name, self._has_flag(value.flag))\n\n    def _has_flag(self, o: int) -> bool:\n        return (self.value & o) == o\n\n    def _set_flag(self, o: int, toggle: bool) -> None:\n        if toggle is True:\n            self.value |= o\n        elif toggle is False:\n            self.value &= ~o\n        else:\n            raise TypeError(f'Value to set for {self.__class__.__name__} must be a bool.')\n\n\n@fill_with_flags(inverted=True)\nclass SystemChannelFlags(BaseFlags):\n    r\"\"\"Wraps up a Discord system channel flag value.\n\n    Similar to :class:`Permissions`\\, the properties provided are two way.\n    You can set and retrieve individual bits using the properties as if they\n    were regular bools. This allows you to edit the system flags easily.\n\n    To construct an object you can pass keyword arguments denoting the flags\n    to enable or disable.\n\n    .. container:: operations\n\n        .. describe:: x == y\n\n            Checks if two flags are equal.\n\n        .. describe:: x != y\n\n            Checks if two flags are not equal.\n\n        .. describe:: x | y, x |= y\n\n            Returns a SystemChannelFlags instance with all enabled flags from\n            both x and y.\n\n            .. versionadded:: 2.0\n\n        .. describe:: x & y, x &= y\n\n            Returns a SystemChannelFlags instance with only flags enabled on\n            both x and y.\n\n            .. versionadded:: 2.0\n\n        .. describe:: x ^ y, x ^= y\n\n            Returns a SystemChannelFlags instance with only flags enabled on\n            only one of x or y, not on both.\n\n            .. versionadded:: 2.0\n\n        .. describe:: ~x\n\n            Returns a SystemChannelFlags instance with all flags inverted from x.\n\n            .. versionadded:: 2.0\n\n        .. describe:: hash(x)\n\n               Return the flag's hash.\n\n        .. describe:: iter(x)\n\n               Returns an iterator of ``(name, value)`` pairs. This allows it\n               to be, for example, constructed as a dict or a list of pairs.\n\n        .. describe:: bool(b)\n\n            Returns whether any flag is set to ``True``.\n\n            .. versionadded:: 2.0\n\n    Attributes\n    -----------\n    value: :class:`int`\n        The raw value. This value is a bit array field of a 53-bit integer\n        representing the currently available flags. You should query\n        flags via the properties rather than using this raw value.\n    \"\"\"\n\n    __slots__ = ()\n\n    # For some reason the flags for system channels are \"inverted\"\n    # ergo, if they're set then it means \"suppress\" (off in the GUI toggle)\n    # Since this is counter-intuitive from an API perspective and annoying\n    # these will be inverted automatically\n\n    def _has_flag(self, o: int) -> bool:\n        return (self.value & o) != o\n\n    def _set_flag(self, o: int, toggle: bool) -> None:\n        if toggle is True:\n            self.value &= ~o\n        elif toggle is False:\n            self.value |= o\n        else:\n            raise TypeError('Value to set for SystemChannelFlags must be a bool.')\n\n    @flag_value\n    def join_notifications(self):\n        \"\"\":class:`bool`: Returns ``True`` if the system channel is used for member join notifications.\"\"\"\n        return 1\n\n    @flag_value\n    def premium_subscriptions(self):\n        \"\"\":class:`bool`: Returns ``True`` if the system channel is used for \"Nitro boosting\" notifications.\"\"\"\n        return 2\n\n    @flag_value\n    def guild_reminder_notifications(self):\n        \"\"\":class:`bool`: Returns ``True`` if the system channel is used for server setup helpful tips notifications.\n\n        .. versionadded:: 2.0\n        \"\"\"\n        return 4\n\n    @flag_value\n    def join_notification_replies(self):\n        \"\"\":class:`bool`: Returns ``True`` if sticker reply button (\"Wave to say hi!\") is\n        shown for member join notifications.\n\n        .. versionadded:: 2.0\n        \"\"\"\n        return 8\n\n    @flag_value\n    def role_subscription_purchase_notifications(self):\n        \"\"\":class:`bool`: Returns ``True`` if role subscription purchase and renewal\n        notifications are enabled.\n\n        .. versionadded:: 2.2\n        \"\"\"\n        return 16\n\n    @flag_value\n    def role_subscription_purchase_notification_replies(self):\n        \"\"\":class:`bool`: Returns ``True`` if the role subscription notifications\n        have a sticker reply button.\n\n        .. versionadded:: 2.2\n        \"\"\"\n        return 32\n\n\n@fill_with_flags()\nclass MessageFlags(BaseFlags):\n    r\"\"\"Wraps up a Discord Message flag value.\n\n    See :class:`SystemChannelFlags`.\n\n    .. container:: operations\n\n        .. describe:: x == y\n\n            Checks if two flags are equal.\n        .. describe:: x != y\n\n            Checks if two flags are not equal.\n\n        .. describe:: x | y, x |= y\n\n            Returns a MessageFlags instance with all enabled flags from\n            both x and y.\n\n            .. versionadded:: 2.0\n\n        .. describe:: x & y, x &= y\n\n            Returns a MessageFlags instance with only flags enabled on\n            both x and y.\n\n            .. versionadded:: 2.0\n\n        .. describe:: x ^ y, x ^= y\n\n            Returns a MessageFlags instance with only flags enabled on\n            only one of x or y, not on both.\n\n            .. versionadded:: 2.0\n\n        .. describe:: ~x\n\n            Returns a MessageFlags instance with all flags inverted from x.\n\n            .. versionadded:: 2.0\n\n        .. describe:: hash(x)\n\n               Return the flag's hash.\n        .. describe:: iter(x)\n\n               Returns an iterator of ``(name, value)`` pairs. This allows it\n               to be, for example, constructed as a dict or a list of pairs.\n\n        .. describe:: bool(b)\n\n            Returns whether any flag is set to ``True``.\n\n            .. versionadded:: 2.0\n\n    .. versionadded:: 1.3\n\n    Attributes\n    -----------\n    value: :class:`int`\n        The raw value. This value is a bit array field of a 53-bit integer\n        representing the currently available flags. You should query\n        flags via the properties rather than using this raw value.\n    \"\"\"\n\n    __slots__ = ()\n\n    @flag_value\n    def crossposted(self):\n        \"\"\":class:`bool`: Returns ``True`` if the message is the original crossposted message.\"\"\"\n        return 1\n\n    @flag_value\n    def is_crossposted(self):\n        \"\"\":class:`bool`: Returns ``True`` if the message was crossposted from another channel.\"\"\"\n        return 2\n\n    @flag_value\n    def suppress_embeds(self):\n        \"\"\":class:`bool`: Returns ``True`` if the message's embeds have been suppressed.\"\"\"\n        return 4\n\n    @flag_value\n    def source_message_deleted(self):\n        \"\"\":class:`bool`: Returns ``True`` if the source message for this crosspost has been deleted.\"\"\"\n        return 8\n\n    @flag_value\n    def urgent(self):\n        \"\"\":class:`bool`: Returns ``True`` if the source message is an urgent message.\n\n        An urgent message is one sent by Discord Trust and Safety.\n        \"\"\"\n        return 16\n\n    @flag_value\n    def has_thread(self):\n        \"\"\":class:`bool`: Returns ``True`` if the source message is associated with a thread.\n\n        .. versionadded:: 2.0\n        \"\"\"\n        return 32\n\n    @flag_value\n    def ephemeral(self):\n        \"\"\":class:`bool`: Returns ``True`` if the source message is ephemeral.\n\n        .. versionadded:: 2.0\n        \"\"\"\n        return 64\n\n    @flag_value\n    def loading(self):\n        \"\"\":class:`bool`: Returns ``True`` if the message is an interaction response and the bot\n        is \"thinking\".\n\n        .. versionadded:: 2.0\n        \"\"\"\n        return 128\n\n    @flag_value\n    def failed_to_mention_some_roles_in_thread(self):\n        \"\"\":class:`bool`: Returns ``True`` if the message failed to mention some roles in a thread\n        and add their members to the thread.\n\n        .. versionadded:: 2.0\n        \"\"\"\n        return 256\n\n    @flag_value\n    def suppress_notifications(self):\n        \"\"\":class:`bool`: Returns ``True`` if the message will not trigger push and desktop notifications.\n\n        .. versionadded:: 2.2\n        \"\"\"\n        return 4096\n\n    @alias_flag_value\n    def silent(self):\n        \"\"\":class:`bool`: Alias for :attr:`suppress_notifications`.\n\n        .. versionadded:: 2.2\n        \"\"\"\n        return 4096\n\n    @flag_value\n    def voice(self):\n        \"\"\":class:`bool`: Returns ``True`` if the message is a voice message.\n\n        .. versionadded:: 2.3\n        \"\"\"\n        return 8192\n\n\n@fill_with_flags()\nclass PublicUserFlags(BaseFlags):\n    r\"\"\"Wraps up the Discord User Public flags.\n\n    .. container:: operations\n\n        .. describe:: x == y\n\n            Checks if two PublicUserFlags are equal.\n        .. describe:: x != y\n\n            Checks if two PublicUserFlags are not equal.\n\n        .. describe:: x | y, x |= y\n\n            Returns a PublicUserFlags instance with all enabled flags from\n            both x and y.\n\n            .. versionadded:: 2.0\n\n        .. describe:: x & y, x &= y\n\n            Returns a PublicUserFlags instance with only flags enabled on\n            both x and y.\n\n            .. versionadded:: 2.0\n\n        .. describe:: x ^ y, x ^= y\n\n            Returns a PublicUserFlags instance with only flags enabled on\n            only one of x or y, not on both.\n\n            .. versionadded:: 2.0\n\n        .. describe:: ~x\n\n            Returns a PublicUserFlags instance with all flags inverted from x.\n\n            .. versionadded:: 2.0\n\n        .. describe:: hash(x)\n\n            Return the flag's hash.\n        .. describe:: iter(x)\n\n            Returns an iterator of ``(name, value)`` pairs. This allows it\n            to be, for example, constructed as a dict or a list of pairs.\n            Note that aliases are not shown.\n\n        .. describe:: bool(b)\n\n            Returns whether any flag is set to ``True``.\n\n            .. versionadded:: 2.0\n\n    .. versionadded:: 1.4\n\n    Attributes\n    -----------\n    value: :class:`int`\n        The raw value. This value is a bit array field of a 53-bit integer\n        representing the currently available flags. You should query\n        flags via the properties rather than using this raw value.\n    \"\"\"\n\n    __slots__ = ()\n\n    @flag_value\n    def staff(self):\n        \"\"\":class:`bool`: Returns ``True`` if the user is a Discord Employee.\"\"\"\n        return UserFlags.staff.value\n\n    @flag_value\n    def partner(self):\n        \"\"\":class:`bool`: Returns ``True`` if the user is a Discord Partner.\"\"\"\n        return UserFlags.partner.value\n\n    @flag_value\n    def hypesquad(self):\n        \"\"\":class:`bool`: Returns ``True`` if the user is a HypeSquad Events member.\"\"\"\n        return UserFlags.hypesquad.value\n\n    @flag_value\n    def bug_hunter(self):\n        \"\"\":class:`bool`: Returns ``True`` if the user is a Bug Hunter\"\"\"\n        return UserFlags.bug_hunter.value\n\n    @flag_value\n    def hypesquad_bravery(self):\n        \"\"\":class:`bool`: Returns ``True`` if the user is a HypeSquad Bravery member.\"\"\"\n        return UserFlags.hypesquad_bravery.value\n\n    @flag_value\n    def hypesquad_brilliance(self):\n        \"\"\":class:`bool`: Returns ``True`` if the user is a HypeSquad Brilliance member.\"\"\"\n        return UserFlags.hypesquad_brilliance.value\n\n    @flag_value\n    def hypesquad_balance(self):\n        \"\"\":class:`bool`: Returns ``True`` if the user is a HypeSquad Balance member.\"\"\"\n        return UserFlags.hypesquad_balance.value\n\n    @flag_value\n    def early_supporter(self):\n        \"\"\":class:`bool`: Returns ``True`` if the user is an Early Supporter.\"\"\"\n        return UserFlags.early_supporter.value\n\n    @flag_value\n    def team_user(self):\n        \"\"\":class:`bool`: Returns ``True`` if the user is a Team User.\"\"\"\n        return UserFlags.team_user.value\n\n    @flag_value\n    def system(self):\n        \"\"\":class:`bool`: Returns ``True`` if the user is a system user (i.e. represents Discord officially).\"\"\"\n        return UserFlags.system.value\n\n    @flag_value\n    def bug_hunter_level_2(self):\n        \"\"\":class:`bool`: Returns ``True`` if the user is a Bug Hunter Level 2\"\"\"\n        return UserFlags.bug_hunter_level_2.value\n\n    @flag_value\n    def verified_bot(self):\n        \"\"\":class:`bool`: Returns ``True`` if the user is a Verified Bot.\"\"\"\n        return UserFlags.verified_bot.value\n\n    @flag_value\n    def verified_bot_developer(self):\n        \"\"\":class:`bool`: Returns ``True`` if the user is an Early Verified Bot Developer.\"\"\"\n        return UserFlags.verified_bot_developer.value\n\n    @alias_flag_value\n    def early_verified_bot_developer(self):\n        \"\"\":class:`bool`: An alias for :attr:`verified_bot_developer`.\n\n        .. versionadded:: 1.5\n        \"\"\"\n        return UserFlags.verified_bot_developer.value\n\n    @flag_value\n    def discord_certified_moderator(self):\n        \"\"\":class:`bool`: Returns ``True`` if the user is a Discord Certified Moderator.\n\n        .. versionadded:: 2.0\n        \"\"\"\n        return UserFlags.discord_certified_moderator.value\n\n    @flag_value\n    def bot_http_interactions(self):\n        \"\"\":class:`bool`: Returns ``True`` if the user is a bot that only uses HTTP interactions\n        and is shown in the online member list.\n\n        .. versionadded:: 2.0\n        \"\"\"\n        return UserFlags.bot_http_interactions.value\n\n    @flag_value\n    def spammer(self):\n        \"\"\":class:`bool`: Returns ``True`` if the user is flagged as a spammer by Discord.\n\n        .. versionadded:: 2.0\n        \"\"\"\n        return UserFlags.spammer.value\n\n    @flag_value\n    def active_developer(self):\n        \"\"\":class:`bool`: Returns ``True`` if the user is an active developer.\n\n        .. versionadded:: 2.1\n        \"\"\"\n        return UserFlags.active_developer.value\n\n    def all(self) -> List[UserFlags]:\n        \"\"\"List[:class:`UserFlags`]: Returns all public flags the user has.\"\"\"\n        return [public_flag for public_flag in UserFlags if self._has_flag(public_flag.value)]\n\n\n@fill_with_flags()\nclass Intents(BaseFlags):\n    r\"\"\"Wraps up a Discord gateway intent flag.\n\n    Similar to :class:`Permissions`\\, the properties provided are two way.\n    You can set and retrieve individual bits using the properties as if they\n    were regular bools.\n\n    To construct an object you can pass keyword arguments denoting the flags\n    to enable or disable.\n\n    This is used to disable certain gateway features that are unnecessary to\n    run your bot. To make use of this, it is passed to the ``intents`` keyword\n    argument of :class:`Client`.\n\n    .. versionadded:: 1.5\n\n    .. container:: operations\n\n        .. describe:: x == y\n\n            Checks if two flags are equal.\n        .. describe:: x != y\n\n            Checks if two flags are not equal.\n\n        .. describe:: x | y, x |= y\n\n            Returns an Intents instance with all enabled flags from\n            both x and y.\n\n            .. versionadded:: 2.0\n\n        .. describe:: x & y, x &= y\n\n            Returns an Intents instance with only flags enabled on\n            both x and y.\n\n            .. versionadded:: 2.0\n\n        .. describe:: x ^ y, x ^= y\n\n            Returns an Intents instance with only flags enabled on\n            only one of x or y, not on both.\n\n            .. versionadded:: 2.0\n\n        .. describe:: ~x\n\n            Returns an Intents instance with all flags inverted from x.\n\n            .. versionadded:: 2.0\n\n        .. describe:: hash(x)\n\n               Return the flag's hash.\n        .. describe:: iter(x)\n\n               Returns an iterator of ``(name, value)`` pairs. This allows it\n               to be, for example, constructed as a dict or a list of pairs.\n\n        .. describe:: bool(b)\n\n            Returns whether any intent is enabled.\n\n            .. versionadded:: 2.0\n\n    Attributes\n    -----------\n    value: :class:`int`\n        The raw value. You should query flags via the properties\n        rather than using this raw value.\n    \"\"\"\n\n    __slots__ = ()\n\n    def __init__(self, value: int = 0, **kwargs: bool) -> None:\n        self.value: int = value\n        for key, value in kwargs.items():\n            if key not in self.VALID_FLAGS:\n                raise TypeError(f'{key!r} is not a valid flag name.')\n            setattr(self, key, value)\n\n    @classmethod\n    def all(cls: Type[Intents]) -> Intents:\n        \"\"\"A factory method that creates a :class:`Intents` with everything enabled.\"\"\"\n        value = reduce(lambda a, b: a | b, cls.VALID_FLAGS.values())\n        self = cls.__new__(cls)\n        self.value = value\n        return self\n\n    @classmethod\n    def none(cls: Type[Intents]) -> Intents:\n        \"\"\"A factory method that creates a :class:`Intents` with everything disabled.\"\"\"\n        self = cls.__new__(cls)\n        self.value = self.DEFAULT_VALUE\n        return self\n\n    @classmethod\n    def default(cls: Type[Intents]) -> Intents:\n        \"\"\"A factory method that creates a :class:`Intents` with everything enabled\n        except :attr:`presences`, :attr:`members`, and :attr:`message_content`.\n        \"\"\"\n        self = cls.all()\n        self.presences = False\n        self.members = False\n        self.message_content = False\n        return self\n\n    @flag_value\n    def guilds(self):\n        \"\"\":class:`bool`: Whether guild related events are enabled.\n\n        This corresponds to the following events:\n\n        - :func:`on_guild_join`\n        - :func:`on_guild_remove`\n        - :func:`on_guild_available`\n        - :func:`on_guild_unavailable`\n        - :func:`on_guild_channel_update`\n        - :func:`on_guild_channel_create`\n        - :func:`on_guild_channel_delete`\n        - :func:`on_guild_channel_pins_update`\n        - :func:`on_thread_create`\n        - :func:`on_thread_join`\n        - :func:`on_thread_update`\n        - :func:`on_thread_delete`\n\n        This also corresponds to the following attributes and classes in terms of cache:\n\n        - :attr:`Client.guilds`\n        - :class:`Guild` and all its attributes.\n        - :meth:`Client.get_channel`\n        - :meth:`Client.get_all_channels`\n\n        It is highly advisable to leave this intent enabled for your bot to function.\n        \"\"\"\n        return 1 << 0\n\n    @flag_value\n    def members(self):\n        \"\"\":class:`bool`: Whether guild member related events are enabled.\n\n        This corresponds to the following events:\n\n        - :func:`on_member_join`\n        - :func:`on_member_remove`\n        - :func:`on_member_update`\n        - :func:`on_user_update`\n        - :func:`on_thread_member_join`\n        - :func:`on_thread_member_remove`\n\n        This also corresponds to the following attributes and classes in terms of cache:\n\n        - :meth:`Client.get_all_members`\n        - :meth:`Client.get_user`\n        - :meth:`Guild.chunk`\n        - :meth:`Guild.fetch_members`\n        - :meth:`Guild.get_member`\n        - :attr:`Guild.members`\n        - :attr:`Member.roles`\n        - :attr:`Member.nick`\n        - :attr:`Member.premium_since`\n        - :attr:`User.name`\n        - :attr:`User.avatar`\n        - :attr:`User.discriminator`\n        - :attr:`User.global_name`\n\n        For more information go to the :ref:`member intent documentation <need_members_intent>`.\n\n        .. note::\n\n            Currently, this requires opting in explicitly via the developer portal as well.\n            Bots in over 100 guilds will need to apply to Discord for verification.\n        \"\"\"\n        return 1 << 1\n\n    @flag_value\n    def moderation(self):\n        \"\"\":class:`bool`: Whether guild moderation related events are enabled.\n\n        This corresponds to the following events:\n\n        - :func:`on_member_ban`\n        - :func:`on_member_unban`\n        - :func:`on_audit_log_entry_create`\n\n        This does not correspond to any attributes or classes in the library in terms of cache.\n        \"\"\"\n        return 1 << 2\n\n    @alias_flag_value\n    def bans(self):\n        \"\"\":class:`bool`: An alias of :attr:`moderation`.\n\n        .. versionchanged:: 2.2\n            Changed to an alias.\n        \"\"\"\n        return 1 << 2\n\n    @alias_flag_value\n    def emojis(self):\n        \"\"\":class:`bool`: Alias of :attr:`.emojis_and_stickers`.\n\n        .. versionchanged:: 2.0\n            Changed to an alias.\n        \"\"\"\n        return 1 << 3\n\n    @flag_value\n    def emojis_and_stickers(self):\n        \"\"\":class:`bool`: Whether guild emoji and sticker related events are enabled.\n\n        .. versionadded:: 2.0\n\n        This corresponds to the following events:\n\n        - :func:`on_guild_emojis_update`\n        - :func:`on_guild_stickers_update`\n\n        This also corresponds to the following attributes and classes in terms of cache:\n\n        - :class:`Emoji`\n        - :class:`GuildSticker`\n        - :meth:`Client.get_emoji`\n        - :meth:`Client.get_sticker`\n        - :meth:`Client.emojis`\n        - :meth:`Client.stickers`\n        - :attr:`Guild.emojis`\n        - :attr:`Guild.stickers`\n        \"\"\"\n        return 1 << 3\n\n    @flag_value\n    def integrations(self):\n        \"\"\":class:`bool`: Whether guild integration related events are enabled.\n\n        This corresponds to the following events:\n\n        - :func:`on_guild_integrations_update`\n        - :func:`on_integration_create`\n        - :func:`on_integration_update`\n        - :func:`on_raw_integration_delete`\n\n        This does not correspond to any attributes or classes in the library in terms of cache.\n        \"\"\"\n        return 1 << 4\n\n    @flag_value\n    def webhooks(self):\n        \"\"\":class:`bool`: Whether guild webhook related events are enabled.\n\n        This corresponds to the following events:\n\n        - :func:`on_webhooks_update`\n\n        This does not correspond to any attributes or classes in the library in terms of cache.\n        \"\"\"\n        return 1 << 5\n\n    @flag_value\n    def invites(self):\n        \"\"\":class:`bool`: Whether guild invite related events are enabled.\n\n        This corresponds to the following events:\n\n        - :func:`on_invite_create`\n        - :func:`on_invite_delete`\n\n        This does not correspond to any attributes or classes in the library in terms of cache.\n        \"\"\"\n        return 1 << 6\n\n    @flag_value\n    def voice_states(self):\n        \"\"\":class:`bool`: Whether guild voice state related events are enabled.\n\n        This corresponds to the following events:\n\n        - :func:`on_voice_state_update`\n\n        This also corresponds to the following attributes and classes in terms of cache:\n\n        - :attr:`VoiceChannel.members`\n        - :attr:`VoiceChannel.voice_states`\n        - :attr:`Member.voice`\n\n        .. note::\n\n            This intent is required to connect to voice.\n        \"\"\"\n        return 1 << 7\n\n    @flag_value\n    def presences(self):\n        \"\"\":class:`bool`: Whether guild presence related events are enabled.\n\n        This corresponds to the following events:\n\n        - :func:`on_presence_update`\n\n        This also corresponds to the following attributes and classes in terms of cache:\n\n        - :attr:`Member.activities`\n        - :attr:`Member.status`\n        - :attr:`Member.raw_status`\n\n        For more information go to the :ref:`presence intent documentation <need_presence_intent>`.\n\n        .. note::\n\n            Currently, this requires opting in explicitly via the developer portal as well.\n            Bots in over 100 guilds will need to apply to Discord for verification.\n        \"\"\"\n        return 1 << 8\n\n    @alias_flag_value\n    def messages(self):\n        \"\"\":class:`bool`: Whether guild and direct message related events are enabled.\n\n        This is a shortcut to set or get both :attr:`guild_messages` and :attr:`dm_messages`.\n\n        This corresponds to the following events:\n\n        - :func:`on_message` (both guilds and DMs)\n        - :func:`on_message_edit` (both guilds and DMs)\n        - :func:`on_message_delete` (both guilds and DMs)\n        - :func:`on_raw_message_delete` (both guilds and DMs)\n        - :func:`on_raw_message_edit` (both guilds and DMs)\n\n        This also corresponds to the following attributes and classes in terms of cache:\n\n        - :class:`Message`\n        - :attr:`Client.cached_messages`\n\n        Note that due to an implicit relationship this also corresponds to the following events:\n\n        - :func:`on_reaction_add` (both guilds and DMs)\n        - :func:`on_reaction_remove` (both guilds and DMs)\n        - :func:`on_reaction_clear` (both guilds and DMs)\n        \"\"\"\n        return (1 << 9) | (1 << 12)\n\n    @flag_value\n    def guild_messages(self):\n        \"\"\":class:`bool`: Whether guild message related events are enabled.\n\n        See also :attr:`dm_messages` for DMs or :attr:`messages` for both.\n\n        This corresponds to the following events:\n\n        - :func:`on_message` (only for guilds)\n        - :func:`on_message_edit` (only for guilds)\n        - :func:`on_message_delete` (only for guilds)\n        - :func:`on_raw_message_delete` (only for guilds)\n        - :func:`on_raw_message_edit` (only for guilds)\n\n        This also corresponds to the following attributes and classes in terms of cache:\n\n        - :class:`Message`\n        - :attr:`Client.cached_messages` (only for guilds)\n\n        Note that due to an implicit relationship this also corresponds to the following events:\n\n        - :func:`on_reaction_add` (only for guilds)\n        - :func:`on_reaction_remove` (only for guilds)\n        - :func:`on_reaction_clear` (only for guilds)\n        \"\"\"\n        return 1 << 9\n\n    @flag_value\n    def dm_messages(self):\n        \"\"\":class:`bool`: Whether direct message related events are enabled.\n\n        See also :attr:`guild_messages` for guilds or :attr:`messages` for both.\n\n        This corresponds to the following events:\n\n        - :func:`on_message` (only for DMs)\n        - :func:`on_message_edit` (only for DMs)\n        - :func:`on_message_delete` (only for DMs)\n        - :func:`on_raw_message_delete` (only for DMs)\n        - :func:`on_raw_message_edit` (only for DMs)\n\n        This also corresponds to the following attributes and classes in terms of cache:\n\n        - :class:`Message`\n        - :attr:`Client.cached_messages` (only for DMs)\n\n        Note that due to an implicit relationship this also corresponds to the following events:\n\n        - :func:`on_reaction_add` (only for DMs)\n        - :func:`on_reaction_remove` (only for DMs)\n        - :func:`on_reaction_clear` (only for DMs)\n        \"\"\"\n        return 1 << 12\n\n    @alias_flag_value\n    def reactions(self):\n        \"\"\":class:`bool`: Whether guild and direct message reaction related events are enabled.\n\n        This is a shortcut to set or get both :attr:`guild_reactions` and :attr:`dm_reactions`.\n\n        This corresponds to the following events:\n\n        - :func:`on_reaction_add` (both guilds and DMs)\n        - :func:`on_reaction_remove` (both guilds and DMs)\n        - :func:`on_reaction_clear` (both guilds and DMs)\n        - :func:`on_raw_reaction_add` (both guilds and DMs)\n        - :func:`on_raw_reaction_remove` (both guilds and DMs)\n        - :func:`on_raw_reaction_clear` (both guilds and DMs)\n\n        This also corresponds to the following attributes and classes in terms of cache:\n\n        - :attr:`Message.reactions` (both guild and DM messages)\n        \"\"\"\n        return (1 << 10) | (1 << 13)\n\n    @flag_value\n    def guild_reactions(self):\n        \"\"\":class:`bool`: Whether guild message reaction related events are enabled.\n\n        See also :attr:`dm_reactions` for DMs or :attr:`reactions` for both.\n\n        This corresponds to the following events:\n\n        - :func:`on_reaction_add` (only for guilds)\n        - :func:`on_reaction_remove` (only for guilds)\n        - :func:`on_reaction_clear` (only for guilds)\n        - :func:`on_raw_reaction_add` (only for guilds)\n        - :func:`on_raw_reaction_remove` (only for guilds)\n        - :func:`on_raw_reaction_clear` (only for guilds)\n\n        This also corresponds to the following attributes and classes in terms of cache:\n\n        - :attr:`Message.reactions` (only for guild messages)\n        \"\"\"\n        return 1 << 10\n\n    @flag_value\n    def dm_reactions(self):\n        \"\"\":class:`bool`: Whether direct message reaction related events are enabled.\n\n        See also :attr:`guild_reactions` for guilds or :attr:`reactions` for both.\n\n        This corresponds to the following events:\n\n        - :func:`on_reaction_add` (only for DMs)\n        - :func:`on_reaction_remove` (only for DMs)\n        - :func:`on_reaction_clear` (only for DMs)\n        - :func:`on_raw_reaction_add` (only for DMs)\n        - :func:`on_raw_reaction_remove` (only for DMs)\n        - :func:`on_raw_reaction_clear` (only for DMs)\n\n        This also corresponds to the following attributes and classes in terms of cache:\n\n        - :attr:`Message.reactions` (only for DM messages)\n        \"\"\"\n        return 1 << 13\n\n    @alias_flag_value\n    def typing(self):\n        \"\"\":class:`bool`: Whether guild and direct message typing related events are enabled.\n\n        This is a shortcut to set or get both :attr:`guild_typing` and :attr:`dm_typing`.\n\n        This corresponds to the following events:\n\n        - :func:`on_typing` (both guilds and DMs)\n\n        This does not correspond to any attributes or classes in the library in terms of cache.\n        \"\"\"\n        return (1 << 11) | (1 << 14)\n\n    @flag_value\n    def guild_typing(self):\n        \"\"\":class:`bool`: Whether guild and direct message typing related events are enabled.\n\n        See also :attr:`dm_typing` for DMs or :attr:`typing` for both.\n\n        This corresponds to the following events:\n\n        - :func:`on_typing` (only for guilds)\n\n        This does not correspond to any attributes or classes in the library in terms of cache.\n        \"\"\"\n        return 1 << 11\n\n    @flag_value\n    def dm_typing(self):\n        \"\"\":class:`bool`: Whether guild and direct message typing related events are enabled.\n\n        See also :attr:`guild_typing` for guilds or :attr:`typing` for both.\n\n        This corresponds to the following events:\n\n        - :func:`on_typing` (only for DMs)\n\n        This does not correspond to any attributes or classes in the library in terms of cache.\n        \"\"\"\n        return 1 << 14\n\n    @flag_value\n    def message_content(self):\n        \"\"\":class:`bool`: Whether message content, attachments, embeds and components will be available in messages\n        which do not meet the following criteria:\n\n        - The message was sent by the client\n        - The message was sent in direct messages\n        - The message mentions the client\n\n        This applies to the following events:\n\n        - :func:`on_message`\n        - :func:`on_message_edit`\n        - :func:`on_message_delete`\n        - :func:`on_raw_message_edit`\n\n        For more information go to the :ref:`message content intent documentation <need_message_content_intent>`.\n\n        .. note::\n\n            Currently, this requires opting in explicitly via the developer portal as well.\n            Bots in over 100 guilds will need to apply to Discord for verification.\n\n        .. versionadded:: 2.0\n        \"\"\"\n        return 1 << 15\n\n    @flag_value\n    def guild_scheduled_events(self):\n        \"\"\":class:`bool`: Whether guild scheduled event related events are enabled.\n\n        This corresponds to the following events:\n\n        - :func:`on_scheduled_event_create`\n        - :func:`on_scheduled_event_update`\n        - :func:`on_scheduled_event_delete`\n        - :func:`on_scheduled_event_user_add`\n        - :func:`on_scheduled_event_user_remove`\n\n        .. versionadded:: 2.0\n        \"\"\"\n        return 1 << 16\n\n    @alias_flag_value\n    def auto_moderation(self):\n        \"\"\":class:`bool`: Whether auto moderation related events are enabled.\n\n        This is a shortcut to set or get both :attr:`auto_moderation_configuration`\n        and :attr:`auto_moderation_execution`.\n\n        This corresponds to the following events:\n\n        - :func:`on_automod_rule_create`\n        - :func:`on_automod_rule_update`\n        - :func:`on_automod_rule_delete`\n        - :func:`on_automod_action`\n\n        .. versionadded:: 2.0\n        \"\"\"\n        return (1 << 20) | (1 << 21)\n\n    @flag_value\n    def auto_moderation_configuration(self):\n        \"\"\":class:`bool`: Whether auto moderation configuration related events are enabled.\n\n        This corresponds to the following events:\n\n        - :func:`on_automod_rule_create`\n        - :func:`on_automod_rule_update`\n        - :func:`on_automod_rule_delete`\n\n        .. versionadded:: 2.0\n        \"\"\"\n        return 1 << 20\n\n    @flag_value\n    def auto_moderation_execution(self):\n        \"\"\":class:`bool`: Whether auto moderation execution related events are enabled.\n\n        This corresponds to the following events:\n        - :func:`on_automod_action`\n\n        .. versionadded:: 2.0\n        \"\"\"\n        return 1 << 21\n\n    @alias_flag_value\n    def polls(self):\n        \"\"\":class:`bool`: Whether guild and direct messages poll related events are enabled.\n\n        This is a shortcut to set or get both :attr:`guild_polls` and :attr:`dm_polls`.\n\n        This corresponds to the following events:\n\n        - :func:`on_poll_vote_add` (both guilds and DMs)\n        - :func:`on_poll_vote_remove` (both guilds and DMs)\n        - :func:`on_raw_poll_vote_add` (both guilds and DMs)\n        - :func:`on_raw_poll_vote_remove` (both guilds and DMs)\n\n        .. versionadded:: 2.4\n        \"\"\"\n        return (1 << 24) | (1 << 25)\n\n    @flag_value\n    def guild_polls(self):\n        \"\"\":class:`bool`: Whether guild poll related events are enabled.\n\n        See also :attr:`dm_polls` and :attr:`polls`.\n\n        This corresponds to the following events:\n\n        - :func:`on_poll_vote_add` (only for guilds)\n        - :func:`on_poll_vote_remove` (only for guilds)\n        - :func:`on_raw_poll_vote_add` (only for guilds)\n        - :func:`on_raw_poll_vote_remove` (only for guilds)\n\n        .. versionadded:: 2.4\n        \"\"\"\n        return 1 << 24\n\n    @flag_value\n    def dm_polls(self):\n        \"\"\":class:`bool`: Whether direct messages poll related events are enabled.\n\n        See also :attr:`guild_polls` and :attr:`polls`.\n\n        This corresponds to the following events:\n\n        - :func:`on_poll_vote_add` (only for DMs)\n        - :func:`on_poll_vote_remove` (only for DMs)\n        - :func:`on_raw_poll_vote_add` (only for DMs)\n        - :func:`on_raw_poll_vote_remove` (only for DMs)\n\n        .. versionadded:: 2.4\n        \"\"\"\n        return 1 << 25\n\n\n@fill_with_flags()\nclass MemberCacheFlags(BaseFlags):\n    \"\"\"Controls the library's cache policy when it comes to members.\n\n    This allows for finer grained control over what members are cached.\n    Note that the bot's own member is always cached. This class is passed\n    to the ``member_cache_flags`` parameter in :class:`Client`.\n\n    Due to a quirk in how Discord works, in order to ensure proper cleanup\n    of cache resources it is recommended to have :attr:`Intents.members`\n    enabled. Otherwise the library cannot know when a member leaves a guild and\n    is thus unable to cleanup after itself.\n\n    To construct an object you can pass keyword arguments denoting the flags\n    to enable or disable.\n\n    The default value is all flags enabled.\n\n    .. versionadded:: 1.5\n\n    .. container:: operations\n\n        .. describe:: x == y\n\n            Checks if two flags are equal.\n        .. describe:: x != y\n\n            Checks if two flags are not equal.\n\n        .. describe:: x | y, x |= y\n\n            Returns a MemberCacheFlags instance with all enabled flags from\n            both x and y.\n\n            .. versionadded:: 2.0\n\n        .. describe:: x & y, x &= y\n\n            Returns a MemberCacheFlags instance with only flags enabled on\n            both x and y.\n\n            .. versionadded:: 2.0\n\n        .. describe:: x ^ y, x ^= y\n\n            Returns a MemberCacheFlags instance with only flags enabled on\n            only one of x or y, not on both.\n\n            .. versionadded:: 2.0\n\n        .. describe:: ~x\n\n            Returns a MemberCacheFlags instance with all flags inverted from x.\n\n            .. versionadded:: 2.0\n\n        .. describe:: hash(x)\n\n               Return the flag's hash.\n        .. describe:: iter(x)\n\n               Returns an iterator of ``(name, value)`` pairs. This allows it\n               to be, for example, constructed as a dict or a list of pairs.\n\n        .. describe:: bool(b)\n\n            Returns whether any flag is set to ``True``.\n\n            .. versionadded:: 2.0\n\n    Attributes\n    -----------\n    value: :class:`int`\n        The raw value. You should query flags via the properties\n        rather than using this raw value.\n    \"\"\"\n\n    __slots__ = ()\n\n    def __init__(self, **kwargs: bool):\n        bits = max(self.VALID_FLAGS.values()).bit_length()\n        self.value: int = (1 << bits) - 1\n        for key, value in kwargs.items():\n            if key not in self.VALID_FLAGS:\n                raise TypeError(f'{key!r} is not a valid flag name.')\n            setattr(self, key, value)\n\n    @classmethod\n    def all(cls: Type[MemberCacheFlags]) -> MemberCacheFlags:\n        \"\"\"A factory method that creates a :class:`MemberCacheFlags` with everything enabled.\"\"\"\n        bits = max(cls.VALID_FLAGS.values()).bit_length()\n        value = (1 << bits) - 1\n        self = cls.__new__(cls)\n        self.value = value\n        return self\n\n    @classmethod\n    def none(cls: Type[MemberCacheFlags]) -> MemberCacheFlags:\n        \"\"\"A factory method that creates a :class:`MemberCacheFlags` with everything disabled.\"\"\"\n        self = cls.__new__(cls)\n        self.value = self.DEFAULT_VALUE\n        return self\n\n    @property\n    def _empty(self):\n        return self.value == self.DEFAULT_VALUE\n\n    @flag_value\n    def voice(self):\n        \"\"\":class:`bool`: Whether to cache members that are in voice.\n\n        This requires :attr:`Intents.voice_states`.\n\n        Members that leave voice are no longer cached.\n        \"\"\"\n        return 1\n\n    @flag_value\n    def joined(self):\n        \"\"\":class:`bool`: Whether to cache members that joined the guild\n        or are chunked as part of the initial log in flow.\n\n        This requires :attr:`Intents.members`.\n\n        Members that leave the guild are no longer cached.\n        \"\"\"\n        return 2\n\n    @classmethod\n    def from_intents(cls: Type[MemberCacheFlags], intents: Intents) -> MemberCacheFlags:\n        \"\"\"A factory method that creates a :class:`MemberCacheFlags` based on\n        the currently selected :class:`Intents`.\n\n        Parameters\n        ------------\n        intents: :class:`Intents`\n            The intents to select from.\n\n        Returns\n        ---------\n        :class:`MemberCacheFlags`\n            The resulting member cache flags.\n        \"\"\"\n\n        self = cls.none()\n        if intents.members:\n            self.joined = True\n        if intents.voice_states:\n            self.voice = True\n\n        return self\n\n    def _verify_intents(self, intents: Intents):\n        if self.voice and not intents.voice_states:\n            raise ValueError('MemberCacheFlags.voice requires Intents.voice_states')\n\n        if self.joined and not intents.members:\n            raise ValueError('MemberCacheFlags.joined requires Intents.members')\n\n    @property\n    def _voice_only(self):\n        return self.value == 1\n\n\n@fill_with_flags()\nclass ApplicationFlags(BaseFlags):\n    r\"\"\"Wraps up the Discord Application flags.\n\n    .. container:: operations\n\n        .. describe:: x == y\n\n            Checks if two ApplicationFlags are equal.\n        .. describe:: x != y\n\n            Checks if two ApplicationFlags are not equal.\n\n        .. describe:: x | y, x |= y\n\n            Returns an ApplicationFlags instance with all enabled flags from\n            both x and y.\n\n            .. versionadded:: 2.0\n\n        .. describe:: x & y, x &= y\n\n            Returns an ApplicationFlags instance with only flags enabled on\n            both x and y.\n\n            .. versionadded:: 2.0\n\n        .. describe:: x ^ y, x ^= y\n\n            Returns an ApplicationFlags instance with only flags enabled on\n            only one of x or y, not on both.\n\n            .. versionadded:: 2.0\n\n        .. describe:: ~x\n\n            Returns an ApplicationFlags instance with all flags inverted from x.\n\n            .. versionadded:: 2.0\n\n        .. describe:: hash(x)\n\n            Return the flag's hash.\n        .. describe:: iter(x)\n\n            Returns an iterator of ``(name, value)`` pairs. This allows it\n            to be, for example, constructed as a dict or a list of pairs.\n            Note that aliases are not shown.\n\n        .. describe:: bool(b)\n\n            Returns whether any flag is set to ``True``.\n\n    .. versionadded:: 2.0\n\n    Attributes\n    -----------\n    value: :class:`int`\n        The raw value. You should query flags via the properties\n        rather than using this raw value.\n    \"\"\"\n\n    @flag_value\n    def auto_mod_badge(self):\n        \"\"\":class:`bool`: Returns ``True`` if the application uses at least 100 automod rules across all guilds.\n        This shows up as a badge in the official client.\n\n        .. versionadded:: 2.3\n        \"\"\"\n        return 1 << 6\n\n    @flag_value\n    def gateway_presence(self):\n        \"\"\":class:`bool`: Returns ``True`` if the application is verified and is allowed to\n        receive presence information over the gateway.\n        \"\"\"\n        return 1 << 12\n\n    @flag_value\n    def gateway_presence_limited(self):\n        \"\"\":class:`bool`: Returns ``True`` if the application is allowed to receive limited\n        presence information over the gateway.\n        \"\"\"\n        return 1 << 13\n\n    @flag_value\n    def gateway_guild_members(self):\n        \"\"\":class:`bool`: Returns ``True`` if the application is verified and is allowed to\n        receive guild members information over the gateway.\n        \"\"\"\n        return 1 << 14\n\n    @flag_value\n    def gateway_guild_members_limited(self):\n        \"\"\":class:`bool`: Returns ``True`` if the application is allowed to receive limited\n        guild members information over the gateway.\n        \"\"\"\n        return 1 << 15\n\n    @flag_value\n    def verification_pending_guild_limit(self):\n        \"\"\":class:`bool`: Returns ``True`` if the application is currently pending verification\n        and has hit the guild limit.\n        \"\"\"\n        return 1 << 16\n\n    @flag_value\n    def embedded(self):\n        \"\"\":class:`bool`: Returns ``True`` if the application is embedded within the Discord client.\"\"\"\n        return 1 << 17\n\n    @flag_value\n    def gateway_message_content(self):\n        \"\"\":class:`bool`: Returns ``True`` if the application is verified and is allowed to\n        read message content in guilds.\"\"\"\n        return 1 << 18\n\n    @flag_value\n    def gateway_message_content_limited(self):\n        \"\"\":class:`bool`: Returns ``True`` if the application is unverified and is allowed to\n        read message content in guilds.\"\"\"\n        return 1 << 19\n\n    @flag_value\n    def app_commands_badge(self):\n        \"\"\":class:`bool`: Returns ``True`` if the application has registered a global application\n        command. This shows up as a badge in the official client.\"\"\"\n        return 1 << 23\n\n    @flag_value\n    def active(self):\n        \"\"\":class:`bool`: Returns ``True`` if the application has had at least one global application\n        command used in the last 30 days.\n\n        .. versionadded:: 2.1\n        \"\"\"\n        return 1 << 24\n\n\n@fill_with_flags()\nclass ChannelFlags(BaseFlags):\n    r\"\"\"Wraps up the Discord :class:`~discord.abc.GuildChannel` or :class:`Thread` flags.\n\n    .. container:: operations\n\n        .. describe:: x == y\n\n            Checks if two channel flags are equal.\n        .. describe:: x != y\n\n            Checks if two channel flags are not equal.\n\n        .. describe:: x | y, x |= y\n\n            Returns a ChannelFlags instance with all enabled flags from\n            both x and y.\n\n            .. versionadded:: 2.0\n\n        .. describe:: x & y, x &= y\n\n            Returns a ChannelFlags instance with only flags enabled on\n            both x and y.\n\n            .. versionadded:: 2.0\n\n        .. describe:: x ^ y, x ^= y\n\n            Returns a ChannelFlags instance with only flags enabled on\n            only one of x or y, not on both.\n\n            .. versionadded:: 2.0\n\n        .. describe:: ~x\n\n            Returns a ChannelFlags instance with all flags inverted from x.\n\n            .. versionadded:: 2.0\n\n        .. describe:: hash(x)\n\n            Return the flag's hash.\n        .. describe:: iter(x)\n\n            Returns an iterator of ``(name, value)`` pairs. This allows it\n            to be, for example, constructed as a dict or a list of pairs.\n            Note that aliases are not shown.\n\n        .. describe:: bool(b)\n\n            Returns whether any flag is set to ``True``.\n\n    .. versionadded:: 2.0\n\n    Attributes\n    -----------\n    value: :class:`int`\n        The raw value. You should query flags via the properties\n        rather than using this raw value.\n    \"\"\"\n\n    @flag_value\n    def pinned(self):\n        \"\"\":class:`bool`: Returns ``True`` if the thread is pinned to the forum channel.\"\"\"\n        return 1 << 1\n\n    @flag_value\n    def require_tag(self):\n        \"\"\":class:`bool`: Returns ``True`` if a tag is required to be specified when creating a thread\n        in a :class:`ForumChannel`.\n\n        .. versionadded:: 2.1\n        \"\"\"\n        return 1 << 4\n\n    @flag_value\n    def hide_media_download_options(self):\n        \"\"\":class:`bool`: Returns ``True`` if the client hides embedded media download options in a :class:`ForumChannel`.\n        Only available in media channels.\n\n        .. versionadded:: 2.4\n        \"\"\"\n        return 1 << 15\n\n\nclass ArrayFlags(BaseFlags):\n    @classmethod\n    def _from_value(cls: Type[Self], value: Sequence[int]) -> Self:\n        self = cls.__new__(cls)\n        # This is a micro-optimization given the frequency this object can be created.\n        # (1).__lshift__ is used in place of lambda x: 1 << x\n        # prebinding to a method of a constant rather than define a lambda.\n        # Pairing this with map, is essentially equivalent to (1 << x for x in value)\n        # reduction using operator.or_ instead of defining a lambda each call\n        # Discord sends these starting with a value of 1\n        # Rather than subtract 1 from each element prior to left shift,\n        # we shift right by 1 once at the end.\n        self.value = reduce(or_, map((1).__lshift__, value), 0) >> 1\n        return self\n\n    def to_array(self, *, offset: int = 0) -> List[int]:\n        return [i + offset for i in range(self.value.bit_length()) if self.value & (1 << i)]\n\n    @classmethod\n    def all(cls: Type[Self]) -> Self:\n        \"\"\"A factory method that creates an instance of ArrayFlags with everything enabled.\"\"\"\n        bits = max(cls.VALID_FLAGS.values()).bit_length()\n        value = (1 << bits) - 1\n        self = cls.__new__(cls)\n        self.value = value\n        return self\n\n    @classmethod\n    def none(cls: Type[Self]) -> Self:\n        \"\"\"A factory method that creates an instance of ArrayFlags with everything disabled.\"\"\"\n        self = cls.__new__(cls)\n        self.value = self.DEFAULT_VALUE\n        return self\n\n\n@fill_with_flags()\nclass AutoModPresets(ArrayFlags):\n    r\"\"\"Wraps up the Discord :class:`AutoModRule` presets.\n\n    .. versionadded:: 2.0\n\n\n    .. container:: operations\n\n        .. describe:: x == y\n\n            Checks if two AutoMod preset flags are equal.\n\n        .. describe:: x != y\n\n            Checks if two AutoMod preset flags are not equal.\n\n        .. describe:: x | y, x |= y\n\n            Returns an AutoModPresets instance with all enabled flags from\n            both x and y.\n\n            .. versionadded:: 2.0\n\n        .. describe:: x & y, x &= y\n\n            Returns an AutoModPresets instance with only flags enabled on\n            both x and y.\n\n            .. versionadded:: 2.0\n\n        .. describe:: x ^ y, x ^= y\n\n            Returns an AutoModPresets instance with only flags enabled on\n            only one of x or y, not on both.\n\n            .. versionadded:: 2.0\n\n        .. describe:: ~x\n\n            Returns an AutoModPresets instance with all flags inverted from x.\n\n            .. versionadded:: 2.0\n\n        .. describe:: hash(x)\n\n            Return the flag's hash.\n        .. describe:: iter(x)\n\n            Returns an iterator of ``(name, value)`` pairs. This allows it\n            to be, for example, constructed as a dict or a list of pairs.\n            Note that aliases are not shown.\n\n        .. describe:: bool(b)\n\n            Returns whether any flag is set to ``True``.\n\n    Attributes\n    -----------\n    value: :class:`int`\n        The raw value. You should query flags via the properties\n        rather than using this raw value.\n    \"\"\"\n\n    def to_array(self) -> List[int]:\n        return super().to_array(offset=1)\n\n    @flag_value\n    def profanity(self):\n        \"\"\":class:`bool`: Whether to use the preset profanity filter.\"\"\"\n        return 1 << 0\n\n    @flag_value\n    def sexual_content(self):\n        \"\"\":class:`bool`: Whether to use the preset sexual content filter.\"\"\"\n        return 1 << 1\n\n    @flag_value\n    def slurs(self):\n        \"\"\":class:`bool`: Whether to use the preset slurs filter.\"\"\"\n        return 1 << 2\n\n\n@fill_with_flags()\nclass AppCommandContext(ArrayFlags):\n    r\"\"\"Wraps up the Discord :class:`~discord.app_commands.Command` execution context.\n\n    .. versionadded:: 2.4\n\n    .. container:: operations\n\n        .. describe:: x == y\n\n            Checks if two AppCommandContext flags are equal.\n\n        .. describe:: x != y\n\n            Checks if two AppCommandContext flags are not equal.\n\n        .. describe:: x | y, x |= y\n\n            Returns an AppCommandContext instance with all enabled flags from\n            both x and y.\n\n        .. describe:: x & y, x &= y\n\n            Returns an AppCommandContext instance with only flags enabled on\n            both x and y.\n\n        .. describe:: x ^ y, x ^= y\n\n            Returns an AppCommandContext instance with only flags enabled on\n            only one of x or y, not on both.\n\n        .. describe:: ~x\n\n            Returns an AppCommandContext instance with all flags inverted from x\n\n        .. describe:: hash(x)\n\n            Return the flag's hash.\n        .. describe:: iter(x)\n\n            Returns an iterator of ``(name, value)`` pairs. This allows it\n            to be, for example, constructed as a dict or a list of pairs.\n            Note that aliases are not shown.\n\n        .. describe:: bool(b)\n\n            Returns whether any flag is set to ``True``.\n\n    Attributes\n    -----------\n    value: :class:`int`\n        The raw value. You should query flags via the properties\n        rather than using this raw value.\n    \"\"\"\n\n    DEFAULT_VALUE = 3\n\n    @flag_value\n    def guild(self):\n        \"\"\":class:`bool`: Whether the context allows usage in a guild.\"\"\"\n        return 1 << 0\n\n    @flag_value\n    def dm_channel(self):\n        \"\"\":class:`bool`: Whether the context allows usage in a DM channel.\"\"\"\n        return 1 << 1\n\n    @flag_value\n    def private_channel(self):\n        \"\"\":class:`bool`: Whether the context allows usage in a DM or a GDM channel.\"\"\"\n        return 1 << 2\n\n\n@fill_with_flags()\nclass AppInstallationType(ArrayFlags):\n    r\"\"\"Represents the installation location of an application command.\n\n    .. versionadded:: 2.4\n\n    .. container:: operations\n\n        .. describe:: x == y\n\n            Checks if two AppInstallationType flags are equal.\n\n        .. describe:: x != y\n\n            Checks if two AppInstallationType flags are not equal.\n\n        .. describe:: x | y, x |= y\n\n            Returns an AppInstallationType instance with all enabled flags from\n            both x and y.\n\n        .. describe:: x & y, x &= y\n\n            Returns an AppInstallationType instance with only flags enabled on\n            both x and y.\n\n        .. describe:: x ^ y, x ^= y\n\n            Returns an AppInstallationType instance with only flags enabled on\n            only one of x or y, not on both.\n\n        .. describe:: ~x\n\n            Returns an AppInstallationType instance with all flags inverted from x\n\n        .. describe:: hash(x)\n\n            Return the flag's hash.\n        .. describe:: iter(x)\n\n            Returns an iterator of ``(name, value)`` pairs. This allows it\n            to be, for example, constructed as a dict or a list of pairs.\n            Note that aliases are not shown.\n\n        .. describe:: bool(b)\n\n            Returns whether any flag is set to ``True``.\n\n    Attributes\n    -----------\n    value: :class:`int`\n        The raw value. You should query flags via the properties\n        rather than using this raw value.\n    \"\"\"\n\n    @flag_value\n    def guild(self):\n        \"\"\":class:`bool`: Whether the integration is a guild install.\"\"\"\n        return 1 << 0\n\n    @flag_value\n    def user(self):\n        \"\"\":class:`bool`: Whether the integration is a user install.\"\"\"\n        return 1 << 1\n\n\n@fill_with_flags()\nclass MemberFlags(BaseFlags):\n    r\"\"\"Wraps up the Discord Guild Member flags\n\n    .. versionadded:: 2.2\n\n    .. container:: operations\n\n        .. describe:: x == y\n\n            Checks if two MemberFlags are equal.\n\n        .. describe:: x != y\n\n            Checks if two MemberFlags are not equal.\n\n        .. describe:: x | y, x |= y\n\n            Returns a MemberFlags instance with all enabled flags from\n            both x and y.\n\n        .. describe:: x & y, x &= y\n\n            Returns a MemberFlags instance with only flags enabled on\n            both x and y.\n\n        .. describe:: x ^ y, x ^= y\n\n            Returns a MemberFlags instance with only flags enabled on\n            only one of x or y, not on both.\n\n        .. describe:: ~x\n\n            Returns a MemberFlags instance with all flags inverted from x.\n\n        .. describe:: hash(x)\n\n            Return the flag's hash.\n\n        .. describe:: iter(x)\n\n            Returns an iterator of ``(name, value)`` pairs. This allows it\n            to be, for example, constructed as a dict or a list of pairs.\n            Note that aliases are not shown.\n\n        .. describe:: bool(b)\n\n            Returns whether any flag is set to ``True``.\n\n\n    Attributes\n    -----------\n    value: :class:`int`\n        The raw value. You should query flags via the properties\n        rather than using this raw value.\n    \"\"\"\n\n    @flag_value\n    def did_rejoin(self):\n        \"\"\":class:`bool`: Returns ``True`` if the member left and rejoined the :attr:`~discord.Member.guild`.\"\"\"\n        return 1 << 0\n\n    @flag_value\n    def completed_onboarding(self):\n        \"\"\":class:`bool`: Returns ``True`` if the member has completed onboarding.\"\"\"\n        return 1 << 1\n\n    @flag_value\n    def bypasses_verification(self):\n        \"\"\":class:`bool`: Returns ``True`` if the member can bypass the guild verification requirements.\"\"\"\n        return 1 << 2\n\n    @flag_value\n    def started_onboarding(self):\n        \"\"\":class:`bool`: Returns ``True`` if the member has started onboarding.\"\"\"\n        return 1 << 3\n\n\n@fill_with_flags()\nclass AttachmentFlags(BaseFlags):\n    r\"\"\"Wraps up the Discord Attachment flags\n\n    .. versionadded:: 2.4\n\n    .. container:: operations\n\n        .. describe:: x == y\n\n            Checks if two AttachmentFlags are equal.\n\n        .. describe:: x != y\n\n            Checks if two AttachmentFlags are not equal.\n\n        .. describe:: x | y, x |= y\n\n            Returns a AttachmentFlags instance with all enabled flags from\n            both x and y.\n\n        .. describe:: x & y, x &= y\n\n            Returns a AttachmentFlags instance with only flags enabled on\n            both x and y.\n\n        .. describe:: x ^ y, x ^= y\n\n            Returns a AttachmentFlags instance with only flags enabled on\n            only one of x or y, not on both.\n\n        .. describe:: ~x\n\n            Returns a AttachmentFlags instance with all flags inverted from x.\n\n        .. describe:: hash(x)\n\n            Return the flag's hash.\n\n        .. describe:: iter(x)\n\n            Returns an iterator of ``(name, value)`` pairs. This allows it\n            to be, for example, constructed as a dict or a list of pairs.\n            Note that aliases are not shown.\n\n        .. describe:: bool(b)\n\n            Returns whether any flag is set to ``True``.\n\n\n    Attributes\n    -----------\n    value: :class:`int`\n        The raw value. You should query flags via the properties\n        rather than using this raw value.\n    \"\"\"\n\n    @flag_value\n    def clip(self):\n        \"\"\":class:`bool`: Returns ``True`` if the attachment is a clip.\"\"\"\n        return 1 << 0\n\n    @flag_value\n    def thumbnail(self):\n        \"\"\":class:`bool`: Returns ``True`` if the attachment is a thumbnail.\"\"\"\n        return 1 << 1\n\n    @flag_value\n    def remix(self):\n        \"\"\":class:`bool`: Returns ``True`` if the attachment has been edited using the remix feature.\"\"\"\n        return 1 << 2\n\n\n@fill_with_flags()\nclass RoleFlags(BaseFlags):\n    r\"\"\"Wraps up the Discord Role flags\n\n    .. versionadded:: 2.4\n\n    .. container:: operations\n\n        .. describe:: x == y\n\n            Checks if two RoleFlags are equal.\n\n        .. describe:: x != y\n\n            Checks if two RoleFlags are not equal.\n\n        .. describe:: x | y, x |= y\n\n            Returns a RoleFlags instance with all enabled flags from\n            both x and y.\n\n        .. describe:: x & y, x &= y\n\n            Returns a RoleFlags instance with only flags enabled on\n            both x and y.\n\n        .. describe:: x ^ y, x ^= y\n\n            Returns a RoleFlags instance with only flags enabled on\n            only one of x or y, not on both.\n\n        .. describe:: ~x\n\n            Returns a RoleFlags instance with all flags inverted from x.\n\n        .. describe:: hash(x)\n\n            Return the flag's hash.\n\n        .. describe:: iter(x)\n\n            Returns an iterator of ``(name, value)`` pairs. This allows it\n            to be, for example, constructed as a dict or a list of pairs.\n            Note that aliases are not shown.\n\n        .. describe:: bool(b)\n\n            Returns whether any flag is set to ``True``.\n\n\n    Attributes\n    -----------\n    value: :class:`int`\n        The raw value. You should query flags via the properties\n        rather than using this raw value.\n    \"\"\"\n\n    @flag_value\n    def in_prompt(self):\n        \"\"\":class:`bool`: Returns ``True`` if the role can be selected by members in an onboarding prompt.\"\"\"\n        return 1 << 0\n\n\n@fill_with_flags()\nclass SKUFlags(BaseFlags):\n    r\"\"\"Wraps up the Discord SKU flags\n\n    .. versionadded:: 2.4\n\n    .. container:: operations\n\n        .. describe:: x == y\n\n            Checks if two SKUFlags are equal.\n\n        .. describe:: x != y\n\n            Checks if two SKUFlags are not equal.\n\n        .. describe:: x | y, x |= y\n\n            Returns a SKUFlags instance with all enabled flags from\n            both x and y.\n\n        .. describe:: x & y, x &= y\n\n            Returns a SKUFlags instance with only flags enabled on\n            both x and y.\n\n        .. describe:: x ^ y, x ^= y\n\n            Returns a SKUFlags instance with only flags enabled on\n            only one of x or y, not on both.\n\n        .. describe:: ~x\n\n            Returns a SKUFlags instance with all flags inverted from x.\n\n        .. describe:: hash(x)\n\n            Return the flag's hash.\n\n        .. describe:: iter(x)\n\n            Returns an iterator of ``(name, value)`` pairs. This allows it\n            to be, for example, constructed as a dict or a list of pairs.\n            Note that aliases are not shown.\n\n        .. describe:: bool(b)\n\n            Returns whether any flag is set to ``True``.\n\n\n    Attributes\n    -----------\n    value: :class:`int`\n        The raw value. You should query flags via the properties\n        rather than using this raw value.\n    \"\"\"\n\n    @flag_value\n    def available(self):\n        \"\"\":class:`bool`: Returns ``True`` if the SKU is available for purchase.\"\"\"\n        return 1 << 2\n\n    @flag_value\n    def guild_subscription(self):\n        \"\"\":class:`bool`: Returns ``True`` if the SKU is a guild subscription.\"\"\"\n        return 1 << 7\n\n    @flag_value\n    def user_subscription(self):\n        \"\"\":class:`bool`: Returns ``True`` if the SKU is a user subscription.\"\"\"\n        return 1 << 8\n"
  },
  {
    "path": "discord/gateway.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\nfrom __future__ import annotations\n\nimport asyncio\nfrom collections import deque\nimport concurrent.futures\nimport logging\nimport struct\nimport sys\nimport time\nimport threading\nimport traceback\nimport zlib\n\nfrom typing import Any, Callable, Coroutine, Deque, Dict, List, TYPE_CHECKING, NamedTuple, Optional, TypeVar, Tuple\n\nimport aiohttp\nimport yarl\n\nfrom . import utils\nfrom .activity import BaseActivity\nfrom .enums import SpeakingState\nfrom .errors import ConnectionClosed\n\n_log = logging.getLogger(__name__)\n\n__all__ = (\n    'DiscordWebSocket',\n    'KeepAliveHandler',\n    'VoiceKeepAliveHandler',\n    'DiscordVoiceWebSocket',\n    'ReconnectWebSocket',\n)\n\nif TYPE_CHECKING:\n    from typing_extensions import Self\n\n    from .client import Client\n    from .state import ConnectionState\n    from .voice_state import VoiceConnectionState\n\n\nclass ReconnectWebSocket(Exception):\n    \"\"\"Signals to safely reconnect the websocket.\"\"\"\n\n    def __init__(self, shard_id: Optional[int], *, resume: bool = True) -> None:\n        self.shard_id: Optional[int] = shard_id\n        self.resume: bool = resume\n        self.op: str = 'RESUME' if resume else 'IDENTIFY'\n\n\nclass WebSocketClosure(Exception):\n    \"\"\"An exception to make up for the fact that aiohttp doesn't signal closure.\"\"\"\n\n    pass\n\n\nclass EventListener(NamedTuple):\n    predicate: Callable[[Dict[str, Any]], bool]\n    event: str\n    result: Optional[Callable[[Dict[str, Any]], Any]]\n    future: asyncio.Future[Any]\n\n\nclass GatewayRatelimiter:\n    def __init__(self, count: int = 110, per: float = 60.0) -> None:\n        # The default is 110 to give room for at least 10 heartbeats per minute\n        self.max: int = count\n        self.remaining: int = count\n        self.window: float = 0.0\n        self.per: float = per\n        self.lock: asyncio.Lock = asyncio.Lock()\n        self.shard_id: Optional[int] = None\n\n    def is_ratelimited(self) -> bool:\n        current = time.time()\n        if current > self.window + self.per:\n            return False\n        return self.remaining == 0\n\n    def get_delay(self) -> float:\n        current = time.time()\n\n        if current > self.window + self.per:\n            self.remaining = self.max\n\n        if self.remaining == self.max:\n            self.window = current\n\n        if self.remaining == 0:\n            return self.per - (current - self.window)\n\n        self.remaining -= 1\n        return 0.0\n\n    async def block(self) -> None:\n        async with self.lock:\n            delta = self.get_delay()\n            if delta:\n                _log.warning('WebSocket in shard ID %s is ratelimited, waiting %.2f seconds', self.shard_id, delta)\n                await asyncio.sleep(delta)\n\n\nclass KeepAliveHandler(threading.Thread):\n    def __init__(\n        self,\n        *args: Any,\n        ws: DiscordWebSocket,\n        interval: Optional[float] = None,\n        shard_id: Optional[int] = None,\n        **kwargs: Any,\n    ) -> None:\n        daemon: bool = kwargs.pop('daemon', True)\n        name: str = kwargs.pop('name', f'keep-alive-handler:shard-{shard_id}')\n        super().__init__(*args, daemon=daemon, name=name, **kwargs)\n        self.ws: DiscordWebSocket = ws\n        self._main_thread_id: int = ws.thread_id\n        self.interval: Optional[float] = interval\n        self.shard_id: Optional[int] = shard_id\n        self.msg: str = 'Keeping shard ID %s websocket alive with sequence %s.'\n        self.block_msg: str = 'Shard ID %s heartbeat blocked for more than %s seconds.'\n        self.behind_msg: str = 'Can\\'t keep up, shard ID %s websocket is %.1fs behind.'\n        self._stop_ev: threading.Event = threading.Event()\n        self._last_ack: float = time.perf_counter()\n        self._last_send: float = time.perf_counter()\n        self._last_recv: float = time.perf_counter()\n        self.latency: float = float('inf')\n        self.heartbeat_timeout: float = ws._max_heartbeat_timeout\n\n    def run(self) -> None:\n        while not self._stop_ev.wait(self.interval):\n            if self._last_recv + self.heartbeat_timeout < time.perf_counter():\n                _log.warning(\"Shard ID %s has stopped responding to the gateway. Closing and restarting.\", self.shard_id)\n                coro = self.ws.close(4000)\n                f = asyncio.run_coroutine_threadsafe(coro, loop=self.ws.loop)\n\n                try:\n                    f.result()\n                except Exception:\n                    _log.exception('An error occurred while stopping the gateway. Ignoring.')\n                finally:\n                    self.stop()\n                    return\n\n            data = self.get_payload()\n            _log.debug(self.msg, self.shard_id, data['d'])\n            coro = self.ws.send_heartbeat(data)\n            f = asyncio.run_coroutine_threadsafe(coro, loop=self.ws.loop)\n            try:\n                # block until sending is complete\n                total = 0\n                while True:\n                    try:\n                        f.result(10)\n                        break\n                    except concurrent.futures.TimeoutError:\n                        total += 10\n                        try:\n                            frame = sys._current_frames()[self._main_thread_id]\n                        except KeyError:\n                            msg = self.block_msg\n                        else:\n                            stack = ''.join(traceback.format_stack(frame))\n                            msg = f'{self.block_msg}\\nLoop thread traceback (most recent call last):\\n{stack}'\n                        _log.warning(msg, self.shard_id, total)\n\n            except Exception:\n                self.stop()\n            else:\n                self._last_send = time.perf_counter()\n\n    def get_payload(self) -> Dict[str, Any]:\n        return {\n            'op': self.ws.HEARTBEAT,\n            'd': self.ws.sequence,\n        }\n\n    def stop(self) -> None:\n        self._stop_ev.set()\n\n    def tick(self) -> None:\n        self._last_recv = time.perf_counter()\n\n    def ack(self) -> None:\n        ack_time = time.perf_counter()\n        self._last_ack = ack_time\n        self.latency = ack_time - self._last_send\n        if self.latency > 10:\n            _log.warning(self.behind_msg, self.shard_id, self.latency)\n\n\nclass VoiceKeepAliveHandler(KeepAliveHandler):\n    def __init__(self, *args: Any, **kwargs: Any) -> None:\n        name: str = kwargs.pop('name', f'voice-keep-alive-handler:{id(self):#x}')\n        super().__init__(*args, name=name, **kwargs)\n        self.recent_ack_latencies: Deque[float] = deque(maxlen=20)\n        self.msg: str = 'Keeping shard ID %s voice websocket alive with timestamp %s.'\n        self.block_msg: str = 'Shard ID %s voice heartbeat blocked for more than %s seconds'\n        self.behind_msg: str = 'High socket latency, shard ID %s heartbeat is %.1fs behind'\n\n    def get_payload(self) -> Dict[str, Any]:\n        return {\n            'op': self.ws.HEARTBEAT,\n            'd': int(time.time() * 1000),\n        }\n\n    def ack(self) -> None:\n        ack_time = time.perf_counter()\n        self._last_ack = ack_time\n        self._last_recv = ack_time\n        self.latency: float = ack_time - self._last_send\n        self.recent_ack_latencies.append(self.latency)\n\n\nclass DiscordClientWebSocketResponse(aiohttp.ClientWebSocketResponse):\n    async def close(self, *, code: int = 4000, message: bytes = b'') -> bool:\n        return await super().close(code=code, message=message)\n\n\nDWS = TypeVar('DWS', bound='DiscordWebSocket')\n\n\nclass DiscordWebSocket:\n    \"\"\"Implements a WebSocket for Discord's gateway v10.\n\n    Attributes\n    -----------\n    DISPATCH\n        Receive only. Denotes an event to be sent to Discord, such as READY.\n    HEARTBEAT\n        When received tells Discord to keep the connection alive.\n        When sent asks if your connection is currently alive.\n    IDENTIFY\n        Send only. Starts a new session.\n    PRESENCE\n        Send only. Updates your presence.\n    VOICE_STATE\n        Send only. Starts a new connection to a voice guild.\n    VOICE_PING\n        Send only. Checks ping time to a voice guild, do not use.\n    RESUME\n        Send only. Resumes an existing connection.\n    RECONNECT\n        Receive only. Tells the client to reconnect to a new gateway.\n    REQUEST_MEMBERS\n        Send only. Asks for the full member list of a guild.\n    INVALIDATE_SESSION\n        Receive only. Tells the client to optionally invalidate the session\n        and IDENTIFY again.\n    HELLO\n        Receive only. Tells the client the heartbeat interval.\n    HEARTBEAT_ACK\n        Receive only. Confirms receiving of a heartbeat. Not having it implies\n        a connection issue.\n    GUILD_SYNC\n        Send only. Requests a guild sync.\n    gateway\n        The gateway we are currently connected to.\n    token\n        The authentication token for discord.\n    \"\"\"\n\n    if TYPE_CHECKING:\n        token: Optional[str]\n        _connection: ConnectionState\n        _discord_parsers: Dict[str, Callable[..., Any]]\n        call_hooks: Callable[..., Any]\n        _initial_identify: bool\n        shard_id: Optional[int]\n        shard_count: Optional[int]\n        gateway: yarl.URL\n        _max_heartbeat_timeout: float\n\n    # fmt: off\n    DEFAULT_GATEWAY    = yarl.URL('wss://gateway.discord.gg/')\n    DISPATCH           = 0\n    HEARTBEAT          = 1\n    IDENTIFY           = 2\n    PRESENCE           = 3\n    VOICE_STATE        = 4\n    VOICE_PING         = 5\n    RESUME             = 6\n    RECONNECT          = 7\n    REQUEST_MEMBERS    = 8\n    INVALIDATE_SESSION = 9\n    HELLO              = 10\n    HEARTBEAT_ACK      = 11\n    GUILD_SYNC         = 12\n    # fmt: on\n\n    def __init__(self, socket: aiohttp.ClientWebSocketResponse, *, loop: asyncio.AbstractEventLoop) -> None:\n        self.socket: aiohttp.ClientWebSocketResponse = socket\n        self.loop: asyncio.AbstractEventLoop = loop\n\n        # an empty dispatcher to prevent crashes\n        self._dispatch: Callable[..., Any] = lambda *args: None\n        # generic event listeners\n        self._dispatch_listeners: List[EventListener] = []\n        # the keep alive\n        self._keep_alive: Optional[KeepAliveHandler] = None\n        self.thread_id: int = threading.get_ident()\n\n        # ws related stuff\n        self.session_id: Optional[str] = None\n        self.sequence: Optional[int] = None\n        self._zlib: zlib._Decompress = zlib.decompressobj()\n        self._buffer: bytearray = bytearray()\n        self._close_code: Optional[int] = None\n        self._rate_limiter: GatewayRatelimiter = GatewayRatelimiter()\n\n    @property\n    def open(self) -> bool:\n        return not self.socket.closed\n\n    def is_ratelimited(self) -> bool:\n        return self._rate_limiter.is_ratelimited()\n\n    def debug_log_receive(self, data: Dict[str, Any], /) -> None:\n        self._dispatch('socket_raw_receive', data)\n\n    def log_receive(self, _: Dict[str, Any], /) -> None:\n        pass\n\n    @classmethod\n    async def from_client(\n        cls,\n        client: Client,\n        *,\n        initial: bool = False,\n        gateway: Optional[yarl.URL] = None,\n        shard_id: Optional[int] = None,\n        session: Optional[str] = None,\n        sequence: Optional[int] = None,\n        resume: bool = False,\n        encoding: str = 'json',\n        zlib: bool = True,\n    ) -> Self:\n        \"\"\"Creates a main websocket for Discord from a :class:`Client`.\n\n        This is for internal use only.\n        \"\"\"\n        # Circular import\n        from .http import INTERNAL_API_VERSION\n\n        gateway = gateway or cls.DEFAULT_GATEWAY\n\n        if zlib:\n            url = gateway.with_query(v=INTERNAL_API_VERSION, encoding=encoding, compress='zlib-stream')\n        else:\n            url = gateway.with_query(v=INTERNAL_API_VERSION, encoding=encoding)\n\n        socket = await client.http.ws_connect(str(url))\n        ws = cls(socket, loop=client.loop)\n\n        # dynamically add attributes needed\n        ws.token = client.http.token\n        ws._connection = client._connection\n        ws._discord_parsers = client._connection.parsers\n        ws._dispatch = client.dispatch\n        ws.gateway = gateway\n        ws.call_hooks = client._connection.call_hooks\n        ws._initial_identify = initial\n        ws.shard_id = shard_id\n        ws._rate_limiter.shard_id = shard_id\n        ws.shard_count = client._connection.shard_count\n        ws.session_id = session\n        ws.sequence = sequence\n        ws._max_heartbeat_timeout = client._connection.heartbeat_timeout\n\n        if client._enable_debug_events:\n            ws.send = ws.debug_send\n            ws.log_receive = ws.debug_log_receive\n\n        client._connection._update_references(ws)\n\n        _log.debug('Created websocket connected to %s', gateway)\n\n        # poll event for OP Hello\n        await ws.poll_event()\n\n        if not resume:\n            await ws.identify()\n            return ws\n\n        await ws.resume()\n        return ws\n\n    def wait_for(\n        self,\n        event: str,\n        predicate: Callable[[Dict[str, Any]], bool],\n        result: Optional[Callable[[Dict[str, Any]], Any]] = None,\n    ) -> asyncio.Future[Any]:\n        \"\"\"Waits for a DISPATCH'd event that meets the predicate.\n\n        Parameters\n        -----------\n        event: :class:`str`\n            The event name in all upper case to wait for.\n        predicate\n            A function that takes a data parameter to check for event\n            properties. The data parameter is the 'd' key in the JSON message.\n        result\n            A function that takes the same data parameter and executes to send\n            the result to the future. If ``None``, returns the data.\n\n        Returns\n        --------\n        asyncio.Future\n            A future to wait for.\n        \"\"\"\n\n        future = self.loop.create_future()\n        entry = EventListener(event=event, predicate=predicate, result=result, future=future)\n        self._dispatch_listeners.append(entry)\n        return future\n\n    async def identify(self) -> None:\n        \"\"\"Sends the IDENTIFY packet.\"\"\"\n        payload = {\n            'op': self.IDENTIFY,\n            'd': {\n                'token': self.token,\n                'properties': {\n                    'os': sys.platform,\n                    'browser': 'discord.py',\n                    'device': 'discord.py',\n                },\n                'compress': True,\n                'large_threshold': 250,\n            },\n        }\n\n        if self.shard_id is not None and self.shard_count is not None:\n            payload['d']['shard'] = [self.shard_id, self.shard_count]\n\n        state = self._connection\n        if state._activity is not None or state._status is not None:\n            payload['d']['presence'] = {\n                'status': state._status,\n                'game': state._activity,\n                'since': 0,\n                'afk': False,\n            }\n\n        if state._intents is not None:\n            payload['d']['intents'] = state._intents.value\n\n        await self.call_hooks('before_identify', self.shard_id, initial=self._initial_identify)\n        await self.send_as_json(payload)\n        _log.debug('Shard ID %s has sent the IDENTIFY payload.', self.shard_id)\n\n    async def resume(self) -> None:\n        \"\"\"Sends the RESUME packet.\"\"\"\n        payload = {\n            'op': self.RESUME,\n            'd': {\n                'seq': self.sequence,\n                'session_id': self.session_id,\n                'token': self.token,\n            },\n        }\n\n        await self.send_as_json(payload)\n        _log.debug('Shard ID %s has sent the RESUME payload.', self.shard_id)\n\n    async def received_message(self, msg: Any, /) -> None:\n        if type(msg) is bytes:\n            self._buffer.extend(msg)\n\n            if len(msg) < 4 or msg[-4:] != b'\\x00\\x00\\xff\\xff':\n                return\n            msg = self._zlib.decompress(self._buffer)\n            msg = msg.decode('utf-8')\n            self._buffer = bytearray()\n\n        self.log_receive(msg)\n        msg = utils._from_json(msg)\n\n        _log.debug('For Shard ID %s: WebSocket Event: %s', self.shard_id, msg)\n        event = msg.get('t')\n        if event:\n            self._dispatch('socket_event_type', event)\n\n        op = msg.get('op')\n        data = msg.get('d')\n        seq = msg.get('s')\n        if seq is not None:\n            self.sequence = seq\n\n        if self._keep_alive:\n            self._keep_alive.tick()\n\n        if op != self.DISPATCH:\n            if op == self.RECONNECT:\n                # \"reconnect\" can only be handled by the Client\n                # so we terminate our connection and raise an\n                # internal exception signalling to reconnect.\n                _log.debug('Received RECONNECT opcode.')\n                await self.close()\n                raise ReconnectWebSocket(self.shard_id)\n\n            if op == self.HEARTBEAT_ACK:\n                if self._keep_alive:\n                    self._keep_alive.ack()\n                return\n\n            if op == self.HEARTBEAT:\n                if self._keep_alive:\n                    beat = self._keep_alive.get_payload()\n                    await self.send_as_json(beat)\n                return\n\n            if op == self.HELLO:\n                interval = data['heartbeat_interval'] / 1000.0\n                self._keep_alive = KeepAliveHandler(ws=self, interval=interval, shard_id=self.shard_id)\n                # send a heartbeat immediately\n                await self.send_as_json(self._keep_alive.get_payload())\n                self._keep_alive.start()\n                return\n\n            if op == self.INVALIDATE_SESSION:\n                if data is True:\n                    await self.close()\n                    raise ReconnectWebSocket(self.shard_id)\n\n                self.sequence = None\n                self.session_id = None\n                self.gateway = self.DEFAULT_GATEWAY\n                _log.info('Shard ID %s session has been invalidated.', self.shard_id)\n                await self.close(code=1000)\n                raise ReconnectWebSocket(self.shard_id, resume=False)\n\n            _log.warning('Unknown OP code %s.', op)\n            return\n\n        if event == 'READY':\n            self.sequence = msg['s']\n            self.session_id = data['session_id']\n            self.gateway = yarl.URL(data['resume_gateway_url'])\n            _log.info('Shard ID %s has connected to Gateway (Session ID: %s).', self.shard_id, self.session_id)\n\n        elif event == 'RESUMED':\n            # pass back the shard ID to the resumed handler\n            data['__shard_id__'] = self.shard_id\n            _log.info('Shard ID %s has successfully RESUMED session %s.', self.shard_id, self.session_id)\n\n        try:\n            func = self._discord_parsers[event]\n        except KeyError:\n            _log.debug('Unknown event %s.', event)\n        else:\n            func(data)\n\n        # remove the dispatched listeners\n        removed = []\n        for index, entry in enumerate(self._dispatch_listeners):\n            if entry.event != event:\n                continue\n\n            future = entry.future\n            if future.cancelled():\n                removed.append(index)\n                continue\n\n            try:\n                valid = entry.predicate(data)\n            except Exception as exc:\n                future.set_exception(exc)\n                removed.append(index)\n            else:\n                if valid:\n                    ret = data if entry.result is None else entry.result(data)\n                    future.set_result(ret)\n                    removed.append(index)\n\n        for index in reversed(removed):\n            del self._dispatch_listeners[index]\n\n    @property\n    def latency(self) -> float:\n        \"\"\":class:`float`: Measures latency between a HEARTBEAT and a HEARTBEAT_ACK in seconds.\"\"\"\n        heartbeat = self._keep_alive\n        return float('inf') if heartbeat is None else heartbeat.latency\n\n    def _can_handle_close(self) -> bool:\n        code = self._close_code or self.socket.close_code\n        return code not in (1000, 4004, 4010, 4011, 4012, 4013, 4014)\n\n    async def poll_event(self) -> None:\n        \"\"\"Polls for a DISPATCH event and handles the general gateway loop.\n\n        Raises\n        ------\n        ConnectionClosed\n            The websocket connection was terminated for unhandled reasons.\n        \"\"\"\n        try:\n            msg = await self.socket.receive(timeout=self._max_heartbeat_timeout)\n            if msg.type is aiohttp.WSMsgType.TEXT:\n                await self.received_message(msg.data)\n            elif msg.type is aiohttp.WSMsgType.BINARY:\n                await self.received_message(msg.data)\n            elif msg.type is aiohttp.WSMsgType.ERROR:\n                _log.debug('Received error %s', msg)\n                raise WebSocketClosure\n            elif msg.type in (aiohttp.WSMsgType.CLOSED, aiohttp.WSMsgType.CLOSING, aiohttp.WSMsgType.CLOSE):\n                _log.debug('Received %s', msg)\n                raise WebSocketClosure\n        except (asyncio.TimeoutError, WebSocketClosure) as e:\n            # Ensure the keep alive handler is closed\n            if self._keep_alive:\n                self._keep_alive.stop()\n                self._keep_alive = None\n\n            if isinstance(e, asyncio.TimeoutError):\n                _log.debug('Timed out receiving packet. Attempting a reconnect.')\n                raise ReconnectWebSocket(self.shard_id) from None\n\n            code = self._close_code or self.socket.close_code\n            if self._can_handle_close():\n                _log.debug('Websocket closed with %s, attempting a reconnect.', code)\n                raise ReconnectWebSocket(self.shard_id) from None\n            else:\n                _log.debug('Websocket closed with %s, cannot reconnect.', code)\n                raise ConnectionClosed(self.socket, shard_id=self.shard_id, code=code) from None\n\n    async def debug_send(self, data: str, /) -> None:\n        await self._rate_limiter.block()\n        self._dispatch('socket_raw_send', data)\n        await self.socket.send_str(data)\n\n    async def send(self, data: str, /) -> None:\n        await self._rate_limiter.block()\n        await self.socket.send_str(data)\n\n    async def send_as_json(self, data: Any) -> None:\n        try:\n            await self.send(utils._to_json(data))\n        except RuntimeError as exc:\n            if not self._can_handle_close():\n                raise ConnectionClosed(self.socket, shard_id=self.shard_id) from exc\n\n    async def send_heartbeat(self, data: Any) -> None:\n        # This bypasses the rate limit handling code since it has a higher priority\n        try:\n            await self.socket.send_str(utils._to_json(data))\n        except RuntimeError as exc:\n            if not self._can_handle_close():\n                raise ConnectionClosed(self.socket, shard_id=self.shard_id) from exc\n\n    async def change_presence(\n        self,\n        *,\n        activity: Optional[BaseActivity] = None,\n        status: Optional[str] = None,\n        since: float = 0.0,\n    ) -> None:\n        if activity is not None:\n            if not isinstance(activity, BaseActivity):\n                raise TypeError('activity must derive from BaseActivity.')\n            activities = [activity.to_dict()]\n        else:\n            activities = []\n\n        if status == 'idle':\n            since = int(time.time() * 1000)\n\n        payload = {\n            'op': self.PRESENCE,\n            'd': {\n                'activities': activities,\n                'afk': False,\n                'since': since,\n                'status': status,\n            },\n        }\n\n        sent = utils._to_json(payload)\n        _log.debug('Sending \"%s\" to change status', sent)\n        await self.send(sent)\n\n    async def request_chunks(\n        self,\n        guild_id: int,\n        query: Optional[str] = None,\n        *,\n        limit: int,\n        user_ids: Optional[List[int]] = None,\n        presences: bool = False,\n        nonce: Optional[str] = None,\n    ) -> None:\n        payload = {\n            'op': self.REQUEST_MEMBERS,\n            'd': {\n                'guild_id': guild_id,\n                'presences': presences,\n                'limit': limit,\n            },\n        }\n\n        if nonce:\n            payload['d']['nonce'] = nonce\n\n        if user_ids:\n            payload['d']['user_ids'] = user_ids\n\n        if query is not None:\n            payload['d']['query'] = query\n\n        await self.send_as_json(payload)\n\n    async def voice_state(\n        self,\n        guild_id: int,\n        channel_id: Optional[int],\n        self_mute: bool = False,\n        self_deaf: bool = False,\n    ) -> None:\n        payload = {\n            'op': self.VOICE_STATE,\n            'd': {\n                'guild_id': guild_id,\n                'channel_id': channel_id,\n                'self_mute': self_mute,\n                'self_deaf': self_deaf,\n            },\n        }\n\n        _log.debug('Updating our voice state to %s.', payload)\n        await self.send_as_json(payload)\n\n    async def close(self, code: int = 4000) -> None:\n        if self._keep_alive:\n            self._keep_alive.stop()\n            self._keep_alive = None\n\n        self._close_code = code\n        await self.socket.close(code=code)\n\n\nDVWS = TypeVar('DVWS', bound='DiscordVoiceWebSocket')\n\n\nclass DiscordVoiceWebSocket:\n    \"\"\"Implements the websocket protocol for handling voice connections.\n\n    Attributes\n    -----------\n    IDENTIFY\n        Send only. Starts a new voice session.\n    SELECT_PROTOCOL\n        Send only. Tells discord what encryption mode and how to connect for voice.\n    READY\n        Receive only. Tells the websocket that the initial connection has completed.\n    HEARTBEAT\n        Send only. Keeps your websocket connection alive.\n    SESSION_DESCRIPTION\n        Receive only. Gives you the secret key required for voice.\n    SPEAKING\n        Send only. Notifies the client if you are currently speaking.\n    HEARTBEAT_ACK\n        Receive only. Tells you your heartbeat has been acknowledged.\n    RESUME\n        Sent only. Tells the client to resume its session.\n    HELLO\n        Receive only. Tells you that your websocket connection was acknowledged.\n    RESUMED\n        Sent only. Tells you that your RESUME request has succeeded.\n    CLIENT_CONNECT\n        Indicates a user has connected to voice.\n    CLIENT_DISCONNECT\n        Receive only.  Indicates a user has disconnected from voice.\n    \"\"\"\n\n    if TYPE_CHECKING:\n        thread_id: int\n        _connection: VoiceConnectionState\n        gateway: str\n        _max_heartbeat_timeout: float\n\n    # fmt: off\n    IDENTIFY            = 0\n    SELECT_PROTOCOL     = 1\n    READY               = 2\n    HEARTBEAT           = 3\n    SESSION_DESCRIPTION = 4\n    SPEAKING            = 5\n    HEARTBEAT_ACK       = 6\n    RESUME              = 7\n    HELLO               = 8\n    RESUMED             = 9\n    CLIENT_CONNECT      = 12\n    CLIENT_DISCONNECT   = 13\n    # fmt: on\n\n    def __init__(\n        self,\n        socket: aiohttp.ClientWebSocketResponse,\n        loop: asyncio.AbstractEventLoop,\n        *,\n        hook: Optional[Callable[..., Coroutine[Any, Any, Any]]] = None,\n    ) -> None:\n        self.ws: aiohttp.ClientWebSocketResponse = socket\n        self.loop: asyncio.AbstractEventLoop = loop\n        self._keep_alive: Optional[VoiceKeepAliveHandler] = None\n        self._close_code: Optional[int] = None\n        self.secret_key: Optional[List[int]] = None\n        if hook:\n            self._hook = hook\n\n    async def _hook(self, *args: Any) -> None:\n        pass\n\n    async def send_as_json(self, data: Any) -> None:\n        _log.debug('Sending voice websocket frame: %s.', data)\n        await self.ws.send_str(utils._to_json(data))\n\n    send_heartbeat = send_as_json\n\n    async def resume(self) -> None:\n        state = self._connection\n        payload = {\n            'op': self.RESUME,\n            'd': {\n                'token': state.token,\n                'server_id': str(state.server_id),\n                'session_id': state.session_id,\n            },\n        }\n        await self.send_as_json(payload)\n\n    async def identify(self) -> None:\n        state = self._connection\n        payload = {\n            'op': self.IDENTIFY,\n            'd': {\n                'server_id': str(state.server_id),\n                'user_id': str(state.user.id),\n                'session_id': state.session_id,\n                'token': state.token,\n            },\n        }\n        await self.send_as_json(payload)\n\n    @classmethod\n    async def from_connection_state(\n        cls,\n        state: VoiceConnectionState,\n        *,\n        resume: bool = False,\n        hook: Optional[Callable[..., Coroutine[Any, Any, Any]]] = None,\n    ) -> Self:\n        \"\"\"Creates a voice websocket for the :class:`VoiceClient`.\"\"\"\n        gateway = f'wss://{state.endpoint}/?v=4'\n        client = state.voice_client\n        http = client._state.http\n        socket = await http.ws_connect(gateway, compress=15)\n        ws = cls(socket, loop=client.loop, hook=hook)\n        ws.gateway = gateway\n        ws._connection = state\n        ws._max_heartbeat_timeout = 60.0\n        ws.thread_id = threading.get_ident()\n\n        if resume:\n            await ws.resume()\n        else:\n            await ws.identify()\n\n        return ws\n\n    async def select_protocol(self, ip: str, port: int, mode: int) -> None:\n        payload = {\n            'op': self.SELECT_PROTOCOL,\n            'd': {\n                'protocol': 'udp',\n                'data': {\n                    'address': ip,\n                    'port': port,\n                    'mode': mode,\n                },\n            },\n        }\n\n        await self.send_as_json(payload)\n\n    async def client_connect(self) -> None:\n        payload = {\n            'op': self.CLIENT_CONNECT,\n            'd': {\n                'audio_ssrc': self._connection.ssrc,\n            },\n        }\n\n        await self.send_as_json(payload)\n\n    async def speak(self, state: SpeakingState = SpeakingState.voice) -> None:\n        payload = {\n            'op': self.SPEAKING,\n            'd': {\n                'speaking': int(state),\n                'delay': 0,\n                'ssrc': self._connection.ssrc,\n            },\n        }\n\n        await self.send_as_json(payload)\n\n    async def received_message(self, msg: Dict[str, Any]) -> None:\n        _log.debug('Voice websocket frame received: %s', msg)\n        op = msg['op']\n        data = msg['d']  # According to Discord this key is always given\n\n        if op == self.READY:\n            await self.initial_connection(data)\n        elif op == self.HEARTBEAT_ACK:\n            if self._keep_alive:\n                self._keep_alive.ack()\n        elif op == self.RESUMED:\n            _log.debug('Voice RESUME succeeded.')\n        elif op == self.SESSION_DESCRIPTION:\n            self._connection.mode = data['mode']\n            await self.load_secret_key(data)\n        elif op == self.HELLO:\n            interval = data['heartbeat_interval'] / 1000.0\n            self._keep_alive = VoiceKeepAliveHandler(ws=self, interval=min(interval, 5.0))\n            self._keep_alive.start()\n\n        await self._hook(self, msg)\n\n    async def initial_connection(self, data: Dict[str, Any]) -> None:\n        state = self._connection\n        state.ssrc = data['ssrc']\n        state.voice_port = data['port']\n        state.endpoint_ip = data['ip']\n\n        _log.debug('Connecting to voice socket')\n        await self.loop.sock_connect(state.socket, (state.endpoint_ip, state.voice_port))\n\n        state.ip, state.port = await self.discover_ip()\n        # there *should* always be at least one supported mode (xsalsa20_poly1305)\n        modes = [mode for mode in data['modes'] if mode in self._connection.supported_modes]\n        _log.debug('received supported encryption modes: %s', ', '.join(modes))\n\n        mode = modes[0]\n        await self.select_protocol(state.ip, state.port, mode)\n        _log.debug('selected the voice protocol for use (%s)', mode)\n\n    async def discover_ip(self) -> Tuple[str, int]:\n        state = self._connection\n        packet = bytearray(74)\n        struct.pack_into('>H', packet, 0, 1)  # 1 = Send\n        struct.pack_into('>H', packet, 2, 70)  # 70 = Length\n        struct.pack_into('>I', packet, 4, state.ssrc)\n\n        _log.debug('Sending ip discovery packet')\n        await self.loop.sock_sendall(state.socket, packet)\n\n        fut: asyncio.Future[bytes] = self.loop.create_future()\n\n        def get_ip_packet(data: bytes):\n            if data[1] == 0x02 and len(data) == 74:\n                self.loop.call_soon_threadsafe(fut.set_result, data)\n\n        fut.add_done_callback(lambda f: state.remove_socket_listener(get_ip_packet))\n        state.add_socket_listener(get_ip_packet)\n        recv = await fut\n\n        _log.debug('Received ip discovery packet: %s', recv)\n\n        # the ip is ascii starting at the 8th byte and ending at the first null\n        ip_start = 8\n        ip_end = recv.index(0, ip_start)\n        ip = recv[ip_start:ip_end].decode('ascii')\n\n        port = struct.unpack_from('>H', recv, len(recv) - 2)[0]\n        _log.debug('detected ip: %s port: %s', ip, port)\n\n        return ip, port\n\n    @property\n    def latency(self) -> float:\n        \"\"\":class:`float`: Latency between a HEARTBEAT and its HEARTBEAT_ACK in seconds.\"\"\"\n        heartbeat = self._keep_alive\n        return float('inf') if heartbeat is None else heartbeat.latency\n\n    @property\n    def average_latency(self) -> float:\n        \"\"\":class:`float`: Average of last 20 HEARTBEAT latencies.\"\"\"\n        heartbeat = self._keep_alive\n        if heartbeat is None or not heartbeat.recent_ack_latencies:\n            return float('inf')\n\n        return sum(heartbeat.recent_ack_latencies) / len(heartbeat.recent_ack_latencies)\n\n    async def load_secret_key(self, data: Dict[str, Any]) -> None:\n        _log.debug('received secret key for voice connection')\n        self.secret_key = self._connection.secret_key = data['secret_key']\n\n        # Send a speak command with the \"not speaking\" state.\n        # This also tells Discord our SSRC value, which Discord requires before\n        # sending any voice data (and is the real reason why we call this here).\n        await self.speak(SpeakingState.none)\n\n    async def poll_event(self) -> None:\n        # This exception is handled up the chain\n        msg = await asyncio.wait_for(self.ws.receive(), timeout=30.0)\n        if msg.type is aiohttp.WSMsgType.TEXT:\n            await self.received_message(utils._from_json(msg.data))\n        elif msg.type is aiohttp.WSMsgType.ERROR:\n            _log.debug('Received voice %s', msg)\n            raise ConnectionClosed(self.ws, shard_id=None) from msg.data\n        elif msg.type in (aiohttp.WSMsgType.CLOSED, aiohttp.WSMsgType.CLOSE, aiohttp.WSMsgType.CLOSING):\n            _log.debug('Received voice %s', msg)\n            raise ConnectionClosed(self.ws, shard_id=None, code=self._close_code)\n\n    async def close(self, code: int = 1000) -> None:\n        if self._keep_alive is not None:\n            self._keep_alive.stop()\n\n        self._close_code = code\n        await self.ws.close(code=code)\n"
  },
  {
    "path": "discord/guild.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom __future__ import annotations\n\nimport copy\nimport datetime\nimport unicodedata\nfrom typing import (\n    Any,\n    AsyncIterator,\n    ClassVar,\n    Collection,\n    Coroutine,\n    Dict,\n    Iterable,\n    List,\n    Mapping,\n    NamedTuple,\n    Sequence,\n    Set,\n    Literal,\n    Optional,\n    TYPE_CHECKING,\n    Tuple,\n    Union,\n    overload,\n)\nimport warnings\n\nfrom . import utils, abc\nfrom .role import Role\nfrom .member import Member, VoiceState\nfrom .emoji import Emoji\nfrom .errors import InvalidData\nfrom .permissions import PermissionOverwrite\nfrom .colour import Colour\nfrom .errors import ClientException\nfrom .channel import *\nfrom .channel import _guild_channel_factory\nfrom .channel import _threaded_guild_channel_factory\nfrom .enums import (\n    AuditLogAction,\n    VideoQualityMode,\n    ChannelType,\n    EntityType,\n    PrivacyLevel,\n    try_enum,\n    VerificationLevel,\n    ContentFilter,\n    NotificationLevel,\n    NSFWLevel,\n    MFALevel,\n    Locale,\n    AutoModRuleEventType,\n    ForumOrderType,\n    ForumLayoutType,\n)\nfrom .mixins import Hashable\nfrom .user import User\nfrom .invite import Invite\nfrom .widget import Widget\nfrom .asset import Asset\nfrom .flags import SystemChannelFlags\nfrom .integrations import Integration, PartialIntegration, _integration_factory\nfrom .scheduled_event import ScheduledEvent\nfrom .stage_instance import StageInstance\nfrom .threads import Thread, ThreadMember\nfrom .sticker import GuildSticker\nfrom .file import File\nfrom .audit_logs import AuditLogEntry\nfrom .object import OLDEST_OBJECT, Object\nfrom .welcome_screen import WelcomeScreen, WelcomeChannel\nfrom .automod import AutoModRule, AutoModTrigger, AutoModRuleAction\nfrom .partial_emoji import _EmojiTag, PartialEmoji\n\n\n__all__ = (\n    'Guild',\n    'BanEntry',\n)\n\nMISSING = utils.MISSING\n\nif TYPE_CHECKING:\n    from .abc import Snowflake, SnowflakeTime\n    from .types.guild import (\n        Ban as BanPayload,\n        Guild as GuildPayload,\n        RolePositionUpdate as RolePositionUpdatePayload,\n        GuildFeature,\n        IncidentData,\n    )\n    from .types.threads import (\n        Thread as ThreadPayload,\n    )\n    from .types.voice import GuildVoiceState\n    from .permissions import Permissions\n    from .channel import VoiceChannel, StageChannel, TextChannel, ForumChannel, CategoryChannel\n    from .template import Template\n    from .webhook import Webhook\n    from .state import ConnectionState\n    from .voice_client import VoiceProtocol\n    from .types.channel import (\n        GuildChannel as GuildChannelPayload,\n        TextChannel as TextChannelPayload,\n        NewsChannel as NewsChannelPayload,\n        VoiceChannel as VoiceChannelPayload,\n        CategoryChannel as CategoryChannelPayload,\n        StageChannel as StageChannelPayload,\n        ForumChannel as ForumChannelPayload,\n    )\n    from .types.integration import IntegrationType\n    from .types.snowflake import SnowflakeList\n    from .types.widget import EditWidgetSettings\n    from .types.audit_log import AuditLogEvent\n    from .message import EmojiInputType\n\n    VocalGuildChannel = Union[VoiceChannel, StageChannel]\n    GuildChannel = Union[VocalGuildChannel, ForumChannel, TextChannel, CategoryChannel]\n    ByCategoryItem = Tuple[Optional[CategoryChannel], List[GuildChannel]]\n\n\nclass BanEntry(NamedTuple):\n    reason: Optional[str]\n    user: User\n\n\nclass BulkBanResult(NamedTuple):\n    banned: List[Object]\n    failed: List[Object]\n\n\nclass _GuildLimit(NamedTuple):\n    emoji: int\n    stickers: int\n    bitrate: float\n    filesize: int\n\n\nclass Guild(Hashable):\n    \"\"\"Represents a Discord guild.\n\n    This is referred to as a \"server\" in the official Discord UI.\n\n    .. container:: operations\n\n        .. describe:: x == y\n\n            Checks if two guilds are equal.\n\n        .. describe:: x != y\n\n            Checks if two guilds are not equal.\n\n        .. describe:: hash(x)\n\n            Returns the guild's hash.\n\n        .. describe:: str(x)\n\n            Returns the guild's name.\n\n    Attributes\n    ----------\n    name: :class:`str`\n        The guild name.\n    emojis: Tuple[:class:`Emoji`, ...]\n        All emojis that the guild owns.\n    stickers: Tuple[:class:`GuildSticker`, ...]\n        All stickers that the guild owns.\n\n        .. versionadded:: 2.0\n    afk_timeout: :class:`int`\n        The number of seconds until someone is moved to the AFK channel.\n    id: :class:`int`\n        The guild's ID.\n    owner_id: :class:`int`\n        The guild owner's ID. Use :attr:`Guild.owner` instead.\n    unavailable: :class:`bool`\n        Indicates if the guild is unavailable. If this is ``True`` then the\n        reliability of other attributes outside of :attr:`Guild.id` is slim and they might\n        all be ``None``. It is best to not do anything with the guild if it is unavailable.\n\n        Check the :func:`on_guild_unavailable` and :func:`on_guild_available` events.\n    max_presences: Optional[:class:`int`]\n        The maximum amount of presences for the guild.\n    max_members: Optional[:class:`int`]\n        The maximum amount of members for the guild.\n\n        .. note::\n\n            This attribute is only available via :meth:`.Client.fetch_guild`.\n    max_video_channel_users: Optional[:class:`int`]\n        The maximum amount of users in a video channel.\n\n        .. versionadded:: 1.4\n    description: Optional[:class:`str`]\n        The guild's description.\n    verification_level: :class:`VerificationLevel`\n        The guild's verification level.\n    vanity_url_code: Optional[:class:`str`]\n        The guild's vanity url code, if any\n\n        .. versionadded:: 2.0\n    explicit_content_filter: :class:`ContentFilter`\n        The guild's explicit content filter.\n    default_notifications: :class:`NotificationLevel`\n        The guild's notification settings.\n    features: List[:class:`str`]\n        A list of features that the guild has. The features that a guild can have are\n        subject to arbitrary change by Discord. A list of guild features can be found\n        in :ddocs:`the Discord documentation <resources/guild#guild-object-guild-features>`.\n\n    premium_tier: :class:`int`\n        The premium tier for this guild. Corresponds to \"Nitro Server\" in the official UI.\n        The number goes from 0 to 3 inclusive.\n    premium_subscription_count: :class:`int`\n        The number of \"boosts\" this guild currently has.\n    preferred_locale: :class:`Locale`\n        The preferred locale for the guild. Used when filtering Server Discovery\n        results to a specific language.\n\n        .. versionchanged:: 2.0\n            This field is now an enum instead of a :class:`str`.\n    nsfw_level: :class:`NSFWLevel`\n        The guild's NSFW level.\n\n        .. versionadded:: 2.0\n    mfa_level: :class:`MFALevel`\n        The guild's Multi-Factor Authentication requirement level.\n\n        .. versionchanged:: 2.0\n            This field is now an enum instead of an :class:`int`.\n\n    approximate_member_count: Optional[:class:`int`]\n        The approximate number of members in the guild. This is ``None`` unless the guild is obtained\n        using :meth:`Client.fetch_guild` or :meth:`Client.fetch_guilds` with ``with_counts=True``.\n\n        .. versionadded:: 2.0\n    approximate_presence_count: Optional[:class:`int`]\n        The approximate number of members currently active in the guild.\n        Offline members are excluded. This is ``None`` unless the guild is obtained using\n        :meth:`Client.fetch_guild` or :meth:`Client.fetch_guilds` with ``with_counts=True``.\n\n        .. versionchanged:: 2.0\n    premium_progress_bar_enabled: :class:`bool`\n        Indicates if the guild has premium AKA server boost level progress bar enabled.\n\n        .. versionadded:: 2.0\n    widget_enabled: :class:`bool`\n        Indicates if the guild has widget enabled.\n\n        .. versionadded:: 2.0\n    max_stage_video_users: Optional[:class:`int`]\n        The maximum amount of users in a stage video channel.\n\n        .. versionadded:: 2.3\n    \"\"\"\n\n    __slots__ = (\n        'afk_timeout',\n        'name',\n        'id',\n        'unavailable',\n        'owner_id',\n        'emojis',\n        'stickers',\n        'features',\n        'verification_level',\n        'explicit_content_filter',\n        'default_notifications',\n        'description',\n        'max_presences',\n        'max_members',\n        'max_video_channel_users',\n        'premium_tier',\n        'premium_subscription_count',\n        'preferred_locale',\n        'nsfw_level',\n        'mfa_level',\n        'vanity_url_code',\n        'widget_enabled',\n        '_widget_channel_id',\n        '_afk_channel_id',\n        '_members',\n        '_channels',\n        '_icon',\n        '_banner',\n        '_state',\n        '_roles',\n        '_member_count',\n        '_large',\n        '_splash',\n        '_voice_states',\n        '_system_channel_id',\n        '_system_channel_flags',\n        '_discovery_splash',\n        '_rules_channel_id',\n        '_public_updates_channel_id',\n        '_stage_instances',\n        '_scheduled_events',\n        '_threads',\n        'approximate_member_count',\n        'approximate_presence_count',\n        'premium_progress_bar_enabled',\n        '_safety_alerts_channel_id',\n        'max_stage_video_users',\n        '_incidents_data',\n    )\n\n    _PREMIUM_GUILD_LIMITS: ClassVar[Dict[Optional[int], _GuildLimit]] = {\n        None: _GuildLimit(emoji=50, stickers=5, bitrate=96e3, filesize=utils.DEFAULT_FILE_SIZE_LIMIT_BYTES),\n        0: _GuildLimit(emoji=50, stickers=5, bitrate=96e3, filesize=utils.DEFAULT_FILE_SIZE_LIMIT_BYTES),\n        1: _GuildLimit(emoji=100, stickers=15, bitrate=128e3, filesize=utils.DEFAULT_FILE_SIZE_LIMIT_BYTES),\n        2: _GuildLimit(emoji=150, stickers=30, bitrate=256e3, filesize=52428800),\n        3: _GuildLimit(emoji=250, stickers=60, bitrate=384e3, filesize=104857600),\n    }\n\n    def __init__(self, *, data: GuildPayload, state: ConnectionState) -> None:\n        self._channels: Dict[int, GuildChannel] = {}\n        self._members: Dict[int, Member] = {}\n        self._voice_states: Dict[int, VoiceState] = {}\n        self._threads: Dict[int, Thread] = {}\n        self._stage_instances: Dict[int, StageInstance] = {}\n        self._scheduled_events: Dict[int, ScheduledEvent] = {}\n        self._state: ConnectionState = state\n        self._member_count: Optional[int] = None\n        self._from_data(data)\n\n    def _add_channel(self, channel: GuildChannel, /) -> None:\n        self._channels[channel.id] = channel\n\n    def _remove_channel(self, channel: Snowflake, /) -> None:\n        self._channels.pop(channel.id, None)\n\n    def _voice_state_for(self, user_id: int, /) -> Optional[VoiceState]:\n        return self._voice_states.get(user_id)\n\n    def _add_member(self, member: Member, /) -> None:\n        self._members[member.id] = member\n\n    def _store_thread(self, payload: ThreadPayload, /) -> Thread:\n        thread = Thread(guild=self, state=self._state, data=payload)\n        self._threads[thread.id] = thread\n        return thread\n\n    def _remove_member(self, member: Snowflake, /) -> None:\n        self._members.pop(member.id, None)\n\n    def _add_thread(self, thread: Thread, /) -> None:\n        self._threads[thread.id] = thread\n\n    def _remove_thread(self, thread: Snowflake, /) -> None:\n        self._threads.pop(thread.id, None)\n\n    def _clear_threads(self) -> None:\n        self._threads.clear()\n\n    def _remove_threads_by_channel(self, channel_id: int) -> List[Thread]:\n        to_remove = [t for t in self._threads.values() if t.parent_id == channel_id]\n        for thread in to_remove:\n            del self._threads[thread.id]\n        return to_remove\n\n    def _filter_threads(self, channel_ids: Set[int]) -> Dict[int, Thread]:\n        to_remove: Dict[int, Thread] = {k: t for k, t in self._threads.items() if t.parent_id in channel_ids}\n        for k in to_remove:\n            del self._threads[k]\n        return to_remove\n\n    def __str__(self) -> str:\n        return self.name or ''\n\n    def __repr__(self) -> str:\n        attrs = (\n            ('id', self.id),\n            ('name', self.name),\n            ('shard_id', self.shard_id),\n            ('chunked', self.chunked),\n            ('member_count', self._member_count),\n        )\n        inner = ' '.join('%s=%r' % t for t in attrs)\n        return f'<Guild {inner}>'\n\n    def _update_voice_state(self, data: GuildVoiceState, channel_id: int) -> Tuple[Optional[Member], VoiceState, VoiceState]:\n        user_id = int(data['user_id'])\n        channel: Optional[VocalGuildChannel] = self.get_channel(channel_id)  # type: ignore # this will always be a voice channel\n        try:\n            # check if we should remove the voice state from cache\n            if channel is None:\n                after = self._voice_states.pop(user_id)\n            else:\n                after = self._voice_states[user_id]\n\n            before = copy.copy(after)\n            after._update(data, channel)\n        except KeyError:\n            # if we're here then we're getting added into the cache\n            after = VoiceState(data=data, channel=channel)\n            before = VoiceState(data=data, channel=None)\n            self._voice_states[user_id] = after\n\n        member = self.get_member(user_id)\n        if member is None:\n            try:\n                member = Member(data=data['member'], state=self._state, guild=self)\n            except KeyError:\n                member = None\n\n        return member, before, after\n\n    def _add_role(self, role: Role, /) -> None:\n        self._roles[role.id] = role\n\n    def _remove_role(self, role_id: int, /) -> Role:\n        # this raises KeyError if it fails..\n        return self._roles.pop(role_id)\n\n    @classmethod\n    def _create_unavailable(cls, *, state: ConnectionState, guild_id: int, data: Optional[Dict[str, Any]]) -> Guild:\n        if data is None:\n            data = {'unavailable': True}\n        data.update(id=guild_id)\n        return cls(state=state, data=data)  # type: ignore\n\n    def _from_data(self, guild: GuildPayload) -> None:\n        try:\n            self._member_count = guild['member_count']\n        except KeyError:\n            pass\n\n        self.name: str = guild.get('name', '')\n        self.verification_level: VerificationLevel = try_enum(VerificationLevel, guild.get('verification_level'))\n        self.default_notifications: NotificationLevel = try_enum(\n            NotificationLevel, guild.get('default_message_notifications')\n        )\n        self.explicit_content_filter: ContentFilter = try_enum(ContentFilter, guild.get('explicit_content_filter', 0))\n        self.afk_timeout: int = guild.get('afk_timeout', 0)\n        self._icon: Optional[str] = guild.get('icon')\n        self._banner: Optional[str] = guild.get('banner')\n        self.unavailable: bool = guild.get('unavailable', False)\n        self.id: int = int(guild['id'])\n        self._roles: Dict[int, Role] = {}\n        state = self._state  # speed up attribute access\n        for r in guild.get('roles', []):\n            role = Role(guild=self, data=r, state=state)\n            self._roles[role.id] = role\n\n        self.emojis: Tuple[Emoji, ...] = (\n            tuple(map(lambda d: state.store_emoji(self, d), guild.get('emojis', [])))\n            if state.cache_guild_expressions\n            else ()\n        )\n        self.stickers: Tuple[GuildSticker, ...] = (\n            tuple(map(lambda d: state.store_sticker(self, d), guild.get('stickers', [])))\n            if state.cache_guild_expressions\n            else ()\n        )\n        self.features: List[GuildFeature] = guild.get('features', [])\n        self._splash: Optional[str] = guild.get('splash')\n        self._system_channel_id: Optional[int] = utils._get_as_snowflake(guild, 'system_channel_id')\n        self.description: Optional[str] = guild.get('description')\n        self.max_presences: Optional[int] = guild.get('max_presences')\n        self.max_members: Optional[int] = guild.get('max_members')\n        self.max_video_channel_users: Optional[int] = guild.get('max_video_channel_users')\n        self.max_stage_video_users: Optional[int] = guild.get('max_stage_video_channel_users')\n        self.premium_tier: int = guild.get('premium_tier', 0)\n        self.premium_subscription_count: int = guild.get('premium_subscription_count') or 0\n        self.vanity_url_code: Optional[str] = guild.get('vanity_url_code')\n        self.widget_enabled: bool = guild.get('widget_enabled', False)\n        self._widget_channel_id: Optional[int] = utils._get_as_snowflake(guild, 'widget_channel_id')\n        self._system_channel_flags: int = guild.get('system_channel_flags', 0)\n        self.preferred_locale: Locale = try_enum(Locale, guild.get('preferred_locale', 'en-US'))\n        self._discovery_splash: Optional[str] = guild.get('discovery_splash')\n        self._rules_channel_id: Optional[int] = utils._get_as_snowflake(guild, 'rules_channel_id')\n        self._public_updates_channel_id: Optional[int] = utils._get_as_snowflake(guild, 'public_updates_channel_id')\n        self._safety_alerts_channel_id: Optional[int] = utils._get_as_snowflake(guild, 'safety_alerts_channel_id')\n        self.nsfw_level: NSFWLevel = try_enum(NSFWLevel, guild.get('nsfw_level', 0))\n        self.mfa_level: MFALevel = try_enum(MFALevel, guild.get('mfa_level', 0))\n        self.approximate_presence_count: Optional[int] = guild.get('approximate_presence_count')\n        self.approximate_member_count: Optional[int] = guild.get('approximate_member_count')\n        self.premium_progress_bar_enabled: bool = guild.get('premium_progress_bar_enabled', False)\n        self.owner_id: Optional[int] = utils._get_as_snowflake(guild, 'owner_id')\n        self._large: Optional[bool] = None if self._member_count is None else self._member_count >= 250\n        self._afk_channel_id: Optional[int] = utils._get_as_snowflake(guild, 'afk_channel_id')\n        self._incidents_data: Optional[IncidentData] = guild.get('incidents_data')\n\n        if 'channels' in guild:\n            channels = guild['channels']\n            for c in channels:\n                factory, ch_type = _guild_channel_factory(c['type'])\n                if factory:\n                    self._add_channel(factory(guild=self, data=c, state=self._state))  # type: ignore\n\n        for obj in guild.get('voice_states', []):\n            self._update_voice_state(obj, int(obj['channel_id']))\n\n        cache_joined = self._state.member_cache_flags.joined\n        cache_voice = self._state.member_cache_flags.voice\n        self_id = self._state.self_id\n        for mdata in guild.get('members', []):\n            member = Member(data=mdata, guild=self, state=self._state)  # type: ignore # Members will have the 'user' key in this scenario\n            if cache_joined or member.id == self_id or (cache_voice and member.id in self._voice_states):\n                self._add_member(member)\n\n        empty_tuple = ()\n        for presence in guild.get('presences', []):\n            user_id = int(presence['user']['id'])\n            member = self.get_member(user_id)\n            if member is not None:\n                member._presence_update(presence, empty_tuple)  # type: ignore\n\n        if 'threads' in guild:\n            threads = guild['threads']\n            for thread in threads:\n                self._add_thread(Thread(guild=self, state=self._state, data=thread))\n\n        if 'stage_instances' in guild:\n            for s in guild['stage_instances']:\n                stage_instance = StageInstance(guild=self, data=s, state=self._state)\n                self._stage_instances[stage_instance.id] = stage_instance\n\n        if 'guild_scheduled_events' in guild:\n            for s in guild['guild_scheduled_events']:\n                scheduled_event = ScheduledEvent(data=s, state=self._state)\n                self._scheduled_events[scheduled_event.id] = scheduled_event\n\n    @property\n    def channels(self) -> Sequence[GuildChannel]:\n        \"\"\"Sequence[:class:`abc.GuildChannel`]: A list of channels that belongs to this guild.\"\"\"\n        return utils.SequenceProxy(self._channels.values())\n\n    @property\n    def threads(self) -> Sequence[Thread]:\n        \"\"\"Sequence[:class:`Thread`]: A list of threads that you have permission to view.\n\n        .. versionadded:: 2.0\n        \"\"\"\n        return utils.SequenceProxy(self._threads.values())\n\n    @property\n    def large(self) -> bool:\n        \"\"\":class:`bool`: Indicates if the guild is a 'large' guild.\n\n        A large guild is defined as having more than ``large_threshold`` count\n        members, which for this library is set to the maximum of 250.\n        \"\"\"\n        if self._large is None:\n            if self._member_count is not None:\n                return self._member_count >= 250\n            return len(self._members) >= 250\n        return self._large\n\n    @property\n    def voice_channels(self) -> List[VoiceChannel]:\n        \"\"\"List[:class:`VoiceChannel`]: A list of voice channels that belongs to this guild.\n\n        This is sorted by the position and are in UI order from top to bottom.\n        \"\"\"\n        r = [ch for ch in self._channels.values() if isinstance(ch, VoiceChannel)]\n        r.sort(key=lambda c: (c.position, c.id))\n        return r\n\n    @property\n    def stage_channels(self) -> List[StageChannel]:\n        \"\"\"List[:class:`StageChannel`]: A list of stage channels that belongs to this guild.\n\n        .. versionadded:: 1.7\n\n        This is sorted by the position and are in UI order from top to bottom.\n        \"\"\"\n        r = [ch for ch in self._channels.values() if isinstance(ch, StageChannel)]\n        r.sort(key=lambda c: (c.position, c.id))\n        return r\n\n    @property\n    def me(self) -> Member:\n        \"\"\":class:`Member`: Similar to :attr:`Client.user` except an instance of :class:`Member`.\n        This is essentially used to get the member version of yourself.\n        \"\"\"\n        self_id = self._state.user.id  # type: ignore # state.user won't be None if we're logged in\n        # The self member is *always* cached\n        return self.get_member(self_id)  # type: ignore\n\n    @property\n    def voice_client(self) -> Optional[VoiceProtocol]:\n        \"\"\"Optional[:class:`VoiceProtocol`]: Returns the :class:`VoiceProtocol` associated with this guild, if any.\"\"\"\n        return self._state._get_voice_client(self.id)\n\n    @property\n    def text_channels(self) -> List[TextChannel]:\n        \"\"\"List[:class:`TextChannel`]: A list of text channels that belongs to this guild.\n\n        This is sorted by the position and are in UI order from top to bottom.\n        \"\"\"\n        r = [ch for ch in self._channels.values() if isinstance(ch, TextChannel)]\n        r.sort(key=lambda c: (c.position, c.id))\n        return r\n\n    @property\n    def categories(self) -> List[CategoryChannel]:\n        \"\"\"List[:class:`CategoryChannel`]: A list of categories that belongs to this guild.\n\n        This is sorted by the position and are in UI order from top to bottom.\n        \"\"\"\n        r = [ch for ch in self._channels.values() if isinstance(ch, CategoryChannel)]\n        r.sort(key=lambda c: (c.position, c.id))\n        return r\n\n    @property\n    def forums(self) -> List[ForumChannel]:\n        \"\"\"List[:class:`ForumChannel`]: A list of forum channels that belongs to this guild.\n\n        This is sorted by the position and are in UI order from top to bottom.\n        \"\"\"\n        r = [ch for ch in self._channels.values() if isinstance(ch, ForumChannel)]\n        r.sort(key=lambda c: (c.position, c.id))\n        return r\n\n    def by_category(self) -> List[ByCategoryItem]:\n        \"\"\"Returns every :class:`CategoryChannel` and their associated channels.\n\n        These channels and categories are sorted in the official Discord UI order.\n\n        If the channels do not have a category, then the first element of the tuple is\n        ``None``.\n\n        Returns\n        --------\n        List[Tuple[Optional[:class:`CategoryChannel`], List[:class:`abc.GuildChannel`]]]:\n            The categories and their associated channels.\n        \"\"\"\n        grouped: Dict[Optional[int], List[GuildChannel]] = {}\n        for channel in self._channels.values():\n            if isinstance(channel, CategoryChannel):\n                grouped.setdefault(channel.id, [])\n                continue\n\n            try:\n                grouped[channel.category_id].append(channel)\n            except KeyError:\n                grouped[channel.category_id] = [channel]\n\n        def key(t: ByCategoryItem) -> Tuple[Tuple[int, int], List[GuildChannel]]:\n            k, v = t\n            return ((k.position, k.id) if k else (-1, -1), v)\n\n        _get = self._channels.get\n        as_list: List[ByCategoryItem] = [(_get(k), v) for k, v in grouped.items()]  # type: ignore\n        as_list.sort(key=key)\n        for _, channels in as_list:\n            channels.sort(key=lambda c: (c._sorting_bucket, c.position, c.id))\n        return as_list\n\n    def _resolve_channel(self, id: Optional[int], /) -> Optional[Union[GuildChannel, Thread]]:\n        if id is None:\n            return\n\n        return self._channels.get(id) or self._threads.get(id)\n\n    def get_channel_or_thread(self, channel_id: int, /) -> Optional[Union[Thread, GuildChannel]]:\n        \"\"\"Returns a channel or thread with the given ID.\n\n        .. versionadded:: 2.0\n\n        Parameters\n        -----------\n        channel_id: :class:`int`\n            The ID to search for.\n\n        Returns\n        --------\n        Optional[Union[:class:`Thread`, :class:`.abc.GuildChannel`]]\n            The returned channel or thread or ``None`` if not found.\n        \"\"\"\n        return self._channels.get(channel_id) or self._threads.get(channel_id)\n\n    def get_channel(self, channel_id: int, /) -> Optional[GuildChannel]:\n        \"\"\"Returns a channel with the given ID.\n\n        .. note::\n\n            This does *not* search for threads.\n\n        .. versionchanged:: 2.0\n\n            ``channel_id`` parameter is now positional-only.\n\n        Parameters\n        -----------\n        channel_id: :class:`int`\n            The ID to search for.\n\n        Returns\n        --------\n        Optional[:class:`.abc.GuildChannel`]\n            The returned channel or ``None`` if not found.\n        \"\"\"\n        return self._channels.get(channel_id)\n\n    def get_thread(self, thread_id: int, /) -> Optional[Thread]:\n        \"\"\"Returns a thread with the given ID.\n\n        .. note::\n\n            This does not always retrieve archived threads, as they are not retained in the internal\n            cache. Use :func:`fetch_channel` instead.\n\n        .. versionadded:: 2.0\n\n        Parameters\n        -----------\n        thread_id: :class:`int`\n            The ID to search for.\n\n        Returns\n        --------\n        Optional[:class:`Thread`]\n            The returned thread or ``None`` if not found.\n        \"\"\"\n        return self._threads.get(thread_id)\n\n    def get_emoji(self, emoji_id: int, /) -> Optional[Emoji]:\n        \"\"\"Returns an emoji with the given ID.\n\n        .. versionadded:: 2.3\n\n        Parameters\n        ----------\n        emoji_id: int\n            The ID to search for.\n\n        Returns\n        --------\n        Optional[:class:`Emoji`]\n            The returned Emoji or ``None`` if not found.\n        \"\"\"\n        emoji = self._state.get_emoji(emoji_id)\n        if emoji and emoji.guild == self:\n            return emoji\n        return None\n\n    @property\n    def afk_channel(self) -> Optional[VocalGuildChannel]:\n        \"\"\"Optional[Union[:class:`VoiceChannel`, :class:`StageChannel`]]: The channel that denotes the AFK channel.\n\n        If no channel is set, then this returns ``None``.\n        \"\"\"\n        return self.get_channel(self._afk_channel_id)  # type: ignore\n\n    @property\n    def system_channel(self) -> Optional[TextChannel]:\n        \"\"\"Optional[:class:`TextChannel`]: Returns the guild's channel used for system messages.\n\n        If no channel is set, then this returns ``None``.\n        \"\"\"\n        channel_id = self._system_channel_id\n        return channel_id and self._channels.get(channel_id)  # type: ignore\n\n    @property\n    def system_channel_flags(self) -> SystemChannelFlags:\n        \"\"\":class:`SystemChannelFlags`: Returns the guild's system channel settings.\"\"\"\n        return SystemChannelFlags._from_value(self._system_channel_flags)\n\n    @property\n    def rules_channel(self) -> Optional[TextChannel]:\n        \"\"\"Optional[:class:`TextChannel`]: Return's the guild's channel used for the rules.\n        The guild must be a Community guild.\n\n        If no channel is set, then this returns ``None``.\n\n        .. versionadded:: 1.3\n        \"\"\"\n        channel_id = self._rules_channel_id\n        return channel_id and self._channels.get(channel_id)  # type: ignore\n\n    @property\n    def public_updates_channel(self) -> Optional[TextChannel]:\n        \"\"\"Optional[:class:`TextChannel`]: Return's the guild's channel where admins and\n        moderators of the guilds receive notices from Discord. The guild must be a\n        Community guild.\n\n        If no channel is set, then this returns ``None``.\n\n        .. versionadded:: 1.4\n        \"\"\"\n        channel_id = self._public_updates_channel_id\n        return channel_id and self._channels.get(channel_id)  # type: ignore\n\n    @property\n    def safety_alerts_channel(self) -> Optional[TextChannel]:\n        \"\"\"Optional[:class:`TextChannel`]: Return's the guild's channel used for safety alerts, if set.\n\n        For example, this is used for the raid protection setting. The guild must have the ``COMMUNITY`` feature.\n\n        .. versionadded:: 2.3\n        \"\"\"\n        channel_id = self._safety_alerts_channel_id\n        return channel_id and self._channels.get(channel_id)  # type: ignore\n\n    @property\n    def widget_channel(self) -> Optional[Union[TextChannel, ForumChannel, VoiceChannel, StageChannel]]:\n        \"\"\"Optional[Union[:class:`TextChannel`, :class:`ForumChannel`, :class:`VoiceChannel`, :class:`StageChannel`]]: Returns\n        the widget channel of the guild.\n\n        If no channel is set, then this returns ``None``.\n\n        .. versionadded:: 2.3\n        \"\"\"\n        channel_id = self._widget_channel_id\n        return channel_id and self._channels.get(channel_id)  # type: ignore\n\n    @property\n    def emoji_limit(self) -> int:\n        \"\"\":class:`int`: The maximum number of emoji slots this guild has.\"\"\"\n        more_emoji = 200 if 'MORE_EMOJI' in self.features else 50\n        return max(more_emoji, self._PREMIUM_GUILD_LIMITS[self.premium_tier].emoji)\n\n    @property\n    def sticker_limit(self) -> int:\n        \"\"\":class:`int`: The maximum number of sticker slots this guild has.\n\n        .. versionadded:: 2.0\n        \"\"\"\n        more_stickers = 60 if 'MORE_STICKERS' in self.features else 0\n        return max(more_stickers, self._PREMIUM_GUILD_LIMITS[self.premium_tier].stickers)\n\n    @property\n    def bitrate_limit(self) -> float:\n        \"\"\":class:`float`: The maximum bitrate for voice channels this guild can have.\"\"\"\n        vip_guild = self._PREMIUM_GUILD_LIMITS[1].bitrate if 'VIP_REGIONS' in self.features else 96e3\n        return max(vip_guild, self._PREMIUM_GUILD_LIMITS[self.premium_tier].bitrate)\n\n    @property\n    def filesize_limit(self) -> int:\n        \"\"\":class:`int`: The maximum number of bytes files can have when uploaded to this guild.\"\"\"\n        return self._PREMIUM_GUILD_LIMITS[self.premium_tier].filesize\n\n    @property\n    def members(self) -> Sequence[Member]:\n        \"\"\"Sequence[:class:`Member`]: A list of members that belong to this guild.\"\"\"\n        return utils.SequenceProxy(self._members.values())\n\n    def get_member(self, user_id: int, /) -> Optional[Member]:\n        \"\"\"Returns a member with the given ID.\n\n        .. versionchanged:: 2.0\n\n            ``user_id`` parameter is now positional-only.\n\n        Parameters\n        -----------\n        user_id: :class:`int`\n            The ID to search for.\n\n        Returns\n        --------\n        Optional[:class:`Member`]\n            The member or ``None`` if not found.\n        \"\"\"\n        return self._members.get(user_id)\n\n    @property\n    def premium_subscribers(self) -> List[Member]:\n        \"\"\"List[:class:`Member`]: A list of members who have \"boosted\" this guild.\"\"\"\n        return [member for member in self.members if member.premium_since is not None]\n\n    @property\n    def roles(self) -> Sequence[Role]:\n        \"\"\"Sequence[:class:`Role`]: Returns a sequence of the guild's roles in hierarchy order.\n\n        The first element of this sequence will be the lowest role in the\n        hierarchy.\n        \"\"\"\n        return utils.SequenceProxy(self._roles.values(), sorted=True)\n\n    def get_role(self, role_id: int, /) -> Optional[Role]:\n        \"\"\"Returns a role with the given ID.\n\n        .. versionchanged:: 2.0\n\n            ``role_id`` parameter is now positional-only.\n\n        Parameters\n        -----------\n        role_id: :class:`int`\n            The ID to search for.\n\n        Returns\n        --------\n        Optional[:class:`Role`]\n            The role or ``None`` if not found.\n        \"\"\"\n        return self._roles.get(role_id)\n\n    @property\n    def default_role(self) -> Role:\n        \"\"\":class:`Role`: Gets the @everyone role that all members have by default.\"\"\"\n        # The @everyone role is *always* given\n        return self.get_role(self.id)  # type: ignore\n\n    @property\n    def premium_subscriber_role(self) -> Optional[Role]:\n        \"\"\"Optional[:class:`Role`]: Gets the premium subscriber role, AKA \"boost\" role, in this guild.\n\n        .. versionadded:: 1.6\n        \"\"\"\n        for role in self._roles.values():\n            if role.is_premium_subscriber():\n                return role\n        return None\n\n    @property\n    def self_role(self) -> Optional[Role]:\n        \"\"\"Optional[:class:`Role`]: Gets the role associated with this client's user, if any.\n\n        .. versionadded:: 1.6\n        \"\"\"\n        self_id = self._state.self_id\n        for role in self._roles.values():\n            tags = role.tags\n            if tags and tags.bot_id == self_id:\n                return role\n        return None\n\n    @property\n    def stage_instances(self) -> Sequence[StageInstance]:\n        \"\"\"Sequence[:class:`StageInstance`]: Returns a sequence of the guild's stage instances that\n        are currently running.\n\n        .. versionadded:: 2.0\n        \"\"\"\n        return utils.SequenceProxy(self._stage_instances.values())\n\n    def get_stage_instance(self, stage_instance_id: int, /) -> Optional[StageInstance]:\n        \"\"\"Returns a stage instance with the given ID.\n\n        .. versionadded:: 2.0\n\n        Parameters\n        -----------\n        stage_instance_id: :class:`int`\n            The ID to search for.\n\n        Returns\n        --------\n        Optional[:class:`StageInstance`]\n            The stage instance or ``None`` if not found.\n        \"\"\"\n        return self._stage_instances.get(stage_instance_id)\n\n    @property\n    def scheduled_events(self) -> Sequence[ScheduledEvent]:\n        \"\"\"Sequence[:class:`ScheduledEvent`]: Returns a sequence of the guild's scheduled events.\n\n        .. versionadded:: 2.0\n        \"\"\"\n        return utils.SequenceProxy(self._scheduled_events.values())\n\n    def get_scheduled_event(self, scheduled_event_id: int, /) -> Optional[ScheduledEvent]:\n        \"\"\"Returns a scheduled event with the given ID.\n\n        .. versionadded:: 2.0\n\n        Parameters\n        -----------\n        scheduled_event_id: :class:`int`\n            The ID to search for.\n\n        Returns\n        --------\n        Optional[:class:`ScheduledEvent`]\n            The scheduled event or ``None`` if not found.\n        \"\"\"\n        return self._scheduled_events.get(scheduled_event_id)\n\n    @property\n    def owner(self) -> Optional[Member]:\n        \"\"\"Optional[:class:`Member`]: The member that owns the guild.\"\"\"\n        return self.get_member(self.owner_id)  # type: ignore\n\n    @property\n    def icon(self) -> Optional[Asset]:\n        \"\"\"Optional[:class:`Asset`]: Returns the guild's icon asset, if available.\"\"\"\n        if self._icon is None:\n            return None\n        return Asset._from_guild_icon(self._state, self.id, self._icon)\n\n    @property\n    def banner(self) -> Optional[Asset]:\n        \"\"\"Optional[:class:`Asset`]: Returns the guild's banner asset, if available.\"\"\"\n        if self._banner is None:\n            return None\n        return Asset._from_guild_image(self._state, self.id, self._banner, path='banners')\n\n    @property\n    def splash(self) -> Optional[Asset]:\n        \"\"\"Optional[:class:`Asset`]: Returns the guild's invite splash asset, if available.\"\"\"\n        if self._splash is None:\n            return None\n        return Asset._from_guild_image(self._state, self.id, self._splash, path='splashes')\n\n    @property\n    def discovery_splash(self) -> Optional[Asset]:\n        \"\"\"Optional[:class:`Asset`]: Returns the guild's discovery splash asset, if available.\"\"\"\n        if self._discovery_splash is None:\n            return None\n        return Asset._from_guild_image(self._state, self.id, self._discovery_splash, path='discovery-splashes')\n\n    @property\n    def member_count(self) -> Optional[int]:\n        \"\"\"Optional[:class:`int`]: Returns the member count if available.\n\n        .. warning::\n\n            Due to a Discord limitation, in order for this attribute to remain up-to-date and\n            accurate, it requires :attr:`Intents.members` to be specified.\n\n        .. versionchanged:: 2.0\n\n            Now returns an ``Optional[int]``.\n        \"\"\"\n        return self._member_count\n\n    @property\n    def chunked(self) -> bool:\n        \"\"\":class:`bool`: Returns a boolean indicating if the guild is \"chunked\".\n\n        A chunked guild means that :attr:`member_count` is equal to the\n        number of members stored in the internal :attr:`members` cache.\n\n        If this value returns ``False``, then you should request for\n        offline members.\n        \"\"\"\n        count = self._member_count\n        if count is None:\n            return False\n        return count == len(self._members)\n\n    @property\n    def shard_id(self) -> int:\n        \"\"\":class:`int`: Returns the shard ID for this guild if applicable.\"\"\"\n        count = self._state.shard_count\n        if count is None:\n            return 0\n        return (self.id >> 22) % count\n\n    @property\n    def created_at(self) -> datetime.datetime:\n        \"\"\":class:`datetime.datetime`: Returns the guild's creation time in UTC.\"\"\"\n        return utils.snowflake_time(self.id)\n\n    def get_member_named(self, name: str, /) -> Optional[Member]:\n        \"\"\"Returns the first member found that matches the name provided.\n\n        The name is looked up in the following order:\n\n        - Username#Discriminator (deprecated)\n        - Username#0 (deprecated, only gets users that migrated from their discriminator)\n        - Nickname\n        - Global name\n        - Username\n\n        If no member is found, ``None`` is returned.\n\n        .. versionchanged:: 2.0\n\n            ``name`` parameter is now positional-only.\n\n        .. deprecated:: 2.3\n\n            Looking up users via discriminator due to Discord API change.\n\n        Parameters\n        -----------\n        name: :class:`str`\n            The name of the member to lookup.\n\n        Returns\n        --------\n        Optional[:class:`Member`]\n            The member in this guild with the associated name. If not found\n            then ``None`` is returned.\n        \"\"\"\n\n        members = self.members\n\n        username, _, discriminator = name.rpartition('#')\n\n        # If # isn't found then \"discriminator\" actually has the username\n        if not username:\n            discriminator, username = username, discriminator\n\n        if discriminator == '0' or (len(discriminator) == 4 and discriminator.isdigit()):\n            return utils.find(lambda m: m.name == username and m.discriminator == discriminator, members)\n\n        def pred(m: Member) -> bool:\n            return m.nick == name or m.global_name == name or m.name == name\n\n        return utils.find(pred, members)\n\n    @overload\n    def _create_channel(\n        self,\n        name: str,\n        channel_type: Literal[ChannelType.text],\n        overwrites: Mapping[Union[Role, Member, Object], PermissionOverwrite] = ...,\n        category: Optional[Snowflake] = ...,\n        **options: Any,\n    ) -> Coroutine[Any, Any, TextChannelPayload]:\n        ...\n\n    @overload\n    def _create_channel(\n        self,\n        name: str,\n        channel_type: Literal[ChannelType.voice],\n        overwrites: Mapping[Union[Role, Member, Object], PermissionOverwrite] = ...,\n        category: Optional[Snowflake] = ...,\n        **options: Any,\n    ) -> Coroutine[Any, Any, VoiceChannelPayload]:\n        ...\n\n    @overload\n    def _create_channel(\n        self,\n        name: str,\n        channel_type: Literal[ChannelType.stage_voice],\n        overwrites: Mapping[Union[Role, Member, Object], PermissionOverwrite] = ...,\n        category: Optional[Snowflake] = ...,\n        **options: Any,\n    ) -> Coroutine[Any, Any, StageChannelPayload]:\n        ...\n\n    @overload\n    def _create_channel(\n        self,\n        name: str,\n        channel_type: Literal[ChannelType.category],\n        overwrites: Mapping[Union[Role, Member, Object], PermissionOverwrite] = ...,\n        category: Optional[Snowflake] = ...,\n        **options: Any,\n    ) -> Coroutine[Any, Any, CategoryChannelPayload]:\n        ...\n\n    @overload\n    def _create_channel(\n        self,\n        name: str,\n        channel_type: Literal[ChannelType.news],\n        overwrites: Mapping[Union[Role, Member, Object], PermissionOverwrite] = ...,\n        category: Optional[Snowflake] = ...,\n        **options: Any,\n    ) -> Coroutine[Any, Any, NewsChannelPayload]:\n        ...\n\n    @overload\n    def _create_channel(\n        self,\n        name: str,\n        channel_type: Literal[ChannelType.news, ChannelType.text],\n        overwrites: Mapping[Union[Role, Member, Object], PermissionOverwrite] = ...,\n        category: Optional[Snowflake] = ...,\n        **options: Any,\n    ) -> Coroutine[Any, Any, Union[TextChannelPayload, NewsChannelPayload]]:\n        ...\n\n    @overload\n    def _create_channel(\n        self,\n        name: str,\n        channel_type: Literal[ChannelType.forum],\n        overwrites: Mapping[Union[Role, Member, Object], PermissionOverwrite] = ...,\n        category: Optional[Snowflake] = ...,\n        **options: Any,\n    ) -> Coroutine[Any, Any, ForumChannelPayload]:\n        ...\n\n    @overload\n    def _create_channel(\n        self,\n        name: str,\n        channel_type: ChannelType,\n        overwrites: Mapping[Union[Role, Member, Object], PermissionOverwrite] = ...,\n        category: Optional[Snowflake] = ...,\n        **options: Any,\n    ) -> Coroutine[Any, Any, GuildChannelPayload]:\n        ...\n\n    def _create_channel(\n        self,\n        name: str,\n        channel_type: ChannelType,\n        overwrites: Mapping[Union[Role, Member, Object], PermissionOverwrite] = MISSING,\n        category: Optional[Snowflake] = None,\n        **options: Any,\n    ) -> Coroutine[Any, Any, GuildChannelPayload]:\n        if overwrites is MISSING:\n            overwrites = {}\n        elif not isinstance(overwrites, Mapping):\n            raise TypeError('overwrites parameter expects a dict.')\n\n        perms = []\n        for target, perm in overwrites.items():\n            if not isinstance(perm, PermissionOverwrite):\n                raise TypeError(f'Expected PermissionOverwrite received {perm.__class__.__name__}')\n\n            allow, deny = perm.pair()\n            payload = {'allow': allow.value, 'deny': deny.value, 'id': target.id}\n\n            if isinstance(target, Role):\n                payload['type'] = abc._Overwrites.ROLE\n            else:\n                payload['type'] = abc._Overwrites.MEMBER\n\n            perms.append(payload)\n\n        parent_id = category.id if category else None\n        return self._state.http.create_channel(\n            self.id, channel_type.value, name=name, parent_id=parent_id, permission_overwrites=perms, **options\n        )\n\n    async def create_text_channel(\n        self,\n        name: str,\n        *,\n        reason: Optional[str] = None,\n        category: Optional[CategoryChannel] = None,\n        news: bool = False,\n        position: int = MISSING,\n        topic: str = MISSING,\n        slowmode_delay: int = MISSING,\n        nsfw: bool = MISSING,\n        overwrites: Mapping[Union[Role, Member, Object], PermissionOverwrite] = MISSING,\n        default_auto_archive_duration: int = MISSING,\n        default_thread_slowmode_delay: int = MISSING,\n    ) -> TextChannel:\n        \"\"\"|coro|\n\n        Creates a :class:`TextChannel` for the guild.\n\n        Note that you must have :attr:`~Permissions.manage_channels` to create the channel.\n\n        The ``overwrites`` parameter can be used to create a 'secret'\n        channel upon creation. This parameter expects a :class:`dict` of\n        overwrites with the target (either a :class:`Member` or a :class:`Role`)\n        as the key and a :class:`PermissionOverwrite` as the value.\n\n        .. note::\n\n            Creating a channel of a specified position will not update the position of\n            other channels to follow suit. A follow-up call to :meth:`~TextChannel.edit`\n            will be required to update the position of the channel in the channel list.\n\n        .. versionchanged:: 2.0\n            This function will now raise :exc:`TypeError` instead of\n            ``InvalidArgument``.\n\n        Examples\n        ----------\n\n        Creating a basic channel:\n\n        .. code-block:: python3\n\n            channel = await guild.create_text_channel('cool-channel')\n\n        Creating a \"secret\" channel:\n\n        .. code-block:: python3\n\n            overwrites = {\n                guild.default_role: discord.PermissionOverwrite(read_messages=False),\n                guild.me: discord.PermissionOverwrite(read_messages=True)\n            }\n\n            channel = await guild.create_text_channel('secret', overwrites=overwrites)\n\n        Parameters\n        -----------\n        name: :class:`str`\n            The channel's name.\n        overwrites: Dict[Union[:class:`Role`, :class:`Member`], :class:`PermissionOverwrite`]\n            A :class:`dict` of target (either a role or a member) to\n            :class:`PermissionOverwrite` to apply upon creation of a channel.\n            Useful for creating secret channels.\n        category: Optional[:class:`CategoryChannel`]\n            The category to place the newly created channel under.\n            The permissions will be automatically synced to category if no\n            overwrites are provided.\n        position: :class:`int`\n            The position in the channel list. This is a number that starts\n            at 0. e.g. the top channel is position 0.\n        topic: :class:`str`\n            The new channel's topic.\n        slowmode_delay: :class:`int`\n            Specifies the slowmode rate limit for user in this channel, in seconds.\n            The maximum value possible is ``21600``.\n        nsfw: :class:`bool`\n            To mark the channel as NSFW or not.\n        news: :class:`bool`\n            Whether to create the text channel as a news channel.\n\n            .. versionadded:: 2.0\n        default_auto_archive_duration: :class:`int`\n            The default auto archive duration for threads created in the text channel (in minutes).\n            Must be one of ``60``, ``1440``, ``4320``, or ``10080``.\n\n            .. versionadded:: 2.0\n        default_thread_slowmode_delay: :class:`int`\n            The default slowmode delay in seconds for threads created in the text channel.\n\n            .. versionadded:: 2.3\n        reason: Optional[:class:`str`]\n            The reason for creating this channel. Shows up on the audit log.\n\n        Raises\n        -------\n        Forbidden\n            You do not have the proper permissions to create this channel.\n        HTTPException\n            Creating the channel failed.\n        TypeError\n            The permission overwrite information is not in proper form.\n\n        Returns\n        -------\n        :class:`TextChannel`\n            The channel that was just created.\n        \"\"\"\n\n        options = {}\n        if position is not MISSING:\n            options['position'] = position\n\n        if topic is not MISSING:\n            options['topic'] = topic\n\n        if slowmode_delay is not MISSING:\n            options['rate_limit_per_user'] = slowmode_delay\n\n        if nsfw is not MISSING:\n            options['nsfw'] = nsfw\n\n        if default_auto_archive_duration is not MISSING:\n            options['default_auto_archive_duration'] = default_auto_archive_duration\n\n        if default_thread_slowmode_delay is not MISSING:\n            options['default_thread_rate_limit_per_user'] = default_thread_slowmode_delay\n\n        data = await self._create_channel(\n            name,\n            overwrites=overwrites,\n            channel_type=ChannelType.news if news else ChannelType.text,\n            category=category,\n            reason=reason,\n            **options,\n        )\n        channel = TextChannel(state=self._state, guild=self, data=data)\n\n        # temporarily add to the cache\n        self._channels[channel.id] = channel\n        return channel\n\n    async def create_voice_channel(\n        self,\n        name: str,\n        *,\n        reason: Optional[str] = None,\n        category: Optional[CategoryChannel] = None,\n        position: int = MISSING,\n        bitrate: int = MISSING,\n        user_limit: int = MISSING,\n        rtc_region: Optional[str] = MISSING,\n        video_quality_mode: VideoQualityMode = MISSING,\n        overwrites: Mapping[Union[Role, Member, Object], PermissionOverwrite] = MISSING,\n    ) -> VoiceChannel:\n        \"\"\"|coro|\n\n        This is similar to :meth:`create_text_channel` except makes a :class:`VoiceChannel` instead.\n\n        .. versionchanged:: 2.0\n            This function will now raise :exc:`TypeError` instead of\n            ``InvalidArgument``.\n\n        Parameters\n        -----------\n        name: :class:`str`\n            The channel's name.\n        overwrites: Dict[Union[:class:`Role`, :class:`Member`], :class:`PermissionOverwrite`]\n            A :class:`dict` of target (either a role or a member) to\n            :class:`PermissionOverwrite` to apply upon creation of a channel.\n            Useful for creating secret channels.\n        category: Optional[:class:`CategoryChannel`]\n            The category to place the newly created channel under.\n            The permissions will be automatically synced to category if no\n            overwrites are provided.\n        position: :class:`int`\n            The position in the channel list. This is a number that starts\n            at 0. e.g. the top channel is position 0.\n        bitrate: :class:`int`\n            The channel's preferred audio bitrate in bits per second.\n        user_limit: :class:`int`\n            The channel's limit for number of members that can be in a voice channel.\n        rtc_region: Optional[:class:`str`]\n            The region for the voice channel's voice communication.\n            A value of ``None`` indicates automatic voice region detection.\n\n            .. versionadded:: 1.7\n        video_quality_mode: :class:`VideoQualityMode`\n            The camera video quality for the voice channel's participants.\n\n            .. versionadded:: 2.0\n        reason: Optional[:class:`str`]\n            The reason for creating this channel. Shows up on the audit log.\n\n        Raises\n        ------\n        Forbidden\n            You do not have the proper permissions to create this channel.\n        HTTPException\n            Creating the channel failed.\n        TypeError\n            The permission overwrite information is not in proper form.\n\n        Returns\n        -------\n        :class:`VoiceChannel`\n            The channel that was just created.\n        \"\"\"\n        options = {}\n        if position is not MISSING:\n            options['position'] = position\n\n        if bitrate is not MISSING:\n            options['bitrate'] = bitrate\n\n        if user_limit is not MISSING:\n            options['user_limit'] = user_limit\n\n        if rtc_region is not MISSING:\n            options['rtc_region'] = None if rtc_region is None else rtc_region\n\n        if video_quality_mode is not MISSING:\n            if not isinstance(video_quality_mode, VideoQualityMode):\n                raise TypeError('video_quality_mode must be of type VideoQualityMode')\n            options['video_quality_mode'] = video_quality_mode.value\n\n        data = await self._create_channel(\n            name, overwrites=overwrites, channel_type=ChannelType.voice, category=category, reason=reason, **options\n        )\n        channel = VoiceChannel(state=self._state, guild=self, data=data)\n\n        # temporarily add to the cache\n        self._channels[channel.id] = channel\n        return channel\n\n    async def create_stage_channel(\n        self,\n        name: str,\n        *,\n        reason: Optional[str] = None,\n        category: Optional[CategoryChannel] = None,\n        position: int = MISSING,\n        bitrate: int = MISSING,\n        user_limit: int = MISSING,\n        rtc_region: Optional[str] = MISSING,\n        video_quality_mode: VideoQualityMode = MISSING,\n        overwrites: Mapping[Union[Role, Member, Object], PermissionOverwrite] = MISSING,\n    ) -> StageChannel:\n        \"\"\"|coro|\n\n        This is similar to :meth:`create_text_channel` except makes a :class:`StageChannel` instead.\n\n        .. versionadded:: 1.7\n\n        .. versionchanged:: 2.0\n            This function will now raise :exc:`TypeError` instead of\n            ``InvalidArgument``.\n\n        Parameters\n        -----------\n        name: :class:`str`\n            The channel's name.\n        overwrites: Dict[Union[:class:`Role`, :class:`Member`], :class:`PermissionOverwrite`]\n            A :class:`dict` of target (either a role or a member) to\n            :class:`PermissionOverwrite` to apply upon creation of a channel.\n            Useful for creating secret channels.\n        category: Optional[:class:`CategoryChannel`]\n            The category to place the newly created channel under.\n            The permissions will be automatically synced to category if no\n            overwrites are provided.\n        position: :class:`int`\n            The position in the channel list. This is a number that starts\n            at 0. e.g. the top channel is position 0.\n        bitrate: :class:`int`\n            The channel's preferred audio bitrate in bits per second.\n\n            .. versionadded:: 2.2\n        user_limit: :class:`int`\n            The channel's limit for number of members that can be in a voice channel.\n\n            .. versionadded:: 2.2\n        rtc_region: Optional[:class:`str`]\n            The region for the voice channel's voice communication.\n            A value of ``None`` indicates automatic voice region detection.\n\n            .. versionadded:: 2.2\n        video_quality_mode: :class:`VideoQualityMode`\n            The camera video quality for the voice channel's participants.\n\n            .. versionadded:: 2.2\n        reason: Optional[:class:`str`]\n            The reason for creating this channel. Shows up on the audit log.\n\n        Raises\n        ------\n        Forbidden\n            You do not have the proper permissions to create this channel.\n        HTTPException\n            Creating the channel failed.\n        TypeError\n            The permission overwrite information is not in proper form.\n\n        Returns\n        -------\n        :class:`StageChannel`\n            The channel that was just created.\n        \"\"\"\n\n        options = {}\n        if position is not MISSING:\n            options['position'] = position\n\n        if bitrate is not MISSING:\n            options['bitrate'] = bitrate\n\n        if user_limit is not MISSING:\n            options['user_limit'] = user_limit\n\n        if rtc_region is not MISSING:\n            options['rtc_region'] = None if rtc_region is None else rtc_region\n\n        if video_quality_mode is not MISSING:\n            if not isinstance(video_quality_mode, VideoQualityMode):\n                raise TypeError('video_quality_mode must be of type VideoQualityMode')\n            options['video_quality_mode'] = video_quality_mode.value\n\n        data = await self._create_channel(\n            name, overwrites=overwrites, channel_type=ChannelType.stage_voice, category=category, reason=reason, **options\n        )\n        channel = StageChannel(state=self._state, guild=self, data=data)\n\n        # temporarily add to the cache\n        self._channels[channel.id] = channel\n        return channel\n\n    async def create_category(\n        self,\n        name: str,\n        *,\n        overwrites: Mapping[Union[Role, Member, Object], PermissionOverwrite] = MISSING,\n        reason: Optional[str] = None,\n        position: int = MISSING,\n    ) -> CategoryChannel:\n        \"\"\"|coro|\n\n        Same as :meth:`create_text_channel` except makes a :class:`CategoryChannel` instead.\n\n        .. note::\n\n            The ``category`` parameter is not supported in this function since categories\n            cannot have categories.\n\n        .. versionchanged:: 2.0\n            This function will now raise :exc:`TypeError` instead of\n            ``InvalidArgument``.\n\n        Raises\n        ------\n        Forbidden\n            You do not have the proper permissions to create this channel.\n        HTTPException\n            Creating the channel failed.\n        TypeError\n            The permission overwrite information is not in proper form.\n\n        Returns\n        -------\n        :class:`CategoryChannel`\n            The channel that was just created.\n        \"\"\"\n        options: Dict[str, Any] = {}\n        if position is not MISSING:\n            options['position'] = position\n\n        data = await self._create_channel(\n            name, overwrites=overwrites, channel_type=ChannelType.category, reason=reason, **options\n        )\n        channel = CategoryChannel(state=self._state, guild=self, data=data)\n\n        # temporarily add to the cache\n        self._channels[channel.id] = channel\n        return channel\n\n    create_category_channel = create_category\n\n    async def create_forum(\n        self,\n        name: str,\n        *,\n        topic: str = MISSING,\n        position: int = MISSING,\n        category: Optional[CategoryChannel] = None,\n        slowmode_delay: int = MISSING,\n        nsfw: bool = MISSING,\n        overwrites: Mapping[Union[Role, Member, Object], PermissionOverwrite] = MISSING,\n        reason: Optional[str] = None,\n        default_auto_archive_duration: int = MISSING,\n        default_thread_slowmode_delay: int = MISSING,\n        default_sort_order: ForumOrderType = MISSING,\n        default_reaction_emoji: EmojiInputType = MISSING,\n        default_layout: ForumLayoutType = MISSING,\n        available_tags: Sequence[ForumTag] = MISSING,\n    ) -> ForumChannel:\n        \"\"\"|coro|\n\n        Similar to :meth:`create_text_channel` except makes a :class:`ForumChannel` instead.\n\n        The ``overwrites`` parameter can be used to create a 'secret'\n        channel upon creation. This parameter expects a :class:`dict` of\n        overwrites with the target (either a :class:`Member` or a :class:`Role`)\n        as the key and a :class:`PermissionOverwrite` as the value.\n\n        .. versionadded:: 2.0\n\n        Parameters\n        -----------\n        name: :class:`str`\n            The channel's name.\n        overwrites: Dict[Union[:class:`Role`, :class:`Member`], :class:`PermissionOverwrite`]\n            A :class:`dict` of target (either a role or a member) to\n            :class:`PermissionOverwrite` to apply upon creation of a channel.\n            Useful for creating secret channels.\n        topic: :class:`str`\n            The channel's topic.\n        category: Optional[:class:`CategoryChannel`]\n            The category to place the newly created channel under.\n            The permissions will be automatically synced to category if no\n            overwrites are provided.\n        position: :class:`int`\n            The position in the channel list. This is a number that starts\n            at 0. e.g. the top channel is position 0.\n        nsfw: :class:`bool`\n            To mark the channel as NSFW or not.\n        slowmode_delay: :class:`int`\n            Specifies the slowmode rate limit for users in this channel, in seconds.\n            The maximum possible value is ``21600``.\n        reason: Optional[:class:`str`]\n            The reason for creating this channel. Shows up in the audit log.\n        default_auto_archive_duration: :class:`int`\n            The default auto archive duration for threads created in the forum channel (in minutes).\n            Must be one of ``60``, ``1440``, ``4320``, or ``10080``.\n        default_thread_slowmode_delay: :class:`int`\n            The default slowmode delay in seconds for threads created in this forum.\n\n            .. versionadded:: 2.1\n        default_sort_order: :class:`ForumOrderType`\n            The default sort order for posts in this forum channel.\n\n            .. versionadded:: 2.3\n        default_reaction_emoji: Union[:class:`Emoji`, :class:`PartialEmoji`, :class:`str`]\n            The default reaction emoji for threads created in this forum to show in the\n            add reaction button.\n\n            .. versionadded:: 2.3\n        default_layout: :class:`ForumLayoutType`\n            The default layout for posts in this forum.\n\n            .. versionadded:: 2.3\n        available_tags: Sequence[:class:`ForumTag`]\n            The available tags for this forum channel.\n\n            .. versionadded:: 2.1\n\n        Raises\n        -------\n        Forbidden\n            You do not have the proper permissions to create this channel.\n        HTTPException\n            Creating the channel failed.\n        TypeError\n            The permission overwrite information is not in proper form.\n\n        Returns\n        -------\n        :class:`ForumChannel`\n            The channel that was just created.\n        \"\"\"\n        options = {}\n\n        if position is not MISSING:\n            options['position'] = position\n\n        if topic is not MISSING:\n            options['topic'] = topic\n\n        if slowmode_delay is not MISSING:\n            options['rate_limit_per_user'] = slowmode_delay\n\n        if nsfw is not MISSING:\n            options['nsfw'] = nsfw\n\n        if default_auto_archive_duration is not MISSING:\n            options['default_auto_archive_duration'] = default_auto_archive_duration\n\n        if default_thread_slowmode_delay is not MISSING:\n            options['default_thread_rate_limit_per_user'] = default_thread_slowmode_delay\n\n        if default_sort_order is not MISSING:\n            if not isinstance(default_sort_order, ForumOrderType):\n                raise TypeError(\n                    f'default_sort_order parameter must be a ForumOrderType not {default_sort_order.__class__.__name__}'\n                )\n\n            options['default_sort_order'] = default_sort_order.value\n\n        if default_reaction_emoji is not MISSING:\n            if isinstance(default_reaction_emoji, _EmojiTag):\n                options['default_reaction_emoji'] = default_reaction_emoji._to_partial()._to_forum_tag_payload()\n            elif isinstance(default_reaction_emoji, str):\n                options['default_reaction_emoji'] = PartialEmoji.from_str(default_reaction_emoji)._to_forum_tag_payload()\n            else:\n                raise ValueError(f'default_reaction_emoji parameter must be either Emoji, PartialEmoji, or str')\n\n        if default_layout is not MISSING:\n            if not isinstance(default_layout, ForumLayoutType):\n                raise TypeError(\n                    f'default_layout parameter must be a ForumLayoutType not {default_layout.__class__.__name__}'\n                )\n\n            options['default_forum_layout'] = default_layout.value\n\n        if available_tags is not MISSING:\n            options['available_tags'] = [t.to_dict() for t in available_tags]\n\n        data = await self._create_channel(\n            name=name, overwrites=overwrites, channel_type=ChannelType.forum, category=category, reason=reason, **options\n        )\n\n        channel = ForumChannel(state=self._state, guild=self, data=data)\n\n        # temporarily add to the cache\n        self._channels[channel.id] = channel\n        return channel\n\n    async def leave(self) -> None:\n        \"\"\"|coro|\n\n        Leaves the guild.\n\n        .. note::\n\n            You cannot leave the guild that you own, you must delete it instead\n            via :meth:`delete`.\n\n        Raises\n        --------\n        HTTPException\n            Leaving the guild failed.\n        \"\"\"\n        await self._state.http.leave_guild(self.id)\n\n    async def delete(self) -> None:\n        \"\"\"|coro|\n\n        Deletes the guild. You must be the guild owner to delete the\n        guild.\n\n        Raises\n        --------\n        HTTPException\n            Deleting the guild failed.\n        Forbidden\n            You do not have permissions to delete the guild.\n        \"\"\"\n\n        await self._state.http.delete_guild(self.id)\n\n    async def edit(\n        self,\n        *,\n        reason: Optional[str] = MISSING,\n        name: str = MISSING,\n        description: Optional[str] = MISSING,\n        icon: Optional[bytes] = MISSING,\n        banner: Optional[bytes] = MISSING,\n        splash: Optional[bytes] = MISSING,\n        discovery_splash: Optional[bytes] = MISSING,\n        community: bool = MISSING,\n        afk_channel: Optional[VoiceChannel] = MISSING,\n        owner: Snowflake = MISSING,\n        afk_timeout: int = MISSING,\n        default_notifications: NotificationLevel = MISSING,\n        verification_level: VerificationLevel = MISSING,\n        explicit_content_filter: ContentFilter = MISSING,\n        vanity_code: str = MISSING,\n        system_channel: Optional[TextChannel] = MISSING,\n        system_channel_flags: SystemChannelFlags = MISSING,\n        preferred_locale: Locale = MISSING,\n        rules_channel: Optional[TextChannel] = MISSING,\n        public_updates_channel: Optional[TextChannel] = MISSING,\n        premium_progress_bar_enabled: bool = MISSING,\n        discoverable: bool = MISSING,\n        invites_disabled: bool = MISSING,\n        widget_enabled: bool = MISSING,\n        widget_channel: Optional[Snowflake] = MISSING,\n        mfa_level: MFALevel = MISSING,\n        raid_alerts_disabled: bool = MISSING,\n        safety_alerts_channel: TextChannel = MISSING,\n        invites_disabled_until: datetime.datetime = MISSING,\n        dms_disabled_until: datetime.datetime = MISSING,\n    ) -> Guild:\n        r\"\"\"|coro|\n\n        Edits the guild.\n\n        You must have :attr:`~Permissions.manage_guild` to edit the guild.\n\n        .. versionchanged:: 2.0\n            The newly updated guild is returned.\n\n        .. versionchanged:: 2.0\n            The ``region`` keyword parameter has been removed.\n\n        .. versionchanged:: 2.0\n            This function will now raise :exc:`TypeError` or\n            :exc:`ValueError` instead of ``InvalidArgument``.\n\n        Parameters\n        ----------\n        name: :class:`str`\n            The new name of the guild.\n        description: Optional[:class:`str`]\n            The new description of the guild. Could be ``None`` for no description.\n            This is only available to guilds that contain ``COMMUNITY`` in :attr:`Guild.features`.\n        icon: :class:`bytes`\n            A :term:`py:bytes-like object` representing the icon. Only PNG/JPEG is supported.\n            GIF is only available to guilds that contain ``ANIMATED_ICON`` in :attr:`Guild.features`.\n            Could be ``None`` to denote removal of the icon.\n        banner: :class:`bytes`\n            A :term:`py:bytes-like object` representing the banner.\n            Could be ``None`` to denote removal of the banner. This is only available to guilds that contain\n            ``BANNER`` in :attr:`Guild.features`.\n        splash: :class:`bytes`\n            A :term:`py:bytes-like object` representing the invite splash.\n            Only PNG/JPEG supported. Could be ``None`` to denote removing the\n            splash. This is only available to guilds that contain ``INVITE_SPLASH``\n            in :attr:`Guild.features`.\n        discovery_splash: :class:`bytes`\n            A :term:`py:bytes-like object` representing the discovery splash.\n            Only PNG/JPEG supported. Could be ``None`` to denote removing the\n            splash. This is only available to guilds that contain ``DISCOVERABLE``\n            in :attr:`Guild.features`.\n\n            .. versionadded:: 2.0\n        community: :class:`bool`\n            Whether the guild should be a Community guild. If set to ``True``\\, both ``rules_channel``\n            and ``public_updates_channel`` parameters are required.\n\n            .. versionadded:: 2.0\n        afk_channel: Optional[:class:`VoiceChannel`]\n            The new channel that is the AFK channel. Could be ``None`` for no AFK channel.\n        afk_timeout: :class:`int`\n            The number of seconds until someone is moved to the AFK channel.\n        owner: :class:`Member`\n            The new owner of the guild to transfer ownership to. Note that you must\n            be owner of the guild to do this.\n        verification_level: :class:`VerificationLevel`\n            The new verification level for the guild.\n        default_notifications: :class:`NotificationLevel`\n            The new default notification level for the guild.\n        explicit_content_filter: :class:`ContentFilter`\n            The new explicit content filter for the guild.\n        vanity_code: :class:`str`\n            The new vanity code for the guild.\n        system_channel: Optional[:class:`TextChannel`]\n            The new channel that is used for the system channel. Could be ``None`` for no system channel.\n        system_channel_flags: :class:`SystemChannelFlags`\n            The new system channel settings to use with the new system channel.\n        preferred_locale: :class:`Locale`\n            The new preferred locale for the guild. Used as the primary language in the guild.\n\n            .. versionchanged:: 2.0\n\n                Now accepts an enum instead of :class:`str`.\n        rules_channel: Optional[:class:`TextChannel`]\n            The new channel that is used for rules. This is only available to\n            guilds that contain ``COMMUNITY`` in :attr:`Guild.features`. Could be ``None`` for no rules\n            channel.\n\n            .. versionadded:: 1.4\n        public_updates_channel: Optional[:class:`TextChannel`]\n            The new channel that is used for public updates from Discord. This is only available to\n            guilds that contain ``COMMUNITY`` in :attr:`Guild.features`. Could be ``None`` for no\n            public updates channel.\n\n            .. versionadded:: 1.4\n        premium_progress_bar_enabled: :class:`bool`\n            Whether the premium AKA server boost level progress bar should be enabled for the guild.\n\n            .. versionadded:: 2.0\n        discoverable: :class:`bool`\n            Whether server discovery is enabled for this guild.\n\n            .. versionadded:: 2.1\n        invites_disabled: :class:`bool`\n            Whether joining via invites should be disabled for the guild.\n\n            .. versionadded:: 2.1\n        widget_enabled: :class:`bool`\n            Whether to enable the widget for the guild.\n\n            .. versionadded:: 2.3\n        widget_channel: Optional[:class:`abc.Snowflake`]\n             The new widget channel. ``None`` removes the widget channel.\n\n            .. versionadded:: 2.3\n        mfa_level: :class:`MFALevel`\n            The new guild's Multi-Factor Authentication requirement level.\n            Note that you must be owner of the guild to do this.\n\n            .. versionadded:: 2.3\n        reason: Optional[:class:`str`]\n            The reason for editing this guild. Shows up on the audit log.\n\n        raid_alerts_disabled: :class:`bool`\n            Whether the alerts for raid protection should be disabled for the guild.\n\n            .. versionadded:: 2.3\n\n        safety_alerts_channel: Optional[:class:`TextChannel`]\n            The new channel that is used for safety alerts. This is only available to\n            guilds that contain ``COMMUNITY`` in :attr:`Guild.features`. Could be ``None`` for no\n            safety alerts channel.\n\n            .. versionadded:: 2.3\n\n        invites_disabled_until: Optional[:class:`datetime.datetime`]\n            The time when invites should be enabled again, or ``None`` to disable the action.\n            This must be a timezone-aware datetime object. Consider using :func:`utils.utcnow`.\n\n            .. versionadded:: 2.4\n\n        dms_disabled_until: Optional[:class:`datetime.datetime`]\n            The time when direct messages should be allowed again, or ``None`` to disable the action.\n            This must be a timezone-aware datetime object. Consider using :func:`utils.utcnow`.\n\n            .. versionadded:: 2.4\n\n        Raises\n        -------\n        Forbidden\n            You do not have permissions to edit the guild.\n        HTTPException\n            Editing the guild failed.\n        ValueError\n            The image format passed in to ``icon`` is invalid. It must be\n            PNG or JPG. This is also raised if you are not the owner of the\n            guild and request an ownership transfer.\n        TypeError\n            The type passed to the ``default_notifications``, ``rules_channel``, ``public_updates_channel``,\n            ``safety_alerts_channel`` ``verification_level``, ``explicit_content_filter``,\n            ``system_channel_flags``, or ``mfa_level`` parameter was of the incorrect type.\n\n        Returns\n        --------\n        :class:`Guild`\n            The newly updated guild. Note that this has the same limitations as\n            mentioned in :meth:`Client.fetch_guild` and may not have full data.\n        \"\"\"\n\n        http = self._state.http\n\n        if vanity_code is not MISSING:\n            await http.change_vanity_code(self.id, vanity_code, reason=reason)\n\n        fields: Dict[str, Any] = {}\n        if name is not MISSING:\n            fields['name'] = name\n\n        if description is not MISSING:\n            fields['description'] = description\n\n        if preferred_locale is not MISSING:\n            fields['preferred_locale'] = str(preferred_locale)\n\n        if afk_timeout is not MISSING:\n            fields['afk_timeout'] = afk_timeout\n\n        if icon is not MISSING:\n            if icon is None:\n                fields['icon'] = icon\n            else:\n                fields['icon'] = utils._bytes_to_base64_data(icon)\n\n        if banner is not MISSING:\n            if banner is None:\n                fields['banner'] = banner\n            else:\n                fields['banner'] = utils._bytes_to_base64_data(banner)\n\n        if splash is not MISSING:\n            if splash is None:\n                fields['splash'] = splash\n            else:\n                fields['splash'] = utils._bytes_to_base64_data(splash)\n\n        if discovery_splash is not MISSING:\n            if discovery_splash is None:\n                fields['discovery_splash'] = discovery_splash\n            else:\n                fields['discovery_splash'] = utils._bytes_to_base64_data(discovery_splash)\n\n        if default_notifications is not MISSING:\n            if not isinstance(default_notifications, NotificationLevel):\n                raise TypeError('default_notifications field must be of type NotificationLevel')\n            fields['default_message_notifications'] = default_notifications.value\n\n        if afk_channel is not MISSING:\n            if afk_channel is None:\n                fields['afk_channel_id'] = afk_channel\n            else:\n                fields['afk_channel_id'] = afk_channel.id\n\n        if system_channel is not MISSING:\n            if system_channel is None:\n                fields['system_channel_id'] = system_channel\n            else:\n                fields['system_channel_id'] = system_channel.id\n\n        if rules_channel is not MISSING:\n            if rules_channel is None:\n                fields['rules_channel_id'] = rules_channel\n            else:\n                if not isinstance(rules_channel, TextChannel):\n                    raise TypeError(f'rules_channel must be of type TextChannel not {rules_channel.__class__.__name__}')\n\n                fields['rules_channel_id'] = rules_channel.id\n\n        if public_updates_channel is not MISSING:\n            if public_updates_channel is None:\n                fields['public_updates_channel_id'] = public_updates_channel\n            else:\n                if not isinstance(public_updates_channel, TextChannel):\n                    raise TypeError(\n                        f'public_updates_channel must be of type TextChannel not {public_updates_channel.__class__.__name__}'\n                    )\n\n                fields['public_updates_channel_id'] = public_updates_channel.id\n\n        if safety_alerts_channel is not MISSING:\n            if safety_alerts_channel is None:\n                fields['safety_alerts_channel_id'] = safety_alerts_channel\n            else:\n                if not isinstance(safety_alerts_channel, TextChannel):\n                    raise TypeError(\n                        f'safety_alerts_channel must be of type TextChannel not {safety_alerts_channel.__class__.__name__}'\n                    )\n\n            fields['safety_alerts_channel_id'] = safety_alerts_channel.id\n\n        if owner is not MISSING:\n            if self.owner_id != self._state.self_id:\n                raise ValueError('To transfer ownership you must be the owner of the guild.')\n\n            fields['owner_id'] = owner.id\n\n        if verification_level is not MISSING:\n            if not isinstance(verification_level, VerificationLevel):\n                raise TypeError('verification_level field must be of type VerificationLevel')\n\n            fields['verification_level'] = verification_level.value\n\n        if explicit_content_filter is not MISSING:\n            if not isinstance(explicit_content_filter, ContentFilter):\n                raise TypeError('explicit_content_filter field must be of type ContentFilter')\n\n            fields['explicit_content_filter'] = explicit_content_filter.value\n\n        if system_channel_flags is not MISSING:\n            if not isinstance(system_channel_flags, SystemChannelFlags):\n                raise TypeError('system_channel_flags field must be of type SystemChannelFlags')\n\n            fields['system_channel_flags'] = system_channel_flags.value\n\n        if any(feat is not MISSING for feat in (community, discoverable, invites_disabled, raid_alerts_disabled)):\n            features = set(self.features)\n\n            if community is not MISSING:\n                if community:\n                    if 'rules_channel_id' in fields and 'public_updates_channel_id' in fields:\n                        features.add('COMMUNITY')\n                    else:\n                        raise ValueError(\n                            'community field requires both rules_channel and public_updates_channel fields to be provided'\n                        )\n                else:\n                    features.discard('COMMUNITY')\n\n            if discoverable is not MISSING:\n                if discoverable:\n                    features.add('DISCOVERABLE')\n                else:\n                    features.discard('DISCOVERABLE')\n\n            if invites_disabled is not MISSING:\n                if invites_disabled:\n                    features.add('INVITES_DISABLED')\n                else:\n                    features.discard('INVITES_DISABLED')\n\n            if raid_alerts_disabled is not MISSING:\n                if raid_alerts_disabled:\n                    features.add('RAID_ALERTS_DISABLED')\n                else:\n                    features.discard('RAID_ALERTS_DISABLED')\n\n            fields['features'] = list(features)\n\n        if premium_progress_bar_enabled is not MISSING:\n            fields['premium_progress_bar_enabled'] = premium_progress_bar_enabled\n\n        widget_payload: EditWidgetSettings = {}\n        if widget_channel is not MISSING:\n            widget_payload['channel_id'] = None if widget_channel is None else widget_channel.id\n        if widget_enabled is not MISSING:\n            widget_payload['enabled'] = widget_enabled\n\n        if widget_payload:\n            await self._state.http.edit_widget(self.id, payload=widget_payload, reason=reason)\n\n        if mfa_level is not MISSING:\n            if not isinstance(mfa_level, MFALevel):\n                raise TypeError(f'mfa_level must be of type MFALevel not {mfa_level.__class__.__name__}')\n\n            await http.edit_guild_mfa_level(self.id, mfa_level=mfa_level.value)\n\n        incident_actions_payload: IncidentData = {}\n        if invites_disabled_until is not MISSING:\n            if invites_disabled_until is None:\n                incident_actions_payload['invites_disabled_until'] = None\n            else:\n                if invites_disabled_until.tzinfo is None:\n                    raise TypeError(\n                        'invites_disabled_until must be an aware datetime. Consider using discord.utils.utcnow() or datetime.datetime.now().astimezone() for local time.'\n                    )\n                incident_actions_payload['invites_disabled_until'] = invites_disabled_until.isoformat()\n\n        if dms_disabled_until is not MISSING:\n            if dms_disabled_until is None:\n                incident_actions_payload['dms_disabled_until'] = None\n            else:\n                if dms_disabled_until.tzinfo is None:\n                    raise TypeError(\n                        'dms_disabled_until must be an aware datetime. Consider using discord.utils.utcnow() or datetime.datetime.now().astimezone() for local time.'\n                    )\n                incident_actions_payload['dms_disabled_until'] = dms_disabled_until.isoformat()\n\n        if incident_actions_payload:\n            await http.edit_incident_actions(self.id, payload=incident_actions_payload)\n\n        data = await http.edit_guild(self.id, reason=reason, **fields)\n        return Guild(data=data, state=self._state)\n\n    async def fetch_channels(self) -> Sequence[GuildChannel]:\n        \"\"\"|coro|\n\n        Retrieves all :class:`abc.GuildChannel` that the guild has.\n\n        .. note::\n\n            This method is an API call. For general usage, consider :attr:`channels` instead.\n\n        .. versionadded:: 1.2\n\n        Raises\n        -------\n        InvalidData\n            An unknown channel type was received from Discord.\n        HTTPException\n            Retrieving the channels failed.\n\n        Returns\n        -------\n        Sequence[:class:`abc.GuildChannel`]\n            All channels in the guild.\n        \"\"\"\n        data = await self._state.http.get_all_guild_channels(self.id)\n\n        def convert(d):\n            factory, ch_type = _guild_channel_factory(d['type'])\n            if factory is None:\n                raise InvalidData('Unknown channel type {type} for channel ID {id}.'.format_map(d))\n\n            channel = factory(guild=self, state=self._state, data=d)\n            return channel\n\n        return [convert(d) for d in data]\n\n    async def active_threads(self) -> List[Thread]:\n        \"\"\"|coro|\n\n        Returns a list of active :class:`Thread` that the client can access.\n\n        This includes both private and public threads.\n\n        .. versionadded:: 2.0\n\n        Raises\n        ------\n        HTTPException\n            The request to get the active threads failed.\n\n        Returns\n        --------\n        List[:class:`Thread`]\n            The active threads\n        \"\"\"\n        data = await self._state.http.get_active_threads(self.id)\n        threads = [Thread(guild=self, state=self._state, data=d) for d in data.get('threads', [])]\n        thread_lookup: Dict[int, Thread] = {thread.id: thread for thread in threads}\n        for member in data.get('members', []):\n            thread = thread_lookup.get(int(member['id']))\n            if thread is not None:\n                thread._add_member(ThreadMember(parent=thread, data=member))\n\n        return threads\n\n    async def fetch_members(self, *, limit: Optional[int] = 1000, after: SnowflakeTime = MISSING) -> AsyncIterator[Member]:\n        \"\"\"Retrieves an :term:`asynchronous iterator` that enables receiving the guild's members. In order to use this,\n        :meth:`Intents.members` must be enabled.\n\n        .. note::\n\n            This method is an API call. For general usage, consider :attr:`members` instead.\n\n        .. versionadded:: 1.3\n\n        All parameters are optional.\n\n        Parameters\n        ----------\n        limit: Optional[:class:`int`]\n            The number of members to retrieve. Defaults to 1000.\n            Pass ``None`` to fetch all members. Note that this is potentially slow.\n        after: Optional[Union[:class:`.abc.Snowflake`, :class:`datetime.datetime`]]\n            Retrieve members after this date or object.\n            If a datetime is provided, it is recommended to use a UTC aware datetime.\n            If the datetime is naive, it is assumed to be local time.\n\n        Raises\n        ------\n        ClientException\n            The members intent is not enabled.\n        HTTPException\n            Getting the members failed.\n\n        Yields\n        ------\n        :class:`.Member`\n            The member with the member data parsed.\n\n        Examples\n        --------\n\n        Usage ::\n\n            async for member in guild.fetch_members(limit=150):\n                print(member.name)\n        \"\"\"\n\n        if not self._state._intents.members:\n            raise ClientException('Intents.members must be enabled to use this.')\n\n        while True:\n            retrieve = 1000 if limit is None else min(limit, 1000)\n            if retrieve < 1:\n                return\n\n            if isinstance(after, datetime.datetime):\n                after = Object(id=utils.time_snowflake(after, high=True))\n\n            after = after or OLDEST_OBJECT\n            after_id = after.id if after else None\n            state = self._state\n\n            data = await state.http.get_members(self.id, retrieve, after_id)\n            if not data:\n                return\n\n            # Terminate loop on next iteration; there's no data left after this\n            if len(data) < 1000:\n                limit = 0\n\n            after = Object(id=int(data[-1]['user']['id']))\n\n            for raw_member in reversed(data):\n                yield Member(data=raw_member, guild=self, state=state)\n\n    async def fetch_member(self, member_id: int, /) -> Member:\n        \"\"\"|coro|\n\n        Retrieves a :class:`Member` from a guild ID, and a member ID.\n\n        .. note::\n\n            This method is an API call. If you have :attr:`Intents.members` and member cache enabled, consider :meth:`get_member` instead.\n\n        .. versionchanged:: 2.0\n\n            ``member_id`` parameter is now positional-only.\n\n        Parameters\n        -----------\n        member_id: :class:`int`\n            The member's ID to fetch from.\n\n        Raises\n        -------\n        Forbidden\n            You do not have access to the guild.\n        HTTPException\n            Fetching the member failed.\n        NotFound\n            The member could not be found.\n\n        Returns\n        --------\n        :class:`Member`\n            The member from the member ID.\n        \"\"\"\n        data = await self._state.http.get_member(self.id, member_id)\n        return Member(data=data, state=self._state, guild=self)\n\n    async def fetch_ban(self, user: Snowflake) -> BanEntry:\n        \"\"\"|coro|\n\n        Retrieves the :class:`BanEntry` for a user.\n\n        You must have :attr:`~Permissions.ban_members` to get this information.\n\n        Parameters\n        -----------\n        user: :class:`abc.Snowflake`\n            The user to get ban information from.\n\n        Raises\n        ------\n        Forbidden\n            You do not have proper permissions to get the information.\n        NotFound\n            This user is not banned.\n        HTTPException\n            An error occurred while fetching the information.\n\n        Returns\n        -------\n        :class:`BanEntry`\n            The :class:`BanEntry` object for the specified user.\n        \"\"\"\n        data: BanPayload = await self._state.http.get_ban(user.id, self.id)\n        return BanEntry(user=User(state=self._state, data=data['user']), reason=data['reason'])\n\n    async def fetch_channel(self, channel_id: int, /) -> Union[GuildChannel, Thread]:\n        \"\"\"|coro|\n\n        Retrieves a :class:`.abc.GuildChannel` or :class:`.Thread` with the specified ID.\n\n        .. note::\n\n            This method is an API call. For general usage, consider :meth:`get_channel_or_thread` instead.\n\n        .. versionadded:: 2.0\n\n        Raises\n        -------\n        InvalidData\n            An unknown channel type was received from Discord\n            or the guild the channel belongs to is not the same\n            as the one in this object points to.\n        HTTPException\n            Retrieving the channel failed.\n        NotFound\n            Invalid Channel ID.\n        Forbidden\n            You do not have permission to fetch this channel.\n\n        Returns\n        --------\n        Union[:class:`.abc.GuildChannel`, :class:`.Thread`]\n            The channel from the ID.\n        \"\"\"\n        data = await self._state.http.get_channel(channel_id)\n\n        factory, ch_type = _threaded_guild_channel_factory(data['type'])\n        if factory is None:\n            raise InvalidData('Unknown channel type {type} for channel ID {id}.'.format_map(data))\n\n        if ch_type in (ChannelType.group, ChannelType.private):\n            raise InvalidData('Channel ID resolved to a private channel')\n\n        guild_id = int(data['guild_id'])  # type: ignore # channel won't be a private channel\n        if self.id != guild_id:\n            raise InvalidData('Guild ID resolved to a different guild')\n\n        channel: GuildChannel = factory(guild=self, state=self._state, data=data)  # type: ignore # channel won't be a private channel\n        return channel\n\n    async def bans(\n        self,\n        *,\n        limit: Optional[int] = 1000,\n        before: Snowflake = MISSING,\n        after: Snowflake = MISSING,\n    ) -> AsyncIterator[BanEntry]:\n        \"\"\"Retrieves an :term:`asynchronous iterator` of the users that are banned from the guild as a :class:`BanEntry`.\n\n        You must have :attr:`~Permissions.ban_members` to get this information.\n\n        .. versionchanged:: 2.0\n            Due to a breaking change in Discord's API, this now returns a paginated iterator instead of a list.\n\n        Examples\n        ---------\n\n        Usage ::\n\n            async for entry in guild.bans(limit=150):\n                print(entry.user, entry.reason)\n\n        Flattening into a list ::\n\n            bans = [entry async for entry in guild.bans(limit=2000)]\n            # bans is now a list of BanEntry...\n\n        All parameters are optional.\n\n        Parameters\n        -----------\n        limit: Optional[:class:`int`]\n            The number of bans to retrieve. If ``None``, it retrieves every ban in\n            the guild. Note, however, that this would make it a slow operation.\n            Defaults to ``1000``.\n        before: :class:`.abc.Snowflake`\n            Retrieves bans before this user.\n        after: :class:`.abc.Snowflake`\n            Retrieve bans after this user.\n\n        Raises\n        -------\n        Forbidden\n            You do not have proper permissions to get the information.\n        HTTPException\n            An error occurred while fetching the information.\n        TypeError\n            Both ``after`` and ``before`` were provided, as Discord does not\n            support this type of pagination.\n\n        Yields\n        --------\n        :class:`BanEntry`\n            The ban entry of the banned user.\n        \"\"\"\n\n        if before is not MISSING and after is not MISSING:\n            raise TypeError('bans pagination does not support both before and after')\n\n        # This endpoint paginates in ascending order.\n        endpoint = self._state.http.get_bans\n\n        async def _before_strategy(retrieve: int, before: Optional[Snowflake], limit: Optional[int]):\n            before_id = before.id if before else None\n            data = await endpoint(self.id, limit=retrieve, before=before_id)\n\n            if data:\n                if limit is not None:\n                    limit -= len(data)\n\n                before = Object(id=int(data[0]['user']['id']))\n\n            return data, before, limit\n\n        async def _after_strategy(retrieve: int, after: Optional[Snowflake], limit: Optional[int]):\n            after_id = after.id if after else None\n            data = await endpoint(self.id, limit=retrieve, after=after_id)\n\n            if data:\n                if limit is not None:\n                    limit -= len(data)\n\n                after = Object(id=int(data[-1]['user']['id']))\n\n            return data, after, limit\n\n        if before:\n            strategy, state = _before_strategy, before\n        else:\n            strategy, state = _after_strategy, after\n\n        while True:\n            retrieve = 1000 if limit is None else min(limit, 1000)\n            if retrieve < 1:\n                return\n\n            data, state, limit = await strategy(retrieve, state, limit)\n\n            # Terminate loop on next iteration; there's no data left after this\n            if len(data) < 1000:\n                limit = 0\n\n            for e in data:\n                yield BanEntry(user=User(state=self._state, data=e['user']), reason=e['reason'])\n\n    async def prune_members(\n        self,\n        *,\n        days: int,\n        compute_prune_count: bool = True,\n        roles: Collection[Snowflake] = MISSING,\n        reason: Optional[str] = None,\n    ) -> Optional[int]:\n        r\"\"\"|coro|\n\n        Prunes the guild from its inactive members.\n\n        The inactive members are denoted if they have not logged on in\n        ``days`` number of days and they have no roles.\n\n        You must have both :attr:`~Permissions.kick_members` and :attr:`~Permissions.manage_guild` to do this.\n\n        To check how many members you would prune without actually pruning,\n        see the :meth:`estimate_pruned_members` function.\n\n        To prune members that have specific roles see the ``roles`` parameter.\n\n        .. versionchanged:: 1.4\n            The ``roles`` keyword-only parameter was added.\n\n        .. versionchanged:: 2.0\n            This function will now raise :exc:`TypeError` instead of\n            ``InvalidArgument``.\n\n        Parameters\n        -----------\n        days: :class:`int`\n            The number of days before counting as inactive.\n        reason: Optional[:class:`str`]\n            The reason for doing this action. Shows up on the audit log.\n        compute_prune_count: :class:`bool`\n            Whether to compute the prune count. This defaults to ``True``\n            which makes it prone to timeouts in very large guilds. In order\n            to prevent timeouts, you must set this to ``False``. If this is\n            set to ``False``\\, then this function will always return ``None``.\n        roles: List[:class:`abc.Snowflake`]\n            A list of :class:`abc.Snowflake` that represent roles to include in the pruning process. If a member\n            has a role that is not specified, they'll be excluded.\n\n        Raises\n        -------\n        Forbidden\n            You do not have permissions to prune members.\n        HTTPException\n            An error occurred while pruning members.\n        TypeError\n            An integer was not passed for ``days``.\n\n        Returns\n        ---------\n        Optional[:class:`int`]\n            The number of members pruned. If ``compute_prune_count`` is ``False``\n            then this returns ``None``.\n        \"\"\"\n\n        if not isinstance(days, int):\n            raise TypeError(f'Expected int for ``days``, received {days.__class__.__name__} instead.')\n\n        if roles:\n            role_ids = [str(role.id) for role in roles]\n        else:\n            role_ids = []\n\n        data = await self._state.http.prune_members(\n            self.id, days, compute_prune_count=compute_prune_count, roles=role_ids, reason=reason\n        )\n        return data['pruned']\n\n    async def templates(self) -> List[Template]:\n        \"\"\"|coro|\n\n        Gets the list of templates from this guild.\n\n        You must have :attr:`~.Permissions.manage_guild` to do this.\n\n        .. versionadded:: 1.7\n\n        Raises\n        -------\n        Forbidden\n            You don't have permissions to get the templates.\n\n        Returns\n        --------\n        List[:class:`Template`]\n            The templates for this guild.\n        \"\"\"\n        from .template import Template\n\n        data = await self._state.http.guild_templates(self.id)\n        return [Template(data=d, state=self._state) for d in data]\n\n    async def webhooks(self) -> List[Webhook]:\n        \"\"\"|coro|\n\n        Gets the list of webhooks from this guild.\n\n        You must have :attr:`~.Permissions.manage_webhooks` to do this.\n\n        Raises\n        -------\n        Forbidden\n            You don't have permissions to get the webhooks.\n\n        Returns\n        --------\n        List[:class:`Webhook`]\n            The webhooks for this guild.\n        \"\"\"\n\n        from .webhook import Webhook\n\n        data = await self._state.http.guild_webhooks(self.id)\n        return [Webhook.from_state(d, state=self._state) for d in data]\n\n    async def estimate_pruned_members(self, *, days: int, roles: Collection[Snowflake] = MISSING) -> Optional[int]:\n        \"\"\"|coro|\n\n        Similar to :meth:`prune_members` except instead of actually\n        pruning members, it returns how many members it would prune\n        from the guild had it been called.\n\n        .. versionchanged:: 2.0\n            The returned value can be ``None``.\n\n        .. versionchanged:: 2.0\n            This function will now raise :exc:`TypeError` instead of\n            ``InvalidArgument``.\n\n        Parameters\n        -----------\n        days: :class:`int`\n            The number of days before counting as inactive.\n        roles: List[:class:`abc.Snowflake`]\n            A list of :class:`abc.Snowflake` that represent roles to include in the estimate. If a member\n            has a role that is not specified, they'll be excluded.\n\n            .. versionadded:: 1.7\n\n        Raises\n        -------\n        Forbidden\n            You do not have permissions to prune members.\n        HTTPException\n            An error occurred while fetching the prune members estimate.\n        TypeError\n            An integer was not passed for ``days``.\n\n        Returns\n        ---------\n        Optional[:class:`int`]\n            The number of members estimated to be pruned.\n        \"\"\"\n\n        if not isinstance(days, int):\n            raise TypeError(f'Expected int for ``days``, received {days.__class__.__name__} instead.')\n\n        if roles:\n            role_ids = [str(role.id) for role in roles]\n        else:\n            role_ids = []\n\n        data = await self._state.http.estimate_pruned_members(self.id, days, role_ids)\n        return data['pruned']\n\n    async def invites(self) -> List[Invite]:\n        \"\"\"|coro|\n\n        Returns a list of all active instant invites from the guild.\n\n        You must have :attr:`~Permissions.manage_guild` to get this information.\n\n        Raises\n        -------\n        Forbidden\n            You do not have proper permissions to get the information.\n        HTTPException\n            An error occurred while fetching the information.\n\n        Returns\n        -------\n        List[:class:`Invite`]\n            The list of invites that are currently active.\n        \"\"\"\n\n        data = await self._state.http.invites_from(self.id)\n        result = []\n        for invite in data:\n            channel = self.get_channel(int(invite['channel']['id']))\n            result.append(Invite(state=self._state, data=invite, guild=self, channel=channel))\n\n        return result\n\n    async def create_template(self, *, name: str, description: str = MISSING) -> Template:\n        \"\"\"|coro|\n\n        Creates a template for the guild.\n\n        You must have :attr:`~Permissions.manage_guild` to do this.\n\n        .. versionadded:: 1.7\n\n        Parameters\n        -----------\n        name: :class:`str`\n            The name of the template.\n        description: :class:`str`\n            The description of the template.\n        \"\"\"\n        from .template import Template\n\n        payload = {'name': name}\n\n        if description:\n            payload['description'] = description\n\n        data = await self._state.http.create_template(self.id, payload)\n\n        return Template(state=self._state, data=data)\n\n    async def create_integration(self, *, type: IntegrationType, id: int) -> None:\n        \"\"\"|coro|\n\n        Attaches an integration to the guild.\n\n        You must have :attr:`~Permissions.manage_guild` to do this.\n\n        .. versionadded:: 1.4\n\n        Parameters\n        -----------\n        type: :class:`str`\n            The integration type (e.g. Twitch).\n        id: :class:`int`\n            The integration ID.\n\n        Raises\n        -------\n        Forbidden\n            You do not have permission to create the integration.\n        HTTPException\n            The account could not be found.\n        \"\"\"\n        await self._state.http.create_integration(self.id, type, id)\n\n    async def integrations(self) -> List[Integration]:\n        \"\"\"|coro|\n\n        Returns a list of all integrations attached to the guild.\n\n        You must have :attr:`~Permissions.manage_guild` to do this.\n\n        .. versionadded:: 1.4\n\n        Raises\n        -------\n        Forbidden\n            You do not have permission to create the integration.\n        HTTPException\n            Fetching the integrations failed.\n\n        Returns\n        --------\n        List[:class:`Integration`]\n            The list of integrations that are attached to the guild.\n        \"\"\"\n        data = await self._state.http.get_all_integrations(self.id)\n\n        def convert(d):\n            factory, _ = _integration_factory(d['type'])\n            if factory is None:\n                raise InvalidData('Unknown integration type {type!r} for integration ID {id}'.format_map(d))\n            return factory(guild=self, data=d)\n\n        return [convert(d) for d in data]\n\n    async def fetch_stickers(self) -> List[GuildSticker]:\n        r\"\"\"|coro|\n\n        Retrieves a list of all :class:`Sticker`\\s for the guild.\n\n        .. versionadded:: 2.0\n\n        .. note::\n\n            This method is an API call. For general usage, consider :attr:`stickers` instead.\n\n        Raises\n        ---------\n        HTTPException\n            An error occurred fetching the stickers.\n\n        Returns\n        --------\n        List[:class:`GuildSticker`]\n            The retrieved stickers.\n        \"\"\"\n        data = await self._state.http.get_all_guild_stickers(self.id)\n        return [GuildSticker(state=self._state, data=d) for d in data]\n\n    async def fetch_sticker(self, sticker_id: int, /) -> GuildSticker:\n        \"\"\"|coro|\n\n        Retrieves a custom :class:`Sticker` from the guild.\n\n        .. versionadded:: 2.0\n\n        .. note::\n\n            This method is an API call.\n            For general usage, consider iterating over :attr:`stickers` instead.\n\n        Parameters\n        -------------\n        sticker_id: :class:`int`\n            The sticker's ID.\n\n        Raises\n        ---------\n        NotFound\n            The sticker requested could not be found.\n        HTTPException\n            An error occurred fetching the sticker.\n\n        Returns\n        --------\n        :class:`GuildSticker`\n            The retrieved sticker.\n        \"\"\"\n        data = await self._state.http.get_guild_sticker(self.id, sticker_id)\n        return GuildSticker(state=self._state, data=data)\n\n    async def create_sticker(\n        self,\n        *,\n        name: str,\n        description: str,\n        emoji: str,\n        file: File,\n        reason: Optional[str] = None,\n    ) -> GuildSticker:\n        \"\"\"|coro|\n\n        Creates a :class:`Sticker` for the guild.\n\n        You must have :attr:`~Permissions.manage_emojis_and_stickers` to do this.\n\n        .. versionadded:: 2.0\n\n        Parameters\n        -----------\n        name: :class:`str`\n            The sticker name. Must be at least 2 characters.\n        description: :class:`str`\n            The sticker's description.\n        emoji: :class:`str`\n            The name of a unicode emoji that represents the sticker's expression.\n        file: :class:`File`\n            The file of the sticker to upload.\n        reason: :class:`str`\n            The reason for creating this sticker. Shows up on the audit log.\n\n        Raises\n        -------\n        Forbidden\n            You are not allowed to create stickers.\n        HTTPException\n            An error occurred creating a sticker.\n\n        Returns\n        --------\n        :class:`GuildSticker`\n            The created sticker.\n        \"\"\"\n        payload = {\n            'name': name,\n        }\n\n        payload['description'] = description\n\n        try:\n            emoji = unicodedata.name(emoji)\n        except TypeError:\n            pass\n        else:\n            emoji = emoji.replace(' ', '_')\n\n        payload['tags'] = emoji\n\n        data = await self._state.http.create_guild_sticker(self.id, payload, file, reason)\n        if self._state.cache_guild_expressions:\n            return self._state.store_sticker(self, data)\n        else:\n            return GuildSticker(state=self._state, data=data)\n\n    async def delete_sticker(self, sticker: Snowflake, /, *, reason: Optional[str] = None) -> None:\n        \"\"\"|coro|\n\n        Deletes the custom :class:`Sticker` from the guild.\n\n        You must have :attr:`~Permissions.manage_emojis_and_stickers` to do this.\n\n        .. versionadded:: 2.0\n\n        Parameters\n        -----------\n        sticker: :class:`abc.Snowflake`\n            The sticker you are deleting.\n        reason: Optional[:class:`str`]\n            The reason for deleting this sticker. Shows up on the audit log.\n\n        Raises\n        -------\n        Forbidden\n            You are not allowed to delete stickers.\n        HTTPException\n            An error occurred deleting the sticker.\n        \"\"\"\n        await self._state.http.delete_guild_sticker(self.id, sticker.id, reason)\n\n    async def fetch_scheduled_events(self, *, with_counts: bool = True) -> List[ScheduledEvent]:\n        \"\"\"|coro|\n\n        Retrieves a list of all scheduled events for the guild.\n\n        .. versionadded:: 2.0\n\n        Parameters\n        ------------\n        with_counts: :class:`bool`\n            Whether to include the number of users that are subscribed to the event.\n            Defaults to ``True``.\n\n        Raises\n        -------\n        HTTPException\n            Retrieving the scheduled events failed.\n\n        Returns\n        --------\n        List[:class:`ScheduledEvent`]\n            The scheduled events.\n        \"\"\"\n        data = await self._state.http.get_scheduled_events(self.id, with_counts)\n        return [ScheduledEvent(state=self._state, data=d) for d in data]\n\n    async def fetch_scheduled_event(self, scheduled_event_id: int, /, *, with_counts: bool = True) -> ScheduledEvent:\n        \"\"\"|coro|\n\n        Retrieves a scheduled event from the guild.\n\n        .. versionadded:: 2.0\n\n        Parameters\n        ------------\n        scheduled_event_id: :class:`int`\n            The scheduled event ID.\n        with_counts: :class:`bool`\n            Whether to include the number of users that are subscribed to the event.\n            Defaults to ``True``.\n\n        Raises\n        -------\n        NotFound\n            The scheduled event was not found.\n        HTTPException\n            Retrieving the scheduled event failed.\n\n        Returns\n        --------\n        :class:`ScheduledEvent`\n            The scheduled event.\n        \"\"\"\n        data = await self._state.http.get_scheduled_event(self.id, scheduled_event_id, with_counts)\n        return ScheduledEvent(state=self._state, data=data)\n\n    @overload\n    async def create_scheduled_event(\n        self,\n        *,\n        name: str,\n        start_time: datetime.datetime,\n        entity_type: Literal[EntityType.external] = ...,\n        privacy_level: PrivacyLevel = ...,\n        location: str = ...,\n        end_time: datetime.datetime = ...,\n        description: str = ...,\n        image: bytes = ...,\n        reason: Optional[str] = ...,\n    ) -> ScheduledEvent:\n        ...\n\n    @overload\n    async def create_scheduled_event(\n        self,\n        *,\n        name: str,\n        start_time: datetime.datetime,\n        entity_type: Literal[EntityType.stage_instance, EntityType.voice] = ...,\n        privacy_level: PrivacyLevel = ...,\n        channel: Snowflake = ...,\n        end_time: datetime.datetime = ...,\n        description: str = ...,\n        image: bytes = ...,\n        reason: Optional[str] = ...,\n    ) -> ScheduledEvent:\n        ...\n\n    @overload\n    async def create_scheduled_event(\n        self,\n        *,\n        name: str,\n        start_time: datetime.datetime,\n        privacy_level: PrivacyLevel = ...,\n        location: str = ...,\n        end_time: datetime.datetime = ...,\n        description: str = ...,\n        image: bytes = ...,\n        reason: Optional[str] = ...,\n    ) -> ScheduledEvent:\n        ...\n\n    @overload\n    async def create_scheduled_event(\n        self,\n        *,\n        name: str,\n        start_time: datetime.datetime,\n        privacy_level: PrivacyLevel = ...,\n        channel: Union[VoiceChannel, StageChannel] = ...,\n        end_time: datetime.datetime = ...,\n        description: str = ...,\n        image: bytes = ...,\n        reason: Optional[str] = ...,\n    ) -> ScheduledEvent:\n        ...\n\n    async def create_scheduled_event(\n        self,\n        *,\n        name: str,\n        start_time: datetime.datetime,\n        entity_type: EntityType = MISSING,\n        privacy_level: PrivacyLevel = MISSING,\n        channel: Optional[Snowflake] = MISSING,\n        location: str = MISSING,\n        end_time: datetime.datetime = MISSING,\n        description: str = MISSING,\n        image: bytes = MISSING,\n        reason: Optional[str] = None,\n    ) -> ScheduledEvent:\n        r\"\"\"|coro|\n\n        Creates a scheduled event for the guild.\n\n        You must have :attr:`~Permissions.manage_events` to do this.\n\n        .. versionadded:: 2.0\n\n        Parameters\n        ------------\n        name: :class:`str`\n            The name of the scheduled event.\n        description: :class:`str`\n            The description of the scheduled event.\n        channel: Optional[:class:`abc.Snowflake`]\n            The channel to send the scheduled event to. If the channel is\n            a :class:`StageInstance` or :class:`VoiceChannel` then\n            it automatically sets the entity type.\n\n            Required if ``entity_type`` is either :attr:`EntityType.voice` or\n            :attr:`EntityType.stage_instance`.\n        start_time: :class:`datetime.datetime`\n            The scheduled start time of the scheduled event. This must be a timezone-aware\n            datetime object. Consider using :func:`utils.utcnow`.\n        end_time: :class:`datetime.datetime`\n            The scheduled end time of the scheduled event. This must be a timezone-aware\n            datetime object. Consider using :func:`utils.utcnow`.\n\n            Required if the entity type is :attr:`EntityType.external`.\n        privacy_level: :class:`PrivacyLevel`\n            The privacy level of the scheduled event.\n        entity_type: :class:`EntityType`\n            The entity type of the scheduled event. If the channel is a\n            :class:`StageInstance` or :class:`VoiceChannel` then this is\n            automatically set to the appropriate entity type. If no channel\n            is passed then the entity type is assumed to be\n            :attr:`EntityType.external`\n        image: :class:`bytes`\n            The image of the scheduled event.\n        location: :class:`str`\n            The location of the scheduled event.\n\n            Required if the ``entity_type`` is :attr:`EntityType.external`.\n        reason: Optional[:class:`str`]\n            The reason for creating this scheduled event. Shows up on the audit log.\n\n        Raises\n        -------\n        TypeError\n            ``image`` was not a :term:`py:bytes-like object`, or ``privacy_level``\n            was not a :class:`PrivacyLevel`, or ``entity_type`` was not an\n            :class:`EntityType`, ``status`` was not an :class:`EventStatus`,\n            or an argument was provided that was incompatible with the provided\n            ``entity_type``.\n        ValueError\n            ``start_time`` or ``end_time`` was not a timezone-aware datetime object.\n        Forbidden\n            You are not allowed to create scheduled events.\n        HTTPException\n            Creating the scheduled event failed.\n\n        Returns\n        --------\n        :class:`ScheduledEvent`\n            The created scheduled event.\n        \"\"\"\n        payload = {}\n        metadata = {}\n\n        payload['name'] = name\n\n        if start_time is not MISSING:\n            if start_time.tzinfo is None:\n                raise ValueError(\n                    'start_time must be an aware datetime. Consider using discord.utils.utcnow() or datetime.datetime.now().astimezone() for local time.'\n                )\n            payload['scheduled_start_time'] = start_time.isoformat()\n\n        entity_type = entity_type or getattr(channel, '_scheduled_event_entity_type', MISSING)\n        if entity_type is MISSING:\n            if channel and isinstance(channel, Object):\n                if channel.type is VoiceChannel:\n                    entity_type = EntityType.voice\n                elif channel.type is StageChannel:\n                    entity_type = EntityType.stage_instance\n\n            elif location not in (MISSING, None):\n                entity_type = EntityType.external\n        else:\n            if not isinstance(entity_type, EntityType):\n                raise TypeError('entity_type must be of type EntityType')\n\n            payload['entity_type'] = entity_type.value\n\n        if entity_type is None:\n            raise TypeError(\n                'invalid GuildChannel type passed, must be VoiceChannel or StageChannel ' f'not {channel.__class__.__name__}'\n            )\n\n        if privacy_level is not MISSING:\n            if not isinstance(privacy_level, PrivacyLevel):\n                raise TypeError('privacy_level must be of type PrivacyLevel.')\n\n            payload['privacy_level'] = privacy_level.value\n\n        if description is not MISSING:\n            payload['description'] = description\n\n        if image is not MISSING:\n            image_as_str: str = utils._bytes_to_base64_data(image)\n            payload['image'] = image_as_str\n\n        if entity_type in (EntityType.stage_instance, EntityType.voice):\n            if channel in (MISSING, None):\n                raise TypeError('channel must be set when entity_type is voice or stage_instance')\n\n            payload['channel_id'] = channel.id\n\n            if location is not MISSING:\n                raise TypeError('location cannot be set when entity_type is voice or stage_instance')\n        else:\n            if channel is not MISSING:\n                raise TypeError('channel cannot be set when entity_type is external')\n\n            if location is MISSING or location is None:\n                raise TypeError('location must be set when entity_type is external')\n\n            metadata['location'] = location\n\n            if end_time in (MISSING, None):\n                raise TypeError('end_time must be set when entity_type is external')\n\n        if end_time not in (MISSING, None):\n            if end_time.tzinfo is None:\n                raise ValueError(\n                    'end_time must be an aware datetime. Consider using discord.utils.utcnow() or datetime.datetime.now().astimezone() for local time.'\n                )\n            payload['scheduled_end_time'] = end_time.isoformat()\n\n        if metadata:\n            payload['entity_metadata'] = metadata\n\n        data = await self._state.http.create_guild_scheduled_event(self.id, **payload, reason=reason)\n        return ScheduledEvent(state=self._state, data=data)\n\n    async def fetch_emojis(self) -> List[Emoji]:\n        r\"\"\"|coro|\n\n        Retrieves all custom :class:`Emoji`\\s from the guild.\n\n        .. note::\n\n            This method is an API call. For general usage, consider :attr:`emojis` instead.\n\n        Raises\n        ---------\n        HTTPException\n            An error occurred fetching the emojis.\n\n        Returns\n        --------\n        List[:class:`Emoji`]\n            The retrieved emojis.\n        \"\"\"\n        data = await self._state.http.get_all_custom_emojis(self.id)\n        return [Emoji(guild=self, state=self._state, data=d) for d in data]\n\n    async def fetch_emoji(self, emoji_id: int, /) -> Emoji:\n        \"\"\"|coro|\n\n        Retrieves a custom :class:`Emoji` from the guild.\n\n        .. note::\n\n            This method is an API call.\n            For general usage, consider iterating over :attr:`emojis` instead.\n\n        .. versionchanged:: 2.0\n\n            ``emoji_id`` parameter is now positional-only.\n\n        Parameters\n        -------------\n        emoji_id: :class:`int`\n            The emoji's ID.\n\n        Raises\n        ---------\n        NotFound\n            The emoji requested could not be found.\n        HTTPException\n            An error occurred fetching the emoji.\n\n        Returns\n        --------\n        :class:`Emoji`\n            The retrieved emoji.\n        \"\"\"\n        data = await self._state.http.get_custom_emoji(self.id, emoji_id)\n        return Emoji(guild=self, state=self._state, data=data)\n\n    async def create_custom_emoji(\n        self,\n        *,\n        name: str,\n        image: bytes,\n        roles: Collection[Role] = MISSING,\n        reason: Optional[str] = None,\n    ) -> Emoji:\n        r\"\"\"|coro|\n\n        Creates a custom :class:`Emoji` for the guild.\n\n        There is currently a limit of 50 static and animated emojis respectively per guild,\n        unless the guild has the ``MORE_EMOJI`` feature which extends the limit to 200.\n\n        You must have :attr:`~Permissions.manage_emojis` to do this.\n\n        Parameters\n        -----------\n        name: :class:`str`\n            The emoji name. Must be at least 2 characters.\n        image: :class:`bytes`\n            The :term:`py:bytes-like object` representing the image data to use.\n            Only JPG, PNG and GIF images are supported.\n        roles: List[:class:`Role`]\n            A :class:`list` of :class:`Role`\\s that can use this emoji. Leave empty to make it available to everyone.\n        reason: Optional[:class:`str`]\n            The reason for creating this emoji. Shows up on the audit log.\n\n        Raises\n        -------\n        Forbidden\n            You are not allowed to create emojis.\n        HTTPException\n            An error occurred creating an emoji.\n\n        Returns\n        --------\n        :class:`Emoji`\n            The created emoji.\n        \"\"\"\n\n        img = utils._bytes_to_base64_data(image)\n        if roles:\n            role_ids: SnowflakeList = [role.id for role in roles]\n        else:\n            role_ids = []\n\n        data = await self._state.http.create_custom_emoji(self.id, name, img, roles=role_ids, reason=reason)\n        if self._state.cache_guild_expressions:\n            return self._state.store_emoji(self, data)\n        else:\n            return Emoji(guild=self, state=self._state, data=data)\n\n    async def delete_emoji(self, emoji: Snowflake, /, *, reason: Optional[str] = None) -> None:\n        \"\"\"|coro|\n\n        Deletes the custom :class:`Emoji` from the guild.\n\n        You must have :attr:`~Permissions.manage_emojis` to do this.\n\n        .. versionchanged:: 2.0\n\n            ``emoji`` parameter is now positional-only.\n\n        Parameters\n        -----------\n        emoji: :class:`abc.Snowflake`\n            The emoji you are deleting.\n        reason: Optional[:class:`str`]\n            The reason for deleting this emoji. Shows up on the audit log.\n\n        Raises\n        -------\n        Forbidden\n            You are not allowed to delete emojis.\n        HTTPException\n            An error occurred deleting the emoji.\n        \"\"\"\n\n        await self._state.http.delete_custom_emoji(self.id, emoji.id, reason=reason)\n\n    async def fetch_roles(self) -> List[Role]:\n        \"\"\"|coro|\n\n        Retrieves all :class:`Role` that the guild has.\n\n        .. note::\n\n            This method is an API call. For general usage, consider :attr:`roles` instead.\n\n        .. versionadded:: 1.3\n\n        Raises\n        -------\n        HTTPException\n            Retrieving the roles failed.\n\n        Returns\n        -------\n        List[:class:`Role`]\n            All roles in the guild.\n        \"\"\"\n        data = await self._state.http.get_roles(self.id)\n        return [Role(guild=self, state=self._state, data=d) for d in data]\n\n    @overload\n    async def create_role(\n        self,\n        *,\n        reason: Optional[str] = ...,\n        name: str = ...,\n        permissions: Permissions = ...,\n        colour: Union[Colour, int] = ...,\n        hoist: bool = ...,\n        display_icon: Union[bytes, str] = MISSING,\n        mentionable: bool = ...,\n    ) -> Role:\n        ...\n\n    @overload\n    async def create_role(\n        self,\n        *,\n        reason: Optional[str] = ...,\n        name: str = ...,\n        permissions: Permissions = ...,\n        color: Union[Colour, int] = ...,\n        hoist: bool = ...,\n        display_icon: Union[bytes, str] = MISSING,\n        mentionable: bool = ...,\n    ) -> Role:\n        ...\n\n    async def create_role(\n        self,\n        *,\n        name: str = MISSING,\n        permissions: Permissions = MISSING,\n        color: Union[Colour, int] = MISSING,\n        colour: Union[Colour, int] = MISSING,\n        hoist: bool = MISSING,\n        display_icon: Union[bytes, str] = MISSING,\n        mentionable: bool = MISSING,\n        reason: Optional[str] = None,\n    ) -> Role:\n        \"\"\"|coro|\n\n        Creates a :class:`Role` for the guild.\n\n        All fields are optional.\n\n        You must have :attr:`~Permissions.manage_roles` to do this.\n\n        .. versionchanged:: 1.6\n            Can now pass ``int`` to ``colour`` keyword-only parameter.\n\n        .. versionadded:: 2.0\n            The ``display_icon`` keyword-only parameter was added.\n\n        .. versionchanged:: 2.0\n            This function will now raise :exc:`TypeError` instead of\n            ``InvalidArgument``.\n\n        Parameters\n        -----------\n        name: :class:`str`\n            The role name. Defaults to 'new role'.\n        permissions: :class:`Permissions`\n            The permissions to have. Defaults to no permissions.\n        colour: Union[:class:`Colour`, :class:`int`]\n            The colour for the role. Defaults to :meth:`Colour.default`.\n            This is aliased to ``color`` as well.\n        hoist: :class:`bool`\n            Indicates if the role should be shown separately in the member list.\n            Defaults to ``False``.\n        display_icon: Union[:class:`bytes`, :class:`str`]\n            A :term:`py:bytes-like object` representing the icon\n            or :class:`str` representing unicode emoji that should be used as a role icon.\n            Only PNG/JPEG is supported.\n            This is only available to guilds that contain ``ROLE_ICONS`` in :attr:`features`.\n        mentionable: :class:`bool`\n            Indicates if the role should be mentionable by others.\n            Defaults to ``False``.\n        reason: Optional[:class:`str`]\n            The reason for creating this role. Shows up on the audit log.\n\n        Raises\n        -------\n        Forbidden\n            You do not have permissions to create the role.\n        HTTPException\n            Creating the role failed.\n        TypeError\n            An invalid keyword argument was given.\n\n        Returns\n        --------\n        :class:`Role`\n            The newly created role.\n        \"\"\"\n        fields: Dict[str, Any] = {}\n        if permissions is not MISSING:\n            fields['permissions'] = str(permissions.value)\n        else:\n            fields['permissions'] = '0'\n\n        actual_colour = colour or color or Colour.default()\n        if isinstance(actual_colour, int):\n            fields['color'] = actual_colour\n        else:\n            fields['color'] = actual_colour.value\n\n        if hoist is not MISSING:\n            fields['hoist'] = hoist\n\n        if display_icon is not MISSING:\n            if isinstance(display_icon, bytes):\n                fields['icon'] = utils._bytes_to_base64_data(display_icon)\n            else:\n                fields['unicode_emoji'] = display_icon\n\n        if mentionable is not MISSING:\n            fields['mentionable'] = mentionable\n\n        if name is not MISSING:\n            fields['name'] = name\n\n        data = await self._state.http.create_role(self.id, reason=reason, **fields)\n        role = Role(guild=self, data=data, state=self._state)\n\n        return role\n\n    async def edit_role_positions(self, positions: Mapping[Snowflake, int], *, reason: Optional[str] = None) -> List[Role]:\n        \"\"\"|coro|\n\n        Bulk edits a list of :class:`Role` in the guild.\n\n        You must have :attr:`~Permissions.manage_roles` to do this.\n\n        .. versionadded:: 1.4\n\n        .. versionchanged:: 2.0\n            This function will now raise :exc:`TypeError` instead of\n            ``InvalidArgument``.\n\n        Example\n        ----------\n\n        .. code-block:: python3\n\n            positions = {\n                bots_role: 1, # penultimate role\n                tester_role: 2,\n                admin_role: 6\n            }\n\n            await guild.edit_role_positions(positions=positions)\n\n        Parameters\n        -----------\n        positions\n            A :class:`dict` of :class:`Role` to :class:`int` to change the positions\n            of each given role.\n        reason: Optional[:class:`str`]\n            The reason for editing the role positions. Shows up on the audit log.\n\n        Raises\n        -------\n        Forbidden\n            You do not have permissions to move the roles.\n        HTTPException\n            Moving the roles failed.\n        TypeError\n            An invalid keyword argument was given.\n\n        Returns\n        --------\n        List[:class:`Role`]\n            A list of all the roles in the guild.\n        \"\"\"\n        if not isinstance(positions, Mapping):\n            raise TypeError('positions parameter expects a dict.')\n\n        role_positions = []\n        for role, position in positions.items():\n            payload: RolePositionUpdatePayload = {'id': role.id, 'position': position}\n\n            role_positions.append(payload)\n\n        data = await self._state.http.move_role_position(self.id, role_positions, reason=reason)\n        roles: List[Role] = []\n        for d in data:\n            role = Role(guild=self, data=d, state=self._state)\n            roles.append(role)\n            self._roles[role.id] = role\n\n        return roles\n\n    async def welcome_screen(self) -> WelcomeScreen:\n        \"\"\"|coro|\n\n        Returns the guild's welcome screen.\n\n        The guild must have ``COMMUNITY`` in :attr:`~Guild.features`.\n\n        You must have :attr:`~Permissions.manage_guild` to do this.as well.\n\n        .. versionadded:: 2.0\n\n        Raises\n        -------\n        Forbidden\n            You do not have the proper permissions to get this.\n        HTTPException\n            Retrieving the welcome screen failed.\n\n        Returns\n        --------\n        :class:`WelcomeScreen`\n            The welcome screen.\n        \"\"\"\n        data = await self._state.http.get_welcome_screen(self.id)\n        return WelcomeScreen(data=data, guild=self)\n\n    async def edit_welcome_screen(\n        self,\n        *,\n        description: str = MISSING,\n        welcome_channels: List[WelcomeChannel] = MISSING,\n        enabled: bool = MISSING,\n        reason: Optional[str] = None,\n    ) -> WelcomeScreen:\n        \"\"\"|coro|\n\n        A shorthand method of :attr:`WelcomeScreen.edit` without needing\n        to fetch the welcome screen beforehand.\n\n        The guild must have ``COMMUNITY`` in :attr:`~Guild.features`.\n\n        You must have :attr:`~Permissions.manage_guild` to do this as well.\n\n        .. versionadded:: 2.0\n\n        Returns\n        --------\n        :class:`WelcomeScreen`\n            The edited welcome screen.\n        \"\"\"\n        fields = {}\n\n        if welcome_channels is not MISSING:\n            welcome_channels_serialised = []\n            for wc in welcome_channels:\n                if not isinstance(wc, WelcomeChannel):\n                    raise TypeError('welcome_channels parameter must be a list of WelcomeChannel')\n                welcome_channels_serialised.append(wc.to_dict())\n            fields['welcome_channels'] = welcome_channels_serialised\n\n        if description is not MISSING:\n            fields['description'] = description\n\n        if enabled is not MISSING:\n            fields['enabled'] = enabled\n\n        data = await self._state.http.edit_welcome_screen(self.id, reason=reason, **fields)\n        return WelcomeScreen(data=data, guild=self)\n\n    async def kick(self, user: Snowflake, *, reason: Optional[str] = None) -> None:\n        \"\"\"|coro|\n\n        Kicks a user from the guild.\n\n        The user must meet the :class:`abc.Snowflake` abc.\n\n        You must have :attr:`~Permissions.kick_members` to do this.\n\n        Parameters\n        -----------\n        user: :class:`abc.Snowflake`\n            The user to kick from the guild.\n        reason: Optional[:class:`str`]\n            The reason the user got kicked.\n\n        Raises\n        -------\n        Forbidden\n            You do not have the proper permissions to kick.\n        HTTPException\n            Kicking failed.\n        \"\"\"\n        await self._state.http.kick(user.id, self.id, reason=reason)\n\n    async def ban(\n        self,\n        user: Snowflake,\n        *,\n        reason: Optional[str] = None,\n        delete_message_days: int = MISSING,\n        delete_message_seconds: int = MISSING,\n    ) -> None:\n        \"\"\"|coro|\n\n        Bans a user from the guild.\n\n        The user must meet the :class:`abc.Snowflake` abc.\n\n        You must have :attr:`~Permissions.ban_members` to do this.\n\n        Parameters\n        -----------\n        user: :class:`abc.Snowflake`\n            The user to ban from the guild.\n        delete_message_days: :class:`int`\n            The number of days worth of messages to delete from the user\n            in the guild. The minimum is 0 and the maximum is 7.\n            Defaults to 1 day if neither ``delete_message_days`` nor\n            ``delete_message_seconds`` are passed.\n\n            .. deprecated:: 2.1\n        delete_message_seconds: :class:`int`\n            The number of seconds worth of messages to delete from the user\n            in the guild. The minimum is 0 and the maximum is 604800 (7 days).\n            Defaults to 1 day if neither ``delete_message_days`` nor\n            ``delete_message_seconds`` are passed.\n\n            .. versionadded:: 2.1\n        reason: Optional[:class:`str`]\n            The reason the user got banned.\n\n        Raises\n        -------\n        NotFound\n            The requested user was not found.\n        Forbidden\n            You do not have the proper permissions to ban.\n        HTTPException\n            Banning failed.\n        TypeError\n            You specified both ``delete_message_days`` and ``delete_message_seconds``.\n        \"\"\"\n        if delete_message_days is not MISSING and delete_message_seconds is not MISSING:\n            raise TypeError('Cannot mix delete_message_days and delete_message_seconds keyword arguments.')\n\n        if delete_message_days is not MISSING:\n            msg = 'delete_message_days is deprecated, use delete_message_seconds instead'\n            warnings.warn(msg, DeprecationWarning, stacklevel=2)\n            delete_message_seconds = delete_message_days * 86400  # one day\n\n        if delete_message_seconds is MISSING:\n            delete_message_seconds = 86400  # one day\n\n        await self._state.http.ban(user.id, self.id, delete_message_seconds, reason=reason)\n\n    async def unban(self, user: Snowflake, *, reason: Optional[str] = None) -> None:\n        \"\"\"|coro|\n\n        Unbans a user from the guild.\n\n        The user must meet the :class:`abc.Snowflake` abc.\n\n        You must have :attr:`~Permissions.ban_members` to do this.\n\n        Parameters\n        -----------\n        user: :class:`abc.Snowflake`\n            The user to unban.\n        reason: Optional[:class:`str`]\n            The reason for doing this action. Shows up on the audit log.\n\n        Raises\n        -------\n        NotFound\n            The requested unban was not found.\n        Forbidden\n            You do not have the proper permissions to unban.\n        HTTPException\n            Unbanning failed.\n        \"\"\"\n        await self._state.http.unban(user.id, self.id, reason=reason)\n\n    async def bulk_ban(\n        self,\n        users: Iterable[Snowflake],\n        *,\n        reason: Optional[str] = None,\n        delete_message_seconds: int = 86400,\n    ) -> BulkBanResult:\n        \"\"\"|coro|\n\n        Bans multiple users from the guild.\n\n        The users must meet the :class:`abc.Snowflake` abc.\n\n        You must have :attr:`~Permissions.ban_members` and :attr:`~Permissions.manage_guild` to do this.\n\n        .. versionadded:: 2.4\n\n        Parameters\n        -----------\n        users: Iterable[:class:`abc.Snowflake`]\n            The users to ban from the guild, up to 200 users.\n        delete_message_seconds: :class:`int`\n            The number of seconds worth of messages to delete from the user\n            in the guild. The minimum is 0 and the maximum is 604800 (7 days).\n            Defaults to 1 day.\n        reason: Optional[:class:`str`]\n            The reason the users got banned.\n\n        Raises\n        -------\n        Forbidden\n            You do not have the proper permissions to ban.\n        HTTPException\n            Banning failed.\n\n        Returns\n        --------\n        :class:`BulkBanResult`\n            The result of the bulk ban operation.\n        \"\"\"\n\n        response = await self._state.http.bulk_ban(\n            self.id,\n            user_ids=[u.id for u in users],\n            delete_message_seconds=delete_message_seconds,\n            reason=reason,\n        )\n        return BulkBanResult(\n            banned=[Object(id=int(user_id), type=User) for user_id in response.get('banned_users', []) or []],\n            failed=[Object(id=int(user_id), type=User) for user_id in response.get('failed_users', []) or []],\n        )\n\n    @property\n    def vanity_url(self) -> Optional[str]:\n        \"\"\"Optional[:class:`str`]: The Discord vanity invite URL for this guild, if available.\n\n        .. versionadded:: 2.0\n        \"\"\"\n        if self.vanity_url_code is None:\n            return None\n        return f'{Invite.BASE}/{self.vanity_url_code}'\n\n    async def vanity_invite(self) -> Optional[Invite]:\n        \"\"\"|coro|\n\n        Returns the guild's special vanity invite.\n\n        The guild must have ``VANITY_URL`` in :attr:`~Guild.features`.\n\n        You must have :attr:`~Permissions.manage_guild` to do this as well.\n\n        Raises\n        -------\n        Forbidden\n            You do not have the proper permissions to get this.\n        HTTPException\n            Retrieving the vanity invite failed.\n\n        Returns\n        --------\n        Optional[:class:`Invite`]\n            The special vanity invite. If ``None`` then the guild does not\n            have a vanity invite set.\n        \"\"\"\n\n        # we start with { code: abc }\n        payload = await self._state.http.get_vanity_code(self.id)\n        if not payload['code']:\n            return None\n\n        # get the vanity URL channel since default channels aren't\n        # reliable or a thing anymore\n        data = await self._state.http.get_invite(payload['code'])\n\n        channel = self.get_channel(int(data['channel']['id']))\n        payload['revoked'] = False\n        payload['temporary'] = False\n        payload['max_uses'] = 0\n        payload['max_age'] = 0\n        payload['uses'] = payload.get('uses', 0)\n        return Invite(state=self._state, data=payload, guild=self, channel=channel)  # type: ignore # we're faking a payload here\n\n    async def audit_logs(\n        self,\n        *,\n        limit: Optional[int] = 100,\n        before: SnowflakeTime = MISSING,\n        after: SnowflakeTime = MISSING,\n        oldest_first: bool = MISSING,\n        user: Snowflake = MISSING,\n        action: AuditLogAction = MISSING,\n    ) -> AsyncIterator[AuditLogEntry]:\n        \"\"\"Returns an :term:`asynchronous iterator` that enables receiving the guild's audit logs.\n\n        You must have :attr:`~Permissions.view_audit_log` to do this.\n\n        Examples\n        ----------\n\n        Getting the first 100 entries: ::\n\n            async for entry in guild.audit_logs(limit=100):\n                print(f'{entry.user} did {entry.action} to {entry.target}')\n\n        Getting entries for a specific action: ::\n\n            async for entry in guild.audit_logs(action=discord.AuditLogAction.ban):\n                print(f'{entry.user} banned {entry.target}')\n\n        Getting entries made by a specific user: ::\n\n            entries = [entry async for entry in guild.audit_logs(limit=None, user=guild.me)]\n            await channel.send(f'I made {len(entries)} moderation actions.')\n\n        Parameters\n        -----------\n        limit: Optional[:class:`int`]\n            The number of entries to retrieve. If ``None`` retrieve all entries.\n        before: Union[:class:`abc.Snowflake`, :class:`datetime.datetime`]\n            Retrieve entries before this date or entry.\n            If a datetime is provided, it is recommended to use a UTC aware datetime.\n            If the datetime is naive, it is assumed to be local time.\n        after: Union[:class:`abc.Snowflake`, :class:`datetime.datetime`]\n            Retrieve entries after this date or entry.\n            If a datetime is provided, it is recommended to use a UTC aware datetime.\n            If the datetime is naive, it is assumed to be local time.\n        oldest_first: :class:`bool`\n            If set to ``True``, return entries in oldest->newest order. Defaults to ``True`` if\n            ``after`` is specified, otherwise ``False``.\n        user: :class:`abc.Snowflake`\n            The moderator to filter entries from.\n        action: :class:`AuditLogAction`\n            The action to filter with.\n\n        Raises\n        -------\n        Forbidden\n            You are not allowed to fetch audit logs\n        HTTPException\n            An error occurred while fetching the audit logs.\n\n        Yields\n        --------\n        :class:`AuditLogEntry`\n            The audit log entry.\n        \"\"\"\n\n        async def _before_strategy(retrieve: int, before: Optional[Snowflake], limit: Optional[int]):\n            before_id = before.id if before else None\n            data = await self._state.http.get_audit_logs(\n                self.id, limit=retrieve, user_id=user_id, action_type=action_type, before=before_id\n            )\n\n            entries = data.get('audit_log_entries', [])\n\n            if data and entries:\n                if limit is not None:\n                    limit -= len(entries)\n\n                before = Object(id=int(entries[-1]['id']))\n\n            return data, entries, before, limit\n\n        async def _after_strategy(retrieve: int, after: Optional[Snowflake], limit: Optional[int]):\n            after_id = after.id if after else None\n            data = await self._state.http.get_audit_logs(\n                self.id, limit=retrieve, user_id=user_id, action_type=action_type, after=after_id\n            )\n\n            entries = data.get('audit_log_entries', [])\n\n            if data and entries:\n                if limit is not None:\n                    limit -= len(entries)\n\n                after = Object(id=int(entries[-1]['id']))\n\n            return data, entries, after, limit\n\n        if user is not MISSING:\n            user_id = user.id\n        else:\n            user_id = None\n\n        if action is not MISSING:\n            action_type: Optional[AuditLogEvent] = action.value\n        else:\n            action_type = None\n\n        if isinstance(before, datetime.datetime):\n            before = Object(id=utils.time_snowflake(before, high=False))\n        if isinstance(after, datetime.datetime):\n            after = Object(id=utils.time_snowflake(after, high=True))\n\n        if oldest_first:\n            if after is MISSING:\n                after = OLDEST_OBJECT\n\n        predicate = None\n\n        if oldest_first:\n            strategy, state = _after_strategy, after\n            if before:\n                predicate = lambda m: int(m['id']) < before.id\n        else:\n            strategy, state = _before_strategy, before\n            if after:\n                predicate = lambda m: int(m['id']) > after.id\n\n        # avoid circular import\n        from .app_commands import AppCommand\n        from .webhook import Webhook\n\n        while True:\n            retrieve = 100 if limit is None else min(limit, 100)\n            if retrieve < 1:\n                return\n\n            data, raw_entries, state, limit = await strategy(retrieve, state, limit)\n\n            if predicate:\n                raw_entries = filter(predicate, raw_entries)\n\n            users = (User(data=raw_user, state=self._state) for raw_user in data.get('users', []))\n            user_map = {user.id: user for user in users}\n\n            integrations = (PartialIntegration(data=raw_i, guild=self) for raw_i in data.get('integrations', []))\n            integration_map = {integration.id: integration for integration in integrations}\n\n            app_commands = (AppCommand(data=raw_cmd, state=self._state) for raw_cmd in data.get('application_commands', []))\n            app_command_map = {app_command.id: app_command for app_command in app_commands}\n\n            automod_rules = (\n                AutoModRule(data=raw_rule, guild=self, state=self._state)\n                for raw_rule in data.get('auto_moderation_rules', [])\n            )\n            automod_rule_map = {rule.id: rule for rule in automod_rules}\n\n            webhooks = (Webhook.from_state(data=raw_webhook, state=self._state) for raw_webhook in data.get('webhooks', []))\n            webhook_map = {webhook.id: webhook for webhook in webhooks}\n\n            count = 0\n\n            for count, raw_entry in enumerate(raw_entries, 1):\n                # Weird Discord quirk\n                if raw_entry['action_type'] is None:\n                    continue\n\n                yield AuditLogEntry(\n                    data=raw_entry,\n                    users=user_map,\n                    integrations=integration_map,\n                    app_commands=app_command_map,\n                    automod_rules=automod_rule_map,\n                    webhooks=webhook_map,\n                    guild=self,\n                )\n\n            if count < 100:\n                # There's no data left after this\n                break\n\n    async def widget(self) -> Widget:\n        \"\"\"|coro|\n\n        Returns the widget of the guild.\n\n        .. note::\n\n            The guild must have the widget enabled to get this information.\n\n        Raises\n        -------\n        Forbidden\n            The widget for this guild is disabled.\n        HTTPException\n            Retrieving the widget failed.\n\n        Returns\n        --------\n        :class:`Widget`\n            The guild's widget.\n        \"\"\"\n        data = await self._state.http.get_widget(self.id)\n\n        return Widget(state=self._state, data=data)\n\n    async def edit_widget(\n        self,\n        *,\n        enabled: bool = MISSING,\n        channel: Optional[Snowflake] = MISSING,\n        reason: Optional[str] = None,\n    ) -> None:\n        \"\"\"|coro|\n\n        Edits the widget of the guild. This can also be done with :attr:`~Guild.edit`.\n\n        You must have :attr:`~Permissions.manage_guild` to do this.\n\n        .. versionadded:: 2.0\n\n        Parameters\n        -----------\n        enabled: :class:`bool`\n            Whether to enable the widget for the guild.\n        channel: Optional[:class:`~discord.abc.Snowflake`]\n            The new widget channel. ``None`` removes the widget channel.\n        reason: Optional[:class:`str`]\n            The reason for editing this widget. Shows up on the audit log.\n\n        Raises\n        -------\n        Forbidden\n            You do not have permission to edit the widget.\n        HTTPException\n            Editing the widget failed.\n        \"\"\"\n        payload: EditWidgetSettings = {}\n        if channel is not MISSING:\n            payload['channel_id'] = None if channel is None else channel.id\n        if enabled is not MISSING:\n            payload['enabled'] = enabled\n\n        if payload:\n            await self._state.http.edit_widget(self.id, payload=payload, reason=reason)\n\n    async def chunk(self, *, cache: bool = True) -> List[Member]:\n        \"\"\"|coro|\n\n        Requests all members that belong to this guild. In order to use this,\n        :meth:`Intents.members` must be enabled.\n\n        This is a websocket operation and can be slow.\n\n        .. versionadded:: 1.5\n\n        Parameters\n        -----------\n        cache: :class:`bool`\n            Whether to cache the members as well.\n\n        Raises\n        -------\n        ClientException\n            The members intent is not enabled.\n\n        Returns\n        --------\n        List[:class:`Member`]\n            The list of members in the guild.\n        \"\"\"\n\n        if not self._state._intents.members:\n            raise ClientException('Intents.members must be enabled to use this.')\n\n        if not self._state.is_guild_evicted(self):\n            return await self._state.chunk_guild(self, cache=cache)\n\n        return []\n\n    async def query_members(\n        self,\n        query: Optional[str] = None,\n        *,\n        limit: int = 5,\n        user_ids: Optional[List[int]] = None,\n        presences: bool = False,\n        cache: bool = True,\n    ) -> List[Member]:\n        \"\"\"|coro|\n\n        Request members of this guild whose username or nickname starts with the given query.\n        This is a websocket operation.\n\n        .. versionadded:: 1.3\n\n        Parameters\n        -----------\n        query: Optional[:class:`str`]\n            The string that the username or nickname should start with.\n        limit: :class:`int`\n            The maximum number of members to send back. This must be\n            a number between 5 and 100.\n        presences: :class:`bool`\n            Whether to request for presences to be provided. This defaults\n            to ``False``.\n\n            .. versionadded:: 1.6\n\n        cache: :class:`bool`\n            Whether to cache the members internally. This makes operations\n            such as :meth:`get_member` work for those that matched.\n        user_ids: Optional[List[:class:`int`]]\n            List of user IDs to search for. If the user ID is not in the guild then it won't be returned.\n\n            .. versionadded:: 1.4\n\n\n        Raises\n        -------\n        asyncio.TimeoutError\n            The query timed out waiting for the members.\n        ValueError\n            Invalid parameters were passed to the function\n        ClientException\n            The presences intent is not enabled.\n\n        Returns\n        --------\n        List[:class:`Member`]\n            The list of members that have matched the query.\n        \"\"\"\n\n        if presences and not self._state._intents.presences:\n            raise ClientException('Intents.presences must be enabled to use this.')\n\n        if query == '':\n            raise ValueError('Cannot pass empty query string.')\n\n        if query is None and user_ids is None:\n            raise ValueError('Must pass either query or user_ids')\n\n        if user_ids is not None and query is not None:\n            raise ValueError('Cannot pass both query and user_ids')\n\n        if user_ids is not None and not user_ids:\n            raise ValueError('user_ids must contain at least 1 value')\n\n        limit = min(100, limit or 5)\n        return await self._state.query_members(\n            self, query=query, limit=limit, user_ids=user_ids, presences=presences, cache=cache\n        )\n\n    async def change_voice_state(\n        self, *, channel: Optional[abc.Snowflake], self_mute: bool = False, self_deaf: bool = False\n    ) -> None:\n        \"\"\"|coro|\n\n        Changes client's voice state in the guild.\n\n        .. versionadded:: 1.4\n\n        Parameters\n        -----------\n        channel: Optional[:class:`abc.Snowflake`]\n            Channel the client wants to join. Use ``None`` to disconnect.\n        self_mute: :class:`bool`\n            Indicates if the client should be self-muted.\n        self_deaf: :class:`bool`\n            Indicates if the client should be self-deafened.\n        \"\"\"\n        ws = self._state._get_websocket(self.id)\n        channel_id = channel.id if channel else None\n        await ws.voice_state(self.id, channel_id, self_mute, self_deaf)\n\n    async def fetch_automod_rule(self, automod_rule_id: int, /) -> AutoModRule:\n        \"\"\"|coro|\n\n        Fetches an active automod rule from the guild.\n\n        You must have :attr:`Permissions.manage_guild` to do this.\n\n        .. versionadded:: 2.0\n\n        Parameters\n        -----------\n        automod_rule_id: :class:`int`\n            The ID of the automod rule to fetch.\n\n        Raises\n        -------\n        Forbidden\n            You do not have permission to view the automod rule.\n\n        Returns\n        --------\n        :class:`AutoModRule`\n            The automod rule that was fetched.\n        \"\"\"\n\n        data = await self._state.http.get_auto_moderation_rule(self.id, automod_rule_id)\n\n        return AutoModRule(data=data, guild=self, state=self._state)\n\n    async def fetch_automod_rules(self) -> List[AutoModRule]:\n        \"\"\"|coro|\n\n        Fetches all automod rules from the guild.\n\n        You must have :attr:`Permissions.manage_guild` to do this.\n\n        .. versionadded:: 2.0\n\n        Raises\n        -------\n        Forbidden\n            You do not have permission to view the automod rule.\n        NotFound\n            There are no automod rules within this guild.\n\n        Returns\n        --------\n        List[:class:`AutoModRule`]\n            The automod rules that were fetched.\n        \"\"\"\n        data = await self._state.http.get_auto_moderation_rules(self.id)\n\n        return [AutoModRule(data=d, guild=self, state=self._state) for d in data]\n\n    async def create_automod_rule(\n        self,\n        *,\n        name: str,\n        event_type: AutoModRuleEventType,\n        trigger: AutoModTrigger,\n        actions: List[AutoModRuleAction],\n        enabled: bool = False,\n        exempt_roles: Sequence[Snowflake] = MISSING,\n        exempt_channels: Sequence[Snowflake] = MISSING,\n        reason: str = MISSING,\n    ) -> AutoModRule:\n        \"\"\"|coro|\n\n        Create an automod rule.\n\n        You must have :attr:`Permissions.manage_guild` to do this.\n\n        .. versionadded:: 2.0\n\n        Parameters\n        -----------\n        name: :class:`str`\n            The name of the automod rule.\n        event_type: :class:`AutoModRuleEventType`\n            The type of event that the automod rule will trigger on.\n        trigger: :class:`AutoModTrigger`\n            The trigger that will trigger the automod rule.\n        actions: List[:class:`AutoModRuleAction`]\n            The actions that will be taken when the automod rule is triggered.\n        enabled: :class:`bool`\n            Whether the automod rule is enabled.\n            Defaults to ``False``.\n        exempt_roles: Sequence[:class:`abc.Snowflake`]\n            A list of roles that will be exempt from the automod rule.\n        exempt_channels: Sequence[:class:`abc.Snowflake`]\n            A list of channels that will be exempt from the automod rule.\n        reason: :class:`str`\n            The reason for creating this automod rule. Shows up on the audit log.\n\n        Raises\n        -------\n        Forbidden\n            You do not have permissions to create an automod rule.\n        HTTPException\n            Creating the automod rule failed.\n\n        Returns\n        --------\n        :class:`AutoModRule`\n            The automod rule that was created.\n        \"\"\"\n        data = await self._state.http.create_auto_moderation_rule(\n            self.id,\n            name=name,\n            event_type=event_type.value,\n            trigger_type=trigger.type.value,\n            trigger_metadata=trigger.to_metadata_dict() or None,\n            actions=[a.to_dict() for a in actions],\n            enabled=enabled,\n            exempt_roles=[str(r.id) for r in exempt_roles] if exempt_roles else None,\n            exempt_channels=[str(c.id) for c in exempt_channels] if exempt_channels else None,\n            reason=reason,\n        )\n\n        return AutoModRule(data=data, guild=self, state=self._state)\n\n    @property\n    def invites_paused_until(self) -> Optional[datetime.datetime]:\n        \"\"\"Optional[:class:`datetime.datetime`]: If invites are paused, returns when\n        invites will get enabled in UTC, otherwise returns None.\n\n        .. versionadded:: 2.4\n        \"\"\"\n        if not self._incidents_data:\n            return None\n\n        return utils.parse_time(self._incidents_data.get('invites_disabled_until'))\n\n    @property\n    def dms_paused_until(self) -> Optional[datetime.datetime]:\n        \"\"\"Optional[:class:`datetime.datetime`]: If DMs are paused, returns when DMs\n        will get enabled in UTC, otherwise returns None.\n\n        .. versionadded:: 2.4\n        \"\"\"\n        if not self._incidents_data:\n            return None\n\n        return utils.parse_time(self._incidents_data.get('dms_disabled_until'))\n\n    def invites_paused(self) -> bool:\n        \"\"\":class:`bool`: Whether invites are paused in the guild.\n\n        .. versionadded:: 2.4\n        \"\"\"\n        if not self.invites_paused_until:\n            return False\n\n        return self.invites_paused_until > utils.utcnow()\n\n    def dms_paused(self) -> bool:\n        \"\"\":class:`bool`: Whether DMs are paused in the guild.\n\n        .. versionadded:: 2.4\n        \"\"\"\n        if not self.dms_paused_until:\n            return False\n\n        return self.dms_paused_until > utils.utcnow()\n"
  },
  {
    "path": "discord/http.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom __future__ import annotations\n\nimport asyncio\nimport logging\nimport sys\nfrom typing import (\n    Any,\n    ClassVar,\n    Coroutine,\n    Dict,\n    Iterable,\n    List,\n    Literal,\n    NamedTuple,\n    Optional,\n    overload,\n    Sequence,\n    Tuple,\n    TYPE_CHECKING,\n    Type,\n    TypeVar,\n    Union,\n)\nfrom urllib.parse import quote as _uriquote\nfrom collections import deque\nimport datetime\nimport socket\n\nimport aiohttp\n\nfrom .errors import HTTPException, RateLimited, Forbidden, NotFound, LoginFailure, DiscordServerError, GatewayNotFound\nfrom .gateway import DiscordClientWebSocketResponse\nfrom .file import File\nfrom .mentions import AllowedMentions\nfrom . import __version__, utils\nfrom .utils import MISSING\n\n_log = logging.getLogger(__name__)\n\nif TYPE_CHECKING:\n    from typing_extensions import Self\n\n    from .ui.view import View\n    from .embeds import Embed\n    from .message import Attachment\n    from .flags import MessageFlags\n    from .poll import Poll\n\n    from .types import (\n        appinfo,\n        audit_log,\n        automod,\n        channel,\n        command,\n        emoji,\n        guild,\n        integration,\n        invite,\n        member,\n        message,\n        template,\n        role,\n        user,\n        webhook,\n        widget,\n        threads,\n        scheduled_event,\n        sticker,\n        welcome_screen,\n        sku,\n        poll,\n    )\n    from .types.snowflake import Snowflake, SnowflakeList\n\n    from types import TracebackType\n\n    T = TypeVar('T')\n    BE = TypeVar('BE', bound=BaseException)\n    Response = Coroutine[Any, Any, T]\n\n\nasync def json_or_text(response: aiohttp.ClientResponse) -> Union[Dict[str, Any], str]:\n    text = await response.text(encoding='utf-8')\n    try:\n        if response.headers['content-type'] == 'application/json':\n            return utils._from_json(text)\n    except KeyError:\n        # Thanks Cloudflare\n        pass\n\n    return text\n\n\nclass MultipartParameters(NamedTuple):\n    payload: Optional[Dict[str, Any]]\n    multipart: Optional[List[Dict[str, Any]]]\n    files: Optional[Sequence[File]]\n\n    def __enter__(self) -> Self:\n        return self\n\n    def __exit__(\n        self,\n        exc_type: Optional[Type[BE]],\n        exc: Optional[BE],\n        traceback: Optional[TracebackType],\n    ) -> None:\n        if self.files:\n            for file in self.files:\n                file.close()\n\n\ndef handle_message_parameters(\n    content: Optional[str] = MISSING,\n    *,\n    username: str = MISSING,\n    avatar_url: Any = MISSING,\n    tts: bool = False,\n    nonce: Optional[Union[int, str]] = None,\n    flags: MessageFlags = MISSING,\n    file: File = MISSING,\n    files: Sequence[File] = MISSING,\n    embed: Optional[Embed] = MISSING,\n    embeds: Sequence[Embed] = MISSING,\n    attachments: Sequence[Union[Attachment, File]] = MISSING,\n    view: Optional[View] = MISSING,\n    allowed_mentions: Optional[AllowedMentions] = MISSING,\n    message_reference: Optional[message.MessageReference] = MISSING,\n    stickers: Optional[SnowflakeList] = MISSING,\n    previous_allowed_mentions: Optional[AllowedMentions] = None,\n    mention_author: Optional[bool] = None,\n    thread_name: str = MISSING,\n    channel_payload: Dict[str, Any] = MISSING,\n    applied_tags: Optional[SnowflakeList] = MISSING,\n    poll: Optional[Poll] = MISSING,\n) -> MultipartParameters:\n    if files is not MISSING and file is not MISSING:\n        raise TypeError('Cannot mix file and files keyword arguments.')\n    if embeds is not MISSING and embed is not MISSING:\n        raise TypeError('Cannot mix embed and embeds keyword arguments.')\n\n    if file is not MISSING:\n        files = [file]\n\n    if attachments is not MISSING and files is not MISSING:\n        raise TypeError('Cannot mix attachments and files keyword arguments.')\n\n    payload = {}\n    if embeds is not MISSING:\n        if len(embeds) > 10:\n            raise ValueError('embeds has a maximum of 10 elements.')\n        payload['embeds'] = [e.to_dict() for e in embeds]\n\n    if embed is not MISSING:\n        if embed is None:\n            payload['embeds'] = []\n        else:\n            payload['embeds'] = [embed.to_dict()]\n\n    if content is not MISSING:\n        if content is not None:\n            payload['content'] = str(content)\n        else:\n            payload['content'] = None\n\n    if view is not MISSING:\n        if view is not None:\n            payload['components'] = view.to_components()\n        else:\n            payload['components'] = []\n\n    if nonce is not None:\n        payload['nonce'] = str(nonce)\n\n    if message_reference is not MISSING:\n        payload['message_reference'] = message_reference\n\n    if stickers is not MISSING:\n        if stickers is not None:\n            payload['sticker_ids'] = stickers\n        else:\n            payload['sticker_ids'] = []\n\n    payload['tts'] = tts\n    if avatar_url:\n        payload['avatar_url'] = str(avatar_url)\n    if username:\n        payload['username'] = username\n\n    if flags is not MISSING:\n        payload['flags'] = flags.value\n\n    if thread_name is not MISSING:\n        payload['thread_name'] = thread_name\n\n    if allowed_mentions:\n        if previous_allowed_mentions is not None:\n            payload['allowed_mentions'] = previous_allowed_mentions.merge(allowed_mentions).to_dict()\n        else:\n            payload['allowed_mentions'] = allowed_mentions.to_dict()\n    elif previous_allowed_mentions is not None:\n        payload['allowed_mentions'] = previous_allowed_mentions.to_dict()\n\n    if mention_author is not None:\n        if 'allowed_mentions' not in payload:\n            payload['allowed_mentions'] = AllowedMentions().to_dict()\n        payload['allowed_mentions']['replied_user'] = mention_author\n\n    if attachments is MISSING:\n        attachments = files\n    else:\n        files = [a for a in attachments if isinstance(a, File)]\n\n    if attachments is not MISSING:\n        file_index = 0\n        attachments_payload = []\n        for attachment in attachments:\n            if isinstance(attachment, File):\n                attachments_payload.append(attachment.to_dict(file_index))\n                file_index += 1\n            else:\n                attachments_payload.append(attachment.to_dict())\n\n        payload['attachments'] = attachments_payload\n\n    if applied_tags is not MISSING:\n        if applied_tags is not None:\n            payload['applied_tags'] = applied_tags\n        else:\n            payload['applied_tags'] = []\n\n    if channel_payload is not MISSING:\n        payload = {\n            'message': payload,\n        }\n        payload.update(channel_payload)\n\n    if poll not in (MISSING, None):\n        payload['poll'] = poll._to_dict()  # type: ignore\n\n    multipart = []\n    if files:\n        multipart.append({'name': 'payload_json', 'value': utils._to_json(payload)})\n        payload = None\n        for index, file in enumerate(files):\n            multipart.append(\n                {\n                    'name': f'files[{index}]',\n                    'value': file.fp,\n                    'filename': file.filename,\n                    'content_type': 'application/octet-stream',\n                }\n            )\n\n    return MultipartParameters(payload=payload, multipart=multipart, files=files)\n\n\nINTERNAL_API_VERSION: int = 10\n\n\ndef _set_api_version(value: int):\n    global INTERNAL_API_VERSION\n\n    if not isinstance(value, int):\n        raise TypeError(f'expected int not {value.__class__.__name__}')\n\n    if value not in (9, 10):\n        raise ValueError(f'expected either 9 or 10 not {value}')\n\n    INTERNAL_API_VERSION = value\n    Route.BASE = f'https://discord.com/api/v{value}'\n\n\nclass Route:\n    BASE: ClassVar[str] = 'https://discord.com/api/v10'\n\n    def __init__(self, method: str, path: str, *, metadata: Optional[str] = None, **parameters: Any) -> None:\n        self.path: str = path\n        self.method: str = method\n        # Metadata is a special string used to differentiate between known sub rate limits\n        # Since these can't be handled generically, this is the next best way to do so.\n        self.metadata: Optional[str] = metadata\n        url = self.BASE + self.path\n        if parameters:\n            url = url.format_map({k: _uriquote(v) if isinstance(v, str) else v for k, v in parameters.items()})\n        self.url: str = url\n\n        # major parameters:\n        self.channel_id: Optional[Snowflake] = parameters.get('channel_id')\n        self.guild_id: Optional[Snowflake] = parameters.get('guild_id')\n        self.webhook_id: Optional[Snowflake] = parameters.get('webhook_id')\n        self.webhook_token: Optional[str] = parameters.get('webhook_token')\n\n    @property\n    def key(self) -> str:\n        \"\"\"The bucket key is used to represent the route in various mappings.\"\"\"\n        if self.metadata:\n            return f'{self.method} {self.path}:{self.metadata}'\n        return f'{self.method} {self.path}'\n\n    @property\n    def major_parameters(self) -> str:\n        \"\"\"Returns the major parameters formatted a string.\n\n        This needs to be appended to a bucket hash to constitute as a full rate limit key.\n        \"\"\"\n        return '+'.join(\n            str(k) for k in (self.channel_id, self.guild_id, self.webhook_id, self.webhook_token) if k is not None\n        )\n\n\nclass Ratelimit:\n    \"\"\"Represents a Discord rate limit.\n\n    This is similar to a semaphore except tailored to Discord's rate limits. This is aware of\n    the expiry of a token window, along with the number of tokens available. The goal of this\n    design is to increase throughput of requests being sent concurrently rather than forcing\n    everything into a single lock queue per route.\n    \"\"\"\n\n    __slots__ = (\n        'limit',\n        'remaining',\n        'outgoing',\n        'reset_after',\n        'expires',\n        'dirty',\n        '_last_request',\n        '_max_ratelimit_timeout',\n        '_loop',\n        '_pending_requests',\n        '_sleeping',\n    )\n\n    def __init__(self, max_ratelimit_timeout: Optional[float]) -> None:\n        self.limit: int = 1\n        self.remaining: int = self.limit\n        self.outgoing: int = 0\n        self.reset_after: float = 0.0\n        self.expires: Optional[float] = None\n        self.dirty: bool = False\n        self._max_ratelimit_timeout: Optional[float] = max_ratelimit_timeout\n        self._loop: asyncio.AbstractEventLoop = asyncio.get_running_loop()\n        self._pending_requests: deque[asyncio.Future[Any]] = deque()\n        # Only a single rate limit object should be sleeping at a time.\n        # The object that is sleeping is ultimately responsible for freeing the semaphore\n        # for the requests currently pending.\n        self._sleeping: asyncio.Lock = asyncio.Lock()\n        self._last_request: float = self._loop.time()\n\n    def __repr__(self) -> str:\n        return (\n            f'<RateLimitBucket limit={self.limit} remaining={self.remaining} pending_requests={len(self._pending_requests)}>'\n        )\n\n    def reset(self):\n        self.remaining = self.limit - self.outgoing\n        self.expires = None\n        self.reset_after = 0.0\n        self.dirty = False\n\n    def update(self, response: aiohttp.ClientResponse, *, use_clock: bool = False) -> None:\n        headers = response.headers\n        self.limit = int(headers.get('X-Ratelimit-Limit', 1))\n\n        if self.dirty:\n            self.remaining = min(int(headers.get('X-Ratelimit-Remaining', 0)), self.limit - self.outgoing)\n        else:\n            self.remaining = int(headers.get('X-Ratelimit-Remaining', 0))\n            self.dirty = True\n\n        reset_after = headers.get('X-Ratelimit-Reset-After')\n        if use_clock or not reset_after:\n            utc = datetime.timezone.utc\n            now = datetime.datetime.now(utc)\n            reset = datetime.datetime.fromtimestamp(float(headers['X-Ratelimit-Reset']), utc)\n            self.reset_after = (reset - now).total_seconds()\n        else:\n            self.reset_after = float(reset_after)\n\n        self.expires = self._loop.time() + self.reset_after\n\n    def _wake_next(self) -> None:\n        while self._pending_requests:\n            future = self._pending_requests.popleft()\n            if not future.done():\n                future.set_result(None)\n                break\n\n    def _wake(self, count: int = 1, *, exception: Optional[RateLimited] = None) -> None:\n        awaken = 0\n        while self._pending_requests:\n            future = self._pending_requests.popleft()\n            if not future.done():\n                if exception:\n                    future.set_exception(exception)\n                else:\n                    future.set_result(None)\n                awaken += 1\n\n            if awaken >= count:\n                break\n\n    async def _refresh(self) -> None:\n        error = self._max_ratelimit_timeout and self.reset_after > self._max_ratelimit_timeout\n        exception = RateLimited(self.reset_after) if error else None\n        async with self._sleeping:\n            if not error:\n                await asyncio.sleep(self.reset_after)\n\n        self.reset()\n        self._wake(self.remaining, exception=exception)\n\n    def is_expired(self) -> bool:\n        return self.expires is not None and self._loop.time() > self.expires\n\n    def is_inactive(self) -> bool:\n        delta = self._loop.time() - self._last_request\n        return delta >= 300 and self.outgoing == 0 and len(self._pending_requests) == 0\n\n    async def acquire(self) -> None:\n        self._last_request = self._loop.time()\n        if self.is_expired():\n            self.reset()\n\n        if self._max_ratelimit_timeout is not None and self.expires is not None:\n            # Check if we can pre-emptively block this request for having too large of a timeout\n            current_reset_after = self.expires - self._loop.time()\n            if current_reset_after > self._max_ratelimit_timeout:\n                raise RateLimited(current_reset_after)\n\n        while self.remaining <= 0:\n            future = self._loop.create_future()\n            self._pending_requests.append(future)\n            try:\n                await future\n            except:\n                future.cancel()\n                if self.remaining > 0 and not future.cancelled():\n                    self._wake_next()\n                raise\n\n        self.remaining -= 1\n        self.outgoing += 1\n\n    async def __aenter__(self) -> Self:\n        await self.acquire()\n        return self\n\n    async def __aexit__(self, type: Type[BE], value: BE, traceback: TracebackType) -> None:\n        self.outgoing -= 1\n        tokens = self.remaining - self.outgoing\n        # Check whether the rate limit needs to be pre-emptively slept on\n        # Note that this is a Lock to prevent multiple rate limit objects from sleeping at once\n        if not self._sleeping.locked():\n            if tokens <= 0:\n                await self._refresh()\n            elif self._pending_requests:\n                exception = (\n                    RateLimited(self.reset_after)\n                    if self._max_ratelimit_timeout and self.reset_after > self._max_ratelimit_timeout\n                    else None\n                )\n                self._wake(tokens, exception=exception)\n\n\n# For some reason, the Discord voice websocket expects this header to be\n# completely lowercase while aiohttp respects spec and does it as case-insensitive\naiohttp.hdrs.WEBSOCKET = 'websocket'  # type: ignore\n\n\nclass HTTPClient:\n    \"\"\"Represents an HTTP client sending HTTP requests to the Discord API.\"\"\"\n\n    def __init__(\n        self,\n        loop: asyncio.AbstractEventLoop,\n        connector: Optional[aiohttp.BaseConnector] = None,\n        *,\n        proxy: Optional[str] = None,\n        proxy_auth: Optional[aiohttp.BasicAuth] = None,\n        unsync_clock: bool = True,\n        http_trace: Optional[aiohttp.TraceConfig] = None,\n        max_ratelimit_timeout: Optional[float] = None,\n    ) -> None:\n        self.loop: asyncio.AbstractEventLoop = loop\n        self.connector: aiohttp.BaseConnector = connector or MISSING\n        self.__session: aiohttp.ClientSession = MISSING  # filled in static_login\n        # Route key -> Bucket hash\n        self._bucket_hashes: Dict[str, str] = {}\n        # Bucket Hash + Major Parameters -> Rate limit\n        # or\n        # Route key + Major Parameters -> Rate limit\n        # When the key is the latter, it is used for temporary\n        # one shot requests that don't have a bucket hash\n        # When this reaches 256 elements, it will try to evict based off of expiry\n        self._buckets: Dict[str, Ratelimit] = {}\n        self._global_over: asyncio.Event = MISSING\n        self.token: Optional[str] = None\n        self.proxy: Optional[str] = proxy\n        self.proxy_auth: Optional[aiohttp.BasicAuth] = proxy_auth\n        self.http_trace: Optional[aiohttp.TraceConfig] = http_trace\n        self.use_clock: bool = not unsync_clock\n        self.max_ratelimit_timeout: Optional[float] = max(30.0, max_ratelimit_timeout) if max_ratelimit_timeout else None\n\n        user_agent = 'DiscordBot (https://github.com/Rapptz/discord.py {0}) Python/{1[0]}.{1[1]} aiohttp/{2}'\n        self.user_agent: str = user_agent.format(__version__, sys.version_info, aiohttp.__version__)\n\n    def clear(self) -> None:\n        if self.__session and self.__session.closed:\n            self.__session = MISSING\n\n    async def ws_connect(self, url: str, *, compress: int = 0) -> aiohttp.ClientWebSocketResponse:\n        kwargs = {\n            'proxy_auth': self.proxy_auth,\n            'proxy': self.proxy,\n            'max_msg_size': 0,\n            'timeout': 30.0,\n            'autoclose': False,\n            'headers': {\n                'User-Agent': self.user_agent,\n            },\n            'compress': compress,\n        }\n\n        return await self.__session.ws_connect(url, **kwargs)\n\n    def _try_clear_expired_ratelimits(self) -> None:\n        if len(self._buckets) < 256:\n            return\n\n        keys = [key for key, bucket in self._buckets.items() if bucket.is_inactive()]\n        for key in keys:\n            del self._buckets[key]\n\n    def get_ratelimit(self, key: str) -> Ratelimit:\n        try:\n            value = self._buckets[key]\n        except KeyError:\n            self._buckets[key] = value = Ratelimit(self.max_ratelimit_timeout)\n            self._try_clear_expired_ratelimits()\n        return value\n\n    async def request(\n        self,\n        route: Route,\n        *,\n        files: Optional[Sequence[File]] = None,\n        form: Optional[Iterable[Dict[str, Any]]] = None,\n        **kwargs: Any,\n    ) -> Any:\n        method = route.method\n        url = route.url\n        route_key = route.key\n\n        bucket_hash = None\n        try:\n            bucket_hash = self._bucket_hashes[route_key]\n        except KeyError:\n            key = f'{route_key}:{route.major_parameters}'\n        else:\n            key = f'{bucket_hash}:{route.major_parameters}'\n\n        ratelimit = self.get_ratelimit(key)\n\n        # header creation\n        headers: Dict[str, str] = {\n            'User-Agent': self.user_agent,\n        }\n\n        if self.token is not None:\n            headers['Authorization'] = 'Bot ' + self.token\n        # some checking if it's a JSON request\n        if 'json' in kwargs:\n            headers['Content-Type'] = 'application/json'\n            kwargs['data'] = utils._to_json(kwargs.pop('json'))\n\n        try:\n            reason = kwargs.pop('reason')\n        except KeyError:\n            pass\n        else:\n            if reason:\n                headers['X-Audit-Log-Reason'] = _uriquote(reason, safe='/ ')\n\n        kwargs['headers'] = headers\n\n        # Proxy support\n        if self.proxy is not None:\n            kwargs['proxy'] = self.proxy\n        if self.proxy_auth is not None:\n            kwargs['proxy_auth'] = self.proxy_auth\n\n        if not self._global_over.is_set():\n            # wait until the global lock is complete\n            await self._global_over.wait()\n\n        response: Optional[aiohttp.ClientResponse] = None\n        data: Optional[Union[Dict[str, Any], str]] = None\n        async with ratelimit:\n            for tries in range(5):\n                if files:\n                    for f in files:\n                        f.reset(seek=tries)\n\n                if form:\n                    # with quote_fields=True '[' and ']' in file field names are escaped, which discord does not support\n                    form_data = aiohttp.FormData(quote_fields=False)\n                    for params in form:\n                        form_data.add_field(**params)\n                    kwargs['data'] = form_data\n\n                try:\n                    async with self.__session.request(method, url, **kwargs) as response:\n                        _log.debug('%s %s with %s has returned %s', method, url, kwargs.get('data'), response.status)\n\n                        # even errors have text involved in them so this is safe to call\n                        data = await json_or_text(response)\n\n                        # Update and use rate limit information if the bucket header is present\n                        discord_hash = response.headers.get('X-Ratelimit-Bucket')\n                        # I am unsure if X-Ratelimit-Bucket is always available\n                        # However, X-Ratelimit-Remaining has been a consistent cornerstone that worked\n                        has_ratelimit_headers = 'X-Ratelimit-Remaining' in response.headers\n                        if discord_hash is not None:\n                            # If the hash Discord has provided is somehow different from our current hash something changed\n                            if bucket_hash != discord_hash:\n                                if bucket_hash is not None:\n                                    # If the previous hash was an actual Discord hash then this means the\n                                    # hash has changed sporadically.\n                                    # This can be due to two reasons\n                                    # 1. It's a sub-ratelimit which is hard to handle\n                                    # 2. The rate limit information genuinely changed\n                                    # There is no good way to discern these, Discord doesn't provide a way to do so.\n                                    # At best, there will be some form of logging to help catch it.\n                                    # Alternating sub-ratelimits means that the requests oscillate between\n                                    # different underlying rate limits -- this can lead to unexpected 429s\n                                    # It is unavoidable.\n                                    fmt = 'A route (%s) has changed hashes: %s -> %s.'\n                                    _log.debug(fmt, route_key, bucket_hash, discord_hash)\n\n                                    self._bucket_hashes[route_key] = discord_hash\n                                    recalculated_key = discord_hash + route.major_parameters\n                                    self._buckets[recalculated_key] = ratelimit\n                                    self._buckets.pop(key, None)\n                                elif route_key not in self._bucket_hashes:\n                                    fmt = '%s has found its initial rate limit bucket hash (%s).'\n                                    _log.debug(fmt, route_key, discord_hash)\n                                    self._bucket_hashes[route_key] = discord_hash\n                                    self._buckets[discord_hash + route.major_parameters] = ratelimit\n\n                        if has_ratelimit_headers:\n                            if response.status != 429:\n                                ratelimit.update(response, use_clock=self.use_clock)\n                                if ratelimit.remaining == 0:\n                                    _log.debug(\n                                        'A rate limit bucket (%s) has been exhausted. Pre-emptively rate limiting...',\n                                        discord_hash or route_key,\n                                    )\n\n                        # the request was successful so just return the text/json\n                        if 300 > response.status >= 200:\n                            _log.debug('%s %s has received %s', method, url, data)\n                            return data\n\n                        # we are being rate limited\n                        if response.status == 429:\n                            if not response.headers.get('Via') or isinstance(data, str):\n                                # Banned by Cloudflare more than likely.\n                                raise HTTPException(response, data)\n\n                            if ratelimit.remaining > 0:\n                                # According to night\n                                # https://github.com/discord/discord-api-docs/issues/2190#issuecomment-816363129\n                                # Remaining > 0 and 429 means that a sub ratelimit was hit.\n                                # It is unclear what should happen in these cases other than just using the retry_after\n                                # value in the body.\n                                _log.debug(\n                                    '%s %s received a 429 despite having %s remaining requests. This is a sub-ratelimit.',\n                                    method,\n                                    url,\n                                    ratelimit.remaining,\n                                )\n\n                            retry_after: float = data['retry_after']\n                            if self.max_ratelimit_timeout and retry_after > self.max_ratelimit_timeout:\n                                _log.warning(\n                                    'We are being rate limited. %s %s responded with 429. Timeout of %.2f was too long, erroring instead.',\n                                    method,\n                                    url,\n                                    retry_after,\n                                )\n                                raise RateLimited(retry_after)\n\n                            fmt = 'We are being rate limited. %s %s responded with 429. Retrying in %.2f seconds.'\n                            _log.warning(fmt, method, url, retry_after)\n\n                            _log.debug(\n                                'Rate limit is being handled by bucket hash %s with %r major parameters',\n                                bucket_hash,\n                                route.major_parameters,\n                            )\n\n                            # check if it's a global rate limit\n                            is_global = data.get('global', False)\n                            if is_global:\n                                _log.warning('Global rate limit has been hit. Retrying in %.2f seconds.', retry_after)\n                                self._global_over.clear()\n\n                            await asyncio.sleep(retry_after)\n                            _log.debug('Done sleeping for the rate limit. Retrying...')\n\n                            # release the global lock now that the\n                            # global rate limit has passed\n                            if is_global:\n                                self._global_over.set()\n                                _log.debug('Global rate limit is now over.')\n\n                            continue\n\n                        # we've received a 500, 502, 504, or 524, unconditional retry\n                        if response.status in {500, 502, 504, 524}:\n                            await asyncio.sleep(1 + tries * 2)\n                            continue\n\n                        # the usual error cases\n                        if response.status == 403:\n                            raise Forbidden(response, data)\n                        elif response.status == 404:\n                            raise NotFound(response, data)\n                        elif response.status >= 500:\n                            raise DiscordServerError(response, data)\n                        else:\n                            raise HTTPException(response, data)\n\n                # This is handling exceptions from the request\n                except OSError as e:\n                    # Connection reset by peer\n                    if tries < 4 and e.errno in (54, 10054):\n                        await asyncio.sleep(1 + tries * 2)\n                        continue\n                    raise\n\n            if response is not None:\n                # We've run out of retries, raise.\n                if response.status >= 500:\n                    raise DiscordServerError(response, data)\n\n                raise HTTPException(response, data)\n\n            raise RuntimeError('Unreachable code in HTTP handling')\n\n    async def get_from_cdn(self, url: str) -> bytes:\n        async with self.__session.get(url) as resp:\n            if resp.status == 200:\n                return await resp.read()\n            elif resp.status == 404:\n                raise NotFound(resp, 'asset not found')\n            elif resp.status == 403:\n                raise Forbidden(resp, 'cannot retrieve asset')\n            else:\n                raise HTTPException(resp, 'failed to get asset')\n\n        raise RuntimeError('Unreachable')\n\n    # state management\n\n    async def close(self) -> None:\n        if self.__session:\n            await self.__session.close()\n\n    # login management\n\n    async def static_login(self, token: str) -> user.User:\n        # Necessary to get aiohttp to stop complaining about session creation\n        if self.connector is MISSING:\n            # discord does not support ipv6\n            self.connector = aiohttp.TCPConnector(limit=0, family=socket.AF_INET)\n\n        self.__session = aiohttp.ClientSession(\n            connector=self.connector,\n            ws_response_class=DiscordClientWebSocketResponse,\n            trace_configs=None if self.http_trace is None else [self.http_trace],\n        )\n        self._global_over = asyncio.Event()\n        self._global_over.set()\n\n        old_token = self.token\n        self.token = token\n\n        try:\n            data = await self.request(Route('GET', '/users/@me'))\n        except HTTPException as exc:\n            self.token = old_token\n            if exc.status == 401:\n                raise LoginFailure('Improper token has been passed.') from exc\n            raise\n\n        return data\n\n    def logout(self) -> Response[None]:\n        return self.request(Route('POST', '/auth/logout'))\n\n    # Group functionality\n\n    def start_group(self, user_id: Snowflake, recipients: List[int]) -> Response[channel.GroupDMChannel]:\n        payload = {\n            'recipients': recipients,\n        }\n\n        return self.request(Route('POST', '/users/{user_id}/channels', user_id=user_id), json=payload)\n\n    def leave_group(self, channel_id: Snowflake) -> Response[None]:\n        return self.request(Route('DELETE', '/channels/{channel_id}', channel_id=channel_id))\n\n    # Message management\n\n    def start_private_message(self, user_id: Snowflake) -> Response[channel.DMChannel]:\n        payload = {\n            'recipient_id': user_id,\n        }\n\n        return self.request(Route('POST', '/users/@me/channels'), json=payload)\n\n    def send_message(\n        self,\n        channel_id: Snowflake,\n        *,\n        params: MultipartParameters,\n    ) -> Response[message.Message]:\n        r = Route('POST', '/channels/{channel_id}/messages', channel_id=channel_id)\n        if params.files:\n            return self.request(r, files=params.files, form=params.multipart)\n        else:\n            return self.request(r, json=params.payload)\n\n    def send_typing(self, channel_id: Snowflake) -> Response[None]:\n        return self.request(Route('POST', '/channels/{channel_id}/typing', channel_id=channel_id))\n\n    def delete_message(\n        self, channel_id: Snowflake, message_id: Snowflake, *, reason: Optional[str] = None\n    ) -> Response[None]:\n        # Special case certain sub-rate limits\n        # https://github.com/discord/discord-api-docs/issues/1092\n        # https://github.com/discord/discord-api-docs/issues/1295\n        difference = utils.utcnow() - utils.snowflake_time(int(message_id))\n        metadata: Optional[str] = None\n        if difference <= datetime.timedelta(seconds=10):\n            metadata = 'sub-10-seconds'\n        elif difference >= datetime.timedelta(days=14):\n            metadata = 'older-than-two-weeks'\n        r = Route(\n            'DELETE',\n            '/channels/{channel_id}/messages/{message_id}',\n            channel_id=channel_id,\n            message_id=message_id,\n            metadata=metadata,\n        )\n        return self.request(r, reason=reason)\n\n    def delete_messages(\n        self, channel_id: Snowflake, message_ids: SnowflakeList, *, reason: Optional[str] = None\n    ) -> Response[None]:\n        r = Route('POST', '/channels/{channel_id}/messages/bulk-delete', channel_id=channel_id)\n        payload = {\n            'messages': message_ids,\n        }\n\n        return self.request(r, json=payload, reason=reason)\n\n    def edit_message(\n        self, channel_id: Snowflake, message_id: Snowflake, *, params: MultipartParameters\n    ) -> Response[message.Message]:\n        r = Route('PATCH', '/channels/{channel_id}/messages/{message_id}', channel_id=channel_id, message_id=message_id)\n        if params.files:\n            return self.request(r, files=params.files, form=params.multipart)\n        else:\n            return self.request(r, json=params.payload)\n\n    def add_reaction(self, channel_id: Snowflake, message_id: Snowflake, emoji: str) -> Response[None]:\n        r = Route(\n            'PUT',\n            '/channels/{channel_id}/messages/{message_id}/reactions/{emoji}/@me',\n            channel_id=channel_id,\n            message_id=message_id,\n            emoji=emoji,\n        )\n        return self.request(r)\n\n    def remove_reaction(\n        self, channel_id: Snowflake, message_id: Snowflake, emoji: str, member_id: Snowflake\n    ) -> Response[None]:\n        r = Route(\n            'DELETE',\n            '/channels/{channel_id}/messages/{message_id}/reactions/{emoji}/{member_id}',\n            channel_id=channel_id,\n            message_id=message_id,\n            member_id=member_id,\n            emoji=emoji,\n        )\n        return self.request(r)\n\n    def remove_own_reaction(self, channel_id: Snowflake, message_id: Snowflake, emoji: str) -> Response[None]:\n        r = Route(\n            'DELETE',\n            '/channels/{channel_id}/messages/{message_id}/reactions/{emoji}/@me',\n            channel_id=channel_id,\n            message_id=message_id,\n            emoji=emoji,\n        )\n        return self.request(r)\n\n    def get_reaction_users(\n        self,\n        channel_id: Snowflake,\n        message_id: Snowflake,\n        emoji: str,\n        limit: int,\n        after: Optional[Snowflake] = None,\n        type: Optional[message.ReactionType] = None,\n    ) -> Response[List[user.User]]:\n        r = Route(\n            'GET',\n            '/channels/{channel_id}/messages/{message_id}/reactions/{emoji}',\n            channel_id=channel_id,\n            message_id=message_id,\n            emoji=emoji,\n        )\n\n        params: Dict[str, Any] = {\n            'limit': limit,\n        }\n        if after:\n            params['after'] = after\n\n        if type is not None:\n            params['type'] = type\n\n        return self.request(r, params=params)\n\n    def clear_reactions(self, channel_id: Snowflake, message_id: Snowflake) -> Response[None]:\n        r = Route(\n            'DELETE',\n            '/channels/{channel_id}/messages/{message_id}/reactions',\n            channel_id=channel_id,\n            message_id=message_id,\n        )\n\n        return self.request(r)\n\n    def clear_single_reaction(self, channel_id: Snowflake, message_id: Snowflake, emoji: str) -> Response[None]:\n        r = Route(\n            'DELETE',\n            '/channels/{channel_id}/messages/{message_id}/reactions/{emoji}',\n            channel_id=channel_id,\n            message_id=message_id,\n            emoji=emoji,\n        )\n        return self.request(r)\n\n    def get_message(self, channel_id: Snowflake, message_id: Snowflake) -> Response[message.Message]:\n        r = Route('GET', '/channels/{channel_id}/messages/{message_id}', channel_id=channel_id, message_id=message_id)\n        return self.request(r)\n\n    def get_channel(self, channel_id: Snowflake) -> Response[channel.Channel]:\n        r = Route('GET', '/channels/{channel_id}', channel_id=channel_id)\n        return self.request(r)\n\n    def logs_from(\n        self,\n        channel_id: Snowflake,\n        limit: int,\n        before: Optional[Snowflake] = None,\n        after: Optional[Snowflake] = None,\n        around: Optional[Snowflake] = None,\n    ) -> Response[List[message.Message]]:\n        params: Dict[str, Any] = {\n            'limit': limit,\n        }\n\n        if before is not None:\n            params['before'] = before\n        if after is not None:\n            params['after'] = after\n        if around is not None:\n            params['around'] = around\n\n        return self.request(Route('GET', '/channels/{channel_id}/messages', channel_id=channel_id), params=params)\n\n    def publish_message(self, channel_id: Snowflake, message_id: Snowflake) -> Response[message.Message]:\n        return self.request(\n            Route(\n                'POST',\n                '/channels/{channel_id}/messages/{message_id}/crosspost',\n                channel_id=channel_id,\n                message_id=message_id,\n            )\n        )\n\n    def pin_message(self, channel_id: Snowflake, message_id: Snowflake, reason: Optional[str] = None) -> Response[None]:\n        r = Route(\n            'PUT',\n            '/channels/{channel_id}/pins/{message_id}',\n            channel_id=channel_id,\n            message_id=message_id,\n        )\n        return self.request(r, reason=reason)\n\n    def unpin_message(self, channel_id: Snowflake, message_id: Snowflake, reason: Optional[str] = None) -> Response[None]:\n        r = Route(\n            'DELETE',\n            '/channels/{channel_id}/pins/{message_id}',\n            channel_id=channel_id,\n            message_id=message_id,\n        )\n        return self.request(r, reason=reason)\n\n    def pins_from(self, channel_id: Snowflake) -> Response[List[message.Message]]:\n        return self.request(Route('GET', '/channels/{channel_id}/pins', channel_id=channel_id))\n\n    # Member management\n\n    def kick(self, user_id: Snowflake, guild_id: Snowflake, reason: Optional[str] = None) -> Response[None]:\n        r = Route('DELETE', '/guilds/{guild_id}/members/{user_id}', guild_id=guild_id, user_id=user_id)\n        return self.request(r, reason=reason)\n\n    def ban(\n        self,\n        user_id: Snowflake,\n        guild_id: Snowflake,\n        delete_message_seconds: int = 86400,  # one day\n        reason: Optional[str] = None,\n    ) -> Response[None]:\n        r = Route('PUT', '/guilds/{guild_id}/bans/{user_id}', guild_id=guild_id, user_id=user_id)\n        params = {\n            'delete_message_seconds': delete_message_seconds,\n        }\n\n        return self.request(r, params=params, reason=reason)\n\n    def unban(self, user_id: Snowflake, guild_id: Snowflake, *, reason: Optional[str] = None) -> Response[None]:\n        r = Route('DELETE', '/guilds/{guild_id}/bans/{user_id}', guild_id=guild_id, user_id=user_id)\n        return self.request(r, reason=reason)\n\n    def bulk_ban(\n        self,\n        guild_id: Snowflake,\n        user_ids: List[Snowflake],\n        delete_message_seconds: int = 86400,\n        reason: Optional[str] = None,\n    ) -> Response[guild.BulkBanUserResponse]:\n        r = Route('POST', '/guilds/{guild_id}/bulk-ban', guild_id=guild_id)\n        payload = {\n            'user_ids': user_ids,\n            'delete_message_seconds': delete_message_seconds,\n        }\n        return self.request(r, json=payload, reason=reason)\n\n    def guild_voice_state(\n        self,\n        user_id: Snowflake,\n        guild_id: Snowflake,\n        *,\n        mute: Optional[bool] = None,\n        deafen: Optional[bool] = None,\n        reason: Optional[str] = None,\n    ) -> Response[member.Member]:\n        r = Route('PATCH', '/guilds/{guild_id}/members/{user_id}', guild_id=guild_id, user_id=user_id)\n        payload = {}\n        if mute is not None:\n            payload['mute'] = mute\n\n        if deafen is not None:\n            payload['deaf'] = deafen\n\n        return self.request(r, json=payload, reason=reason)\n\n    def edit_profile(self, payload: Dict[str, Any]) -> Response[user.User]:\n        return self.request(Route('PATCH', '/users/@me'), json=payload)\n\n    def change_my_nickname(\n        self,\n        guild_id: Snowflake,\n        nickname: str,\n        *,\n        reason: Optional[str] = None,\n    ) -> Response[member.Nickname]:\n        r = Route('PATCH', '/guilds/{guild_id}/members/@me/nick', guild_id=guild_id)\n        payload = {\n            'nick': nickname,\n        }\n        return self.request(r, json=payload, reason=reason)\n\n    def change_nickname(\n        self,\n        guild_id: Snowflake,\n        user_id: Snowflake,\n        nickname: str,\n        *,\n        reason: Optional[str] = None,\n    ) -> Response[member.Member]:\n        r = Route('PATCH', '/guilds/{guild_id}/members/{user_id}', guild_id=guild_id, user_id=user_id)\n        payload = {\n            'nick': nickname,\n        }\n        return self.request(r, json=payload, reason=reason)\n\n    def edit_my_voice_state(self, guild_id: Snowflake, payload: Dict[str, Any]) -> Response[None]:\n        r = Route('PATCH', '/guilds/{guild_id}/voice-states/@me', guild_id=guild_id)\n        return self.request(r, json=payload)\n\n    def edit_voice_state(self, guild_id: Snowflake, user_id: Snowflake, payload: Dict[str, Any]) -> Response[None]:\n        r = Route('PATCH', '/guilds/{guild_id}/voice-states/{user_id}', guild_id=guild_id, user_id=user_id)\n        return self.request(r, json=payload)\n\n    def edit_member(\n        self,\n        guild_id: Snowflake,\n        user_id: Snowflake,\n        *,\n        reason: Optional[str] = None,\n        **fields: Any,\n    ) -> Response[member.MemberWithUser]:\n        r = Route('PATCH', '/guilds/{guild_id}/members/{user_id}', guild_id=guild_id, user_id=user_id)\n        return self.request(r, json=fields, reason=reason)\n\n    # Channel management\n\n    def edit_channel(\n        self,\n        channel_id: Snowflake,\n        *,\n        reason: Optional[str] = None,\n        **options: Any,\n    ) -> Response[channel.Channel]:\n        r = Route('PATCH', '/channels/{channel_id}', channel_id=channel_id)\n        valid_keys = (\n            'name',\n            'parent_id',\n            'topic',\n            'bitrate',\n            'nsfw',\n            'user_limit',\n            'position',\n            'permission_overwrites',\n            'rate_limit_per_user',\n            'type',\n            'rtc_region',\n            'video_quality_mode',\n            'archived',\n            'auto_archive_duration',\n            'locked',\n            'invitable',\n            'default_auto_archive_duration',\n            'flags',\n            'default_thread_rate_limit_per_user',\n            'default_reaction_emoji',\n            'available_tags',\n            'applied_tags',\n            'default_forum_layout',\n            'default_sort_order',\n        )\n\n        payload = {k: v for k, v in options.items() if k in valid_keys}\n        return self.request(r, reason=reason, json=payload)\n\n    def edit_voice_channel_status(\n        self, status: Optional[str], *, channel_id: int, reason: Optional[str] = None\n    ) -> Response[None]:\n        r = Route('PUT', '/channels/{channel_id}/voice-status', channel_id=channel_id)\n        payload = {'status': status}\n        return self.request(r, reason=reason, json=payload)\n\n    def bulk_channel_update(\n        self,\n        guild_id: Snowflake,\n        data: List[guild.ChannelPositionUpdate],\n        *,\n        reason: Optional[str] = None,\n    ) -> Response[None]:\n        r = Route('PATCH', '/guilds/{guild_id}/channels', guild_id=guild_id)\n        return self.request(r, json=data, reason=reason)\n\n    def create_channel(\n        self,\n        guild_id: Snowflake,\n        channel_type: channel.ChannelType,\n        *,\n        reason: Optional[str] = None,\n        **options: Any,\n    ) -> Response[channel.GuildChannel]:\n        payload = {\n            'type': channel_type,\n        }\n\n        valid_keys = (\n            'name',\n            'parent_id',\n            'topic',\n            'bitrate',\n            'nsfw',\n            'user_limit',\n            'position',\n            'permission_overwrites',\n            'rate_limit_per_user',\n            'rtc_region',\n            'video_quality_mode',\n            'default_auto_archive_duration',\n            'default_thread_rate_limit_per_user',\n            'default_sort_order',\n            'default_reaction_emoji',\n            'default_forum_layout',\n            'available_tags',\n        )\n        payload.update({k: v for k, v in options.items() if k in valid_keys and v is not None})\n\n        return self.request(Route('POST', '/guilds/{guild_id}/channels', guild_id=guild_id), json=payload, reason=reason)\n\n    def delete_channel(\n        self,\n        channel_id: Snowflake,\n        *,\n        reason: Optional[str] = None,\n    ) -> Response[None]:\n        return self.request(Route('DELETE', '/channels/{channel_id}', channel_id=channel_id), reason=reason)\n\n    # Thread management\n\n    def start_thread_with_message(\n        self,\n        channel_id: Snowflake,\n        message_id: Snowflake,\n        *,\n        name: str,\n        auto_archive_duration: threads.ThreadArchiveDuration,\n        rate_limit_per_user: Optional[int] = None,\n        reason: Optional[str] = None,\n    ) -> Response[threads.Thread]:\n        payload = {\n            'name': name,\n            'auto_archive_duration': auto_archive_duration,\n            'rate_limit_per_user': rate_limit_per_user,\n        }\n\n        route = Route(\n            'POST', '/channels/{channel_id}/messages/{message_id}/threads', channel_id=channel_id, message_id=message_id\n        )\n        return self.request(route, json=payload, reason=reason)\n\n    def start_thread_without_message(\n        self,\n        channel_id: Snowflake,\n        *,\n        name: str,\n        auto_archive_duration: threads.ThreadArchiveDuration,\n        type: threads.ThreadType,\n        invitable: bool = True,\n        rate_limit_per_user: Optional[int] = None,\n        reason: Optional[str] = None,\n    ) -> Response[threads.Thread]:\n        payload = {\n            'name': name,\n            'auto_archive_duration': auto_archive_duration,\n            'type': type,\n            'invitable': invitable,\n            'rate_limit_per_user': rate_limit_per_user,\n        }\n\n        route = Route('POST', '/channels/{channel_id}/threads', channel_id=channel_id)\n        return self.request(route, json=payload, reason=reason)\n\n    def start_thread_in_forum(\n        self,\n        channel_id: Snowflake,\n        *,\n        params: MultipartParameters,\n        reason: Optional[str] = None,\n    ) -> Response[threads.ForumThread]:\n        query = {'use_nested_fields': 1}\n        r = Route('POST', '/channels/{channel_id}/threads', channel_id=channel_id)\n        if params.files:\n            return self.request(r, files=params.files, form=params.multipart, params=query, reason=reason)\n        else:\n            return self.request(r, json=params.payload, params=query, reason=reason)\n\n    def join_thread(self, channel_id: Snowflake) -> Response[None]:\n        return self.request(Route('POST', '/channels/{channel_id}/thread-members/@me', channel_id=channel_id))\n\n    def add_user_to_thread(self, channel_id: Snowflake, user_id: Snowflake) -> Response[None]:\n        return self.request(\n            Route('PUT', '/channels/{channel_id}/thread-members/{user_id}', channel_id=channel_id, user_id=user_id)\n        )\n\n    def leave_thread(self, channel_id: Snowflake) -> Response[None]:\n        return self.request(Route('DELETE', '/channels/{channel_id}/thread-members/@me', channel_id=channel_id))\n\n    def remove_user_from_thread(self, channel_id: Snowflake, user_id: Snowflake) -> Response[None]:\n        route = Route('DELETE', '/channels/{channel_id}/thread-members/{user_id}', channel_id=channel_id, user_id=user_id)\n        return self.request(route)\n\n    def get_public_archived_threads(\n        self, channel_id: Snowflake, before: Optional[Snowflake] = None, limit: int = 50\n    ) -> Response[threads.ThreadPaginationPayload]:\n        route = Route('GET', '/channels/{channel_id}/threads/archived/public', channel_id=channel_id)\n\n        params = {}\n        if before:\n            params['before'] = before\n        params['limit'] = limit\n        return self.request(route, params=params)\n\n    def get_private_archived_threads(\n        self, channel_id: Snowflake, before: Optional[Snowflake] = None, limit: int = 50\n    ) -> Response[threads.ThreadPaginationPayload]:\n        route = Route('GET', '/channels/{channel_id}/threads/archived/private', channel_id=channel_id)\n\n        params = {}\n        if before:\n            params['before'] = before\n        params['limit'] = limit\n        return self.request(route, params=params)\n\n    def get_joined_private_archived_threads(\n        self, channel_id: Snowflake, before: Optional[Snowflake] = None, limit: int = 50\n    ) -> Response[threads.ThreadPaginationPayload]:\n        route = Route('GET', '/channels/{channel_id}/users/@me/threads/archived/private', channel_id=channel_id)\n        params = {}\n        if before:\n            params['before'] = before\n        params['limit'] = limit\n        return self.request(route, params=params)\n\n    def get_active_threads(self, guild_id: Snowflake) -> Response[threads.ThreadPaginationPayload]:\n        route = Route('GET', '/guilds/{guild_id}/threads/active', guild_id=guild_id)\n        return self.request(route)\n\n    def get_thread_member(self, channel_id: Snowflake, user_id: Snowflake) -> Response[threads.ThreadMember]:\n        route = Route('GET', '/channels/{channel_id}/thread-members/{user_id}', channel_id=channel_id, user_id=user_id)\n        return self.request(route)\n\n    def get_thread_members(self, channel_id: Snowflake) -> Response[List[threads.ThreadMember]]:\n        route = Route('GET', '/channels/{channel_id}/thread-members', channel_id=channel_id)\n        return self.request(route)\n\n    # Webhook management\n\n    def create_webhook(\n        self,\n        channel_id: Snowflake,\n        *,\n        name: str,\n        avatar: Optional[bytes] = None,\n        reason: Optional[str] = None,\n    ) -> Response[webhook.Webhook]:\n        payload: Dict[str, Any] = {\n            'name': name,\n        }\n        if avatar is not None:\n            payload['avatar'] = avatar\n\n        r = Route('POST', '/channels/{channel_id}/webhooks', channel_id=channel_id)\n        return self.request(r, json=payload, reason=reason)\n\n    def channel_webhooks(self, channel_id: Snowflake) -> Response[List[webhook.Webhook]]:\n        return self.request(Route('GET', '/channels/{channel_id}/webhooks', channel_id=channel_id))\n\n    def guild_webhooks(self, guild_id: Snowflake) -> Response[List[webhook.Webhook]]:\n        return self.request(Route('GET', '/guilds/{guild_id}/webhooks', guild_id=guild_id))\n\n    def get_webhook(self, webhook_id: Snowflake) -> Response[webhook.Webhook]:\n        return self.request(Route('GET', '/webhooks/{webhook_id}', webhook_id=webhook_id))\n\n    def follow_webhook(\n        self,\n        channel_id: Snowflake,\n        webhook_channel_id: Snowflake,\n        reason: Optional[str] = None,\n    ) -> Response[None]:\n        payload = {\n            'webhook_channel_id': str(webhook_channel_id),\n        }\n        return self.request(\n            Route('POST', '/channels/{channel_id}/followers', channel_id=channel_id), json=payload, reason=reason\n        )\n\n    # Guild management\n\n    def get_guilds(\n        self,\n        limit: int,\n        before: Optional[Snowflake] = None,\n        after: Optional[Snowflake] = None,\n        with_counts: bool = True,\n    ) -> Response[List[guild.Guild]]:\n        params: Dict[str, Any] = {\n            'limit': limit,\n            'with_counts': int(with_counts),\n        }\n\n        if before:\n            params['before'] = before\n        if after:\n            params['after'] = after\n\n        return self.request(Route('GET', '/users/@me/guilds'), params=params)\n\n    def leave_guild(self, guild_id: Snowflake) -> Response[None]:\n        return self.request(Route('DELETE', '/users/@me/guilds/{guild_id}', guild_id=guild_id))\n\n    def get_guild(self, guild_id: Snowflake, *, with_counts: bool = True) -> Response[guild.Guild]:\n        params = {'with_counts': int(with_counts)}\n        return self.request(Route('GET', '/guilds/{guild_id}', guild_id=guild_id), params=params)\n\n    def delete_guild(self, guild_id: Snowflake) -> Response[None]:\n        return self.request(Route('DELETE', '/guilds/{guild_id}', guild_id=guild_id))\n\n    def create_guild(self, name: str, icon: Optional[str]) -> Response[guild.Guild]:\n        payload = {\n            'name': name,\n        }\n        if icon:\n            payload['icon'] = icon\n\n        return self.request(Route('POST', '/guilds'), json=payload)\n\n    def edit_guild(self, guild_id: Snowflake, *, reason: Optional[str] = None, **fields: Any) -> Response[guild.Guild]:\n        valid_keys = (\n            'name',\n            'region',\n            'icon',\n            'afk_timeout',\n            'owner_id',\n            'afk_channel_id',\n            'splash',\n            'discovery_splash',\n            'features',\n            'verification_level',\n            'system_channel_id',\n            'default_message_notifications',\n            'description',\n            'explicit_content_filter',\n            'banner',\n            'system_channel_flags',\n            'rules_channel_id',\n            'public_updates_channel_id',\n            'preferred_locale',\n            'premium_progress_bar_enabled',\n            'safety_alerts_channel_id',\n        )\n\n        payload = {k: v for k, v in fields.items() if k in valid_keys}\n\n        return self.request(Route('PATCH', '/guilds/{guild_id}', guild_id=guild_id), json=payload, reason=reason)\n\n    def edit_guild_mfa_level(\n        self, guild_id: Snowflake, *, mfa_level: int, reason: Optional[str] = None\n    ) -> Response[guild.GuildMFALevel]:\n        payload = {'level': mfa_level}\n        return self.request(Route('POST', '/guilds/{guild_id}/mfa', guild_id=guild_id), json=payload, reason=reason)\n\n    def get_template(self, code: str) -> Response[template.Template]:\n        return self.request(Route('GET', '/guilds/templates/{code}', code=code))\n\n    def guild_templates(self, guild_id: Snowflake) -> Response[List[template.Template]]:\n        return self.request(Route('GET', '/guilds/{guild_id}/templates', guild_id=guild_id))\n\n    def create_template(self, guild_id: Snowflake, payload: Dict[str, Any]) -> Response[template.Template]:\n        return self.request(Route('POST', '/guilds/{guild_id}/templates', guild_id=guild_id), json=payload)\n\n    def sync_template(self, guild_id: Snowflake, code: str) -> Response[template.Template]:\n        return self.request(Route('PUT', '/guilds/{guild_id}/templates/{code}', guild_id=guild_id, code=code))\n\n    def edit_template(self, guild_id: Snowflake, code: str, payload: Dict[str, Any]) -> Response[template.Template]:\n        valid_keys = (\n            'name',\n            'description',\n        )\n        payload = {k: v for k, v in payload.items() if k in valid_keys}\n        return self.request(\n            Route('PATCH', '/guilds/{guild_id}/templates/{code}', guild_id=guild_id, code=code), json=payload\n        )\n\n    def delete_template(self, guild_id: Snowflake, code: str) -> Response[None]:\n        return self.request(Route('DELETE', '/guilds/{guild_id}/templates/{code}', guild_id=guild_id, code=code))\n\n    def create_from_template(self, code: str, name: str, icon: Optional[str]) -> Response[guild.Guild]:\n        payload = {\n            'name': name,\n        }\n        if icon:\n            payload['icon'] = icon\n        return self.request(Route('POST', '/guilds/templates/{code}', code=code), json=payload)\n\n    def get_bans(\n        self,\n        guild_id: Snowflake,\n        limit: int,\n        before: Optional[Snowflake] = None,\n        after: Optional[Snowflake] = None,\n    ) -> Response[List[guild.Ban]]:\n        params: Dict[str, Any] = {\n            'limit': limit,\n        }\n        if before is not None:\n            params['before'] = before\n        if after is not None:\n            params['after'] = after\n\n        return self.request(Route('GET', '/guilds/{guild_id}/bans', guild_id=guild_id), params=params)\n\n    def get_welcome_screen(self, guild_id: Snowflake) -> Response[welcome_screen.WelcomeScreen]:\n        return self.request(Route('GET', '/guilds/{guild_id}/welcome-screen', guild_id=guild_id))\n\n    def edit_welcome_screen(\n        self, guild_id: Snowflake, *, reason: Optional[str] = None, **fields: Any\n    ) -> Response[welcome_screen.WelcomeScreen]:\n        valid_keys = (\n            'description',\n            'welcome_channels',\n            'enabled',\n        )\n        payload = {k: v for k, v in fields.items() if k in valid_keys}\n        return self.request(\n            Route('PATCH', '/guilds/{guild_id}/welcome-screen', guild_id=guild_id), json=payload, reason=reason\n        )\n\n    def get_ban(self, user_id: Snowflake, guild_id: Snowflake) -> Response[guild.Ban]:\n        return self.request(Route('GET', '/guilds/{guild_id}/bans/{user_id}', guild_id=guild_id, user_id=user_id))\n\n    def get_vanity_code(self, guild_id: Snowflake) -> Response[invite.VanityInvite]:\n        return self.request(Route('GET', '/guilds/{guild_id}/vanity-url', guild_id=guild_id))\n\n    def change_vanity_code(self, guild_id: Snowflake, code: str, *, reason: Optional[str] = None) -> Response[None]:\n        payload: Dict[str, Any] = {'code': code}\n        return self.request(Route('PATCH', '/guilds/{guild_id}/vanity-url', guild_id=guild_id), json=payload, reason=reason)\n\n    def get_all_guild_channels(self, guild_id: Snowflake) -> Response[List[guild.GuildChannel]]:\n        return self.request(Route('GET', '/guilds/{guild_id}/channels', guild_id=guild_id))\n\n    def get_members(\n        self, guild_id: Snowflake, limit: int, after: Optional[Snowflake]\n    ) -> Response[List[member.MemberWithUser]]:\n        params: Dict[str, Any] = {\n            'limit': limit,\n        }\n        if after:\n            params['after'] = after\n\n        r = Route('GET', '/guilds/{guild_id}/members', guild_id=guild_id)\n        return self.request(r, params=params)\n\n    def get_member(self, guild_id: Snowflake, member_id: Snowflake) -> Response[member.MemberWithUser]:\n        return self.request(Route('GET', '/guilds/{guild_id}/members/{member_id}', guild_id=guild_id, member_id=member_id))\n\n    def prune_members(\n        self,\n        guild_id: Snowflake,\n        days: int,\n        compute_prune_count: bool,\n        roles: Iterable[str],\n        *,\n        reason: Optional[str] = None,\n    ) -> Response[guild.GuildPrune]:\n        payload: Dict[str, Any] = {\n            'days': days,\n            'compute_prune_count': 'true' if compute_prune_count else 'false',\n        }\n        if roles:\n            payload['include_roles'] = ', '.join(roles)\n\n        return self.request(Route('POST', '/guilds/{guild_id}/prune', guild_id=guild_id), json=payload, reason=reason)\n\n    def estimate_pruned_members(\n        self,\n        guild_id: Snowflake,\n        days: int,\n        roles: Iterable[str],\n    ) -> Response[guild.GuildPrune]:\n        params: Dict[str, Any] = {\n            'days': days,\n        }\n        if roles:\n            params['include_roles'] = ', '.join(roles)\n\n        return self.request(Route('GET', '/guilds/{guild_id}/prune', guild_id=guild_id), params=params)\n\n    def get_sticker(self, sticker_id: Snowflake) -> Response[sticker.Sticker]:\n        return self.request(Route('GET', '/stickers/{sticker_id}', sticker_id=sticker_id))\n\n    def list_premium_sticker_packs(self) -> Response[sticker.ListPremiumStickerPacks]:\n        return self.request(Route('GET', '/sticker-packs'))\n\n    def get_all_guild_stickers(self, guild_id: Snowflake) -> Response[List[sticker.GuildSticker]]:\n        return self.request(Route('GET', '/guilds/{guild_id}/stickers', guild_id=guild_id))\n\n    def get_guild_sticker(self, guild_id: Snowflake, sticker_id: Snowflake) -> Response[sticker.GuildSticker]:\n        return self.request(\n            Route('GET', '/guilds/{guild_id}/stickers/{sticker_id}', guild_id=guild_id, sticker_id=sticker_id)\n        )\n\n    def create_guild_sticker(\n        self, guild_id: Snowflake, payload: Dict[str, Any], file: File, reason: Optional[str]\n    ) -> Response[sticker.GuildSticker]:\n        initial_bytes = file.fp.read(16)\n\n        try:\n            mime_type = utils._get_mime_type_for_image(initial_bytes)\n        except ValueError:\n            if initial_bytes.startswith(b'{'):\n                mime_type = 'application/json'\n            else:\n                mime_type = 'application/octet-stream'\n        finally:\n            file.reset()\n\n        form: List[Dict[str, Any]] = [\n            {\n                'name': 'file',\n                'value': file.fp,\n                'filename': file.filename,\n                'content_type': mime_type,\n            }\n        ]\n\n        for k, v in payload.items():\n            form.append(\n                {\n                    'name': k,\n                    'value': v,\n                }\n            )\n\n        return self.request(\n            Route('POST', '/guilds/{guild_id}/stickers', guild_id=guild_id), form=form, files=[file], reason=reason\n        )\n\n    def modify_guild_sticker(\n        self,\n        guild_id: Snowflake,\n        sticker_id: Snowflake,\n        payload: Dict[str, Any],\n        reason: Optional[str],\n    ) -> Response[sticker.GuildSticker]:\n        return self.request(\n            Route('PATCH', '/guilds/{guild_id}/stickers/{sticker_id}', guild_id=guild_id, sticker_id=sticker_id),\n            json=payload,\n            reason=reason,\n        )\n\n    def delete_guild_sticker(self, guild_id: Snowflake, sticker_id: Snowflake, reason: Optional[str]) -> Response[None]:\n        return self.request(\n            Route('DELETE', '/guilds/{guild_id}/stickers/{sticker_id}', guild_id=guild_id, sticker_id=sticker_id),\n            reason=reason,\n        )\n\n    def get_all_custom_emojis(self, guild_id: Snowflake) -> Response[List[emoji.Emoji]]:\n        return self.request(Route('GET', '/guilds/{guild_id}/emojis', guild_id=guild_id))\n\n    def get_custom_emoji(self, guild_id: Snowflake, emoji_id: Snowflake) -> Response[emoji.Emoji]:\n        return self.request(Route('GET', '/guilds/{guild_id}/emojis/{emoji_id}', guild_id=guild_id, emoji_id=emoji_id))\n\n    def create_custom_emoji(\n        self,\n        guild_id: Snowflake,\n        name: str,\n        image: str,\n        *,\n        roles: Optional[SnowflakeList] = None,\n        reason: Optional[str] = None,\n    ) -> Response[emoji.Emoji]:\n        payload = {\n            'name': name,\n            'image': image,\n            'roles': roles or [],\n        }\n\n        r = Route('POST', '/guilds/{guild_id}/emojis', guild_id=guild_id)\n        return self.request(r, json=payload, reason=reason)\n\n    def delete_custom_emoji(\n        self,\n        guild_id: Snowflake,\n        emoji_id: Snowflake,\n        *,\n        reason: Optional[str] = None,\n    ) -> Response[None]:\n        r = Route('DELETE', '/guilds/{guild_id}/emojis/{emoji_id}', guild_id=guild_id, emoji_id=emoji_id)\n        return self.request(r, reason=reason)\n\n    def edit_custom_emoji(\n        self,\n        guild_id: Snowflake,\n        emoji_id: Snowflake,\n        *,\n        payload: Dict[str, Any],\n        reason: Optional[str] = None,\n    ) -> Response[emoji.Emoji]:\n        r = Route('PATCH', '/guilds/{guild_id}/emojis/{emoji_id}', guild_id=guild_id, emoji_id=emoji_id)\n        return self.request(r, json=payload, reason=reason)\n\n    def get_all_integrations(self, guild_id: Snowflake) -> Response[List[integration.Integration]]:\n        r = Route('GET', '/guilds/{guild_id}/integrations', guild_id=guild_id)\n\n        return self.request(r)\n\n    def create_integration(self, guild_id: Snowflake, type: integration.IntegrationType, id: int) -> Response[None]:\n        payload = {\n            'type': type,\n            'id': id,\n        }\n\n        r = Route('POST', '/guilds/{guild_id}/integrations', guild_id=guild_id)\n        return self.request(r, json=payload)\n\n    def edit_integration(self, guild_id: Snowflake, integration_id: Snowflake, **payload: Any) -> Response[None]:\n        r = Route(\n            'PATCH', '/guilds/{guild_id}/integrations/{integration_id}', guild_id=guild_id, integration_id=integration_id\n        )\n\n        return self.request(r, json=payload)\n\n    def sync_integration(self, guild_id: Snowflake, integration_id: Snowflake) -> Response[None]:\n        r = Route(\n            'POST', '/guilds/{guild_id}/integrations/{integration_id}/sync', guild_id=guild_id, integration_id=integration_id\n        )\n\n        return self.request(r)\n\n    def delete_integration(\n        self, guild_id: Snowflake, integration_id: Snowflake, *, reason: Optional[str] = None\n    ) -> Response[None]:\n        r = Route(\n            'DELETE', '/guilds/{guild_id}/integrations/{integration_id}', guild_id=guild_id, integration_id=integration_id\n        )\n\n        return self.request(r, reason=reason)\n\n    def get_audit_logs(\n        self,\n        guild_id: Snowflake,\n        limit: int = 100,\n        before: Optional[Snowflake] = None,\n        after: Optional[Snowflake] = None,\n        user_id: Optional[Snowflake] = None,\n        action_type: Optional[audit_log.AuditLogEvent] = None,\n    ) -> Response[audit_log.AuditLog]:\n        params: Dict[str, Any] = {'limit': limit}\n        if before:\n            params['before'] = before\n        if after is not None:\n            params['after'] = after\n        if user_id:\n            params['user_id'] = user_id\n        if action_type:\n            params['action_type'] = action_type\n\n        r = Route('GET', '/guilds/{guild_id}/audit-logs', guild_id=guild_id)\n        return self.request(r, params=params)\n\n    def get_widget(self, guild_id: Snowflake) -> Response[widget.Widget]:\n        return self.request(Route('GET', '/guilds/{guild_id}/widget.json', guild_id=guild_id))\n\n    def edit_widget(\n        self, guild_id: Snowflake, payload: widget.EditWidgetSettings, reason: Optional[str] = None\n    ) -> Response[widget.WidgetSettings]:\n        return self.request(Route('PATCH', '/guilds/{guild_id}/widget', guild_id=guild_id), json=payload, reason=reason)\n\n    def edit_incident_actions(self, guild_id: Snowflake, payload: guild.IncidentData) -> Response[guild.IncidentData]:\n        return self.request(Route('PUT', '/guilds/{guild_id}/incident-actions', guild_id=guild_id), json=payload)\n\n    # Invite management\n\n    def create_invite(\n        self,\n        channel_id: Snowflake,\n        *,\n        reason: Optional[str] = None,\n        max_age: int = 0,\n        max_uses: int = 0,\n        temporary: bool = False,\n        unique: bool = True,\n        target_type: Optional[invite.InviteTargetType] = None,\n        target_user_id: Optional[Snowflake] = None,\n        target_application_id: Optional[Snowflake] = None,\n    ) -> Response[invite.Invite]:\n        r = Route('POST', '/channels/{channel_id}/invites', channel_id=channel_id)\n        payload = {\n            'max_age': max_age,\n            'max_uses': max_uses,\n            'temporary': temporary,\n            'unique': unique,\n        }\n\n        if target_type:\n            payload['target_type'] = target_type\n\n        if target_user_id:\n            payload['target_user_id'] = target_user_id\n\n        if target_application_id:\n            payload['target_application_id'] = str(target_application_id)\n\n        return self.request(r, reason=reason, json=payload)\n\n    def get_invite(\n        self,\n        invite_id: str,\n        *,\n        with_counts: bool = True,\n        with_expiration: bool = True,\n        guild_scheduled_event_id: Optional[Snowflake] = None,\n    ) -> Response[invite.Invite]:\n        params: Dict[str, Any] = {\n            'with_counts': int(with_counts),\n            'with_expiration': int(with_expiration),\n        }\n\n        if guild_scheduled_event_id:\n            params['guild_scheduled_event_id'] = guild_scheduled_event_id\n\n        return self.request(Route('GET', '/invites/{invite_id}', invite_id=invite_id), params=params)\n\n    def invites_from(self, guild_id: Snowflake) -> Response[List[invite.Invite]]:\n        return self.request(Route('GET', '/guilds/{guild_id}/invites', guild_id=guild_id))\n\n    def invites_from_channel(self, channel_id: Snowflake) -> Response[List[invite.Invite]]:\n        return self.request(Route('GET', '/channels/{channel_id}/invites', channel_id=channel_id))\n\n    def delete_invite(self, invite_id: str, *, reason: Optional[str] = None) -> Response[None]:\n        return self.request(Route('DELETE', '/invites/{invite_id}', invite_id=invite_id), reason=reason)\n\n    # Role management\n\n    def get_roles(self, guild_id: Snowflake) -> Response[List[role.Role]]:\n        return self.request(Route('GET', '/guilds/{guild_id}/roles', guild_id=guild_id))\n\n    def edit_role(\n        self, guild_id: Snowflake, role_id: Snowflake, *, reason: Optional[str] = None, **fields: Any\n    ) -> Response[role.Role]:\n        r = Route('PATCH', '/guilds/{guild_id}/roles/{role_id}', guild_id=guild_id, role_id=role_id)\n        valid_keys = ('name', 'permissions', 'color', 'hoist', 'icon', 'unicode_emoji', 'mentionable')\n        payload = {k: v for k, v in fields.items() if k in valid_keys}\n        return self.request(r, json=payload, reason=reason)\n\n    def delete_role(self, guild_id: Snowflake, role_id: Snowflake, *, reason: Optional[str] = None) -> Response[None]:\n        r = Route('DELETE', '/guilds/{guild_id}/roles/{role_id}', guild_id=guild_id, role_id=role_id)\n        return self.request(r, reason=reason)\n\n    def replace_roles(\n        self,\n        user_id: Snowflake,\n        guild_id: Snowflake,\n        role_ids: List[int],\n        *,\n        reason: Optional[str] = None,\n    ) -> Response[member.MemberWithUser]:\n        return self.edit_member(guild_id=guild_id, user_id=user_id, roles=role_ids, reason=reason)\n\n    def create_role(self, guild_id: Snowflake, *, reason: Optional[str] = None, **fields: Any) -> Response[role.Role]:\n        r = Route('POST', '/guilds/{guild_id}/roles', guild_id=guild_id)\n        return self.request(r, json=fields, reason=reason)\n\n    def move_role_position(\n        self,\n        guild_id: Snowflake,\n        positions: List[guild.RolePositionUpdate],\n        *,\n        reason: Optional[str] = None,\n    ) -> Response[List[role.Role]]:\n        r = Route('PATCH', '/guilds/{guild_id}/roles', guild_id=guild_id)\n        return self.request(r, json=positions, reason=reason)\n\n    def add_role(\n        self, guild_id: Snowflake, user_id: Snowflake, role_id: Snowflake, *, reason: Optional[str] = None\n    ) -> Response[None]:\n        r = Route(\n            'PUT',\n            '/guilds/{guild_id}/members/{user_id}/roles/{role_id}',\n            guild_id=guild_id,\n            user_id=user_id,\n            role_id=role_id,\n        )\n        return self.request(r, reason=reason)\n\n    def remove_role(\n        self, guild_id: Snowflake, user_id: Snowflake, role_id: Snowflake, *, reason: Optional[str] = None\n    ) -> Response[None]:\n        r = Route(\n            'DELETE',\n            '/guilds/{guild_id}/members/{user_id}/roles/{role_id}',\n            guild_id=guild_id,\n            user_id=user_id,\n            role_id=role_id,\n        )\n        return self.request(r, reason=reason)\n\n    def edit_channel_permissions(\n        self,\n        channel_id: Snowflake,\n        target: Snowflake,\n        allow: str,\n        deny: str,\n        type: channel.OverwriteType,\n        *,\n        reason: Optional[str] = None,\n    ) -> Response[None]:\n        payload = {'id': target, 'allow': allow, 'deny': deny, 'type': type}\n        r = Route('PUT', '/channels/{channel_id}/permissions/{target}', channel_id=channel_id, target=target)\n        return self.request(r, json=payload, reason=reason)\n\n    def delete_channel_permissions(\n        self, channel_id: Snowflake, target: Snowflake, *, reason: Optional[str] = None\n    ) -> Response[None]:\n        r = Route('DELETE', '/channels/{channel_id}/permissions/{target}', channel_id=channel_id, target=target)\n        return self.request(r, reason=reason)\n\n    # Voice management\n\n    def move_member(\n        self,\n        user_id: Snowflake,\n        guild_id: Snowflake,\n        channel_id: Snowflake,\n        *,\n        reason: Optional[str] = None,\n    ) -> Response[member.MemberWithUser]:\n        return self.edit_member(guild_id=guild_id, user_id=user_id, channel_id=channel_id, reason=reason)\n\n    # Stage instance management\n\n    def get_stage_instance(self, channel_id: Snowflake) -> Response[channel.StageInstance]:\n        return self.request(Route('GET', '/stage-instances/{channel_id}', channel_id=channel_id))\n\n    def create_stage_instance(self, *, reason: Optional[str], **payload: Any) -> Response[channel.StageInstance]:\n        valid_keys = (\n            'channel_id',\n            'topic',\n            'privacy_level',\n            'send_start_notification',\n            'guild_scheduled_event_id',\n        )\n        payload = {k: v for k, v in payload.items() if k in valid_keys}\n\n        return self.request(Route('POST', '/stage-instances'), json=payload, reason=reason)\n\n    def edit_stage_instance(self, channel_id: Snowflake, *, reason: Optional[str] = None, **payload: Any) -> Response[None]:\n        valid_keys = (\n            'topic',\n            'privacy_level',\n        )\n        payload = {k: v for k, v in payload.items() if k in valid_keys}\n\n        return self.request(\n            Route('PATCH', '/stage-instances/{channel_id}', channel_id=channel_id), json=payload, reason=reason\n        )\n\n    def delete_stage_instance(self, channel_id: Snowflake, *, reason: Optional[str] = None) -> Response[None]:\n        return self.request(Route('DELETE', '/stage-instances/{channel_id}', channel_id=channel_id), reason=reason)\n\n    # Guild scheduled event management\n\n    @overload\n    def get_scheduled_events(\n        self, guild_id: Snowflake, with_user_count: Literal[True]\n    ) -> Response[List[scheduled_event.GuildScheduledEventWithUserCount]]:\n        ...\n\n    @overload\n    def get_scheduled_events(\n        self, guild_id: Snowflake, with_user_count: Literal[False]\n    ) -> Response[List[scheduled_event.GuildScheduledEvent]]:\n        ...\n\n    @overload\n    def get_scheduled_events(\n        self, guild_id: Snowflake, with_user_count: bool\n    ) -> Union[\n        Response[List[scheduled_event.GuildScheduledEventWithUserCount]], Response[List[scheduled_event.GuildScheduledEvent]]\n    ]:\n        ...\n\n    def get_scheduled_events(self, guild_id: Snowflake, with_user_count: bool) -> Response[Any]:\n        params = {'with_user_count': int(with_user_count)}\n        return self.request(Route('GET', '/guilds/{guild_id}/scheduled-events', guild_id=guild_id), params=params)\n\n    def create_guild_scheduled_event(\n        self, guild_id: Snowflake, *, reason: Optional[str] = None, **payload: Any\n    ) -> Response[scheduled_event.GuildScheduledEvent]:\n        valid_keys = (\n            'channel_id',\n            'entity_metadata',\n            'name',\n            'privacy_level',\n            'scheduled_start_time',\n            'scheduled_end_time',\n            'description',\n            'entity_type',\n            'image',\n        )\n        payload = {k: v for k, v in payload.items() if k in valid_keys}\n\n        return self.request(\n            Route('POST', '/guilds/{guild_id}/scheduled-events', guild_id=guild_id), json=payload, reason=reason\n        )\n\n    @overload\n    def get_scheduled_event(\n        self, guild_id: Snowflake, guild_scheduled_event_id: Snowflake, with_user_count: Literal[True]\n    ) -> Response[scheduled_event.GuildScheduledEventWithUserCount]:\n        ...\n\n    @overload\n    def get_scheduled_event(\n        self, guild_id: Snowflake, guild_scheduled_event_id: Snowflake, with_user_count: Literal[False]\n    ) -> Response[scheduled_event.GuildScheduledEvent]:\n        ...\n\n    @overload\n    def get_scheduled_event(\n        self, guild_id: Snowflake, guild_scheduled_event_id: Snowflake, with_user_count: bool\n    ) -> Union[Response[scheduled_event.GuildScheduledEventWithUserCount], Response[scheduled_event.GuildScheduledEvent]]:\n        ...\n\n    def get_scheduled_event(\n        self, guild_id: Snowflake, guild_scheduled_event_id: Snowflake, with_user_count: bool\n    ) -> Response[Any]:\n        params = {'with_user_count': int(with_user_count)}\n        return self.request(\n            Route(\n                'GET',\n                '/guilds/{guild_id}/scheduled-events/{guild_scheduled_event_id}',\n                guild_id=guild_id,\n                guild_scheduled_event_id=guild_scheduled_event_id,\n            ),\n            params=params,\n        )\n\n    def edit_scheduled_event(\n        self, guild_id: Snowflake, guild_scheduled_event_id: Snowflake, *, reason: Optional[str] = None, **payload: Any\n    ) -> Response[scheduled_event.GuildScheduledEvent]:\n        valid_keys = (\n            'channel_id',\n            'entity_metadata',\n            'name',\n            'privacy_level',\n            'scheduled_start_time',\n            'scheduled_end_time',\n            'status',\n            'description',\n            'entity_type',\n            'image',\n        )\n        payload = {k: v for k, v in payload.items() if k in valid_keys}\n\n        return self.request(\n            Route(\n                'PATCH',\n                '/guilds/{guild_id}/scheduled-events/{guild_scheduled_event_id}',\n                guild_id=guild_id,\n                guild_scheduled_event_id=guild_scheduled_event_id,\n            ),\n            json=payload,\n            reason=reason,\n        )\n\n    def delete_scheduled_event(\n        self,\n        guild_id: Snowflake,\n        guild_scheduled_event_id: Snowflake,\n        *,\n        reason: Optional[str] = None,\n    ) -> Response[None]:\n        return self.request(\n            Route(\n                'DELETE',\n                '/guilds/{guild_id}/scheduled-events/{guild_scheduled_event_id}',\n                guild_id=guild_id,\n                guild_scheduled_event_id=guild_scheduled_event_id,\n            ),\n            reason=reason,\n        )\n\n    @overload\n    def get_scheduled_event_users(\n        self,\n        guild_id: Snowflake,\n        guild_scheduled_event_id: Snowflake,\n        limit: int,\n        with_member: Literal[True],\n        before: Optional[Snowflake] = ...,\n        after: Optional[Snowflake] = ...,\n    ) -> Response[scheduled_event.ScheduledEventUsersWithMember]:\n        ...\n\n    @overload\n    def get_scheduled_event_users(\n        self,\n        guild_id: Snowflake,\n        guild_scheduled_event_id: Snowflake,\n        limit: int,\n        with_member: Literal[False],\n        before: Optional[Snowflake] = ...,\n        after: Optional[Snowflake] = ...,\n    ) -> Response[scheduled_event.ScheduledEventUsers]:\n        ...\n\n    @overload\n    def get_scheduled_event_users(\n        self,\n        guild_id: Snowflake,\n        guild_scheduled_event_id: Snowflake,\n        limit: int,\n        with_member: bool,\n        before: Optional[Snowflake] = ...,\n        after: Optional[Snowflake] = ...,\n    ) -> Union[Response[scheduled_event.ScheduledEventUsersWithMember], Response[scheduled_event.ScheduledEventUsers]]:\n        ...\n\n    def get_scheduled_event_users(\n        self,\n        guild_id: Snowflake,\n        guild_scheduled_event_id: Snowflake,\n        limit: int,\n        with_member: bool,\n        before: Optional[Snowflake] = None,\n        after: Optional[Snowflake] = None,\n    ) -> Response[Any]:\n        params: Dict[str, Any] = {\n            'limit': limit,\n            'with_member': int(with_member),\n        }\n\n        if before is not None:\n            params['before'] = before\n        if after is not None:\n            params['after'] = after\n\n        return self.request(\n            Route(\n                'GET',\n                '/guilds/{guild_id}/scheduled-events/{guild_scheduled_event_id}/users',\n                guild_id=guild_id,\n                guild_scheduled_event_id=guild_scheduled_event_id,\n            ),\n            params=params,\n        )\n\n    # Application commands (global)\n\n    def get_global_commands(self, application_id: Snowflake) -> Response[List[command.ApplicationCommand]]:\n        return self.request(Route('GET', '/applications/{application_id}/commands', application_id=application_id))\n\n    def get_global_command(self, application_id: Snowflake, command_id: Snowflake) -> Response[command.ApplicationCommand]:\n        r = Route(\n            'GET',\n            '/applications/{application_id}/commands/{command_id}',\n            application_id=application_id,\n            command_id=command_id,\n        )\n        return self.request(r)\n\n    def upsert_global_command(\n        self, application_id: Snowflake, payload: command.ApplicationCommand\n    ) -> Response[command.ApplicationCommand]:\n        r = Route('POST', '/applications/{application_id}/commands', application_id=application_id)\n        return self.request(r, json=payload)\n\n    def edit_global_command(\n        self,\n        application_id: Snowflake,\n        command_id: Snowflake,\n        payload: Dict[str, Any],\n    ) -> Response[command.ApplicationCommand]:\n        valid_keys = (\n            'name',\n            'description',\n            'options',\n        )\n        payload = {k: v for k, v in payload.items() if k in valid_keys}\n        r = Route(\n            'PATCH',\n            '/applications/{application_id}/commands/{command_id}',\n            application_id=application_id,\n            command_id=command_id,\n        )\n        return self.request(r, json=payload)\n\n    def delete_global_command(self, application_id: Snowflake, command_id: Snowflake) -> Response[None]:\n        r = Route(\n            'DELETE',\n            '/applications/{application_id}/commands/{command_id}',\n            application_id=application_id,\n            command_id=command_id,\n        )\n        return self.request(r)\n\n    def bulk_upsert_global_commands(\n        self, application_id: Snowflake, payload: List[Dict[str, Any]]\n    ) -> Response[List[command.ApplicationCommand]]:\n        r = Route('PUT', '/applications/{application_id}/commands', application_id=application_id)\n        return self.request(r, json=payload)\n\n    # Application commands (guild)\n\n    def get_guild_commands(\n        self, application_id: Snowflake, guild_id: Snowflake\n    ) -> Response[List[command.ApplicationCommand]]:\n        r = Route(\n            'GET',\n            '/applications/{application_id}/guilds/{guild_id}/commands',\n            application_id=application_id,\n            guild_id=guild_id,\n        )\n        return self.request(r)\n\n    def get_guild_command(\n        self,\n        application_id: Snowflake,\n        guild_id: Snowflake,\n        command_id: Snowflake,\n    ) -> Response[command.ApplicationCommand]:\n        r = Route(\n            'GET',\n            '/applications/{application_id}/guilds/{guild_id}/commands/{command_id}',\n            application_id=application_id,\n            guild_id=guild_id,\n            command_id=command_id,\n        )\n        return self.request(r)\n\n    def upsert_guild_command(\n        self,\n        application_id: Snowflake,\n        guild_id: Snowflake,\n        payload: Dict[str, Any],\n    ) -> Response[command.ApplicationCommand]:\n        r = Route(\n            'POST',\n            '/applications/{application_id}/guilds/{guild_id}/commands',\n            application_id=application_id,\n            guild_id=guild_id,\n        )\n        return self.request(r, json=payload)\n\n    def edit_guild_command(\n        self,\n        application_id: Snowflake,\n        guild_id: Snowflake,\n        command_id: Snowflake,\n        payload: Dict[str, Any],\n    ) -> Response[command.ApplicationCommand]:\n        valid_keys = (\n            'name',\n            'description',\n            'options',\n        )\n        payload = {k: v for k, v in payload.items() if k in valid_keys}\n        r = Route(\n            'PATCH',\n            '/applications/{application_id}/guilds/{guild_id}/commands/{command_id}',\n            application_id=application_id,\n            guild_id=guild_id,\n            command_id=command_id,\n        )\n        return self.request(r, json=payload)\n\n    def delete_guild_command(\n        self,\n        application_id: Snowflake,\n        guild_id: Snowflake,\n        command_id: Snowflake,\n    ) -> Response[None]:\n        r = Route(\n            'DELETE',\n            '/applications/{application_id}/guilds/{guild_id}/commands/{command_id}',\n            application_id=application_id,\n            guild_id=guild_id,\n            command_id=command_id,\n        )\n        return self.request(r)\n\n    def bulk_upsert_guild_commands(\n        self,\n        application_id: Snowflake,\n        guild_id: Snowflake,\n        payload: List[Dict[str, Any]],\n    ) -> Response[List[command.ApplicationCommand]]:\n        r = Route(\n            'PUT',\n            '/applications/{application_id}/guilds/{guild_id}/commands',\n            application_id=application_id,\n            guild_id=guild_id,\n        )\n        return self.request(r, json=payload)\n\n    def get_guild_application_command_permissions(\n        self,\n        application_id: Snowflake,\n        guild_id: Snowflake,\n    ) -> Response[List[command.GuildApplicationCommandPermissions]]:\n        r = Route(\n            'GET',\n            '/applications/{application_id}/guilds/{guild_id}/commands/permissions',\n            application_id=application_id,\n            guild_id=guild_id,\n        )\n        return self.request(r)\n\n    def get_application_command_permissions(\n        self,\n        application_id: Snowflake,\n        guild_id: Snowflake,\n        command_id: Snowflake,\n    ) -> Response[command.GuildApplicationCommandPermissions]:\n        r = Route(\n            'GET',\n            '/applications/{application_id}/guilds/{guild_id}/commands/{command_id}/permissions',\n            application_id=application_id,\n            guild_id=guild_id,\n            command_id=command_id,\n        )\n        return self.request(r)\n\n    def edit_application_command_permissions(\n        self,\n        application_id: Snowflake,\n        guild_id: Snowflake,\n        command_id: Snowflake,\n        payload: Dict[str, Any],\n    ) -> Response[None]:\n        r = Route(\n            'PUT',\n            '/applications/{application_id}/guilds/{guild_id}/commands/{command_id}/permissions',\n            application_id=application_id,\n            guild_id=guild_id,\n            command_id=command_id,\n        )\n        return self.request(r, json=payload)\n\n    def get_auto_moderation_rules(self, guild_id: Snowflake) -> Response[List[automod.AutoModerationRule]]:\n        return self.request(Route('GET', '/guilds/{guild_id}/auto-moderation/rules', guild_id=guild_id))\n\n    def get_auto_moderation_rule(self, guild_id: Snowflake, rule_id: Snowflake) -> Response[automod.AutoModerationRule]:\n        return self.request(\n            Route('GET', '/guilds/{guild_id}/auto-moderation/rules/{rule_id}', guild_id=guild_id, rule_id=rule_id)\n        )\n\n    def create_auto_moderation_rule(\n        self, guild_id: Snowflake, *, reason: Optional[str], **payload: Any\n    ) -> Response[automod.AutoModerationRule]:\n        valid_keys = (\n            'name',\n            'event_type',\n            'trigger_type',\n            'trigger_metadata',\n            'actions',\n            'enabled',\n            'exempt_roles',\n            'exempt_channels',\n        )\n\n        payload = {k: v for k, v in payload.items() if k in valid_keys and v is not None}\n\n        return self.request(\n            Route('POST', '/guilds/{guild_id}/auto-moderation/rules', guild_id=guild_id), json=payload, reason=reason\n        )\n\n    def edit_auto_moderation_rule(\n        self, guild_id: Snowflake, rule_id: Snowflake, *, reason: Optional[str], **payload: Any\n    ) -> Response[automod.AutoModerationRule]:\n        valid_keys = (\n            'name',\n            'event_type',\n            'trigger_metadata',\n            'actions',\n            'enabled',\n            'exempt_roles',\n            'exempt_channels',\n        )\n\n        payload = {k: v for k, v in payload.items() if k in valid_keys and v is not None}\n\n        return self.request(\n            Route('PATCH', '/guilds/{guild_id}/auto-moderation/rules/{rule_id}', guild_id=guild_id, rule_id=rule_id),\n            json=payload,\n            reason=reason,\n        )\n\n    def delete_auto_moderation_rule(\n        self, guild_id: Snowflake, rule_id: Snowflake, *, reason: Optional[str]\n    ) -> Response[None]:\n        return self.request(\n            Route('DELETE', '/guilds/{guild_id}/auto-moderation/rules/{rule_id}', guild_id=guild_id, rule_id=rule_id),\n            reason=reason,\n        )\n\n    # SKU\n\n    def get_skus(self, application_id: Snowflake) -> Response[List[sku.SKU]]:\n        return self.request(Route('GET', '/applications/{application_id}/skus', application_id=application_id))\n\n    def get_entitlements(\n        self,\n        application_id: Snowflake,\n        user_id: Optional[Snowflake] = None,\n        sku_ids: Optional[SnowflakeList] = None,\n        before: Optional[Snowflake] = None,\n        after: Optional[Snowflake] = None,\n        limit: Optional[int] = None,\n        guild_id: Optional[Snowflake] = None,\n        exclude_ended: Optional[bool] = None,\n    ) -> Response[List[sku.Entitlement]]:\n        params: Dict[str, Any] = {}\n\n        if user_id is not None:\n            params['user_id'] = user_id\n        if sku_ids is not None:\n            params['sku_ids'] = ','.join(map(str, sku_ids))\n        if before is not None:\n            params['before'] = before\n        if after is not None:\n            params['after'] = after\n        if limit is not None:\n            params['limit'] = limit\n        if guild_id is not None:\n            params['guild_id'] = guild_id\n        if exclude_ended is not None:\n            params['exclude_ended'] = int(exclude_ended)\n\n        return self.request(\n            Route('GET', '/applications/{application_id}/entitlements', application_id=application_id), params=params\n        )\n\n    def get_entitlement(self, application_id: Snowflake, entitlement_id: Snowflake) -> Response[sku.Entitlement]:\n        return self.request(\n            Route(\n                'GET',\n                '/applications/{application_id}/entitlements/{entitlement_id}',\n                application_id=application_id,\n                entitlement_id=entitlement_id,\n            ),\n        )\n\n    def consume_entitlement(self, application_id: Snowflake, entitlement_id: Snowflake) -> Response[None]:\n        return self.request(\n            Route(\n                'POST',\n                '/applications/{application_id}/entitlements/{entitlement_id}/consume',\n                application_id=application_id,\n                entitlement_id=entitlement_id,\n            ),\n        )\n\n    def create_entitlement(\n        self, application_id: Snowflake, sku_id: Snowflake, owner_id: Snowflake, owner_type: sku.EntitlementOwnerType\n    ) -> Response[sku.Entitlement]:\n        payload = {\n            'sku_id': sku_id,\n            'owner_id': owner_id,\n            'owner_type': owner_type,\n        }\n\n        return self.request(\n            Route(\n                'POST',\n                '/applications/{application_id}/entitlements',\n                application_id=application_id,\n            ),\n            json=payload,\n        )\n\n    def delete_entitlement(self, application_id: Snowflake, entitlement_id: Snowflake) -> Response[None]:\n        return self.request(\n            Route(\n                'DELETE',\n                '/applications/{application_id}/entitlements/{entitlement_id}',\n                application_id=application_id,\n                entitlement_id=entitlement_id,\n            ),\n        )\n\n    # Misc\n\n    def application_info(self) -> Response[appinfo.AppInfo]:\n        return self.request(Route('GET', '/oauth2/applications/@me'))\n\n    def edit_application_info(self, *, reason: Optional[str], payload: Any) -> Response[appinfo.AppInfo]:\n        valid_keys = (\n            'custom_install_url',\n            'description',\n            'role_connections_verification_url',\n            'install_params',\n            'flags',\n            'icon',\n            'cover_image',\n            'interactions_endpoint_url ',\n            'tags',\n        )\n\n        payload = {k: v for k, v in payload.items() if k in valid_keys}\n        return self.request(Route('PATCH', '/applications/@me'), json=payload, reason=reason)\n\n    def get_poll_answer_voters(\n        self,\n        channel_id: Snowflake,\n        message_id: Snowflake,\n        answer_id: Snowflake,\n        after: Optional[Snowflake] = None,\n        limit: Optional[int] = None,\n    ) -> Response[poll.PollAnswerVoters]:\n        params = {}\n\n        if after:\n            params['after'] = int(after)\n\n        if limit is not None:\n            params['limit'] = limit\n\n        return self.request(\n            Route(\n                'GET',\n                '/channels/{channel_id}/polls/{message_id}/answers/{answer_id}',\n                channel_id=channel_id,\n                message_id=message_id,\n                answer_id=answer_id,\n            ),\n            params=params,\n        )\n\n    def end_poll(self, channel_id: Snowflake, message_id: Snowflake) -> Response[message.Message]:\n        return self.request(\n            Route(\n                'POST',\n                '/channels/{channel_id}/polls/{message_id}/expire',\n                channel_id=channel_id,\n                message_id=message_id,\n            )\n        )\n\n    async def get_gateway(self, *, encoding: str = 'json', zlib: bool = True) -> str:\n        try:\n            data = await self.request(Route('GET', '/gateway'))\n        except HTTPException as exc:\n            raise GatewayNotFound() from exc\n        if zlib:\n            value = '{0}?encoding={1}&v={2}&compress=zlib-stream'\n        else:\n            value = '{0}?encoding={1}&v={2}'\n        return value.format(data['url'], encoding, INTERNAL_API_VERSION)\n\n    async def get_bot_gateway(self, *, encoding: str = 'json', zlib: bool = True) -> Tuple[int, str]:\n        try:\n            data = await self.request(Route('GET', '/gateway/bot'))\n        except HTTPException as exc:\n            raise GatewayNotFound() from exc\n\n        if zlib:\n            value = '{0}?encoding={1}&v={2}&compress=zlib-stream'\n        else:\n            value = '{0}?encoding={1}&v={2}'\n        return data['shards'], value.format(data['url'], encoding, INTERNAL_API_VERSION)\n\n    def get_user(self, user_id: Snowflake) -> Response[user.User]:\n        return self.request(Route('GET', '/users/{user_id}', user_id=user_id))\n"
  },
  {
    "path": "discord/integrations.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom __future__ import annotations\n\nimport datetime\nfrom typing import Any, Dict, Optional, TYPE_CHECKING, Type, Tuple\nfrom .utils import _get_as_snowflake, parse_time, MISSING\nfrom .user import User\nfrom .enums import try_enum, ExpireBehaviour\n\n__all__ = (\n    'IntegrationAccount',\n    'IntegrationApplication',\n    'Integration',\n    'StreamIntegration',\n    'BotIntegration',\n    'PartialIntegration',\n)\n\nif TYPE_CHECKING:\n    from .guild import Guild\n    from .role import Role\n    from .state import ConnectionState\n    from .types.integration import (\n        IntegrationAccount as IntegrationAccountPayload,\n        Integration as IntegrationPayload,\n        StreamIntegration as StreamIntegrationPayload,\n        BotIntegration as BotIntegrationPayload,\n        IntegrationType,\n        IntegrationApplication as IntegrationApplicationPayload,\n        PartialIntegration as PartialIntegrationPayload,\n    )\n\n\nclass IntegrationAccount:\n    \"\"\"Represents an integration account.\n\n    .. versionadded:: 1.4\n\n    Attributes\n    -----------\n    id: :class:`str`\n        The account ID.\n    name: :class:`str`\n        The account name.\n    \"\"\"\n\n    __slots__ = ('id', 'name')\n\n    def __init__(self, data: IntegrationAccountPayload) -> None:\n        self.id: str = data['id']\n        self.name: str = data['name']\n\n    def __repr__(self) -> str:\n        return f'<IntegrationAccount id={self.id} name={self.name!r}>'\n\n\nclass Integration:\n    \"\"\"Represents a guild integration.\n\n    .. versionadded:: 1.4\n\n    Attributes\n    -----------\n    id: :class:`int`\n        The integration ID.\n    name: :class:`str`\n        The integration name.\n    guild: :class:`Guild`\n        The guild of the integration.\n    type: :class:`str`\n        The integration type (i.e. Twitch).\n    enabled: :class:`bool`\n        Whether the integration is currently enabled.\n    account: :class:`IntegrationAccount`\n        The account linked to this integration.\n    user: :class:`User`\n        The user that added this integration.\n    \"\"\"\n\n    __slots__ = (\n        'guild',\n        'id',\n        '_state',\n        'type',\n        'name',\n        'account',\n        'user',\n        'enabled',\n    )\n\n    def __init__(self, *, data: IntegrationPayload, guild: Guild) -> None:\n        self.guild: Guild = guild\n        self._state: ConnectionState = guild._state\n        self._from_data(data)\n\n    def __repr__(self) -> str:\n        return f'<{self.__class__.__name__} id={self.id} name={self.name!r}>'\n\n    def _from_data(self, data: IntegrationPayload) -> None:\n        self.id: int = int(data['id'])\n        self.type: IntegrationType = data['type']\n        self.name: str = data['name']\n        self.account: IntegrationAccount = IntegrationAccount(data['account'])\n\n        user = data.get('user')\n        self.user: Optional[User] = User(state=self._state, data=user) if user else None\n        self.enabled: bool = data['enabled']\n\n    async def delete(self, *, reason: Optional[str] = None) -> None:\n        \"\"\"|coro|\n\n        Deletes the integration.\n\n        You must have :attr:`~Permissions.manage_guild` to do this.\n\n        Parameters\n        -----------\n        reason: :class:`str`\n            The reason the integration was deleted. Shows up on the audit log.\n\n            .. versionadded:: 2.0\n\n        Raises\n        -------\n        Forbidden\n            You do not have permission to delete the integration.\n        HTTPException\n            Deleting the integration failed.\n        \"\"\"\n        await self._state.http.delete_integration(self.guild.id, self.id, reason=reason)\n\n\nclass StreamIntegration(Integration):\n    \"\"\"Represents a stream integration for Twitch or YouTube.\n\n    .. versionadded:: 2.0\n\n    Attributes\n    ----------\n    id: :class:`int`\n        The integration ID.\n    name: :class:`str`\n        The integration name.\n    guild: :class:`Guild`\n        The guild of the integration.\n    type: :class:`str`\n        The integration type (i.e. Twitch).\n    enabled: :class:`bool`\n        Whether the integration is currently enabled.\n    syncing: :class:`bool`\n        Where the integration is currently syncing.\n    enable_emoticons: Optional[:class:`bool`]\n        Whether emoticons should be synced for this integration (currently twitch only).\n    expire_behaviour: :class:`ExpireBehaviour`\n        The behaviour of expiring subscribers. Aliased to ``expire_behavior`` as well.\n    expire_grace_period: :class:`int`\n        The grace period (in days) for expiring subscribers.\n    user: :class:`User`\n        The user for the integration.\n    account: :class:`IntegrationAccount`\n        The integration account information.\n    synced_at: :class:`datetime.datetime`\n        An aware UTC datetime representing when the integration was last synced.\n    \"\"\"\n\n    __slots__ = (\n        'revoked',\n        'expire_behaviour',\n        'expire_grace_period',\n        'synced_at',\n        '_role_id',\n        'syncing',\n        'enable_emoticons',\n        'subscriber_count',\n    )\n\n    def _from_data(self, data: StreamIntegrationPayload) -> None:\n        super()._from_data(data)\n        self.revoked: bool = data['revoked']\n        self.expire_behaviour: ExpireBehaviour = try_enum(ExpireBehaviour, data['expire_behavior'])\n        self.expire_grace_period: int = data['expire_grace_period']\n        self.synced_at: datetime.datetime = parse_time(data['synced_at'])\n        self._role_id: Optional[int] = _get_as_snowflake(data, 'role_id')\n        self.syncing: bool = data['syncing']\n        self.enable_emoticons: bool = data['enable_emoticons']\n        self.subscriber_count: int = data['subscriber_count']\n\n    @property\n    def expire_behavior(self) -> ExpireBehaviour:\n        \"\"\":class:`ExpireBehaviour`: An alias for :attr:`expire_behaviour`.\"\"\"\n        return self.expire_behaviour\n\n    @property\n    def role(self) -> Optional[Role]:\n        \"\"\"Optional[:class:`Role`] The role which the integration uses for subscribers.\"\"\"\n        # The key is `int` but `int | None` will return `None` anyway.\n        return self.guild.get_role(self._role_id)  # type: ignore\n\n    async def edit(\n        self,\n        *,\n        expire_behaviour: ExpireBehaviour = MISSING,\n        expire_grace_period: int = MISSING,\n        enable_emoticons: bool = MISSING,\n    ) -> None:\n        \"\"\"|coro|\n\n        Edits the integration.\n\n        You must have :attr:`~Permissions.manage_guild` to do this.\n\n        .. versionchanged:: 2.0\n            This function will now raise :exc:`TypeError` instead of\n            ``InvalidArgument``.\n\n        Parameters\n        -----------\n        expire_behaviour: :class:`ExpireBehaviour`\n            The behaviour when an integration subscription lapses. Aliased to ``expire_behavior`` as well.\n        expire_grace_period: :class:`int`\n            The period (in days) where the integration will ignore lapsed subscriptions.\n        enable_emoticons: :class:`bool`\n            Where emoticons should be synced for this integration (currently twitch only).\n\n        Raises\n        -------\n        Forbidden\n            You do not have permission to edit the integration.\n        HTTPException\n            Editing the guild failed.\n        TypeError\n            ``expire_behaviour`` did not receive a :class:`ExpireBehaviour`.\n        \"\"\"\n        payload: Dict[str, Any] = {}\n        if expire_behaviour is not MISSING:\n            if not isinstance(expire_behaviour, ExpireBehaviour):\n                raise TypeError('expire_behaviour field must be of type ExpireBehaviour')\n\n            payload['expire_behavior'] = expire_behaviour.value\n\n        if expire_grace_period is not MISSING:\n            payload['expire_grace_period'] = expire_grace_period\n\n        if enable_emoticons is not MISSING:\n            payload['enable_emoticons'] = enable_emoticons\n\n        # This endpoint is undocumented.\n        # Unsure if it returns the data or not as a result\n        await self._state.http.edit_integration(self.guild.id, self.id, **payload)\n\n    async def sync(self) -> None:\n        \"\"\"|coro|\n\n        Syncs the integration.\n\n        You must have :attr:`~Permissions.manage_guild` to do this.\n\n        Raises\n        -------\n        Forbidden\n            You do not have permission to sync the integration.\n        HTTPException\n            Syncing the integration failed.\n        \"\"\"\n        await self._state.http.sync_integration(self.guild.id, self.id)\n        self.synced_at = datetime.datetime.now(datetime.timezone.utc)\n\n\nclass IntegrationApplication:\n    \"\"\"Represents an application for a bot integration.\n\n    .. versionadded:: 2.0\n\n    Attributes\n    ----------\n    id: :class:`int`\n        The ID for this application.\n    name: :class:`str`\n        The application's name.\n    icon: Optional[:class:`str`]\n        The application's icon hash.\n    description: :class:`str`\n        The application's description. Can be an empty string.\n    summary: :class:`str`\n        The summary of the application. Can be an empty string.\n    user: Optional[:class:`User`]\n        The bot user on this application.\n    \"\"\"\n\n    __slots__ = (\n        'id',\n        'name',\n        'icon',\n        'description',\n        'summary',\n        'user',\n    )\n\n    def __init__(self, *, data: IntegrationApplicationPayload, state: ConnectionState) -> None:\n        self.id: int = int(data['id'])\n        self.name: str = data['name']\n        self.icon: Optional[str] = data['icon']\n        self.description: str = data['description']\n        self.summary: str = data['summary']\n        user = data.get('bot')\n        self.user: Optional[User] = User(state=state, data=user) if user else None\n\n\nclass BotIntegration(Integration):\n    \"\"\"Represents a bot integration on discord.\n\n    .. versionadded:: 2.0\n\n    Attributes\n    ----------\n    id: :class:`int`\n        The integration ID.\n    name: :class:`str`\n        The integration name.\n    guild: :class:`Guild`\n        The guild of the integration.\n    type: :class:`str`\n        The integration type (i.e. Twitch).\n    enabled: :class:`bool`\n        Whether the integration is currently enabled.\n    user: :class:`User`\n        The user that added this integration.\n    account: :class:`IntegrationAccount`\n        The integration account information.\n    application: :class:`IntegrationApplication`\n        The application tied to this integration.\n    \"\"\"\n\n    __slots__ = ('application',)\n\n    def _from_data(self, data: BotIntegrationPayload) -> None:\n        super()._from_data(data)\n        self.application: IntegrationApplication = IntegrationApplication(data=data['application'], state=self._state)\n\n\nclass PartialIntegration:\n    \"\"\"Represents a partial guild integration.\n\n    .. versionadded:: 2.0\n\n    Attributes\n    -----------\n    id: :class:`int`\n        The integration ID.\n    name: :class:`str`\n        The integration name.\n    guild: :class:`Guild`\n        The guild of the integration.\n    type: :class:`str`\n        The integration type (i.e. Twitch).\n    account: :class:`IntegrationAccount`\n        The account linked to this integration.\n    application_id: Optional[:class:`int`]\n        The id of the application this integration belongs to.\n    \"\"\"\n\n    __slots__ = (\n        'guild',\n        '_state',\n        'id',\n        'type',\n        'name',\n        'account',\n        'application_id',\n    )\n\n    def __init__(self, *, data: PartialIntegrationPayload, guild: Guild):\n        self.guild: Guild = guild\n        self._state: ConnectionState = guild._state\n        self._from_data(data)\n\n    def __repr__(self) -> str:\n        return f'<{self.__class__.__name__} id={self.id} name={self.name!r}>'\n\n    def _from_data(self, data: PartialIntegrationPayload) -> None:\n        self.id: int = int(data['id'])\n        self.type: IntegrationType = data['type']\n        self.name: str = data['name']\n        self.account: IntegrationAccount = IntegrationAccount(data['account'])\n        self.application_id: Optional[int] = _get_as_snowflake(data, 'application_id')\n\n\ndef _integration_factory(value: str) -> Tuple[Type[Integration], str]:\n    if value == 'discord':\n        return BotIntegration, value\n    elif value in ('twitch', 'youtube'):\n        return StreamIntegration, value\n    else:\n        return Integration, value\n"
  },
  {
    "path": "discord/interactions.py",
    "content": "# -*- coding: utf-8 -*-\n\n\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom __future__ import annotations\n\nimport logging\nfrom typing import Any, Dict, Optional, Generic, TYPE_CHECKING, Sequence, Tuple, Union, List\nimport asyncio\nimport datetime\n\nfrom . import utils\nfrom .enums import try_enum, Locale, InteractionType, InteractionResponseType\nfrom .errors import InteractionResponded, HTTPException, ClientException, DiscordException\nfrom .flags import MessageFlags\nfrom .channel import ChannelType\nfrom ._types import ClientT\nfrom .sku import Entitlement\n\nfrom .user import User\nfrom .member import Member\nfrom .message import Message, Attachment\nfrom .permissions import Permissions\nfrom .http import handle_message_parameters\nfrom .webhook.async_ import async_context, Webhook, interaction_response_params, interaction_message_response_params\nfrom .app_commands.installs import AppCommandContext\nfrom .app_commands.namespace import Namespace\nfrom .app_commands.translator import locale_str, TranslationContext, TranslationContextLocation\nfrom .channel import _threaded_channel_factory\n\n__all__ = (\n    'Interaction',\n    'InteractionMessage',\n    'InteractionResponse',\n)\n\nif TYPE_CHECKING:\n    from .types.interactions import (\n        Interaction as InteractionPayload,\n        InteractionData,\n        ApplicationCommandInteractionData,\n    )\n    from .types.webhook import (\n        Webhook as WebhookPayload,\n    )\n    from .types.snowflake import Snowflake\n    from .guild import Guild\n    from .state import ConnectionState\n    from .file import File\n    from .mentions import AllowedMentions\n    from aiohttp import ClientSession\n    from .embeds import Embed\n    from .ui.view import View\n    from .app_commands.models import Choice, ChoiceT\n    from .ui.modal import Modal\n    from .channel import VoiceChannel, StageChannel, TextChannel, ForumChannel, CategoryChannel, DMChannel, GroupChannel\n    from .threads import Thread\n    from .app_commands.commands import Command, ContextMenu\n    from .poll import Poll\n\n    InteractionChannel = Union[\n        VoiceChannel,\n        StageChannel,\n        TextChannel,\n        ForumChannel,\n        CategoryChannel,\n        Thread,\n        DMChannel,\n        GroupChannel,\n    ]\n\nMISSING: Any = utils.MISSING\n\n\nclass Interaction(Generic[ClientT]):\n    \"\"\"Represents a Discord interaction.\n\n    An interaction happens when a user does an action that needs to\n    be notified. Current examples are slash commands and components.\n\n    .. versionadded:: 2.0\n\n    Attributes\n    -----------\n    id: :class:`int`\n        The interaction's ID.\n    type: :class:`InteractionType`\n        The interaction type.\n    guild_id: Optional[:class:`int`]\n        The guild ID the interaction was sent from.\n    channel: Optional[Union[:class:`abc.GuildChannel`, :class:`abc.PrivateChannel`, :class:`Thread`]]\n        The channel the interaction was sent from.\n\n        Note that due to a Discord limitation, if sent from a DM channel :attr:`~DMChannel.recipient` is ``None``.\n    entitlement_sku_ids: List[:class:`int`]\n        The entitlement SKU IDs that the user has.\n    entitlements: List[:class:`Entitlement`]\n        The entitlements that the guild or user has.\n    application_id: :class:`int`\n        The application ID that the interaction was for.\n    user: Union[:class:`User`, :class:`Member`]\n        The user or member that sent the interaction.\n    message: Optional[:class:`Message`]\n        The message that sent this interaction.\n\n        This is only available for :attr:`InteractionType.component` interactions.\n    token: :class:`str`\n        The token to continue the interaction. These are valid\n        for 15 minutes.\n    data: :class:`dict`\n        The raw interaction data.\n    locale: :class:`Locale`\n        The locale of the user invoking the interaction.\n    guild_locale: Optional[:class:`Locale`]\n        The preferred locale of the guild the interaction was sent from, if any.\n    extras: :class:`dict`\n        A dictionary that can be used to store extraneous data for use during\n        interaction processing. The library will not touch any values or keys\n        within this dictionary.\n    command_failed: :class:`bool`\n        Whether the command associated with this interaction failed to execute.\n        This includes checks and execution.\n    context: :class:`.AppCommandContext`\n        The context of the interaction.\n\n        .. versionadded:: 2.4\n    \"\"\"\n\n    __slots__: Tuple[str, ...] = (\n        'id',\n        'type',\n        'guild_id',\n        'data',\n        'application_id',\n        'message',\n        'user',\n        'token',\n        'version',\n        'locale',\n        'guild_locale',\n        'extras',\n        'command_failed',\n        'entitlement_sku_ids',\n        'entitlements',\n        \"context\",\n        '_integration_owners',\n        '_permissions',\n        '_app_permissions',\n        '_state',\n        '_client',\n        '_session',\n        '_baton',\n        '_original_response',\n        '_cs_response',\n        '_cs_followup',\n        'channel',\n        '_cs_namespace',\n        '_cs_command',\n    )\n\n    def __init__(self, *, data: InteractionPayload, state: ConnectionState[ClientT]):\n        self._state: ConnectionState[ClientT] = state\n        self._client: ClientT = state._get_client()\n        self._session: ClientSession = state.http._HTTPClient__session  # type: ignore # Mangled attribute for __session\n        self._original_response: Optional[InteractionMessage] = None\n        # This baton is used for extra data that might be useful for the lifecycle of\n        # an interaction. This is mainly for internal purposes and it gives it a free-for-all slot.\n        self._baton: Any = MISSING\n        self.extras: Dict[Any, Any] = {}\n        self.command_failed: bool = False\n        self._from_data(data)\n\n    def _from_data(self, data: InteractionPayload):\n        self.id: int = int(data['id'])\n        self.type: InteractionType = try_enum(InteractionType, data['type'])\n        self.data: Optional[InteractionData] = data.get('data')\n        self.token: str = data['token']\n        self.version: int = data['version']\n        self.guild_id: Optional[int] = utils._get_as_snowflake(data, 'guild_id')\n        self.channel: Optional[InteractionChannel] = None\n        self.application_id: int = int(data['application_id'])\n        self.entitlement_sku_ids: List[int] = [int(x) for x in data.get('entitlement_skus', []) or []]\n        self.entitlements: List[Entitlement] = [Entitlement(self._state, x) for x in data.get('entitlements', [])]\n        # This is not entirely useful currently, unsure how to expose it in a way that it is.\n        self._integration_owners: Dict[int, Snowflake] = {\n            int(k): int(v) for k, v in data.get('authorizing_integration_owners', {}).items()\n        }\n        try:\n            self.context = AppCommandContext._from_value([data['context']])\n        except KeyError:\n            self.context = AppCommandContext()\n\n        self.locale: Locale = try_enum(Locale, data.get('locale', 'en-US'))\n        self.guild_locale: Optional[Locale]\n        try:\n            self.guild_locale = try_enum(Locale, data['guild_locale'])\n        except KeyError:\n            self.guild_locale = None\n\n        guild = None\n        if self.guild_id:\n            # The data type is a TypedDict but it doesn't narrow to Dict[str, Any] properly\n            guild = self._state._get_or_create_unavailable_guild(self.guild_id, data=data.get('guild'))  # type: ignore\n            if guild.me is None and self._client.user is not None:\n                guild._add_member(Member._from_client_user(user=self._client.user, guild=guild, state=self._state))\n\n        raw_channel = data.get('channel', {})\n        channel_id = utils._get_as_snowflake(raw_channel, 'id')\n        if channel_id is not None and guild is not None:\n            self.channel = guild and guild._resolve_channel(channel_id)\n\n        raw_ch_type = raw_channel.get('type')\n        if self.channel is None and raw_ch_type is not None:\n            factory, ch_type = _threaded_channel_factory(raw_ch_type)  # type is never None\n            if factory is None:\n                logging.info('Unknown channel type {type} for channel ID {id}.'.format_map(raw_channel))\n            else:\n                if ch_type in (ChannelType.group, ChannelType.private):\n                    self.channel = factory(me=self._client.user, data=raw_channel, state=self._state)  # type: ignore\n                elif guild is not None:\n                    self.channel = factory(guild=guild, state=self._state, data=raw_channel)  # type: ignore\n\n        self.message: Optional[Message]\n        try:\n            # The channel and message payloads are mismatched yet handled properly at runtime\n            self.message = Message(state=self._state, channel=self.channel, data=data['message'])  # type: ignore\n        except KeyError:\n            self.message = None\n\n        self.user: Union[User, Member] = MISSING\n        self._permissions: int = 0\n        self._app_permissions: int = int(data.get('app_permissions', 0))\n\n        if guild is not None:\n            # Upgrade Message.guild in case it's missing with partial guild data\n            if self.message is not None and self.message.guild is None:\n                self.message.guild = guild\n\n            try:\n                member = data['member']  # type: ignore # The key is optional and handled\n            except KeyError:\n                pass\n            else:\n                self.user = Member(state=self._state, guild=guild, data=member)\n                self._permissions = self.user._permissions or 0\n        else:\n            try:\n                self.user = User(state=self._state, data=data['user'])  # type: ignore # The key is optional and handled\n            except KeyError:\n                pass\n\n    @property\n    def client(self) -> ClientT:\n        \"\"\":class:`Client`: The client that is handling this interaction.\n\n        Note that :class:`AutoShardedClient`, :class:`~.commands.Bot`, and\n        :class:`~.commands.AutoShardedBot` are all subclasses of client.\n        \"\"\"\n        return self._client\n\n    @property\n    def guild(self) -> Optional[Guild]:\n        \"\"\"Optional[:class:`Guild`]: The guild the interaction was sent from.\"\"\"\n        # The user.guild attribute is set in __init__ to the fallback guild if available\n        # Therefore, we can use that instead of recreating it every time this property is\n        # accessed\n        return (self._state and self._state._get_guild(self.guild_id)) or getattr(self.user, 'guild', None)\n\n    @property\n    def channel_id(self) -> Optional[int]:\n        \"\"\"Optional[:class:`int`]: The ID of the channel the interaction was sent from.\"\"\"\n        return self.channel.id if self.channel is not None else None\n\n    @property\n    def permissions(self) -> Permissions:\n        \"\"\":class:`Permissions`: The resolved permissions of the member in the channel, including overwrites.\n\n        In a non-guild context where this doesn't apply, an empty permissions object is returned.\n        \"\"\"\n        return Permissions(self._permissions)\n\n    @property\n    def app_permissions(self) -> Permissions:\n        \"\"\":class:`Permissions`: The resolved permissions of the application or the bot, including overwrites.\"\"\"\n        return Permissions(self._app_permissions)\n\n    @utils.cached_slot_property('_cs_namespace')\n    def namespace(self) -> Namespace:\n        \"\"\":class:`app_commands.Namespace`: The resolved namespace for this interaction.\n\n        If the interaction is not an application command related interaction or the client does not have a\n        tree attached to it then this returns an empty namespace.\n        \"\"\"\n        if self.type not in (InteractionType.application_command, InteractionType.autocomplete):\n            return Namespace(self, {}, [])\n\n        tree = self._state._command_tree\n        if tree is None:\n            return Namespace(self, {}, [])\n\n        # The type checker does not understand this narrowing\n        data: ApplicationCommandInteractionData = self.data  # type: ignore\n\n        try:\n            _, options = tree._get_app_command_options(data)\n        except DiscordException:\n            options = []\n\n        return Namespace(self, data.get('resolved', {}), options)\n\n    @utils.cached_slot_property('_cs_command')\n    def command(self) -> Optional[Union[Command[Any, ..., Any], ContextMenu]]:\n        \"\"\"Optional[Union[:class:`app_commands.Command`, :class:`app_commands.ContextMenu`]]: The command being called from\n        this interaction.\n\n        If the interaction is not an application command related interaction or the command is not found in the client's\n        attached tree then ``None`` is returned.\n        \"\"\"\n        if self.type not in (InteractionType.application_command, InteractionType.autocomplete):\n            return None\n\n        tree = self._state._command_tree\n        if tree is None:\n            return None\n\n        # The type checker does not understand this narrowing\n        data: ApplicationCommandInteractionData = self.data  # type: ignore\n        cmd_type = data.get('type', 1)\n        if cmd_type == 1:\n            try:\n                command, _ = tree._get_app_command_options(data)\n            except DiscordException:\n                return None\n            else:\n                return command\n        else:\n            return tree._get_context_menu(data)\n\n    @utils.cached_slot_property('_cs_response')\n    def response(self) -> InteractionResponse[ClientT]:\n        \"\"\":class:`InteractionResponse`: Returns an object responsible for handling responding to the interaction.\n\n        A response can only be done once. If secondary messages need to be sent, consider using :attr:`followup`\n        instead.\n        \"\"\"\n        return InteractionResponse(self)\n\n    @utils.cached_slot_property('_cs_followup')\n    def followup(self) -> Webhook:\n        \"\"\":class:`Webhook`: Returns the follow up webhook for follow up interactions.\"\"\"\n        payload: WebhookPayload = {\n            'id': self.application_id,\n            'type': 3,\n            'token': self.token,\n        }\n        return Webhook.from_state(data=payload, state=self._state)\n\n    @property\n    def created_at(self) -> datetime.datetime:\n        \"\"\":class:`datetime.datetime`: When the interaction was created.\"\"\"\n        return utils.snowflake_time(self.id)\n\n    @property\n    def expires_at(self) -> datetime.datetime:\n        \"\"\":class:`datetime.datetime`: When the interaction expires.\"\"\"\n        return self.created_at + datetime.timedelta(minutes=15)\n\n    def is_expired(self) -> bool:\n        \"\"\":class:`bool`: Returns ``True`` if the interaction is expired.\"\"\"\n        return utils.utcnow() >= self.expires_at\n\n    def is_guild_integration(self) -> bool:\n        \"\"\":class:`bool`: Returns ``True`` if the interaction is a guild integration.\n\n        .. versionadded:: 2.4\n        \"\"\"\n        if self.guild_id:\n            return self.guild_id == self._integration_owners.get(0)\n        return False\n\n    def is_user_integration(self) -> bool:\n        \"\"\":class:`bool`: Returns ``True`` if the interaction is a user integration.\n\n        .. versionadded:: 2.4\n        \"\"\"\n        return self.user.id == self._integration_owners.get(1)\n\n    async def original_response(self) -> InteractionMessage:\n        \"\"\"|coro|\n\n        Fetches the original interaction response message associated with the interaction.\n\n        If the interaction response was a newly created message (i.e. through :meth:`InteractionResponse.send_message`\n        or :meth:`InteractionResponse.defer`, where ``thinking`` is ``True``) then this returns the message that was sent\n        using that response. Otherwise, this returns the message that triggered the interaction (i.e.\n        through a component).\n\n        Repeated calls to this will return a cached value.\n\n        Raises\n        -------\n        HTTPException\n            Fetching the original response message failed.\n        ClientException\n            The channel for the message could not be resolved.\n        NotFound\n            The interaction response message does not exist.\n\n        Returns\n        --------\n        InteractionMessage\n            The original interaction response message.\n        \"\"\"\n\n        if self._original_response is not None:\n            return self._original_response\n\n        # TODO: fix later to not raise?\n        channel = self.channel\n        if channel is None:\n            raise ClientException('Channel for message could not be resolved')\n\n        adapter = async_context.get()\n        http = self._state.http\n        data = await adapter.get_original_interaction_response(\n            application_id=self.application_id,\n            token=self.token,\n            session=self._session,\n            proxy=http.proxy,\n            proxy_auth=http.proxy_auth,\n        )\n        state = _InteractionMessageState(self, self._state)\n        # The state and channel parameters are mocked here\n        message = InteractionMessage(state=state, channel=channel, data=data)  # type: ignore\n        self._original_response = message\n        return message\n\n    async def edit_original_response(\n        self,\n        *,\n        content: Optional[str] = MISSING,\n        embeds: Sequence[Embed] = MISSING,\n        embed: Optional[Embed] = MISSING,\n        attachments: Sequence[Union[Attachment, File]] = MISSING,\n        view: Optional[View] = MISSING,\n        allowed_mentions: Optional[AllowedMentions] = None,\n    ) -> InteractionMessage:\n        \"\"\"|coro|\n\n        Edits the original interaction response message.\n\n        This is a lower level interface to :meth:`InteractionMessage.edit` in case\n        you do not want to fetch the message and save an HTTP request.\n\n        This method is also the only way to edit the original message if\n        the message sent was ephemeral.\n\n        Parameters\n        ------------\n        content: Optional[:class:`str`]\n            The content to edit the message with or ``None`` to clear it.\n        embeds: List[:class:`Embed`]\n            A list of embeds to edit the message with.\n        embed: Optional[:class:`Embed`]\n            The embed to edit the message with. ``None`` suppresses the embeds.\n            This should not be mixed with the ``embeds`` parameter.\n        attachments: List[Union[:class:`Attachment`, :class:`File`]]\n            A list of attachments to keep in the message as well as new files to upload. If ``[]`` is passed\n            then all attachments are removed.\n\n            .. note::\n\n                New files will always appear after current attachments.\n\n        allowed_mentions: :class:`AllowedMentions`\n            Controls the mentions being processed in this message.\n            See :meth:`.abc.Messageable.send` for more information.\n        view: Optional[:class:`~discord.ui.View`]\n            The updated view to update this message with. If ``None`` is passed then\n            the view is removed.\n\n        Raises\n        -------\n        HTTPException\n            Editing the message failed.\n        NotFound\n            The interaction response message does not exist.\n        Forbidden\n            Edited a message that is not yours.\n        TypeError\n            You specified both ``embed`` and ``embeds``\n        ValueError\n            The length of ``embeds`` was invalid.\n\n        Returns\n        --------\n        :class:`InteractionMessage`\n            The newly edited message.\n        \"\"\"\n\n        previous_mentions: Optional[AllowedMentions] = self._state.allowed_mentions\n        with handle_message_parameters(\n            content=content,\n            attachments=attachments,\n            embed=embed,\n            embeds=embeds,\n            view=view,\n            allowed_mentions=allowed_mentions,\n            previous_allowed_mentions=previous_mentions,\n        ) as params:\n            adapter = async_context.get()\n            http = self._state.http\n            data = await adapter.edit_original_interaction_response(\n                self.application_id,\n                self.token,\n                session=self._session,\n                proxy=http.proxy,\n                proxy_auth=http.proxy_auth,\n                payload=params.payload,\n                multipart=params.multipart,\n                files=params.files,\n            )\n\n        # The message channel types should always match\n        state = _InteractionMessageState(self, self._state)\n        message = InteractionMessage(state=state, channel=self.channel, data=data)  # type: ignore\n        if view and not view.is_finished():\n            self._state.store_view(view, message.id, interaction_id=self.id)\n        return message\n\n    async def delete_original_response(self) -> None:\n        \"\"\"|coro|\n\n        Deletes the original interaction response message.\n\n        This is a lower level interface to :meth:`InteractionMessage.delete` in case\n        you do not want to fetch the message and save an HTTP request.\n\n        Raises\n        -------\n        HTTPException\n            Deleting the message failed.\n        NotFound\n            The interaction response message does not exist or has already been deleted.\n        Forbidden\n            Deleted a message that is not yours.\n        \"\"\"\n        adapter = async_context.get()\n        http = self._state.http\n        await adapter.delete_original_interaction_response(\n            self.application_id,\n            self.token,\n            session=self._session,\n            proxy=http.proxy,\n            proxy_auth=http.proxy_auth,\n        )\n\n    async def translate(\n        self, string: Union[str, locale_str], *, locale: Locale = MISSING, data: Any = MISSING\n    ) -> Optional[str]:\n        \"\"\"|coro|\n\n        Translates a string using the set :class:`~discord.app_commands.Translator`.\n\n        .. versionadded:: 2.1\n\n        Parameters\n        ----------\n        string: Union[:class:`str`, :class:`~discord.app_commands.locale_str`]\n            The string to translate.\n            :class:`~discord.app_commands.locale_str` can be used to add more context,\n            information, or any metadata necessary.\n        locale: :class:`Locale`\n            The locale to use, this is handy if you want the translation\n            for a specific locale.\n            Defaults to the user's :attr:`.locale`.\n        data: Any\n            The extraneous data that is being translated.\n            If not specified, either :attr:`.command` or :attr:`.message` will be passed,\n            depending on which is available in the context.\n\n        Returns\n        --------\n        Optional[:class:`str`]\n            The translated string, or ``None`` if a translator was not set.\n        \"\"\"\n        translator = self._state._translator\n        if not translator:\n            return None\n\n        if not isinstance(string, locale_str):\n            string = locale_str(string)\n        if locale is MISSING:\n            locale = self.locale\n        if data is MISSING:\n            data = self.command or self.message\n\n        context = TranslationContext(location=TranslationContextLocation.other, data=data)\n        return await translator.translate(string, locale=locale, context=context)\n\n\nclass InteractionResponse(Generic[ClientT]):\n    \"\"\"Represents a Discord interaction response.\n\n    This type can be accessed through :attr:`Interaction.response`.\n\n    .. versionadded:: 2.0\n    \"\"\"\n\n    __slots__: Tuple[str, ...] = (\n        '_response_type',\n        '_parent',\n    )\n\n    def __init__(self, parent: Interaction[ClientT]):\n        self._parent: Interaction[ClientT] = parent\n        self._response_type: Optional[InteractionResponseType] = None\n\n    def is_done(self) -> bool:\n        \"\"\":class:`bool`: Indicates whether an interaction response has been done before.\n\n        An interaction can only be responded to once.\n        \"\"\"\n        return self._response_type is not None\n\n    @property\n    def type(self) -> Optional[InteractionResponseType]:\n        \"\"\":class:`InteractionResponseType`: The type of response that was sent, ``None`` if response is not done.\"\"\"\n        return self._response_type\n\n    async def defer(self, *, ephemeral: bool = False, thinking: bool = False) -> None:\n        \"\"\"|coro|\n\n        Defers the interaction response.\n\n        This is typically used when the interaction is acknowledged\n        and a secondary action will be done later.\n\n        This is only supported with the following interaction types:\n\n        - :attr:`InteractionType.application_command`\n        - :attr:`InteractionType.component`\n        - :attr:`InteractionType.modal_submit`\n\n        Parameters\n        -----------\n        ephemeral: :class:`bool`\n            Indicates whether the deferred message will eventually be ephemeral.\n            This only applies to :attr:`InteractionType.application_command` interactions, or if ``thinking`` is ``True``.\n        thinking: :class:`bool`\n            Indicates whether the deferred type should be :attr:`InteractionResponseType.deferred_channel_message`\n            instead of the default :attr:`InteractionResponseType.deferred_message_update` if both are valid.\n            In UI terms, this is represented as if the bot is thinking of a response. It is your responsibility to\n            eventually send a followup message via :attr:`Interaction.followup` to make this thinking state go away.\n            Application commands (AKA Slash commands) cannot use :attr:`InteractionResponseType.deferred_message_update`.\n\n        Raises\n        -------\n        HTTPException\n            Deferring the interaction failed.\n        InteractionResponded\n            This interaction has already been responded to before.\n        \"\"\"\n        if self._response_type:\n            raise InteractionResponded(self._parent)\n\n        defer_type: int = 0\n        data: Optional[Dict[str, Any]] = None\n        parent = self._parent\n        if parent.type is InteractionType.component or parent.type is InteractionType.modal_submit:\n            defer_type = (\n                InteractionResponseType.deferred_channel_message.value\n                if thinking\n                else InteractionResponseType.deferred_message_update.value\n            )\n            if thinking and ephemeral:\n                data = {'flags': 64}\n        elif parent.type is InteractionType.application_command:\n            defer_type = InteractionResponseType.deferred_channel_message.value\n            if ephemeral:\n                data = {'flags': 64}\n\n        if defer_type:\n            adapter = async_context.get()\n            params = interaction_response_params(type=defer_type, data=data)\n            http = parent._state.http\n            await adapter.create_interaction_response(\n                parent.id,\n                parent.token,\n                session=parent._session,\n                proxy=http.proxy,\n                proxy_auth=http.proxy_auth,\n                params=params,\n            )\n            self._response_type = InteractionResponseType(defer_type)\n\n    async def pong(self) -> None:\n        \"\"\"|coro|\n\n        Pongs the ping interaction.\n\n        This should rarely be used.\n\n        Raises\n        -------\n        HTTPException\n            Ponging the interaction failed.\n        InteractionResponded\n            This interaction has already been responded to before.\n        \"\"\"\n        if self._response_type:\n            raise InteractionResponded(self._parent)\n\n        parent = self._parent\n        if parent.type is InteractionType.ping:\n            adapter = async_context.get()\n            params = interaction_response_params(InteractionResponseType.pong.value)\n            http = parent._state.http\n            await adapter.create_interaction_response(\n                parent.id,\n                parent.token,\n                session=parent._session,\n                proxy=http.proxy,\n                proxy_auth=http.proxy_auth,\n                params=params,\n            )\n            self._response_type = InteractionResponseType.pong\n\n    async def send_message(\n        self,\n        content: Optional[Any] = None,\n        *,\n        embed: Embed = MISSING,\n        embeds: Sequence[Embed] = MISSING,\n        file: File = MISSING,\n        files: Sequence[File] = MISSING,\n        view: View = MISSING,\n        tts: bool = False,\n        ephemeral: bool = False,\n        allowed_mentions: AllowedMentions = MISSING,\n        suppress_embeds: bool = False,\n        silent: bool = False,\n        delete_after: Optional[float] = None,\n        poll: Poll = MISSING,\n    ) -> None:\n        \"\"\"|coro|\n\n        Responds to this interaction by sending a message.\n\n        Parameters\n        -----------\n        content: Optional[:class:`str`]\n            The content of the message to send.\n        embeds: List[:class:`Embed`]\n            A list of embeds to send with the content. Maximum of 10. This cannot\n            be mixed with the ``embed`` parameter.\n        embed: :class:`Embed`\n            The rich embed for the content to send. This cannot be mixed with\n            ``embeds`` parameter.\n        file: :class:`~discord.File`\n            The file to upload.\n        files: List[:class:`~discord.File`]\n            A list of files to upload. Must be a maximum of 10.\n        tts: :class:`bool`\n            Indicates if the message should be sent using text-to-speech.\n        view: :class:`discord.ui.View`\n            The view to send with the message.\n        ephemeral: :class:`bool`\n            Indicates if the message should only be visible to the user who started the interaction.\n            If a view is sent with an ephemeral message and it has no timeout set then the timeout\n            is set to 15 minutes.\n        allowed_mentions: :class:`~discord.AllowedMentions`\n            Controls the mentions being processed in this message. See :meth:`.abc.Messageable.send` for\n            more information.\n        suppress_embeds: :class:`bool`\n            Whether to suppress embeds for the message. This sends the message without any embeds if set to ``True``.\n        silent: :class:`bool`\n            Whether to suppress push and desktop notifications for the message. This will increment the mention counter\n            in the UI, but will not actually send a notification.\n\n            .. versionadded:: 2.2\n        delete_after: :class:`float`\n            If provided, the number of seconds to wait in the background\n            before deleting the message we just sent. If the deletion fails,\n            then it is silently ignored.\n\n            .. versionadded:: 2.1\n        poll: :class:`~discord.Poll`\n            The poll to send with this message.\n\n            .. versionadded:: 2.4\n\n        Raises\n        -------\n        HTTPException\n            Sending the message failed.\n        TypeError\n            You specified both ``embed`` and ``embeds`` or ``file`` and ``files``.\n        ValueError\n            The length of ``embeds`` was invalid.\n        InteractionResponded\n            This interaction has already been responded to before.\n        \"\"\"\n        if self._response_type:\n            raise InteractionResponded(self._parent)\n\n        if ephemeral or suppress_embeds or silent:\n            flags = MessageFlags._from_value(0)\n            flags.ephemeral = ephemeral\n            flags.suppress_embeds = suppress_embeds\n            flags.suppress_notifications = silent\n        else:\n            flags = MISSING\n\n        parent = self._parent\n        adapter = async_context.get()\n        params = interaction_message_response_params(\n            type=InteractionResponseType.channel_message.value,\n            content=content,\n            tts=tts,\n            embeds=embeds,\n            embed=embed,\n            file=file,\n            files=files,\n            previous_allowed_mentions=parent._state.allowed_mentions,\n            allowed_mentions=allowed_mentions,\n            flags=flags,\n            view=view,\n            poll=poll,\n        )\n\n        http = parent._state.http\n        await adapter.create_interaction_response(\n            parent.id,\n            parent.token,\n            session=parent._session,\n            proxy=http.proxy,\n            proxy_auth=http.proxy_auth,\n            params=params,\n        )\n\n        if view is not MISSING and not view.is_finished():\n            if ephemeral and view.timeout is None:\n                view.timeout = 15 * 60.0\n\n            # If the interaction type isn't an application command then there's no way\n            # to obtain this interaction_id again, so just default to None\n            entity_id = parent.id if parent.type is InteractionType.application_command else None\n            self._parent._state.store_view(view, entity_id)\n\n        self._response_type = InteractionResponseType.channel_message\n\n        if delete_after is not None:\n\n            async def inner_call(delay: float = delete_after):\n                await asyncio.sleep(delay)\n                try:\n                    await self._parent.delete_original_response()\n                except HTTPException:\n                    pass\n\n            asyncio.create_task(inner_call())\n\n    async def edit_message(\n        self,\n        *,\n        content: Optional[Any] = MISSING,\n        embed: Optional[Embed] = MISSING,\n        embeds: Sequence[Embed] = MISSING,\n        attachments: Sequence[Union[Attachment, File]] = MISSING,\n        view: Optional[View] = MISSING,\n        allowed_mentions: Optional[AllowedMentions] = MISSING,\n        delete_after: Optional[float] = None,\n        suppress_embeds: bool = MISSING,\n    ) -> None:\n        \"\"\"|coro|\n\n        Responds to this interaction by editing the original message of\n        a component or modal interaction.\n\n        Parameters\n        -----------\n        content: Optional[:class:`str`]\n            The new content to replace the message with. ``None`` removes the content.\n        embeds: List[:class:`Embed`]\n            A list of embeds to edit the message with.\n        embed: Optional[:class:`Embed`]\n            The embed to edit the message with. ``None`` suppresses the embeds.\n            This should not be mixed with the ``embeds`` parameter.\n        attachments: List[Union[:class:`Attachment`, :class:`File`]]\n            A list of attachments to keep in the message as well as new files to upload. If ``[]`` is passed\n            then all attachments are removed.\n\n            .. note::\n\n                New files will always appear after current attachments.\n\n        view: Optional[:class:`~discord.ui.View`]\n            The updated view to update this message with. If ``None`` is passed then\n            the view is removed.\n        allowed_mentions: Optional[:class:`~discord.AllowedMentions`]\n            Controls the mentions being processed in this message. See :meth:`.Message.edit`\n            for more information.\n        delete_after: :class:`float`\n            If provided, the number of seconds to wait in the background\n            before deleting the message we just edited. If the deletion fails,\n            then it is silently ignored.\n\n            .. versionadded:: 2.2\n        suppress_embeds: :class:`bool`\n            Whether to suppress embeds for the message. This removes\n            all the embeds if set to ``True``. If set to ``False``\n            this brings the embeds back if they were suppressed.\n            Using this parameter requires :attr:`~.Permissions.manage_messages`.\n\n            .. versionadded:: 2.4\n\n        Raises\n        -------\n        HTTPException\n            Editing the message failed.\n        TypeError\n            You specified both ``embed`` and ``embeds``.\n        InteractionResponded\n            This interaction has already been responded to before.\n        \"\"\"\n        if self._response_type:\n            raise InteractionResponded(self._parent)\n\n        parent = self._parent\n        msg = parent.message\n        state = parent._state\n        if msg is not None:\n            message_id = msg.id\n            # If this was invoked via an application command then we can use its original interaction ID\n            # Since this is used as a cache key for view updates\n            original_interaction_id = msg.interaction_metadata.id if msg.interaction_metadata is not None else None\n        else:\n            message_id = None\n            original_interaction_id = None\n\n        if parent.type not in (InteractionType.component, InteractionType.modal_submit):\n            return\n\n        if view is not MISSING and message_id is not None:\n            state.prevent_view_updates_for(message_id)\n\n        if suppress_embeds is not MISSING:\n            flags = MessageFlags._from_value(0)\n            flags.suppress_embeds = suppress_embeds\n        else:\n            flags = MISSING\n\n        adapter = async_context.get()\n        params = interaction_message_response_params(\n            type=InteractionResponseType.message_update.value,\n            content=content,\n            embed=embed,\n            embeds=embeds,\n            view=view,\n            attachments=attachments,\n            previous_allowed_mentions=parent._state.allowed_mentions,\n            allowed_mentions=allowed_mentions,\n            flags=flags,\n        )\n\n        http = parent._state.http\n        await adapter.create_interaction_response(\n            parent.id,\n            parent.token,\n            session=parent._session,\n            proxy=http.proxy,\n            proxy_auth=http.proxy_auth,\n            params=params,\n        )\n\n        if view and not view.is_finished():\n            state.store_view(view, message_id, interaction_id=original_interaction_id)\n\n        self._response_type = InteractionResponseType.message_update\n\n        if delete_after is not None:\n\n            async def inner_call(delay: float = delete_after):\n                await asyncio.sleep(delay)\n                try:\n                    await self._parent.delete_original_response()\n                except HTTPException:\n                    pass\n\n            asyncio.create_task(inner_call())\n\n    async def send_modal(self, modal: Modal, /) -> None:\n        \"\"\"|coro|\n\n        Responds to this interaction by sending a modal.\n\n        Parameters\n        -----------\n        modal: :class:`~discord.ui.Modal`\n            The modal to send.\n\n        Raises\n        -------\n        HTTPException\n            Sending the modal failed.\n        InteractionResponded\n            This interaction has already been responded to before.\n        \"\"\"\n        if self._response_type:\n            raise InteractionResponded(self._parent)\n\n        parent = self._parent\n\n        adapter = async_context.get()\n        http = parent._state.http\n\n        params = interaction_response_params(InteractionResponseType.modal.value, modal.to_dict())\n        await adapter.create_interaction_response(\n            parent.id,\n            parent.token,\n            session=parent._session,\n            proxy=http.proxy,\n            proxy_auth=http.proxy_auth,\n            params=params,\n        )\n        if not modal.is_finished():\n            self._parent._state.store_view(modal)\n        self._response_type = InteractionResponseType.modal\n\n    async def autocomplete(self, choices: Sequence[Choice[ChoiceT]]) -> None:\n        \"\"\"|coro|\n\n        Responds to this interaction by giving the user the choices they can use.\n\n        Parameters\n        -----------\n        choices: List[:class:`~discord.app_commands.Choice`]\n            The list of new choices as the user is typing.\n\n        Raises\n        -------\n        HTTPException\n            Sending the choices failed.\n        ValueError\n            This interaction cannot respond with autocomplete.\n        InteractionResponded\n            This interaction has already been responded to before.\n        \"\"\"\n        if self._response_type:\n            raise InteractionResponded(self._parent)\n\n        translator = self._parent._state._translator\n        if translator is not None:\n            user_locale = self._parent.locale\n            payload: Dict[str, Any] = {\n                'choices': [await option.get_translated_payload_for_locale(translator, user_locale) for option in choices],\n            }\n        else:\n            payload: Dict[str, Any] = {\n                'choices': [option.to_dict() for option in choices],\n            }\n\n        parent = self._parent\n        if parent.type is not InteractionType.autocomplete:\n            raise ValueError('cannot respond to this interaction with autocomplete.')\n\n        adapter = async_context.get()\n        http = parent._state.http\n        params = interaction_response_params(type=InteractionResponseType.autocomplete_result.value, data=payload)\n        await adapter.create_interaction_response(\n            parent.id,\n            parent.token,\n            session=parent._session,\n            proxy=http.proxy,\n            proxy_auth=http.proxy_auth,\n            params=params,\n        )\n\n        self._response_type = InteractionResponseType.autocomplete_result\n\n\nclass _InteractionMessageState:\n    __slots__ = ('_parent', '_interaction')\n\n    def __init__(self, interaction: Interaction, parent: ConnectionState):\n        self._interaction: Interaction = interaction\n        self._parent: ConnectionState = parent\n\n    def _get_guild(self, guild_id):\n        return self._parent._get_guild(guild_id)\n\n    def store_user(self, data, *, cache: bool = True):\n        return self._parent.store_user(data, cache=cache)\n\n    def create_user(self, data):\n        return self._parent.create_user(data)\n\n    @property\n    def http(self):\n        return self._parent.http\n\n    def __getattr__(self, attr):\n        return getattr(self._parent, attr)\n\n\nclass InteractionMessage(Message):\n    \"\"\"Represents the original interaction response message.\n\n    This allows you to edit or delete the message associated with\n    the interaction response. To retrieve this object see :meth:`Interaction.original_response`.\n\n    This inherits from :class:`discord.Message` with changes to\n    :meth:`edit` and :meth:`delete` to work.\n\n    .. versionadded:: 2.0\n    \"\"\"\n\n    __slots__ = ()\n    _state: _InteractionMessageState\n\n    async def edit(\n        self,\n        *,\n        content: Optional[str] = MISSING,\n        embeds: Sequence[Embed] = MISSING,\n        embed: Optional[Embed] = MISSING,\n        attachments: Sequence[Union[Attachment, File]] = MISSING,\n        view: Optional[View] = MISSING,\n        allowed_mentions: Optional[AllowedMentions] = None,\n        delete_after: Optional[float] = None,\n    ) -> InteractionMessage:\n        \"\"\"|coro|\n\n        Edits the message.\n\n        Parameters\n        ------------\n        content: Optional[:class:`str`]\n            The content to edit the message with or ``None`` to clear it.\n        embeds: List[:class:`Embed`]\n            A list of embeds to edit the message with.\n        embed: Optional[:class:`Embed`]\n            The embed to edit the message with. ``None`` suppresses the embeds.\n            This should not be mixed with the ``embeds`` parameter.\n        attachments: List[Union[:class:`Attachment`, :class:`File`]]\n            A list of attachments to keep in the message as well as new files to upload. If ``[]`` is passed\n            then all attachments are removed.\n\n            .. note::\n\n                New files will always appear after current attachments.\n\n        allowed_mentions: :class:`AllowedMentions`\n            Controls the mentions being processed in this message.\n            See :meth:`.abc.Messageable.send` for more information.\n        view: Optional[:class:`~discord.ui.View`]\n            The updated view to update this message with. If ``None`` is passed then\n            the view is removed.\n        delete_after: Optional[:class:`float`]\n            If provided, the number of seconds to wait in the background\n            before deleting the message we just sent. If the deletion fails,\n            then it is silently ignored.\n\n            .. versionadded:: 2.2\n\n        Raises\n        -------\n        HTTPException\n            Editing the message failed.\n        Forbidden\n            Edited a message that is not yours.\n        TypeError\n            You specified both ``embed`` and ``embeds``\n        ValueError\n            The length of ``embeds`` was invalid.\n\n        Returns\n        ---------\n        :class:`InteractionMessage`\n            The newly edited message.\n        \"\"\"\n        res = await self._state._interaction.edit_original_response(\n            content=content,\n            embeds=embeds,\n            embed=embed,\n            attachments=attachments,\n            view=view,\n            allowed_mentions=allowed_mentions,\n        )\n        if delete_after is not None:\n            await self.delete(delay=delete_after)\n        return res\n\n    async def add_files(self, *files: File) -> InteractionMessage:\n        r\"\"\"|coro|\n\n        Adds new files to the end of the message attachments.\n\n        .. versionadded:: 2.0\n\n        Parameters\n        -----------\n        \\*files: :class:`File`\n            New files to add to the message.\n\n        Raises\n        -------\n        HTTPException\n            Editing the message failed.\n        Forbidden\n            Tried to edit a message that isn't yours.\n\n        Returns\n        ---------\n        :class:`InteractionMessage`\n            The newly edited message.\n        \"\"\"\n        return await self.edit(attachments=[*self.attachments, *files])\n\n    async def remove_attachments(self, *attachments: Attachment) -> InteractionMessage:\n        r\"\"\"|coro|\n\n        Removes attachments from the message.\n\n        .. versionadded:: 2.0\n\n        Parameters\n        -----------\n        \\*attachments: :class:`Attachment`\n            Attachments to remove from the message.\n\n        Raises\n        -------\n        HTTPException\n            Editing the message failed.\n        Forbidden\n            Tried to edit a message that isn't yours.\n\n        Returns\n        ---------\n        :class:`InteractionMessage`\n            The newly edited message.\n        \"\"\"\n        return await self.edit(attachments=[a for a in self.attachments if a not in attachments])\n\n    async def delete(self, *, delay: Optional[float] = None) -> None:\n        \"\"\"|coro|\n\n        Deletes the message.\n\n        Parameters\n        -----------\n        delay: Optional[:class:`float`]\n            If provided, the number of seconds to wait before deleting the message.\n            The waiting is done in the background and deletion failures are ignored.\n\n        Raises\n        ------\n        Forbidden\n            You do not have proper permissions to delete the message.\n        NotFound\n            The message was deleted already.\n        HTTPException\n            Deleting the message failed.\n        \"\"\"\n\n        if delay is not None:\n\n            async def inner_call(delay: float = delay):\n                await asyncio.sleep(delay)\n                try:\n                    await self._state._interaction.delete_original_response()\n                except HTTPException:\n                    pass\n\n            asyncio.create_task(inner_call())\n        else:\n            await self._state._interaction.delete_original_response()\n"
  },
  {
    "path": "discord/invite.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom __future__ import annotations\n\nfrom typing import List, Optional, Union, TYPE_CHECKING\nfrom .asset import Asset\nfrom .utils import parse_time, snowflake_time, _get_as_snowflake\nfrom .object import Object\nfrom .mixins import Hashable\nfrom .enums import ChannelType, NSFWLevel, VerificationLevel, InviteTarget, InviteType, try_enum\nfrom .appinfo import PartialAppInfo\nfrom .scheduled_event import ScheduledEvent\n\n__all__ = (\n    'PartialInviteChannel',\n    'PartialInviteGuild',\n    'Invite',\n)\n\nif TYPE_CHECKING:\n    from typing_extensions import Self\n\n    from .types.invite import (\n        Invite as InvitePayload,\n        InviteGuild as InviteGuildPayload,\n        GatewayInvite as GatewayInvitePayload,\n    )\n    from .types.guild import GuildFeature\n    from .types.channel import (\n        PartialChannel as InviteChannelPayload,\n    )\n    from .state import ConnectionState\n    from .guild import Guild\n    from .abc import GuildChannel\n    from .user import User\n    from .abc import Snowflake\n\n    InviteGuildType = Union[Guild, 'PartialInviteGuild', Object]\n    InviteChannelType = Union[GuildChannel, 'PartialInviteChannel', Object]\n\n    import datetime\n\n\nclass PartialInviteChannel:\n    \"\"\"Represents a \"partial\" invite channel.\n\n    This model will be given when the user is not part of the\n    guild the :class:`Invite` resolves to.\n\n    .. container:: operations\n\n        .. describe:: x == y\n\n            Checks if two partial channels are the same.\n\n        .. describe:: x != y\n\n            Checks if two partial channels are not the same.\n\n        .. describe:: hash(x)\n\n            Return the partial channel's hash.\n\n        .. describe:: str(x)\n\n            Returns the partial channel's name.\n\n    Attributes\n    -----------\n    name: :class:`str`\n        The partial channel's name.\n    id: :class:`int`\n        The partial channel's ID.\n    type: :class:`ChannelType`\n        The partial channel's type.\n    \"\"\"\n\n    __slots__ = ('id', 'name', 'type')\n\n    def __init__(self, data: InviteChannelPayload):\n        self.id: int = int(data['id'])\n        self.name: str = data['name']\n        self.type: ChannelType = try_enum(ChannelType, data['type'])\n\n    def __str__(self) -> str:\n        return self.name\n\n    def __repr__(self) -> str:\n        return f'<PartialInviteChannel id={self.id} name={self.name} type={self.type!r}>'\n\n    @property\n    def mention(self) -> str:\n        \"\"\":class:`str`: The string that allows you to mention the channel.\"\"\"\n        return f'<#{self.id}>'\n\n    @property\n    def created_at(self) -> datetime.datetime:\n        \"\"\":class:`datetime.datetime`: Returns the channel's creation time in UTC.\"\"\"\n        return snowflake_time(self.id)\n\n\nclass PartialInviteGuild:\n    \"\"\"Represents a \"partial\" invite guild.\n\n    This model will be given when the user is not part of the\n    guild the :class:`Invite` resolves to.\n\n    .. container:: operations\n\n        .. describe:: x == y\n\n            Checks if two partial guilds are the same.\n\n        .. describe:: x != y\n\n            Checks if two partial guilds are not the same.\n\n        .. describe:: hash(x)\n\n            Return the partial guild's hash.\n\n        .. describe:: str(x)\n\n            Returns the partial guild's name.\n\n    Attributes\n    -----------\n    name: :class:`str`\n        The partial guild's name.\n    id: :class:`int`\n        The partial guild's ID.\n    verification_level: :class:`VerificationLevel`\n        The partial guild's verification level.\n    features: List[:class:`str`]\n        A list of features the guild has. See :attr:`Guild.features` for more information.\n    description: Optional[:class:`str`]\n        The partial guild's description.\n    nsfw_level: :class:`NSFWLevel`\n        The partial guild's NSFW level.\n\n        .. versionadded:: 2.0\n    vanity_url_code: Optional[:class:`str`]\n        The partial guild's vanity URL code, if available.\n\n        .. versionadded:: 2.0\n    premium_subscription_count: :class:`int`\n        The number of \"boosts\" the partial guild currently has.\n\n        .. versionadded:: 2.0\n    \"\"\"\n\n    __slots__ = (\n        '_state',\n        '_icon',\n        '_banner',\n        '_splash',\n        'features',\n        'id',\n        'name',\n        'verification_level',\n        'description',\n        'vanity_url_code',\n        'nsfw_level',\n        'premium_subscription_count',\n    )\n\n    def __init__(self, state: ConnectionState, data: InviteGuildPayload, id: int):\n        self._state: ConnectionState = state\n        self.id: int = id\n        self.name: str = data['name']\n        self.features: List[GuildFeature] = data.get('features', [])\n        self._icon: Optional[str] = data.get('icon')\n        self._banner: Optional[str] = data.get('banner')\n        self._splash: Optional[str] = data.get('splash')\n        self.verification_level: VerificationLevel = try_enum(VerificationLevel, data.get('verification_level'))\n        self.description: Optional[str] = data.get('description')\n        self.vanity_url_code: Optional[str] = data.get('vanity_url_code')\n        self.nsfw_level: NSFWLevel = try_enum(NSFWLevel, data.get('nsfw_level', 0))\n        self.premium_subscription_count: int = data.get('premium_subscription_count') or 0\n\n    def __str__(self) -> str:\n        return self.name\n\n    def __repr__(self) -> str:\n        return (\n            f'<{self.__class__.__name__} id={self.id} name={self.name!r} features={self.features} '\n            f'description={self.description!r}>'\n        )\n\n    @property\n    def created_at(self) -> datetime.datetime:\n        \"\"\":class:`datetime.datetime`: Returns the guild's creation time in UTC.\"\"\"\n        return snowflake_time(self.id)\n\n    @property\n    def vanity_url(self) -> Optional[str]:\n        \"\"\"Optional[:class:`str`]: The Discord vanity invite URL for this partial guild, if available.\n\n        .. versionadded:: 2.0\n        \"\"\"\n        if self.vanity_url_code is None:\n            return None\n        return f'{Invite.BASE}/{self.vanity_url_code}'\n\n    @property\n    def icon(self) -> Optional[Asset]:\n        \"\"\"Optional[:class:`Asset`]: Returns the guild's icon asset, if available.\"\"\"\n        if self._icon is None:\n            return None\n        return Asset._from_guild_icon(self._state, self.id, self._icon)\n\n    @property\n    def banner(self) -> Optional[Asset]:\n        \"\"\"Optional[:class:`Asset`]: Returns the guild's banner asset, if available.\"\"\"\n        if self._banner is None:\n            return None\n        return Asset._from_guild_image(self._state, self.id, self._banner, path='banners')\n\n    @property\n    def splash(self) -> Optional[Asset]:\n        \"\"\"Optional[:class:`Asset`]: Returns the guild's invite splash asset, if available.\"\"\"\n        if self._splash is None:\n            return None\n        return Asset._from_guild_image(self._state, self.id, self._splash, path='splashes')\n\n\nclass Invite(Hashable):\n    r\"\"\"Represents a Discord :class:`Guild` or :class:`abc.GuildChannel` invite.\n\n    Depending on the way this object was created, some of the attributes can\n    have a value of ``None``.\n\n    .. container:: operations\n\n        .. describe:: x == y\n\n            Checks if two invites are equal.\n\n        .. describe:: x != y\n\n            Checks if two invites are not equal.\n\n        .. describe:: hash(x)\n\n            Returns the invite hash.\n\n        .. describe:: str(x)\n\n            Returns the invite URL.\n\n    The following table illustrates what methods will obtain the attributes:\n\n    +------------------------------------+--------------------------------------------------------------+\n    |             Attribute              |                          Method                              |\n    +====================================+==============================================================+\n    | :attr:`max_age`                    | :meth:`abc.GuildChannel.invites`\\, :meth:`Guild.invites`     |\n    +------------------------------------+--------------------------------------------------------------+\n    | :attr:`max_uses`                   | :meth:`abc.GuildChannel.invites`\\, :meth:`Guild.invites`     |\n    +------------------------------------+--------------------------------------------------------------+\n    | :attr:`created_at`                 | :meth:`abc.GuildChannel.invites`\\, :meth:`Guild.invites`     |\n    +------------------------------------+--------------------------------------------------------------+\n    | :attr:`temporary`                  | :meth:`abc.GuildChannel.invites`\\, :meth:`Guild.invites`     |\n    +------------------------------------+--------------------------------------------------------------+\n    | :attr:`uses`                       | :meth:`abc.GuildChannel.invites`\\, :meth:`Guild.invites`     |\n    +------------------------------------+--------------------------------------------------------------+\n    | :attr:`approximate_member_count`   | :meth:`Client.fetch_invite` with ``with_counts`` enabled     |\n    +------------------------------------+--------------------------------------------------------------+\n    | :attr:`approximate_presence_count` | :meth:`Client.fetch_invite` with ``with_counts`` enabled     |\n    +------------------------------------+--------------------------------------------------------------+\n    | :attr:`expires_at`                 | :meth:`Client.fetch_invite` with ``with_expiration`` enabled |\n    +------------------------------------+--------------------------------------------------------------+\n\n    If it's not in the table above then it is available by all methods.\n\n    Attributes\n    -----------\n    type: :class:`InviteType`\n        The type of the invite.\n\n        .. versionadded: 2.4\n    max_age: Optional[:class:`int`]\n        How long before the invite expires in seconds.\n        A value of ``0`` indicates that it doesn't expire.\n    code: :class:`str`\n        The URL fragment used for the invite.\n    guild: Optional[Union[:class:`Guild`, :class:`Object`, :class:`PartialInviteGuild`]]\n        The guild the invite is for. Can be ``None`` if it's from a group direct message.\n    revoked: Optional[:class:`bool`]\n        Indicates if the invite has been revoked.\n    created_at: Optional[:class:`datetime.datetime`]\n        An aware UTC datetime object denoting the time the invite was created.\n    temporary: Optional[:class:`bool`]\n        Indicates that the invite grants temporary membership.\n        If ``True``, members who joined via this invite will be kicked upon disconnect.\n    uses: Optional[:class:`int`]\n        How many times the invite has been used.\n    max_uses: Optional[:class:`int`]\n        How many times the invite can be used.\n        A value of ``0`` indicates that it has unlimited uses.\n    inviter: Optional[:class:`User`]\n        The user who created the invite.\n    approximate_member_count: Optional[:class:`int`]\n        The approximate number of members in the guild.\n    approximate_presence_count: Optional[:class:`int`]\n        The approximate number of members currently active in the guild.\n        This includes idle, dnd, online, and invisible members. Offline members are excluded.\n    expires_at: Optional[:class:`datetime.datetime`]\n        The expiration date of the invite. If the value is ``None`` when received through\n        :meth:`Client.fetch_invite` with ``with_expiration`` enabled, the invite will never expire.\n\n        .. versionadded:: 2.0\n\n    channel: Optional[Union[:class:`abc.GuildChannel`, :class:`Object`, :class:`PartialInviteChannel`]]\n        The channel the invite is for.\n    target_type: :class:`InviteTarget`\n        The type of target for the voice channel invite.\n\n        .. versionadded:: 2.0\n\n    target_user: Optional[:class:`User`]\n        The user whose stream to display for this invite, if any.\n\n        .. versionadded:: 2.0\n\n    target_application: Optional[:class:`PartialAppInfo`]\n        The embedded application the invite targets, if any.\n\n        .. versionadded:: 2.0\n    scheduled_event: Optional[:class:`ScheduledEvent`]\n        The scheduled event associated with this invite, if any.\n\n        .. versionadded:: 2.0\n    scheduled_event_id: Optional[:class:`int`]\n        The ID of the scheduled event associated with this invite, if any.\n\n        .. versionadded:: 2.0\n    \"\"\"\n\n    __slots__ = (\n        'max_age',\n        'code',\n        'guild',\n        'revoked',\n        'created_at',\n        'uses',\n        'temporary',\n        'max_uses',\n        'inviter',\n        'channel',\n        'target_user',\n        'target_type',\n        '_state',\n        'approximate_member_count',\n        'approximate_presence_count',\n        'target_application',\n        'expires_at',\n        'scheduled_event',\n        'scheduled_event_id',\n        'type',\n    )\n\n    BASE = 'https://discord.gg'\n\n    def __init__(\n        self,\n        *,\n        state: ConnectionState,\n        data: InvitePayload,\n        guild: Optional[Union[PartialInviteGuild, Guild]] = None,\n        channel: Optional[Union[PartialInviteChannel, GuildChannel]] = None,\n    ):\n        self._state: ConnectionState = state\n        self.type: InviteType = try_enum(InviteType, data.get('type', 0))\n        self.max_age: Optional[int] = data.get('max_age')\n        self.code: str = data['code']\n        self.guild: Optional[InviteGuildType] = self._resolve_guild(data.get('guild'), guild)\n        self.revoked: Optional[bool] = data.get('revoked')\n        self.created_at: Optional[datetime.datetime] = parse_time(data.get('created_at'))\n        self.temporary: Optional[bool] = data.get('temporary')\n        self.uses: Optional[int] = data.get('uses')\n        self.max_uses: Optional[int] = data.get('max_uses')\n        self.approximate_presence_count: Optional[int] = data.get('approximate_presence_count')\n        self.approximate_member_count: Optional[int] = data.get('approximate_member_count')\n\n        expires_at = data.get('expires_at', None)\n        self.expires_at: Optional[datetime.datetime] = parse_time(expires_at) if expires_at else None\n\n        inviter_data = data.get('inviter')\n        self.inviter: Optional[User] = None if inviter_data is None else self._state.create_user(inviter_data)\n\n        self.channel: Optional[InviteChannelType] = self._resolve_channel(data.get('channel'), channel)\n\n        target_user_data = data.get('target_user')\n        self.target_user: Optional[User] = None if target_user_data is None else self._state.create_user(target_user_data)\n\n        self.target_type: InviteTarget = try_enum(InviteTarget, data.get(\"target_type\", 0))\n\n        application = data.get('target_application')\n        self.target_application: Optional[PartialAppInfo] = (\n            PartialAppInfo(data=application, state=state) if application else None\n        )\n\n        scheduled_event = data.get('guild_scheduled_event')\n        self.scheduled_event: Optional[ScheduledEvent] = (\n            ScheduledEvent(\n                state=self._state,\n                data=scheduled_event,\n            )\n            if scheduled_event\n            else None\n        )\n        self.scheduled_event_id: Optional[int] = self.scheduled_event.id if self.scheduled_event else None\n\n    @classmethod\n    def from_incomplete(cls, *, state: ConnectionState, data: InvitePayload) -> Self:\n        guild: Optional[Union[Guild, PartialInviteGuild]]\n        try:\n            guild_data = data['guild']\n        except KeyError:\n            # If we're here, then this is a group DM\n            guild = None\n        else:\n            guild_id = int(guild_data['id'])\n            guild = state._get_guild(guild_id)\n            if guild is None:\n                # If it's not cached, then it has to be a partial guild\n                guild = PartialInviteGuild(state, guild_data, guild_id)\n\n        # As far as I know, invites always need a channel\n        # So this should never raise.\n        channel: Union[PartialInviteChannel, GuildChannel] = PartialInviteChannel(data['channel'])\n        if guild is not None and not isinstance(guild, PartialInviteGuild):\n            # Upgrade the partial data if applicable\n            channel = guild.get_channel(channel.id) or channel\n\n        return cls(state=state, data=data, guild=guild, channel=channel)\n\n    @classmethod\n    def from_gateway(cls, *, state: ConnectionState, data: GatewayInvitePayload) -> Self:\n        guild_id: Optional[int] = _get_as_snowflake(data, 'guild_id')\n        guild: Optional[Union[Guild, Object]] = state._get_guild(guild_id)\n        channel_id = int(data['channel_id'])\n        if guild is not None:\n            channel = guild.get_channel(channel_id) or Object(id=channel_id)\n        else:\n            guild = state._get_or_create_unavailable_guild(guild_id) if guild_id is not None else None\n            channel = Object(id=channel_id)\n\n        return cls(state=state, data=data, guild=guild, channel=channel)  # type: ignore\n\n    def _resolve_guild(\n        self,\n        data: Optional[InviteGuildPayload],\n        guild: Optional[Union[Guild, PartialInviteGuild]] = None,\n    ) -> Optional[InviteGuildType]:\n        if guild is not None:\n            return guild\n\n        if data is None:\n            return None\n\n        guild_id = int(data['id'])\n        return PartialInviteGuild(self._state, data, guild_id)\n\n    def _resolve_channel(\n        self,\n        data: Optional[InviteChannelPayload],\n        channel: Optional[Union[PartialInviteChannel, GuildChannel]] = None,\n    ) -> Optional[InviteChannelType]:\n        if channel is not None:\n            return channel\n\n        if data is None:\n            return None\n\n        return PartialInviteChannel(data)\n\n    def __str__(self) -> str:\n        return self.url\n\n    def __repr__(self) -> str:\n        return (\n            f'<Invite type={self.type} code={self.code!r} guild={self.guild!r} '\n            f'online={self.approximate_presence_count} '\n            f'members={self.approximate_member_count}>'\n        )\n\n    def __hash__(self) -> int:\n        return hash(self.code)\n\n    @property\n    def id(self) -> str:\n        \"\"\":class:`str`: Returns the proper code portion of the invite.\"\"\"\n        return self.code\n\n    @property\n    def url(self) -> str:\n        \"\"\":class:`str`: A property that retrieves the invite URL.\"\"\"\n        url = self.BASE + '/' + self.code\n        if self.scheduled_event_id is not None:\n            url += '?event=' + str(self.scheduled_event_id)\n        return url\n\n    def set_scheduled_event(self, scheduled_event: Snowflake, /) -> Self:\n        \"\"\"Sets the scheduled event for this invite.\n\n        .. versionadded:: 2.0\n\n        Parameters\n        ----------\n        scheduled_event: :class:`~discord.abc.Snowflake`\n            The ID of the scheduled event.\n\n        Returns\n        --------\n        :class:`Invite`\n            The invite with the new scheduled event.\n        \"\"\"\n        self.scheduled_event_id = scheduled_event.id\n        try:\n            self.scheduled_event = self.guild.get_scheduled_event(scheduled_event.id)  # type: ignore # handled below\n        except AttributeError:\n            self.scheduled_event = None\n\n        return self\n\n    async def delete(self, *, reason: Optional[str] = None) -> None:\n        \"\"\"|coro|\n\n        Revokes the instant invite.\n\n        You must have :attr:`~Permissions.manage_channels` to do this.\n\n        Parameters\n        -----------\n        reason: Optional[:class:`str`]\n            The reason for deleting this invite. Shows up on the audit log.\n\n        Raises\n        -------\n        Forbidden\n            You do not have permissions to revoke invites.\n        NotFound\n            The invite is invalid or expired.\n        HTTPException\n            Revoking the invite failed.\n        \"\"\"\n\n        await self._state.http.delete_invite(self.code, reason=reason)\n"
  },
  {
    "path": "discord/member.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom __future__ import annotations\n\nimport datetime\nimport inspect\nimport itertools\nfrom operator import attrgetter\nfrom typing import Any, Awaitable, Callable, Collection, Dict, List, Optional, TYPE_CHECKING, Tuple, TypeVar, Union\n\nimport discord.abc\n\nfrom . import utils\nfrom .asset import Asset\nfrom .utils import MISSING\nfrom .user import BaseUser, ClientUser, User, _UserTag\nfrom .activity import create_activity, ActivityTypes\nfrom .permissions import Permissions\nfrom .enums import Status, try_enum\nfrom .errors import ClientException\nfrom .colour import Colour\nfrom .object import Object\nfrom .flags import MemberFlags\n\n__all__ = (\n    'VoiceState',\n    'Member',\n)\n\nT = TypeVar('T', bound=type)\n\nif TYPE_CHECKING:\n    from typing_extensions import Self\n\n    from .channel import DMChannel, VoiceChannel, StageChannel\n    from .flags import PublicUserFlags\n    from .guild import Guild\n    from .types.activity import (\n        ClientStatus as ClientStatusPayload,\n        PartialPresenceUpdate,\n    )\n    from .types.member import (\n        MemberWithUser as MemberWithUserPayload,\n        Member as MemberPayload,\n        UserWithMember as UserWithMemberPayload,\n    )\n    from .types.gateway import GuildMemberUpdateEvent\n    from .types.user import User as UserPayload, AvatarDecorationData\n    from .abc import Snowflake\n    from .state import ConnectionState\n    from .message import Message\n    from .role import Role\n    from .types.voice import (\n        GuildVoiceState as GuildVoiceStatePayload,\n        VoiceState as VoiceStatePayload,\n    )\n\n    VocalGuildChannel = Union[VoiceChannel, StageChannel]\n\n\nclass VoiceState:\n    \"\"\"Represents a Discord user's voice state.\n\n    Attributes\n    ------------\n    deaf: :class:`bool`\n        Indicates if the user is currently deafened by the guild.\n    mute: :class:`bool`\n        Indicates if the user is currently muted by the guild.\n    self_mute: :class:`bool`\n        Indicates if the user is currently muted by their own accord.\n    self_deaf: :class:`bool`\n        Indicates if the user is currently deafened by their own accord.\n    self_stream: :class:`bool`\n        Indicates if the user is currently streaming via 'Go Live' feature.\n\n        .. versionadded:: 1.3\n\n    self_video: :class:`bool`\n        Indicates if the user is currently broadcasting video.\n    suppress: :class:`bool`\n        Indicates if the user is suppressed from speaking.\n\n        Only applies to stage channels.\n\n        .. versionadded:: 1.7\n\n    requested_to_speak_at: Optional[:class:`datetime.datetime`]\n        An aware datetime object that specifies the date and time in UTC that the member\n        requested to speak. It will be ``None`` if they are not requesting to speak\n        anymore or have been accepted to speak.\n\n        Only applicable to stage channels.\n\n        .. versionadded:: 1.7\n\n    afk: :class:`bool`\n        Indicates if the user is currently in the AFK channel in the guild.\n    channel: Optional[Union[:class:`VoiceChannel`, :class:`StageChannel`]]\n        The voice channel that the user is currently connected to. ``None`` if the user\n        is not currently in a voice channel.\n    \"\"\"\n\n    __slots__ = (\n        'session_id',\n        'deaf',\n        'mute',\n        'self_mute',\n        'self_stream',\n        'self_video',\n        'self_deaf',\n        'afk',\n        'channel',\n        'requested_to_speak_at',\n        'suppress',\n    )\n\n    def __init__(\n        self, *, data: Union[VoiceStatePayload, GuildVoiceStatePayload], channel: Optional[VocalGuildChannel] = None\n    ):\n        self.session_id: Optional[str] = data.get('session_id')\n        self._update(data, channel)\n\n    def _update(self, data: Union[VoiceStatePayload, GuildVoiceStatePayload], channel: Optional[VocalGuildChannel]):\n        self.self_mute: bool = data.get('self_mute', False)\n        self.self_deaf: bool = data.get('self_deaf', False)\n        self.self_stream: bool = data.get('self_stream', False)\n        self.self_video: bool = data.get('self_video', False)\n        self.afk: bool = data.get('suppress', False)\n        self.mute: bool = data.get('mute', False)\n        self.deaf: bool = data.get('deaf', False)\n        self.suppress: bool = data.get('suppress', False)\n        self.requested_to_speak_at: Optional[datetime.datetime] = utils.parse_time(data.get('request_to_speak_timestamp'))\n        self.channel: Optional[VocalGuildChannel] = channel\n\n    def __repr__(self) -> str:\n        attrs = [\n            ('self_mute', self.self_mute),\n            ('self_deaf', self.self_deaf),\n            ('self_stream', self.self_stream),\n            ('suppress', self.suppress),\n            ('requested_to_speak_at', self.requested_to_speak_at),\n            ('channel', self.channel),\n        ]\n        inner = ' '.join('%s=%r' % t for t in attrs)\n        return f'<{self.__class__.__name__} {inner}>'\n\n\nclass _ClientStatus:\n    __slots__ = ('_status', 'desktop', 'mobile', 'web')\n\n    def __init__(self):\n        self._status: str = 'offline'\n\n        self.desktop: Optional[str] = None\n        self.mobile: Optional[str] = None\n        self.web: Optional[str] = None\n\n    def __repr__(self) -> str:\n        attrs = [\n            ('_status', self._status),\n            ('desktop', self.desktop),\n            ('mobile', self.mobile),\n            ('web', self.web),\n        ]\n        inner = ' '.join('%s=%r' % t for t in attrs)\n        return f'<{self.__class__.__name__} {inner}>'\n\n    def _update(self, status: str, data: ClientStatusPayload, /) -> None:\n        self._status = status\n\n        self.desktop = data.get('desktop')\n        self.mobile = data.get('mobile')\n        self.web = data.get('web')\n\n    @classmethod\n    def _copy(cls, client_status: Self, /) -> Self:\n        self = cls.__new__(cls)  # bypass __init__\n\n        self._status = client_status._status\n\n        self.desktop = client_status.desktop\n        self.mobile = client_status.mobile\n        self.web = client_status.web\n\n        return self\n\n\ndef flatten_user(cls: T) -> T:\n    for attr, value in itertools.chain(BaseUser.__dict__.items(), User.__dict__.items()):\n        # ignore private/special methods\n        if attr.startswith('_'):\n            continue\n\n        # don't override what we already have\n        if attr in cls.__dict__:\n            continue\n\n        # if it's a slotted attribute or a property, redirect it\n        # slotted members are implemented as member_descriptors in Type.__dict__\n        if not hasattr(value, '__annotations__'):\n            getter = attrgetter('_user.' + attr)\n            setattr(cls, attr, property(getter, doc=f'Equivalent to :attr:`User.{attr}`'))\n        else:\n            # Technically, this can also use attrgetter\n            # However I'm not sure how I feel about \"functions\" returning properties\n            # It probably breaks something in Sphinx.\n            # probably a member function by now\n            def generate_function(x):\n                # We want sphinx to properly show coroutine functions as coroutines\n                if inspect.iscoroutinefunction(value):\n\n                    async def general(self, *args, **kwargs):  # type: ignore\n                        return await getattr(self._user, x)(*args, **kwargs)\n\n                else:\n\n                    def general(self, *args, **kwargs):\n                        return getattr(self._user, x)(*args, **kwargs)\n\n                general.__name__ = x\n                return general\n\n            func = generate_function(attr)\n            func = utils.copy_doc(value)(func)\n            setattr(cls, attr, func)\n\n    return cls\n\n\n@flatten_user\nclass Member(discord.abc.Messageable, _UserTag):\n    \"\"\"Represents a Discord member to a :class:`Guild`.\n\n    This implements a lot of the functionality of :class:`User`.\n\n    .. container:: operations\n\n        .. describe:: x == y\n\n            Checks if two members are equal.\n            Note that this works with :class:`User` instances too.\n\n        .. describe:: x != y\n\n            Checks if two members are not equal.\n            Note that this works with :class:`User` instances too.\n\n        .. describe:: hash(x)\n\n            Returns the member's hash.\n\n        .. describe:: str(x)\n\n            Returns the member's handle (e.g. ``name`` or ``name#discriminator``).\n\n    Attributes\n    ----------\n    joined_at: Optional[:class:`datetime.datetime`]\n        An aware datetime object that specifies the date and time in UTC that the member joined the guild.\n        If the member left and rejoined the guild, this will be the latest date. In certain cases, this can be ``None``.\n    activities: Tuple[Union[:class:`BaseActivity`, :class:`Spotify`]]\n        The activities that the user is currently doing.\n\n        .. note::\n\n            Due to a Discord API limitation, a user's Spotify activity may not appear\n            if they are listening to a song with a title longer\n            than 128 characters. See :issue:`1738` for more information.\n\n    guild: :class:`Guild`\n        The guild that the member belongs to.\n    nick: Optional[:class:`str`]\n        The guild specific nickname of the user. Takes precedence over the global name.\n    pending: :class:`bool`\n        Whether the member is pending member verification.\n\n        .. versionadded:: 1.6\n    premium_since: Optional[:class:`datetime.datetime`]\n        An aware datetime object that specifies the date and time in UTC when the member used their\n        \"Nitro boost\" on the guild, if available. This could be ``None``.\n    timed_out_until: Optional[:class:`datetime.datetime`]\n        An aware datetime object that specifies the date and time in UTC that the member's time out will expire.\n        This will be set to ``None`` if the user is not timed out.\n\n        .. versionadded:: 2.0\n    \"\"\"\n\n    __slots__ = (\n        '_roles',\n        'joined_at',\n        'premium_since',\n        'activities',\n        'guild',\n        'pending',\n        'nick',\n        'timed_out_until',\n        '_permissions',\n        '_client_status',\n        '_user',\n        '_state',\n        '_avatar',\n        '_banner',\n        '_flags',\n        '_avatar_decoration_data',\n    )\n\n    if TYPE_CHECKING:\n        name: str\n        id: int\n        discriminator: str\n        global_name: Optional[str]\n        bot: bool\n        system: bool\n        created_at: datetime.datetime\n        default_avatar: Asset\n        avatar: Optional[Asset]\n        dm_channel: Optional[DMChannel]\n        create_dm: Callable[[], Awaitable[DMChannel]]\n        mutual_guilds: List[Guild]\n        public_flags: PublicUserFlags\n        banner: Optional[Asset]\n        accent_color: Optional[Colour]\n        accent_colour: Optional[Colour]\n        avatar_decoration: Optional[Asset]\n        avatar_decoration_sku_id: Optional[int]\n\n    def __init__(self, *, data: MemberWithUserPayload, guild: Guild, state: ConnectionState):\n        self._state: ConnectionState = state\n        self._user: User = state.store_user(data['user'])\n        self.guild: Guild = guild\n        self.joined_at: Optional[datetime.datetime] = utils.parse_time(data.get('joined_at'))\n        self.premium_since: Optional[datetime.datetime] = utils.parse_time(data.get('premium_since'))\n        self._roles: utils.SnowflakeList = utils.SnowflakeList(map(int, data['roles']))\n        self._client_status: _ClientStatus = _ClientStatus()\n        self.activities: Tuple[ActivityTypes, ...] = ()\n        self.nick: Optional[str] = data.get('nick', None)\n        self.pending: bool = data.get('pending', False)\n        self._avatar: Optional[str] = data.get('avatar')\n        self._banner: Optional[str] = data.get('banner')\n        self._permissions: Optional[int]\n        self._flags: int = data['flags']\n        self._avatar_decoration_data: Optional[AvatarDecorationData] = data.get('avatar_decoration_data')\n        try:\n            self._permissions = int(data['permissions'])\n        except KeyError:\n            self._permissions = None\n\n        self.timed_out_until: Optional[datetime.datetime] = utils.parse_time(data.get('communication_disabled_until'))\n\n    def __str__(self) -> str:\n        return str(self._user)\n\n    def __repr__(self) -> str:\n        return (\n            f'<Member id={self._user.id} name={self._user.name!r} global_name={self._user.global_name!r}'\n            f' bot={self._user.bot} nick={self.nick!r} guild={self.guild!r}>'\n        )\n\n    def __eq__(self, other: object) -> bool:\n        return isinstance(other, _UserTag) and other.id == self.id\n\n    def __ne__(self, other: object) -> bool:\n        return not self.__eq__(other)\n\n    def __hash__(self) -> int:\n        return hash(self._user)\n\n    @classmethod\n    def _from_message(cls, *, message: Message, data: MemberPayload) -> Self:\n        author = message.author\n        data['user'] = author._to_minimal_user_json()  # type: ignore\n        return cls(data=data, guild=message.guild, state=message._state)  # type: ignore\n\n    @classmethod\n    def _from_client_user(cls, *, user: ClientUser, guild: Guild, state: ConnectionState) -> Self:\n        data = {\n            'roles': [],\n            'user': user._to_minimal_user_json(),\n            'flags': 0,\n        }\n        return cls(data=data, guild=guild, state=state)  # type: ignore\n\n    def _update_from_message(self, data: MemberPayload) -> None:\n        self.joined_at = utils.parse_time(data.get('joined_at'))\n        self.premium_since = utils.parse_time(data.get('premium_since'))\n        self._roles = utils.SnowflakeList(map(int, data['roles']))\n        self.nick = data.get('nick', None)\n        self.pending = data.get('pending', False)\n        self.timed_out_until = utils.parse_time(data.get('communication_disabled_until'))\n        self._flags = data.get('flags', 0)\n\n    @classmethod\n    def _try_upgrade(cls, *, data: UserWithMemberPayload, guild: Guild, state: ConnectionState) -> Union[User, Self]:\n        # A User object with a 'member' key\n        try:\n            member_data = data.pop('member')\n        except KeyError:\n            return state.create_user(data)\n        else:\n            member_data['user'] = data  # type: ignore\n            return cls(data=member_data, guild=guild, state=state)  # type: ignore\n\n    @classmethod\n    def _copy(cls, member: Self) -> Self:\n        self = cls.__new__(cls)  # to bypass __init__\n\n        self._roles = utils.SnowflakeList(member._roles, is_sorted=True)\n        self.joined_at = member.joined_at\n        self.premium_since = member.premium_since\n        self._client_status = _ClientStatus._copy(member._client_status)\n        self.guild = member.guild\n        self.nick = member.nick\n        self.pending = member.pending\n        self.activities = member.activities\n        self.timed_out_until = member.timed_out_until\n        self._flags = member._flags\n        self._permissions = member._permissions\n        self._state = member._state\n        self._avatar = member._avatar\n        self._banner = member._banner\n        self._avatar_decoration_data = member._avatar_decoration_data\n\n        # Reference will not be copied unless necessary by PRESENCE_UPDATE\n        # See below\n        self._user = member._user\n        return self\n\n    async def _get_channel(self) -> DMChannel:\n        ch = await self.create_dm()\n        return ch\n\n    def _update(self, data: GuildMemberUpdateEvent) -> None:\n        # the nickname change is optional,\n        # if it isn't in the payload then it didn't change\n        try:\n            self.nick = data['nick']\n        except KeyError:\n            pass\n\n        try:\n            self.pending = data['pending']\n        except KeyError:\n            pass\n\n        self.premium_since = utils.parse_time(data.get('premium_since'))\n        self.timed_out_until = utils.parse_time(data.get('communication_disabled_until'))\n        self._roles = utils.SnowflakeList(map(int, data['roles']))\n        self._avatar = data.get('avatar')\n        self._banner = data.get('banner')\n        self._flags = data.get('flags', 0)\n        self._avatar_decoration_data = data.get('avatar_decoration_data')\n\n    def _presence_update(self, data: PartialPresenceUpdate, user: UserPayload) -> Optional[Tuple[User, User]]:\n        self.activities = tuple(create_activity(d, self._state) for d in data['activities'])\n        self._client_status._update(data['status'], data['client_status'])\n\n        if len(user) > 1:\n            return self._update_inner_user(user)\n        return None\n\n    def _update_inner_user(self, user: UserPayload) -> Optional[Tuple[User, User]]:\n        u = self._user\n        original = (\n            u.name,\n            u.discriminator,\n            u._avatar,\n            u.global_name,\n            u._public_flags,\n            u._avatar_decoration_data['sku_id'] if u._avatar_decoration_data is not None else None,\n        )\n\n        decoration_payload = user.get('avatar_decoration_data')\n        # These keys seem to always be available\n        modified = (\n            user['username'],\n            user['discriminator'],\n            user['avatar'],\n            user.get('global_name'),\n            user.get('public_flags', 0),\n            decoration_payload['sku_id'] if decoration_payload is not None else None,\n        )\n        if original != modified:\n            to_return = User._copy(self._user)\n            u.name, u.discriminator, u._avatar, u.global_name, u._public_flags, u._avatar_decoration_data = (\n                user['username'],\n                user['discriminator'],\n                user['avatar'],\n                user.get('global_name'),\n                user.get('public_flags', 0),\n                decoration_payload,\n            )\n            # Signal to dispatch on_user_update\n            return to_return, u\n\n    @property\n    def status(self) -> Status:\n        \"\"\":class:`Status`: The member's overall status. If the value is unknown, then it will be a :class:`str` instead.\"\"\"\n        return try_enum(Status, self._client_status._status)\n\n    @property\n    def raw_status(self) -> str:\n        \"\"\":class:`str`: The member's overall status as a string value.\n\n        .. versionadded:: 1.5\n        \"\"\"\n        return self._client_status._status\n\n    @status.setter\n    def status(self, value: Status) -> None:\n        # internal use only\n        self._client_status._status = str(value)\n\n    @property\n    def mobile_status(self) -> Status:\n        \"\"\":class:`Status`: The member's status on a mobile device, if applicable.\"\"\"\n        return try_enum(Status, self._client_status.mobile or 'offline')\n\n    @property\n    def desktop_status(self) -> Status:\n        \"\"\":class:`Status`: The member's status on the desktop client, if applicable.\"\"\"\n        return try_enum(Status, self._client_status.desktop or 'offline')\n\n    @property\n    def web_status(self) -> Status:\n        \"\"\":class:`Status`: The member's status on the web client, if applicable.\"\"\"\n        return try_enum(Status, self._client_status.web or 'offline')\n\n    def is_on_mobile(self) -> bool:\n        \"\"\":class:`bool`: A helper function that determines if a member is active on a mobile device.\"\"\"\n        return self._client_status.mobile is not None\n\n    @property\n    def colour(self) -> Colour:\n        \"\"\":class:`Colour`: A property that returns a colour denoting the rendered colour\n        for the member. If the default colour is the one rendered then an instance\n        of :meth:`Colour.default` is returned.\n\n        There is an alias for this named :attr:`color`.\n        \"\"\"\n\n        roles = self.roles[1:]  # remove @everyone\n\n        # highest order of the colour is the one that gets rendered.\n        # if the highest is the default colour then the next one with a colour\n        # is chosen instead\n        for role in reversed(roles):\n            if role.colour.value:\n                return role.colour\n        return Colour.default()\n\n    @property\n    def color(self) -> Colour:\n        \"\"\":class:`Colour`: A property that returns a color denoting the rendered color for\n        the member. If the default color is the one rendered then an instance of :meth:`Colour.default`\n        is returned.\n\n        There is an alias for this named :attr:`colour`.\n        \"\"\"\n        return self.colour\n\n    @property\n    def roles(self) -> List[Role]:\n        \"\"\"List[:class:`Role`]: A :class:`list` of :class:`Role` that the member belongs to. Note\n        that the first element of this list is always the default '@everyone'\n        role.\n\n        These roles are sorted by their position in the role hierarchy.\n        \"\"\"\n        result = []\n        g = self.guild\n        for role_id in self._roles:\n            role = g.get_role(role_id)\n            if role:\n                result.append(role)\n        result.append(g.default_role)\n        result.sort()\n        return result\n\n    @property\n    def display_icon(self) -> Optional[Union[str, Asset]]:\n        \"\"\"Optional[Union[:class:`str`, :class:`Asset`]]: A property that returns the role icon that is rendered for\n        this member. If no icon is shown then ``None`` is returned.\n\n        .. versionadded:: 2.0\n        \"\"\"\n\n        roles = self.roles[1:]  # remove @everyone\n        for role in reversed(roles):\n            icon = role.display_icon\n            if icon:\n                return icon\n\n        return None\n\n    @property\n    def mention(self) -> str:\n        \"\"\":class:`str`: Returns a string that allows you to mention the member.\"\"\"\n        return f'<@{self._user.id}>'\n\n    @property\n    def display_name(self) -> str:\n        \"\"\":class:`str`: Returns the user's display name.\n\n        For regular users this is just their global name or their username,\n        but if they have a guild specific nickname then that\n        is returned instead.\n        \"\"\"\n        return self.nick or self.global_name or self.name\n\n    @property\n    def display_avatar(self) -> Asset:\n        \"\"\":class:`Asset`: Returns the member's display avatar.\n\n        For regular members this is just their avatar, but\n        if they have a guild specific avatar then that\n        is returned instead.\n\n        .. versionadded:: 2.0\n        \"\"\"\n        return self.guild_avatar or self._user.avatar or self._user.default_avatar\n\n    @property\n    def guild_avatar(self) -> Optional[Asset]:\n        \"\"\"Optional[:class:`Asset`]: Returns an :class:`Asset` for the guild avatar\n        the member has. If unavailable, ``None`` is returned.\n\n        .. versionadded:: 2.0\n        \"\"\"\n        if self._avatar is None:\n            return None\n        return Asset._from_guild_avatar(self._state, self.guild.id, self.id, self._avatar)\n\n    @property\n    def display_banner(self) -> Optional[Asset]:\n        \"\"\"Optional[:class:`Asset`]: Returns the member's displayed banner, if any.\n\n        This is the member's guild banner if available, otherwise it's their\n        global banner. If the member has no banner set then ``None`` is returned.\n\n        .. versionadded:: 2.5\n        \"\"\"\n        return self.guild_banner or self._user.banner\n\n    @property\n    def guild_banner(self) -> Optional[Asset]:\n        \"\"\"Optional[:class:`Asset`]: Returns an :class:`Asset` for the guild banner\n        the member has. If unavailable, ``None`` is returned.\n\n        .. versionadded:: 2.5\n        \"\"\"\n        if self._banner is None:\n            return None\n        return Asset._from_guild_banner(self._state, self.guild.id, self.id, self._banner)\n\n    @property\n    def activity(self) -> Optional[ActivityTypes]:\n        \"\"\"Optional[Union[:class:`BaseActivity`, :class:`Spotify`]]: Returns the primary\n        activity the user is currently doing. Could be ``None`` if no activity is being done.\n\n        .. note::\n\n            Due to a Discord API limitation, this may be ``None`` if\n            the user is listening to a song on Spotify with a title longer\n            than 128 characters. See :issue:`1738` for more information.\n\n        .. note::\n\n            A user may have multiple activities, these can be accessed under :attr:`activities`.\n        \"\"\"\n        if self.activities:\n            return self.activities[0]\n\n    def mentioned_in(self, message: Message) -> bool:\n        \"\"\"Checks if the member is mentioned in the specified message.\n\n        Parameters\n        -----------\n        message: :class:`Message`\n            The message to check if you're mentioned in.\n\n        Returns\n        -------\n        :class:`bool`\n            Indicates if the member is mentioned in the message.\n        \"\"\"\n        if message.guild is None or message.guild.id != self.guild.id:\n            return False\n\n        if self._user.mentioned_in(message):\n            return True\n\n        return any(self._roles.has(role.id) for role in message.role_mentions)\n\n    @property\n    def top_role(self) -> Role:\n        \"\"\":class:`Role`: Returns the member's highest role.\n\n        This is useful for figuring where a member stands in the role\n        hierarchy chain.\n        \"\"\"\n        guild = self.guild\n        if len(self._roles) == 0:\n            return guild.default_role\n\n        return max(guild.get_role(rid) or guild.default_role for rid in self._roles)\n\n    @property\n    def guild_permissions(self) -> Permissions:\n        \"\"\":class:`Permissions`: Returns the member's guild permissions.\n\n        This only takes into consideration the guild permissions\n        and not most of the implied permissions or any of the\n        channel permission overwrites. For 100% accurate permission\n        calculation, please use :meth:`abc.GuildChannel.permissions_for`.\n\n        This does take into consideration guild ownership, the\n        administrator implication, and whether the member is timed out.\n\n        .. versionchanged:: 2.0\n            Member timeouts are taken into consideration.\n        \"\"\"\n\n        if self.guild.owner_id == self.id:\n            return Permissions.all()\n\n        base = Permissions.none()\n        for r in self.roles:\n            base.value |= r.permissions.value\n\n        if base.administrator:\n            return Permissions.all()\n\n        if self.is_timed_out():\n            base.value &= Permissions._timeout_mask()\n\n        return base\n\n    @property\n    def resolved_permissions(self) -> Optional[Permissions]:\n        \"\"\"Optional[:class:`Permissions`]: Returns the member's resolved permissions\n        from an interaction.\n\n        This is only available in interaction contexts and represents the resolved\n        permissions of the member in the channel the interaction was executed in.\n        This is more or less equivalent to calling :meth:`abc.GuildChannel.permissions_for`\n        but stored and returned as an attribute by the Discord API rather than computed.\n\n        .. versionadded:: 2.0\n        \"\"\"\n        if self._permissions is None:\n            return None\n        return Permissions(self._permissions)\n\n    @property\n    def voice(self) -> Optional[VoiceState]:\n        \"\"\"Optional[:class:`VoiceState`]: Returns the member's current voice state.\"\"\"\n        return self.guild._voice_state_for(self._user.id)\n\n    @property\n    def flags(self) -> MemberFlags:\n        \"\"\":class:`MemberFlags`: Returns the member's flags.\n\n        .. versionadded:: 2.2\n        \"\"\"\n        return MemberFlags._from_value(self._flags)\n\n    async def ban(\n        self,\n        *,\n        delete_message_days: int = MISSING,\n        delete_message_seconds: int = MISSING,\n        reason: Optional[str] = None,\n    ) -> None:\n        \"\"\"|coro|\n\n        Bans this member. Equivalent to :meth:`Guild.ban`.\n        \"\"\"\n        await self.guild.ban(\n            self,\n            reason=reason,\n            delete_message_days=delete_message_days,\n            delete_message_seconds=delete_message_seconds,\n        )\n\n    async def unban(self, *, reason: Optional[str] = None) -> None:\n        \"\"\"|coro|\n\n        Unbans this member. Equivalent to :meth:`Guild.unban`.\n        \"\"\"\n        await self.guild.unban(self, reason=reason)\n\n    async def kick(self, *, reason: Optional[str] = None) -> None:\n        \"\"\"|coro|\n\n        Kicks this member. Equivalent to :meth:`Guild.kick`.\n        \"\"\"\n        await self.guild.kick(self, reason=reason)\n\n    async def edit(\n        self,\n        *,\n        nick: Optional[str] = MISSING,\n        mute: bool = MISSING,\n        deafen: bool = MISSING,\n        suppress: bool = MISSING,\n        roles: Collection[discord.abc.Snowflake] = MISSING,\n        voice_channel: Optional[VocalGuildChannel] = MISSING,\n        timed_out_until: Optional[datetime.datetime] = MISSING,\n        bypass_verification: bool = MISSING,\n        reason: Optional[str] = None,\n    ) -> Optional[Member]:\n        \"\"\"|coro|\n\n        Edits the member's data.\n\n        Depending on the parameter passed, this requires different permissions listed below:\n\n        +---------------------+---------------------------------------+\n        |      Parameter      |              Permission               |\n        +---------------------+---------------------------------------+\n        | nick                | :attr:`Permissions.manage_nicknames`  |\n        +---------------------+---------------------------------------+\n        | mute                | :attr:`Permissions.mute_members`      |\n        +---------------------+---------------------------------------+\n        | deafen              | :attr:`Permissions.deafen_members`    |\n        +---------------------+---------------------------------------+\n        | roles               | :attr:`Permissions.manage_roles`      |\n        +---------------------+---------------------------------------+\n        | voice_channel       | :attr:`Permissions.move_members`      |\n        +---------------------+---------------------------------------+\n        | timed_out_until     | :attr:`Permissions.moderate_members`  |\n        +---------------------+---------------------------------------+\n        | bypass_verification | :attr:`Permissions.moderate_members`  |\n        +---------------------+---------------------------------------+\n\n        All parameters are optional.\n\n        .. versionchanged:: 1.1\n            Can now pass ``None`` to ``voice_channel`` to kick a member from voice.\n\n        .. versionchanged:: 2.0\n            The newly updated member is now optionally returned, if applicable.\n\n        Parameters\n        -----------\n        nick: Optional[:class:`str`]\n            The member's new nickname. Use ``None`` to remove the nickname.\n        mute: :class:`bool`\n            Indicates if the member should be guild muted or un-muted.\n        deafen: :class:`bool`\n            Indicates if the member should be guild deafened or un-deafened.\n        suppress: :class:`bool`\n            Indicates if the member should be suppressed in stage channels.\n\n            .. versionadded:: 1.7\n\n        roles: List[:class:`Role`]\n            The member's new list of roles. This *replaces* the roles.\n        voice_channel: Optional[Union[:class:`VoiceChannel`, :class:`StageChannel`]]\n            The voice channel to move the member to.\n            Pass ``None`` to kick them from voice.\n        timed_out_until: Optional[:class:`datetime.datetime`]\n            The date the member's timeout should expire, or ``None`` to remove the timeout.\n            This must be a timezone-aware datetime object. Consider using :func:`utils.utcnow`.\n\n            .. versionadded:: 2.0\n        bypass_verification: :class:`bool`\n            Indicates if the member should be allowed to bypass the guild verification requirements.\n\n            .. versionadded:: 2.2\n\n        reason: Optional[:class:`str`]\n            The reason for editing this member. Shows up on the audit log.\n\n        Raises\n        -------\n        Forbidden\n            You do not have the proper permissions to do the action requested.\n        HTTPException\n            The operation failed.\n        TypeError\n            The datetime object passed to ``timed_out_until`` was not timezone-aware.\n\n        Returns\n        --------\n        Optional[:class:`.Member`]\n            The newly updated member, if applicable. This is not returned\n            if certain fields are passed, such as ``suppress``.\n        \"\"\"\n        http = self._state.http\n        guild_id = self.guild.id\n        me = self._state.self_id == self.id\n        payload: Dict[str, Any] = {}\n\n        if nick is not MISSING:\n            nick = nick or ''\n            if me:\n                await http.change_my_nickname(guild_id, nick, reason=reason)\n            else:\n                payload['nick'] = nick\n\n        if deafen is not MISSING:\n            payload['deaf'] = deafen\n\n        if mute is not MISSING:\n            payload['mute'] = mute\n\n        if suppress is not MISSING:\n            voice_state_payload: Dict[str, Any] = {\n                'suppress': suppress,\n            }\n\n            if self.voice is not None and self.voice.channel is not None:\n                voice_state_payload['channel_id'] = self.voice.channel.id\n\n            if suppress or self.bot:\n                voice_state_payload['request_to_speak_timestamp'] = None\n\n            if me:\n                await http.edit_my_voice_state(guild_id, voice_state_payload)\n            else:\n                if not suppress:\n                    voice_state_payload['request_to_speak_timestamp'] = datetime.datetime.utcnow().isoformat()\n                await http.edit_voice_state(guild_id, self.id, voice_state_payload)\n\n        if voice_channel is not MISSING:\n            payload['channel_id'] = voice_channel and voice_channel.id\n\n        if roles is not MISSING:\n            payload['roles'] = tuple(r.id for r in roles)\n\n        if timed_out_until is not MISSING:\n            if timed_out_until is None:\n                payload['communication_disabled_until'] = None\n            else:\n                if timed_out_until.tzinfo is None:\n                    raise TypeError(\n                        'timed_out_until must be an aware datetime. Consider using discord.utils.utcnow() or datetime.datetime.now().astimezone() for local time.'\n                    )\n                payload['communication_disabled_until'] = timed_out_until.isoformat()\n\n        if bypass_verification is not MISSING:\n            flags = MemberFlags._from_value(self._flags)\n            flags.bypasses_verification = bypass_verification\n            payload['flags'] = flags.value\n\n        if payload:\n            data = await http.edit_member(guild_id, self.id, reason=reason, **payload)\n            return Member(data=data, guild=self.guild, state=self._state)\n\n    async def request_to_speak(self) -> None:\n        \"\"\"|coro|\n\n        Request to speak in the connected channel.\n\n        Only applies to stage channels.\n\n        .. note::\n\n            Requesting members that are not the client is equivalent\n            to :attr:`.edit` providing ``suppress`` as ``False``.\n\n        .. versionadded:: 1.7\n\n        Raises\n        -------\n        ClientException\n            You are not connected to a voice channel.\n        Forbidden\n            You do not have the proper permissions to do the action requested.\n        HTTPException\n            The operation failed.\n        \"\"\"\n        if self.voice is None or self.voice.channel is None:\n            raise ClientException('Cannot request to speak while not connected to a voice channel.')\n\n        payload = {\n            'channel_id': self.voice.channel.id,\n            'request_to_speak_timestamp': datetime.datetime.utcnow().isoformat(),\n        }\n\n        if self._state.self_id != self.id:\n            payload['suppress'] = False\n            await self._state.http.edit_voice_state(self.guild.id, self.id, payload)\n        else:\n            await self._state.http.edit_my_voice_state(self.guild.id, payload)\n\n    async def move_to(self, channel: Optional[VocalGuildChannel], *, reason: Optional[str] = None) -> None:\n        \"\"\"|coro|\n\n        Moves a member to a new voice channel (they must be connected first).\n\n        You must have :attr:`~Permissions.move_members` to do this.\n\n        This raises the same exceptions as :meth:`edit`.\n\n        .. versionchanged:: 1.1\n            Can now pass ``None`` to kick a member from voice.\n\n        Parameters\n        -----------\n        channel: Optional[Union[:class:`VoiceChannel`, :class:`StageChannel`]]\n            The new voice channel to move the member to.\n            Pass ``None`` to kick them from voice.\n        reason: Optional[:class:`str`]\n            The reason for doing this action. Shows up on the audit log.\n        \"\"\"\n        await self.edit(voice_channel=channel, reason=reason)\n\n    async def timeout(\n        self, until: Optional[Union[datetime.timedelta, datetime.datetime]], /, *, reason: Optional[str] = None\n    ) -> None:\n        \"\"\"|coro|\n\n        Applies a time out to a member until the specified date time or for the\n        given :class:`datetime.timedelta`.\n\n        You must have :attr:`~Permissions.moderate_members` to do this.\n\n        This raises the same exceptions as :meth:`edit`.\n\n        Parameters\n        -----------\n        until: Optional[Union[:class:`datetime.timedelta`, :class:`datetime.datetime`]]\n            If this is a :class:`datetime.timedelta` then it represents the amount of\n            time the member should be timed out for. If this is a :class:`datetime.datetime`\n            then it's when the member's timeout should expire. If ``None`` is passed then the\n            timeout is removed. Note that the API only allows for timeouts up to 28 days.\n        reason: Optional[:class:`str`]\n            The reason for doing this action. Shows up on the audit log.\n\n        Raises\n        -------\n        TypeError\n            The ``until`` parameter was the wrong type or the datetime was not timezone-aware.\n        \"\"\"\n\n        if until is None:\n            timed_out_until = None\n        elif isinstance(until, datetime.timedelta):\n            timed_out_until = utils.utcnow() + until\n        elif isinstance(until, datetime.datetime):\n            timed_out_until = until\n        else:\n            raise TypeError(f'expected None, datetime.datetime, or datetime.timedelta not {until.__class__.__name__}')\n\n        await self.edit(timed_out_until=timed_out_until, reason=reason)\n\n    async def add_roles(self, *roles: Snowflake, reason: Optional[str] = None, atomic: bool = True) -> None:\n        r\"\"\"|coro|\n\n        Gives the member a number of :class:`Role`\\s.\n\n        You must have :attr:`~Permissions.manage_roles` to\n        use this, and the added :class:`Role`\\s must appear lower in the list\n        of roles than the highest role of the member.\n\n        Parameters\n        -----------\n        \\*roles: :class:`abc.Snowflake`\n            An argument list of :class:`abc.Snowflake` representing a :class:`Role`\n            to give to the member.\n        reason: Optional[:class:`str`]\n            The reason for adding these roles. Shows up on the audit log.\n        atomic: :class:`bool`\n            Whether to atomically add roles. This will ensure that multiple\n            operations will always be applied regardless of the current\n            state of the cache.\n\n        Raises\n        -------\n        Forbidden\n            You do not have permissions to add these roles.\n        HTTPException\n            Adding roles failed.\n        \"\"\"\n\n        if not atomic:\n            new_roles = utils._unique(Object(id=r.id) for s in (self.roles[1:], roles) for r in s)\n            await self.edit(roles=new_roles, reason=reason)\n        else:\n            req = self._state.http.add_role\n            guild_id = self.guild.id\n            user_id = self.id\n            for role in roles:\n                await req(guild_id, user_id, role.id, reason=reason)\n\n    async def remove_roles(self, *roles: Snowflake, reason: Optional[str] = None, atomic: bool = True) -> None:\n        r\"\"\"|coro|\n\n        Removes :class:`Role`\\s from this member.\n\n        You must have :attr:`~Permissions.manage_roles` to\n        use this, and the removed :class:`Role`\\s must appear lower in the list\n        of roles than the highest role of the member.\n\n        Parameters\n        -----------\n        \\*roles: :class:`abc.Snowflake`\n            An argument list of :class:`abc.Snowflake` representing a :class:`Role`\n            to remove from the member.\n        reason: Optional[:class:`str`]\n            The reason for removing these roles. Shows up on the audit log.\n        atomic: :class:`bool`\n            Whether to atomically remove roles. This will ensure that multiple\n            operations will always be applied regardless of the current\n            state of the cache.\n\n        Raises\n        -------\n        Forbidden\n            You do not have permissions to remove these roles.\n        HTTPException\n            Removing the roles failed.\n        \"\"\"\n\n        if not atomic:\n            new_roles = [Object(id=r.id) for r in self.roles[1:]]  # remove @everyone\n            for role in roles:\n                try:\n                    new_roles.remove(Object(id=role.id))\n                except ValueError:\n                    pass\n\n            await self.edit(roles=new_roles, reason=reason)\n        else:\n            req = self._state.http.remove_role\n            guild_id = self.guild.id\n            user_id = self.id\n            for role in roles:\n                await req(guild_id, user_id, role.id, reason=reason)\n\n    def get_role(self, role_id: int, /) -> Optional[Role]:\n        \"\"\"Returns a role with the given ID from roles which the member has.\n\n        .. versionadded:: 2.0\n\n        Parameters\n        -----------\n        role_id: :class:`int`\n            The ID to search for.\n\n        Returns\n        --------\n        Optional[:class:`Role`]\n            The role or ``None`` if not found in the member's roles.\n        \"\"\"\n        return self.guild.get_role(role_id) if self._roles.has(role_id) else None\n\n    def is_timed_out(self) -> bool:\n        \"\"\"Returns whether this member is timed out.\n\n        .. versionadded:: 2.0\n\n        Returns\n        --------\n        :class:`bool`\n            ``True`` if the member is timed out. ``False`` otherwise.\n        \"\"\"\n        if self.timed_out_until is not None:\n            return utils.utcnow() < self.timed_out_until\n        return False\n"
  },
  {
    "path": "discord/mentions.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom __future__ import annotations\nfrom typing import Union, Sequence, TYPE_CHECKING, Any\n\n# fmt: off\n__all__ = (\n    'AllowedMentions',\n)\n# fmt: on\n\nif TYPE_CHECKING:\n    from typing_extensions import Self\n\n    from .types.message import AllowedMentions as AllowedMentionsPayload\n    from .abc import Snowflake\n\n\nclass _FakeBool:\n    def __repr__(self):\n        return 'True'\n\n    def __eq__(self, other):\n        return other is True\n\n    def __bool__(self):\n        return True\n\n\ndefault: Any = _FakeBool()\n\n\nclass AllowedMentions:\n    \"\"\"A class that represents what mentions are allowed in a message.\n\n    This class can be set during :class:`Client` initialisation to apply\n    to every message sent. It can also be applied on a per message basis\n    via :meth:`abc.Messageable.send` for more fine-grained control.\n\n    Attributes\n    ------------\n    everyone: :class:`bool`\n        Whether to allow everyone and here mentions. Defaults to ``True``.\n    users: Union[:class:`bool`, Sequence[:class:`abc.Snowflake`]]\n        Controls the users being mentioned. If ``True`` (the default) then\n        users are mentioned based on the message content. If ``False`` then\n        users are not mentioned at all. If a list of :class:`abc.Snowflake`\n        is given then only the users provided will be mentioned, provided those\n        users are in the message content.\n    roles: Union[:class:`bool`, Sequence[:class:`abc.Snowflake`]]\n        Controls the roles being mentioned. If ``True`` (the default) then\n        roles are mentioned based on the message content. If ``False`` then\n        roles are not mentioned at all. If a list of :class:`abc.Snowflake`\n        is given then only the roles provided will be mentioned, provided those\n        roles are in the message content.\n    replied_user: :class:`bool`\n        Whether to mention the author of the message being replied to. Defaults\n        to ``True``.\n\n        .. versionadded:: 1.6\n    \"\"\"\n\n    __slots__ = ('everyone', 'users', 'roles', 'replied_user')\n\n    def __init__(\n        self,\n        *,\n        everyone: bool = default,\n        users: Union[bool, Sequence[Snowflake]] = default,\n        roles: Union[bool, Sequence[Snowflake]] = default,\n        replied_user: bool = default,\n    ):\n        self.everyone: bool = everyone\n        self.users: Union[bool, Sequence[Snowflake]] = users\n        self.roles: Union[bool, Sequence[Snowflake]] = roles\n        self.replied_user: bool = replied_user\n\n    @classmethod\n    def all(cls) -> Self:\n        \"\"\"A factory method that returns a :class:`AllowedMentions` with all fields explicitly set to ``True``\n\n        .. versionadded:: 1.5\n        \"\"\"\n        return cls(everyone=True, users=True, roles=True, replied_user=True)\n\n    @classmethod\n    def none(cls) -> Self:\n        \"\"\"A factory method that returns a :class:`AllowedMentions` with all fields set to ``False``\n\n        .. versionadded:: 1.5\n        \"\"\"\n        return cls(everyone=False, users=False, roles=False, replied_user=False)\n\n    def to_dict(self) -> AllowedMentionsPayload:\n        parse = []\n        data = {}\n\n        if self.everyone:\n            parse.append('everyone')\n\n        if self.users == True:\n            parse.append('users')\n        elif self.users != False:\n            data['users'] = [x.id for x in self.users]\n\n        if self.roles == True:\n            parse.append('roles')\n        elif self.roles != False:\n            data['roles'] = [x.id for x in self.roles]\n\n        if self.replied_user:\n            data['replied_user'] = True\n\n        data['parse'] = parse\n        return data  # type: ignore\n\n    def merge(self, other: AllowedMentions) -> AllowedMentions:\n        # Creates a new AllowedMentions by merging from another one.\n        # Merge is done by using the 'self' values unless explicitly\n        # overridden by the 'other' values.\n        everyone = self.everyone if other.everyone is default else other.everyone\n        users = self.users if other.users is default else other.users\n        roles = self.roles if other.roles is default else other.roles\n        replied_user = self.replied_user if other.replied_user is default else other.replied_user\n        return AllowedMentions(everyone=everyone, roles=roles, users=users, replied_user=replied_user)\n\n    def __repr__(self) -> str:\n        return (\n            f'{self.__class__.__name__}(everyone={self.everyone}, '\n            f'users={self.users}, roles={self.roles}, replied_user={self.replied_user})'\n        )\n"
  },
  {
    "path": "discord/message.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom __future__ import annotations\n\nimport asyncio\nimport datetime\nimport re\nimport io\nfrom os import PathLike\nfrom typing import (\n    Dict,\n    TYPE_CHECKING,\n    Sequence,\n    Union,\n    List,\n    Optional,\n    Any,\n    Callable,\n    Tuple,\n    ClassVar,\n    Type,\n    overload,\n)\n\nfrom . import utils\nfrom .asset import Asset\nfrom .reaction import Reaction\nfrom .emoji import Emoji\nfrom .partial_emoji import PartialEmoji\nfrom .enums import InteractionType, MessageType, ChannelType, try_enum\nfrom .errors import HTTPException\nfrom .components import _component_factory\nfrom .embeds import Embed\nfrom .member import Member\nfrom .flags import MessageFlags, AttachmentFlags\nfrom .file import File\nfrom .utils import escape_mentions, MISSING, deprecated\nfrom .http import handle_message_parameters\nfrom .guild import Guild\nfrom .mixins import Hashable\nfrom .sticker import StickerItem, GuildSticker\nfrom .threads import Thread\nfrom .channel import PartialMessageable\nfrom .poll import Poll\n\nif TYPE_CHECKING:\n    from typing_extensions import Self\n\n    from .types.message import (\n        Message as MessagePayload,\n        Attachment as AttachmentPayload,\n        MessageReference as MessageReferencePayload,\n        MessageApplication as MessageApplicationPayload,\n        MessageActivity as MessageActivityPayload,\n        RoleSubscriptionData as RoleSubscriptionDataPayload,\n        MessageInteractionMetadata as MessageInteractionMetadataPayload,\n    )\n\n    from .types.interactions import MessageInteraction as MessageInteractionPayload\n\n    from .types.components import Component as ComponentPayload\n    from .types.threads import ThreadArchiveDuration\n    from .types.member import (\n        Member as MemberPayload,\n        UserWithMember as UserWithMemberPayload,\n    )\n    from .types.user import User as UserPayload\n    from .types.embed import Embed as EmbedPayload\n    from .types.gateway import MessageReactionRemoveEvent, MessageUpdateEvent\n    from .abc import Snowflake\n    from .abc import GuildChannel, MessageableChannel\n    from .components import ActionRow, ActionRowChildComponentType\n    from .state import ConnectionState\n    from .mentions import AllowedMentions\n    from .user import User\n    from .role import Role\n    from .ui.view import View\n\n    EmojiInputType = Union[Emoji, PartialEmoji, str]\n    MessageComponentType = Union[ActionRow, ActionRowChildComponentType]\n\n\n__all__ = (\n    'Attachment',\n    'Message',\n    'PartialMessage',\n    'MessageInteraction',\n    'MessageReference',\n    'DeletedReferencedMessage',\n    'MessageApplication',\n    'RoleSubscriptionInfo',\n    'MessageInteractionMetadata',\n)\n\n\ndef convert_emoji_reaction(emoji: Union[EmojiInputType, Reaction]) -> str:\n    if isinstance(emoji, Reaction):\n        emoji = emoji.emoji\n\n    if isinstance(emoji, Emoji):\n        return f'{emoji.name}:{emoji.id}'\n    if isinstance(emoji, PartialEmoji):\n        return emoji._as_reaction()\n    if isinstance(emoji, str):\n        # Reactions can be in :name:id format, but not <:name:id>.\n        # No existing emojis have <> in them, so this should be okay.\n        return emoji.strip('<>')\n\n    raise TypeError(f'emoji argument must be str, Emoji, or Reaction not {emoji.__class__.__name__}.')\n\n\nclass Attachment(Hashable):\n    \"\"\"Represents an attachment from Discord.\n\n    .. container:: operations\n\n        .. describe:: str(x)\n\n            Returns the URL of the attachment.\n\n        .. describe:: x == y\n\n            Checks if the attachment is equal to another attachment.\n\n        .. describe:: x != y\n\n            Checks if the attachment is not equal to another attachment.\n\n        .. describe:: hash(x)\n\n            Returns the hash of the attachment.\n\n    .. versionchanged:: 1.7\n        Attachment can now be casted to :class:`str` and is hashable.\n\n    Attributes\n    ------------\n    id: :class:`int`\n        The attachment ID.\n    size: :class:`int`\n        The attachment size in bytes.\n    height: Optional[:class:`int`]\n        The attachment's height, in pixels. Only applicable to images and videos.\n    width: Optional[:class:`int`]\n        The attachment's width, in pixels. Only applicable to images and videos.\n    filename: :class:`str`\n        The attachment's filename.\n    url: :class:`str`\n        The attachment URL. If the message this attachment was attached\n        to is deleted, then this will 404.\n    proxy_url: :class:`str`\n        The proxy URL. This is a cached version of the :attr:`~Attachment.url` in the\n        case of images. When the message is deleted, this URL might be valid for a few\n        minutes or not valid at all.\n    content_type: Optional[:class:`str`]\n        The attachment's `media type <https://en.wikipedia.org/wiki/Media_type>`_\n\n        .. versionadded:: 1.7\n    description: Optional[:class:`str`]\n        The attachment's description. Only applicable to images.\n\n        .. versionadded:: 2.0\n    ephemeral: :class:`bool`\n        Whether the attachment is ephemeral.\n\n        .. versionadded:: 2.0\n    duration: Optional[:class:`float`]\n        The duration of the audio file in seconds. Returns ``None`` if it's not a voice message.\n\n        .. versionadded:: 2.3\n    waveform: Optional[:class:`bytes`]\n        The waveform (amplitudes) of the audio in bytes. Returns ``None`` if it's not a voice message.\n\n        .. versionadded:: 2.3\n    \"\"\"\n\n    __slots__ = (\n        'id',\n        'size',\n        'height',\n        'width',\n        'filename',\n        'url',\n        'proxy_url',\n        '_http',\n        'content_type',\n        'description',\n        'ephemeral',\n        'duration',\n        'waveform',\n        '_flags',\n    )\n\n    def __init__(self, *, data: AttachmentPayload, state: ConnectionState):\n        self.id: int = int(data['id'])\n        self.size: int = data['size']\n        self.height: Optional[int] = data.get('height')\n        self.width: Optional[int] = data.get('width')\n        self.filename: str = data['filename']\n        self.url: str = data['url']\n        self.proxy_url: str = data['proxy_url']\n        self._http = state.http\n        self.content_type: Optional[str] = data.get('content_type')\n        self.description: Optional[str] = data.get('description')\n        self.ephemeral: bool = data.get('ephemeral', False)\n        self.duration: Optional[float] = data.get('duration_secs')\n\n        waveform = data.get('waveform')\n        self.waveform: Optional[bytes] = utils._base64_to_bytes(waveform) if waveform is not None else None\n\n        self._flags: int = data.get('flags', 0)\n\n    @property\n    def flags(self) -> AttachmentFlags:\n        \"\"\":class:`AttachmentFlags`: The attachment's flags.\"\"\"\n        return AttachmentFlags._from_value(self._flags)\n\n    def is_spoiler(self) -> bool:\n        \"\"\":class:`bool`: Whether this attachment contains a spoiler.\"\"\"\n        return self.filename.startswith('SPOILER_')\n\n    def is_voice_message(self) -> bool:\n        \"\"\":class:`bool`: Whether this attachment is a voice message.\"\"\"\n        return self.duration is not None and 'voice-message' in self.url\n\n    def __repr__(self) -> str:\n        return f'<Attachment id={self.id} filename={self.filename!r} url={self.url!r}>'\n\n    def __str__(self) -> str:\n        return self.url or ''\n\n    async def save(\n        self,\n        fp: Union[io.BufferedIOBase, PathLike[Any]],\n        *,\n        seek_begin: bool = True,\n        use_cached: bool = False,\n    ) -> int:\n        \"\"\"|coro|\n\n        Saves this attachment into a file-like object.\n\n        Parameters\n        -----------\n        fp: Union[:class:`io.BufferedIOBase`, :class:`os.PathLike`]\n            The file-like object to save this attachment to or the filename\n            to use. If a filename is passed then a file is created with that\n            filename and used instead.\n        seek_begin: :class:`bool`\n            Whether to seek to the beginning of the file after saving is\n            successfully done.\n        use_cached: :class:`bool`\n            Whether to use :attr:`proxy_url` rather than :attr:`url` when downloading\n            the attachment. This will allow attachments to be saved after deletion\n            more often, compared to the regular URL which is generally deleted right\n            after the message is deleted. Note that this can still fail to download\n            deleted attachments if too much time has passed and it does not work\n            on some types of attachments.\n\n        Raises\n        --------\n        HTTPException\n            Saving the attachment failed.\n        NotFound\n            The attachment was deleted.\n\n        Returns\n        --------\n        :class:`int`\n            The number of bytes written.\n        \"\"\"\n        data = await self.read(use_cached=use_cached)\n        if isinstance(fp, io.BufferedIOBase):\n            written = fp.write(data)\n            if seek_begin:\n                fp.seek(0)\n            return written\n        else:\n            with open(fp, 'wb') as f:\n                return f.write(data)\n\n    async def read(self, *, use_cached: bool = False) -> bytes:\n        \"\"\"|coro|\n\n        Retrieves the content of this attachment as a :class:`bytes` object.\n\n        .. versionadded:: 1.1\n\n        Parameters\n        -----------\n        use_cached: :class:`bool`\n            Whether to use :attr:`proxy_url` rather than :attr:`url` when downloading\n            the attachment. This will allow attachments to be saved after deletion\n            more often, compared to the regular URL which is generally deleted right\n            after the message is deleted. Note that this can still fail to download\n            deleted attachments if too much time has passed and it does not work\n            on some types of attachments.\n\n        Raises\n        ------\n        HTTPException\n            Downloading the attachment failed.\n        Forbidden\n            You do not have permissions to access this attachment\n        NotFound\n            The attachment was deleted.\n\n        Returns\n        -------\n        :class:`bytes`\n            The contents of the attachment.\n        \"\"\"\n        url = self.proxy_url if use_cached else self.url\n        data = await self._http.get_from_cdn(url)\n        return data\n\n    async def to_file(\n        self,\n        *,\n        filename: Optional[str] = MISSING,\n        description: Optional[str] = MISSING,\n        use_cached: bool = False,\n        spoiler: bool = False,\n    ) -> File:\n        \"\"\"|coro|\n\n        Converts the attachment into a :class:`File` suitable for sending via\n        :meth:`abc.Messageable.send`.\n\n        .. versionadded:: 1.3\n\n        Parameters\n        -----------\n        filename: Optional[:class:`str`]\n            The filename to use for the file. If not specified then the filename\n            of the attachment is used instead.\n\n            .. versionadded:: 2.0\n        description: Optional[:class:`str`]\n            The description to use for the file. If not specified then the\n            description of the attachment is used instead.\n\n            .. versionadded:: 2.0\n        use_cached: :class:`bool`\n            Whether to use :attr:`proxy_url` rather than :attr:`url` when downloading\n            the attachment. This will allow attachments to be saved after deletion\n            more often, compared to the regular URL which is generally deleted right\n            after the message is deleted. Note that this can still fail to download\n            deleted attachments if too much time has passed and it does not work\n            on some types of attachments.\n\n            .. versionadded:: 1.4\n        spoiler: :class:`bool`\n            Whether the file is a spoiler.\n\n            .. versionadded:: 1.4\n\n        Raises\n        ------\n        HTTPException\n            Downloading the attachment failed.\n        Forbidden\n            You do not have permissions to access this attachment\n        NotFound\n            The attachment was deleted.\n\n        Returns\n        -------\n        :class:`File`\n            The attachment as a file suitable for sending.\n        \"\"\"\n\n        data = await self.read(use_cached=use_cached)\n        file_filename = filename if filename is not MISSING else self.filename\n        file_description = description if description is not MISSING else self.description\n        return File(io.BytesIO(data), filename=file_filename, description=file_description, spoiler=spoiler)\n\n    def to_dict(self) -> AttachmentPayload:\n        result: AttachmentPayload = {\n            'filename': self.filename,\n            'id': self.id,\n            'proxy_url': self.proxy_url,\n            'size': self.size,\n            'url': self.url,\n            'spoiler': self.is_spoiler(),\n        }\n        if self.height:\n            result['height'] = self.height\n        if self.width:\n            result['width'] = self.width\n        if self.content_type:\n            result['content_type'] = self.content_type\n        if self.description is not None:\n            result['description'] = self.description\n        return result\n\n\nclass DeletedReferencedMessage:\n    \"\"\"A special sentinel type given when the resolved message reference\n    points to a deleted message.\n\n    The purpose of this class is to separate referenced messages that could not be\n    fetched and those that were previously fetched but have since been deleted.\n\n    .. versionadded:: 1.6\n    \"\"\"\n\n    __slots__ = ('_parent',)\n\n    def __init__(self, parent: MessageReference):\n        self._parent: MessageReference = parent\n\n    def __repr__(self) -> str:\n        return f\"<DeletedReferencedMessage id={self.id} channel_id={self.channel_id} guild_id={self.guild_id!r}>\"\n\n    @property\n    def id(self) -> int:\n        \"\"\":class:`int`: The message ID of the deleted referenced message.\"\"\"\n        # the parent's message id won't be None here\n        return self._parent.message_id  # type: ignore\n\n    @property\n    def channel_id(self) -> int:\n        \"\"\":class:`int`: The channel ID of the deleted referenced message.\"\"\"\n        return self._parent.channel_id\n\n    @property\n    def guild_id(self) -> Optional[int]:\n        \"\"\"Optional[:class:`int`]: The guild ID of the deleted referenced message.\"\"\"\n        return self._parent.guild_id\n\n\nclass MessageReference:\n    \"\"\"Represents a reference to a :class:`~discord.Message`.\n\n    .. versionadded:: 1.5\n\n    .. versionchanged:: 1.6\n        This class can now be constructed by users.\n\n    Attributes\n    -----------\n    message_id: Optional[:class:`int`]\n        The id of the message referenced.\n    channel_id: :class:`int`\n        The channel id of the message referenced.\n    guild_id: Optional[:class:`int`]\n        The guild id of the message referenced.\n    fail_if_not_exists: :class:`bool`\n        Whether replying to the referenced message should raise :class:`HTTPException`\n        if the message no longer exists or Discord could not fetch the message.\n\n        .. versionadded:: 1.7\n\n    resolved: Optional[Union[:class:`Message`, :class:`DeletedReferencedMessage`]]\n        The message that this reference resolved to. If this is ``None``\n        then the original message was not fetched either due to the Discord API\n        not attempting to resolve it or it not being available at the time of creation.\n        If the message was resolved at a prior point but has since been deleted then\n        this will be of type :class:`DeletedReferencedMessage`.\n\n        Currently, this is mainly the replied to message when a user replies to a message.\n\n        .. versionadded:: 1.6\n    \"\"\"\n\n    __slots__ = ('message_id', 'channel_id', 'guild_id', 'fail_if_not_exists', 'resolved', '_state')\n\n    def __init__(self, *, message_id: int, channel_id: int, guild_id: Optional[int] = None, fail_if_not_exists: bool = True):\n        self._state: Optional[ConnectionState] = None\n        self.resolved: Optional[Union[Message, DeletedReferencedMessage]] = None\n        self.message_id: Optional[int] = message_id\n        self.channel_id: int = channel_id\n        self.guild_id: Optional[int] = guild_id\n        self.fail_if_not_exists: bool = fail_if_not_exists\n\n    @classmethod\n    def with_state(cls, state: ConnectionState, data: MessageReferencePayload) -> Self:\n        self = cls.__new__(cls)\n        self.message_id = utils._get_as_snowflake(data, 'message_id')\n        self.channel_id = int(data['channel_id'])\n        self.guild_id = utils._get_as_snowflake(data, 'guild_id')\n        self.fail_if_not_exists = data.get('fail_if_not_exists', True)\n        self._state = state\n        self.resolved = None\n        return self\n\n    @classmethod\n    def from_message(cls, message: PartialMessage, *, fail_if_not_exists: bool = True) -> Self:\n        \"\"\"Creates a :class:`MessageReference` from an existing :class:`~discord.Message`.\n\n        .. versionadded:: 1.6\n\n        Parameters\n        ----------\n        message: :class:`~discord.Message`\n            The message to be converted into a reference.\n        fail_if_not_exists: :class:`bool`\n            Whether replying to the referenced message should raise :class:`HTTPException`\n            if the message no longer exists or Discord could not fetch the message.\n\n            .. versionadded:: 1.7\n\n        Returns\n        -------\n        :class:`MessageReference`\n            A reference to the message.\n        \"\"\"\n        self = cls(\n            message_id=message.id,\n            channel_id=message.channel.id,\n            guild_id=getattr(message.guild, 'id', None),\n            fail_if_not_exists=fail_if_not_exists,\n        )\n        self._state = message._state\n        return self\n\n    @property\n    def cached_message(self) -> Optional[Message]:\n        \"\"\"Optional[:class:`~discord.Message`]: The cached message, if found in the internal message cache.\"\"\"\n        return self._state and self._state._get_message(self.message_id)\n\n    @property\n    def jump_url(self) -> str:\n        \"\"\":class:`str`: Returns a URL that allows the client to jump to the referenced message.\n\n        .. versionadded:: 1.7\n        \"\"\"\n        guild_id = self.guild_id if self.guild_id is not None else '@me'\n        return f'https://discord.com/channels/{guild_id}/{self.channel_id}/{self.message_id}'\n\n    def __repr__(self) -> str:\n        return f'<MessageReference message_id={self.message_id!r} channel_id={self.channel_id!r} guild_id={self.guild_id!r}>'\n\n    def to_dict(self) -> MessageReferencePayload:\n        result: Dict[str, Any] = {'message_id': self.message_id} if self.message_id is not None else {}\n        result['channel_id'] = self.channel_id\n        if self.guild_id is not None:\n            result['guild_id'] = self.guild_id\n        if self.fail_if_not_exists is not None:\n            result['fail_if_not_exists'] = self.fail_if_not_exists\n        return result  # type: ignore # Type checker doesn't understand these are the same.\n\n    to_message_reference_dict = to_dict\n\n\nclass MessageInteraction(Hashable):\n    \"\"\"Represents the interaction that a :class:`Message` is a response to.\n\n    .. versionadded:: 2.0\n\n    .. container:: operations\n\n        .. describe:: x == y\n\n            Checks if two message interactions are equal.\n\n        .. describe:: x != y\n\n            Checks if two message interactions are not equal.\n\n        .. describe:: hash(x)\n\n            Returns the message interaction's hash.\n\n    Attributes\n    -----------\n    id: :class:`int`\n        The interaction ID.\n    type: :class:`InteractionType`\n        The interaction type.\n    name: :class:`str`\n        The name of the interaction.\n    user: Union[:class:`User`, :class:`Member`]\n        The user or member that invoked the interaction.\n    \"\"\"\n\n    __slots__: Tuple[str, ...] = ('id', 'type', 'name', 'user')\n\n    def __init__(self, *, state: ConnectionState, guild: Optional[Guild], data: MessageInteractionPayload) -> None:\n        self.id: int = int(data['id'])\n        self.type: InteractionType = try_enum(InteractionType, data['type'])\n        self.name: str = data['name']\n        self.user: Union[User, Member] = MISSING\n\n        try:\n            payload = data['member']\n        except KeyError:\n            self.user = state.create_user(data['user'])\n        else:\n            if guild is None:\n                # This is an unfortunate data loss, but it's better than giving bad data\n                # This is also an incredibly rare scenario.\n                self.user = state.create_user(data['user'])\n            else:\n                payload['user'] = data['user']\n                self.user = Member(data=payload, guild=guild, state=state)  # type: ignore\n\n    def __repr__(self) -> str:\n        return f'<MessageInteraction id={self.id} name={self.name!r} type={self.type!r} user={self.user!r}>'\n\n    @property\n    def created_at(self) -> datetime.datetime:\n        \"\"\":class:`datetime.datetime`: The interaction's creation time in UTC.\"\"\"\n        return utils.snowflake_time(self.id)\n\n\nclass MessageInteractionMetadata(Hashable):\n    \"\"\"Represents the interaction metadata of a :class:`Message` if\n    it was sent in response to an interaction.\n\n    .. versionadded:: 2.4\n\n    .. container:: operations\n\n        .. describe:: x == y\n\n            Checks if two message interactions are equal.\n\n        .. describe:: x != y\n\n            Checks if two message interactions are not equal.\n\n        .. describe:: hash(x)\n\n            Returns the message interaction's hash.\n\n    Attributes\n    -----------\n    id: :class:`int`\n        The interaction ID.\n    type: :class:`InteractionType`\n        The interaction type.\n    user: :class:`User`\n        The user that invoked the interaction.\n    original_response_message_id: Optional[:class:`int`]\n        The ID of the original response message if the message is a follow-up.\n    interacted_message_id: Optional[:class:`int`]\n        The ID of the message that containes the interactive components, if applicable.\n    modal_interaction: Optional[:class:`.MessageInteractionMetadata`]\n        The metadata of the modal submit interaction that triggered this interaction, if applicable.\n    \"\"\"\n\n    __slots__: Tuple[str, ...] = (\n        'id',\n        'type',\n        'user',\n        'original_response_message_id',\n        'interacted_message_id',\n        'modal_interaction',\n        '_integration_owners',\n        '_state',\n        '_guild',\n    )\n\n    def __init__(self, *, state: ConnectionState, guild: Optional[Guild], data: MessageInteractionMetadataPayload) -> None:\n        self._guild: Optional[Guild] = guild\n        self._state: ConnectionState = state\n\n        self.id: int = int(data['id'])\n        self.type: InteractionType = try_enum(InteractionType, data['type'])\n        self.user = state.create_user(data['user'])\n        self._integration_owners: Dict[int, int] = {\n            int(key): int(value) for key, value in data.get('authorizing_integration_owners', {}).items()\n        }\n\n        self.original_response_message_id: Optional[int] = None\n        try:\n            self.original_response_message_id = int(data['original_response_message_id'])\n        except KeyError:\n            pass\n\n        self.interacted_message_id: Optional[int] = None\n        try:\n            self.interacted_message_id = int(data['interacted_message_id'])\n        except KeyError:\n            pass\n\n        self.modal_interaction: Optional[MessageInteractionMetadata] = None\n        try:\n            self.modal_interaction = MessageInteractionMetadata(\n                state=state, guild=guild, data=data['triggering_interaction_metadata']\n            )\n        except KeyError:\n            pass\n\n    def __repr__(self) -> str:\n        return f'<MessageInteraction id={self.id} type={self.type!r} user={self.user!r}>'\n\n    @property\n    def created_at(self) -> datetime.datetime:\n        \"\"\":class:`datetime.datetime`: The interaction's creation time in UTC.\"\"\"\n        return utils.snowflake_time(self.id)\n\n    @property\n    def original_response_message(self) -> Optional[Message]:\n        \"\"\"Optional[:class:`~discord.Message`]: The original response message if the message\n        is a follow-up and is found in cache.\n        \"\"\"\n        if self.original_response_message_id:\n            return self._state._get_message(self.original_response_message_id)\n        return None\n\n    @property\n    def interacted_message(self) -> Optional[Message]:\n        \"\"\"Optional[:class:`~discord.Message`]: The message that\n        containes the interactive components, if applicable and is found in cache.\n        \"\"\"\n        if self.interacted_message_id:\n            return self._state._get_message(self.interacted_message_id)\n        return None\n\n    def is_guild_integration(self) -> bool:\n        \"\"\":class:`bool`: Returns ``True`` if the interaction is a guild integration.\"\"\"\n        if self._guild:\n            return self._guild.id == self._integration_owners.get(0)\n\n        return False\n\n    def is_user_integration(self) -> bool:\n        \"\"\":class:`bool`: Returns ``True`` if the interaction is a user integration.\"\"\"\n        return self.user.id == self._integration_owners.get(1)\n\n\ndef flatten_handlers(cls: Type[Message]) -> Type[Message]:\n    prefix = len('_handle_')\n    handlers = [\n        (key[prefix:], value)\n        for key, value in cls.__dict__.items()\n        if key.startswith('_handle_') and key != '_handle_member'\n    ]\n\n    # store _handle_member last\n    handlers.append(('member', cls._handle_member))\n    cls._HANDLERS = handlers\n    cls._CACHED_SLOTS = [attr for attr in cls.__slots__ if attr.startswith('_cs_')]\n    return cls\n\n\nclass MessageApplication:\n    \"\"\"Represents a message's application data from a :class:`~discord.Message`.\n\n    .. versionadded:: 2.0\n\n    Attributes\n    -----------\n    id: :class:`int`\n        The application ID.\n    description: :class:`str`\n        The application description.\n    name: :class:`str`\n        The application's name.\n    \"\"\"\n\n    __slots__ = ('_state', '_icon', '_cover_image', 'id', 'description', 'name')\n\n    def __init__(self, *, state: ConnectionState, data: MessageApplicationPayload) -> None:\n        self._state: ConnectionState = state\n        self.id: int = int(data['id'])\n        self.description: str = data['description']\n        self.name: str = data['name']\n        self._icon: Optional[str] = data['icon']\n        self._cover_image: Optional[str] = data.get('cover_image')\n\n    def __repr__(self) -> str:\n        return f'<MessageApplication id={self.id} name={self.name!r}>'\n\n    @property\n    def icon(self) -> Optional[Asset]:\n        \"\"\"Optional[:class:`Asset`]: The application's icon, if any.\"\"\"\n        if self._icon:\n            return Asset._from_app_icon(state=self._state, object_id=self.id, icon_hash=self._icon, asset_type='icon')\n        return None\n\n    @property\n    def cover(self) -> Optional[Asset]:\n        \"\"\"Optional[:class:`Asset`]: The application's cover image, if any.\"\"\"\n        if self._cover_image:\n            return Asset._from_app_icon(\n                state=self._state, object_id=self.id, icon_hash=self._cover_image, asset_type='cover_image'\n            )\n        return None\n\n\nclass RoleSubscriptionInfo:\n    \"\"\"Represents a message's role subscription information.\n\n    This is currently only attached to messages of type :attr:`MessageType.role_subscription_purchase`.\n\n    .. versionadded:: 2.0\n\n    Attributes\n    -----------\n    role_subscription_listing_id: :class:`int`\n        The ID of the SKU and listing that the user is subscribed to.\n    tier_name: :class:`str`\n        The name of the tier that the user is subscribed to.\n    total_months_subscribed: :class:`int`\n        The cumulative number of months that the user has been subscribed for.\n    is_renewal: :class:`bool`\n        Whether this notification is for a renewal rather than a new purchase.\n    \"\"\"\n\n    __slots__ = (\n        'role_subscription_listing_id',\n        'tier_name',\n        'total_months_subscribed',\n        'is_renewal',\n    )\n\n    def __init__(self, data: RoleSubscriptionDataPayload) -> None:\n        self.role_subscription_listing_id: int = int(data['role_subscription_listing_id'])\n        self.tier_name: str = data['tier_name']\n        self.total_months_subscribed: int = data['total_months_subscribed']\n        self.is_renewal: bool = data['is_renewal']\n\n\nclass PartialMessage(Hashable):\n    \"\"\"Represents a partial message to aid with working messages when only\n    a message and channel ID are present.\n\n    There are two ways to construct this class. The first one is through\n    the constructor itself, and the second is via the following:\n\n    - :meth:`TextChannel.get_partial_message`\n    - :meth:`VoiceChannel.get_partial_message`\n    - :meth:`StageChannel.get_partial_message`\n    - :meth:`Thread.get_partial_message`\n    - :meth:`DMChannel.get_partial_message`\n\n    Note that this class is trimmed down and has no rich attributes.\n\n    .. versionadded:: 1.6\n\n    .. container:: operations\n\n        .. describe:: x == y\n\n            Checks if two partial messages are equal.\n\n        .. describe:: x != y\n\n            Checks if two partial messages are not equal.\n\n        .. describe:: hash(x)\n\n            Returns the partial message's hash.\n\n    Attributes\n    -----------\n    channel: Union[:class:`PartialMessageable`, :class:`TextChannel`, :class:`StageChannel`, :class:`VoiceChannel`, :class:`Thread`, :class:`DMChannel`]\n        The channel associated with this partial message.\n    id: :class:`int`\n        The message ID.\n    guild: Optional[:class:`Guild`]\n        The guild that the partial message belongs to, if applicable.\n    \"\"\"\n\n    __slots__ = ('channel', 'id', '_cs_guild', '_state', 'guild')\n\n    def __init__(self, *, channel: MessageableChannel, id: int) -> None:\n        if not isinstance(channel, PartialMessageable) and channel.type not in (\n            ChannelType.text,\n            ChannelType.voice,\n            ChannelType.stage_voice,\n            ChannelType.news,\n            ChannelType.private,\n            ChannelType.news_thread,\n            ChannelType.public_thread,\n            ChannelType.private_thread,\n        ):\n            raise TypeError(\n                f'expected PartialMessageable, TextChannel, StageChannel, VoiceChannel, DMChannel or Thread not {type(channel)!r}'\n            )\n\n        self.channel: MessageableChannel = channel\n        self._state: ConnectionState = channel._state\n        self.id: int = id\n\n        self.guild: Optional[Guild] = getattr(channel, 'guild', None)\n\n    def _update(self, data: MessageUpdateEvent) -> None:\n        # This is used for duck typing purposes.\n        # Just do nothing with the data.\n        pass\n\n    # Also needed for duck typing purposes\n    # n.b. not exposed\n    pinned: Any = property(None, lambda x, y: None)\n\n    def __repr__(self) -> str:\n        return f'<PartialMessage id={self.id} channel={self.channel!r}>'\n\n    @property\n    def created_at(self) -> datetime.datetime:\n        \"\"\":class:`datetime.datetime`: The partial message's creation time in UTC.\"\"\"\n        return utils.snowflake_time(self.id)\n\n    @property\n    def jump_url(self) -> str:\n        \"\"\":class:`str`: Returns a URL that allows the client to jump to this message.\"\"\"\n        guild_id = getattr(self.guild, 'id', '@me')\n        return f'https://discord.com/channels/{guild_id}/{self.channel.id}/{self.id}'\n\n    @property\n    def thread(self) -> Optional[Thread]:\n        \"\"\"Optional[:class:`Thread`]: The public thread created from this message, if it exists.\n\n        .. note::\n\n            This does not retrieve archived threads, as they are not retained in the internal\n            cache. Use :meth:`fetch_thread` instead.\n\n        .. versionadded:: 2.4\n        \"\"\"\n        if self.guild is not None:\n            return self.guild.get_thread(self.id)\n\n    async def fetch(self) -> Message:\n        \"\"\"|coro|\n\n        Fetches the partial message to a full :class:`Message`.\n\n        Raises\n        --------\n        NotFound\n            The message was not found.\n        Forbidden\n            You do not have the permissions required to get a message.\n        HTTPException\n            Retrieving the message failed.\n\n        Returns\n        --------\n        :class:`Message`\n            The full message.\n        \"\"\"\n\n        data = await self._state.http.get_message(self.channel.id, self.id)\n        return self._state.create_message(channel=self.channel, data=data)\n\n    async def delete(self, *, delay: Optional[float] = None) -> None:\n        \"\"\"|coro|\n\n        Deletes the message.\n\n        Your own messages could be deleted without any proper permissions. However to\n        delete other people's messages, you must have :attr:`~Permissions.manage_messages`.\n\n        .. versionchanged:: 1.1\n            Added the new ``delay`` keyword-only parameter.\n\n        Parameters\n        -----------\n        delay: Optional[:class:`float`]\n            If provided, the number of seconds to wait in the background\n            before deleting the message. If the deletion fails then it is silently ignored.\n\n        Raises\n        ------\n        Forbidden\n            You do not have proper permissions to delete the message.\n        NotFound\n            The message was deleted already\n        HTTPException\n            Deleting the message failed.\n        \"\"\"\n        if delay is not None:\n\n            async def delete(delay: float):\n                await asyncio.sleep(delay)\n                try:\n                    await self._state.http.delete_message(self.channel.id, self.id)\n                except HTTPException:\n                    pass\n\n            asyncio.create_task(delete(delay))\n        else:\n            await self._state.http.delete_message(self.channel.id, self.id)\n\n    @overload\n    async def edit(\n        self,\n        *,\n        content: Optional[str] = ...,\n        embed: Optional[Embed] = ...,\n        attachments: Sequence[Union[Attachment, File]] = ...,\n        delete_after: Optional[float] = ...,\n        allowed_mentions: Optional[AllowedMentions] = ...,\n        view: Optional[View] = ...,\n    ) -> Message:\n        ...\n\n    @overload\n    async def edit(\n        self,\n        *,\n        content: Optional[str] = ...,\n        embeds: Sequence[Embed] = ...,\n        attachments: Sequence[Union[Attachment, File]] = ...,\n        delete_after: Optional[float] = ...,\n        allowed_mentions: Optional[AllowedMentions] = ...,\n        view: Optional[View] = ...,\n    ) -> Message:\n        ...\n\n    async def edit(\n        self,\n        *,\n        content: Optional[str] = MISSING,\n        embed: Optional[Embed] = MISSING,\n        embeds: Sequence[Embed] = MISSING,\n        attachments: Sequence[Union[Attachment, File]] = MISSING,\n        delete_after: Optional[float] = None,\n        allowed_mentions: Optional[AllowedMentions] = MISSING,\n        view: Optional[View] = MISSING,\n    ) -> Message:\n        \"\"\"|coro|\n\n        Edits the message.\n\n        The content must be able to be transformed into a string via ``str(content)``.\n\n        .. versionchanged:: 2.0\n            Edits are no longer in-place, the newly edited message is returned instead.\n\n        .. versionchanged:: 2.0\n            This function will now raise :exc:`TypeError` instead of\n            ``InvalidArgument``.\n\n        Parameters\n        -----------\n        content: Optional[:class:`str`]\n            The new content to replace the message with.\n            Could be ``None`` to remove the content.\n        embed: Optional[:class:`Embed`]\n            The new embed to replace the original with.\n            Could be ``None`` to remove the embed.\n        embeds: List[:class:`Embed`]\n            The new embeds to replace the original with. Must be a maximum of 10.\n            To remove all embeds ``[]`` should be passed.\n\n            .. versionadded:: 2.0\n        attachments: List[Union[:class:`Attachment`, :class:`File`]]\n            A list of attachments to keep in the message as well as new files to upload. If ``[]`` is passed\n            then all attachments are removed.\n\n            .. note::\n\n                New files will always appear after current attachments.\n\n            .. versionadded:: 2.0\n        delete_after: Optional[:class:`float`]\n            If provided, the number of seconds to wait in the background\n            before deleting the message we just edited. If the deletion fails,\n            then it is silently ignored.\n        allowed_mentions: Optional[:class:`~discord.AllowedMentions`]\n            Controls the mentions being processed in this message. If this is\n            passed, then the object is merged with :attr:`~discord.Client.allowed_mentions`.\n            The merging behaviour only overrides attributes that have been explicitly passed\n            to the object, otherwise it uses the attributes set in :attr:`~discord.Client.allowed_mentions`.\n            If no object is passed at all then the defaults given by :attr:`~discord.Client.allowed_mentions`\n            are used instead.\n\n            .. versionadded:: 1.4\n        view: Optional[:class:`~discord.ui.View`]\n            The updated view to update this message with. If ``None`` is passed then\n            the view is removed.\n\n        Raises\n        -------\n        HTTPException\n            Editing the message failed.\n        Forbidden\n            Tried to suppress a message without permissions or\n            edited a message's content or embed that isn't yours.\n        TypeError\n            You specified both ``embed`` and ``embeds``\n\n        Returns\n        --------\n        :class:`Message`\n            The newly edited message.\n        \"\"\"\n\n        if content is not MISSING:\n            previous_allowed_mentions = self._state.allowed_mentions\n        else:\n            previous_allowed_mentions = None\n\n        if view is not MISSING:\n            self._state.prevent_view_updates_for(self.id)\n\n        with handle_message_parameters(\n            content=content,\n            embed=embed,\n            embeds=embeds,\n            attachments=attachments,\n            view=view,\n            allowed_mentions=allowed_mentions,\n            previous_allowed_mentions=previous_allowed_mentions,\n        ) as params:\n            data = await self._state.http.edit_message(self.channel.id, self.id, params=params)\n            message = Message(state=self._state, channel=self.channel, data=data)\n\n        if view and not view.is_finished():\n            interaction: Optional[MessageInteraction] = getattr(self, 'interaction', None)\n            if interaction is not None:\n                self._state.store_view(view, self.id, interaction_id=interaction.id)\n            else:\n                self._state.store_view(view, self.id)\n\n        if delete_after is not None:\n            await self.delete(delay=delete_after)\n\n        return message\n\n    async def publish(self) -> None:\n        \"\"\"|coro|\n\n        Publishes this message to the channel's followers.\n\n        The message must have been sent in a news channel.\n        You must have :attr:`~Permissions.send_messages` to do this.\n\n        If the message is not your own then :attr:`~Permissions.manage_messages`\n        is also needed.\n\n        Raises\n        -------\n        Forbidden\n            You do not have the proper permissions to publish this message\n            or the channel is not a news channel.\n        HTTPException\n            Publishing the message failed.\n        \"\"\"\n\n        await self._state.http.publish_message(self.channel.id, self.id)\n\n    async def pin(self, *, reason: Optional[str] = None) -> None:\n        \"\"\"|coro|\n\n        Pins the message.\n\n        You must have :attr:`~Permissions.manage_messages` to do\n        this in a non-private channel context.\n\n        Parameters\n        -----------\n        reason: Optional[:class:`str`]\n            The reason for pinning the message. Shows up on the audit log.\n\n            .. versionadded:: 1.4\n\n        Raises\n        -------\n        Forbidden\n            You do not have permissions to pin the message.\n        NotFound\n            The message or channel was not found or deleted.\n        HTTPException\n            Pinning the message failed, probably due to the channel\n            having more than 50 pinned messages.\n        \"\"\"\n\n        await self._state.http.pin_message(self.channel.id, self.id, reason=reason)\n        # pinned exists on PartialMessage for duck typing purposes\n        self.pinned = True\n\n    async def unpin(self, *, reason: Optional[str] = None) -> None:\n        \"\"\"|coro|\n\n        Unpins the message.\n\n        You must have :attr:`~Permissions.manage_messages` to do\n        this in a non-private channel context.\n\n        Parameters\n        -----------\n        reason: Optional[:class:`str`]\n            The reason for unpinning the message. Shows up on the audit log.\n\n            .. versionadded:: 1.4\n\n        Raises\n        -------\n        Forbidden\n            You do not have permissions to unpin the message.\n        NotFound\n            The message or channel was not found or deleted.\n        HTTPException\n            Unpinning the message failed.\n        \"\"\"\n\n        await self._state.http.unpin_message(self.channel.id, self.id, reason=reason)\n        # pinned exists on PartialMessage for duck typing purposes\n        self.pinned = False\n\n    async def add_reaction(self, emoji: Union[EmojiInputType, Reaction], /) -> None:\n        \"\"\"|coro|\n\n        Adds a reaction to the message.\n\n        The emoji may be a unicode emoji or a custom guild :class:`Emoji`.\n\n        You must have :attr:`~Permissions.read_message_history`\n        to do this. If nobody else has reacted to the message using this\n        emoji, :attr:`~Permissions.add_reactions` is required.\n\n        .. versionchanged:: 2.0\n\n            ``emoji`` parameter is now positional-only.\n\n        .. versionchanged:: 2.0\n            This function will now raise :exc:`TypeError` instead of\n            ``InvalidArgument``.\n\n        Parameters\n        ------------\n        emoji: Union[:class:`Emoji`, :class:`Reaction`, :class:`PartialEmoji`, :class:`str`]\n            The emoji to react with.\n\n        Raises\n        --------\n        HTTPException\n            Adding the reaction failed.\n        Forbidden\n            You do not have the proper permissions to react to the message.\n        NotFound\n            The emoji you specified was not found.\n        TypeError\n            The emoji parameter is invalid.\n        \"\"\"\n\n        emoji = convert_emoji_reaction(emoji)\n        await self._state.http.add_reaction(self.channel.id, self.id, emoji)\n\n    async def remove_reaction(self, emoji: Union[EmojiInputType, Reaction], member: Snowflake) -> None:\n        \"\"\"|coro|\n\n        Remove a reaction by the member from the message.\n\n        The emoji may be a unicode emoji or a custom guild :class:`Emoji`.\n\n        If the reaction is not your own (i.e. ``member`` parameter is not you) then\n        :attr:`~Permissions.manage_messages` is needed.\n\n        The ``member`` parameter must represent a member and meet\n        the :class:`abc.Snowflake` abc.\n\n        .. versionchanged:: 2.0\n            This function will now raise :exc:`TypeError` instead of\n            ``InvalidArgument``.\n\n        Parameters\n        ------------\n        emoji: Union[:class:`Emoji`, :class:`Reaction`, :class:`PartialEmoji`, :class:`str`]\n            The emoji to remove.\n        member: :class:`abc.Snowflake`\n            The member for which to remove the reaction.\n\n        Raises\n        --------\n        HTTPException\n            Removing the reaction failed.\n        Forbidden\n            You do not have the proper permissions to remove the reaction.\n        NotFound\n            The member or emoji you specified was not found.\n        TypeError\n            The emoji parameter is invalid.\n        \"\"\"\n\n        emoji = convert_emoji_reaction(emoji)\n\n        if member.id == self._state.self_id:\n            await self._state.http.remove_own_reaction(self.channel.id, self.id, emoji)\n        else:\n            await self._state.http.remove_reaction(self.channel.id, self.id, emoji, member.id)\n\n    async def clear_reaction(self, emoji: Union[EmojiInputType, Reaction]) -> None:\n        \"\"\"|coro|\n\n        Clears a specific reaction from the message.\n\n        The emoji may be a unicode emoji or a custom guild :class:`Emoji`.\n\n        You must have :attr:`~Permissions.manage_messages` to do this.\n\n        .. versionadded:: 1.3\n\n        .. versionchanged:: 2.0\n            This function will now raise :exc:`TypeError` instead of\n            ``InvalidArgument``.\n\n        Parameters\n        -----------\n        emoji: Union[:class:`Emoji`, :class:`Reaction`, :class:`PartialEmoji`, :class:`str`]\n            The emoji to clear.\n\n        Raises\n        --------\n        HTTPException\n            Clearing the reaction failed.\n        Forbidden\n            You do not have the proper permissions to clear the reaction.\n        NotFound\n            The emoji you specified was not found.\n        TypeError\n            The emoji parameter is invalid.\n        \"\"\"\n\n        emoji = convert_emoji_reaction(emoji)\n        await self._state.http.clear_single_reaction(self.channel.id, self.id, emoji)\n\n    async def clear_reactions(self) -> None:\n        \"\"\"|coro|\n\n        Removes all the reactions from the message.\n\n        You must have :attr:`~Permissions.manage_messages` to do this.\n\n        Raises\n        --------\n        HTTPException\n            Removing the reactions failed.\n        Forbidden\n            You do not have the proper permissions to remove all the reactions.\n        \"\"\"\n        await self._state.http.clear_reactions(self.channel.id, self.id)\n\n    async def create_thread(\n        self,\n        *,\n        name: str,\n        auto_archive_duration: ThreadArchiveDuration = MISSING,\n        slowmode_delay: Optional[int] = None,\n        reason: Optional[str] = None,\n    ) -> Thread:\n        \"\"\"|coro|\n\n        Creates a public thread from this message.\n\n        You must have :attr:`~discord.Permissions.create_public_threads` in order to\n        create a public thread from a message.\n\n        The channel this message belongs in must be a :class:`TextChannel`.\n\n        .. versionadded:: 2.0\n\n        Parameters\n        -----------\n        name: :class:`str`\n            The name of the thread.\n        auto_archive_duration: :class:`int`\n            The duration in minutes before a thread is automatically hidden from the channel list.\n            If not provided, the channel's default auto archive duration is used.\n\n            Must be one of ``60``, ``1440``, ``4320``, or ``10080``, if provided.\n        slowmode_delay: Optional[:class:`int`]\n            Specifies the slowmode rate limit for user in this channel, in seconds.\n            The maximum value possible is ``21600``. By default no slowmode rate limit\n            if this is ``None``.\n        reason: Optional[:class:`str`]\n            The reason for creating a new thread. Shows up on the audit log.\n\n        Raises\n        -------\n        Forbidden\n            You do not have permissions to create a thread.\n        HTTPException\n            Creating the thread failed.\n        ValueError\n            This message does not have guild info attached.\n\n        Returns\n        --------\n        :class:`.Thread`\n            The created thread.\n        \"\"\"\n        if self.guild is None:\n            raise ValueError('This message does not have guild info attached.')\n\n        default_auto_archive_duration: ThreadArchiveDuration = getattr(self.channel, 'default_auto_archive_duration', 1440)\n        data = await self._state.http.start_thread_with_message(\n            self.channel.id,\n            self.id,\n            name=name,\n            auto_archive_duration=auto_archive_duration or default_auto_archive_duration,\n            rate_limit_per_user=slowmode_delay,\n            reason=reason,\n        )\n        return Thread(guild=self.guild, state=self._state, data=data)\n\n    async def fetch_thread(self) -> Thread:\n        \"\"\"|coro|\n\n        Retrieves the public thread attached to this message.\n\n        .. note::\n\n            This method is an API call. For general usage, consider :attr:`thread` instead.\n\n        .. versionadded:: 2.4\n\n        Raises\n        -------\n        InvalidData\n            An unknown channel type was received from Discord\n            or the guild the thread belongs to is not the same\n            as the one in this object points to.\n        HTTPException\n            Retrieving the thread failed.\n        NotFound\n            There is no thread attached to this message.\n        Forbidden\n            You do not have permission to fetch this channel.\n\n        Returns\n        --------\n        :class:`.Thread`\n            The public thread attached to this message.\n        \"\"\"\n        if self.guild is None:\n            raise ValueError('This message does not have guild info attached.')\n\n        return await self.guild.fetch_channel(self.id)  # type: ignore  # Can only be Thread in this case\n\n    @overload\n    async def reply(\n        self,\n        content: Optional[str] = ...,\n        *,\n        tts: bool = ...,\n        embed: Embed = ...,\n        file: File = ...,\n        stickers: Sequence[Union[GuildSticker, StickerItem]] = ...,\n        delete_after: float = ...,\n        nonce: Union[str, int] = ...,\n        allowed_mentions: AllowedMentions = ...,\n        reference: Union[Message, MessageReference, PartialMessage] = ...,\n        mention_author: bool = ...,\n        view: View = ...,\n        suppress_embeds: bool = ...,\n        silent: bool = ...,\n        poll: Poll = ...,\n    ) -> Message:\n        ...\n\n    @overload\n    async def reply(\n        self,\n        content: Optional[str] = ...,\n        *,\n        tts: bool = ...,\n        embed: Embed = ...,\n        files: Sequence[File] = ...,\n        stickers: Sequence[Union[GuildSticker, StickerItem]] = ...,\n        delete_after: float = ...,\n        nonce: Union[str, int] = ...,\n        allowed_mentions: AllowedMentions = ...,\n        reference: Union[Message, MessageReference, PartialMessage] = ...,\n        mention_author: bool = ...,\n        view: View = ...,\n        suppress_embeds: bool = ...,\n        silent: bool = ...,\n        poll: Poll = ...,\n    ) -> Message:\n        ...\n\n    @overload\n    async def reply(\n        self,\n        content: Optional[str] = ...,\n        *,\n        tts: bool = ...,\n        embeds: Sequence[Embed] = ...,\n        file: File = ...,\n        stickers: Sequence[Union[GuildSticker, StickerItem]] = ...,\n        delete_after: float = ...,\n        nonce: Union[str, int] = ...,\n        allowed_mentions: AllowedMentions = ...,\n        reference: Union[Message, MessageReference, PartialMessage] = ...,\n        mention_author: bool = ...,\n        view: View = ...,\n        suppress_embeds: bool = ...,\n        silent: bool = ...,\n        poll: Poll = ...,\n    ) -> Message:\n        ...\n\n    @overload\n    async def reply(\n        self,\n        content: Optional[str] = ...,\n        *,\n        tts: bool = ...,\n        embeds: Sequence[Embed] = ...,\n        files: Sequence[File] = ...,\n        stickers: Sequence[Union[GuildSticker, StickerItem]] = ...,\n        delete_after: float = ...,\n        nonce: Union[str, int] = ...,\n        allowed_mentions: AllowedMentions = ...,\n        reference: Union[Message, MessageReference, PartialMessage] = ...,\n        mention_author: bool = ...,\n        view: View = ...,\n        suppress_embeds: bool = ...,\n        silent: bool = ...,\n        poll: Poll = ...,\n    ) -> Message:\n        ...\n\n    async def reply(self, content: Optional[str] = None, **kwargs: Any) -> Message:\n        \"\"\"|coro|\n\n        A shortcut method to :meth:`.abc.Messageable.send` to reply to the\n        :class:`.Message`.\n\n        .. versionadded:: 1.6\n\n        .. versionchanged:: 2.0\n            This function will now raise :exc:`TypeError` or\n            :exc:`ValueError` instead of ``InvalidArgument``.\n\n        Raises\n        --------\n        ~discord.HTTPException\n            Sending the message failed.\n        ~discord.Forbidden\n            You do not have the proper permissions to send the message.\n        ValueError\n            The ``files`` list is not of the appropriate size\n        TypeError\n            You specified both ``file`` and ``files``.\n\n        Returns\n        ---------\n        :class:`.Message`\n            The message that was sent.\n        \"\"\"\n\n        return await self.channel.send(content, reference=self, **kwargs)\n\n    async def end_poll(self) -> Message:\n        \"\"\"|coro|\n\n        Ends the :class:`Poll` attached to this message.\n\n        This can only be done if you are the message author.\n\n        If the poll was successfully ended, then it returns the updated :class:`Message`.\n\n        Raises\n        ------\n        ~discord.HTTPException\n            Ending the poll failed.\n\n        Returns\n        -------\n        :class:`.Message`\n            The updated message.\n        \"\"\"\n\n        data = await self._state.http.end_poll(self.channel.id, self.id)\n\n        return Message(state=self._state, channel=self.channel, data=data)\n\n    def to_reference(self, *, fail_if_not_exists: bool = True) -> MessageReference:\n        \"\"\"Creates a :class:`~discord.MessageReference` from the current message.\n\n        .. versionadded:: 1.6\n\n        Parameters\n        ----------\n        fail_if_not_exists: :class:`bool`\n            Whether replying using the message reference should raise :class:`HTTPException`\n            if the message no longer exists or Discord could not fetch the message.\n\n            .. versionadded:: 1.7\n\n        Returns\n        ---------\n        :class:`~discord.MessageReference`\n            The reference to this message.\n        \"\"\"\n\n        return MessageReference.from_message(self, fail_if_not_exists=fail_if_not_exists)\n\n    def to_message_reference_dict(self) -> MessageReferencePayload:\n        data: MessageReferencePayload = {\n            'message_id': self.id,\n            'channel_id': self.channel.id,\n        }\n\n        if self.guild is not None:\n            data['guild_id'] = self.guild.id\n\n        return data\n\n\n@flatten_handlers\nclass Message(PartialMessage, Hashable):\n    r\"\"\"Represents a message from Discord.\n\n    .. container:: operations\n\n        .. describe:: x == y\n\n            Checks if two messages are equal.\n\n        .. describe:: x != y\n\n            Checks if two messages are not equal.\n\n        .. describe:: hash(x)\n\n            Returns the message's hash.\n\n    Attributes\n    -----------\n    tts: :class:`bool`\n        Specifies if the message was done with text-to-speech.\n        This can only be accurately received in :func:`on_message` due to\n        a discord limitation.\n    type: :class:`MessageType`\n        The type of message. In most cases this should not be checked, but it is helpful\n        in cases where it might be a system message for :attr:`system_content`.\n    author: Union[:class:`Member`, :class:`abc.User`]\n        A :class:`Member` that sent the message. If :attr:`channel` is a\n        private channel or the user has the left the guild, then it is a :class:`User` instead.\n    content: :class:`str`\n        The actual contents of the message.\n        If :attr:`Intents.message_content` is not enabled this will always be an empty string\n        unless the bot is mentioned or the message is a direct message.\n    nonce: Optional[Union[:class:`str`, :class:`int`]]\n        The value used by the discord guild and the client to verify that the message is successfully sent.\n        This is not stored long term within Discord's servers and is only used ephemerally.\n    embeds: List[:class:`Embed`]\n        A list of embeds the message has.\n        If :attr:`Intents.message_content` is not enabled this will always be an empty list\n        unless the bot is mentioned or the message is a direct message.\n    channel: Union[:class:`TextChannel`, :class:`StageChannel`, :class:`VoiceChannel`, :class:`Thread`, :class:`DMChannel`, :class:`GroupChannel`, :class:`PartialMessageable`]\n        The :class:`TextChannel` or :class:`Thread` that the message was sent from.\n        Could be a :class:`DMChannel` or :class:`GroupChannel` if it's a private message.\n    reference: Optional[:class:`~discord.MessageReference`]\n        The message that this message references. This is only applicable to messages of\n        type :attr:`MessageType.pins_add`, crossposted messages created by a\n        followed channel integration, or message replies.\n\n        .. versionadded:: 1.5\n\n    mention_everyone: :class:`bool`\n        Specifies if the message mentions everyone.\n\n        .. note::\n\n            This does not check if the ``@everyone`` or the ``@here`` text is in the message itself.\n            Rather this boolean indicates if either the ``@everyone`` or the ``@here`` text is in the message\n            **and** it did end up mentioning.\n    mentions: List[:class:`abc.User`]\n        A list of :class:`Member` that were mentioned. If the message is in a private message\n        then the list will be of :class:`User` instead. For messages that are not of type\n        :attr:`MessageType.default`\\, this array can be used to aid in system messages.\n        For more information, see :attr:`system_content`.\n\n        .. warning::\n\n            The order of the mentions list is not in any particular order so you should\n            not rely on it. This is a Discord limitation, not one with the library.\n    channel_mentions: List[Union[:class:`abc.GuildChannel`, :class:`Thread`]]\n        A list of :class:`abc.GuildChannel` or :class:`Thread` that were mentioned. If the message is\n        in a private message then the list is always empty.\n    role_mentions: List[:class:`Role`]\n        A list of :class:`Role` that were mentioned. If the message is in a private message\n        then the list is always empty.\n    id: :class:`int`\n        The message ID.\n    webhook_id: Optional[:class:`int`]\n        If this message was sent by a webhook, then this is the webhook ID's that sent this\n        message.\n    attachments: List[:class:`Attachment`]\n        A list of attachments given to a message.\n        If :attr:`Intents.message_content` is not enabled this will always be an empty list\n        unless the bot is mentioned or the message is a direct message.\n    pinned: :class:`bool`\n        Specifies if the message is currently pinned.\n    flags: :class:`MessageFlags`\n        Extra features of the message.\n\n        .. versionadded:: 1.3\n\n    reactions : List[:class:`Reaction`]\n        Reactions to a message. Reactions can be either custom emoji or standard unicode emoji.\n    activity: Optional[:class:`dict`]\n        The activity associated with this message. Sent with Rich-Presence related messages that for\n        example, request joining, spectating, or listening to or with another member.\n\n        It is a dictionary with the following optional keys:\n\n        - ``type``: An integer denoting the type of message activity being requested.\n        - ``party_id``: The party ID associated with the party.\n    application: Optional[:class:`~discord.MessageApplication`]\n        The rich presence enabled application associated with this message.\n\n        .. versionchanged:: 2.0\n            Type is now :class:`MessageApplication` instead of :class:`dict`.\n\n    stickers: List[:class:`StickerItem`]\n        A list of sticker items given to the message.\n\n        .. versionadded:: 1.6\n    components: List[Union[:class:`ActionRow`, :class:`Button`, :class:`SelectMenu`]]\n        A list of components in the message.\n        If :attr:`Intents.message_content` is not enabled this will always be an empty list\n        unless the bot is mentioned or the message is a direct message.\n\n        .. versionadded:: 2.0\n    role_subscription: Optional[:class:`RoleSubscriptionInfo`]\n        The data of the role subscription purchase or renewal that prompted this\n        :attr:`MessageType.role_subscription_purchase` message.\n\n        .. versionadded:: 2.2\n    application_id: Optional[:class:`int`]\n        The application ID of the application that created this message if this\n        message was sent by an application-owned webhook or an interaction.\n\n        .. versionadded:: 2.2\n    position: Optional[:class:`int`]\n        A generally increasing integer with potentially gaps or duplicates that represents\n        the approximate position of the message in a thread.\n\n        .. versionadded:: 2.2\n    guild: Optional[:class:`Guild`]\n        The guild that the message belongs to, if applicable.\n    interaction_metadata: Optional[:class:`.MessageInteractionMetadata`]\n        The metadata of the interaction that this message is a response to.\n\n        .. versionadded:: 2.4\n    poll: Optional[:class:`Poll`]\n        The poll attached to this message.\n\n        .. versionadded:: 2.4\n    \"\"\"\n\n    __slots__ = (\n        '_edited_timestamp',\n        '_cs_channel_mentions',\n        '_cs_raw_mentions',\n        '_cs_clean_content',\n        '_cs_raw_channel_mentions',\n        '_cs_raw_role_mentions',\n        '_cs_system_content',\n        '_thread',\n        'tts',\n        'content',\n        'webhook_id',\n        'mention_everyone',\n        'embeds',\n        'mentions',\n        'author',\n        'attachments',\n        'nonce',\n        'pinned',\n        'role_mentions',\n        'type',\n        'flags',\n        'reactions',\n        'reference',\n        'application',\n        'activity',\n        'stickers',\n        'components',\n        '_interaction',\n        'role_subscription',\n        'application_id',\n        'position',\n        'interaction_metadata',\n        'poll',\n    )\n\n    if TYPE_CHECKING:\n        _HANDLERS: ClassVar[List[Tuple[str, Callable[..., None]]]]\n        _CACHED_SLOTS: ClassVar[List[str]]\n        # guild: Optional[Guild]\n        reference: Optional[MessageReference]\n        mentions: List[Union[User, Member]]\n        author: Union[User, Member]\n        role_mentions: List[Role]\n        components: List[MessageComponentType]\n\n    def __init__(\n        self,\n        *,\n        state: ConnectionState,\n        channel: MessageableChannel,\n        data: MessagePayload,\n    ) -> None:\n        self.channel: MessageableChannel = channel\n        self.id: int = int(data['id'])\n        self._state: ConnectionState = state\n        self.webhook_id: Optional[int] = utils._get_as_snowflake(data, 'webhook_id')\n        self.reactions: List[Reaction] = [Reaction(message=self, data=d) for d in data.get('reactions', [])]\n        self.attachments: List[Attachment] = [Attachment(data=a, state=self._state) for a in data['attachments']]\n        self.embeds: List[Embed] = [Embed.from_dict(a) for a in data['embeds']]\n        self.activity: Optional[MessageActivityPayload] = data.get('activity')\n        self._edited_timestamp: Optional[datetime.datetime] = utils.parse_time(data['edited_timestamp'])\n        self.type: MessageType = try_enum(MessageType, data['type'])\n        self.pinned: bool = data['pinned']\n        self.flags: MessageFlags = MessageFlags._from_value(data.get('flags', 0))\n        self.mention_everyone: bool = data['mention_everyone']\n        self.tts: bool = data['tts']\n        self.content: str = data['content']\n        self.nonce: Optional[Union[int, str]] = data.get('nonce')\n        self.position: Optional[int] = data.get('position')\n        self.application_id: Optional[int] = utils._get_as_snowflake(data, 'application_id')\n        self.stickers: List[StickerItem] = [StickerItem(data=d, state=state) for d in data.get('sticker_items', [])]\n\n        # This updates the poll so it has the counts, if the message\n        # was previously cached.\n        self.poll: Optional[Poll] = None\n        try:\n            self.poll = Poll._from_data(data=data['poll'], message=self, state=state)\n        except KeyError:\n            self.poll = state._get_poll(self.id)\n\n        try:\n            # if the channel doesn't have a guild attribute, we handle that\n            self.guild = channel.guild\n        except AttributeError:\n            self.guild = state._get_guild(utils._get_as_snowflake(data, 'guild_id'))\n\n        self._thread: Optional[Thread] = None\n\n        if self.guild is not None:\n            try:\n                thread = data['thread']\n            except KeyError:\n                pass\n            else:\n                self._thread = self.guild.get_thread(int(thread['id']))\n\n                if self._thread is not None:\n                    self._thread._update(thread)\n                else:\n                    self._thread = Thread(guild=self.guild, state=state, data=thread)\n\n        self._interaction: Optional[MessageInteraction] = None\n\n        # deprecated\n        try:\n            interaction = data['interaction']\n        except KeyError:\n            pass\n        else:\n            self._interaction = MessageInteraction(state=state, guild=self.guild, data=interaction)\n\n        self.interaction_metadata: Optional[MessageInteractionMetadata] = None\n        try:\n            interaction_metadata = data['interaction_metadata']\n        except KeyError:\n            pass\n        else:\n            self.interaction_metadata = MessageInteractionMetadata(state=state, guild=self.guild, data=interaction_metadata)\n\n        try:\n            ref = data['message_reference']\n        except KeyError:\n            self.reference = None\n        else:\n            self.reference = ref = MessageReference.with_state(state, ref)\n            try:\n                resolved = data['referenced_message']\n            except KeyError:\n                pass\n            else:\n                if resolved is None:\n                    ref.resolved = DeletedReferencedMessage(ref)\n                else:\n                    # Right now the channel IDs match but maybe in the future they won't.\n                    if ref.channel_id == channel.id:\n                        chan = channel\n                    elif isinstance(channel, Thread) and channel.parent_id == ref.channel_id:\n                        chan = channel\n                    else:\n                        chan, _ = state._get_guild_channel(resolved, ref.guild_id)\n\n                    # the channel will be the correct type here\n                    ref.resolved = self.__class__(channel=chan, data=resolved, state=state)  # type: ignore\n\n        self.application: Optional[MessageApplication] = None\n        try:\n            application = data['application']\n        except KeyError:\n            pass\n        else:\n            self.application = MessageApplication(state=self._state, data=application)\n\n        self.role_subscription: Optional[RoleSubscriptionInfo] = None\n        try:\n            role_subscription = data['role_subscription_data']\n        except KeyError:\n            pass\n        else:\n            self.role_subscription = RoleSubscriptionInfo(role_subscription)\n\n        for handler in ('author', 'member', 'mentions', 'mention_roles', 'components'):\n            try:\n                getattr(self, f'_handle_{handler}')(data[handler])\n            except KeyError:\n                continue\n\n    def __repr__(self) -> str:\n        name = self.__class__.__name__\n        return (\n            f'<{name} id={self.id} channel={self.channel!r} type={self.type!r} author={self.author!r} flags={self.flags!r}>'\n        )\n\n    def _try_patch(self, data, key, transform=None) -> None:\n        try:\n            value = data[key]\n        except KeyError:\n            pass\n        else:\n            if transform is None:\n                setattr(self, key, value)\n            else:\n                setattr(self, key, transform(value))\n\n    def _add_reaction(self, data, emoji, user_id) -> Reaction:\n        reaction = utils.find(lambda r: r.emoji == emoji, self.reactions)\n        is_me = data['me'] = user_id == self._state.self_id\n\n        if reaction is None:\n            reaction = Reaction(message=self, data=data, emoji=emoji)\n            self.reactions.append(reaction)\n        else:\n            reaction.count += 1\n            if is_me:\n                reaction.me = is_me\n\n        return reaction\n\n    def _remove_reaction(self, data: MessageReactionRemoveEvent, emoji: EmojiInputType, user_id: int) -> Reaction:\n        reaction = utils.find(lambda r: r.emoji == emoji, self.reactions)\n\n        if reaction is None:\n            # already removed?\n            raise ValueError('Emoji already removed?')\n\n        # if reaction isn't in the list, we crash. This means discord\n        # sent bad data, or we stored improperly\n        reaction.count -= 1\n\n        if user_id == self._state.self_id:\n            reaction.me = False\n        if reaction.count == 0:\n            # this raises ValueError if something went wrong as well.\n            self.reactions.remove(reaction)\n\n        return reaction\n\n    def _clear_emoji(self, emoji: PartialEmoji) -> Optional[Reaction]:\n        to_check = str(emoji)\n        for index, reaction in enumerate(self.reactions):\n            if str(reaction.emoji) == to_check:\n                break\n        else:\n            # didn't find anything so just return\n            return\n\n        del self.reactions[index]\n        return reaction\n\n    def _update(self, data: MessageUpdateEvent) -> None:\n        # In an update scheme, 'author' key has to be handled before 'member'\n        # otherwise they overwrite each other which is undesirable.\n        # Since there's no good way to do this we have to iterate over every\n        # handler rather than iterating over the keys which is a little slower\n        for key, handler in self._HANDLERS:\n            try:\n                value = data[key]\n            except KeyError:\n                continue\n            else:\n                handler(self, value)\n\n        # clear the cached properties\n        for attr in self._CACHED_SLOTS:\n            try:\n                delattr(self, attr)\n            except AttributeError:\n                pass\n\n    def _handle_edited_timestamp(self, value: str) -> None:\n        self._edited_timestamp = utils.parse_time(value)\n\n    def _handle_pinned(self, value: bool) -> None:\n        self.pinned = value\n\n    def _handle_flags(self, value: int) -> None:\n        self.flags = MessageFlags._from_value(value)\n\n    def _handle_application(self, value: MessageApplicationPayload) -> None:\n        application = MessageApplication(state=self._state, data=value)\n        self.application = application\n\n    def _handle_activity(self, value: MessageActivityPayload) -> None:\n        self.activity = value\n\n    def _handle_mention_everyone(self, value: bool) -> None:\n        self.mention_everyone = value\n\n    def _handle_tts(self, value: bool) -> None:\n        self.tts = value\n\n    def _handle_type(self, value: int) -> None:\n        self.type = try_enum(MessageType, value)\n\n    def _handle_content(self, value: str) -> None:\n        self.content = value\n\n    def _handle_attachments(self, value: List[AttachmentPayload]) -> None:\n        self.attachments = [Attachment(data=a, state=self._state) for a in value]\n\n    def _handle_embeds(self, value: List[EmbedPayload]) -> None:\n        self.embeds = [Embed.from_dict(data) for data in value]\n\n    def _handle_nonce(self, value: Union[str, int]) -> None:\n        self.nonce = value\n\n    def _handle_author(self, author: UserPayload) -> None:\n        self.author = self._state.store_user(author, cache=self.webhook_id is None)\n        if isinstance(self.guild, Guild):\n            found = self.guild.get_member(self.author.id)\n            if found is not None:\n                self.author = found\n\n    def _handle_member(self, member: MemberPayload) -> None:\n        # The gateway now gives us full Member objects sometimes with the following keys\n        # deaf, mute, joined_at, roles\n        # For the sake of performance I'm going to assume that the only\n        # field that needs *updating* would be the joined_at field.\n        # If there is no Member object (for some strange reason), then we can upgrade\n        # ourselves to a more \"partial\" member object.\n        author = self.author\n        try:\n            # Update member reference\n            author._update_from_message(member)  # type: ignore\n        except AttributeError:\n            # It's a user here\n            self.author = Member._from_message(message=self, data=member)\n\n    def _handle_mentions(self, mentions: List[UserWithMemberPayload]) -> None:\n        self.mentions = r = []\n        guild = self.guild\n        state = self._state\n        if not isinstance(guild, Guild):\n            self.mentions = [state.store_user(m) for m in mentions]\n            return\n\n        for mention in filter(None, mentions):\n            id_search = int(mention['id'])\n            member = guild.get_member(id_search)\n            if member is not None:\n                r.append(member)\n            else:\n                r.append(Member._try_upgrade(data=mention, guild=guild, state=state))\n\n    def _handle_mention_roles(self, role_mentions: List[int]) -> None:\n        self.role_mentions = []\n        if isinstance(self.guild, Guild):\n            for role_id in map(int, role_mentions):\n                role = self.guild.get_role(role_id)\n                if role is not None:\n                    self.role_mentions.append(role)\n\n    def _handle_components(self, data: List[ComponentPayload]) -> None:\n        self.components = []\n\n        for component_data in data:\n            component = _component_factory(component_data)\n\n            if component is not None:\n                self.components.append(component)\n\n    def _handle_interaction(self, data: MessageInteractionPayload):\n        self._interaction = MessageInteraction(state=self._state, guild=self.guild, data=data)\n\n    def _handle_interaction_metadata(self, data: MessageInteractionMetadataPayload):\n        self.interaction_metadata = MessageInteractionMetadata(state=self._state, guild=self.guild, data=data)\n\n    def _rebind_cached_references(\n        self,\n        new_guild: Guild,\n        new_channel: Union[GuildChannel, Thread, PartialMessageable],\n    ) -> None:\n        self.guild = new_guild\n        self.channel = new_channel  # type: ignore # Not all \"GuildChannel\" are messageable at the moment\n\n    @utils.cached_slot_property('_cs_raw_mentions')\n    def raw_mentions(self) -> List[int]:\n        \"\"\"List[:class:`int`]: A property that returns an array of user IDs matched with\n        the syntax of ``<@user_id>`` in the message content.\n\n        This allows you to receive the user IDs of mentioned users\n        even in a private message context.\n        \"\"\"\n        return [int(x) for x in re.findall(r'<@!?([0-9]{15,20})>', self.content)]\n\n    @utils.cached_slot_property('_cs_raw_channel_mentions')\n    def raw_channel_mentions(self) -> List[int]:\n        \"\"\"List[:class:`int`]: A property that returns an array of channel IDs matched with\n        the syntax of ``<#channel_id>`` in the message content.\n        \"\"\"\n        return [int(x) for x in re.findall(r'<#([0-9]{15,20})>', self.content)]\n\n    @utils.cached_slot_property('_cs_raw_role_mentions')\n    def raw_role_mentions(self) -> List[int]:\n        \"\"\"List[:class:`int`]: A property that returns an array of role IDs matched with\n        the syntax of ``<@&role_id>`` in the message content.\n        \"\"\"\n        return [int(x) for x in re.findall(r'<@&([0-9]{15,20})>', self.content)]\n\n    @utils.cached_slot_property('_cs_channel_mentions')\n    def channel_mentions(self) -> List[Union[GuildChannel, Thread]]:\n        if self.guild is None:\n            return []\n        it = filter(None, map(self.guild._resolve_channel, self.raw_channel_mentions))\n        return utils._unique(it)\n\n    @utils.cached_slot_property('_cs_clean_content')\n    def clean_content(self) -> str:\n        \"\"\":class:`str`: A property that returns the content in a \"cleaned up\"\n        manner. This basically means that mentions are transformed\n        into the way the client shows it. e.g. ``<#id>`` will transform\n        into ``#name``.\n\n        This will also transform @everyone and @here mentions into\n        non-mentions.\n\n        .. note::\n\n            This *does not* affect markdown. If you want to escape\n            or remove markdown then use :func:`utils.escape_markdown` or :func:`utils.remove_markdown`\n            respectively, along with this function.\n        \"\"\"\n\n        if self.guild:\n\n            def resolve_member(id: int) -> str:\n                m = self.guild.get_member(id) or utils.get(self.mentions, id=id)  # type: ignore\n                return f'@{m.display_name}' if m else '@deleted-user'\n\n            def resolve_role(id: int) -> str:\n                r = self.guild.get_role(id) or utils.get(self.role_mentions, id=id)  # type: ignore\n                return f'@{r.name}' if r else '@deleted-role'\n\n            def resolve_channel(id: int) -> str:\n                c = self.guild._resolve_channel(id)  # type: ignore\n                return f'#{c.name}' if c else '#deleted-channel'\n\n        else:\n\n            def resolve_member(id: int) -> str:\n                m = utils.get(self.mentions, id=id)\n                return f'@{m.display_name}' if m else '@deleted-user'\n\n            def resolve_role(id: int) -> str:\n                return '@deleted-role'\n\n            def resolve_channel(id: int) -> str:\n                return '#deleted-channel'\n\n        transforms = {\n            '@': resolve_member,\n            '@!': resolve_member,\n            '#': resolve_channel,\n            '@&': resolve_role,\n        }\n\n        def repl(match: re.Match) -> str:\n            type = match[1]\n            id = int(match[2])\n            transformed = transforms[type](id)\n            return transformed\n\n        result = re.sub(r'<(@[!&]?|#)([0-9]{15,20})>', repl, self.content)\n\n        return escape_mentions(result)\n\n    @property\n    def created_at(self) -> datetime.datetime:\n        \"\"\":class:`datetime.datetime`: The message's creation time in UTC.\"\"\"\n        return utils.snowflake_time(self.id)\n\n    @property\n    def edited_at(self) -> Optional[datetime.datetime]:\n        \"\"\"Optional[:class:`datetime.datetime`]: An aware UTC datetime object containing the edited time of the message.\"\"\"\n        return self._edited_timestamp\n\n    @property\n    def thread(self) -> Optional[Thread]:\n        \"\"\"Optional[:class:`Thread`]: The public thread created from this message, if it exists.\n\n        .. note::\n\n            For messages received via the gateway this does not retrieve archived threads, as they\n            are not retained in the internal cache. Use :meth:`fetch_thread` instead.\n\n        .. versionadded:: 2.4\n        \"\"\"\n        if self.guild is not None:\n            # Fall back to guild threads in case one was created after the message\n            return self._thread or self.guild.get_thread(self.id)\n\n    @property\n    @deprecated('interaction_metadata')\n    def interaction(self) -> Optional[MessageInteraction]:\n        \"\"\"Optional[:class:`~discord.MessageInteraction`]: The interaction that this message is a response to.\n\n        .. versionadded:: 2.0\n        .. deprecated:: 2.4\n            This attribute is deprecated and will be removed in a future version. Use :attr:`.interaction_metadata` instead.\n        \"\"\"\n        return self._interaction\n\n    def is_system(self) -> bool:\n        \"\"\":class:`bool`: Whether the message is a system message.\n\n        A system message is a message that is constructed entirely by the Discord API\n        in response to something.\n\n        .. versionadded:: 1.3\n        \"\"\"\n        return self.type not in (\n            MessageType.default,\n            MessageType.reply,\n            MessageType.chat_input_command,\n            MessageType.context_menu_command,\n            MessageType.thread_starter_message,\n        )\n\n    @utils.cached_slot_property('_cs_system_content')\n    def system_content(self) -> str:\n        r\"\"\":class:`str`: A property that returns the content that is rendered\n        regardless of the :attr:`Message.type`.\n\n        In the case of :attr:`MessageType.default` and :attr:`MessageType.reply`\\,\n        this just returns the regular :attr:`Message.content`. Otherwise this\n        returns an English message denoting the contents of the system message.\n        \"\"\"\n\n        if self.type is MessageType.default:\n            return self.content\n\n        if self.type is MessageType.recipient_add:\n            if self.channel.type is ChannelType.group:\n                return f'{self.author.name} added {self.mentions[0].name} to the group.'\n            else:\n                return f'{self.author.name} added {self.mentions[0].name} to the thread.'\n\n        if self.type is MessageType.recipient_remove:\n            if self.channel.type is ChannelType.group:\n                return f'{self.author.name} removed {self.mentions[0].name} from the group.'\n            else:\n                return f'{self.author.name} removed {self.mentions[0].name} from the thread.'\n\n        if self.type is MessageType.channel_name_change:\n            if getattr(self.channel, 'parent', self.channel).type is ChannelType.forum:\n                return f'{self.author.name} changed the post title: **{self.content}**'\n            else:\n                return f'{self.author.name} changed the channel name: **{self.content}**'\n\n        if self.type is MessageType.channel_icon_change:\n            return f'{self.author.name} changed the group icon.'\n\n        if self.type is MessageType.pins_add:\n            return f'{self.author.name} pinned a message to this channel.'\n\n        if self.type is MessageType.new_member:\n            formats = [\n                \"{0} joined the party.\",\n                \"{0} is here.\",\n                \"Welcome, {0}. We hope you brought pizza.\",\n                \"A wild {0} appeared.\",\n                \"{0} just landed.\",\n                \"{0} just slid into the server.\",\n                \"{0} just showed up!\",\n                \"Welcome {0}. Say hi!\",\n                \"{0} hopped into the server.\",\n                \"Everyone welcome {0}!\",\n                \"Glad you're here, {0}.\",\n                \"Good to see you, {0}.\",\n                \"Yay you made it, {0}!\",\n            ]\n\n            created_at_ms = int(self.created_at.timestamp() * 1000)\n            return formats[created_at_ms % len(formats)].format(self.author.name)\n\n        if self.type is MessageType.premium_guild_subscription:\n            if not self.content:\n                return f'{self.author.name} just boosted the server!'\n            else:\n                return f'{self.author.name} just boosted the server **{self.content}** times!'\n\n        if self.type is MessageType.premium_guild_tier_1:\n            if not self.content:\n                return f'{self.author.name} just boosted the server! {self.guild} has achieved **Level 1!**'\n            else:\n                return f'{self.author.name} just boosted the server **{self.content}** times! {self.guild} has achieved **Level 1!**'\n\n        if self.type is MessageType.premium_guild_tier_2:\n            if not self.content:\n                return f'{self.author.name} just boosted the server! {self.guild} has achieved **Level 2!**'\n            else:\n                return f'{self.author.name} just boosted the server **{self.content}** times! {self.guild} has achieved **Level 2!**'\n\n        if self.type is MessageType.premium_guild_tier_3:\n            if not self.content:\n                return f'{self.author.name} just boosted the server! {self.guild} has achieved **Level 3!**'\n            else:\n                return f'{self.author.name} just boosted the server **{self.content}** times! {self.guild} has achieved **Level 3!**'\n\n        if self.type is MessageType.channel_follow_add:\n            return (\n                f'{self.author.name} has added {self.content} to this channel. Its most important updates will show up here.'\n            )\n\n        if self.type is MessageType.guild_stream:\n            # the author will be a Member\n            return f'{self.author.name} is live! Now streaming {self.author.activity.name}'  # type: ignore\n\n        if self.type is MessageType.guild_discovery_disqualified:\n            return 'This server has been removed from Server Discovery because it no longer passes all the requirements. Check Server Settings for more details.'\n\n        if self.type is MessageType.guild_discovery_requalified:\n            return 'This server is eligible for Server Discovery again and has been automatically relisted!'\n\n        if self.type is MessageType.guild_discovery_grace_period_initial_warning:\n            return 'This server has failed Discovery activity requirements for 1 week. If this server fails for 4 weeks in a row, it will be automatically removed from Discovery.'\n\n        if self.type is MessageType.guild_discovery_grace_period_final_warning:\n            return 'This server has failed Discovery activity requirements for 3 weeks in a row. If this server fails for 1 more week, it will be removed from Discovery.'\n\n        if self.type is MessageType.thread_created:\n            return f'{self.author.name} started a thread: **{self.content}**. See all **threads**.'\n\n        if self.type is MessageType.reply:\n            return self.content\n\n        if self.type is MessageType.thread_starter_message:\n            if self.reference is None or self.reference.resolved is None:\n                return 'Sorry, we couldn\\'t load the first message in this thread'\n\n            # the resolved message for the reference will be a Message\n            return self.reference.resolved.content  # type: ignore\n\n        if self.type is MessageType.guild_invite_reminder:\n            return 'Wondering who to invite?\\nStart by inviting anyone who can help you build the server!'\n\n        if self.type is MessageType.role_subscription_purchase and self.role_subscription is not None:\n            # TODO: figure out how the message looks like for is_renewal: true\n            total_months = self.role_subscription.total_months_subscribed\n            months = '1 month' if total_months == 1 else f'{total_months} months'\n            return f'{self.author.name} joined {self.role_subscription.tier_name} and has been a subscriber of {self.guild} for {months}!'\n\n        if self.type is MessageType.stage_start:\n            return f'{self.author.name} started **{self.content}**.'\n\n        if self.type is MessageType.stage_end:\n            return f'{self.author.name} ended **{self.content}**.'\n\n        if self.type is MessageType.stage_speaker:\n            return f'{self.author.name} is now a speaker.'\n\n        if self.type is MessageType.stage_raise_hand:\n            return f'{self.author.name} requested to speak.'\n\n        if self.type is MessageType.stage_topic:\n            return f'{self.author.name} changed Stage topic: **{self.content}**.'\n\n        if self.type is MessageType.guild_incident_alert_mode_enabled:\n            dt = utils.parse_time(self.content)\n            dt_content = utils.format_dt(dt)\n            return f'{self.author.name} enabled security actions until {dt_content}.'\n\n        if self.type is MessageType.guild_incident_alert_mode_disabled:\n            return f'{self.author.name} disabled security actions.'\n\n        if self.type is MessageType.guild_incident_report_raid:\n            return f'{self.author.name} reported a raid in {self.guild}.'\n\n        if self.type is MessageType.guild_incident_report_false_alarm:\n            return f'{self.author.name} reported a false alarm in {self.guild}.'\n\n        # Fallback for unknown message types\n        return ''\n\n    @overload\n    async def edit(\n        self,\n        *,\n        content: Optional[str] = ...,\n        embed: Optional[Embed] = ...,\n        attachments: Sequence[Union[Attachment, File]] = ...,\n        suppress: bool = ...,\n        delete_after: Optional[float] = ...,\n        allowed_mentions: Optional[AllowedMentions] = ...,\n        view: Optional[View] = ...,\n    ) -> Message:\n        ...\n\n    @overload\n    async def edit(\n        self,\n        *,\n        content: Optional[str] = ...,\n        embeds: Sequence[Embed] = ...,\n        attachments: Sequence[Union[Attachment, File]] = ...,\n        suppress: bool = ...,\n        delete_after: Optional[float] = ...,\n        allowed_mentions: Optional[AllowedMentions] = ...,\n        view: Optional[View] = ...,\n    ) -> Message:\n        ...\n\n    async def edit(\n        self,\n        *,\n        content: Optional[str] = MISSING,\n        embed: Optional[Embed] = MISSING,\n        embeds: Sequence[Embed] = MISSING,\n        attachments: Sequence[Union[Attachment, File]] = MISSING,\n        suppress: bool = False,\n        delete_after: Optional[float] = None,\n        allowed_mentions: Optional[AllowedMentions] = MISSING,\n        view: Optional[View] = MISSING,\n    ) -> Message:\n        \"\"\"|coro|\n\n        Edits the message.\n\n        The content must be able to be transformed into a string via ``str(content)``.\n\n        .. versionchanged:: 1.3\n            The ``suppress`` keyword-only parameter was added.\n\n        .. versionchanged:: 2.0\n            Edits are no longer in-place, the newly edited message is returned instead.\n\n        .. versionchanged:: 2.0\n            This function will now raise :exc:`TypeError` instead of\n            ``InvalidArgument``.\n\n        Parameters\n        -----------\n        content: Optional[:class:`str`]\n            The new content to replace the message with.\n            Could be ``None`` to remove the content.\n        embed: Optional[:class:`Embed`]\n            The new embed to replace the original with.\n            Could be ``None`` to remove the embed.\n        embeds: List[:class:`Embed`]\n            The new embeds to replace the original with. Must be a maximum of 10.\n            To remove all embeds ``[]`` should be passed.\n\n            .. versionadded:: 2.0\n        attachments: List[Union[:class:`Attachment`, :class:`File`]]\n            A list of attachments to keep in the message as well as new files to upload. If ``[]`` is passed\n            then all attachments are removed.\n\n            .. note::\n\n                New files will always appear after current attachments.\n\n            .. versionadded:: 2.0\n        suppress: :class:`bool`\n            Whether to suppress embeds for the message. This removes\n            all the embeds if set to ``True``. If set to ``False``\n            this brings the embeds back if they were suppressed.\n            Using this parameter requires :attr:`~.Permissions.manage_messages`.\n        delete_after: Optional[:class:`float`]\n            If provided, the number of seconds to wait in the background\n            before deleting the message we just edited. If the deletion fails,\n            then it is silently ignored.\n        allowed_mentions: Optional[:class:`~discord.AllowedMentions`]\n            Controls the mentions being processed in this message. If this is\n            passed, then the object is merged with :attr:`~discord.Client.allowed_mentions`.\n            The merging behaviour only overrides attributes that have been explicitly passed\n            to the object, otherwise it uses the attributes set in :attr:`~discord.Client.allowed_mentions`.\n            If no object is passed at all then the defaults given by :attr:`~discord.Client.allowed_mentions`\n            are used instead.\n\n            .. versionadded:: 1.4\n        view: Optional[:class:`~discord.ui.View`]\n            The updated view to update this message with. If ``None`` is passed then\n            the view is removed.\n\n        Raises\n        -------\n        HTTPException\n            Editing the message failed.\n        Forbidden\n            Tried to suppress a message without permissions or\n            edited a message's content or embed that isn't yours.\n        TypeError\n            You specified both ``embed`` and ``embeds``\n\n        Returns\n        --------\n        :class:`Message`\n            The newly edited message.\n        \"\"\"\n\n        if content is not MISSING:\n            previous_allowed_mentions = self._state.allowed_mentions\n        else:\n            previous_allowed_mentions = None\n\n        if suppress is not MISSING:\n            flags = MessageFlags._from_value(self.flags.value)\n            flags.suppress_embeds = suppress\n        else:\n            flags = MISSING\n\n        if view is not MISSING:\n            self._state.prevent_view_updates_for(self.id)\n\n        with handle_message_parameters(\n            content=content,\n            flags=flags,\n            embed=embed,\n            embeds=embeds,\n            attachments=attachments,\n            view=view,\n            allowed_mentions=allowed_mentions,\n            previous_allowed_mentions=previous_allowed_mentions,\n        ) as params:\n            data = await self._state.http.edit_message(self.channel.id, self.id, params=params)\n            message = Message(state=self._state, channel=self.channel, data=data)\n\n        if view and not view.is_finished():\n            self._state.store_view(view, self.id)\n\n        if delete_after is not None:\n            await self.delete(delay=delete_after)\n\n        return message\n\n    async def add_files(self, *files: File) -> Message:\n        r\"\"\"|coro|\n\n        Adds new files to the end of the message attachments.\n\n        .. versionadded:: 2.0\n\n        Parameters\n        -----------\n        \\*files: :class:`File`\n            New files to add to the message.\n\n        Raises\n        -------\n        HTTPException\n            Editing the message failed.\n        Forbidden\n            Tried to edit a message that isn't yours.\n\n        Returns\n        --------\n        :class:`Message`\n            The newly edited message.\n        \"\"\"\n        return await self.edit(attachments=[*self.attachments, *files])\n\n    async def remove_attachments(self, *attachments: Attachment) -> Message:\n        r\"\"\"|coro|\n\n        Removes attachments from the message.\n\n        .. versionadded:: 2.0\n\n        Parameters\n        -----------\n        \\*attachments: :class:`Attachment`\n            Attachments to remove from the message.\n\n        Raises\n        -------\n        HTTPException\n            Editing the message failed.\n        Forbidden\n            Tried to edit a message that isn't yours.\n\n        Returns\n        --------\n        :class:`Message`\n            The newly edited message.\n        \"\"\"\n        return await self.edit(attachments=[a for a in self.attachments if a not in attachments])\n"
  },
  {
    "path": "discord/mixins.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\n__all__ = (\n    'EqualityComparable',\n    'Hashable',\n)\n\n\nclass EqualityComparable:\n    __slots__ = ()\n\n    id: int\n\n    def __eq__(self, other: object) -> bool:\n        if isinstance(other, self.__class__):\n            return other.id == self.id\n        return NotImplemented\n\n\nclass Hashable(EqualityComparable):\n    __slots__ = ()\n\n    def __hash__(self) -> int:\n        return self.id >> 22\n"
  },
  {
    "path": "discord/object.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom __future__ import annotations\n\nfrom .mixins import Hashable\nfrom .utils import snowflake_time, MISSING\n\nfrom typing import (\n    SupportsInt,\n    TYPE_CHECKING,\n    Type,\n    Union,\n)\n\nif TYPE_CHECKING:\n    import datetime\n    from . import abc\n\n    SupportsIntCast = Union[SupportsInt, str, bytes, bytearray]\n\n# fmt: off\n__all__ = (\n    'Object',\n)\n# fmt: on\n\n\nclass Object(Hashable):\n    \"\"\"Represents a generic Discord object.\n\n    The purpose of this class is to allow you to create 'miniature'\n    versions of data classes if you want to pass in just an ID. Most functions\n    that take in a specific data class with an ID can also take in this class\n    as a substitute instead. Note that even though this is the case, not all\n    objects (if any) actually inherit from this class.\n\n    There are also some cases where some websocket events are received\n    in :issue:`strange order <21>` and when such events happened you would\n    receive this class rather than the actual data class. These cases are\n    extremely rare.\n\n    .. container:: operations\n\n        .. describe:: x == y\n\n            Checks if two objects are equal.\n\n        .. describe:: x != y\n\n            Checks if two objects are not equal.\n\n        .. describe:: hash(x)\n\n            Returns the object's hash.\n\n    Attributes\n    -----------\n    id: :class:`int`\n        The ID of the object.\n    type: Type[:class:`abc.Snowflake`]\n        The discord.py model type of the object, if not specified, defaults to this class.\n\n        .. note::\n\n            In instances where there are multiple applicable types, use a shared base class.\n            for example, both :class:`Member` and :class:`User` are subclasses of :class:`abc.User`.\n\n        .. versionadded:: 2.0\n    \"\"\"\n\n    def __init__(self, id: SupportsIntCast, *, type: Type[abc.Snowflake] = MISSING):\n        try:\n            id = int(id)\n        except ValueError:\n            raise TypeError(f'id parameter must be convertible to int not {id.__class__.__name__}') from None\n        self.id: int = id\n        self.type: Type[abc.Snowflake] = type or self.__class__\n\n    def __repr__(self) -> str:\n        return f'<Object id={self.id!r} type={self.type!r}>'\n\n    def __eq__(self, other: object) -> bool:\n        if isinstance(other, (self.type, self.__class__)):\n            return self.id == other.id\n        return NotImplemented\n\n    __hash__ = Hashable.__hash__\n\n    @property\n    def created_at(self) -> datetime.datetime:\n        \"\"\":class:`datetime.datetime`: Returns the snowflake's creation time in UTC.\"\"\"\n        return snowflake_time(self.id)\n\n\nOLDEST_OBJECT = Object(id=0)\n"
  },
  {
    "path": "discord/oggparse.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom __future__ import annotations\n\nimport struct\n\nfrom typing import TYPE_CHECKING, ClassVar, IO, Generator, Tuple, Optional\n\nfrom .errors import DiscordException\n\n__all__ = (\n    'OggError',\n    'OggPage',\n    'OggStream',\n)\n\n\nclass OggError(DiscordException):\n    \"\"\"An exception that is thrown for Ogg stream parsing errors.\"\"\"\n\n    pass\n\n\n# https://tools.ietf.org/html/rfc3533\n# https://tools.ietf.org/html/rfc7845\n\n\nclass OggPage:\n    _header: ClassVar[struct.Struct] = struct.Struct('<xBQIIIB')\n    if TYPE_CHECKING:\n        flag: int\n        gran_pos: int\n        serial: int\n        pagenum: int\n        crc: int\n        segnum: int\n\n    def __init__(self, stream: IO[bytes]) -> None:\n        try:\n            header = stream.read(struct.calcsize(self._header.format))\n\n            self.flag, self.gran_pos, self.serial, self.pagenum, self.crc, self.segnum = self._header.unpack(header)\n\n            self.segtable: bytes = stream.read(self.segnum)\n            bodylen = sum(struct.unpack('B' * self.segnum, self.segtable))\n            self.data: bytes = stream.read(bodylen)\n        except Exception:\n            raise OggError('bad data stream') from None\n\n    def iter_packets(self) -> Generator[Tuple[bytes, bool], None, None]:\n        packetlen = offset = 0\n        partial = True\n\n        for seg in self.segtable:\n            if seg == 255:\n                packetlen += 255\n                partial = True\n            else:\n                packetlen += seg\n                yield self.data[offset : offset + packetlen], True\n                offset += packetlen\n                packetlen = 0\n                partial = False\n\n        if partial:\n            yield self.data[offset:], False\n\n\nclass OggStream:\n    def __init__(self, stream: IO[bytes]) -> None:\n        self.stream: IO[bytes] = stream\n\n    def _next_page(self) -> Optional[OggPage]:\n        head = self.stream.read(4)\n        if head == b'OggS':\n            return OggPage(self.stream)\n        elif not head:\n            return None\n        else:\n            raise OggError(f'invalid header magic {head}')\n\n    def _iter_pages(self) -> Generator[OggPage, None, None]:\n        page = self._next_page()\n        while page:\n            yield page\n            page = self._next_page()\n\n    def iter_packets(self) -> Generator[bytes, None, None]:\n        partial = b''\n        for page in self._iter_pages():\n            for data, complete in page.iter_packets():\n                partial += data\n                if complete:\n                    yield partial\n                    partial = b''\n"
  },
  {
    "path": "discord/opus.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom __future__ import annotations\n\nfrom typing import List, Tuple, TypedDict, Any, TYPE_CHECKING, Callable, TypeVar, Literal, Optional, overload\n\nimport array\nimport ctypes\nimport ctypes.util\nimport logging\nimport math\nimport os.path\nimport struct\nimport sys\n\nfrom .errors import DiscordException\n\nif TYPE_CHECKING:\n    T = TypeVar('T')\n    APPLICATION_CTL = Literal['audio', 'voip', 'lowdelay']\n    BAND_CTL = Literal['narrow', 'medium', 'wide', 'superwide', 'full']\n    SIGNAL_CTL = Literal['auto', 'voice', 'music']\n\n\nclass ApplicationCtl(TypedDict):\n    audio: int\n    voip: int\n    lowdelay: int\n\n\nclass BandCtl(TypedDict):\n    narrow: int\n    medium: int\n    wide: int\n    superwide: int\n    full: int\n\n\nclass SignalCtl(TypedDict):\n    auto: int\n    voice: int\n    music: int\n\n\n__all__ = (\n    'Encoder',\n    'OpusError',\n    'OpusNotLoaded',\n)\n\n_log = logging.getLogger(__name__)\n\nOPUS_SILENCE = b'\\xF8\\xFF\\xFE'\n\nc_int_ptr = ctypes.POINTER(ctypes.c_int)\nc_int16_ptr = ctypes.POINTER(ctypes.c_int16)\nc_float_ptr = ctypes.POINTER(ctypes.c_float)\n\n_lib: Any = None\n\n\nclass EncoderStruct(ctypes.Structure):\n    pass\n\n\nclass DecoderStruct(ctypes.Structure):\n    pass\n\n\nEncoderStructPtr = ctypes.POINTER(EncoderStruct)\nDecoderStructPtr = ctypes.POINTER(DecoderStruct)\n\n## Some constants from opus_defines.h\n# Error codes\n# fmt: off\nOK      = 0\nBAD_ARG = -1\n\n# Encoder CTLs\nAPPLICATION_AUDIO    = 'audio'\nAPPLICATION_VOIP     = 'voip'\nAPPLICATION_LOWDELAY = 'lowdelay'\n# These remain as strings for backwards compat\n\nCTL_SET_BITRATE      = 4002\nCTL_SET_BANDWIDTH    = 4008\nCTL_SET_FEC          = 4012\nCTL_SET_PLP          = 4014\nCTL_SET_SIGNAL       = 4024\n\n# Decoder CTLs\nCTL_SET_GAIN             = 4034\nCTL_LAST_PACKET_DURATION = 4039\n# fmt: on\n\napplication_ctl: ApplicationCtl = {\n    'audio': 2049,\n    'voip': 2048,\n    'lowdelay': 2051,\n}\n\nband_ctl: BandCtl = {\n    'narrow': 1101,\n    'medium': 1102,\n    'wide': 1103,\n    'superwide': 1104,\n    'full': 1105,\n}\n\nsignal_ctl: SignalCtl = {\n    'auto': -1000,\n    'voice': 3001,\n    'music': 3002,\n}\n\n\ndef _err_lt(result: int, func: Callable, args: List) -> int:\n    if result < OK:\n        _log.debug('error has happened in %s', func.__name__)\n        raise OpusError(result)\n    return result\n\n\ndef _err_ne(result: T, func: Callable, args: List) -> T:\n    ret = args[-1]._obj\n    if ret.value != OK:\n        _log.debug('error has happened in %s', func.__name__)\n        raise OpusError(ret.value)\n    return result\n\n\n# A list of exported functions.\n# The first argument is obviously the name.\n# The second one are the types of arguments it takes.\n# The third is the result type.\n# The fourth is the error handler.\nexported_functions: List[Tuple[Any, ...]] = [\n    # Generic\n    ('opus_get_version_string', [], ctypes.c_char_p, None),\n    ('opus_strerror', [ctypes.c_int], ctypes.c_char_p, None),\n    # Encoder functions\n    ('opus_encoder_get_size', [ctypes.c_int], ctypes.c_int, None),\n    ('opus_encoder_create', [ctypes.c_int, ctypes.c_int, ctypes.c_int, c_int_ptr], EncoderStructPtr, _err_ne),\n    ('opus_encode', [EncoderStructPtr, c_int16_ptr, ctypes.c_int, ctypes.c_char_p, ctypes.c_int32], ctypes.c_int32, _err_lt),\n    (\n        'opus_encode_float',\n        [EncoderStructPtr, c_float_ptr, ctypes.c_int, ctypes.c_char_p, ctypes.c_int32],\n        ctypes.c_int32,\n        _err_lt,\n    ),\n    ('opus_encoder_ctl', [EncoderStructPtr, ctypes.c_int], ctypes.c_int32, _err_lt),\n    ('opus_encoder_destroy', [EncoderStructPtr], None, None),\n    # Decoder functions\n    ('opus_decoder_get_size', [ctypes.c_int], ctypes.c_int, None),\n    ('opus_decoder_create', [ctypes.c_int, ctypes.c_int, c_int_ptr], DecoderStructPtr, _err_ne),\n    (\n        'opus_decode',\n        [DecoderStructPtr, ctypes.c_char_p, ctypes.c_int32, c_int16_ptr, ctypes.c_int, ctypes.c_int],\n        ctypes.c_int,\n        _err_lt,\n    ),\n    (\n        'opus_decode_float',\n        [DecoderStructPtr, ctypes.c_char_p, ctypes.c_int32, c_float_ptr, ctypes.c_int, ctypes.c_int],\n        ctypes.c_int,\n        _err_lt,\n    ),\n    ('opus_decoder_ctl', [DecoderStructPtr, ctypes.c_int], ctypes.c_int32, _err_lt),\n    ('opus_decoder_destroy', [DecoderStructPtr], None, None),\n    ('opus_decoder_get_nb_samples', [DecoderStructPtr, ctypes.c_char_p, ctypes.c_int32], ctypes.c_int, _err_lt),\n    # Packet functions\n    ('opus_packet_get_bandwidth', [ctypes.c_char_p], ctypes.c_int, _err_lt),\n    ('opus_packet_get_nb_channels', [ctypes.c_char_p], ctypes.c_int, _err_lt),\n    ('opus_packet_get_nb_frames', [ctypes.c_char_p, ctypes.c_int], ctypes.c_int, _err_lt),\n    ('opus_packet_get_samples_per_frame', [ctypes.c_char_p, ctypes.c_int], ctypes.c_int, _err_lt),\n]\n\n\ndef libopus_loader(name: str) -> Any:\n    # create the library...\n    lib = ctypes.cdll.LoadLibrary(name)\n\n    # register the functions...\n    for item in exported_functions:\n        func = getattr(lib, item[0])\n\n        try:\n            if item[1]:\n                func.argtypes = item[1]\n\n            func.restype = item[2]\n        except KeyError:\n            pass\n\n        try:\n            if item[3]:\n                func.errcheck = item[3]\n        except KeyError:\n            _log.exception(\"Error assigning check function to %s\", func)\n\n    return lib\n\n\ndef _load_default() -> bool:\n    global _lib\n    try:\n        if sys.platform == 'win32':\n            _basedir = os.path.dirname(os.path.abspath(__file__))\n            _bitness = struct.calcsize('P') * 8\n            _target = 'x64' if _bitness > 32 else 'x86'\n            _filename = os.path.join(_basedir, 'bin', f'libopus-0.{_target}.dll')\n            _lib = libopus_loader(_filename)\n        else:\n            # This is handled in the exception case\n            _lib = libopus_loader(ctypes.util.find_library('opus'))  # type: ignore\n    except Exception:\n        _lib = None\n\n    return _lib is not None\n\n\ndef load_opus(name: str) -> None:\n    \"\"\"Loads the libopus shared library for use with voice.\n\n    If this function is not called then the library uses the function\n    :func:`ctypes.util.find_library` and then loads that one if available.\n\n    Not loading a library and attempting to use PCM based AudioSources will\n    lead to voice not working.\n\n    This function propagates the exceptions thrown.\n\n    .. warning::\n\n        The bitness of the library must match the bitness of your python\n        interpreter. If the library is 64-bit then your python interpreter\n        must be 64-bit as well. Usually if there's a mismatch in bitness then\n        the load will throw an exception.\n\n    .. note::\n\n        On Windows, this function should not need to be called as the binaries\n        are automatically loaded.\n\n    .. note::\n\n        On Windows, the .dll extension is not necessary. However, on Linux\n        the full extension is required to load the library, e.g. ``libopus.so.1``.\n        On Linux however, :func:`ctypes.util.find_library` will usually find the library automatically\n        without you having to call this.\n\n    Parameters\n    ----------\n    name: :class:`str`\n        The filename of the shared library.\n    \"\"\"\n    global _lib\n    _lib = libopus_loader(name)\n\n\ndef is_loaded() -> bool:\n    \"\"\"Function to check if opus lib is successfully loaded either\n    via the :func:`ctypes.util.find_library` call of :func:`load_opus`.\n\n    This must return ``True`` for voice to work.\n\n    Returns\n    -------\n    :class:`bool`\n        Indicates if the opus library has been loaded.\n    \"\"\"\n    global _lib\n    return _lib is not None\n\n\nclass OpusError(DiscordException):\n    \"\"\"An exception that is thrown for libopus related errors.\n\n    Attributes\n    ----------\n    code: :class:`int`\n        The error code returned.\n    \"\"\"\n\n    def __init__(self, code: int):\n        self.code: int = code\n        msg = _lib.opus_strerror(self.code).decode('utf-8')\n        _log.debug('\"%s\" has happened', msg)\n        super().__init__(msg)\n\n\nclass OpusNotLoaded(DiscordException):\n    \"\"\"An exception that is thrown for when libopus is not loaded.\"\"\"\n\n    pass\n\n\nclass _OpusStruct:\n    SAMPLING_RATE = 48000\n    CHANNELS = 2\n    FRAME_LENGTH = 20  # in milliseconds\n    SAMPLE_SIZE = struct.calcsize('h') * CHANNELS\n    SAMPLES_PER_FRAME = int(SAMPLING_RATE / 1000 * FRAME_LENGTH)\n\n    FRAME_SIZE = SAMPLES_PER_FRAME * SAMPLE_SIZE\n\n    @staticmethod\n    def get_opus_version() -> str:\n        if not is_loaded() and not _load_default():\n            raise OpusNotLoaded()\n\n        return _lib.opus_get_version_string().decode('utf-8')\n\n\nclass Encoder(_OpusStruct):\n    def __init__(\n        self,\n        *,\n        application: APPLICATION_CTL = 'audio',\n        bitrate: int = 128,\n        fec: bool = True,\n        expected_packet_loss: float = 0.15,\n        bandwidth: BAND_CTL = 'full',\n        signal_type: SIGNAL_CTL = 'auto',\n    ):\n        if application not in application_ctl:\n            raise ValueError(f'{application} is not a valid application setting. Try one of: {\"\".join(application_ctl)}')\n\n        if not 16 <= bitrate <= 512:\n            raise ValueError(f'bitrate must be between 16 and 512, not {bitrate}')\n\n        if not 0 < expected_packet_loss <= 1.0:\n            raise ValueError(\n                f'expected_packet_loss must be a positive number less than or equal to 1, not {expected_packet_loss}'\n            )\n\n        _OpusStruct.get_opus_version()  # lazy loads the opus library\n\n        self.application: int = application_ctl[application]\n        self._state: EncoderStruct = self._create_state()\n\n        self.set_bitrate(bitrate)\n        self.set_fec(fec)\n        if fec:\n            self.set_expected_packet_loss_percent(expected_packet_loss)\n        self.set_bandwidth(bandwidth)\n        self.set_signal_type(signal_type)\n\n    def __del__(self) -> None:\n        if hasattr(self, '_state'):\n            _lib.opus_encoder_destroy(self._state)\n            # This is a destructor, so it's okay to assign None\n            self._state = None  # type: ignore\n\n    def _create_state(self) -> EncoderStruct:\n        ret = ctypes.c_int()\n        return _lib.opus_encoder_create(self.SAMPLING_RATE, self.CHANNELS, self.application, ctypes.byref(ret))\n\n    def set_bitrate(self, kbps: int) -> int:\n        kbps = min(512, max(16, int(kbps)))\n\n        _lib.opus_encoder_ctl(self._state, CTL_SET_BITRATE, kbps * 1024)\n        return kbps\n\n    def set_bandwidth(self, req: BAND_CTL) -> None:\n        if req not in band_ctl:\n            raise KeyError(f'{req!r} is not a valid bandwidth setting. Try one of: {\",\".join(band_ctl)}')\n\n        k = band_ctl[req]\n        _lib.opus_encoder_ctl(self._state, CTL_SET_BANDWIDTH, k)\n\n    def set_signal_type(self, req: SIGNAL_CTL) -> None:\n        if req not in signal_ctl:\n            raise KeyError(f'{req!r} is not a valid signal type setting. Try one of: {\",\".join(signal_ctl)}')\n\n        k = signal_ctl[req]\n        _lib.opus_encoder_ctl(self._state, CTL_SET_SIGNAL, k)\n\n    def set_fec(self, enabled: bool = True) -> None:\n        _lib.opus_encoder_ctl(self._state, CTL_SET_FEC, 1 if enabled else 0)\n\n    def set_expected_packet_loss_percent(self, percentage: float) -> None:\n        _lib.opus_encoder_ctl(self._state, CTL_SET_PLP, min(100, max(0, int(percentage * 100))))\n\n    def encode(self, pcm: bytes, frame_size: int) -> bytes:\n        max_data_bytes = len(pcm)\n        # bytes can be used to reference pointer\n        pcm_ptr = ctypes.cast(pcm, c_int16_ptr)  # type: ignore\n        data = (ctypes.c_char * max_data_bytes)()\n\n        ret = _lib.opus_encode(self._state, pcm_ptr, frame_size, data, max_data_bytes)\n\n        return array.array('b', data[:ret]).tobytes()\n\n\nclass Decoder(_OpusStruct):\n    def __init__(self):\n        _OpusStruct.get_opus_version()\n\n        self._state: DecoderStruct = self._create_state()\n\n    def __del__(self) -> None:\n        if hasattr(self, '_state'):\n            _lib.opus_decoder_destroy(self._state)\n            # This is a destructor, so it's okay to assign None\n            self._state = None  # type: ignore\n\n    def _create_state(self) -> DecoderStruct:\n        ret = ctypes.c_int()\n        return _lib.opus_decoder_create(self.SAMPLING_RATE, self.CHANNELS, ctypes.byref(ret))\n\n    @staticmethod\n    def packet_get_nb_frames(data: bytes) -> int:\n        \"\"\"Gets the number of frames in an Opus packet\"\"\"\n        return _lib.opus_packet_get_nb_frames(data, len(data))\n\n    @staticmethod\n    def packet_get_nb_channels(data: bytes) -> int:\n        \"\"\"Gets the number of channels in an Opus packet\"\"\"\n        return _lib.opus_packet_get_nb_channels(data)\n\n    @classmethod\n    def packet_get_samples_per_frame(cls, data: bytes) -> int:\n        \"\"\"Gets the number of samples per frame from an Opus packet\"\"\"\n        return _lib.opus_packet_get_samples_per_frame(data, cls.SAMPLING_RATE)\n\n    def _set_gain(self, adjustment: int) -> int:\n        \"\"\"Configures decoder gain adjustment.\n\n        Scales the decoded output by a factor specified in Q8 dB units.\n        This has a maximum range of -32768 to 32767 inclusive, and returns\n        OPUS_BAD_ARG (-1) otherwise. The default is zero indicating no adjustment.\n        This setting survives decoder reset (irrelevant for now).\n        gain = 10**x/(20.0*256)\n        (from opus_defines.h)\n        \"\"\"\n        return _lib.opus_decoder_ctl(self._state, CTL_SET_GAIN, adjustment)\n\n    def set_gain(self, dB: float) -> int:\n        \"\"\"Sets the decoder gain in dB, from -128 to 128.\"\"\"\n\n        dB_Q8 = max(-32768, min(32767, round(dB * 256)))  # dB * 2^n where n is 8 (Q8)\n        return self._set_gain(dB_Q8)\n\n    def set_volume(self, mult: float) -> int:\n        \"\"\"Sets the output volume as a float percent, i.e. 0.5 for 50%, 1.75 for 175%, etc.\"\"\"\n        return self.set_gain(20 * math.log10(mult))  # amplitude ratio\n\n    def _get_last_packet_duration(self) -> int:\n        \"\"\"Gets the duration (in samples) of the last packet successfully decoded or concealed.\"\"\"\n\n        ret = ctypes.c_int32()\n        _lib.opus_decoder_ctl(self._state, CTL_LAST_PACKET_DURATION, ctypes.byref(ret))\n        return ret.value\n\n    @overload\n    def decode(self, data: bytes, *, fec: bool) -> bytes:\n        ...\n\n    @overload\n    def decode(self, data: Literal[None], *, fec: Literal[False]) -> bytes:\n        ...\n\n    def decode(self, data: Optional[bytes], *, fec: bool = False) -> bytes:\n        if data is None and fec:\n            raise TypeError(\"Invalid arguments: FEC cannot be used with null data\")\n\n        if data is None:\n            frame_size = self._get_last_packet_duration() or self.SAMPLES_PER_FRAME\n            channel_count = self.CHANNELS\n        else:\n            frames = self.packet_get_nb_frames(data)\n            # Discord silent frames erroneously present themselves as 1 channel instead of 2\n            # Therefore we need to hardcode the number instead of using packet_get_nb_channels\n            channel_count = self.CHANNELS\n            samples_per_frame = self.packet_get_samples_per_frame(data)\n            frame_size = frames * samples_per_frame\n\n        pcm = (ctypes.c_int16 * (frame_size * channel_count))()\n        pcm_ptr = ctypes.cast(pcm, c_int16_ptr)\n\n        ret = _lib.opus_decode(self._state, data, len(data) if data else 0, pcm_ptr, frame_size, fec)\n\n        return array.array('h', pcm[: ret * channel_count]).tobytes()\n"
  },
  {
    "path": "discord/partial_emoji.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom __future__ import annotations\n\nfrom typing import Any, Dict, Optional, TYPE_CHECKING, Union\nimport re\n\nfrom .asset import Asset, AssetMixin\nfrom . import utils\n\n# fmt: off\n__all__ = (\n    'PartialEmoji',\n)\n# fmt: on\n\nif TYPE_CHECKING:\n    from typing_extensions import Self\n\n    from .state import ConnectionState\n    from datetime import datetime\n    from .types.emoji import Emoji as EmojiPayload, PartialEmoji as PartialEmojiPayload\n    from .types.activity import ActivityEmoji\n\n\nclass _EmojiTag:\n    __slots__ = ()\n\n    id: int\n\n    def _to_partial(self) -> PartialEmoji:\n        raise NotImplementedError\n\n\nclass PartialEmoji(_EmojiTag, AssetMixin):\n    \"\"\"Represents a \"partial\" emoji.\n\n    This model will be given in two scenarios:\n\n    - \"Raw\" data events such as :func:`on_raw_reaction_add`\n    - Custom emoji that the bot cannot see from e.g. :attr:`Message.reactions`\n\n    .. container:: operations\n\n        .. describe:: x == y\n\n            Checks if two emoji are the same.\n\n        .. describe:: x != y\n\n            Checks if two emoji are not the same.\n\n        .. describe:: hash(x)\n\n            Return the emoji's hash.\n\n        .. describe:: str(x)\n\n            Returns the emoji rendered for discord.\n\n    Attributes\n    -----------\n    name: Optional[:class:`str`]\n        The custom emoji name, if applicable, or the unicode codepoint\n        of the non-custom emoji. This can be ``None`` if the emoji\n        got deleted (e.g. removing a reaction with a deleted emoji).\n    animated: :class:`bool`\n        Whether the emoji is animated or not.\n    id: Optional[:class:`int`]\n        The ID of the custom emoji, if applicable.\n    \"\"\"\n\n    __slots__ = ('animated', 'name', 'id', '_state')\n\n    _CUSTOM_EMOJI_RE = re.compile(r'<?(?:(?P<animated>a)?:)?(?P<name>[A-Za-z0-9\\_]+):(?P<id>[0-9]{13,20})>?')\n\n    if TYPE_CHECKING:\n        id: Optional[int]\n\n    def __init__(self, *, name: str, animated: bool = False, id: Optional[int] = None):\n        self.animated: bool = animated\n        self.name: str = name\n        self.id: Optional[int] = id\n        self._state: Optional[ConnectionState] = None\n\n    @classmethod\n    def from_dict(cls, data: Union[PartialEmojiPayload, ActivityEmoji, Dict[str, Any]]) -> Self:\n        return cls(\n            animated=data.get('animated', False),\n            id=utils._get_as_snowflake(data, 'id'),\n            name=data.get('name') or '',\n        )\n\n    @classmethod\n    def from_str(cls, value: str) -> Self:\n        \"\"\"Converts a Discord string representation of an emoji to a :class:`PartialEmoji`.\n\n        The formats accepted are:\n\n        - ``a:name:id``\n        - ``<a:name:id>``\n        - ``name:id``\n        - ``<:name:id>``\n\n        If the format does not match then it is assumed to be a unicode emoji.\n\n        .. versionadded:: 2.0\n\n        Parameters\n        ------------\n        value: :class:`str`\n            The string representation of an emoji.\n\n        Returns\n        --------\n        :class:`PartialEmoji`\n            The partial emoji from this string.\n        \"\"\"\n        match = cls._CUSTOM_EMOJI_RE.match(value)\n        if match is not None:\n            groups = match.groupdict()\n            animated = bool(groups['animated'])\n            emoji_id = int(groups['id'])\n            name = groups['name']\n            return cls(name=name, animated=animated, id=emoji_id)\n\n        return cls(name=value, id=None, animated=False)\n\n    def to_dict(self) -> EmojiPayload:\n        payload: EmojiPayload = {\n            'id': self.id,\n            'name': self.name,\n        }\n\n        if self.animated:\n            payload['animated'] = self.animated\n\n        return payload\n\n    def _to_partial(self) -> PartialEmoji:\n        return self\n\n    def _to_forum_tag_payload(self) -> Dict[str, Any]:\n        if self.id is not None:\n            return {'emoji_id': self.id, 'emoji_name': None}\n        return {'emoji_id': None, 'emoji_name': self.name}\n\n    @classmethod\n    def with_state(\n        cls,\n        state: ConnectionState,\n        *,\n        name: str,\n        animated: bool = False,\n        id: Optional[int] = None,\n    ) -> Self:\n        self = cls(name=name, animated=animated, id=id)\n        self._state = state\n        return self\n\n    def __str__(self) -> str:\n        # Coerce empty names to _ so it renders in the client regardless of having no name\n        name = self.name or '_'\n        if self.id is None:\n            return name\n        if self.animated:\n            return f'<a:{name}:{self.id}>'\n        return f'<:{name}:{self.id}>'\n\n    def __repr__(self) -> str:\n        return f'<{self.__class__.__name__} animated={self.animated} name={self.name!r} id={self.id}>'\n\n    def __eq__(self, other: object) -> bool:\n        if self.is_unicode_emoji():\n            return isinstance(other, PartialEmoji) and self.name == other.name\n\n        if isinstance(other, _EmojiTag):\n            return self.id == other.id\n        return False\n\n    def __ne__(self, other: object) -> bool:\n        return not self.__eq__(other)\n\n    def __hash__(self) -> int:\n        return hash((self.id, self.name))\n\n    def is_custom_emoji(self) -> bool:\n        \"\"\":class:`bool`: Checks if this is a custom non-Unicode emoji.\"\"\"\n        return self.id is not None\n\n    def is_unicode_emoji(self) -> bool:\n        \"\"\":class:`bool`: Checks if this is a Unicode emoji.\"\"\"\n        return self.id is None\n\n    def _as_reaction(self) -> str:\n        if self.id is None:\n            return self.name\n        return f'{self.name}:{self.id}'\n\n    @property\n    def created_at(self) -> Optional[datetime]:\n        \"\"\"Optional[:class:`datetime.datetime`]: Returns the emoji's creation time in UTC, or None if Unicode emoji.\n\n        .. versionadded:: 1.6\n        \"\"\"\n        if self.id is None:\n            return None\n\n        return utils.snowflake_time(self.id)\n\n    @property\n    def url(self) -> str:\n        \"\"\":class:`str`: Returns the URL of the emoji, if it is custom.\n\n        If this isn't a custom emoji then an empty string is returned\n        \"\"\"\n        if self.is_unicode_emoji():\n            return ''\n\n        fmt = 'gif' if self.animated else 'png'\n        return f'{Asset.BASE}/emojis/{self.id}.{fmt}'\n\n    async def read(self) -> bytes:\n        \"\"\"|coro|\n\n        Retrieves the content of this asset as a :class:`bytes` object.\n\n        Raises\n        ------\n        DiscordException\n            There was no internal connection state.\n        HTTPException\n            Downloading the asset failed.\n        NotFound\n            The asset was deleted.\n        ValueError\n            The PartialEmoji is not a custom emoji.\n\n        Returns\n        -------\n        :class:`bytes`\n            The content of the asset.\n        \"\"\"\n        if self.is_unicode_emoji():\n            raise ValueError('PartialEmoji is not a custom emoji')\n\n        return await super().read()\n"
  },
  {
    "path": "discord/permissions.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom __future__ import annotations\n\nfrom typing import Callable, Any, ClassVar, Dict, Iterator, Set, TYPE_CHECKING, Tuple, Optional\nfrom .flags import BaseFlags, flag_value, fill_with_flags, alias_flag_value\n\n__all__ = (\n    'Permissions',\n    'PermissionOverwrite',\n)\n\nif TYPE_CHECKING:\n    from typing_extensions import Self\n\n# A permission alias works like a regular flag but is marked\n# So the PermissionOverwrite knows to work with it\nclass permission_alias(alias_flag_value):\n    alias: str\n\n\ndef make_permission_alias(alias: str) -> Callable[[Callable[[Any], int]], permission_alias]:\n    def decorator(func: Callable[[Any], int]) -> permission_alias:\n        ret = permission_alias(func)\n        ret.alias = alias\n        return ret\n\n    return decorator\n\n\n@fill_with_flags()\nclass Permissions(BaseFlags):\n    \"\"\"Wraps up the Discord permission value.\n\n    The properties provided are two way. You can set and retrieve individual\n    bits using the properties as if they were regular bools. This allows\n    you to edit permissions.\n\n    .. versionchanged:: 1.3\n        You can now use keyword arguments to initialize :class:`Permissions`\n        similar to :meth:`update`.\n\n    .. container:: operations\n\n        .. describe:: x == y\n\n            Checks if two permissions are equal.\n        .. describe:: x != y\n\n            Checks if two permissions are not equal.\n        .. describe:: x <= y\n\n            Checks if a permission is a subset of another permission.\n        .. describe:: x >= y\n\n            Checks if a permission is a superset of another permission.\n        .. describe:: x < y\n\n             Checks if a permission is a strict subset of another permission.\n        .. describe:: x > y\n\n             Checks if a permission is a strict superset of another permission.\n\n        .. describe:: x | y, x |= y\n\n            Returns a Permissions instance with all enabled flags from\n            both x and y.\n\n            .. versionadded:: 2.0\n\n        .. describe:: x & y, x &= y\n\n            Returns a Permissions instance with only flags enabled on\n            both x and y.\n\n            .. versionadded:: 2.0\n\n        .. describe:: x ^ y, x ^= y\n\n            Returns a Permissions instance with only flags enabled on\n            only one of x or y, not on both.\n\n            .. versionadded:: 2.0\n\n        .. describe:: ~x\n\n            Returns a Permissions instance with all flags inverted from x.\n\n            .. versionadded:: 2.0\n\n        .. describe:: hash(x)\n\n               Return the permission's hash.\n        .. describe:: iter(x)\n\n               Returns an iterator of ``(perm, value)`` pairs. This allows it\n               to be, for example, constructed as a dict or a list of pairs.\n               Note that aliases are not shown.\n\n        .. describe:: bool(b)\n\n            Returns whether the permissions object has any permissions set to ``True``.\n\n            .. versionadded:: 2.0\n\n    Attributes\n    -----------\n    value: :class:`int`\n        The raw value. This value is a bit array field of a 53-bit integer\n        representing the currently available permissions. You should query\n        permissions via the properties rather than using this raw value.\n    \"\"\"\n\n    __slots__ = ()\n\n    def __init__(self, permissions: int = 0, **kwargs: bool):\n        if not isinstance(permissions, int):\n            raise TypeError(f'Expected int parameter, received {permissions.__class__.__name__} instead.')\n\n        self.value = permissions\n        for key, value in kwargs.items():\n            try:\n                flag = self.VALID_FLAGS[key]\n            except KeyError:\n                raise TypeError(f'{key!r} is not a valid permission name.') from None\n            else:\n                self._set_flag(flag, value)\n\n    def is_subset(self, other: Permissions) -> bool:\n        \"\"\"Returns ``True`` if self has the same or fewer permissions as other.\"\"\"\n        if isinstance(other, Permissions):\n            return (self.value & other.value) == self.value\n        else:\n            raise TypeError(f\"cannot compare {self.__class__.__name__} with {other.__class__.__name__}\")\n\n    def is_superset(self, other: Permissions) -> bool:\n        \"\"\"Returns ``True`` if self has the same or more permissions as other.\"\"\"\n        if isinstance(other, Permissions):\n            return (self.value | other.value) == self.value\n        else:\n            raise TypeError(f\"cannot compare {self.__class__.__name__} with {other.__class__.__name__}\")\n\n    def is_strict_subset(self, other: Permissions) -> bool:\n        \"\"\"Returns ``True`` if the permissions on other are a strict subset of those on self.\"\"\"\n        return self.is_subset(other) and self != other\n\n    def is_strict_superset(self, other: Permissions) -> bool:\n        \"\"\"Returns ``True`` if the permissions on other are a strict superset of those on self.\"\"\"\n        return self.is_superset(other) and self != other\n\n    __le__ = is_subset\n    __ge__ = is_superset\n    __lt__ = is_strict_subset\n    __gt__ = is_strict_superset\n\n    @classmethod\n    def none(cls) -> Self:\n        \"\"\"A factory method that creates a :class:`Permissions` with all\n        permissions set to ``False``.\"\"\"\n        return cls(0)\n\n    @classmethod\n    def all(cls) -> Self:\n        \"\"\"A factory method that creates a :class:`Permissions` with all\n        permissions set to ``True``.\n        \"\"\"\n        # Some of these are 0 because we don't want to set unnecessary bits\n        return cls(0b0000_0000_0000_0010_1111_1111_1111_1111_1111_1111_1111_1111_1111_1111_1111_1111)\n\n    @classmethod\n    def _timeout_mask(cls) -> int:\n        p = cls.all()\n        p.view_channel = False\n        p.read_message_history = False\n        return ~p.value\n\n    @classmethod\n    def _dm_permissions(cls) -> Self:\n        base = cls.text()\n        base.read_messages = True\n        base.send_tts_messages = False\n        base.manage_messages = False\n        base.create_private_threads = False\n        base.create_public_threads = False\n        base.manage_threads = False\n        base.send_messages_in_threads = False\n        return base\n\n    @classmethod\n    def _user_installed_permissions(cls, *, in_guild: bool) -> Self:\n        base = cls.none()\n        base.send_messages = True\n        base.attach_files = True\n        base.embed_links = True\n        base.external_emojis = True\n        base.send_voice_messages = True\n        if in_guild:\n            # Logically this is False but if not set to True,\n            # permissions just become 0.\n            base.read_messages = True\n            base.send_tts_messages = True\n            base.send_messages_in_threads = True\n        return base\n\n    @classmethod\n    def all_channel(cls) -> Self:\n        \"\"\"A :class:`Permissions` with all channel-specific permissions set to\n        ``True`` and the guild-specific ones set to ``False``. The guild-specific\n        permissions are currently:\n\n        - :attr:`manage_expressions`\n        - :attr:`view_audit_log`\n        - :attr:`view_guild_insights`\n        - :attr:`manage_guild`\n        - :attr:`change_nickname`\n        - :attr:`manage_nicknames`\n        - :attr:`kick_members`\n        - :attr:`ban_members`\n        - :attr:`administrator`\n        - :attr:`create_expressions`\n        - :attr:`moderate_members`\n        - :attr:`create_events`\n        - :attr:`manage_events`\n        - :attr:`view_creator_monetization_analytics`\n\n        .. versionchanged:: 1.7\n           Added :attr:`stream`, :attr:`priority_speaker` and :attr:`use_application_commands` permissions.\n\n        .. versionchanged:: 2.0\n           Added :attr:`create_public_threads`, :attr:`create_private_threads`, :attr:`manage_threads`,\n           :attr:`use_external_stickers`, :attr:`send_messages_in_threads` and\n           :attr:`request_to_speak` permissions.\n\n        .. versionchanged:: 2.3\n           Added :attr:`use_soundboard`, :attr:`create_expressions` permissions.\n\n        .. versionchanged:: 2.4\n            Added :attr:`send_polls`, :attr:`send_voice_messages`, attr:`use_external_sounds`,\n            :attr:`use_embedded_activities`, and :attr:`use_external_apps` permissions.\n        \"\"\"\n        return cls(0b0000_0000_0000_0110_0110_0100_1111_1101_1011_0011_1111_0111_1111_1111_0101_0001)\n\n    @classmethod\n    def general(cls) -> Self:\n        \"\"\"A factory method that creates a :class:`Permissions` with all\n        \"General\" permissions from the official Discord UI set to ``True``.\n\n        .. versionchanged:: 1.7\n           Permission :attr:`read_messages` is now included in the general permissions, but\n           permissions :attr:`administrator`, :attr:`create_instant_invite`, :attr:`kick_members`,\n           :attr:`ban_members`, :attr:`change_nickname` and :attr:`manage_nicknames` are\n           no longer part of the general permissions.\n\n        .. versionchanged:: 2.3\n            Added :attr:`create_expressions` permission.\n\n        .. versionchanged:: 2.4\n            Added :attr:`view_creator_monetization_analytics` permission.\n        \"\"\"\n        return cls(0b0000_0000_0000_0000_0000_1010_0000_0000_0111_0000_0000_1000_0000_0100_1011_0000)\n\n    @classmethod\n    def membership(cls) -> Self:\n        \"\"\"A factory method that creates a :class:`Permissions` with all\n        \"Membership\" permissions from the official Discord UI set to ``True``.\n\n        .. versionadded:: 1.7\n        \"\"\"\n        return cls(0b0000_0000_0000_0000_0000_0001_0000_0000_0000_1100_0000_0000_0000_0000_0000_0111)\n\n    @classmethod\n    def text(cls) -> Self:\n        \"\"\"A factory method that creates a :class:`Permissions` with all\n        \"Text\" permissions from the official Discord UI set to ``True``.\n\n        .. versionchanged:: 1.7\n           Permission :attr:`read_messages` is no longer part of the text permissions.\n           Added :attr:`use_application_commands` permission.\n\n        .. versionchanged:: 2.0\n           Added :attr:`create_public_threads`, :attr:`create_private_threads`, :attr:`manage_threads`,\n           :attr:`send_messages_in_threads` and :attr:`use_external_stickers` permissions.\n\n        .. versionchanged:: 2.3\n            Added :attr:`send_voice_messages` permission.\n\n        .. versionchanged:: 2.4\n            Added :attr:`send_polls` and :attr:`use_external_apps` permissions.\n        \"\"\"\n        return cls(0b0000_0000_0000_0110_0100_0000_0111_1100_1000_0000_0000_0111_1111_1000_0100_0000)\n\n    @classmethod\n    def voice(cls) -> Self:\n        \"\"\"A factory method that creates a :class:`Permissions` with all\n        \"Voice\" permissions from the official Discord UI set to ``True``.\"\"\"\n        return cls(0b0000_0000_0000_0000_0010_0100_1000_0000_0000_0011_1111_0000_0000_0011_0000_0000)\n\n    @classmethod\n    def stage(cls) -> Self:\n        \"\"\"A factory method that creates a :class:`Permissions` with all\n        \"Stage Channel\" permissions from the official Discord UI set to ``True``.\n\n        .. versionadded:: 1.7\n        \"\"\"\n        return cls(1 << 32)\n\n    @classmethod\n    def stage_moderator(cls) -> Self:\n        \"\"\"A factory method that creates a :class:`Permissions` with all permissions\n        for stage moderators set to ``True``. These permissions are currently:\n\n        - :attr:`manage_channels`\n        - :attr:`mute_members`\n        - :attr:`move_members`\n\n        .. versionadded:: 1.7\n\n        .. versionchanged:: 2.0\n            Added :attr:`manage_channels` permission and removed :attr:`request_to_speak` permission.\n        \"\"\"\n        return cls(0b0000_0000_0000_0000_0000_0000_0000_0000_0000_0001_0100_0000_0000_0000_0001_0000)\n\n    @classmethod\n    def elevated(cls) -> Self:\n        \"\"\"A factory method that creates a :class:`Permissions` with all permissions\n        that require 2FA set to ``True``. These permissions are currently:\n\n        - :attr:`kick_members`\n        - :attr:`ban_members`\n        - :attr:`administrator`\n        - :attr:`manage_channels`\n        - :attr:`manage_guild`\n        - :attr:`manage_messages`\n        - :attr:`manage_roles`\n        - :attr:`manage_webhooks`\n        - :attr:`manage_expressions`\n        - :attr:`manage_threads`\n        - :attr:`moderate_members`\n\n        .. versionadded:: 2.0\n        \"\"\"\n        return cls(0b0000_0000_0000_0000_0000_0001_0000_0100_0111_0000_0000_0000_0010_0000_0011_1110)\n\n    @classmethod\n    def events(cls) -> Self:\n        \"\"\"A factory method that creates a :class:`Permissions` with all\n        \"Events\" permissions from the official Discord UI set to ``True``.\n\n        .. versionadded:: 2.4\n        \"\"\"\n        return cls(0b0000_0000_0000_0000_0001_0000_0000_0010_0000_0000_0000_0000_0000_0000_0000_0000)\n\n    @classmethod\n    def advanced(cls) -> Self:\n        \"\"\"A factory method that creates a :class:`Permissions` with all\n        \"Advanced\" permissions from the official Discord UI set to ``True``.\n\n        .. versionadded:: 1.7\n        \"\"\"\n        return cls(1 << 3)\n\n    def update(self, **kwargs: bool) -> None:\n        r\"\"\"Bulk updates this permission object.\n\n        Allows you to set multiple attributes by using keyword\n        arguments. The names must be equivalent to the properties\n        listed. Extraneous key/value pairs will be silently ignored.\n\n        Parameters\n        ------------\n        \\*\\*kwargs\n            A list of key/value pairs to bulk update permissions with.\n        \"\"\"\n        for key, value in kwargs.items():\n            flag = self.VALID_FLAGS.get(key)\n            if flag is not None:\n                self._set_flag(flag, value)\n\n    def handle_overwrite(self, allow: int, deny: int) -> None:\n        # Basically this is what's happening here.\n        # We have an original bit array, e.g. 1010\n        # Then we have another bit array that is 'denied', e.g. 1111\n        # And then we have the last one which is 'allowed', e.g. 0101\n        # We want original OP denied to end up resulting in\n        # whatever is in denied to be set to 0.\n        # So 1010 OP 1111 -> 0000\n        # Then we take this value and look at the allowed values.\n        # And whatever is allowed is set to 1.\n        # So 0000 OP2 0101 -> 0101\n        # The OP is base  & ~denied.\n        # The OP2 is base | allowed.\n        self.value: int = (self.value & ~deny) | allow\n\n    @flag_value\n    def create_instant_invite(self) -> int:\n        \"\"\":class:`bool`: Returns ``True`` if the user can create instant invites.\"\"\"\n        return 1 << 0\n\n    @flag_value\n    def kick_members(self) -> int:\n        \"\"\":class:`bool`: Returns ``True`` if the user can kick users from the guild.\"\"\"\n        return 1 << 1\n\n    @flag_value\n    def ban_members(self) -> int:\n        \"\"\":class:`bool`: Returns ``True`` if a user can ban users from the guild.\"\"\"\n        return 1 << 2\n\n    @flag_value\n    def administrator(self) -> int:\n        \"\"\":class:`bool`: Returns ``True`` if a user is an administrator. This role overrides all other permissions.\n\n        This also bypasses all channel-specific overrides.\n        \"\"\"\n        return 1 << 3\n\n    @flag_value\n    def manage_channels(self) -> int:\n        \"\"\":class:`bool`: Returns ``True`` if a user can edit, delete, or create channels in the guild.\n\n        This also corresponds to the \"Manage Channel\" channel-specific override.\"\"\"\n        return 1 << 4\n\n    @flag_value\n    def manage_guild(self) -> int:\n        \"\"\":class:`bool`: Returns ``True`` if a user can edit guild properties.\"\"\"\n        return 1 << 5\n\n    @flag_value\n    def add_reactions(self) -> int:\n        \"\"\":class:`bool`: Returns ``True`` if a user can add reactions to messages.\"\"\"\n        return 1 << 6\n\n    @flag_value\n    def view_audit_log(self) -> int:\n        \"\"\":class:`bool`: Returns ``True`` if a user can view the guild's audit log.\"\"\"\n        return 1 << 7\n\n    @flag_value\n    def priority_speaker(self) -> int:\n        \"\"\":class:`bool`: Returns ``True`` if a user can be more easily heard while talking.\"\"\"\n        return 1 << 8\n\n    @flag_value\n    def stream(self) -> int:\n        \"\"\":class:`bool`: Returns ``True`` if a user can stream in a voice channel.\"\"\"\n        return 1 << 9\n\n    @flag_value\n    def read_messages(self) -> int:\n        \"\"\":class:`bool`: Returns ``True`` if a user can read messages from all or specific text channels.\"\"\"\n        return 1 << 10\n\n    @make_permission_alias('read_messages')\n    def view_channel(self) -> int:\n        \"\"\":class:`bool`: An alias for :attr:`read_messages`.\n\n        .. versionadded:: 1.3\n        \"\"\"\n        return 1 << 10\n\n    @flag_value\n    def send_messages(self) -> int:\n        \"\"\":class:`bool`: Returns ``True`` if a user can send messages from all or specific text channels.\"\"\"\n        return 1 << 11\n\n    @flag_value\n    def send_tts_messages(self) -> int:\n        \"\"\":class:`bool`: Returns ``True`` if a user can send TTS messages from all or specific text channels.\"\"\"\n        return 1 << 12\n\n    @flag_value\n    def manage_messages(self) -> int:\n        \"\"\":class:`bool`: Returns ``True`` if a user can delete or pin messages in a text channel.\n\n        .. note::\n\n            Note that there are currently no ways to edit other people's messages.\n        \"\"\"\n        return 1 << 13\n\n    @flag_value\n    def embed_links(self) -> int:\n        \"\"\":class:`bool`: Returns ``True`` if a user's messages will automatically be embedded by Discord.\"\"\"\n        return 1 << 14\n\n    @flag_value\n    def attach_files(self) -> int:\n        \"\"\":class:`bool`: Returns ``True`` if a user can send files in their messages.\"\"\"\n        return 1 << 15\n\n    @flag_value\n    def read_message_history(self) -> int:\n        \"\"\":class:`bool`: Returns ``True`` if a user can read a text channel's previous messages.\"\"\"\n        return 1 << 16\n\n    @flag_value\n    def mention_everyone(self) -> int:\n        \"\"\":class:`bool`: Returns ``True`` if a user's @everyone or @here will mention everyone in the text channel.\"\"\"\n        return 1 << 17\n\n    @flag_value\n    def external_emojis(self) -> int:\n        \"\"\":class:`bool`: Returns ``True`` if a user can use emojis from other guilds.\"\"\"\n        return 1 << 18\n\n    @make_permission_alias('external_emojis')\n    def use_external_emojis(self) -> int:\n        \"\"\":class:`bool`: An alias for :attr:`external_emojis`.\n\n        .. versionadded:: 1.3\n        \"\"\"\n        return 1 << 18\n\n    @flag_value\n    def view_guild_insights(self) -> int:\n        \"\"\":class:`bool`: Returns ``True`` if a user can view the guild's insights.\n\n        .. versionadded:: 1.3\n        \"\"\"\n        return 1 << 19\n\n    @flag_value\n    def connect(self) -> int:\n        \"\"\":class:`bool`: Returns ``True`` if a user can connect to a voice channel.\"\"\"\n        return 1 << 20\n\n    @flag_value\n    def speak(self) -> int:\n        \"\"\":class:`bool`: Returns ``True`` if a user can speak in a voice channel.\"\"\"\n        return 1 << 21\n\n    @flag_value\n    def mute_members(self) -> int:\n        \"\"\":class:`bool`: Returns ``True`` if a user can mute other users.\"\"\"\n        return 1 << 22\n\n    @flag_value\n    def deafen_members(self) -> int:\n        \"\"\":class:`bool`: Returns ``True`` if a user can deafen other users.\"\"\"\n        return 1 << 23\n\n    @flag_value\n    def move_members(self) -> int:\n        \"\"\":class:`bool`: Returns ``True`` if a user can move users between other voice channels.\"\"\"\n        return 1 << 24\n\n    @flag_value\n    def use_voice_activation(self) -> int:\n        \"\"\":class:`bool`: Returns ``True`` if a user can use voice activation in voice channels.\"\"\"\n        return 1 << 25\n\n    @flag_value\n    def change_nickname(self) -> int:\n        \"\"\":class:`bool`: Returns ``True`` if a user can change their nickname in the guild.\"\"\"\n        return 1 << 26\n\n    @flag_value\n    def manage_nicknames(self) -> int:\n        \"\"\":class:`bool`: Returns ``True`` if a user can change other user's nickname in the guild.\"\"\"\n        return 1 << 27\n\n    @flag_value\n    def manage_roles(self) -> int:\n        \"\"\":class:`bool`: Returns ``True`` if a user can create or edit roles less than their role's position.\n\n        This also corresponds to the \"Manage Permissions\" channel-specific override.\n        \"\"\"\n        return 1 << 28\n\n    @make_permission_alias('manage_roles')\n    def manage_permissions(self) -> int:\n        \"\"\":class:`bool`: An alias for :attr:`manage_roles`.\n\n        .. versionadded:: 1.3\n        \"\"\"\n        return 1 << 28\n\n    @flag_value\n    def manage_webhooks(self) -> int:\n        \"\"\":class:`bool`: Returns ``True`` if a user can create, edit, or delete webhooks.\"\"\"\n        return 1 << 29\n\n    @flag_value\n    def manage_expressions(self) -> int:\n        \"\"\":class:`bool`: Returns ``True`` if a user can edit or delete emojis, stickers, and soundboard sounds.\n\n        .. versionadded:: 2.3\n        \"\"\"\n        return 1 << 30\n\n    @make_permission_alias('manage_expressions')\n    def manage_emojis(self) -> int:\n        \"\"\":class:`bool`: An alias for :attr:`manage_expressions`.\"\"\"\n        return 1 << 30\n\n    @make_permission_alias('manage_expressions')\n    def manage_emojis_and_stickers(self) -> int:\n        \"\"\":class:`bool`: An alias for :attr:`manage_expressions`.\n\n        .. versionadded:: 2.0\n        \"\"\"\n        return 1 << 30\n\n    @flag_value\n    def use_application_commands(self) -> int:\n        \"\"\":class:`bool`: Returns ``True`` if a user can use slash commands.\n\n        .. versionadded:: 1.7\n        \"\"\"\n        return 1 << 31\n\n    @flag_value\n    def request_to_speak(self) -> int:\n        \"\"\":class:`bool`: Returns ``True`` if a user can request to speak in a stage channel.\n\n        .. versionadded:: 1.7\n        \"\"\"\n        return 1 << 32\n\n    @flag_value\n    def manage_events(self) -> int:\n        \"\"\":class:`bool`: Returns ``True`` if a user can manage guild events.\n\n        .. versionadded:: 2.0\n        \"\"\"\n        return 1 << 33\n\n    @flag_value\n    def manage_threads(self) -> int:\n        \"\"\":class:`bool`: Returns ``True`` if a user can manage threads.\n\n        .. versionadded:: 2.0\n        \"\"\"\n        return 1 << 34\n\n    @flag_value\n    def create_public_threads(self) -> int:\n        \"\"\":class:`bool`: Returns ``True`` if a user can create public threads.\n\n        .. versionadded:: 2.0\n        \"\"\"\n        return 1 << 35\n\n    @flag_value\n    def create_private_threads(self) -> int:\n        \"\"\":class:`bool`: Returns ``True`` if a user can create private threads.\n\n        .. versionadded:: 2.0\n        \"\"\"\n        return 1 << 36\n\n    @flag_value\n    def external_stickers(self) -> int:\n        \"\"\":class:`bool`: Returns ``True`` if a user can use stickers from other guilds.\n\n        .. versionadded:: 2.0\n        \"\"\"\n        return 1 << 37\n\n    @make_permission_alias('external_stickers')\n    def use_external_stickers(self) -> int:\n        \"\"\":class:`bool`: An alias for :attr:`external_stickers`.\n\n        .. versionadded:: 2.0\n        \"\"\"\n        return 1 << 37\n\n    @flag_value\n    def send_messages_in_threads(self) -> int:\n        \"\"\":class:`bool`: Returns ``True`` if a user can send messages in threads.\n\n        .. versionadded:: 2.0\n        \"\"\"\n        return 1 << 38\n\n    @flag_value\n    def use_embedded_activities(self) -> int:\n        \"\"\":class:`bool`: Returns ``True`` if a user can launch an embedded application in a Voice channel.\n\n        .. versionadded:: 2.0\n        \"\"\"\n        return 1 << 39\n\n    @flag_value\n    def moderate_members(self) -> int:\n        \"\"\":class:`bool`: Returns ``True`` if a user can time out other members.\n\n        .. versionadded:: 2.0\n        \"\"\"\n        return 1 << 40\n\n    @flag_value\n    def view_creator_monetization_analytics(self) -> int:\n        \"\"\":class:`bool`: Returns ``True`` if a user can view role subscription insights.\n\n        .. versionadded:: 2.4\n        \"\"\"\n        return 1 << 41\n\n    @flag_value\n    def use_soundboard(self) -> int:\n        \"\"\":class:`bool`: Returns ``True`` if a user can use the soundboard.\n\n        .. versionadded:: 2.3\n        \"\"\"\n        return 1 << 42\n\n    @flag_value\n    def create_expressions(self) -> int:\n        \"\"\":class:`bool`: Returns ``True`` if a user can create emojis, stickers, and soundboard sounds.\n\n        .. versionadded:: 2.3\n        \"\"\"\n        return 1 << 43\n\n    @flag_value\n    def create_events(self) -> int:\n        \"\"\":class:`bool`: Returns ``True`` if a user can create guild events.\n\n        .. versionadded:: 2.4\n        \"\"\"\n        return 1 << 44\n\n    @flag_value\n    def use_external_sounds(self) -> int:\n        \"\"\":class:`bool`: Returns ``True`` if a user can use sounds from other guilds.\n\n        .. versionadded:: 2.3\n        \"\"\"\n        return 1 << 45\n\n    @flag_value\n    def send_voice_messages(self) -> int:\n        \"\"\":class:`bool`: Returns ``True`` if a user can send voice messages.\n\n        .. versionadded:: 2.3\n        \"\"\"\n        return 1 << 46\n\n    @flag_value\n    def send_polls(self) -> int:\n        \"\"\":class:`bool`: Returns ``True`` if a user can send poll messages.\n\n        .. versionadded:: 2.4\n        \"\"\"\n        return 1 << 49\n\n    @make_permission_alias('send_polls')\n    def create_polls(self) -> int:\n        \"\"\":class:`bool`: An alias for :attr:`send_polls`.\n\n        .. versionadded:: 2.4\n        \"\"\"\n        return 1 << 49\n\n    @flag_value\n    def use_external_apps(self) -> int:\n        \"\"\":class:`bool`: Returns ``True`` if a user can use external apps.\n\n        .. versionadded:: 2.4\n        \"\"\"\n        return 1 << 50\n\n\ndef _augment_from_permissions(cls):\n    cls.VALID_NAMES = set(Permissions.VALID_FLAGS)\n    aliases = set()\n\n    # make descriptors for all the valid names and aliases\n    for name, value in Permissions.__dict__.items():\n        if isinstance(value, permission_alias):\n            key = value.alias\n            aliases.add(name)\n        elif isinstance(value, flag_value):\n            key = name\n        else:\n            continue\n\n        # god bless Python\n        def getter(self, x=key):\n            return self._values.get(x)\n\n        def setter(self, value, x=key):\n            self._set(x, value)\n\n        prop = property(getter, setter)\n        setattr(cls, name, prop)\n\n    cls.PURE_FLAGS = cls.VALID_NAMES - aliases\n    return cls\n\n\n@_augment_from_permissions\nclass PermissionOverwrite:\n    r\"\"\"A type that is used to represent a channel specific permission.\n\n    Unlike a regular :class:`Permissions`\\, the default value of a\n    permission is equivalent to ``None`` and not ``False``. Setting\n    a value to ``False`` is **explicitly** denying that permission,\n    while setting a value to ``True`` is **explicitly** allowing\n    that permission.\n\n    The values supported by this are the same as :class:`Permissions`\n    with the added possibility of it being set to ``None``.\n\n    .. container:: operations\n\n        .. describe:: x == y\n\n            Checks if two overwrites are equal.\n        .. describe:: x != y\n\n            Checks if two overwrites are not equal.\n        .. describe:: iter(x)\n\n           Returns an iterator of ``(perm, value)`` pairs. This allows it\n           to be, for example, constructed as a dict or a list of pairs.\n           Note that aliases are not shown.\n\n    Parameters\n    -----------\n    \\*\\*kwargs\n        Set the value of permissions by their name.\n    \"\"\"\n\n    __slots__ = ('_values',)\n\n    if TYPE_CHECKING:\n        VALID_NAMES: ClassVar[Set[str]]\n        PURE_FLAGS: ClassVar[Set[str]]\n        # I wish I didn't have to do this\n        create_instant_invite: Optional[bool]\n        kick_members: Optional[bool]\n        ban_members: Optional[bool]\n        administrator: Optional[bool]\n        manage_channels: Optional[bool]\n        manage_guild: Optional[bool]\n        add_reactions: Optional[bool]\n        view_audit_log: Optional[bool]\n        priority_speaker: Optional[bool]\n        stream: Optional[bool]\n        read_messages: Optional[bool]\n        view_channel: Optional[bool]\n        send_messages: Optional[bool]\n        send_tts_messages: Optional[bool]\n        manage_messages: Optional[bool]\n        embed_links: Optional[bool]\n        attach_files: Optional[bool]\n        read_message_history: Optional[bool]\n        mention_everyone: Optional[bool]\n        external_emojis: Optional[bool]\n        use_external_emojis: Optional[bool]\n        view_guild_insights: Optional[bool]\n        connect: Optional[bool]\n        speak: Optional[bool]\n        mute_members: Optional[bool]\n        deafen_members: Optional[bool]\n        move_members: Optional[bool]\n        use_voice_activation: Optional[bool]\n        change_nickname: Optional[bool]\n        manage_nicknames: Optional[bool]\n        manage_roles: Optional[bool]\n        manage_permissions: Optional[bool]\n        manage_webhooks: Optional[bool]\n        manage_expressions: Optional[bool]\n        manage_emojis: Optional[bool]\n        manage_emojis_and_stickers: Optional[bool]\n        use_application_commands: Optional[bool]\n        request_to_speak: Optional[bool]\n        manage_events: Optional[bool]\n        manage_threads: Optional[bool]\n        create_public_threads: Optional[bool]\n        create_private_threads: Optional[bool]\n        send_messages_in_threads: Optional[bool]\n        external_stickers: Optional[bool]\n        use_external_stickers: Optional[bool]\n        use_embedded_activities: Optional[bool]\n        moderate_members: Optional[bool]\n        use_soundboard: Optional[bool]\n        use_external_sounds: Optional[bool]\n        send_voice_messages: Optional[bool]\n        create_expressions: Optional[bool]\n        create_events: Optional[bool]\n        send_polls: Optional[bool]\n        create_polls: Optional[bool]\n        use_external_apps: Optional[bool]\n\n    def __init__(self, **kwargs: Optional[bool]):\n        self._values: Dict[str, Optional[bool]] = {}\n\n        for key, value in kwargs.items():\n            if key not in self.VALID_NAMES:\n                raise ValueError(f'no permission called {key}.')\n\n            setattr(self, key, value)\n\n    def __eq__(self, other: object) -> bool:\n        return isinstance(other, PermissionOverwrite) and self._values == other._values\n\n    def _set(self, key: str, value: Optional[bool]) -> None:\n        if value not in (True, None, False):\n            raise TypeError(f'Expected bool or NoneType, received {value.__class__.__name__}')\n\n        if value is None:\n            self._values.pop(key, None)\n        else:\n            self._values[key] = value\n\n    def pair(self) -> Tuple[Permissions, Permissions]:\n        \"\"\"Tuple[:class:`Permissions`, :class:`Permissions`]: Returns the (allow, deny) pair from this overwrite.\"\"\"\n\n        allow = Permissions.none()\n        deny = Permissions.none()\n\n        for key, value in self._values.items():\n            if value is True:\n                setattr(allow, key, True)\n            elif value is False:\n                setattr(deny, key, True)\n\n        return allow, deny\n\n    @classmethod\n    def from_pair(cls, allow: Permissions, deny: Permissions) -> Self:\n        \"\"\"Creates an overwrite from an allow/deny pair of :class:`Permissions`.\"\"\"\n        ret = cls()\n        for key, value in allow:\n            if value is True:\n                setattr(ret, key, True)\n\n        for key, value in deny:\n            if value is True:\n                setattr(ret, key, False)\n\n        return ret\n\n    def is_empty(self) -> bool:\n        \"\"\"Checks if the permission overwrite is currently empty.\n\n        An empty permission overwrite is one that has no overwrites set\n        to ``True`` or ``False``.\n\n        Returns\n        -------\n        :class:`bool`\n            Indicates if the overwrite is empty.\n        \"\"\"\n        return len(self._values) == 0\n\n    def update(self, **kwargs: Optional[bool]) -> None:\n        r\"\"\"Bulk updates this permission overwrite object.\n\n        Allows you to set multiple attributes by using keyword\n        arguments. The names must be equivalent to the properties\n        listed. Extraneous key/value pairs will be silently ignored.\n\n        Parameters\n        ------------\n        \\*\\*kwargs\n            A list of key/value pairs to bulk update with.\n        \"\"\"\n        for key, value in kwargs.items():\n            if key not in self.VALID_NAMES:\n                continue\n\n            setattr(self, key, value)\n\n    def __iter__(self) -> Iterator[Tuple[str, Optional[bool]]]:\n        for key in self.PURE_FLAGS:\n            yield key, self._values.get(key)\n"
  },
  {
    "path": "discord/player.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\nfrom __future__ import annotations\n\nimport threading\nimport subprocess\nimport warnings\nimport audioop\nimport asyncio\nimport logging\nimport shlex\nimport time\nimport json\nimport sys\nimport re\nimport io\n\nfrom typing import Any, Callable, Generic, IO, Optional, TYPE_CHECKING, Tuple, TypeVar, Union\n\nfrom .enums import SpeakingState\nfrom .errors import ClientException\nfrom .opus import Encoder as OpusEncoder, OPUS_SILENCE\nfrom .oggparse import OggStream\nfrom .utils import MISSING\n\nif TYPE_CHECKING:\n    from typing_extensions import Self\n\n    from .voice_client import VoiceClient\n\n\nAT = TypeVar('AT', bound='AudioSource')\n\n_log = logging.getLogger(__name__)\n\n__all__ = (\n    'AudioSource',\n    'PCMAudio',\n    'FFmpegAudio',\n    'FFmpegPCMAudio',\n    'FFmpegOpusAudio',\n    'PCMVolumeTransformer',\n)\n\nCREATE_NO_WINDOW: int\n\nif sys.platform != 'win32':\n    CREATE_NO_WINDOW = 0\nelse:\n    CREATE_NO_WINDOW = 0x08000000\n\n\nclass AudioSource:\n    \"\"\"Represents an audio stream.\n\n    The audio stream can be Opus encoded or not, however if the audio stream\n    is not Opus encoded then the audio format must be 16-bit 48KHz stereo PCM.\n\n    .. warning::\n\n        The audio source reads are done in a separate thread.\n    \"\"\"\n\n    def read(self) -> bytes:\n        \"\"\"Reads 20ms worth of audio.\n\n        Subclasses must implement this.\n\n        If the audio is complete, then returning an empty\n        :term:`py:bytes-like object` to signal this is the way to do so.\n\n        If :meth:`~AudioSource.is_opus` method returns ``True``, then it must return\n        20ms worth of Opus encoded audio. Otherwise, it must be 20ms\n        worth of 16-bit 48KHz stereo PCM, which is about 3,840 bytes\n        per frame (20ms worth of audio).\n\n        Returns\n        --------\n        :class:`bytes`\n            A bytes like object that represents the PCM or Opus data.\n        \"\"\"\n        raise NotImplementedError\n\n    def is_opus(self) -> bool:\n        \"\"\"Checks if the audio source is already encoded in Opus.\"\"\"\n        return False\n\n    def cleanup(self) -> None:\n        \"\"\"Called when clean-up is needed to be done.\n\n        Useful for clearing buffer data or processes after\n        it is done playing audio.\n        \"\"\"\n        pass\n\n    def __del__(self) -> None:\n        self.cleanup()\n\n\nclass PCMAudio(AudioSource):\n    \"\"\"Represents raw 16-bit 48KHz stereo PCM audio source.\n\n    Attributes\n    -----------\n    stream: :term:`py:file object`\n        A file-like object that reads byte data representing raw PCM.\n    \"\"\"\n\n    def __init__(self, stream: io.BufferedIOBase) -> None:\n        self.stream: io.BufferedIOBase = stream\n\n    def read(self) -> bytes:\n        ret = self.stream.read(OpusEncoder.FRAME_SIZE)\n        if len(ret) != OpusEncoder.FRAME_SIZE:\n            return b''\n        return ret\n\n\nclass FFmpegAudio(AudioSource):\n    \"\"\"Represents an FFmpeg (or AVConv) based AudioSource.\n\n    User created AudioSources using FFmpeg differently from how :class:`FFmpegPCMAudio` and\n    :class:`FFmpegOpusAudio` work should subclass this.\n\n    .. versionadded:: 1.3\n    \"\"\"\n\n    BLOCKSIZE: int = io.DEFAULT_BUFFER_SIZE\n\n    def __init__(\n        self,\n        source: Union[str, io.BufferedIOBase],\n        *,\n        executable: str = 'ffmpeg',\n        args: Any,\n        **subprocess_kwargs: Any,\n    ):\n        piping_stdin = subprocess_kwargs.get('stdin') == subprocess.PIPE\n        if piping_stdin and isinstance(source, str):\n            raise TypeError(\"parameter conflict: 'source' parameter cannot be a string when piping to stdin\")\n\n        stderr: Optional[IO[bytes]] = subprocess_kwargs.pop('stderr', None)\n\n        if stderr == subprocess.PIPE:\n            warnings.warn(\"Passing subprocess.PIPE does nothing\", DeprecationWarning, stacklevel=3)\n            stderr = None\n\n        piping_stderr = False\n        if stderr is not None:\n            try:\n                stderr.fileno()\n            except Exception:\n                piping_stderr = True\n\n        args = [executable, *args]\n        kwargs = {'stdout': subprocess.PIPE, 'stderr': subprocess.PIPE if piping_stderr else stderr}\n        kwargs.update(subprocess_kwargs)\n\n        # Ensure attribute is assigned even in the case of errors\n        self._process: subprocess.Popen = MISSING\n        self._process = self._spawn_process(args, **kwargs)\n        self._stdout: IO[bytes] = self._process.stdout  # type: ignore # process stdout is explicitly set\n        self._stdin: Optional[IO[bytes]] = None\n        self._stderr: Optional[IO[bytes]] = None\n        self._pipe_writer_thread: Optional[threading.Thread] = None\n        self._pipe_reader_thread: Optional[threading.Thread] = None\n\n        if piping_stdin:\n            n = f'popen-stdin-writer:pid-{self._process.pid}'\n            self._stdin = self._process.stdin\n            self._pipe_writer_thread = threading.Thread(target=self._pipe_writer, args=(source,), daemon=True, name=n)\n            self._pipe_writer_thread.start()\n\n        if piping_stderr:\n            n = f'popen-stderr-reader:pid-{self._process.pid}'\n            self._stderr = self._process.stderr\n            self._pipe_reader_thread = threading.Thread(target=self._pipe_reader, args=(stderr,), daemon=True, name=n)\n            self._pipe_reader_thread.start()\n\n    def _spawn_process(self, args: Any, **subprocess_kwargs: Any) -> subprocess.Popen:\n        _log.debug('Spawning ffmpeg process with command: %s', args)\n        process = None\n        try:\n            process = subprocess.Popen(args, creationflags=CREATE_NO_WINDOW, **subprocess_kwargs)\n        except FileNotFoundError:\n            executable = args.partition(' ')[0] if isinstance(args, str) else args[0]\n            raise ClientException(executable + ' was not found.') from None\n        except subprocess.SubprocessError as exc:\n            raise ClientException(f'Popen failed: {exc.__class__.__name__}: {exc}') from exc\n        else:\n            return process\n\n    def _kill_process(self) -> None:\n        # this function gets called in __del__ so instance attributes might not even exist\n        proc = getattr(self, '_process', MISSING)\n        if proc is MISSING:\n            return\n\n        _log.debug('Preparing to terminate ffmpeg process %s.', proc.pid)\n\n        try:\n            proc.kill()\n        except Exception:\n            _log.exception('Ignoring error attempting to kill ffmpeg process %s', proc.pid)\n\n        if proc.poll() is None:\n            _log.info('ffmpeg process %s has not terminated. Waiting to terminate...', proc.pid)\n            proc.communicate()\n            _log.info('ffmpeg process %s should have terminated with a return code of %s.', proc.pid, proc.returncode)\n        else:\n            _log.info('ffmpeg process %s successfully terminated with return code of %s.', proc.pid, proc.returncode)\n\n    def _pipe_writer(self, source: io.BufferedIOBase) -> None:\n        while self._process:\n            data = source.read(self.BLOCKSIZE)\n            if not data:\n                if self._stdin is not None:\n                    self._stdin.close()\n                return\n            try:\n                if self._stdin is not None:\n                    self._stdin.write(data)\n            except Exception:\n                _log.debug('Write error for %s, this is probably not a problem', self, exc_info=True)\n                # at this point the source data is either exhausted or the process is fubar\n                self._process.terminate()\n                return\n\n    def _pipe_reader(self, dest: IO[bytes]) -> None:\n        while self._process:\n            if self._stderr is None:\n                return\n            try:\n                data: bytes = self._stderr.read(self.BLOCKSIZE)\n            except Exception:\n                _log.debug('Read error for %s, this is probably not a problem', self, exc_info=True)\n                return\n            if data is None:\n                return\n            try:\n                dest.write(data)\n            except Exception:\n                _log.exception('Write error for %s', self)\n                self._stderr.close()\n                return\n\n    def cleanup(self) -> None:\n        self._kill_process()\n        self._process = self._stdout = self._stdin = self._stderr = MISSING\n\n\nclass FFmpegPCMAudio(FFmpegAudio):\n    \"\"\"An audio source from FFmpeg (or AVConv).\n\n    This launches a sub-process to a specific input file given.\n\n    .. warning::\n\n        You must have the ffmpeg or avconv executable in your path environment\n        variable in order for this to work.\n\n    Parameters\n    ------------\n    source: Union[:class:`str`, :class:`io.BufferedIOBase`]\n        The input that ffmpeg will take and convert to PCM bytes.\n        If ``pipe`` is ``True`` then this is a file-like object that is\n        passed to the stdin of ffmpeg.\n    executable: :class:`str`\n        The executable name (and path) to use. Defaults to ``ffmpeg``.\n\n        .. warning::\n\n            Since this class spawns a subprocess, care should be taken to not\n            pass in an arbitrary executable name when using this parameter.\n\n    pipe: :class:`bool`\n        If ``True``, denotes that ``source`` parameter will be passed\n        to the stdin of ffmpeg. Defaults to ``False``.\n    stderr: Optional[:term:`py:file object`]\n        A file-like object to pass to the Popen constructor.\n    before_options: Optional[:class:`str`]\n        Extra command line arguments to pass to ffmpeg before the ``-i`` flag.\n    options: Optional[:class:`str`]\n        Extra command line arguments to pass to ffmpeg after the ``-i`` flag.\n\n    Raises\n    --------\n    ClientException\n        The subprocess failed to be created.\n    \"\"\"\n\n    def __init__(\n        self,\n        source: Union[str, io.BufferedIOBase],\n        *,\n        executable: str = 'ffmpeg',\n        pipe: bool = False,\n        stderr: Optional[IO[bytes]] = None,\n        before_options: Optional[str] = None,\n        options: Optional[str] = None,\n    ) -> None:\n        args = []\n        subprocess_kwargs = {'stdin': subprocess.PIPE if pipe else subprocess.DEVNULL, 'stderr': stderr}\n\n        if isinstance(before_options, str):\n            args.extend(shlex.split(before_options))\n\n        args.append('-i')\n        args.append('-' if pipe else source)\n\n        # fmt: off\n        args.extend(('-f', 's16le',\n                     '-ar', '48000',\n                     '-ac', '2',\n                     '-loglevel', 'warning',\n                     '-blocksize', str(self.BLOCKSIZE)))\n        # fmt: on\n\n        if isinstance(options, str):\n            args.extend(shlex.split(options))\n\n        args.append('pipe:1')\n\n        super().__init__(source, executable=executable, args=args, **subprocess_kwargs)\n\n    def read(self) -> bytes:\n        ret = self._stdout.read(OpusEncoder.FRAME_SIZE)\n        if len(ret) != OpusEncoder.FRAME_SIZE:\n            return b''\n        return ret\n\n    def is_opus(self) -> bool:\n        return False\n\n\nclass FFmpegOpusAudio(FFmpegAudio):\n    \"\"\"An audio source from FFmpeg (or AVConv).\n\n    This launches a sub-process to a specific input file given.  However, rather than\n    producing PCM packets like :class:`FFmpegPCMAudio` does that need to be encoded to\n    Opus, this class produces Opus packets, skipping the encoding step done by the library.\n\n    Alternatively, instead of instantiating this class directly, you can use\n    :meth:`FFmpegOpusAudio.from_probe` to probe for bitrate and codec information.  This\n    can be used to opportunistically skip pointless re-encoding of existing Opus audio data\n    for a boost in performance at the cost of a short initial delay to gather the information.\n    The same can be achieved by passing ``copy`` to the ``codec`` parameter, but only if you\n    know that the input source is Opus encoded beforehand.\n\n    .. versionadded:: 1.3\n\n    .. warning::\n\n        You must have the ffmpeg or avconv executable in your path environment\n        variable in order for this to work.\n\n    Parameters\n    ------------\n    source: Union[:class:`str`, :class:`io.BufferedIOBase`]\n        The input that ffmpeg will take and convert to Opus bytes.\n        If ``pipe`` is ``True`` then this is a file-like object that is\n        passed to the stdin of ffmpeg.\n    bitrate: :class:`int`\n        The bitrate in kbps to encode the output to.  Defaults to ``128``.\n    codec: Optional[:class:`str`]\n        The codec to use to encode the audio data.  Normally this would be\n        just ``libopus``, but is used by :meth:`FFmpegOpusAudio.from_probe` to\n        opportunistically skip pointlessly re-encoding Opus audio data by passing\n        ``copy`` as the codec value.  Any values other than ``copy``, ``opus``, or\n        ``libopus`` will be considered ``libopus``.  Defaults to ``libopus``.\n\n        .. warning::\n\n            Do not provide this parameter unless you are certain that the audio input is\n            already Opus encoded.  For typical use :meth:`FFmpegOpusAudio.from_probe`\n            should be used to determine the proper value for this parameter.\n\n    executable: :class:`str`\n        The executable name (and path) to use. Defaults to ``ffmpeg``.\n\n        .. warning::\n\n            Since this class spawns a subprocess, care should be taken to not\n            pass in an arbitrary executable name when using this parameter.\n\n    pipe: :class:`bool`\n        If ``True``, denotes that ``source`` parameter will be passed\n        to the stdin of ffmpeg. Defaults to ``False``.\n    stderr: Optional[:term:`py:file object`]\n        A file-like object to pass to the Popen constructor.\n    before_options: Optional[:class:`str`]\n        Extra command line arguments to pass to ffmpeg before the ``-i`` flag.\n    options: Optional[:class:`str`]\n        Extra command line arguments to pass to ffmpeg after the ``-i`` flag.\n\n    Raises\n    --------\n    ClientException\n        The subprocess failed to be created.\n    \"\"\"\n\n    def __init__(\n        self,\n        source: Union[str, io.BufferedIOBase],\n        *,\n        bitrate: Optional[int] = None,\n        codec: Optional[str] = None,\n        executable: str = 'ffmpeg',\n        pipe: bool = False,\n        stderr: Optional[IO[bytes]] = None,\n        before_options: Optional[str] = None,\n        options: Optional[str] = None,\n    ) -> None:\n        args = []\n        subprocess_kwargs = {'stdin': subprocess.PIPE if pipe else subprocess.DEVNULL, 'stderr': stderr}\n\n        if isinstance(before_options, str):\n            args.extend(shlex.split(before_options))\n\n        args.append('-i')\n        args.append('-' if pipe else source)\n\n        codec = 'copy' if codec in ('opus', 'libopus', 'copy') else 'libopus'\n        bitrate = bitrate if bitrate is not None else 128\n\n        # fmt: off\n        args.extend(('-map_metadata', '-1',\n                     '-f', 'opus',\n                     '-c:a', codec,\n                     '-ar', '48000',\n                     '-ac', '2',\n                     '-b:a', f'{bitrate}k',\n                     '-loglevel', 'warning',\n                     '-fec', 'true',\n                     '-packet_loss', '15',\n                     '-blocksize', str(self.BLOCKSIZE)))\n        # fmt: on\n\n        if isinstance(options, str):\n            args.extend(shlex.split(options))\n\n        args.append('pipe:1')\n\n        super().__init__(source, executable=executable, args=args, **subprocess_kwargs)\n        self._packet_iter = OggStream(self._stdout).iter_packets()\n\n    @classmethod\n    async def from_probe(\n        cls,\n        source: str,\n        *,\n        method: Optional[Union[str, Callable[[str, str], Tuple[Optional[str], Optional[int]]]]] = None,\n        **kwargs: Any,\n    ) -> Self:\n        \"\"\"|coro|\n\n        A factory method that creates a :class:`FFmpegOpusAudio` after probing\n        the input source for audio codec and bitrate information.\n\n        Examples\n        ----------\n\n        Use this function to create an :class:`FFmpegOpusAudio` instance instead of the constructor: ::\n\n            source = await discord.FFmpegOpusAudio.from_probe(\"song.webm\")\n            voice_client.play(source)\n\n        If you are on Windows and don't have ffprobe installed, use the ``fallback`` method\n        to probe using ffmpeg instead: ::\n\n            source = await discord.FFmpegOpusAudio.from_probe(\"song.webm\", method='fallback')\n            voice_client.play(source)\n\n        Using a custom method of determining codec and bitrate: ::\n\n            def custom_probe(source, executable):\n                # some analysis code here\n                return codec, bitrate\n\n            source = await discord.FFmpegOpusAudio.from_probe(\"song.webm\", method=custom_probe)\n            voice_client.play(source)\n\n        Parameters\n        ------------\n        source\n            Identical to the ``source`` parameter for the constructor.\n        method: Optional[Union[:class:`str`, Callable[:class:`str`, :class:`str`]]]\n            The probing method used to determine bitrate and codec information. As a string, valid\n            values are ``native`` to use ffprobe (or avprobe) and ``fallback`` to use ffmpeg\n            (or avconv).  As a callable, it must take two string arguments, ``source`` and\n            ``executable``.  Both parameters are the same values passed to this factory function.\n            ``executable`` will default to ``ffmpeg`` if not provided as a keyword argument.\n        kwargs\n            The remaining parameters to be passed to the :class:`FFmpegOpusAudio` constructor,\n            excluding ``bitrate`` and ``codec``.\n\n        Raises\n        --------\n        AttributeError\n            Invalid probe method, must be ``'native'`` or ``'fallback'``.\n        TypeError\n            Invalid value for ``probe`` parameter, must be :class:`str` or a callable.\n\n        Returns\n        --------\n        :class:`FFmpegOpusAudio`\n            An instance of this class.\n        \"\"\"\n\n        executable = kwargs.get('executable')\n        codec, bitrate = await cls.probe(source, method=method, executable=executable)\n        return cls(source, bitrate=bitrate, codec=codec, **kwargs)\n\n    @classmethod\n    async def probe(\n        cls,\n        source: str,\n        *,\n        method: Optional[Union[str, Callable[[str, str], Tuple[Optional[str], Optional[int]]]]] = None,\n        executable: Optional[str] = None,\n    ) -> Tuple[Optional[str], Optional[int]]:\n        \"\"\"|coro|\n\n        Probes the input source for bitrate and codec information.\n\n        Parameters\n        ------------\n        source\n            Identical to the ``source`` parameter for :class:`FFmpegOpusAudio`.\n        method\n            Identical to the ``method`` parameter for :meth:`FFmpegOpusAudio.from_probe`.\n        executable: :class:`str`\n            Identical to the ``executable`` parameter for :class:`FFmpegOpusAudio`.\n\n        Raises\n        --------\n        AttributeError\n            Invalid probe method, must be ``'native'`` or ``'fallback'``.\n        TypeError\n            Invalid value for ``probe`` parameter, must be :class:`str` or a callable.\n\n        Returns\n        ---------\n        Optional[Tuple[Optional[:class:`str`], :class:`int`]]\n            A 2-tuple with the codec and bitrate of the input source.\n        \"\"\"\n\n        method = method or 'native'\n        executable = executable or 'ffmpeg'\n        probefunc = fallback = None\n\n        if isinstance(method, str):\n            probefunc = getattr(cls, '_probe_codec_' + method, None)\n            if probefunc is None:\n                raise AttributeError(f\"Invalid probe method {method!r}\")\n\n            if probefunc is cls._probe_codec_native:\n                fallback = cls._probe_codec_fallback\n\n        elif callable(method):\n            probefunc = method\n            fallback = cls._probe_codec_fallback\n        else:\n            raise TypeError(f\"Expected str or callable for parameter 'probe', not '{method.__class__.__name__}'\")\n\n        codec = bitrate = None\n        loop = asyncio.get_running_loop()\n        try:\n            codec, bitrate = await loop.run_in_executor(None, lambda: probefunc(source, executable))\n        except Exception:\n            if not fallback:\n                _log.exception(\"Probe '%s' using '%s' failed\", method, executable)\n                return  # type: ignore\n\n            _log.exception(\"Probe '%s' using '%s' failed, trying fallback\", method, executable)\n            try:\n                codec, bitrate = await loop.run_in_executor(None, lambda: fallback(source, executable))\n            except Exception:\n                _log.exception(\"Fallback probe using '%s' failed\", executable)\n            else:\n                _log.debug(\"Fallback probe found codec=%s, bitrate=%s\", codec, bitrate)\n        else:\n            _log.debug(\"Probe found codec=%s, bitrate=%s\", codec, bitrate)\n        finally:\n            return codec, bitrate\n\n    @staticmethod\n    def _probe_codec_native(source, executable: str = 'ffmpeg') -> Tuple[Optional[str], Optional[int]]:\n        exe = executable[:2] + 'probe' if executable in ('ffmpeg', 'avconv') else executable\n        args = [exe, '-v', 'quiet', '-print_format', 'json', '-show_streams', '-select_streams', 'a:0', source]\n        output = subprocess.check_output(args, timeout=20)\n        codec = bitrate = None\n\n        if output:\n            data = json.loads(output)\n            streamdata = data['streams'][0]\n\n            codec = streamdata.get('codec_name')\n            bitrate = int(streamdata.get('bit_rate', 0))\n            bitrate = max(round(bitrate / 1000), 512)\n\n        return codec, bitrate\n\n    @staticmethod\n    def _probe_codec_fallback(source, executable: str = 'ffmpeg') -> Tuple[Optional[str], Optional[int]]:\n        args = [executable, '-hide_banner', '-i', source]\n        proc = subprocess.Popen(args, creationflags=CREATE_NO_WINDOW, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)\n        out, _ = proc.communicate(timeout=20)\n        output = out.decode('utf8')\n        codec = bitrate = None\n\n        codec_match = re.search(r\"Stream #0.*?Audio: (\\w+)\", output)\n        if codec_match:\n            codec = codec_match.group(1)\n\n        br_match = re.search(r\"(\\d+) [kK]b/s\", output)\n        if br_match:\n            bitrate = max(int(br_match.group(1)), 512)\n\n        return codec, bitrate\n\n    def read(self) -> bytes:\n        return next(self._packet_iter, b'')\n\n    def is_opus(self) -> bool:\n        return True\n\n\nclass PCMVolumeTransformer(AudioSource, Generic[AT]):\n    \"\"\"Transforms a previous :class:`AudioSource` to have volume controls.\n\n    This does not work on audio sources that have :meth:`AudioSource.is_opus`\n    set to ``True``.\n\n    Parameters\n    ------------\n    original: :class:`AudioSource`\n        The original AudioSource to transform.\n    volume: :class:`float`\n        The initial volume to set it to.\n        See :attr:`volume` for more info.\n\n    Raises\n    -------\n    TypeError\n        Not an audio source.\n    ClientException\n        The audio source is opus encoded.\n    \"\"\"\n\n    def __init__(self, original: AT, volume: float = 1.0):\n        if not isinstance(original, AudioSource):\n            raise TypeError(f'expected AudioSource not {original.__class__.__name__}.')\n\n        if original.is_opus():\n            raise ClientException('AudioSource must not be Opus encoded.')\n\n        self.original: AT = original\n        self.volume = volume\n\n    @property\n    def volume(self) -> float:\n        \"\"\"Retrieves or sets the volume as a floating point percentage (e.g. ``1.0`` for 100%).\"\"\"\n        return self._volume\n\n    @volume.setter\n    def volume(self, value: float) -> None:\n        self._volume = max(value, 0.0)\n\n    def cleanup(self) -> None:\n        self.original.cleanup()\n\n    def read(self) -> bytes:\n        ret = self.original.read()\n        return audioop.mul(ret, 2, min(self._volume, 2.0))\n\n\nclass AudioPlayer(threading.Thread):\n    DELAY: float = OpusEncoder.FRAME_LENGTH / 1000.0\n\n    def __init__(\n        self,\n        source: AudioSource,\n        client: VoiceClient,\n        *,\n        after: Optional[Callable[[Optional[Exception]], Any]] = None,\n    ) -> None:\n        super().__init__(daemon=True, name=f'audio-player:{id(self):#x}')\n        self.source: AudioSource = source\n        self.client: VoiceClient = client\n        self.after: Optional[Callable[[Optional[Exception]], Any]] = after\n\n        self._end: threading.Event = threading.Event()\n        self._resumed: threading.Event = threading.Event()\n        self._resumed.set()  # we are not paused\n        self._current_error: Optional[Exception] = None\n        self._lock: threading.Lock = threading.Lock()\n\n        if after is not None and not callable(after):\n            raise TypeError('Expected a callable for the \"after\" parameter.')\n\n    def _do_run(self) -> None:\n        self.loops = 0\n        self._start = time.perf_counter()\n\n        # getattr lookup speed ups\n        client = self.client\n        play_audio = client.send_audio_packet\n        self._speak(SpeakingState.voice)\n\n        while not self._end.is_set():\n            # are we paused?\n            if not self._resumed.is_set():\n                self.send_silence()\n                # wait until we aren't\n                self._resumed.wait()\n                continue\n\n            data = self.source.read()\n\n            if not data:\n                self.stop()\n                break\n\n            # are we disconnected from voice?\n            if not client.is_connected():\n                _log.debug('Not connected, waiting for %ss...', client.timeout)\n                # wait until we are connected, but not forever\n                connected = client.wait_until_connected(client.timeout)\n                if self._end.is_set() or not connected:\n                    _log.debug('Aborting playback')\n                    return\n                _log.debug('Reconnected, resuming playback')\n                self._speak(SpeakingState.voice)\n                # reset our internal data\n                self.loops = 0\n                self._start = time.perf_counter()\n\n            play_audio(data, encode=not self.source.is_opus())\n            self.loops += 1\n            next_time = self._start + self.DELAY * self.loops\n            delay = max(0, self.DELAY + (next_time - time.perf_counter()))\n            time.sleep(delay)\n\n        if client.is_connected():\n            self.send_silence()\n\n    def run(self) -> None:\n        try:\n            self._do_run()\n        except Exception as exc:\n            self._current_error = exc\n            self.stop()\n        finally:\n            self._call_after()\n            self.source.cleanup()\n\n    def _call_after(self) -> None:\n        error = self._current_error\n\n        if self.after is not None:\n            try:\n                self.after(error)\n            except Exception as exc:\n                exc.__context__ = error\n                _log.exception('Calling the after function failed.', exc_info=exc)\n        elif error:\n            _log.exception('Exception in voice thread %s', self.name, exc_info=error)\n\n    def stop(self) -> None:\n        self._end.set()\n        self._resumed.set()\n        self._speak(SpeakingState.none)\n\n    def pause(self, *, update_speaking: bool = True) -> None:\n        self._resumed.clear()\n        if update_speaking:\n            self._speak(SpeakingState.none)\n\n    def resume(self, *, update_speaking: bool = True) -> None:\n        self.loops: int = 0\n        self._start: float = time.perf_counter()\n        self._resumed.set()\n        if update_speaking:\n            self._speak(SpeakingState.voice)\n\n    def is_playing(self) -> bool:\n        return self._resumed.is_set() and not self._end.is_set()\n\n    def is_paused(self) -> bool:\n        return not self._end.is_set() and not self._resumed.is_set()\n\n    def set_source(self, source: AudioSource) -> None:\n        with self._lock:\n            self.pause(update_speaking=False)\n            self.source = source\n            self.resume(update_speaking=False)\n\n    def _speak(self, speaking: SpeakingState) -> None:\n        try:\n            asyncio.run_coroutine_threadsafe(self.client.ws.speak(speaking), self.client.client.loop)\n        except Exception:\n            _log.exception(\"Speaking call in player failed\")\n\n    def send_silence(self, count: int = 5) -> None:\n        try:\n            for n in range(count):\n                self.client.send_audio_packet(OPUS_SILENCE, encode=False)\n        except Exception:\n            # Any possible error (probably a socket error) is so inconsequential it's not even worth logging\n            pass\n"
  },
  {
    "path": "discord/poll.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom __future__ import annotations\n\n\nfrom typing import Optional, List, TYPE_CHECKING, Union, AsyncIterator, Dict\n\nimport datetime\n\nfrom .enums import PollLayoutType, try_enum\nfrom . import utils\nfrom .emoji import PartialEmoji, Emoji\nfrom .user import User\nfrom .object import Object\nfrom .errors import ClientException\n\nif TYPE_CHECKING:\n    from typing_extensions import Self\n\n    from .message import Message\n    from .abc import Snowflake\n    from .state import ConnectionState\n    from .member import Member\n\n    from .types.poll import (\n        PollCreate as PollCreatePayload,\n        PollMedia as PollMediaPayload,\n        PollAnswerCount as PollAnswerCountPayload,\n        Poll as PollPayload,\n        PollAnswerWithID as PollAnswerWithIDPayload,\n        PollResult as PollResultPayload,\n        PollAnswer as PollAnswerPayload,\n    )\n\n\n__all__ = (\n    'Poll',\n    'PollAnswer',\n    'PollMedia',\n)\n\nMISSING = utils.MISSING\nPollMediaEmoji = Union[PartialEmoji, Emoji, str]\n\n\nclass PollMedia:\n    \"\"\"Represents the poll media for a poll item.\n\n    .. versionadded:: 2.4\n\n    Attributes\n    ----------\n    text: :class:`str`\n        The displayed text.\n    emoji: Optional[Union[:class:`PartialEmoji`, :class:`Emoji`]]\n        The attached emoji for this media. This is only valid for poll answers.\n    \"\"\"\n\n    __slots__ = ('text', 'emoji')\n\n    def __init__(self, /, text: str, emoji: Optional[PollMediaEmoji] = None) -> None:\n        self.text: str = text\n        self.emoji: Optional[Union[PartialEmoji, Emoji]] = PartialEmoji.from_str(emoji) if isinstance(emoji, str) else emoji\n\n    def __repr__(self) -> str:\n        return f'<PollMedia text={self.text!r} emoji={self.emoji!r}>'\n\n    def to_dict(self) -> PollMediaPayload:\n        payload: PollMediaPayload = {'text': self.text}\n\n        if self.emoji is not None:\n            payload['emoji'] = self.emoji._to_partial().to_dict()\n\n        return payload\n\n    @classmethod\n    def from_dict(cls, *, data: PollMediaPayload) -> Self:\n        emoji = data.get('emoji')\n\n        if emoji:\n            return cls(text=data['text'], emoji=PartialEmoji.from_dict(emoji))\n        return cls(text=data['text'])\n\n\nclass PollAnswer:\n    \"\"\"Represents a poll's answer.\n\n    .. container:: operations\n\n        .. describe:: str(x)\n\n            Returns this answer's text, if any.\n\n    .. versionadded:: 2.4\n\n    Attributes\n    ----------\n    id: :class:`int`\n        The ID of this answer.\n    media: :class:`PollMedia`\n        The display data for this answer.\n    self_voted: :class:`bool`\n        Whether the current user has voted to this answer or not.\n    \"\"\"\n\n    __slots__ = ('media', 'id', '_state', '_message', '_vote_count', 'self_voted', '_poll')\n\n    def __init__(\n        self,\n        *,\n        message: Optional[Message],\n        poll: Poll,\n        data: PollAnswerWithIDPayload,\n    ) -> None:\n        self.media: PollMedia = PollMedia.from_dict(data=data['poll_media'])\n        self.id: int = int(data['answer_id'])\n        self._message: Optional[Message] = message\n        self._state: Optional[ConnectionState] = message._state if message else None\n        self._vote_count: int = 0\n        self.self_voted: bool = False\n        self._poll: Poll = poll\n\n    def _handle_vote_event(self, added: bool, self_voted: bool) -> None:\n        if added:\n            self._vote_count += 1\n        else:\n            self._vote_count -= 1\n        self.self_voted = self_voted\n\n    def _update_with_results(self, payload: PollAnswerCountPayload) -> None:\n        self._vote_count = int(payload['count'])\n        self.self_voted = payload['me_voted']\n\n    def __str__(self) -> str:\n        return self.media.text\n\n    def __repr__(self) -> str:\n        return f'<PollAnswer id={self.id} media={self.media!r}>'\n\n    @classmethod\n    def from_params(\n        cls,\n        id: int,\n        text: str,\n        emoji: Optional[PollMediaEmoji] = None,\n        *,\n        poll: Poll,\n        message: Optional[Message],\n    ) -> Self:\n        poll_media: PollMediaPayload = {'text': text}\n        if emoji is not None:\n            emoji = PartialEmoji.from_str(emoji) if isinstance(emoji, str) else emoji._to_partial()\n            emoji_data = emoji.to_dict()\n            # No need to remove animated key as it will be ignored\n            poll_media['emoji'] = emoji_data\n\n        payload: PollAnswerWithIDPayload = {'answer_id': id, 'poll_media': poll_media}\n\n        return cls(data=payload, message=message, poll=poll)\n\n    @property\n    def text(self) -> str:\n        \"\"\":class:`str`: Returns this answer's displayed text.\"\"\"\n        return self.media.text\n\n    @property\n    def emoji(self) -> Optional[Union[PartialEmoji, Emoji]]:\n        \"\"\"Optional[Union[:class:`Emoji`, :class:`PartialEmoji`]]: Returns this answer's displayed\n        emoji, if any.\n        \"\"\"\n        return self.media.emoji\n\n    @property\n    def vote_count(self) -> int:\n        \"\"\":class:`int`: Returns an approximate count of votes for this answer.\n\n        If the poll is finished, the count is exact.\n        \"\"\"\n        return self._vote_count\n\n    @property\n    def poll(self) -> Poll:\n        \"\"\":class:`Poll`: Returns the parent poll of this answer.\"\"\"\n        return self._poll\n\n    def _to_dict(self) -> PollAnswerPayload:\n        return {\n            'poll_media': self.media.to_dict(),\n        }\n\n    async def voters(\n        self, *, limit: Optional[int] = None, after: Optional[Snowflake] = None\n    ) -> AsyncIterator[Union[User, Member]]:\n        \"\"\"Returns an :term:`asynchronous iterator` representing the users that have voted on this answer.\n\n        The ``after`` parameter must represent a user\n        and meet the :class:`abc.Snowflake` abc.\n\n        This can only be called when the parent poll was sent to a message.\n\n        Examples\n        --------\n\n        Usage ::\n\n            async for voter in poll_answer.voters():\n                print(f'{voter} has voted for {poll_answer}!')\n\n        Flattening into a list: ::\n\n            voters = [voter async for voter in poll_answer.voters()]\n            # voters is now a list of User\n\n        Parameters\n        ----------\n        limit: Optional[:class:`int`]\n            The maximum number of results to return.\n            If not provided, returns all the users who\n            voted on this poll answer.\n        after: Optional[:class:`abc.Snowflake`]\n            For pagination, voters are sorted by member.\n\n        Raises\n        ------\n        HTTPException\n            Retrieving the users failed.\n\n        Yields\n        ------\n        Union[:class:`User`, :class:`Member`]\n            The member (if retrievable) or the user that has voted\n            on this poll answer. The case where it can be a :class:`Member`\n            is in a guild message context. Sometimes it can be a :class:`User`\n            if the member has left the guild or if the member is not cached.\n        \"\"\"\n\n        if not self._message or not self._state:  # Make type checker happy\n            raise ClientException('You cannot fetch users to a poll not sent with a message')\n\n        if limit is None:\n            if not self._message.poll:\n                limit = 100\n            else:\n                limit = self.vote_count or 100\n\n        while limit > 0:\n            retrieve = min(limit, 100)\n\n            message = self._message\n            guild = self._message.guild\n            state = self._state\n            after_id = after.id if after else None\n\n            data = await state.http.get_poll_answer_voters(\n                message.channel.id, message.id, self.id, after=after_id, limit=retrieve\n            )\n            users = data['users']\n\n            if len(users) == 0:\n                # No more voters to fetch, terminate loop\n                break\n\n            limit -= len(users)\n            after = Object(id=int(users[-1]['id']))\n\n            if not guild or isinstance(guild, Object):\n                for raw_user in reversed(users):\n                    yield User(state=self._state, data=raw_user)\n                continue\n\n            for raw_member in reversed(users):\n                member_id = int(raw_member['id'])\n                member = guild.get_member(member_id)\n\n                yield member or User(state=self._state, data=raw_member)\n\n\nclass Poll:\n    \"\"\"Represents a message's Poll.\n\n    .. versionadded:: 2.4\n\n    Parameters\n    ----------\n    question: Union[:class:`PollMedia`, :class:`str`]\n        The poll's displayed question. The text can be up to 300 characters.\n    duration: :class:`datetime.timedelta`\n        The duration of the poll. Duration must be in hours.\n    multiple: :class:`bool`\n        Whether users are allowed to select more than one answer.\n        Defaults to ``False``.\n    layout_type: :class:`PollLayoutType`\n        The layout type of the poll. Defaults to :attr:`PollLayoutType.default`.\n    \"\"\"\n\n    __slots__ = (\n        'multiple',\n        '_answers',\n        'duration',\n        'layout_type',\n        '_question_media',\n        '_message',\n        '_expiry',\n        '_finalized',\n        '_state',\n    )\n\n    def __init__(\n        self,\n        question: Union[PollMedia, str],\n        duration: datetime.timedelta,\n        *,\n        multiple: bool = False,\n        layout_type: PollLayoutType = PollLayoutType.default,\n    ) -> None:\n        self._question_media: PollMedia = PollMedia(text=question, emoji=None) if isinstance(question, str) else question\n        self._answers: Dict[int, PollAnswer] = {}\n        self.duration: datetime.timedelta = duration\n\n        self.multiple: bool = multiple\n        self.layout_type: PollLayoutType = layout_type\n\n        # NOTE: These attributes are set manually when calling\n        # _from_data, so it should be ``None`` now.\n        self._message: Optional[Message] = None\n        self._state: Optional[ConnectionState] = None\n        self._finalized: bool = False\n        self._expiry: Optional[datetime.datetime] = None\n\n    def _update(self, message: Message) -> None:\n        self._state = message._state\n        self._message = message\n\n        if not message.poll:\n            return\n\n        # The message's poll contains the more up to date data.\n        self._expiry = message.poll.expires_at\n        self._finalized = message.poll._finalized\n\n    def _update_results(self, data: PollResultPayload) -> None:\n        self._finalized = data['is_finalized']\n\n        for count in data['answer_counts']:\n            answer = self.get_answer(int(count['id']))\n            if not answer:\n                continue\n\n            answer._update_with_results(count)\n\n    def _handle_vote(self, answer_id: int, added: bool, self_voted: bool = False):\n        answer = self.get_answer(answer_id)\n        if not answer:\n            return\n\n        answer._handle_vote_event(added, self_voted)\n\n    @classmethod\n    def _from_data(cls, *, data: PollPayload, message: Message, state: ConnectionState) -> Self:\n        multiselect = data.get('allow_multiselect', False)\n        layout_type = try_enum(PollLayoutType, data.get('layout_type', 1))\n        question_data = data.get('question')\n        question = question_data.get('text')\n        expiry = utils.parse_time(data['expiry'])  # If obtained via API, then expiry is set.\n        duration = expiry - message.created_at\n        # self.created_at = message.created_at\n        # duration = self.created_at - expiry\n\n        self = cls(\n            duration=duration,\n            multiple=multiselect,\n            layout_type=layout_type,\n            question=question,\n        )\n        self._answers = {\n            int(answer['answer_id']): PollAnswer(data=answer, message=message, poll=self) for answer in data['answers']\n        }\n        self._message = message\n        self._state = state\n        self._expiry = expiry\n\n        try:\n            self._update_results(data['results'])\n        except KeyError:\n            pass\n\n        return self\n\n    def _to_dict(self) -> PollCreatePayload:\n        data: PollCreatePayload = {\n            'allow_multiselect': self.multiple,\n            'question': self._question_media.to_dict(),\n            'duration': self.duration.total_seconds() / 3600,\n            'layout_type': self.layout_type.value,\n            'answers': [answer._to_dict() for answer in self.answers],\n        }\n        return data\n\n    def __repr__(self) -> str:\n        return f\"<Poll duration={self.duration} question=\\\"{self.question}\\\" answers={self.answers}>\"\n\n    @property\n    def question(self) -> str:\n        \"\"\":class:`str`: Returns this poll's question string.\"\"\"\n        return self._question_media.text\n\n    @property\n    def answers(self) -> List[PollAnswer]:\n        \"\"\"List[:class:`PollAnswer`]: Returns a read-only copy of the answers.\"\"\"\n        return list(self._answers.values())\n\n    @property\n    def expires_at(self) -> Optional[datetime.datetime]:\n        \"\"\"Optional[:class:`datetime.datetime`]: A datetime object representing the poll expiry.\n\n        .. note::\n\n            This will **always** be ``None`` for stateless polls.\n        \"\"\"\n        return self._expiry\n\n    @property\n    def created_at(self) -> Optional[datetime.datetime]:\n        \"\"\"Optional[:class:`datetime.datetime`]: Returns the poll's creation time.\n\n        .. note::\n\n            This will **always** be ``None`` for stateless polls.\n        \"\"\"\n\n        if not self._message:\n            return\n        return self._message.created_at\n\n    @property\n    def message(self) -> Optional[Message]:\n        \"\"\":class:`Message`: The message this poll is from.\"\"\"\n        return self._message\n\n    @property\n    def total_votes(self) -> int:\n        \"\"\":class:`int`: Returns the sum of all the answer votes.\"\"\"\n        return sum([answer.vote_count for answer in self.answers])\n\n    def is_finalised(self) -> bool:\n        \"\"\":class:`bool`: Returns whether the poll has finalised.\n\n        This always returns ``False`` for stateless polls.\n        \"\"\"\n        return self._finalized\n\n    is_finalized = is_finalised\n\n    def copy(self) -> Self:\n        \"\"\"Returns a stateless copy of this poll.\n\n        This is meant to be used when you want to edit a stateful poll.\n\n        Returns\n        -------\n        :class:`Poll`\n            The copy of the poll.\n        \"\"\"\n\n        new = self.__class__(question=self.question, duration=self.duration)\n\n        # We want to return a stateless copy of the poll, so we should not\n        # override new._answers as our answers may contain a state\n        for answer in self.answers:\n            new.add_answer(text=answer.text, emoji=answer.emoji)\n\n        return new\n\n    def add_answer(\n        self,\n        *,\n        text: str,\n        emoji: Optional[Union[PartialEmoji, Emoji, str]] = None,\n    ) -> Self:\n        \"\"\"Appends a new answer to this poll.\n\n        Parameters\n        ----------\n        text: :class:`str`\n            The text label for this poll answer. Can be up to 55\n            characters.\n        emoji: Union[:class:`PartialEmoji`, :class:`Emoji`, :class:`str`]\n            The emoji to display along the text.\n\n        Raises\n        ------\n        ClientException\n            Cannot append answers to a poll that is active.\n\n        Returns\n        -------\n        :class:`Poll`\n            This poll with the new answer appended. This allows fluent-style chaining.\n        \"\"\"\n\n        if self._message:\n            raise ClientException('Cannot append answers to a poll that is active')\n\n        answer = PollAnswer.from_params(id=len(self.answers) + 1, text=text, emoji=emoji, message=self._message, poll=self)\n        self._answers[answer.id] = answer\n        return self\n\n    def get_answer(\n        self,\n        /,\n        id: int,\n    ) -> Optional[PollAnswer]:\n        \"\"\"Returns the answer with the provided ID or ``None`` if not found.\n\n        Parameters\n        ----------\n        id: :class:`int`\n            The ID of the answer to get.\n\n        Returns\n        -------\n        Optional[:class:`PollAnswer`]\n            The answer.\n        \"\"\"\n\n        return self._answers.get(id)\n\n    async def end(self) -> Self:\n        \"\"\"|coro|\n\n        Ends the poll.\n\n        Raises\n        ------\n        ClientException\n            This poll has no attached message.\n        HTTPException\n            Ending the poll failed.\n\n        Returns\n        -------\n        :class:`Poll`\n            The updated poll.\n        \"\"\"\n\n        if not self._message or not self._state:  # Make type checker happy\n            raise ClientException('This poll has no attached message.')\n\n        self._message = await self._message.end_poll()\n\n        return self\n"
  },
  {
    "path": "discord/py.typed",
    "content": ""
  },
  {
    "path": "discord/raw_models.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom __future__ import annotations\n\nimport datetime\nfrom typing import TYPE_CHECKING, Literal, Optional, Set, List, Tuple, Union\n\nfrom .enums import ChannelType, try_enum, ReactionType\nfrom .utils import _get_as_snowflake\nfrom .app_commands import AppCommandPermissions\nfrom .colour import Colour\n\nif TYPE_CHECKING:\n    from typing_extensions import Self\n\n    from .types.gateway import (\n        MessageDeleteEvent,\n        MessageDeleteBulkEvent as BulkMessageDeleteEvent,\n        MessageReactionAddEvent,\n        MessageReactionRemoveEvent,\n        MessageReactionRemoveAllEvent as ReactionClearEvent,\n        MessageReactionRemoveEmojiEvent as ReactionClearEmojiEvent,\n        MessageUpdateEvent,\n        IntegrationDeleteEvent,\n        ThreadUpdateEvent,\n        ThreadDeleteEvent,\n        ThreadMembersUpdate,\n        TypingStartEvent,\n        GuildMemberRemoveEvent,\n        PollVoteActionEvent,\n    )\n    from .types.command import GuildApplicationCommandPermissions\n    from .message import Message\n    from .partial_emoji import PartialEmoji\n    from .member import Member\n    from .threads import Thread\n    from .user import User\n    from .state import ConnectionState\n    from .guild import Guild\n\n    ReactionActionEvent = Union[MessageReactionAddEvent, MessageReactionRemoveEvent]\n    ReactionActionType = Literal['REACTION_ADD', 'REACTION_REMOVE']\n\n\n__all__ = (\n    'RawMessageDeleteEvent',\n    'RawBulkMessageDeleteEvent',\n    'RawMessageUpdateEvent',\n    'RawReactionActionEvent',\n    'RawReactionClearEvent',\n    'RawReactionClearEmojiEvent',\n    'RawIntegrationDeleteEvent',\n    'RawThreadUpdateEvent',\n    'RawThreadDeleteEvent',\n    'RawThreadMembersUpdate',\n    'RawTypingEvent',\n    'RawMemberRemoveEvent',\n    'RawAppCommandPermissionsUpdateEvent',\n    'RawPollVoteActionEvent',\n)\n\n\nclass _RawReprMixin:\n    __slots__: Tuple[str, ...] = ()\n\n    def __repr__(self) -> str:\n        value = ' '.join(f'{attr}={getattr(self, attr)!r}' for attr in self.__slots__)\n        return f'<{self.__class__.__name__} {value}>'\n\n\nclass RawMessageDeleteEvent(_RawReprMixin):\n    \"\"\"Represents the event payload for a :func:`on_raw_message_delete` event.\n\n    Attributes\n    ------------\n    channel_id: :class:`int`\n        The channel ID where the deletion took place.\n    guild_id: Optional[:class:`int`]\n        The guild ID where the deletion took place, if applicable.\n    message_id: :class:`int`\n        The message ID that got deleted.\n    cached_message: Optional[:class:`Message`]\n        The cached message, if found in the internal message cache.\n    \"\"\"\n\n    __slots__ = ('message_id', 'channel_id', 'guild_id', 'cached_message')\n\n    def __init__(self, data: MessageDeleteEvent) -> None:\n        self.message_id: int = int(data['id'])\n        self.channel_id: int = int(data['channel_id'])\n        self.cached_message: Optional[Message] = None\n        try:\n            self.guild_id: Optional[int] = int(data['guild_id'])\n        except KeyError:\n            self.guild_id: Optional[int] = None\n\n\nclass RawBulkMessageDeleteEvent(_RawReprMixin):\n    \"\"\"Represents the event payload for a :func:`on_raw_bulk_message_delete` event.\n\n    Attributes\n    -----------\n    message_ids: Set[:class:`int`]\n        A :class:`set` of the message IDs that were deleted.\n    channel_id: :class:`int`\n        The channel ID where the message got deleted.\n    guild_id: Optional[:class:`int`]\n        The guild ID where the message got deleted, if applicable.\n    cached_messages: List[:class:`Message`]\n        The cached messages, if found in the internal message cache.\n    \"\"\"\n\n    __slots__ = ('message_ids', 'channel_id', 'guild_id', 'cached_messages')\n\n    def __init__(self, data: BulkMessageDeleteEvent) -> None:\n        self.message_ids: Set[int] = {int(x) for x in data.get('ids', [])}\n        self.channel_id: int = int(data['channel_id'])\n        self.cached_messages: List[Message] = []\n\n        try:\n            self.guild_id: Optional[int] = int(data['guild_id'])\n        except KeyError:\n            self.guild_id: Optional[int] = None\n\n\nclass RawMessageUpdateEvent(_RawReprMixin):\n    \"\"\"Represents the payload for a :func:`on_raw_message_edit` event.\n\n    Attributes\n    -----------\n    message_id: :class:`int`\n        The message ID that got updated.\n    channel_id: :class:`int`\n        The channel ID where the update took place.\n\n        .. versionadded:: 1.3\n    guild_id: Optional[:class:`int`]\n        The guild ID where the message got updated, if applicable.\n\n        .. versionadded:: 1.7\n\n    data: :class:`dict`\n        The raw data given by the :ddocs:`gateway <topics/gateway-events#message-update>`\n    cached_message: Optional[:class:`Message`]\n        The cached message, if found in the internal message cache. Represents the message before\n        it is modified by the data in :attr:`RawMessageUpdateEvent.data`.\n    \"\"\"\n\n    __slots__ = ('message_id', 'channel_id', 'guild_id', 'data', 'cached_message')\n\n    def __init__(self, data: MessageUpdateEvent) -> None:\n        self.message_id: int = int(data['id'])\n        self.channel_id: int = int(data['channel_id'])\n        self.data: MessageUpdateEvent = data\n        self.cached_message: Optional[Message] = None\n\n        try:\n            self.guild_id: Optional[int] = int(data['guild_id'])\n        except KeyError:\n            self.guild_id: Optional[int] = None\n\n\nclass RawReactionActionEvent(_RawReprMixin):\n    \"\"\"Represents the payload for a :func:`on_raw_reaction_add` or\n    :func:`on_raw_reaction_remove` event.\n\n    Attributes\n    -----------\n    message_id: :class:`int`\n        The message ID that got or lost a reaction.\n    user_id: :class:`int`\n        The user ID who added the reaction or whose reaction was removed.\n    channel_id: :class:`int`\n        The channel ID where the reaction got added or removed.\n    guild_id: Optional[:class:`int`]\n        The guild ID where the reaction got added or removed, if applicable.\n    emoji: :class:`PartialEmoji`\n        The custom or unicode emoji being used.\n    member: Optional[:class:`Member`]\n        The member who added the reaction. Only available if ``event_type`` is ``REACTION_ADD`` and the reaction is inside a guild.\n\n        .. versionadded:: 1.3\n    message_author_id: Optional[:class:`int`]\n        The author ID of the message being reacted to. Only available if ``event_type`` is ``REACTION_ADD``.\n\n        .. versionadded:: 2.4\n    event_type: :class:`str`\n        The event type that triggered this action. Can be\n        ``REACTION_ADD`` for reaction addition or\n        ``REACTION_REMOVE`` for reaction removal.\n\n        .. versionadded:: 1.3\n    burst: :class:`bool`\n        Whether the reaction was a burst reaction, also known as a \"super reaction\".\n\n        .. versionadded:: 2.4\n    burst_colours: List[:class:`Colour`]\n        A list of colours used for burst reaction animation. Only available if ``burst`` is ``True``\n        and if ``event_type`` is ``REACTION_ADD``.\n\n        .. versionadded:: 2.0\n    type: :class:`ReactionType`\n        The type of the reaction.\n\n        .. versionadded:: 2.4\n    \"\"\"\n\n    __slots__ = (\n        'message_id',\n        'user_id',\n        'channel_id',\n        'guild_id',\n        'emoji',\n        'event_type',\n        'member',\n        'message_author_id',\n        'burst',\n        'burst_colours',\n        'type',\n    )\n\n    def __init__(self, data: ReactionActionEvent, emoji: PartialEmoji, event_type: ReactionActionType) -> None:\n        self.message_id: int = int(data['message_id'])\n        self.channel_id: int = int(data['channel_id'])\n        self.user_id: int = int(data['user_id'])\n        self.emoji: PartialEmoji = emoji\n        self.event_type: ReactionActionType = event_type\n        self.member: Optional[Member] = None\n        self.message_author_id: Optional[int] = _get_as_snowflake(data, 'message_author_id')\n        self.burst: bool = data.get('burst', False)\n        self.burst_colours: List[Colour] = [Colour.from_str(c) for c in data.get('burst_colours', [])]\n        self.type: ReactionType = try_enum(ReactionType, data['type'])\n\n        try:\n            self.guild_id: Optional[int] = int(data['guild_id'])\n        except KeyError:\n            self.guild_id: Optional[int] = None\n\n    @property\n    def burst_colors(self) -> List[Colour]:\n        \"\"\"An alias of :attr:`burst_colours`.\n\n        .. versionadded:: 2.4\n        \"\"\"\n        return self.burst_colours\n\n\nclass RawReactionClearEvent(_RawReprMixin):\n    \"\"\"Represents the payload for a :func:`on_raw_reaction_clear` event.\n\n    Attributes\n    -----------\n    message_id: :class:`int`\n        The message ID that got its reactions cleared.\n    channel_id: :class:`int`\n        The channel ID where the reactions got cleared.\n    guild_id: Optional[:class:`int`]\n        The guild ID where the reactions got cleared.\n    \"\"\"\n\n    __slots__ = ('message_id', 'channel_id', 'guild_id')\n\n    def __init__(self, data: ReactionClearEvent) -> None:\n        self.message_id: int = int(data['message_id'])\n        self.channel_id: int = int(data['channel_id'])\n\n        try:\n            self.guild_id: Optional[int] = int(data['guild_id'])\n        except KeyError:\n            self.guild_id: Optional[int] = None\n\n\nclass RawReactionClearEmojiEvent(_RawReprMixin):\n    \"\"\"Represents the payload for a :func:`on_raw_reaction_clear_emoji` event.\n\n    .. versionadded:: 1.3\n\n    Attributes\n    -----------\n    message_id: :class:`int`\n        The message ID that got its reactions cleared.\n    channel_id: :class:`int`\n        The channel ID where the reactions got cleared.\n    guild_id: Optional[:class:`int`]\n        The guild ID where the reactions got cleared.\n    emoji: :class:`PartialEmoji`\n        The custom or unicode emoji being removed.\n    \"\"\"\n\n    __slots__ = ('message_id', 'channel_id', 'guild_id', 'emoji')\n\n    def __init__(self, data: ReactionClearEmojiEvent, emoji: PartialEmoji) -> None:\n        self.emoji: PartialEmoji = emoji\n        self.message_id: int = int(data['message_id'])\n        self.channel_id: int = int(data['channel_id'])\n\n        try:\n            self.guild_id: Optional[int] = int(data['guild_id'])\n        except KeyError:\n            self.guild_id: Optional[int] = None\n\n\nclass RawIntegrationDeleteEvent(_RawReprMixin):\n    \"\"\"Represents the payload for a :func:`on_raw_integration_delete` event.\n\n    .. versionadded:: 2.0\n\n    Attributes\n    -----------\n    integration_id: :class:`int`\n        The ID of the integration that got deleted.\n    application_id: Optional[:class:`int`]\n        The ID of the bot/OAuth2 application for this deleted integration.\n    guild_id: :class:`int`\n        The guild ID where the integration got deleted.\n    \"\"\"\n\n    __slots__ = ('integration_id', 'application_id', 'guild_id')\n\n    def __init__(self, data: IntegrationDeleteEvent) -> None:\n        self.integration_id: int = int(data['id'])\n        self.guild_id: int = int(data['guild_id'])\n\n        try:\n            self.application_id: Optional[int] = int(data['application_id'])\n        except KeyError:\n            self.application_id: Optional[int] = None\n\n\nclass RawThreadUpdateEvent(_RawReprMixin):\n    \"\"\"Represents the payload for a :func:`on_raw_thread_update` event.\n\n    .. versionadded:: 2.0\n\n    Attributes\n    ----------\n    thread_id: :class:`int`\n        The ID of the thread that was updated.\n    thread_type: :class:`discord.ChannelType`\n        The channel type of the updated thread.\n    guild_id: :class:`int`\n        The ID of the guild the thread is in.\n    parent_id: :class:`int`\n        The ID of the channel the thread belongs to.\n    data: :class:`dict`\n        The raw data given by the :ddocs:`gateway <topics/gateway-events#thread-update>`\n    thread: Optional[:class:`discord.Thread`]\n        The thread, if it could be found in the internal cache.\n    \"\"\"\n\n    __slots__ = ('thread_id', 'thread_type', 'parent_id', 'guild_id', 'data', 'thread')\n\n    def __init__(self, data: ThreadUpdateEvent) -> None:\n        self.thread_id: int = int(data['id'])\n        self.thread_type: ChannelType = try_enum(ChannelType, data['type'])\n        self.guild_id: int = int(data['guild_id'])\n        self.parent_id: int = int(data['parent_id'])\n        self.data: ThreadUpdateEvent = data\n        self.thread: Optional[Thread] = None\n\n\nclass RawThreadDeleteEvent(_RawReprMixin):\n    \"\"\"Represents the payload for a :func:`on_raw_thread_delete` event.\n\n    .. versionadded:: 2.0\n\n    Attributes\n    ----------\n    thread_id: :class:`int`\n        The ID of the thread that was deleted.\n    thread_type: :class:`discord.ChannelType`\n        The channel type of the deleted thread.\n    guild_id: :class:`int`\n        The ID of the guild the thread was deleted in.\n    parent_id: :class:`int`\n        The ID of the channel the thread belonged to.\n    thread: Optional[:class:`discord.Thread`]\n        The thread, if it could be found in the internal cache.\n    \"\"\"\n\n    __slots__ = ('thread_id', 'thread_type', 'parent_id', 'guild_id', 'thread')\n\n    def __init__(self, data: ThreadDeleteEvent) -> None:\n        self.thread_id: int = int(data['id'])\n        self.thread_type: ChannelType = try_enum(ChannelType, data['type'])\n        self.guild_id: int = int(data['guild_id'])\n        self.parent_id: int = int(data['parent_id'])\n        self.thread: Optional[Thread] = None\n\n    @classmethod\n    def _from_thread(cls, thread: Thread) -> Self:\n        data: ThreadDeleteEvent = {\n            'id': thread.id,\n            'type': thread.type.value,\n            'guild_id': thread.guild.id,\n            'parent_id': thread.parent_id,\n        }\n\n        instance = cls(data)\n        instance.thread = thread\n\n        return instance\n\n\nclass RawThreadMembersUpdate(_RawReprMixin):\n    \"\"\"Represents the payload for a :func:`on_raw_thread_member_remove` event.\n\n    .. versionadded:: 2.0\n\n    Attributes\n    ----------\n    thread_id: :class:`int`\n        The ID of the thread that was updated.\n    guild_id: :class:`int`\n        The ID of the guild the thread is in.\n    member_count: :class:`int`\n        The approximate number of members in the thread. This caps at 50.\n    data: :class:`dict`\n        The raw data given by the :ddocs:`gateway <topics/gateway-events#thread-members-update>`.\n    \"\"\"\n\n    __slots__ = ('thread_id', 'guild_id', 'member_count', 'data')\n\n    def __init__(self, data: ThreadMembersUpdate) -> None:\n        self.thread_id: int = int(data['id'])\n        self.guild_id: int = int(data['guild_id'])\n        self.member_count: int = int(data['member_count'])\n        self.data: ThreadMembersUpdate = data\n\n\nclass RawTypingEvent(_RawReprMixin):\n    \"\"\"Represents the payload for a :func:`on_raw_typing` event.\n\n    .. versionadded:: 2.0\n\n    Attributes\n    ----------\n    channel_id: :class:`int`\n        The ID of the channel the user started typing in.\n    user_id: :class:`int`\n        The ID of the user that started typing.\n    user: Optional[Union[:class:`discord.User`, :class:`discord.Member`]]\n        The user that started typing, if they could be found in the internal cache.\n    timestamp: :class:`datetime.datetime`\n        When the typing started as an aware datetime in UTC.\n    guild_id: Optional[:class:`int`]\n        The ID of the guild the user started typing in, if applicable.\n    \"\"\"\n\n    __slots__ = ('channel_id', 'user_id', 'user', 'timestamp', 'guild_id')\n\n    def __init__(self, data: TypingStartEvent, /) -> None:\n        self.channel_id: int = int(data['channel_id'])\n        self.user_id: int = int(data['user_id'])\n        self.user: Optional[Union[User, Member]] = None\n        self.timestamp: datetime.datetime = datetime.datetime.fromtimestamp(data['timestamp'], tz=datetime.timezone.utc)\n        self.guild_id: Optional[int] = _get_as_snowflake(data, 'guild_id')\n\n\nclass RawMemberRemoveEvent(_RawReprMixin):\n    \"\"\"Represents the payload for a :func:`on_raw_member_remove` event.\n\n    .. versionadded:: 2.0\n\n    Attributes\n    ----------\n    user: Union[:class:`discord.User`, :class:`discord.Member`]\n        The user that left the guild.\n    guild_id: :class:`int`\n        The ID of the guild the user left.\n    \"\"\"\n\n    __slots__ = ('user', 'guild_id')\n\n    def __init__(self, data: GuildMemberRemoveEvent, user: User, /) -> None:\n        self.user: Union[User, Member] = user\n        self.guild_id: int = int(data['guild_id'])\n\n\nclass RawAppCommandPermissionsUpdateEvent(_RawReprMixin):\n    \"\"\"Represents the payload for a :func:`on_raw_app_command_permissions_update` event.\n\n    .. versionadded:: 2.0\n\n    Attributes\n    ----------\n    target_id: :class:`int`\n        The ID of the command or application whose permissions were updated.\n        When this is the application ID instead of a command ID, the permissions\n        apply to all commands that do not contain explicit overwrites.\n    application_id: :class:`int`\n        The ID of the application that the command belongs to.\n    guild: :class:`~discord.Guild`\n        The guild where the permissions were updated.\n    permissions: List[:class:`~discord.app_commands.AppCommandPermissions`]\n        List of new permissions for the app command.\n    \"\"\"\n\n    __slots__ = ('target_id', 'application_id', 'guild', 'permissions')\n\n    def __init__(self, *, data: GuildApplicationCommandPermissions, state: ConnectionState):\n        self.target_id: int = int(data['id'])\n        self.application_id: int = int(data['application_id'])\n        self.guild: Guild = state._get_or_create_unavailable_guild(int(data['guild_id']))\n        self.permissions: List[AppCommandPermissions] = [\n            AppCommandPermissions(data=perm, guild=self.guild, state=state) for perm in data['permissions']\n        ]\n\n\nclass RawPollVoteActionEvent(_RawReprMixin):\n    \"\"\"Represents the payload for a :func:`on_raw_poll_vote_add` or :func:`on_raw_poll_vote_remove`\n    event.\n\n    .. versionadded:: 2.4\n\n    Attributes\n    ----------\n    user_id: :class:`int`\n        The ID of the user that added or removed a vote.\n    channel_id: :class:`int`\n        The channel ID where the poll vote action took place.\n    message_id: :class:`int`\n        The message ID that contains the poll the user added or removed their vote on.\n    guild_id: Optional[:class:`int`]\n        The guild ID where the vote got added or removed, if applicable..\n    answer_id: :class:`int`\n        The poll answer's ID the user voted on.\n    \"\"\"\n\n    __slots__ = ('user_id', 'channel_id', 'message_id', 'guild_id', 'answer_id')\n\n    def __init__(self, data: PollVoteActionEvent) -> None:\n        self.user_id: int = int(data['user_id'])\n        self.channel_id: int = int(data['channel_id'])\n        self.message_id: int = int(data['message_id'])\n        self.guild_id: Optional[int] = _get_as_snowflake(data, 'guild_id')\n        self.answer_id: int = int(data['answer_id'])\n"
  },
  {
    "path": "discord/reaction.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom __future__ import annotations\nfrom typing import TYPE_CHECKING, AsyncIterator, Union, Optional\n\nfrom .user import User\nfrom .object import Object\nfrom .enums import ReactionType\n\n# fmt: off\n__all__ = (\n    'Reaction',\n)\n# fmt: on\n\nif TYPE_CHECKING:\n    from .member import Member\n    from .types.message import Reaction as ReactionPayload\n    from .message import Message\n    from .partial_emoji import PartialEmoji\n    from .emoji import Emoji\n    from .abc import Snowflake\n\n\nclass Reaction:\n    \"\"\"Represents a reaction to a message.\n\n    Depending on the way this object was created, some of the attributes can\n    have a value of ``None``.\n\n    .. container:: operations\n\n        .. describe:: x == y\n\n            Checks if two reactions are equal. This works by checking if the emoji\n            is the same. So two messages with the same reaction will be considered\n            \"equal\".\n\n        .. describe:: x != y\n\n            Checks if two reactions are not equal.\n\n        .. describe:: hash(x)\n\n            Returns the reaction's hash.\n\n        .. describe:: str(x)\n\n            Returns the string form of the reaction's emoji.\n\n    Attributes\n    -----------\n    emoji: Union[:class:`Emoji`, :class:`PartialEmoji`, :class:`str`]\n        The reaction emoji. May be a custom emoji, or a unicode emoji.\n    count: :class:`int`\n        Number of times this reaction was made. This is a sum of :attr:`normal_count` and :attr:`burst_count`.\n    me: :class:`bool`\n        If the user sent this reaction.\n    message: :class:`Message`\n        Message this reaction is for.\n    me_burst: :class:`bool`\n        If the user sent this super reaction.\n\n        .. versionadded:: 2.4\n    normal_count: :class:`int`\n        The number of times this reaction was made using normal reactions.\n        This is not available in the gateway events such as :func:`on_reaction_add`\n        or :func:`on_reaction_remove`.\n\n        .. versionadded:: 2.4\n    burst_count: :class:`int`\n        The number of times this reaction was made using super reactions.\n        This is not available in the gateway events such as :func:`on_reaction_add`\n        or :func:`on_reaction_remove`.\n\n        .. versionadded:: 2.4\n    \"\"\"\n\n    __slots__ = ('message', 'count', 'emoji', 'me', 'me_burst', 'normal_count', 'burst_count')\n\n    def __init__(self, *, message: Message, data: ReactionPayload, emoji: Optional[Union[PartialEmoji, Emoji, str]] = None):\n        self.message: Message = message\n        self.emoji: Union[PartialEmoji, Emoji, str] = emoji or message._state.get_reaction_emoji(data['emoji'])\n        self.count: int = data.get('count', 1)\n        self.me: bool = data['me']\n        details = data.get('count_details', {})\n        self.normal_count: int = details.get('normal', 0)\n        self.burst_count: int = details.get('burst', 0)\n        self.me_burst: bool = data.get('me_burst', False)\n\n    def is_custom_emoji(self) -> bool:\n        \"\"\":class:`bool`: If this is a custom emoji.\"\"\"\n        return not isinstance(self.emoji, str)\n\n    def __eq__(self, other: object) -> bool:\n        return isinstance(other, self.__class__) and other.emoji == self.emoji\n\n    def __ne__(self, other: object) -> bool:\n        if isinstance(other, self.__class__):\n            return other.emoji != self.emoji\n        return True\n\n    def __hash__(self) -> int:\n        return hash(self.emoji)\n\n    def __str__(self) -> str:\n        return str(self.emoji)\n\n    def __repr__(self) -> str:\n        return f'<Reaction emoji={self.emoji!r} me={self.me} count={self.count}>'\n\n    async def remove(self, user: Snowflake) -> None:\n        \"\"\"|coro|\n\n        Remove the reaction by the provided :class:`User` from the message.\n\n        If the reaction is not your own (i.e. ``user`` parameter is not you) then\n        :attr:`~Permissions.manage_messages` is needed.\n\n        The ``user`` parameter must represent a user or member and meet\n        the :class:`abc.Snowflake` abc.\n\n        Parameters\n        -----------\n        user: :class:`abc.Snowflake`\n             The user or member from which to remove the reaction.\n\n        Raises\n        -------\n        HTTPException\n            Removing the reaction failed.\n        Forbidden\n            You do not have the proper permissions to remove the reaction.\n        NotFound\n            The user you specified, or the reaction's message was not found.\n        \"\"\"\n\n        await self.message.remove_reaction(self.emoji, user)\n\n    async def clear(self) -> None:\n        \"\"\"|coro|\n\n        Clears this reaction from the message.\n\n        You must have :attr:`~Permissions.manage_messages` to do this.\n\n        .. versionadded:: 1.3\n\n        .. versionchanged:: 2.0\n            This function will now raise :exc:`ValueError` instead of\n            ``InvalidArgument``.\n\n        Raises\n        --------\n        HTTPException\n            Clearing the reaction failed.\n        Forbidden\n            You do not have the proper permissions to clear the reaction.\n        NotFound\n            The emoji you specified was not found.\n        TypeError\n            The emoji parameter is invalid.\n        \"\"\"\n        await self.message.clear_reaction(self.emoji)\n\n    async def users(\n        self, *, limit: Optional[int] = None, after: Optional[Snowflake] = None, type: Optional[ReactionType] = None\n    ) -> AsyncIterator[Union[Member, User]]:\n        \"\"\"Returns an :term:`asynchronous iterator` representing the users that have reacted to the message.\n\n        The ``after`` parameter must represent a member\n        and meet the :class:`abc.Snowflake` abc.\n\n        .. versionchanged:: 2.0\n\n            ``limit`` and ``after`` parameters are now keyword-only.\n\n        Examples\n        ---------\n\n        Usage ::\n\n            # I do not actually recommend doing this.\n            async for user in reaction.users():\n                await channel.send(f'{user} has reacted with {reaction.emoji}!')\n\n        Flattening into a list: ::\n\n            users = [user async for user in reaction.users()]\n            # users is now a list of User...\n            winner = random.choice(users)\n            await channel.send(f'{winner} has won the raffle.')\n\n        Parameters\n        ------------\n        limit: Optional[:class:`int`]\n            The maximum number of results to return.\n            If not provided, returns all the users who\n            reacted to the message.\n        after: Optional[:class:`abc.Snowflake`]\n            For pagination, reactions are sorted by member.\n        type: Optional[:class:`ReactionType`]\n            The type of reaction to return users from.\n            If not provided, Discord only returns users of reactions with type ``normal``.\n\n            .. versionadded:: 2.4\n\n        Raises\n        --------\n        HTTPException\n            Getting the users for the reaction failed.\n\n        Yields\n        --------\n        Union[:class:`User`, :class:`Member`]\n            The member (if retrievable) or the user that has reacted\n            to this message. The case where it can be a :class:`Member` is\n            in a guild message context. Sometimes it can be a :class:`User`\n            if the member has left the guild.\n        \"\"\"\n\n        if not isinstance(self.emoji, str):\n            emoji = f'{self.emoji.name}:{self.emoji.id}'\n        else:\n            emoji = self.emoji\n\n        if limit is None:\n            limit = self.count\n\n        while limit > 0:\n            retrieve = min(limit, 100)\n\n            message = self.message\n            guild = message.guild\n            state = message._state\n            after_id = after.id if after else None\n\n            data = await state.http.get_reaction_users(\n                message.channel.id,\n                message.id,\n                emoji,\n                retrieve,\n                after=after_id,\n                type=type.value if type is not None else None,\n            )\n\n            if data:\n                limit -= len(data)\n                after = Object(id=int(data[-1]['id']))\n            else:\n                # Terminate loop if we received no data\n                limit = 0\n\n            if guild is None or isinstance(guild, Object):\n                for raw_user in reversed(data):\n                    yield User(state=state, data=raw_user)\n\n                continue\n\n            for raw_user in reversed(data):\n                member_id = int(raw_user['id'])\n                member = guild.get_member(member_id)\n\n                yield member or User(state=state, data=raw_user)\n"
  },
  {
    "path": "discord/role.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom __future__ import annotations\nfrom typing import Any, Dict, List, Optional, Union, TYPE_CHECKING\n\nfrom .asset import Asset\nfrom .permissions import Permissions\nfrom .colour import Colour\nfrom .mixins import Hashable\nfrom .utils import snowflake_time, _bytes_to_base64_data, _get_as_snowflake, MISSING\nfrom .flags import RoleFlags\n\n__all__ = (\n    'RoleTags',\n    'Role',\n)\n\nif TYPE_CHECKING:\n    import datetime\n    from .types.role import (\n        Role as RolePayload,\n        RoleTags as RoleTagPayload,\n    )\n    from .types.guild import RolePositionUpdate\n    from .guild import Guild\n    from .member import Member\n    from .state import ConnectionState\n\n\nclass RoleTags:\n    \"\"\"Represents tags on a role.\n\n    A role tag is a piece of extra information attached to a managed role\n    that gives it context for the reason the role is managed.\n\n    While this can be accessed, a useful interface is also provided in the\n    :class:`Role` and :class:`Guild` classes as well.\n\n    .. versionadded:: 1.6\n\n    Attributes\n    ------------\n    bot_id: Optional[:class:`int`]\n        The bot's user ID that manages this role.\n    integration_id: Optional[:class:`int`]\n        The integration ID that manages the role.\n    subscription_listing_id: Optional[:class:`int`]\n        The ID of this role's subscription SKU and listing.\n\n        .. versionadded:: 2.2\n    \"\"\"\n\n    __slots__ = (\n        'bot_id',\n        'integration_id',\n        '_premium_subscriber',\n        '_available_for_purchase',\n        'subscription_listing_id',\n        '_guild_connections',\n    )\n\n    def __init__(self, data: RoleTagPayload):\n        self.bot_id: Optional[int] = _get_as_snowflake(data, 'bot_id')\n        self.integration_id: Optional[int] = _get_as_snowflake(data, 'integration_id')\n        self.subscription_listing_id: Optional[int] = _get_as_snowflake(data, 'subscription_listing_id')\n\n        # NOTE: The API returns \"null\" for this if it's valid, which corresponds to None.\n        # This is different from other fields where \"null\" means \"not there\".\n        # So in this case, a value of None is the same as True.\n        # Which means we would need a different sentinel.\n        self._premium_subscriber: bool = data.get('premium_subscriber', MISSING) is None\n        self._available_for_purchase: bool = data.get('available_for_purchase', MISSING) is None\n        self._guild_connections: bool = data.get('guild_connections', MISSING) is None\n\n    def is_bot_managed(self) -> bool:\n        \"\"\":class:`bool`: Whether the role is associated with a bot.\"\"\"\n        return self.bot_id is not None\n\n    def is_premium_subscriber(self) -> bool:\n        \"\"\":class:`bool`: Whether the role is the premium subscriber, AKA \"boost\", role for the guild.\"\"\"\n        return self._premium_subscriber\n\n    def is_integration(self) -> bool:\n        \"\"\":class:`bool`: Whether the role is managed by an integration.\"\"\"\n        return self.integration_id is not None\n\n    def is_available_for_purchase(self) -> bool:\n        \"\"\":class:`bool`: Whether the role is available for purchase.\n\n        .. versionadded:: 2.2\n        \"\"\"\n        return self._available_for_purchase\n\n    def is_guild_connection(self) -> bool:\n        \"\"\":class:`bool`: Whether the role is a guild's linked role.\n\n        .. versionadded:: 2.2\n        \"\"\"\n        return self._guild_connections\n\n    def __repr__(self) -> str:\n        return (\n            f'<RoleTags bot_id={self.bot_id} integration_id={self.integration_id} '\n            f'premium_subscriber={self.is_premium_subscriber()}>'\n        )\n\n\nclass Role(Hashable):\n    \"\"\"Represents a Discord role in a :class:`Guild`.\n\n    .. container:: operations\n\n        .. describe:: x == y\n\n            Checks if two roles are equal.\n\n        .. describe:: x != y\n\n            Checks if two roles are not equal.\n\n        .. describe:: x > y\n\n            Checks if a role is higher than another in the hierarchy.\n\n        .. describe:: x < y\n\n            Checks if a role is lower than another in the hierarchy.\n\n        .. describe:: x >= y\n\n            Checks if a role is higher or equal to another in the hierarchy.\n\n        .. describe:: x <= y\n\n            Checks if a role is lower or equal to another in the hierarchy.\n\n        .. describe:: hash(x)\n\n            Return the role's hash.\n\n        .. describe:: str(x)\n\n            Returns the role's name.\n\n    Attributes\n    ----------\n    id: :class:`int`\n        The ID for the role.\n    name: :class:`str`\n        The name of the role.\n    guild: :class:`Guild`\n        The guild the role belongs to.\n    hoist: :class:`bool`\n         Indicates if the role will be displayed separately from other members.\n    position: :class:`int`\n        The position of the role. This number is usually positive. The bottom\n        role has a position of 0.\n\n        .. warning::\n\n            Multiple roles can have the same position number. As a consequence\n            of this, comparing via role position is prone to subtle bugs if\n            checking for role hierarchy. The recommended and correct way to\n            compare for roles in the hierarchy is using the comparison\n            operators on the role objects themselves.\n\n    unicode_emoji: Optional[:class:`str`]\n        The role's unicode emoji, if available.\n\n        .. note::\n\n            If :attr:`icon` is not ``None``, it is displayed as role icon\n            instead of the unicode emoji under this attribute.\n\n            If you want the icon that a role has displayed, consider using :attr:`display_icon`.\n\n        .. versionadded:: 2.0\n\n    managed: :class:`bool`\n        Indicates if the role is managed by the guild through some form of\n        integrations such as Twitch.\n    mentionable: :class:`bool`\n        Indicates if the role can be mentioned by users.\n    tags: Optional[:class:`RoleTags`]\n        The role tags associated with this role.\n    \"\"\"\n\n    __slots__ = (\n        'id',\n        'name',\n        '_permissions',\n        '_colour',\n        'position',\n        '_icon',\n        'unicode_emoji',\n        'managed',\n        'mentionable',\n        'hoist',\n        'guild',\n        'tags',\n        '_flags',\n        '_state',\n    )\n\n    def __init__(self, *, guild: Guild, state: ConnectionState, data: RolePayload):\n        self.guild: Guild = guild\n        self._state: ConnectionState = state\n        self.id: int = int(data['id'])\n        self._update(data)\n\n    def __str__(self) -> str:\n        return self.name\n\n    def __repr__(self) -> str:\n        return f'<Role id={self.id} name={self.name!r}>'\n\n    def __lt__(self, other: object) -> bool:\n        if not isinstance(other, Role) or not isinstance(self, Role):\n            return NotImplemented\n\n        if self.guild != other.guild:\n            raise RuntimeError('cannot compare roles from two different guilds.')\n\n        # the @everyone role is always the lowest role in hierarchy\n        guild_id = self.guild.id\n        if self.id == guild_id:\n            # everyone_role < everyone_role -> False\n            return other.id != guild_id\n\n        if self.position < other.position:\n            return True\n\n        if self.position == other.position:\n            return self.id > other.id\n\n        return False\n\n    def __le__(self, other: Any) -> bool:\n        r = Role.__lt__(other, self)\n        if r is NotImplemented:\n            return NotImplemented\n        return not r\n\n    def __gt__(self, other: Any) -> bool:\n        return Role.__lt__(other, self)\n\n    def __ge__(self, other: object) -> bool:\n        r = Role.__lt__(self, other)\n        if r is NotImplemented:\n            return NotImplemented\n        return not r\n\n    def _update(self, data: RolePayload):\n        self.name: str = data['name']\n        self._permissions: int = int(data.get('permissions', 0))\n        self.position: int = data.get('position', 0)\n        self._colour: int = data.get('color', 0)\n        self.hoist: bool = data.get('hoist', False)\n        self._icon: Optional[str] = data.get('icon')\n        self.unicode_emoji: Optional[str] = data.get('unicode_emoji')\n        self.managed: bool = data.get('managed', False)\n        self.mentionable: bool = data.get('mentionable', False)\n        self.tags: Optional[RoleTags]\n        self._flags: int = data.get('flags', 0)\n\n        try:\n            self.tags = RoleTags(data['tags'])\n        except KeyError:\n            self.tags = None\n\n    def is_default(self) -> bool:\n        \"\"\":class:`bool`: Checks if the role is the default role.\"\"\"\n        return self.guild.id == self.id\n\n    def is_bot_managed(self) -> bool:\n        \"\"\":class:`bool`: Whether the role is associated with a bot.\n\n        .. versionadded:: 1.6\n        \"\"\"\n        return self.tags is not None and self.tags.is_bot_managed()\n\n    def is_premium_subscriber(self) -> bool:\n        \"\"\":class:`bool`: Whether the role is the premium subscriber, AKA \"boost\", role for the guild.\n\n        .. versionadded:: 1.6\n        \"\"\"\n        return self.tags is not None and self.tags.is_premium_subscriber()\n\n    def is_integration(self) -> bool:\n        \"\"\":class:`bool`: Whether the role is managed by an integration.\n\n        .. versionadded:: 1.6\n        \"\"\"\n        return self.tags is not None and self.tags.is_integration()\n\n    def is_assignable(self) -> bool:\n        \"\"\":class:`bool`: Whether the role is able to be assigned or removed by the bot.\n\n        .. versionadded:: 2.0\n        \"\"\"\n        me = self.guild.me\n        return not self.is_default() and not self.managed and (me.top_role > self or me.id == self.guild.owner_id)\n\n    @property\n    def permissions(self) -> Permissions:\n        \"\"\":class:`Permissions`: Returns the role's permissions.\"\"\"\n        return Permissions(self._permissions)\n\n    @property\n    def colour(self) -> Colour:\n        \"\"\":class:`Colour`: Returns the role colour. An alias exists under ``color``.\"\"\"\n        return Colour(self._colour)\n\n    @property\n    def color(self) -> Colour:\n        \"\"\":class:`Colour`: Returns the role color. An alias exists under ``colour``.\"\"\"\n        return self.colour\n\n    @property\n    def icon(self) -> Optional[Asset]:\n        \"\"\"Optional[:class:`.Asset`]: Returns the role's icon asset, if available.\n\n        .. note::\n            If this is ``None``, the role might instead have unicode emoji as its icon\n            if :attr:`unicode_emoji` is not ``None``.\n\n            If you want the icon that a role has displayed, consider using :attr:`display_icon`.\n\n        .. versionadded:: 2.0\n        \"\"\"\n        if self._icon is None:\n            return None\n        return Asset._from_icon(self._state, self.id, self._icon, path='role')\n\n    @property\n    def display_icon(self) -> Optional[Union[Asset, str]]:\n        \"\"\"Optional[Union[:class:`.Asset`, :class:`str`]]: Returns the role's display icon, if available.\n\n        .. versionadded:: 2.0\n        \"\"\"\n        return self.icon or self.unicode_emoji\n\n    @property\n    def created_at(self) -> datetime.datetime:\n        \"\"\":class:`datetime.datetime`: Returns the role's creation time in UTC.\"\"\"\n        return snowflake_time(self.id)\n\n    @property\n    def mention(self) -> str:\n        \"\"\":class:`str`: Returns a string that allows you to mention a role.\"\"\"\n        return f'<@&{self.id}>'\n\n    @property\n    def members(self) -> List[Member]:\n        \"\"\"List[:class:`Member`]: Returns all the members with this role.\"\"\"\n        all_members = list(self.guild._members.values())\n        if self.is_default():\n            return all_members\n\n        role_id = self.id\n        return [member for member in all_members if member._roles.has(role_id)]\n\n    @property\n    def flags(self) -> RoleFlags:\n        \"\"\":class:`RoleFlags`: Returns the role's flags.\n\n        .. versionadded:: 2.4\n        \"\"\"\n        return RoleFlags._from_value(self._flags)\n\n    async def _move(self, position: int, reason: Optional[str]) -> None:\n        if position <= 0:\n            raise ValueError(\"Cannot move role to position 0 or below\")\n\n        if self.is_default():\n            raise ValueError(\"Cannot move default role\")\n\n        if self.position == position:\n            return  # Save discord the extra request.\n\n        http = self._state.http\n\n        change_range = range(min(self.position, position), max(self.position, position) + 1)\n        roles = [r.id for r in self.guild.roles[1:] if r.position in change_range and r.id != self.id]\n\n        if self.position > position:\n            roles.insert(0, self.id)\n        else:\n            roles.append(self.id)\n\n        payload: List[RolePositionUpdate] = [{\"id\": z[0], \"position\": z[1]} for z in zip(roles, change_range)]\n        await http.move_role_position(self.guild.id, payload, reason=reason)\n\n    async def edit(\n        self,\n        *,\n        name: str = MISSING,\n        permissions: Permissions = MISSING,\n        colour: Union[Colour, int] = MISSING,\n        color: Union[Colour, int] = MISSING,\n        hoist: bool = MISSING,\n        display_icon: Optional[Union[bytes, str]] = MISSING,\n        mentionable: bool = MISSING,\n        position: int = MISSING,\n        reason: Optional[str] = MISSING,\n    ) -> Optional[Role]:\n        \"\"\"|coro|\n\n        Edits the role.\n\n        You must have :attr:`~Permissions.manage_roles` to do this.\n\n        All fields are optional.\n\n        .. versionchanged:: 1.4\n            Can now pass ``int`` to ``colour`` keyword-only parameter.\n\n        .. versionchanged:: 2.0\n            Edits are no longer in-place, the newly edited role is returned instead.\n\n        .. versionadded:: 2.0\n            The ``display_icon`` keyword-only parameter was added.\n\n        .. versionchanged:: 2.0\n            This function will now raise :exc:`ValueError` instead of\n            ``InvalidArgument``.\n\n        Parameters\n        -----------\n        name: :class:`str`\n            The new role name to change to.\n        permissions: :class:`Permissions`\n            The new permissions to change to.\n        colour: Union[:class:`Colour`, :class:`int`]\n            The new colour to change to. (aliased to color as well)\n        hoist: :class:`bool`\n            Indicates if the role should be shown separately in the member list.\n        display_icon: Optional[Union[:class:`bytes`, :class:`str`]]\n            A :term:`py:bytes-like object` representing the icon\n            or :class:`str` representing unicode emoji that should be used as a role icon.\n            Could be ``None`` to denote removal of the icon.\n            Only PNG/JPEG is supported.\n            This is only available to guilds that contain ``ROLE_ICONS`` in :attr:`Guild.features`.\n        mentionable: :class:`bool`\n            Indicates if the role should be mentionable by others.\n        position: :class:`int`\n            The new role's position. This must be below your top role's\n            position or it will fail.\n        reason: Optional[:class:`str`]\n            The reason for editing this role. Shows up on the audit log.\n\n        Raises\n        -------\n        Forbidden\n            You do not have permissions to change the role.\n        HTTPException\n            Editing the role failed.\n        ValueError\n            An invalid position was given or the default\n            role was asked to be moved.\n\n        Returns\n        --------\n        :class:`Role`\n            The newly edited role.\n        \"\"\"\n        if position is not MISSING:\n            await self._move(position, reason=reason)\n\n        payload: Dict[str, Any] = {}\n        if color is not MISSING:\n            colour = color\n\n        if colour is not MISSING:\n            if isinstance(colour, int):\n                payload['color'] = colour\n            else:\n                payload['color'] = colour.value\n\n        if name is not MISSING:\n            payload['name'] = name\n\n        if permissions is not MISSING:\n            payload['permissions'] = permissions.value\n\n        if hoist is not MISSING:\n            payload['hoist'] = hoist\n\n        if display_icon is not MISSING:\n            payload['icon'] = None\n            payload['unicode_emoji'] = None\n            if isinstance(display_icon, bytes):\n                payload['icon'] = _bytes_to_base64_data(display_icon)\n            else:\n                payload['unicode_emoji'] = display_icon\n\n        if mentionable is not MISSING:\n            payload['mentionable'] = mentionable\n\n        data = await self._state.http.edit_role(self.guild.id, self.id, reason=reason, **payload)\n        return Role(guild=self.guild, data=data, state=self._state)\n\n    async def delete(self, *, reason: Optional[str] = None) -> None:\n        \"\"\"|coro|\n\n        Deletes the role.\n\n        You must have :attr:`~Permissions.manage_roles` to do this.\n\n        Parameters\n        -----------\n        reason: Optional[:class:`str`]\n            The reason for deleting this role. Shows up on the audit log.\n\n        Raises\n        --------\n        Forbidden\n            You do not have permissions to delete the role.\n        HTTPException\n            Deleting the role failed.\n        \"\"\"\n\n        await self._state.http.delete_role(self.guild.id, self.id, reason=reason)\n"
  },
  {
    "path": "discord/scheduled_event.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom __future__ import annotations\n\nfrom datetime import datetime\nfrom typing import TYPE_CHECKING, AsyncIterator, Dict, Optional, Union, overload, Literal\n\nfrom .asset import Asset\nfrom .enums import EventStatus, EntityType, PrivacyLevel, try_enum\nfrom .mixins import Hashable\nfrom .object import Object, OLDEST_OBJECT\nfrom .utils import parse_time, _get_as_snowflake, _bytes_to_base64_data, MISSING\n\nif TYPE_CHECKING:\n    from .types.scheduled_event import (\n        GuildScheduledEvent as BaseGuildScheduledEventPayload,\n        GuildScheduledEventWithUserCount as GuildScheduledEventWithUserCountPayload,\n        EntityMetadata,\n    )\n\n    from .abc import Snowflake\n    from .guild import Guild\n    from .channel import VoiceChannel, StageChannel\n    from .state import ConnectionState\n    from .user import User\n\n    GuildScheduledEventPayload = Union[BaseGuildScheduledEventPayload, GuildScheduledEventWithUserCountPayload]\n\n# fmt: off\n__all__ = (\n    \"ScheduledEvent\",\n)\n# fmt: on\n\n\nclass ScheduledEvent(Hashable):\n    \"\"\"Represents a scheduled event in a guild.\n\n    .. versionadded:: 2.0\n\n    .. container:: operations\n\n        .. describe:: x == y\n\n            Checks if two scheduled events are equal.\n\n        .. describe:: x != y\n\n            Checks if two scheduled events are not equal.\n\n        .. describe:: hash(x)\n\n            Returns the scheduled event's hash.\n\n    Attributes\n    ----------\n    id: :class:`int`\n        The scheduled event's ID.\n    name: :class:`str`\n        The name of the scheduled event.\n    description: Optional[:class:`str`]\n        The description of the scheduled event.\n    entity_type: :class:`EntityType`\n        The type of entity this event is for.\n    entity_id: Optional[:class:`int`]\n        The ID of the entity this event is for if available.\n    start_time: :class:`datetime.datetime`\n        The time that the scheduled event will start in UTC.\n    end_time: Optional[:class:`datetime.datetime`]\n        The time that the scheduled event will end in UTC.\n    privacy_level: :class:`PrivacyLevel`\n        The privacy level of the scheduled event.\n    status: :class:`EventStatus`\n        The status of the scheduled event.\n    user_count: :class:`int`\n        The number of users subscribed to the scheduled event.\n    creator: Optional[:class:`User`]\n        The user that created the scheduled event.\n    creator_id: Optional[:class:`int`]\n        The ID of the user that created the scheduled event.\n\n        .. versionadded:: 2.2\n    location: Optional[:class:`str`]\n        The location of the scheduled event.\n    \"\"\"\n\n    __slots__ = (\n        '_state',\n        '_users',\n        'id',\n        'guild_id',\n        'name',\n        'description',\n        'entity_type',\n        'entity_id',\n        'start_time',\n        'end_time',\n        'privacy_level',\n        'status',\n        '_cover_image',\n        'user_count',\n        'creator',\n        'channel_id',\n        'creator_id',\n        'location',\n    )\n\n    def __init__(self, *, state: ConnectionState, data: GuildScheduledEventPayload) -> None:\n        self._state = state\n        self._users: Dict[int, User] = {}\n        self._update(data)\n\n    def _update(self, data: GuildScheduledEventPayload) -> None:\n        self.id: int = int(data['id'])\n        self.guild_id: int = int(data['guild_id'])\n        self.name: str = data['name']\n        self.description: Optional[str] = data.get('description')\n        self.entity_type: EntityType = try_enum(EntityType, data['entity_type'])\n        self.entity_id: Optional[int] = _get_as_snowflake(data, 'entity_id')\n        self.start_time: datetime = parse_time(data['scheduled_start_time'])\n        self.privacy_level: PrivacyLevel = try_enum(PrivacyLevel, data['status'])\n        self.status: EventStatus = try_enum(EventStatus, data['status'])\n        self._cover_image: Optional[str] = data.get('image', None)\n        self.user_count: int = data.get('user_count', 0)\n        self.creator_id: Optional[int] = _get_as_snowflake(data, 'creator_id')\n\n        creator = data.get('creator')\n        self.creator: Optional[User] = self._state.store_user(creator) if creator else None\n\n        if self.creator_id is not None and self.creator is None:\n            self.creator = self._state.get_user(self.creator_id)\n\n        self.end_time: Optional[datetime] = parse_time(data.get('scheduled_end_time'))\n        self.channel_id: Optional[int] = _get_as_snowflake(data, 'channel_id')\n\n        metadata = data.get('entity_metadata')\n        self._unroll_metadata(metadata)\n\n    def _unroll_metadata(self, data: Optional[EntityMetadata]):\n        self.location: Optional[str] = data.get('location') if data else None\n\n    def __repr__(self) -> str:\n        return f'<GuildScheduledEvent id={self.id} name={self.name!r} guild_id={self.guild_id!r} creator={self.creator!r}>'\n\n    @property\n    def cover_image(self) -> Optional[Asset]:\n        \"\"\"Optional[:class:`Asset`]: The scheduled event's cover image.\"\"\"\n        if self._cover_image is None:\n            return None\n        return Asset._from_scheduled_event_cover_image(self._state, self.id, self._cover_image)\n\n    @property\n    def guild(self) -> Optional[Guild]:\n        \"\"\"Optional[:class:`Guild`]: The guild this scheduled event is in.\"\"\"\n        return self._state._get_guild(self.guild_id)\n\n    @property\n    def channel(self) -> Optional[Union[VoiceChannel, StageChannel]]:\n        \"\"\"Optional[Union[:class:`VoiceChannel`, :class:`StageChannel`]]: The channel this scheduled event is in.\"\"\"\n        return self.guild.get_channel(self.channel_id)  # type: ignore\n\n    @property\n    def url(self) -> str:\n        \"\"\":class:`str`: The url for the scheduled event.\"\"\"\n        return f'https://discord.com/events/{self.guild_id}/{self.id}'\n\n    async def __modify_status(self, status: EventStatus, reason: Optional[str], /) -> ScheduledEvent:\n        payload = {'status': status.value}\n        data = await self._state.http.edit_scheduled_event(self.guild_id, self.id, **payload, reason=reason)\n        s = ScheduledEvent(state=self._state, data=data)\n        s._users = self._users\n        return s\n\n    async def start(self, *, reason: Optional[str] = None) -> ScheduledEvent:\n        \"\"\"|coro|\n\n        Starts the scheduled event.\n\n        Shorthand for:\n\n        .. code-block:: python3\n\n            await event.edit(status=EventStatus.active)\n\n        Parameters\n        -----------\n        reason: Optional[:class:`str`]\n            The reason for starting the scheduled event.\n\n        Raises\n        ------\n        ValueError\n            The scheduled event has already started or has ended.\n        Forbidden\n            You do not have the proper permissions to start the scheduled event.\n        HTTPException\n            The scheduled event could not be started.\n\n        Returns\n        -------\n        :class:`ScheduledEvent`\n            The scheduled event that was started.\n        \"\"\"\n        if self.status is not EventStatus.scheduled:\n            raise ValueError('This scheduled event is already running.')\n\n        return await self.__modify_status(EventStatus.active, reason)\n\n    async def end(self, *, reason: Optional[str] = None) -> ScheduledEvent:\n        \"\"\"|coro|\n\n        Ends the scheduled event.\n\n        Shorthand for:\n\n        .. code-block:: python3\n\n            await event.edit(status=EventStatus.completed)\n\n        Parameters\n        -----------\n        reason: Optional[:class:`str`]\n            The reason for ending the scheduled event.\n\n        Raises\n        ------\n        ValueError\n            The scheduled event is not active or has already ended.\n        Forbidden\n            You do not have the proper permissions to end the scheduled event.\n        HTTPException\n            The scheduled event could not be ended.\n\n        Returns\n        -------\n        :class:`ScheduledEvent`\n            The scheduled event that was ended.\n        \"\"\"\n        if self.status is not EventStatus.active:\n            raise ValueError('This scheduled event is not active.')\n\n        return await self.__modify_status(EventStatus.ended, reason)\n\n    async def cancel(self, *, reason: Optional[str] = None) -> ScheduledEvent:\n        \"\"\"|coro|\n\n        Cancels the scheduled event.\n\n        Shorthand for:\n\n        .. code-block:: python3\n\n            await event.edit(status=EventStatus.cancelled)\n\n        Parameters\n        -----------\n        reason: Optional[:class:`str`]\n            The reason for cancelling the scheduled event.\n\n        Raises\n        ------\n        ValueError\n            The scheduled event is already running.\n        Forbidden\n            You do not have the proper permissions to cancel the scheduled event.\n        HTTPException\n            The scheduled event could not be cancelled.\n\n        Returns\n        -------\n        :class:`ScheduledEvent`\n            The scheduled event that was cancelled.\n        \"\"\"\n        if self.status is not EventStatus.scheduled:\n            raise ValueError('This scheduled event is already running.')\n\n        return await self.__modify_status(EventStatus.cancelled, reason)\n\n    @overload\n    async def edit(\n        self,\n        *,\n        name: str = ...,\n        description: str = ...,\n        start_time: datetime = ...,\n        end_time: Optional[datetime] = ...,\n        privacy_level: PrivacyLevel = ...,\n        status: EventStatus = ...,\n        image: bytes = ...,\n        reason: Optional[str] = ...,\n    ) -> ScheduledEvent:\n        ...\n\n    @overload\n    async def edit(\n        self,\n        *,\n        name: str = ...,\n        description: str = ...,\n        channel: Snowflake,\n        start_time: datetime = ...,\n        end_time: Optional[datetime] = ...,\n        privacy_level: PrivacyLevel = ...,\n        entity_type: Literal[EntityType.voice, EntityType.stage_instance],\n        status: EventStatus = ...,\n        image: bytes = ...,\n        reason: Optional[str] = ...,\n    ) -> ScheduledEvent:\n        ...\n\n    @overload\n    async def edit(\n        self,\n        *,\n        name: str = ...,\n        description: str = ...,\n        start_time: datetime = ...,\n        end_time: datetime = ...,\n        privacy_level: PrivacyLevel = ...,\n        entity_type: Literal[EntityType.external],\n        status: EventStatus = ...,\n        image: bytes = ...,\n        location: str,\n        reason: Optional[str] = ...,\n    ) -> ScheduledEvent:\n        ...\n\n    @overload\n    async def edit(\n        self,\n        *,\n        name: str = ...,\n        description: str = ...,\n        channel: Union[VoiceChannel, StageChannel],\n        start_time: datetime = ...,\n        end_time: Optional[datetime] = ...,\n        privacy_level: PrivacyLevel = ...,\n        status: EventStatus = ...,\n        image: bytes = ...,\n        reason: Optional[str] = ...,\n    ) -> ScheduledEvent:\n        ...\n\n    @overload\n    async def edit(\n        self,\n        *,\n        name: str = ...,\n        description: str = ...,\n        start_time: datetime = ...,\n        end_time: datetime = ...,\n        privacy_level: PrivacyLevel = ...,\n        status: EventStatus = ...,\n        image: bytes = ...,\n        location: str,\n        reason: Optional[str] = ...,\n    ) -> ScheduledEvent:\n        ...\n\n    async def edit(\n        self,\n        *,\n        name: str = MISSING,\n        description: str = MISSING,\n        channel: Optional[Snowflake] = MISSING,\n        start_time: datetime = MISSING,\n        end_time: Optional[datetime] = MISSING,\n        privacy_level: PrivacyLevel = MISSING,\n        entity_type: EntityType = MISSING,\n        status: EventStatus = MISSING,\n        image: bytes = MISSING,\n        location: str = MISSING,\n        reason: Optional[str] = None,\n    ) -> ScheduledEvent:\n        r\"\"\"|coro|\n\n        Edits the scheduled event.\n\n        You must have :attr:`~Permissions.manage_events` to do this.\n\n        Parameters\n        -----------\n        name: :class:`str`\n            The name of the scheduled event.\n        description: :class:`str`\n            The description of the scheduled event.\n        channel: Optional[:class:`~discord.abc.Snowflake`]\n            The channel to put the scheduled event in. If the channel is\n            a :class:`StageInstance` or :class:`VoiceChannel` then\n            it automatically sets the entity type.\n\n            Required if the entity type is either :attr:`EntityType.voice` or\n            :attr:`EntityType.stage_instance`.\n        start_time: :class:`datetime.datetime`\n            The time that the scheduled event will start. This must be a timezone-aware\n            datetime object. Consider using :func:`utils.utcnow`.\n        end_time: Optional[:class:`datetime.datetime`]\n            The time that the scheduled event will end. This must be a timezone-aware\n            datetime object. Consider using :func:`utils.utcnow`.\n\n            If the entity type is either :attr:`EntityType.voice` or\n            :attr:`EntityType.stage_instance`, the end_time can be cleared by\n            passing ``None``.\n\n            Required if the entity type is :attr:`EntityType.external`.\n        privacy_level: :class:`PrivacyLevel`\n            The privacy level of the scheduled event.\n        entity_type: :class:`EntityType`\n            The new entity type. If the channel is a :class:`StageInstance`\n            or :class:`VoiceChannel` then this is automatically set to the\n            appropriate entity type.\n        status: :class:`EventStatus`\n            The new status of the scheduled event.\n        image: Optional[:class:`bytes`]\n            The new image of the scheduled event or ``None`` to remove the image.\n        location: :class:`str`\n            The new location of the scheduled event.\n\n            Required if the entity type is :attr:`EntityType.external`.\n        reason: Optional[:class:`str`]\n            The reason for editing the scheduled event. Shows up on the audit log.\n\n        Raises\n        -------\n        TypeError\n            ``image`` was not a :term:`py:bytes-like object`, or ``privacy_level``\n            was not a :class:`PrivacyLevel`, or ``entity_type`` was not an\n            :class:`EntityType`, ``status`` was not an :class:`EventStatus`, or\n            an argument was provided that was incompatible with the scheduled event's\n            entity type.\n        ValueError\n            ``start_time`` or ``end_time`` was not a timezone-aware datetime object.\n        Forbidden\n            You do not have permissions to edit the scheduled event.\n        HTTPException\n            Editing the scheduled event failed.\n\n        Returns\n        --------\n        :class:`ScheduledEvent`\n            The edited scheduled event.\n        \"\"\"\n        payload = {}\n        metadata = {}\n\n        if name is not MISSING:\n            payload['name'] = name\n\n        if start_time is not MISSING:\n            if start_time.tzinfo is None:\n                raise ValueError(\n                    'start_time must be an aware datetime. Consider using discord.utils.utcnow() or datetime.datetime.now().astimezone() for local time.'\n                )\n            payload['scheduled_start_time'] = start_time.isoformat()\n\n        if description is not MISSING:\n            payload['description'] = description\n\n        if privacy_level is not MISSING:\n            if not isinstance(privacy_level, PrivacyLevel):\n                raise TypeError('privacy_level must be of type PrivacyLevel.')\n\n            payload['privacy_level'] = privacy_level.value\n\n        if status is not MISSING:\n            if not isinstance(status, EventStatus):\n                raise TypeError('status must be of type EventStatus')\n\n            payload['status'] = status.value\n\n        if image is not MISSING:\n            image_as_str: Optional[str] = _bytes_to_base64_data(image) if image is not None else image\n            payload['image'] = image_as_str\n\n        entity_type = entity_type or getattr(channel, '_scheduled_event_entity_type', MISSING)\n        if entity_type is MISSING:\n            if channel and isinstance(channel, Object):\n                if channel.type is VoiceChannel:\n                    entity_type = EntityType.voice\n                elif channel.type is StageChannel:\n                    entity_type = EntityType.stage_instance\n            elif location not in (MISSING, None):\n                entity_type = EntityType.external\n        else:\n            if not isinstance(entity_type, EntityType):\n                raise TypeError('entity_type must be of type EntityType')\n\n            payload['entity_type'] = entity_type.value\n\n        if entity_type is None:\n            raise TypeError(\n                f'invalid GuildChannel type passed, must be VoiceChannel or StageChannel not {channel.__class__.__name__}'\n            )\n\n        _entity_type = entity_type or self.entity_type\n        _entity_type_changed = _entity_type is not self.entity_type\n\n        if _entity_type in (EntityType.stage_instance, EntityType.voice):\n            if channel is MISSING or channel is None:\n                if _entity_type_changed:\n                    raise TypeError('channel must be set when entity_type is voice or stage_instance')\n            else:\n                payload['channel_id'] = channel.id\n\n            if location not in (MISSING, None):\n                raise TypeError('location cannot be set when entity_type is voice or stage_instance')\n            payload['entity_metadata'] = None\n        else:\n            if channel not in (MISSING, None):\n                raise TypeError('channel cannot be set when entity_type is external')\n            payload['channel_id'] = None\n\n            if location is MISSING or location is None:\n                if _entity_type_changed:\n                    raise TypeError('location must be set when entity_type is external')\n            else:\n                metadata['location'] = location\n\n            if not self.end_time and (end_time is MISSING or end_time is None):\n                raise TypeError('end_time must be set when entity_type is external')\n\n        if end_time is not MISSING:\n            if end_time is not None:\n                if end_time.tzinfo is None:\n                    raise ValueError(\n                        'end_time must be an aware datetime. Consider using discord.utils.utcnow() or datetime.datetime.now().astimezone() for local time.'\n                    )\n                payload['scheduled_end_time'] = end_time.isoformat()\n            else:\n                payload['scheduled_end_time'] = end_time\n\n        if metadata:\n            payload['entity_metadata'] = metadata\n\n        data = await self._state.http.edit_scheduled_event(self.guild_id, self.id, **payload, reason=reason)\n        s = ScheduledEvent(state=self._state, data=data)\n        s._users = self._users\n        return s\n\n    async def delete(self, *, reason: Optional[str] = None) -> None:\n        \"\"\"|coro|\n\n        Deletes the scheduled event.\n\n        You must have :attr:`~Permissions.manage_events` to do this.\n\n        Parameters\n        -----------\n        reason: Optional[:class:`str`]\n            The reason for deleting the scheduled event. Shows up on the audit log.\n\n        Raises\n        ------\n        Forbidden\n            You do not have permissions to delete the scheduled event.\n        HTTPException\n            Deleting the scheduled event failed.\n        \"\"\"\n        await self._state.http.delete_scheduled_event(self.guild_id, self.id, reason=reason)\n\n    async def users(\n        self,\n        *,\n        limit: Optional[int] = None,\n        before: Optional[Snowflake] = None,\n        after: Optional[Snowflake] = None,\n        oldest_first: bool = MISSING,\n    ) -> AsyncIterator[User]:\n        \"\"\"|coro|\n\n        Retrieves all :class:`User` that are subscribed to this event.\n\n        This requires :attr:`Intents.members` to get information about members\n        other than yourself.\n\n        Raises\n        -------\n        HTTPException\n            Retrieving the members failed.\n\n        Returns\n        --------\n        List[:class:`User`]\n            All subscribed users of this event.\n        \"\"\"\n\n        async def _before_strategy(retrieve: int, before: Optional[Snowflake], limit: Optional[int]):\n            before_id = before.id if before else None\n            users = await self._state.http.get_scheduled_event_users(\n                self.guild_id, self.id, limit=retrieve, with_member=False, before=before_id\n            )\n\n            if users:\n                if limit is not None:\n                    limit -= len(users)\n\n                before = Object(id=users[-1]['user']['id'])\n\n            return users, before, limit\n\n        async def _after_strategy(retrieve: int, after: Optional[Snowflake], limit: Optional[int]):\n            after_id = after.id if after else None\n            users = await self._state.http.get_scheduled_event_users(\n                self.guild_id, self.id, limit=retrieve, with_member=False, after=after_id\n            )\n\n            if users:\n                if limit is not None:\n                    limit -= len(users)\n\n                after = Object(id=users[0]['user']['id'])\n\n            return users, after, limit\n\n        if limit is None:\n            limit = self.user_count or None\n\n        if oldest_first is MISSING:\n            reverse = after is not None\n        else:\n            reverse = oldest_first\n\n        predicate = None\n\n        if reverse:\n            strategy, state = _after_strategy, after\n            if before:\n                predicate = lambda u: u['user']['id'] < before.id\n        else:\n            strategy, state = _before_strategy, before\n            if after and after != OLDEST_OBJECT:\n                predicate = lambda u: u['user']['id'] > after.id\n\n        while True:\n            retrieve = 100 if limit is None else min(limit, 100)\n            if retrieve < 1:\n                return\n\n            data, state, limit = await strategy(retrieve, state, limit)\n\n            if reverse:\n                data = reversed(data)\n            if predicate:\n                data = filter(predicate, data)\n\n            users = (self._state.store_user(raw_user['user']) for raw_user in data)\n            count = 0\n\n            for count, user in enumerate(users, 1):\n                yield user\n\n            if count < 100:\n                # There's no data left after this\n                break\n\n    def _add_user(self, user: User) -> None:\n        self._users[user.id] = user\n\n    def _pop_user(self, user_id: int) -> None:\n        self._users.pop(user_id, None)\n"
  },
  {
    "path": "discord/shard.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom __future__ import annotations\n\nimport asyncio\nimport logging\n\nimport aiohttp\nimport yarl\n\nfrom .state import AutoShardedConnectionState\nfrom .client import Client\nfrom .backoff import ExponentialBackoff\nfrom .gateway import *\nfrom .errors import (\n    ClientException,\n    HTTPException,\n    GatewayNotFound,\n    ConnectionClosed,\n    PrivilegedIntentsRequired,\n)\n\nfrom .enums import Status\n\nfrom typing import TYPE_CHECKING, Any, Callable, Tuple, Type, Optional, List, Dict\n\nif TYPE_CHECKING:\n    from .gateway import DiscordWebSocket\n    from .activity import BaseActivity\n    from .flags import Intents\n\n__all__ = (\n    'AutoShardedClient',\n    'ShardInfo',\n)\n\n_log = logging.getLogger(__name__)\n\n\nclass EventType:\n    close = 0\n    reconnect = 1\n    resume = 2\n    identify = 3\n    terminate = 4\n    clean_close = 5\n\n\nclass EventItem:\n    __slots__ = ('type', 'shard', 'error')\n\n    def __init__(self, etype: int, shard: Optional['Shard'], error: Optional[Exception]) -> None:\n        self.type: int = etype\n        self.shard: Optional['Shard'] = shard\n        self.error: Optional[Exception] = error\n\n    def __lt__(self, other: object) -> bool:\n        if not isinstance(other, EventItem):\n            return NotImplemented\n        return self.type < other.type\n\n    def __eq__(self, other: object) -> bool:\n        if not isinstance(other, EventItem):\n            return NotImplemented\n        return self.type == other.type\n\n    def __hash__(self) -> int:\n        return hash(self.type)\n\n\nclass Shard:\n    def __init__(self, ws: DiscordWebSocket, client: AutoShardedClient, queue_put: Callable[[EventItem], None]) -> None:\n        self.ws: DiscordWebSocket = ws\n        self._client: Client = client\n        self._dispatch: Callable[..., None] = client.dispatch\n        self._queue_put: Callable[[EventItem], None] = queue_put\n        self._disconnect: bool = False\n        self._reconnect = client._reconnect\n        self._backoff: ExponentialBackoff = ExponentialBackoff()\n        self._task: Optional[asyncio.Task] = None\n        self._handled_exceptions: Tuple[Type[Exception], ...] = (\n            OSError,\n            HTTPException,\n            GatewayNotFound,\n            ConnectionClosed,\n            aiohttp.ClientError,\n            asyncio.TimeoutError,\n        )\n\n    @property\n    def id(self) -> int:\n        # DiscordWebSocket.shard_id is set in the from_client classmethod\n        return self.ws.shard_id  # type: ignore\n\n    def launch(self) -> None:\n        self._task = self._client.loop.create_task(self.worker())\n\n    def _cancel_task(self) -> None:\n        if self._task is not None and not self._task.done():\n            self._task.cancel()\n\n    async def close(self) -> None:\n        self._cancel_task()\n        await self.ws.close(code=1000)\n\n    async def disconnect(self) -> None:\n        await self.close()\n        self._dispatch('shard_disconnect', self.id)\n\n    async def _handle_disconnect(self, e: Exception) -> None:\n        self._dispatch('disconnect')\n        self._dispatch('shard_disconnect', self.id)\n        if not self._reconnect:\n            self._queue_put(EventItem(EventType.close, self, e))\n            return\n\n        if self._client.is_closed():\n            return\n\n        if isinstance(e, OSError) and e.errno in (54, 10054):\n            # If we get Connection reset by peer then always try to RESUME the connection.\n            exc = ReconnectWebSocket(self.id, resume=True)\n            self._queue_put(EventItem(EventType.resume, self, exc))\n            return\n\n        if isinstance(e, ConnectionClosed):\n            if e.code == 4014:\n                self._queue_put(EventItem(EventType.terminate, self, PrivilegedIntentsRequired(self.id)))\n                return\n            if e.code != 1000:\n                self._queue_put(EventItem(EventType.close, self, e))\n                return\n\n        retry = self._backoff.delay()\n        _log.error('Attempting a reconnect for shard ID %s in %.2fs', self.id, retry, exc_info=e)\n        await asyncio.sleep(retry)\n        self._queue_put(EventItem(EventType.reconnect, self, e))\n\n    async def worker(self) -> None:\n        while not self._client.is_closed():\n            try:\n                await self.ws.poll_event()\n            except ReconnectWebSocket as e:\n                etype = EventType.resume if e.resume else EventType.identify\n                self._queue_put(EventItem(etype, self, e))\n                break\n            except self._handled_exceptions as e:\n                await self._handle_disconnect(e)\n                break\n            except asyncio.CancelledError:\n                break\n            except Exception as e:\n                self._queue_put(EventItem(EventType.terminate, self, e))\n                break\n\n    async def reidentify(self, exc: ReconnectWebSocket) -> None:\n        self._cancel_task()\n        self._dispatch('disconnect')\n        self._dispatch('shard_disconnect', self.id)\n        _log.debug('Got a request to %s the websocket at Shard ID %s.', exc.op, self.id)\n        try:\n            coro = DiscordWebSocket.from_client(\n                self._client,\n                resume=exc.resume,\n                gateway=None if not exc.resume else self.ws.gateway,\n                shard_id=self.id,\n                session=self.ws.session_id,\n                sequence=self.ws.sequence,\n            )\n            self.ws = await asyncio.wait_for(coro, timeout=60.0)\n        except self._handled_exceptions as e:\n            await self._handle_disconnect(e)\n        except ReconnectWebSocket as e:\n            _log.debug('Somehow got a signal to %s while trying to %s shard ID %s.', e.op, exc.op, self.id)\n            op = EventType.resume if e.resume else EventType.identify\n            self._queue_put(EventItem(op, self, e))\n        except asyncio.CancelledError:\n            return\n        except Exception as e:\n            self._queue_put(EventItem(EventType.terminate, self, e))\n        else:\n            self.launch()\n\n    async def reconnect(self) -> None:\n        self._cancel_task()\n        try:\n            coro = DiscordWebSocket.from_client(self._client, shard_id=self.id)\n            self.ws = await asyncio.wait_for(coro, timeout=60.0)\n        except self._handled_exceptions as e:\n            await self._handle_disconnect(e)\n        except asyncio.CancelledError:\n            return\n        except Exception as e:\n            self._queue_put(EventItem(EventType.terminate, self, e))\n        else:\n            self.launch()\n\n\nclass ShardInfo:\n    \"\"\"A class that gives information and control over a specific shard.\n\n    You can retrieve this object via :meth:`AutoShardedClient.get_shard`\n    or :attr:`AutoShardedClient.shards`.\n\n    .. versionadded:: 1.4\n\n    Attributes\n    ------------\n    id: :class:`int`\n        The shard ID for this shard.\n    shard_count: Optional[:class:`int`]\n        The shard count for this cluster. If this is ``None`` then the bot has not started yet.\n    \"\"\"\n\n    __slots__ = ('_parent', 'id', 'shard_count')\n\n    def __init__(self, parent: Shard, shard_count: Optional[int]) -> None:\n        self._parent: Shard = parent\n        self.id: int = parent.id\n        self.shard_count: Optional[int] = shard_count\n\n    def is_closed(self) -> bool:\n        \"\"\":class:`bool`: Whether the shard connection is currently closed.\"\"\"\n        return not self._parent.ws.open\n\n    async def disconnect(self) -> None:\n        \"\"\"|coro|\n\n        Disconnects a shard. When this is called, the shard connection will no\n        longer be open.\n\n        If the shard is already disconnected this does nothing.\n        \"\"\"\n        if self.is_closed():\n            return\n\n        await self._parent.disconnect()\n\n    async def reconnect(self) -> None:\n        \"\"\"|coro|\n\n        Disconnects and then connects the shard again.\n        \"\"\"\n        if not self.is_closed():\n            await self._parent.disconnect()\n        await self._parent.reconnect()\n\n    async def connect(self) -> None:\n        \"\"\"|coro|\n\n        Connects a shard. If the shard is already connected this does nothing.\n        \"\"\"\n        if not self.is_closed():\n            return\n\n        await self._parent.reconnect()\n\n    @property\n    def latency(self) -> float:\n        \"\"\":class:`float`: Measures latency between a HEARTBEAT and a HEARTBEAT_ACK in seconds for this shard.\"\"\"\n        return self._parent.ws.latency\n\n    def is_ws_ratelimited(self) -> bool:\n        \"\"\":class:`bool`: Whether the websocket is currently rate limited.\n\n        This can be useful to know when deciding whether you should query members\n        using HTTP or via the gateway.\n\n        .. versionadded:: 1.6\n        \"\"\"\n        return self._parent.ws.is_ratelimited()\n\n\nclass AutoShardedClient(Client):\n    \"\"\"A client similar to :class:`Client` except it handles the complications\n    of sharding for the user into a more manageable and transparent single\n    process bot.\n\n    When using this client, you will be able to use it as-if it was a regular\n    :class:`Client` with a single shard when implementation wise internally it\n    is split up into multiple shards. This allows you to not have to deal with\n    IPC or other complicated infrastructure.\n\n    It is recommended to use this client only if you have surpassed at least\n    1000 guilds.\n\n    If no :attr:`.shard_count` is provided, then the library will use the\n    Bot Gateway endpoint call to figure out how many shards to use.\n\n    If a ``shard_ids`` parameter is given, then those shard IDs will be used\n    to launch the internal shards. Note that :attr:`.shard_count` must be provided\n    if this is used. By default, when omitted, the client will launch shards from\n    0 to ``shard_count - 1``.\n\n    .. container:: operations\n\n        .. describe:: async with x\n\n            Asynchronously initialises the client and automatically cleans up.\n\n            .. versionadded:: 2.0\n\n    Attributes\n    ------------\n    shard_ids: Optional[List[:class:`int`]]\n        An optional list of shard_ids to launch the shards with.\n    shard_connect_timeout: Optional[:class:`float`]\n        The maximum number of seconds to wait before timing out when launching a shard.\n        Defaults to 180 seconds.\n\n        .. versionadded:: 2.4\n    \"\"\"\n\n    if TYPE_CHECKING:\n        _connection: AutoShardedConnectionState\n\n    def __init__(self, *args: Any, intents: Intents, **kwargs: Any) -> None:\n        kwargs.pop('shard_id', None)\n        self.shard_ids: Optional[List[int]] = kwargs.pop('shard_ids', None)\n        self.shard_connect_timeout: Optional[float] = kwargs.pop('shard_connect_timeout', 180.0)\n\n        super().__init__(*args, intents=intents, **kwargs)\n\n        if self.shard_ids is not None:\n            if self.shard_count is None:\n                raise ClientException('When passing manual shard_ids, you must provide a shard_count.')\n            elif not isinstance(self.shard_ids, (list, tuple)):\n                raise ClientException('shard_ids parameter must be a list or a tuple.')\n\n        # instead of a single websocket, we have multiple\n        # the key is the shard_id\n        self.__shards = {}\n        self._connection._get_websocket = self._get_websocket\n        self._connection._get_client = lambda: self\n\n    def _get_websocket(self, guild_id: Optional[int] = None, *, shard_id: Optional[int] = None) -> DiscordWebSocket:\n        if shard_id is None:\n            # guild_id won't be None if shard_id is None and shard_count won't be None here\n            shard_id = (guild_id >> 22) % self.shard_count  # type: ignore\n        return self.__shards[shard_id].ws\n\n    def _get_state(self, **options: Any) -> AutoShardedConnectionState:\n        return AutoShardedConnectionState(\n            dispatch=self.dispatch,\n            handlers=self._handlers,\n            hooks=self._hooks,\n            http=self.http,\n            **options,\n        )\n\n    @property\n    def latency(self) -> float:\n        \"\"\":class:`float`: Measures latency between a HEARTBEAT and a HEARTBEAT_ACK in seconds.\n\n        This operates similarly to :meth:`Client.latency` except it uses the average\n        latency of every shard's latency. To get a list of shard latency, check the\n        :attr:`latencies` property. Returns ``nan`` if there are no shards ready.\n        \"\"\"\n        if not self.__shards:\n            return float('nan')\n        return sum(latency for _, latency in self.latencies) / len(self.__shards)\n\n    @property\n    def latencies(self) -> List[Tuple[int, float]]:\n        \"\"\"List[Tuple[:class:`int`, :class:`float`]]: A list of latencies between a HEARTBEAT and a HEARTBEAT_ACK in seconds.\n\n        This returns a list of tuples with elements ``(shard_id, latency)``.\n        \"\"\"\n        return [(shard_id, shard.ws.latency) for shard_id, shard in self.__shards.items()]\n\n    def get_shard(self, shard_id: int, /) -> Optional[ShardInfo]:\n        \"\"\"\n        Gets the shard information at a given shard ID or ``None`` if not found.\n\n        .. versionchanged:: 2.0\n\n            ``shard_id`` parameter is now positional-only.\n\n        Returns\n        --------\n        Optional[:class:`ShardInfo`]\n            Information about the shard with given ID. ``None`` if not found.\n        \"\"\"\n        try:\n            parent = self.__shards[shard_id]\n        except KeyError:\n            return None\n        else:\n            return ShardInfo(parent, self.shard_count)\n\n    @property\n    def shards(self) -> Dict[int, ShardInfo]:\n        \"\"\"Mapping[int, :class:`ShardInfo`]: Returns a mapping of shard IDs to their respective info object.\"\"\"\n        return {shard_id: ShardInfo(parent, self.shard_count) for shard_id, parent in self.__shards.items()}\n\n    async def launch_shard(self, gateway: yarl.URL, shard_id: int, *, initial: bool = False) -> None:\n        try:\n            coro = DiscordWebSocket.from_client(self, initial=initial, gateway=gateway, shard_id=shard_id)\n            ws = await asyncio.wait_for(coro, timeout=self.shard_connect_timeout)\n        except Exception:\n            _log.exception('Failed to connect for shard_id: %s. Retrying...', shard_id)\n            await asyncio.sleep(5.0)\n            return await self.launch_shard(gateway, shard_id)\n\n        # keep reading the shard while others connect\n        self.__shards[shard_id] = ret = Shard(ws, self, self.__queue.put_nowait)\n        ret.launch()\n\n    async def launch_shards(self) -> None:\n        if self.is_closed():\n            return\n\n        if self.shard_count is None:\n            self.shard_count: int\n            self.shard_count, gateway_url = await self.http.get_bot_gateway()\n            gateway = yarl.URL(gateway_url)\n        else:\n            gateway = DiscordWebSocket.DEFAULT_GATEWAY\n\n        self._connection.shard_count = self.shard_count\n\n        shard_ids = self.shard_ids or range(self.shard_count)\n        self._connection.shard_ids = shard_ids\n\n        for shard_id in shard_ids:\n            initial = shard_id == shard_ids[0]\n            await self.launch_shard(gateway, shard_id, initial=initial)\n\n    async def _async_setup_hook(self) -> None:\n        await super()._async_setup_hook()\n        self.__queue = asyncio.PriorityQueue()\n\n    async def connect(self, *, reconnect: bool = True) -> None:\n        self._reconnect = reconnect\n        await self.launch_shards()\n\n        while not self.is_closed():\n            item = await self.__queue.get()\n            if item.type == EventType.close:\n                await self.close()\n                if isinstance(item.error, ConnectionClosed):\n                    if item.error.code != 1000:\n                        raise item.error\n                    if item.error.code == 4014:\n                        raise PrivilegedIntentsRequired(item.shard.id) from None\n                return\n            elif item.type in (EventType.identify, EventType.resume):\n                await item.shard.reidentify(item.error)\n            elif item.type == EventType.reconnect:\n                await item.shard.reconnect()\n            elif item.type == EventType.terminate:\n                await self.close()\n                raise item.error\n            elif item.type == EventType.clean_close:\n                return\n\n    async def close(self) -> None:\n        \"\"\"|coro|\n\n        Closes the connection to Discord.\n        \"\"\"\n        if self._closing_task:\n            return await self._closing_task\n\n        async def _close():\n            await self._connection.close()\n\n            to_close = [asyncio.ensure_future(shard.close(), loop=self.loop) for shard in self.__shards.values()]\n            if to_close:\n                await asyncio.wait(to_close)\n\n            await self.http.close()\n            self.__queue.put_nowait(EventItem(EventType.clean_close, None, None))\n\n        self._closing_task = asyncio.create_task(_close())\n        await self._closing_task\n\n    async def change_presence(\n        self,\n        *,\n        activity: Optional[BaseActivity] = None,\n        status: Optional[Status] = None,\n        shard_id: Optional[int] = None,\n    ) -> None:\n        \"\"\"|coro|\n\n        Changes the client's presence.\n\n        Example: ::\n\n            game = discord.Game(\"with the API\")\n            await client.change_presence(status=discord.Status.idle, activity=game)\n\n        .. versionchanged:: 2.0\n            Removed the ``afk`` keyword-only parameter.\n\n        .. versionchanged:: 2.0\n            This function will now raise :exc:`TypeError` instead of\n            ``InvalidArgument``.\n\n        Parameters\n        ----------\n        activity: Optional[:class:`BaseActivity`]\n            The activity being done. ``None`` if no currently active activity is done.\n        status: Optional[:class:`Status`]\n            Indicates what status to change to. If ``None``, then\n            :attr:`Status.online` is used.\n        shard_id: Optional[:class:`int`]\n            The shard_id to change the presence to. If not specified\n            or ``None``, then it will change the presence of every\n            shard the bot can see.\n\n        Raises\n        ------\n        TypeError\n            If the ``activity`` parameter is not of proper type.\n        \"\"\"\n\n        if status is None:\n            status_value = 'online'\n            status_enum = Status.online\n        elif status is Status.offline:\n            status_value = 'invisible'\n            status_enum = Status.offline\n        else:\n            status_enum = status\n            status_value = str(status)\n\n        if shard_id is None:\n            for shard in self.__shards.values():\n                await shard.ws.change_presence(activity=activity, status=status_value)\n\n            guilds = self._connection.guilds\n        else:\n            shard = self.__shards[shard_id]\n            await shard.ws.change_presence(activity=activity, status=status_value)\n            guilds = [g for g in self._connection.guilds if g.shard_id == shard_id]\n\n        activities = () if activity is None else (activity,)\n        for guild in guilds:\n            me = guild.me\n            if me is None:\n                continue\n\n            # Member.activities is typehinted as Tuple[ActivityType, ...], we may be setting it as Tuple[BaseActivity, ...]\n            me.activities = activities  # type: ignore\n            me.status = status_enum\n\n    def is_ws_ratelimited(self) -> bool:\n        \"\"\":class:`bool`: Whether the websocket is currently rate limited.\n\n        This can be useful to know when deciding whether you should query members\n        using HTTP or via the gateway.\n\n        This implementation checks if any of the shards are rate limited.\n        For more granular control, consider :meth:`ShardInfo.is_ws_ratelimited`.\n\n        .. versionadded:: 1.6\n        \"\"\"\n        return any(shard.ws.is_ratelimited() for shard in self.__shards.values())\n"
  },
  {
    "path": "discord/sku.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\n\nfrom __future__ import annotations\n\nfrom typing import Optional, TYPE_CHECKING\n\nfrom . import utils\nfrom .app_commands import MissingApplicationID\nfrom .enums import try_enum, SKUType, EntitlementType\nfrom .flags import SKUFlags\n\nif TYPE_CHECKING:\n    from datetime import datetime\n\n    from .guild import Guild\n    from .state import ConnectionState\n    from .types.sku import (\n        SKU as SKUPayload,\n        Entitlement as EntitlementPayload,\n    )\n    from .user import User\n\n__all__ = (\n    'SKU',\n    'Entitlement',\n)\n\n\nclass SKU:\n    \"\"\"Represents a premium offering as a stock-keeping unit (SKU).\n\n    .. versionadded:: 2.4\n\n    Attributes\n    -----------\n    id: :class:`int`\n        The SKU's ID.\n    type: :class:`SKUType`\n        The type of the SKU.\n    application_id: :class:`int`\n        The ID of the application that the SKU belongs to.\n    name: :class:`str`\n        The consumer-facing name of the premium offering.\n    slug: :class:`str`\n        A system-generated URL slug based on the SKU name.\n    \"\"\"\n\n    __slots__ = (\n        '_state',\n        'id',\n        'type',\n        'application_id',\n        'name',\n        'slug',\n        '_flags',\n    )\n\n    def __init__(self, *, state: ConnectionState, data: SKUPayload):\n        self._state: ConnectionState = state\n        self.id: int = int(data['id'])\n        self.type: SKUType = try_enum(SKUType, data['type'])\n        self.application_id: int = int(data['application_id'])\n        self.name: str = data['name']\n        self.slug: str = data['slug']\n        self._flags: int = data['flags']\n\n    def __repr__(self) -> str:\n        return f'<SKU id={self.id} name={self.name!r} slug={self.slug!r}>'\n\n    @property\n    def flags(self) -> SKUFlags:\n        \"\"\":class:`SKUFlags`: Returns the flags of the SKU.\"\"\"\n        return SKUFlags._from_value(self._flags)\n\n    @property\n    def created_at(self) -> datetime:\n        \"\"\":class:`datetime.datetime`: Returns the sku's creation time in UTC.\"\"\"\n        return utils.snowflake_time(self.id)\n\n\nclass Entitlement:\n    \"\"\"Represents an entitlement from user or guild which has been granted access to a premium offering.\n\n    .. versionadded:: 2.4\n\n    Attributes\n    -----------\n    id: :class:`int`\n        The entitlement's ID.\n    sku_id: :class:`int`\n        The ID of the SKU that the entitlement belongs to.\n    application_id: :class:`int`\n        The ID of the application that the entitlement belongs to.\n    user_id: Optional[:class:`int`]\n        The ID of the user that is granted access to the entitlement.\n    type: :class:`EntitlementType`\n        The type of the entitlement.\n    deleted: :class:`bool`\n        Whether the entitlement has been deleted.\n    starts_at: Optional[:class:`datetime.datetime`]\n        A UTC start date which the entitlement is valid. Not present when using test entitlements.\n    ends_at: Optional[:class:`datetime.datetime`]\n        A UTC date which entitlement is no longer valid. Not present when using test entitlements.\n    guild_id: Optional[:class:`int`]\n        The ID of the guild that is granted access to the entitlement\n    consumed: :class:`bool`\n        For consumable items, whether the entitlement has been consumed.\n    \"\"\"\n\n    __slots__ = (\n        '_state',\n        'id',\n        'sku_id',\n        'application_id',\n        'user_id',\n        'type',\n        'deleted',\n        'starts_at',\n        'ends_at',\n        'guild_id',\n        'consumed',\n    )\n\n    def __init__(self, state: ConnectionState, data: EntitlementPayload):\n        self._state: ConnectionState = state\n        self.id: int = int(data['id'])\n        self.sku_id: int = int(data['sku_id'])\n        self.application_id: int = int(data['application_id'])\n        self.user_id: Optional[int] = utils._get_as_snowflake(data, 'user_id')\n        self.type: EntitlementType = try_enum(EntitlementType, data['type'])\n        self.deleted: bool = data['deleted']\n        self.starts_at: Optional[datetime] = utils.parse_time(data.get('starts_at', None))\n        self.ends_at: Optional[datetime] = utils.parse_time(data.get('ends_at', None))\n        self.guild_id: Optional[int] = utils._get_as_snowflake(data, 'guild_id')\n        self.consumed: bool = data.get('consumed', False)\n\n    def __repr__(self) -> str:\n        return f'<Entitlement id={self.id} type={self.type!r} user_id={self.user_id}>'\n\n    @property\n    def user(self) -> Optional[User]:\n        \"\"\"Optional[:class:`User`]: The user that is granted access to the entitlement.\"\"\"\n        if self.user_id is None:\n            return None\n        return self._state.get_user(self.user_id)\n\n    @property\n    def guild(self) -> Optional[Guild]:\n        \"\"\"Optional[:class:`Guild`]: The guild that is granted access to the entitlement.\"\"\"\n        return self._state._get_guild(self.guild_id)\n\n    @property\n    def created_at(self) -> datetime:\n        \"\"\":class:`datetime.datetime`: Returns the entitlement's creation time in UTC.\"\"\"\n        return utils.snowflake_time(self.id)\n\n    def is_expired(self) -> bool:\n        \"\"\":class:`bool`: Returns ``True`` if the entitlement is expired. Will be always False for test entitlements.\"\"\"\n        if self.ends_at is None:\n            return False\n        return utils.utcnow() >= self.ends_at\n\n    async def consume(self) -> None:\n        \"\"\"|coro|\n\n        Marks a one-time purchase entitlement as consumed.\n\n        Raises\n        -------\n        MissingApplicationID\n            The application ID could not be found.\n        NotFound\n            The entitlement could not be found.\n        HTTPException\n            Consuming the entitlement failed.\n        \"\"\"\n\n        if self.application_id is None:\n            raise MissingApplicationID\n\n        await self._state.http.consume_entitlement(self.application_id, self.id)\n\n    async def delete(self) -> None:\n        \"\"\"|coro|\n\n        Deletes the entitlement.\n\n        Raises\n        -------\n        MissingApplicationID\n            The application ID could not be found.\n        NotFound\n            The entitlement could not be found.\n        HTTPException\n            Deleting the entitlement failed.\n        \"\"\"\n\n        if self.application_id is None:\n            raise MissingApplicationID\n\n        await self._state.http.delete_entitlement(self.application_id, self.id)\n"
  },
  {
    "path": "discord/stage_instance.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom __future__ import annotations\n\nfrom typing import Optional, TYPE_CHECKING\n\nfrom .utils import MISSING, cached_slot_property, _get_as_snowflake\nfrom .mixins import Hashable\nfrom .enums import PrivacyLevel, try_enum\n\n# fmt: off\n__all__ = (\n    'StageInstance',\n)\n# fmt: on\n\nif TYPE_CHECKING:\n    from .types.channel import StageInstance as StageInstancePayload\n    from .state import ConnectionState\n    from .channel import StageChannel\n    from .guild import Guild\n    from .scheduled_event import ScheduledEvent\n\n\nclass StageInstance(Hashable):\n    \"\"\"Represents a stage instance of a stage channel in a guild.\n\n    .. versionadded:: 2.0\n\n    .. container:: operations\n\n        .. describe:: x == y\n\n            Checks if two stage instances are equal.\n\n        .. describe:: x != y\n\n            Checks if two stage instances are not equal.\n\n        .. describe:: hash(x)\n\n            Returns the stage instance's hash.\n\n    Attributes\n    -----------\n    id: :class:`int`\n        The stage instance's ID.\n    guild: :class:`Guild`\n        The guild that the stage instance is running in.\n    channel_id: :class:`int`\n        The ID of the channel that the stage instance is running in.\n    topic: :class:`str`\n        The topic of the stage instance.\n    privacy_level: :class:`PrivacyLevel`\n        The privacy level of the stage instance.\n    discoverable_disabled: :class:`bool`\n        Whether discoverability for the stage instance is disabled.\n    scheduled_event_id: Optional[:class:`int`]\n        The ID of scheduled event that belongs to the stage instance if any.\n\n        .. versionadded:: 2.0\n    \"\"\"\n\n    __slots__ = (\n        '_state',\n        'id',\n        'guild',\n        'channel_id',\n        'topic',\n        'privacy_level',\n        'discoverable_disabled',\n        'scheduled_event_id',\n        '_cs_channel',\n        '_cs_scheduled_event',\n    )\n\n    def __init__(self, *, state: ConnectionState, guild: Guild, data: StageInstancePayload) -> None:\n        self._state: ConnectionState = state\n        self.guild: Guild = guild\n        self._update(data)\n\n    def _update(self, data: StageInstancePayload) -> None:\n        self.id: int = int(data['id'])\n        self.channel_id: int = int(data['channel_id'])\n        self.topic: str = data['topic']\n        self.privacy_level: PrivacyLevel = try_enum(PrivacyLevel, data['privacy_level'])\n        self.discoverable_disabled: bool = data.get('discoverable_disabled', False)\n        self.scheduled_event_id: Optional[int] = _get_as_snowflake(data, 'guild_scheduled_event_id')\n\n    def __repr__(self) -> str:\n        return f'<StageInstance id={self.id} guild={self.guild!r} channel_id={self.channel_id} topic={self.topic!r}>'\n\n    @cached_slot_property('_cs_channel')\n    def channel(self) -> Optional[StageChannel]:\n        \"\"\"Optional[:class:`StageChannel`]: The channel that stage instance is running in.\"\"\"\n        # the returned channel will always be a StageChannel or None\n        return self._state.get_channel(self.channel_id)  # type: ignore\n\n    @cached_slot_property('_cs_scheduled_event')\n    def scheduled_event(self) -> Optional[ScheduledEvent]:\n        \"\"\"Optional[:class:`ScheduledEvent`]: The scheduled event that belongs to the stage instance.\"\"\"\n        # Guild.get_scheduled_event() expects an int, we are passing Optional[int]\n        return self.guild.get_scheduled_event(self.scheduled_event_id)  # type: ignore\n\n    async def edit(\n        self,\n        *,\n        topic: str = MISSING,\n        privacy_level: PrivacyLevel = MISSING,\n        reason: Optional[str] = None,\n    ) -> None:\n        \"\"\"|coro|\n\n        Edits the stage instance.\n\n        You must have :attr:`~Permissions.manage_channels` to do this.\n\n        Parameters\n        -----------\n        topic: :class:`str`\n            The stage instance's new topic.\n        privacy_level: :class:`PrivacyLevel`\n            The stage instance's new privacy level.\n        reason: :class:`str`\n            The reason the stage instance was edited. Shows up on the audit log.\n\n        Raises\n        ------\n        TypeError\n            If the ``privacy_level`` parameter is not the proper type.\n        Forbidden\n            You do not have permissions to edit the stage instance.\n        HTTPException\n            Editing a stage instance failed.\n        \"\"\"\n\n        payload = {}\n\n        if topic is not MISSING:\n            payload['topic'] = topic\n\n        if privacy_level is not MISSING:\n            if not isinstance(privacy_level, PrivacyLevel):\n                raise TypeError('privacy_level field must be of type PrivacyLevel')\n\n            payload['privacy_level'] = privacy_level.value\n\n        if payload:\n            await self._state.http.edit_stage_instance(self.channel_id, **payload, reason=reason)\n\n    async def delete(self, *, reason: Optional[str] = None) -> None:\n        \"\"\"|coro|\n\n        Deletes the stage instance.\n\n        You must have :attr:`~Permissions.manage_channels` to do this.\n\n        Parameters\n        -----------\n        reason: :class:`str`\n            The reason the stage instance was deleted. Shows up on the audit log.\n\n        Raises\n        ------\n        Forbidden\n            You do not have permissions to delete the stage instance.\n        HTTPException\n            Deleting the stage instance failed.\n        \"\"\"\n        await self._state.http.delete_stage_instance(self.channel_id, reason=reason)\n"
  },
  {
    "path": "discord/state.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom __future__ import annotations\n\nimport asyncio\nfrom collections import deque, OrderedDict\nimport copy\nimport logging\nfrom typing import (\n    Dict,\n    Optional,\n    TYPE_CHECKING,\n    Type,\n    Union,\n    Callable,\n    Any,\n    List,\n    TypeVar,\n    Coroutine,\n    Sequence,\n    Generic,\n    Tuple,\n    Deque,\n    Literal,\n    overload,\n)\nimport weakref\nimport inspect\n\nimport os\n\nfrom .guild import Guild\nfrom .activity import BaseActivity\nfrom .sku import Entitlement\nfrom .user import User, ClientUser\nfrom .emoji import Emoji\nfrom .mentions import AllowedMentions\nfrom .partial_emoji import PartialEmoji\nfrom .message import Message\nfrom .channel import *\nfrom .channel import _channel_factory\nfrom .raw_models import *\nfrom .member import Member\nfrom .role import Role\nfrom .enums import ChannelType, try_enum, Status\nfrom . import utils\nfrom .flags import ApplicationFlags, Intents, MemberCacheFlags\nfrom .invite import Invite\nfrom .integrations import _integration_factory\nfrom .interactions import Interaction\nfrom .ui.view import ViewStore, View\nfrom .scheduled_event import ScheduledEvent\nfrom .stage_instance import StageInstance\nfrom .threads import Thread, ThreadMember\nfrom .sticker import GuildSticker\nfrom .automod import AutoModRule, AutoModAction\nfrom .audit_logs import AuditLogEntry\nfrom ._types import ClientT\n\nif TYPE_CHECKING:\n    from .abc import PrivateChannel\n    from .message import MessageableChannel\n    from .guild import GuildChannel\n    from .http import HTTPClient\n    from .voice_client import VoiceProtocol\n    from .gateway import DiscordWebSocket\n    from .ui.item import Item\n    from .ui.dynamic import DynamicItem\n    from .app_commands import CommandTree, Translator\n    from .poll import Poll\n\n    from .types.automod import AutoModerationRule, AutoModerationActionExecution\n    from .types.snowflake import Snowflake\n    from .types.activity import Activity as ActivityPayload\n    from .types.channel import DMChannel as DMChannelPayload\n    from .types.user import User as UserPayload, PartialUser as PartialUserPayload\n    from .types.emoji import Emoji as EmojiPayload, PartialEmoji as PartialEmojiPayload\n    from .types.sticker import GuildSticker as GuildStickerPayload\n    from .types.guild import Guild as GuildPayload\n    from .types.message import Message as MessagePayload, PartialMessage as PartialMessagePayload\n    from .types import gateway as gw\n    from .types.command import GuildApplicationCommandPermissions as GuildApplicationCommandPermissionsPayload\n\n    T = TypeVar('T')\n    Channel = Union[GuildChannel, PrivateChannel, PartialMessageable]\n\n\nclass ChunkRequest:\n    def __init__(\n        self,\n        guild_id: int,\n        shard_id: int,\n        loop: asyncio.AbstractEventLoop,\n        resolver: Callable[[int], Any],\n        *,\n        cache: bool = True,\n    ) -> None:\n        self.guild_id: int = guild_id\n        self.shard_id: int = shard_id\n        self.resolver: Callable[[int], Any] = resolver\n        self.loop: asyncio.AbstractEventLoop = loop\n        self.cache: bool = cache\n        self.nonce: str = os.urandom(16).hex()\n        self.buffer: List[Member] = []\n        self.waiters: List[asyncio.Future[List[Member]]] = []\n\n    def add_members(self, members: List[Member]) -> None:\n        self.buffer.extend(members)\n        if self.cache:\n            guild = self.resolver(self.guild_id)\n            if guild is None:\n                return\n\n            for member in members:\n                existing = guild.get_member(member.id)\n                if existing is None or existing.joined_at is None:\n                    guild._add_member(member)\n\n    async def wait(self) -> List[Member]:\n        future = self.loop.create_future()\n        self.waiters.append(future)\n        try:\n            return await future\n        finally:\n            self.waiters.remove(future)\n\n    def get_future(self) -> asyncio.Future[List[Member]]:\n        future = self.loop.create_future()\n        self.waiters.append(future)\n        return future\n\n    def done(self) -> None:\n        for future in self.waiters:\n            if not future.done():\n                future.set_result(self.buffer)\n\n\n_log = logging.getLogger(__name__)\n\n\nasync def logging_coroutine(coroutine: Coroutine[Any, Any, T], *, info: str) -> Optional[T]:\n    try:\n        await coroutine\n    except Exception:\n        _log.exception('Exception occurred during %s', info)\n\n\nclass ConnectionState(Generic[ClientT]):\n    if TYPE_CHECKING:\n        _get_websocket: Callable[..., DiscordWebSocket]\n        _get_client: Callable[..., ClientT]\n        _parsers: Dict[str, Callable[[Dict[str, Any]], None]]\n\n    def __init__(\n        self,\n        *,\n        dispatch: Callable[..., Any],\n        handlers: Dict[str, Callable[..., Any]],\n        hooks: Dict[str, Callable[..., Coroutine[Any, Any, Any]]],\n        http: HTTPClient,\n        **options: Any,\n    ) -> None:\n        # Set later, after Client.login\n        self.loop: asyncio.AbstractEventLoop = utils.MISSING\n        self.http: HTTPClient = http\n        self.max_messages: Optional[int] = options.get('max_messages', 1000)\n        if self.max_messages is not None and self.max_messages <= 0:\n            self.max_messages = 1000\n\n        self.dispatch: Callable[..., Any] = dispatch\n        self.handlers: Dict[str, Callable[..., Any]] = handlers\n        self.hooks: Dict[str, Callable[..., Coroutine[Any, Any, Any]]] = hooks\n        self.shard_count: Optional[int] = None\n        self._ready_task: Optional[asyncio.Task] = None\n        self.application_id: Optional[int] = utils._get_as_snowflake(options, 'application_id')\n        self.application_flags: ApplicationFlags = utils.MISSING\n        self.heartbeat_timeout: float = options.get('heartbeat_timeout', 60.0)\n        self.guild_ready_timeout: float = options.get('guild_ready_timeout', 2.0)\n        if self.guild_ready_timeout < 0:\n            raise ValueError('guild_ready_timeout cannot be negative')\n\n        allowed_mentions = options.get('allowed_mentions')\n\n        if allowed_mentions is not None and not isinstance(allowed_mentions, AllowedMentions):\n            raise TypeError('allowed_mentions parameter must be AllowedMentions')\n\n        self.allowed_mentions: Optional[AllowedMentions] = allowed_mentions\n        self._chunk_requests: Dict[Union[int, str], ChunkRequest] = {}\n\n        activity = options.get('activity', None)\n        if activity:\n            if not isinstance(activity, BaseActivity):\n                raise TypeError('activity parameter must derive from BaseActivity.')\n\n            activity = activity.to_dict()\n\n        status = options.get('status', None)\n        if status:\n            if status is Status.offline:\n                status = 'invisible'\n            else:\n                status = str(status)\n\n        intents = options.get('intents', None)\n        if intents is not None:\n            if not isinstance(intents, Intents):\n                raise TypeError(f'intents parameter must be Intent not {type(intents)!r}')\n        else:\n            intents = Intents.default()\n\n        if not intents.guilds:\n            _log.warning('Guilds intent seems to be disabled. This may cause state related issues.')\n\n        self._chunk_guilds: bool = options.get('chunk_guilds_at_startup', intents.members)\n\n        # Ensure these two are set properly\n        if not intents.members and self._chunk_guilds:\n            raise ValueError('Intents.members must be enabled to chunk guilds at startup.')\n\n        cache_flags = options.get('member_cache_flags', None)\n        if cache_flags is None:\n            cache_flags = MemberCacheFlags.from_intents(intents)\n        else:\n            if not isinstance(cache_flags, MemberCacheFlags):\n                raise TypeError(f'member_cache_flags parameter must be MemberCacheFlags not {type(cache_flags)!r}')\n\n            cache_flags._verify_intents(intents)\n\n        self.member_cache_flags: MemberCacheFlags = cache_flags\n        self._activity: Optional[ActivityPayload] = activity\n        self._status: Optional[str] = status\n        self._intents: Intents = intents\n        self._command_tree: Optional[CommandTree] = None\n        self._translator: Optional[Translator] = None\n\n        if not intents.members or cache_flags._empty:\n            self.store_user = self.store_user_no_intents\n\n        self.parsers: Dict[str, Callable[[Any], None]]\n        self.parsers = parsers = {}\n        for attr, func in inspect.getmembers(self):\n            if attr.startswith('parse_'):\n                parsers[attr[6:].upper()] = func\n\n        self.clear()\n\n    # For some reason Discord still sends emoji/sticker data in payloads\n    # This makes it hard to actually swap out the appropriate store methods\n    # So this is checked instead, it's a small penalty to pay\n    @property\n    def cache_guild_expressions(self) -> bool:\n        return self._intents.emojis_and_stickers\n\n    async def close(self) -> None:\n        for voice in self.voice_clients:\n            try:\n                await voice.disconnect(force=True)\n            except Exception:\n                # if an error happens during disconnects, disregard it.\n                pass\n\n        if self._translator:\n            await self._translator.unload()\n\n        # Purposefully don't call `clear` because users rely on cache being available post-close\n\n    def clear(self, *, views: bool = True) -> None:\n        self.user: Optional[ClientUser] = None\n        self._users: weakref.WeakValueDictionary[int, User] = weakref.WeakValueDictionary()\n        self._emojis: Dict[int, Emoji] = {}\n        self._stickers: Dict[int, GuildSticker] = {}\n        self._guilds: Dict[int, Guild] = {}\n        if views:\n            self._view_store: ViewStore = ViewStore(self)\n\n        self._voice_clients: Dict[int, VoiceProtocol] = {}\n\n        # LRU of max size 128\n        self._private_channels: OrderedDict[int, PrivateChannel] = OrderedDict()\n        # extra dict to look up private channels by user id\n        self._private_channels_by_user: Dict[int, DMChannel] = {}\n        if self.max_messages is not None:\n            self._messages: Optional[Deque[Message]] = deque(maxlen=self.max_messages)\n        else:\n            self._messages: Optional[Deque[Message]] = None\n\n    def process_chunk_requests(self, guild_id: int, nonce: Optional[str], members: List[Member], complete: bool) -> None:\n        removed = []\n        for key, request in self._chunk_requests.items():\n            if request.guild_id == guild_id and request.nonce == nonce:\n                request.add_members(members)\n                if complete:\n                    request.done()\n                    removed.append(key)\n\n        for key in removed:\n            del self._chunk_requests[key]\n\n    def clear_chunk_requests(self, shard_id: int | None) -> None:\n        removed = []\n        for key, request in self._chunk_requests.items():\n            if shard_id is None or request.shard_id == shard_id:\n                request.done()\n                removed.append(key)\n\n        for key in removed:\n            del self._chunk_requests[key]\n\n    def call_handlers(self, key: str, *args: Any, **kwargs: Any) -> None:\n        try:\n            func = self.handlers[key]\n        except KeyError:\n            pass\n        else:\n            func(*args, **kwargs)\n\n    async def call_hooks(self, key: str, *args: Any, **kwargs: Any) -> None:\n        try:\n            coro = self.hooks[key]\n        except KeyError:\n            pass\n        else:\n            await coro(*args, **kwargs)\n\n    @property\n    def self_id(self) -> Optional[int]:\n        u = self.user\n        return u.id if u else None\n\n    @property\n    def intents(self) -> Intents:\n        ret = Intents.none()\n        ret.value = self._intents.value\n        return ret\n\n    @property\n    def voice_clients(self) -> List[VoiceProtocol]:\n        return list(self._voice_clients.values())\n\n    def _get_voice_client(self, guild_id: Optional[int]) -> Optional[VoiceProtocol]:\n        # the keys of self._voice_clients are ints\n        return self._voice_clients.get(guild_id)  # type: ignore\n\n    def _add_voice_client(self, guild_id: int, voice: VoiceProtocol) -> None:\n        self._voice_clients[guild_id] = voice\n\n    def _remove_voice_client(self, guild_id: int) -> None:\n        self._voice_clients.pop(guild_id, None)\n\n    def _update_references(self, ws: DiscordWebSocket) -> None:\n        for vc in self.voice_clients:\n            vc.main_ws = ws  # type: ignore # Silencing the unknown attribute (ok at runtime).\n\n    def store_user(self, data: Union[UserPayload, PartialUserPayload], *, cache: bool = True) -> User:\n        # this way is 300% faster than `dict.setdefault`.\n        user_id = int(data['id'])\n        try:\n            return self._users[user_id]\n        except KeyError:\n            user = User(state=self, data=data)\n            if cache:\n                self._users[user_id] = user\n            return user\n\n    def store_user_no_intents(self, data: Union[UserPayload, PartialUserPayload], *, cache: bool = True) -> User:\n        return User(state=self, data=data)\n\n    def create_user(self, data: Union[UserPayload, PartialUserPayload]) -> User:\n        return User(state=self, data=data)\n\n    def get_user(self, id: int) -> Optional[User]:\n        return self._users.get(id)\n\n    def store_emoji(self, guild: Guild, data: EmojiPayload) -> Emoji:\n        # the id will be present here\n        emoji_id = int(data['id'])  # type: ignore\n        self._emojis[emoji_id] = emoji = Emoji(guild=guild, state=self, data=data)\n        return emoji\n\n    def store_sticker(self, guild: Guild, data: GuildStickerPayload) -> GuildSticker:\n        sticker_id = int(data['id'])\n        self._stickers[sticker_id] = sticker = GuildSticker(state=self, data=data)\n        return sticker\n\n    def store_view(self, view: View, message_id: Optional[int] = None, interaction_id: Optional[int] = None) -> None:\n        if interaction_id is not None:\n            self._view_store.remove_interaction_mapping(interaction_id)\n        self._view_store.add_view(view, message_id)\n\n    def prevent_view_updates_for(self, message_id: int) -> Optional[View]:\n        return self._view_store.remove_message_tracking(message_id)\n\n    def store_dynamic_items(self, *items: Type[DynamicItem[Item[Any]]]) -> None:\n        self._view_store.add_dynamic_items(*items)\n\n    def remove_dynamic_items(self, *items: Type[DynamicItem[Item[Any]]]) -> None:\n        self._view_store.remove_dynamic_items(*items)\n\n    @property\n    def persistent_views(self) -> Sequence[View]:\n        return self._view_store.persistent_views\n\n    @property\n    def guilds(self) -> Sequence[Guild]:\n        return utils.SequenceProxy(self._guilds.values())\n\n    def _get_guild(self, guild_id: Optional[int]) -> Optional[Guild]:\n        # the keys of self._guilds are ints\n        return self._guilds.get(guild_id)  # type: ignore\n\n    def _get_or_create_unavailable_guild(self, guild_id: int, *, data: Optional[Dict[str, Any]] = None) -> Guild:\n        return self._guilds.get(guild_id) or Guild._create_unavailable(state=self, guild_id=guild_id, data=data)\n\n    def _add_guild(self, guild: Guild) -> None:\n        self._guilds[guild.id] = guild\n\n    def _remove_guild(self, guild: Guild) -> None:\n        self._guilds.pop(guild.id, None)\n\n        for emoji in guild.emojis:\n            self._emojis.pop(emoji.id, None)\n\n        for sticker in guild.stickers:\n            self._stickers.pop(sticker.id, None)\n\n        del guild\n\n    @property\n    def emojis(self) -> Sequence[Emoji]:\n        return utils.SequenceProxy(self._emojis.values())\n\n    @property\n    def stickers(self) -> Sequence[GuildSticker]:\n        return utils.SequenceProxy(self._stickers.values())\n\n    def get_emoji(self, emoji_id: Optional[int]) -> Optional[Emoji]:\n        # the keys of self._emojis are ints\n        return self._emojis.get(emoji_id)  # type: ignore\n\n    def get_sticker(self, sticker_id: Optional[int]) -> Optional[GuildSticker]:\n        # the keys of self._stickers are ints\n        return self._stickers.get(sticker_id)  # type: ignore\n\n    @property\n    def private_channels(self) -> Sequence[PrivateChannel]:\n        return utils.SequenceProxy(self._private_channels.values())\n\n    def _get_private_channel(self, channel_id: Optional[int]) -> Optional[PrivateChannel]:\n        try:\n            # the keys of self._private_channels are ints\n            value = self._private_channels[channel_id]  # type: ignore\n        except KeyError:\n            return None\n        else:\n            # Type narrowing can't figure out that channel_id isn't None here\n            self._private_channels.move_to_end(channel_id)  # type: ignore\n            return value\n\n    def _get_private_channel_by_user(self, user_id: Optional[int]) -> Optional[DMChannel]:\n        # the keys of self._private_channels are ints\n        return self._private_channels_by_user.get(user_id)  # type: ignore\n\n    def _add_private_channel(self, channel: PrivateChannel) -> None:\n        channel_id = channel.id\n        self._private_channels[channel_id] = channel\n\n        if len(self._private_channels) > 128:\n            _, to_remove = self._private_channels.popitem(last=False)\n            if isinstance(to_remove, DMChannel) and to_remove.recipient:\n                self._private_channels_by_user.pop(to_remove.recipient.id, None)\n\n        if isinstance(channel, DMChannel) and channel.recipient:\n            self._private_channels_by_user[channel.recipient.id] = channel\n\n    def add_dm_channel(self, data: DMChannelPayload) -> DMChannel:\n        # self.user is *always* cached when this is called\n        channel = DMChannel(me=self.user, state=self, data=data)  # type: ignore\n        self._add_private_channel(channel)\n        return channel\n\n    def _remove_private_channel(self, channel: PrivateChannel) -> None:\n        self._private_channels.pop(channel.id, None)\n        if isinstance(channel, DMChannel):\n            recipient = channel.recipient\n            if recipient is not None:\n                self._private_channels_by_user.pop(recipient.id, None)\n\n    def _get_message(self, msg_id: Optional[int]) -> Optional[Message]:\n        return utils.find(lambda m: m.id == msg_id, reversed(self._messages)) if self._messages else None\n\n    def _get_poll(self, msg_id: Optional[int]) -> Optional[Poll]:\n        message = self._get_message(msg_id)\n        if not message:\n            return\n        return message.poll\n\n    def _add_guild_from_data(self, data: GuildPayload) -> Guild:\n        guild = Guild(data=data, state=self)\n        self._add_guild(guild)\n        return guild\n\n    def _guild_needs_chunking(self, guild: Guild) -> bool:\n        # If presences are enabled then we get back the old guild.large behaviour\n        return self._chunk_guilds and not guild.chunked and not (self._intents.presences and not guild.large)\n\n    def _get_guild_channel(\n        self, data: PartialMessagePayload, guild_id: Optional[int] = None\n    ) -> Tuple[Union[Channel, Thread], Optional[Guild]]:\n        channel_id = int(data['channel_id'])\n        try:\n            guild_id = guild_id or int(data['guild_id'])\n            guild = self._get_guild(guild_id)\n        except KeyError:\n            channel = DMChannel._from_message(self, channel_id)\n            guild = None\n        else:\n            channel = guild and guild._resolve_channel(channel_id)\n\n        return channel or PartialMessageable(state=self, guild_id=guild_id, id=channel_id), guild\n\n    def _update_poll_counts(self, message: Message, answer_id: int, added: bool, self_voted: bool = False) -> Optional[Poll]:\n        poll = message.poll\n        if not poll:\n            return\n        poll._handle_vote(answer_id, added, self_voted)\n        return poll\n\n    async def chunker(\n        self, guild_id: int, query: str = '', limit: int = 0, presences: bool = False, *, nonce: Optional[str] = None\n    ) -> None:\n        ws = self._get_websocket(guild_id)  # This is ignored upstream\n        await ws.request_chunks(guild_id, query=query, limit=limit, presences=presences, nonce=nonce)\n\n    async def query_members(\n        self, guild: Guild, query: Optional[str], limit: int, user_ids: Optional[List[int]], cache: bool, presences: bool\n    ) -> List[Member]:\n        guild_id = guild.id\n        ws = self._get_websocket(guild_id)\n        if ws is None:\n            raise RuntimeError('Somehow do not have a websocket for this guild_id')\n\n        request = ChunkRequest(guild.id, guild.shard_id, self.loop, self._get_guild, cache=cache)\n        self._chunk_requests[request.nonce] = request\n\n        try:\n            # start the query operation\n            await ws.request_chunks(\n                guild_id, query=query, limit=limit, user_ids=user_ids, presences=presences, nonce=request.nonce\n            )\n            return await asyncio.wait_for(request.wait(), timeout=30.0)\n        except asyncio.TimeoutError:\n            _log.warning('Timed out waiting for chunks with query %r and limit %d for guild_id %d', query, limit, guild_id)\n            raise\n\n    async def _delay_ready(self) -> None:\n        try:\n            states = []\n            while True:\n                # this snippet of code is basically waiting N seconds\n                # until the last GUILD_CREATE was sent\n                try:\n                    guild = await asyncio.wait_for(self._ready_state.get(), timeout=self.guild_ready_timeout)\n                except asyncio.TimeoutError:\n                    break\n                else:\n                    if self._guild_needs_chunking(guild):\n                        future = await self.chunk_guild(guild, wait=False)\n                        states.append((guild, future))\n                    else:\n                        if guild.unavailable is False:\n                            self.dispatch('guild_available', guild)\n                        else:\n                            self.dispatch('guild_join', guild)\n\n            for guild, future in states:\n                timeout = self._chunk_timeout(guild)\n\n                try:\n                    await asyncio.wait_for(future, timeout=timeout)\n                except asyncio.TimeoutError:\n                    _log.warning('Shard ID %s timed out waiting for chunks for guild_id %s.', guild.shard_id, guild.id)\n\n                if guild.unavailable is False:\n                    self.dispatch('guild_available', guild)\n                else:\n                    self.dispatch('guild_join', guild)\n\n            # remove the state\n            try:\n                del self._ready_state\n            except AttributeError:\n                pass  # already been deleted somehow\n\n        except asyncio.CancelledError:\n            pass\n        else:\n            # dispatch the event\n            self.call_handlers('ready')\n            self.dispatch('ready')\n        finally:\n            self._ready_task = None\n\n    def parse_ready(self, data: gw.ReadyEvent) -> None:\n        if self._ready_task is not None:\n            self._ready_task.cancel()\n\n        self._ready_state: asyncio.Queue[Guild] = asyncio.Queue()\n        self.clear(views=False)\n        self.clear_chunk_requests(None)\n        self.user = user = ClientUser(state=self, data=data['user'])\n        self._users[user.id] = user  # type: ignore\n\n        if self.application_id is None:\n            try:\n                application = data['application']\n            except KeyError:\n                pass\n            else:\n                self.application_id = utils._get_as_snowflake(application, 'id')\n                self.application_flags: ApplicationFlags = ApplicationFlags._from_value(application['flags'])\n\n        for guild_data in data['guilds']:\n            self._add_guild_from_data(guild_data)  # type: ignore\n\n        self.dispatch('connect')\n        self._ready_task = asyncio.create_task(self._delay_ready())\n\n    def parse_resumed(self, data: gw.ResumedEvent) -> None:\n        self.dispatch('resumed')\n\n    def parse_message_create(self, data: gw.MessageCreateEvent) -> None:\n        channel, _ = self._get_guild_channel(data)\n        # channel would be the correct type here\n        message = Message(channel=channel, data=data, state=self)  # type: ignore\n        self.dispatch('message', message)\n        if self._messages is not None:\n            self._messages.append(message)\n        # we ensure that the channel is either a TextChannel, VoiceChannel, or Thread\n        if channel and channel.__class__ in (TextChannel, VoiceChannel, Thread, StageChannel):\n            channel.last_message_id = message.id  # type: ignore\n\n    def parse_message_delete(self, data: gw.MessageDeleteEvent) -> None:\n        raw = RawMessageDeleteEvent(data)\n        found = self._get_message(raw.message_id)\n        raw.cached_message = found\n        self.dispatch('raw_message_delete', raw)\n        if self._messages is not None and found is not None:\n            self.dispatch('message_delete', found)\n            self._messages.remove(found)\n\n    def parse_message_delete_bulk(self, data: gw.MessageDeleteBulkEvent) -> None:\n        raw = RawBulkMessageDeleteEvent(data)\n        if self._messages:\n            found_messages = [message for message in self._messages if message.id in raw.message_ids]\n        else:\n            found_messages = []\n        raw.cached_messages = found_messages\n        self.dispatch('raw_bulk_message_delete', raw)\n        if found_messages:\n            self.dispatch('bulk_message_delete', found_messages)\n            for msg in found_messages:\n                # self._messages won't be None here\n                self._messages.remove(msg)  # type: ignore\n\n    def parse_message_update(self, data: gw.MessageUpdateEvent) -> None:\n        raw = RawMessageUpdateEvent(data)\n        message = self._get_message(raw.message_id)\n        if message is not None:\n            older_message = copy.copy(message)\n            raw.cached_message = older_message\n            self.dispatch('raw_message_edit', raw)\n            message._update(data)\n            # Coerce the `after` parameter to take the new updated Member\n            # ref: #5999\n            older_message.author = message.author\n            self.dispatch('message_edit', older_message, message)\n        else:\n            self.dispatch('raw_message_edit', raw)\n\n        if 'components' in data:\n            try:\n                entity_id = int(data['interaction']['id'])\n            except (KeyError, ValueError):\n                entity_id = raw.message_id\n\n            if self._view_store.is_message_tracked(entity_id):\n                self._view_store.update_from_message(entity_id, data['components'])\n\n    def parse_message_reaction_add(self, data: gw.MessageReactionAddEvent) -> None:\n        emoji = PartialEmoji.from_dict(data['emoji'])\n        emoji._state = self\n        raw = RawReactionActionEvent(data, emoji, 'REACTION_ADD')\n\n        member_data = data.get('member')\n        if member_data:\n            guild = self._get_guild(raw.guild_id)\n            if guild is not None:\n                raw.member = Member(data=member_data, guild=guild, state=self)\n            else:\n                raw.member = None\n        else:\n            raw.member = None\n        self.dispatch('raw_reaction_add', raw)\n\n        # rich interface here\n        message = self._get_message(raw.message_id)\n        if message is not None:\n            emoji = self._upgrade_partial_emoji(emoji)\n            reaction = message._add_reaction(data, emoji, raw.user_id)\n            user = raw.member or self._get_reaction_user(message.channel, raw.user_id)\n\n            if user:\n                self.dispatch('reaction_add', reaction, user)\n\n    def parse_message_reaction_remove_all(self, data: gw.MessageReactionRemoveAllEvent) -> None:\n        raw = RawReactionClearEvent(data)\n        self.dispatch('raw_reaction_clear', raw)\n\n        message = self._get_message(raw.message_id)\n        if message is not None:\n            old_reactions = message.reactions.copy()\n            message.reactions.clear()\n            self.dispatch('reaction_clear', message, old_reactions)\n\n    def parse_message_reaction_remove(self, data: gw.MessageReactionRemoveEvent) -> None:\n        emoji = PartialEmoji.from_dict(data['emoji'])\n        emoji._state = self\n        raw = RawReactionActionEvent(data, emoji, 'REACTION_REMOVE')\n        self.dispatch('raw_reaction_remove', raw)\n\n        message = self._get_message(raw.message_id)\n        if message is not None:\n            emoji = self._upgrade_partial_emoji(emoji)\n            try:\n                reaction = message._remove_reaction(data, emoji, raw.user_id)\n            except (AttributeError, ValueError):  # eventual consistency lol\n                pass\n            else:\n                user = self._get_reaction_user(message.channel, raw.user_id)\n                if user:\n                    self.dispatch('reaction_remove', reaction, user)\n\n    def parse_message_reaction_remove_emoji(self, data: gw.MessageReactionRemoveEmojiEvent) -> None:\n        emoji = PartialEmoji.from_dict(data['emoji'])\n        emoji._state = self\n        raw = RawReactionClearEmojiEvent(data, emoji)\n        self.dispatch('raw_reaction_clear_emoji', raw)\n\n        message = self._get_message(raw.message_id)\n        if message is not None:\n            try:\n                reaction = message._clear_emoji(emoji)\n            except (AttributeError, ValueError):  # eventual consistency lol\n                pass\n            else:\n                if reaction:\n                    self.dispatch('reaction_clear_emoji', reaction)\n\n    def parse_interaction_create(self, data: gw.InteractionCreateEvent) -> None:\n        interaction = Interaction(data=data, state=self)\n        if data['type'] in (2, 4) and self._command_tree:  # application command and auto complete\n            self._command_tree._from_interaction(interaction)\n        elif data['type'] == 3:  # interaction component\n            # These keys are always there for this interaction type\n            inner_data = data['data']\n            custom_id = inner_data['custom_id']\n            component_type = inner_data['component_type']\n            self._view_store.dispatch_view(component_type, custom_id, interaction)\n        elif data['type'] == 5:  # modal submit\n            # These keys are always there for this interaction type\n            inner_data = data['data']\n            custom_id = inner_data['custom_id']\n            components = inner_data['components']\n            self._view_store.dispatch_modal(custom_id, interaction, components)\n        self.dispatch('interaction', interaction)\n\n    def parse_presence_update(self, data: gw.PresenceUpdateEvent) -> None:\n        guild_id = utils._get_as_snowflake(data, 'guild_id')\n        # guild_id won't be None here\n        guild = self._get_guild(guild_id)\n        if guild is None:\n            _log.debug('PRESENCE_UPDATE referencing an unknown guild ID: %s. Discarding.', guild_id)\n            return\n\n        user = data['user']\n        member_id = int(user['id'])\n        member = guild.get_member(member_id)\n        if member is None:\n            _log.debug('PRESENCE_UPDATE referencing an unknown member ID: %s. Discarding', member_id)\n            return\n\n        old_member = Member._copy(member)\n        user_update = member._presence_update(data=data, user=user)\n        if user_update:\n            self.dispatch('user_update', user_update[0], user_update[1])\n\n        self.dispatch('presence_update', old_member, member)\n\n    def parse_user_update(self, data: gw.UserUpdateEvent) -> None:\n        if self.user:\n            self.user._update(data)\n\n    def parse_invite_create(self, data: gw.InviteCreateEvent) -> None:\n        invite = Invite.from_gateway(state=self, data=data)\n        self.dispatch('invite_create', invite)\n\n    def parse_invite_delete(self, data: gw.InviteDeleteEvent) -> None:\n        invite = Invite.from_gateway(state=self, data=data)\n        self.dispatch('invite_delete', invite)\n\n    def parse_channel_delete(self, data: gw.ChannelDeleteEvent) -> None:\n        guild = self._get_guild(utils._get_as_snowflake(data, 'guild_id'))\n        channel_id = int(data['id'])\n        if guild is not None:\n            channel = guild.get_channel(channel_id)\n            if channel is not None:\n                guild._remove_channel(channel)\n                self.dispatch('guild_channel_delete', channel)\n\n                if channel.type in (ChannelType.voice, ChannelType.stage_voice):\n                    for s in guild.scheduled_events:\n                        if s.channel_id == channel.id:\n                            guild._scheduled_events.pop(s.id)\n                            self.dispatch('scheduled_event_delete', s)\n\n                threads = guild._remove_threads_by_channel(channel_id)\n\n                for thread in threads:\n                    self.dispatch('thread_delete', thread)\n                    self.dispatch('raw_thread_delete', RawThreadDeleteEvent._from_thread(thread))\n\n    def parse_channel_update(self, data: gw.ChannelUpdateEvent) -> None:\n        channel_type = try_enum(ChannelType, data.get('type'))\n        channel_id = int(data['id'])\n        if channel_type is ChannelType.group:\n            channel = self._get_private_channel(channel_id)\n            if channel is not None:\n                old_channel = copy.copy(channel)\n                # the channel is a GroupChannel rather than PrivateChannel\n                channel._update_group(data)  # type: ignore\n                self.dispatch('private_channel_update', old_channel, channel)\n                return\n            else:\n                _log.debug('CHANNEL_UPDATE referencing an unknown channel ID: %s. Discarding.', channel_id)\n\n        guild_id = utils._get_as_snowflake(data, 'guild_id')\n        guild = self._get_guild(guild_id)\n        if guild is not None:\n            channel = guild.get_channel(channel_id)\n            if channel is not None:\n                old_channel = copy.copy(channel)\n                channel._update(guild, data)  # type: ignore # the data payload varies based on the channel type.\n                self.dispatch('guild_channel_update', old_channel, channel)\n            else:\n                _log.debug('CHANNEL_UPDATE referencing an unknown channel ID: %s. Discarding.', channel_id)\n        else:\n            _log.debug('CHANNEL_UPDATE referencing an unknown guild ID: %s. Discarding.', guild_id)\n\n    def parse_channel_create(self, data: gw.ChannelCreateEvent) -> None:\n        factory, ch_type = _channel_factory(data['type'])\n        if factory is None:\n            _log.debug('CHANNEL_CREATE referencing an unknown channel type %s. Discarding.', data['type'])\n            return\n\n        guild_id = utils._get_as_snowflake(data, 'guild_id')\n        guild = self._get_guild(guild_id)\n        if guild is not None:\n            # the factory can't be a DMChannel or GroupChannel here\n            channel = factory(guild=guild, state=self, data=data)  # type: ignore\n            guild._add_channel(channel)  # type: ignore\n            self.dispatch('guild_channel_create', channel)\n        else:\n            _log.debug('CHANNEL_CREATE referencing an unknown guild ID: %s. Discarding.', guild_id)\n            return\n\n    def parse_channel_pins_update(self, data: gw.ChannelPinsUpdateEvent) -> None:\n        channel_id = int(data['channel_id'])\n        try:\n            guild = self._get_guild(int(data['guild_id']))\n        except KeyError:\n            guild = None\n            channel = self._get_private_channel(channel_id)\n        else:\n            channel = guild and guild._resolve_channel(channel_id)\n\n        if channel is None:\n            _log.debug('CHANNEL_PINS_UPDATE referencing an unknown channel ID: %s. Discarding.', channel_id)\n            return\n\n        last_pin = utils.parse_time(data.get('last_pin_timestamp'))\n\n        if guild is None:\n            self.dispatch('private_channel_pins_update', channel, last_pin)\n        else:\n            self.dispatch('guild_channel_pins_update', channel, last_pin)\n\n    def parse_thread_create(self, data: gw.ThreadCreateEvent) -> None:\n        guild_id = int(data['guild_id'])\n        guild: Optional[Guild] = self._get_guild(guild_id)\n        if guild is None:\n            _log.debug('THREAD_CREATE referencing an unknown guild ID: %s. Discarding', guild_id)\n            return\n\n        thread = Thread(guild=guild, state=guild._state, data=data)\n        has_thread = guild.get_thread(thread.id)\n        guild._add_thread(thread)\n        if not has_thread:\n            if data.get('newly_created'):\n                if thread.parent.__class__ is ForumChannel:\n                    thread.parent.last_message_id = thread.id  # type: ignore\n\n                self.dispatch('thread_create', thread)\n            else:\n                self.dispatch('thread_join', thread)\n\n    def parse_thread_update(self, data: gw.ThreadUpdateEvent) -> None:\n        guild_id = int(data['guild_id'])\n        guild = self._get_guild(guild_id)\n        if guild is None:\n            _log.debug('THREAD_UPDATE referencing an unknown guild ID: %s. Discarding', guild_id)\n            return\n\n        raw = RawThreadUpdateEvent(data)\n        raw.thread = thread = guild.get_thread(raw.thread_id)\n        self.dispatch('raw_thread_update', raw)\n        if thread is not None:\n            old = copy.copy(thread)\n            thread._update(data)\n            if thread.archived:\n                guild._remove_thread(thread)\n            self.dispatch('thread_update', old, thread)\n        else:\n            thread = Thread(guild=guild, state=guild._state, data=data)\n            if not thread.archived:\n                guild._add_thread(thread)\n            self.dispatch('thread_join', thread)\n\n    def parse_thread_delete(self, data: gw.ThreadDeleteEvent) -> None:\n        guild_id = int(data['guild_id'])\n        guild = self._get_guild(guild_id)\n        if guild is None:\n            _log.debug('THREAD_DELETE referencing an unknown guild ID: %s. Discarding', guild_id)\n            return\n\n        raw = RawThreadDeleteEvent(data)\n        raw.thread = thread = guild.get_thread(raw.thread_id)\n        self.dispatch('raw_thread_delete', raw)\n\n        if thread is not None:\n            guild._remove_thread(thread)\n            self.dispatch('thread_delete', thread)\n\n    def parse_thread_list_sync(self, data: gw.ThreadListSyncEvent) -> None:\n        guild_id = int(data['guild_id'])\n        guild: Optional[Guild] = self._get_guild(guild_id)\n        if guild is None:\n            _log.debug('THREAD_LIST_SYNC referencing an unknown guild ID: %s. Discarding', guild_id)\n            return\n\n        try:\n            channel_ids = {int(i) for i in data['channel_ids']}\n        except KeyError:\n            # If not provided, then the entire guild is being synced\n            # So all previous thread data should be overwritten\n            previous_threads = guild._threads.copy()\n            guild._clear_threads()\n        else:\n            previous_threads = guild._filter_threads(channel_ids)\n\n        threads = {d['id']: guild._store_thread(d) for d in data.get('threads', [])}\n\n        for member in data.get('members', []):\n            try:\n                # note: member['id'] is the thread_id\n                thread = threads[member['id']]\n            except KeyError:\n                continue\n            else:\n                thread._add_member(ThreadMember(thread, member))\n\n        for thread in threads.values():\n            old = previous_threads.pop(thread.id, None)\n            if old is None:\n                self.dispatch('thread_join', thread)\n\n        for thread in previous_threads.values():\n            self.dispatch('thread_remove', thread)\n\n    def parse_thread_member_update(self, data: gw.ThreadMemberUpdate) -> None:\n        guild_id = int(data['guild_id'])\n        guild: Optional[Guild] = self._get_guild(guild_id)\n        if guild is None:\n            _log.debug('THREAD_MEMBER_UPDATE referencing an unknown guild ID: %s. Discarding', guild_id)\n            return\n\n        thread_id = int(data['id'])\n        thread: Optional[Thread] = guild.get_thread(thread_id)\n        if thread is None:\n            _log.debug('THREAD_MEMBER_UPDATE referencing an unknown thread ID: %s. Discarding', thread_id)\n            return\n\n        member = ThreadMember(thread, data)\n        thread.me = member\n\n    def parse_thread_members_update(self, data: gw.ThreadMembersUpdate) -> None:\n        guild_id = int(data['guild_id'])\n        guild: Optional[Guild] = self._get_guild(guild_id)\n        if guild is None:\n            _log.debug('THREAD_MEMBERS_UPDATE referencing an unknown guild ID: %s. Discarding', guild_id)\n            return\n\n        thread_id = int(data['id'])\n        thread: Optional[Thread] = guild.get_thread(thread_id)\n        raw = RawThreadMembersUpdate(data)\n        if thread is None:\n            _log.debug('THREAD_MEMBERS_UPDATE referencing an unknown thread ID: %s. Discarding', thread_id)\n            return\n\n        added_members = [ThreadMember(thread, d) for d in data.get('added_members', [])]\n        removed_member_ids = [int(x) for x in data.get('removed_member_ids', [])]\n        self_id = self.self_id\n        for member in added_members:\n            if member.id != self_id:\n                thread._add_member(member)\n                self.dispatch('thread_member_join', member)\n            else:\n                thread.me = member\n                self.dispatch('thread_join', thread)\n\n        for member_id in removed_member_ids:\n            if member_id != self_id:\n                member = thread._pop_member(member_id)\n                self.dispatch('raw_thread_member_remove', raw)\n                if member is not None:\n                    self.dispatch('thread_member_remove', member)\n            else:\n                self.dispatch('thread_remove', thread)\n\n    def parse_guild_member_add(self, data: gw.GuildMemberAddEvent) -> None:\n        guild = self._get_guild(int(data['guild_id']))\n        if guild is None:\n            _log.debug('GUILD_MEMBER_ADD referencing an unknown guild ID: %s. Discarding.', data['guild_id'])\n            return\n\n        member = Member(guild=guild, data=data, state=self)\n        if self.member_cache_flags.joined:\n            guild._add_member(member)\n\n        if guild._member_count is not None:\n            guild._member_count += 1\n\n        self.dispatch('member_join', member)\n\n    def parse_guild_member_remove(self, data: gw.GuildMemberRemoveEvent) -> None:\n        user = self.store_user(data['user'])\n        raw = RawMemberRemoveEvent(data, user)\n\n        guild = self._get_guild(raw.guild_id)\n        if guild is not None:\n            if guild._member_count is not None:\n                guild._member_count -= 1\n\n            member = guild.get_member(user.id)\n            if member is not None:\n                raw.user = member\n                guild._remove_member(member)\n                self.dispatch('member_remove', member)\n        else:\n            _log.debug('GUILD_MEMBER_REMOVE referencing an unknown guild ID: %s. Discarding.', data['guild_id'])\n\n        self.dispatch('raw_member_remove', raw)\n\n    def parse_guild_member_update(self, data: gw.GuildMemberUpdateEvent) -> None:\n        guild = self._get_guild(int(data['guild_id']))\n        user = data['user']\n        user_id = int(user['id'])\n        if guild is None:\n            _log.debug('GUILD_MEMBER_UPDATE referencing an unknown guild ID: %s. Discarding.', data['guild_id'])\n            return\n\n        member = guild.get_member(user_id)\n        if member is not None:\n            old_member = Member._copy(member)\n            member._update(data)\n            user_update = member._update_inner_user(user)\n            if user_update:\n                self.dispatch('user_update', user_update[0], user_update[1])\n\n            self.dispatch('member_update', old_member, member)\n        else:\n            if self.member_cache_flags.joined:\n                member = Member(data=data, guild=guild, state=self)  # type: ignore # the data is not complete, contains a delta of values\n\n                # Force an update on the inner user if necessary\n                user_update = member._update_inner_user(user)\n                if user_update:\n                    self.dispatch('user_update', user_update[0], user_update[1])\n\n                guild._add_member(member)\n            _log.debug('GUILD_MEMBER_UPDATE referencing an unknown member ID: %s. Discarding.', user_id)\n\n    def parse_guild_emojis_update(self, data: gw.GuildEmojisUpdateEvent) -> None:\n        guild = self._get_guild(int(data['guild_id']))\n        if guild is None:\n            _log.debug('GUILD_EMOJIS_UPDATE referencing an unknown guild ID: %s. Discarding.', data['guild_id'])\n            return\n\n        before_emojis = guild.emojis\n        for emoji in before_emojis:\n            self._emojis.pop(emoji.id, None)\n        # guild won't be None here\n        guild.emojis = tuple(map(lambda d: self.store_emoji(guild, d), data['emojis']))\n        self.dispatch('guild_emojis_update', guild, before_emojis, guild.emojis)\n\n    def parse_guild_stickers_update(self, data: gw.GuildStickersUpdateEvent) -> None:\n        guild = self._get_guild(int(data['guild_id']))\n        if guild is None:\n            _log.debug('GUILD_STICKERS_UPDATE referencing an unknown guild ID: %s. Discarding.', data['guild_id'])\n            return\n\n        before_stickers = guild.stickers\n        for emoji in before_stickers:\n            self._stickers.pop(emoji.id, None)\n\n        guild.stickers = tuple(map(lambda d: self.store_sticker(guild, d), data['stickers']))\n        self.dispatch('guild_stickers_update', guild, before_stickers, guild.stickers)\n\n    def parse_guild_audit_log_entry_create(self, data: gw.GuildAuditLogEntryCreate) -> None:\n        guild = self._get_guild(int(data['guild_id']))\n        if guild is None:\n            _log.debug('GUILD_AUDIT_LOG_ENTRY_CREATE referencing an unknown guild ID: %s. Discarding.', data['guild_id'])\n            return\n\n        entry = AuditLogEntry(\n            users=self._users,\n            integrations={},\n            app_commands={},\n            automod_rules={},\n            webhooks={},\n            data=data,\n            guild=guild,\n        )\n\n        self.dispatch('audit_log_entry_create', entry)\n\n    def parse_auto_moderation_rule_create(self, data: AutoModerationRule) -> None:\n        guild = self._get_guild(int(data['guild_id']))\n        if guild is None:\n            _log.debug('AUTO_MODERATION_RULE_CREATE referencing an unknown guild ID: %s. Discarding.', data['guild_id'])\n            return\n\n        rule = AutoModRule(data=data, guild=guild, state=self)\n\n        self.dispatch('automod_rule_create', rule)\n\n    def parse_auto_moderation_rule_update(self, data: AutoModerationRule) -> None:\n        guild = self._get_guild(int(data['guild_id']))\n        if guild is None:\n            _log.debug('AUTO_MODERATION_RULE_UPDATE referencing an unknown guild ID: %s. Discarding.', data['guild_id'])\n            return\n\n        rule = AutoModRule(data=data, guild=guild, state=self)\n\n        self.dispatch('automod_rule_update', rule)\n\n    def parse_auto_moderation_rule_delete(self, data: AutoModerationRule) -> None:\n        guild = self._get_guild(int(data['guild_id']))\n        if guild is None:\n            _log.debug('AUTO_MODERATION_RULE_DELETE referencing an unknown guild ID: %s. Discarding.', data['guild_id'])\n            return\n\n        rule = AutoModRule(data=data, guild=guild, state=self)\n\n        self.dispatch('automod_rule_delete', rule)\n\n    def parse_auto_moderation_action_execution(self, data: AutoModerationActionExecution) -> None:\n        guild = self._get_guild(int(data['guild_id']))\n        if guild is None:\n            _log.debug('AUTO_MODERATION_ACTION_EXECUTION referencing an unknown guild ID: %s. Discarding.', data['guild_id'])\n            return\n\n        execution = AutoModAction(data=data, state=self)\n\n        self.dispatch('automod_action', execution)\n\n    def _get_create_guild(self, data: gw.GuildCreateEvent) -> Guild:\n        if data.get('unavailable') is False:\n            # GUILD_CREATE with unavailable in the response\n            # usually means that the guild has become available\n            # and is therefore in the cache\n            guild = self._get_guild(int(data['id']))\n            if guild is not None:\n                guild.unavailable = False\n                guild._from_data(data)\n                return guild\n\n        return self._add_guild_from_data(data)\n\n    def is_guild_evicted(self, guild: Guild) -> bool:\n        return guild.id not in self._guilds\n\n    @overload\n    async def chunk_guild(self, guild: Guild, *, wait: Literal[True] = ..., cache: Optional[bool] = ...) -> List[Member]:\n        ...\n\n    @overload\n    async def chunk_guild(\n        self, guild: Guild, *, wait: Literal[False] = ..., cache: Optional[bool] = ...\n    ) -> asyncio.Future[List[Member]]:\n        ...\n\n    async def chunk_guild(\n        self, guild: Guild, *, wait: bool = True, cache: Optional[bool] = None\n    ) -> Union[List[Member], asyncio.Future[List[Member]]]:\n        cache = cache or self.member_cache_flags.joined\n        request = self._chunk_requests.get(guild.id)\n        if request is None:\n            self._chunk_requests[guild.id] = request = ChunkRequest(\n                guild.id, guild.shard_id, self.loop, self._get_guild, cache=cache\n            )\n            await self.chunker(guild.id, nonce=request.nonce)\n\n        if wait:\n            return await request.wait()\n        return request.get_future()\n\n    def _chunk_timeout(self, guild: Guild) -> float:\n        return max(5.0, (guild.member_count or 0) / 10000)\n\n    async def _chunk_and_dispatch(self, guild, unavailable):\n        timeout = self._chunk_timeout(guild)\n\n        try:\n            await asyncio.wait_for(self.chunk_guild(guild), timeout=timeout)\n        except asyncio.TimeoutError:\n            _log.warning('Somehow timed out waiting for chunks for guild ID %s.', guild.id)\n\n        if unavailable is False:\n            self.dispatch('guild_available', guild)\n        else:\n            self.dispatch('guild_join', guild)\n\n    def _add_ready_state(self, guild: Guild) -> bool:\n        try:\n            # Notify the on_ready state, if any, that this guild is complete.\n            self._ready_state.put_nowait(guild)\n        except AttributeError:\n            return False\n        else:\n            return True\n\n    def parse_guild_create(self, data: gw.GuildCreateEvent) -> None:\n        unavailable = data.get('unavailable')\n        if unavailable is True:\n            # joined a guild with unavailable == True so..\n            return\n\n        guild = self._get_create_guild(data)\n\n        if self._add_ready_state(guild):\n            return  # We're waiting for the ready event, put the rest on hold\n\n        # check if it requires chunking\n        if self._guild_needs_chunking(guild):\n            asyncio.create_task(self._chunk_and_dispatch(guild, unavailable))\n            return\n\n        # Dispatch available if newly available\n        if unavailable is False:\n            self.dispatch('guild_available', guild)\n        else:\n            self.dispatch('guild_join', guild)\n\n    def parse_guild_update(self, data: gw.GuildUpdateEvent) -> None:\n        guild = self._get_guild(int(data['id']))\n        if guild is not None:\n            old_guild = copy.copy(guild)\n            guild._from_data(data)\n            self.dispatch('guild_update', old_guild, guild)\n        else:\n            _log.debug('GUILD_UPDATE referencing an unknown guild ID: %s. Discarding.', data['id'])\n\n    def parse_guild_delete(self, data: gw.GuildDeleteEvent) -> None:\n        guild = self._get_guild(int(data['id']))\n        if guild is None:\n            _log.debug('GUILD_DELETE referencing an unknown guild ID: %s. Discarding.', data['id'])\n            return\n\n        if data.get('unavailable', False):\n            # GUILD_DELETE with unavailable being True means that the\n            # guild that was available is now currently unavailable\n            guild.unavailable = True\n            self.dispatch('guild_unavailable', guild)\n            return\n\n        # do a cleanup of the messages cache\n        if self._messages is not None:\n            self._messages: Optional[Deque[Message]] = deque(\n                (msg for msg in self._messages if msg.guild != guild), maxlen=self.max_messages\n            )\n\n        self._remove_guild(guild)\n        self.dispatch('guild_remove', guild)\n\n    def parse_guild_ban_add(self, data: gw.GuildBanAddEvent) -> None:\n        # we make the assumption that GUILD_BAN_ADD is done\n        # before GUILD_MEMBER_REMOVE is called\n        # hence we don't remove it from cache or do anything\n        # strange with it, the main purpose of this event\n        # is mainly to dispatch to another event worth listening to for logging\n        guild = self._get_guild(int(data['guild_id']))\n        if guild is not None:\n            try:\n                user = User(data=data['user'], state=self)\n            except KeyError:\n                pass\n            else:\n                member = guild.get_member(user.id) or user\n                self.dispatch('member_ban', guild, member)\n\n    def parse_guild_ban_remove(self, data: gw.GuildBanRemoveEvent) -> None:\n        guild = self._get_guild(int(data['guild_id']))\n        if guild is not None and 'user' in data:\n            user = self.store_user(data['user'])\n            self.dispatch('member_unban', guild, user)\n\n    def parse_guild_role_create(self, data: gw.GuildRoleCreateEvent) -> None:\n        guild = self._get_guild(int(data['guild_id']))\n        if guild is None:\n            _log.debug('GUILD_ROLE_CREATE referencing an unknown guild ID: %s. Discarding.', data['guild_id'])\n            return\n\n        role_data = data['role']\n        role = Role(guild=guild, data=role_data, state=self)\n        guild._add_role(role)\n        self.dispatch('guild_role_create', role)\n\n    def parse_guild_role_delete(self, data: gw.GuildRoleDeleteEvent) -> None:\n        guild = self._get_guild(int(data['guild_id']))\n        if guild is not None:\n            role_id = int(data['role_id'])\n            try:\n                role = guild._remove_role(role_id)\n            except KeyError:\n                return\n            else:\n                self.dispatch('guild_role_delete', role)\n        else:\n            _log.debug('GUILD_ROLE_DELETE referencing an unknown guild ID: %s. Discarding.', data['guild_id'])\n\n    def parse_guild_role_update(self, data: gw.GuildRoleUpdateEvent) -> None:\n        guild = self._get_guild(int(data['guild_id']))\n        if guild is not None:\n            role_data = data['role']\n            role_id = int(role_data['id'])\n            role = guild.get_role(role_id)\n            if role is not None:\n                old_role = copy.copy(role)\n                role._update(role_data)\n                self.dispatch('guild_role_update', old_role, role)\n        else:\n            _log.debug('GUILD_ROLE_UPDATE referencing an unknown guild ID: %s. Discarding.', data['guild_id'])\n\n    def parse_guild_members_chunk(self, data: gw.GuildMembersChunkEvent) -> None:\n        guild_id = int(data['guild_id'])\n        guild = self._get_guild(guild_id)\n        presences = data.get('presences', [])\n\n        if guild is None:\n            return\n\n        members = [Member(guild=guild, data=member, state=self) for member in data.get('members', [])]\n        _log.debug('Processed a chunk for %s members in guild ID %s.', len(members), guild_id)\n\n        if presences:\n            member_dict: Dict[Snowflake, Member] = {str(member.id): member for member in members}\n            for presence in presences:\n                user = presence['user']\n                member_id = user['id']\n                member = member_dict.get(member_id)\n                if member is not None:\n                    member._presence_update(presence, user)\n\n        complete = data.get('chunk_index', 0) + 1 == data.get('chunk_count')\n        self.process_chunk_requests(guild_id, data.get('nonce'), members, complete)\n\n    def parse_guild_integrations_update(self, data: gw.GuildIntegrationsUpdateEvent) -> None:\n        guild = self._get_guild(int(data['guild_id']))\n        if guild is not None:\n            self.dispatch('guild_integrations_update', guild)\n        else:\n            _log.debug('GUILD_INTEGRATIONS_UPDATE referencing an unknown guild ID: %s. Discarding.', data['guild_id'])\n\n    def parse_integration_create(self, data: gw.IntegrationCreateEvent) -> None:\n        guild_id = int(data['guild_id'])\n        guild = self._get_guild(guild_id)\n        if guild is not None:\n            cls, _ = _integration_factory(data['type'])\n            integration = cls(data=data, guild=guild)\n            self.dispatch('integration_create', integration)\n        else:\n            _log.debug('INTEGRATION_CREATE referencing an unknown guild ID: %s. Discarding.', guild_id)\n\n    def parse_integration_update(self, data: gw.IntegrationUpdateEvent) -> None:\n        guild_id = int(data['guild_id'])\n        guild = self._get_guild(guild_id)\n        if guild is not None:\n            cls, _ = _integration_factory(data['type'])\n            integration = cls(data=data, guild=guild)\n            self.dispatch('integration_update', integration)\n        else:\n            _log.debug('INTEGRATION_UPDATE referencing an unknown guild ID: %s. Discarding.', guild_id)\n\n    def parse_integration_delete(self, data: gw.IntegrationDeleteEvent) -> None:\n        guild_id = int(data['guild_id'])\n        guild = self._get_guild(guild_id)\n        if guild is not None:\n            raw = RawIntegrationDeleteEvent(data)\n            self.dispatch('raw_integration_delete', raw)\n        else:\n            _log.debug('INTEGRATION_DELETE referencing an unknown guild ID: %s. Discarding.', guild_id)\n\n    def parse_webhooks_update(self, data: gw.WebhooksUpdateEvent) -> None:\n        guild = self._get_guild(int(data['guild_id']))\n        if guild is None:\n            _log.debug('WEBHOOKS_UPDATE referencing an unknown guild ID: %s. Discarding', data['guild_id'])\n            return\n\n        channel_id = utils._get_as_snowflake(data, 'channel_id')\n        channel = guild.get_channel(channel_id)  # type: ignore # None is okay here\n        if channel is not None:\n            self.dispatch('webhooks_update', channel)\n        else:\n            _log.debug('WEBHOOKS_UPDATE referencing an unknown channel ID: %s. Discarding.', data['channel_id'])\n\n    def parse_stage_instance_create(self, data: gw.StageInstanceCreateEvent) -> None:\n        guild = self._get_guild(int(data['guild_id']))\n        if guild is not None:\n            stage_instance = StageInstance(guild=guild, state=self, data=data)\n            guild._stage_instances[stage_instance.id] = stage_instance\n            self.dispatch('stage_instance_create', stage_instance)\n        else:\n            _log.debug('STAGE_INSTANCE_CREATE referencing unknown guild ID: %s. Discarding.', data['guild_id'])\n\n    def parse_stage_instance_update(self, data: gw.StageInstanceUpdateEvent) -> None:\n        guild = self._get_guild(int(data['guild_id']))\n        if guild is not None:\n            stage_instance = guild._stage_instances.get(int(data['id']))\n            if stage_instance is not None:\n                old_stage_instance = copy.copy(stage_instance)\n                stage_instance._update(data)\n                self.dispatch('stage_instance_update', old_stage_instance, stage_instance)\n            else:\n                _log.debug('STAGE_INSTANCE_UPDATE referencing unknown stage instance ID: %s. Discarding.', data['id'])\n        else:\n            _log.debug('STAGE_INSTANCE_UPDATE referencing unknown guild ID: %s. Discarding.', data['guild_id'])\n\n    def parse_stage_instance_delete(self, data: gw.StageInstanceDeleteEvent) -> None:\n        guild = self._get_guild(int(data['guild_id']))\n        if guild is not None:\n            try:\n                stage_instance = guild._stage_instances.pop(int(data['id']))\n            except KeyError:\n                pass\n            else:\n                self.dispatch('stage_instance_delete', stage_instance)\n        else:\n            _log.debug('STAGE_INSTANCE_DELETE referencing unknown guild ID: %s. Discarding.', data['guild_id'])\n\n    def parse_guild_scheduled_event_create(self, data: gw.GuildScheduledEventCreateEvent) -> None:\n        guild = self._get_guild(int(data['guild_id']))\n        if guild is not None:\n            scheduled_event = ScheduledEvent(state=self, data=data)\n            guild._scheduled_events[scheduled_event.id] = scheduled_event\n            self.dispatch('scheduled_event_create', scheduled_event)\n        else:\n            _log.debug('SCHEDULED_EVENT_CREATE referencing unknown guild ID: %s. Discarding.', data['guild_id'])\n\n    def parse_guild_scheduled_event_update(self, data: gw.GuildScheduledEventUpdateEvent) -> None:\n        guild = self._get_guild(int(data['guild_id']))\n        if guild is not None:\n            scheduled_event = guild._scheduled_events.get(int(data['id']))\n            if scheduled_event is not None:\n                old_scheduled_event = copy.copy(scheduled_event)\n                scheduled_event._update(data)\n                self.dispatch('scheduled_event_update', old_scheduled_event, scheduled_event)\n            else:\n                _log.debug('SCHEDULED_EVENT_UPDATE referencing unknown scheduled event ID: %s. Discarding.', data['id'])\n        else:\n            _log.debug('SCHEDULED_EVENT_UPDATE referencing unknown guild ID: %s. Discarding.', data['guild_id'])\n\n    def parse_guild_scheduled_event_delete(self, data: gw.GuildScheduledEventDeleteEvent) -> None:\n        guild = self._get_guild(int(data['guild_id']))\n        if guild is not None:\n            try:\n                scheduled_event = guild._scheduled_events.pop(int(data['id']))\n            except KeyError:\n                pass\n            else:\n                self.dispatch('scheduled_event_delete', scheduled_event)\n        else:\n            _log.debug('SCHEDULED_EVENT_DELETE referencing unknown guild ID: %s. Discarding.', data['guild_id'])\n\n    def parse_guild_scheduled_event_user_add(self, data: gw.GuildScheduledEventUserAdd) -> None:\n        guild = self._get_guild(int(data['guild_id']))\n        if guild is not None:\n            scheduled_event = guild._scheduled_events.get(int(data['guild_scheduled_event_id']))\n            if scheduled_event is not None:\n                user = self.get_user(int(data['user_id']))\n                if user is not None:\n                    scheduled_event._add_user(user)\n                    self.dispatch('scheduled_event_user_add', scheduled_event, user)\n                else:\n                    _log.debug('SCHEDULED_EVENT_USER_ADD referencing unknown user ID: %s. Discarding.', data['user_id'])\n            else:\n                _log.debug(\n                    'SCHEDULED_EVENT_USER_ADD referencing unknown scheduled event ID: %s. Discarding.',\n                    data['guild_scheduled_event_id'],\n                )\n        else:\n            _log.debug('SCHEDULED_EVENT_USER_ADD referencing unknown guild ID: %s. Discarding.', data['guild_id'])\n\n    def parse_guild_scheduled_event_user_remove(self, data: gw.GuildScheduledEventUserRemove) -> None:\n        guild = self._get_guild(int(data['guild_id']))\n        if guild is not None:\n            scheduled_event = guild._scheduled_events.get(int(data['guild_scheduled_event_id']))\n            if scheduled_event is not None:\n                user = self.get_user(int(data['user_id']))\n                if user is not None:\n                    scheduled_event._pop_user(user.id)\n                    self.dispatch('scheduled_event_user_remove', scheduled_event, user)\n                else:\n                    _log.debug('SCHEDULED_EVENT_USER_REMOVE referencing unknown user ID: %s. Discarding.', data['user_id'])\n            else:\n                _log.debug(\n                    'SCHEDULED_EVENT_USER_REMOVE referencing unknown scheduled event ID: %s. Discarding.',\n                    data['guild_scheduled_event_id'],\n                )\n        else:\n            _log.debug('SCHEDULED_EVENT_USER_REMOVE referencing unknown guild ID: %s. Discarding.', data['guild_id'])\n\n    def parse_application_command_permissions_update(self, data: GuildApplicationCommandPermissionsPayload):\n        raw = RawAppCommandPermissionsUpdateEvent(data=data, state=self)\n        self.dispatch('raw_app_command_permissions_update', raw)\n\n    def parse_voice_state_update(self, data: gw.VoiceStateUpdateEvent) -> None:\n        guild = self._get_guild(utils._get_as_snowflake(data, 'guild_id'))\n        channel_id = utils._get_as_snowflake(data, 'channel_id')\n        flags = self.member_cache_flags\n        # self.user is *always* cached when this is called\n        self_id = self.user.id  # type: ignore\n        if guild is not None:\n            if int(data['user_id']) == self_id:\n                voice = self._get_voice_client(guild.id)\n                if voice is not None:\n                    coro = voice.on_voice_state_update(data)\n                    asyncio.create_task(logging_coroutine(coro, info='Voice Protocol voice state update handler'))\n\n            member, before, after = guild._update_voice_state(data, channel_id)  # type: ignore\n            if member is not None:\n                if flags.voice:\n                    if channel_id is None and flags._voice_only and member.id != self_id:\n                        # Only remove from cache if we only have the voice flag enabled\n                        guild._remove_member(member)\n                    elif channel_id is not None:\n                        guild._add_member(member)\n\n                self.dispatch('voice_state_update', member, before, after)\n            else:\n                _log.debug('VOICE_STATE_UPDATE referencing an unknown member ID: %s. Discarding.', data['user_id'])\n\n    def parse_voice_server_update(self, data: gw.VoiceServerUpdateEvent) -> None:\n        key_id = int(data['guild_id'])\n\n        vc = self._get_voice_client(key_id)\n        if vc is not None:\n            coro = vc.on_voice_server_update(data)\n            asyncio.create_task(logging_coroutine(coro, info='Voice Protocol voice server update handler'))\n\n    def parse_typing_start(self, data: gw.TypingStartEvent) -> None:\n        raw = RawTypingEvent(data)\n        raw.user = self.get_user(raw.user_id)\n        channel, guild = self._get_guild_channel(data)\n\n        if channel is not None:\n            if isinstance(channel, DMChannel):\n                if raw.user is not None and raw.user not in channel.recipients:\n                    channel.recipients.append(raw.user)\n            elif guild is not None:\n                raw.user = guild.get_member(raw.user_id)\n\n                if raw.user is None:\n                    member_data = data.get('member')\n                    if member_data:\n                        raw.user = Member(data=member_data, state=self, guild=guild)\n\n            if raw.user is not None:\n                self.dispatch('typing', channel, raw.user, raw.timestamp)\n\n        self.dispatch('raw_typing', raw)\n\n    def parse_entitlement_create(self, data: gw.EntitlementCreateEvent) -> None:\n        entitlement = Entitlement(data=data, state=self)\n        self.dispatch('entitlement_create', entitlement)\n\n    def parse_entitlement_update(self, data: gw.EntitlementUpdateEvent) -> None:\n        entitlement = Entitlement(data=data, state=self)\n        self.dispatch('entitlement_update', entitlement)\n\n    def parse_entitlement_delete(self, data: gw.EntitlementDeleteEvent) -> None:\n        entitlement = Entitlement(data=data, state=self)\n        self.dispatch('entitlement_delete', entitlement)\n\n    def parse_message_poll_vote_add(self, data: gw.PollVoteActionEvent) -> None:\n        raw = RawPollVoteActionEvent(data)\n\n        self.dispatch('raw_poll_vote_add', raw)\n\n        message = self._get_message(raw.message_id)\n        guild = self._get_guild(raw.guild_id)\n\n        if guild:\n            user = guild.get_member(raw.user_id)\n        else:\n            user = self.get_user(raw.user_id)\n\n        if message and user:\n            poll = self._update_poll_counts(message, raw.answer_id, True, raw.user_id == self.self_id)\n            if poll:\n                self.dispatch('poll_vote_add', user, poll.get_answer(raw.answer_id))\n\n    def parse_message_poll_vote_remove(self, data: gw.PollVoteActionEvent) -> None:\n        raw = RawPollVoteActionEvent(data)\n\n        self.dispatch('raw_poll_vote_remove', raw)\n\n        message = self._get_message(raw.message_id)\n        guild = self._get_guild(raw.guild_id)\n\n        if guild:\n            user = guild.get_member(raw.user_id)\n        else:\n            user = self.get_user(raw.user_id)\n\n        if message and user:\n            poll = self._update_poll_counts(message, raw.answer_id, False, raw.user_id == self.self_id)\n            if poll:\n                self.dispatch('poll_vote_remove', user, poll.get_answer(raw.answer_id))\n\n    def _get_reaction_user(self, channel: MessageableChannel, user_id: int) -> Optional[Union[User, Member]]:\n        if isinstance(channel, (TextChannel, Thread, VoiceChannel)):\n            return channel.guild.get_member(user_id)\n        return self.get_user(user_id)\n\n    def get_reaction_emoji(self, data: PartialEmojiPayload) -> Union[Emoji, PartialEmoji, str]:\n        emoji_id = utils._get_as_snowflake(data, 'id')\n\n        if not emoji_id:\n            # the name key will be a str\n            return data['name']  # type: ignore\n\n        try:\n            return self._emojis[emoji_id]\n        except KeyError:\n            return PartialEmoji.with_state(\n                self, animated=data.get('animated', False), id=emoji_id, name=data['name']  # type: ignore\n            )\n\n    def _upgrade_partial_emoji(self, emoji: PartialEmoji) -> Union[Emoji, PartialEmoji, str]:\n        emoji_id = emoji.id\n        if not emoji_id:\n            return emoji.name\n        try:\n            return self._emojis[emoji_id]\n        except KeyError:\n            return emoji\n\n    def get_channel(self, id: Optional[int]) -> Optional[Union[Channel, Thread]]:\n        if id is None:\n            return None\n\n        pm = self._get_private_channel(id)\n        if pm is not None:\n            return pm\n\n        for guild in self.guilds:\n            channel = guild._resolve_channel(id)\n            if channel is not None:\n                return channel\n\n    def create_message(self, *, channel: MessageableChannel, data: MessagePayload) -> Message:\n        return Message(state=self, channel=channel, data=data)\n\n\nclass AutoShardedConnectionState(ConnectionState[ClientT]):\n    def __init__(self, *args: Any, **kwargs: Any) -> None:\n        super().__init__(*args, **kwargs)\n\n        self.shard_ids: Union[List[int], range] = []\n\n        self._ready_tasks: Dict[int, asyncio.Task[None]] = {}\n        self._ready_states: Dict[int, asyncio.Queue[Guild]] = {}\n\n    def _update_message_references(self) -> None:\n        # self._messages won't be None when this is called\n        for msg in self._messages:  # type: ignore\n            if not msg.guild:\n                continue\n\n            new_guild = self._get_guild(msg.guild.id)\n            if new_guild is not None and new_guild is not msg.guild:\n                channel_id = msg.channel.id\n                channel = new_guild._resolve_channel(channel_id) or PartialMessageable(\n                    state=self, id=channel_id, guild_id=new_guild.id\n                )\n                msg._rebind_cached_references(new_guild, channel)\n\n    async def chunker(\n        self,\n        guild_id: int,\n        query: str = '',\n        limit: int = 0,\n        presences: bool = False,\n        *,\n        shard_id: Optional[int] = None,\n        nonce: Optional[str] = None,\n    ) -> None:\n        ws = self._get_websocket(guild_id, shard_id=shard_id)\n        await ws.request_chunks(guild_id, query=query, limit=limit, presences=presences, nonce=nonce)\n\n    def _add_ready_state(self, guild: Guild) -> bool:\n        try:\n            # Notify the on_ready state, if any, that this guild is complete.\n            self._ready_states[guild.shard_id].put_nowait(guild)\n        except KeyError:\n            return False\n        else:\n            return True\n\n    async def _delay_ready(self) -> None:\n        await asyncio.gather(*self._ready_tasks.values())\n\n        # clear the current tasks\n        self._ready_task = None\n        self._ready_tasks = {}\n\n        # dispatch the event\n        self.call_handlers('ready')\n        self.dispatch('ready')\n\n    async def _delay_shard_ready(self, shard_id: int) -> None:\n        try:\n            states = []\n            while True:\n                # this snippet of code is basically waiting N seconds\n                # until the last GUILD_CREATE was sent\n                try:\n                    guild = await asyncio.wait_for(self._ready_states[shard_id].get(), timeout=self.guild_ready_timeout)\n                except asyncio.TimeoutError:\n                    break\n                else:\n                    if self._guild_needs_chunking(guild):\n                        future = await self.chunk_guild(guild, wait=False)\n                        states.append((guild, future))\n                    else:\n                        if guild.unavailable is False:\n                            self.dispatch('guild_available', guild)\n                        else:\n                            self.dispatch('guild_join', guild)\n\n            for guild, future in states:\n                timeout = self._chunk_timeout(guild)\n\n                try:\n                    await asyncio.wait_for(future, timeout=timeout)\n                except asyncio.TimeoutError:\n                    _log.warning('Shard ID %s timed out waiting for chunks for guild_id %s.', guild.shard_id, guild.id)\n\n                if guild.unavailable is False:\n                    self.dispatch('guild_available', guild)\n                else:\n                    self.dispatch('guild_join', guild)\n\n            # remove the state\n            try:\n                del self._ready_states[shard_id]\n            except KeyError:\n                pass  # already been deleted somehow\n\n        except asyncio.CancelledError:\n            pass\n        else:\n            # dispatch the event\n            self.dispatch('shard_ready', shard_id)\n\n    def parse_ready(self, data: gw.ReadyEvent) -> None:\n        if self._ready_task is not None:\n            self._ready_task.cancel()\n\n        shard_id = data['shard'][0]  # shard_id, num_shards\n\n        if shard_id in self._ready_tasks:\n            self._ready_tasks[shard_id].cancel()\n            self.clear_chunk_requests(shard_id)\n\n        if shard_id not in self._ready_states:\n            self._ready_states[shard_id] = asyncio.Queue()\n\n        self.user: Optional[ClientUser]\n        self.user = user = ClientUser(state=self, data=data['user'])\n        # self._users is a list of Users, we're setting a ClientUser\n        self._users[user.id] = user  # type: ignore\n\n        if self.application_id is None:\n            try:\n                application = data['application']\n            except KeyError:\n                pass\n            else:\n                self.application_id: Optional[int] = utils._get_as_snowflake(application, 'id')\n                self.application_flags: ApplicationFlags = ApplicationFlags._from_value(application['flags'])\n\n        for guild_data in data['guilds']:\n            self._add_guild_from_data(guild_data)  # type: ignore # _add_guild_from_data requires a complete Guild payload\n\n        if self._messages:\n            self._update_message_references()\n\n        self.dispatch('connect')\n        self.dispatch('shard_connect', shard_id)\n\n        self._ready_tasks[shard_id] = asyncio.create_task(self._delay_shard_ready(shard_id))\n\n        # The delay task for every shard has been started\n        if len(self._ready_tasks) == len(self.shard_ids):\n            self._ready_task = asyncio.create_task(self._delay_ready())\n\n    def parse_resumed(self, data: gw.ResumedEvent) -> None:\n        self.dispatch('resumed')\n        self.dispatch('shard_resumed', data['__shard_id__'])  # type: ignore # This is an internal discord.py key\n"
  },
  {
    "path": "discord/sticker.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom __future__ import annotations\nfrom typing import Literal, TYPE_CHECKING, List, Optional, Tuple, Type, Union\nimport unicodedata\n\nfrom .mixins import Hashable\nfrom .asset import Asset, AssetMixin\nfrom .utils import cached_slot_property, find, snowflake_time, get, MISSING, _get_as_snowflake\nfrom .errors import InvalidData\nfrom .enums import StickerType, StickerFormatType, try_enum\n\n__all__ = (\n    'StickerPack',\n    'StickerItem',\n    'Sticker',\n    'StandardSticker',\n    'GuildSticker',\n)\n\nif TYPE_CHECKING:\n    import datetime\n    from .state import ConnectionState\n    from .user import User\n    from .guild import Guild\n    from .types.sticker import (\n        StickerPack as StickerPackPayload,\n        StickerItem as StickerItemPayload,\n        Sticker as StickerPayload,\n        StandardSticker as StandardStickerPayload,\n        GuildSticker as GuildStickerPayload,\n        ListPremiumStickerPacks as ListPremiumStickerPacksPayload,\n    )\n\n\nclass StickerPack(Hashable):\n    \"\"\"Represents a sticker pack.\n\n    .. versionadded:: 2.0\n\n    .. container:: operations\n\n        .. describe:: str(x)\n\n            Returns the name of the sticker pack.\n\n        .. describe:: x == y\n\n           Checks if the sticker pack is equal to another sticker pack.\n\n        .. describe:: x != y\n\n           Checks if the sticker pack is not equal to another sticker pack.\n\n    Attributes\n    -----------\n    name: :class:`str`\n        The name of the sticker pack.\n    description: :class:`str`\n        The description of the sticker pack.\n    id: :class:`int`\n        The id of the sticker pack.\n    stickers: List[:class:`StandardSticker`]\n        The stickers of this sticker pack.\n    sku_id: :class:`int`\n        The SKU ID of the sticker pack.\n    cover_sticker_id: Optional[:class:`int`]\n         The ID of the sticker used for the cover of the sticker pack.\n    cover_sticker: Optional[:class:`StandardSticker`]\n        The sticker used for the cover of the sticker pack.\n    \"\"\"\n\n    __slots__ = (\n        '_state',\n        'id',\n        'stickers',\n        'name',\n        'sku_id',\n        'cover_sticker_id',\n        'cover_sticker',\n        'description',\n        '_banner',\n    )\n\n    def __init__(self, *, state: ConnectionState, data: StickerPackPayload) -> None:\n        self._state: ConnectionState = state\n        self._from_data(data)\n\n    def _from_data(self, data: StickerPackPayload) -> None:\n        self.id: int = int(data['id'])\n        stickers = data['stickers']\n        self.stickers: List[StandardSticker] = [StandardSticker(state=self._state, data=sticker) for sticker in stickers]\n        self.name: str = data['name']\n        self.sku_id: int = int(data['sku_id'])\n        self.cover_sticker_id: Optional[int] = _get_as_snowflake(data, 'cover_sticker_id')\n        self.cover_sticker: Optional[StandardSticker] = get(self.stickers, id=self.cover_sticker_id)\n        self.description: str = data['description']\n        self._banner: Optional[int] = _get_as_snowflake(data, 'banner_asset_id')\n\n    @property\n    def banner(self) -> Optional[Asset]:\n        \"\"\":class:`Asset`: The banner asset of the sticker pack.\"\"\"\n        return self._banner and Asset._from_sticker_banner(self._state, self._banner)  # type: ignore\n\n    def __repr__(self) -> str:\n        return f'<StickerPack id={self.id} name={self.name!r} description={self.description!r}>'\n\n    def __str__(self) -> str:\n        return self.name\n\n\nclass _StickerTag(Hashable, AssetMixin):\n    __slots__ = ()\n\n    id: int\n    format: StickerFormatType\n\n    async def read(self) -> bytes:\n        \"\"\"|coro|\n\n        Retrieves the content of this sticker as a :class:`bytes` object.\n\n        .. note::\n\n            Stickers that use the :attr:`StickerFormatType.lottie` format cannot be read.\n\n        Raises\n        ------\n        HTTPException\n            Downloading the asset failed.\n        NotFound\n            The asset was deleted.\n        TypeError\n            The sticker is a lottie type.\n\n        Returns\n        -------\n        :class:`bytes`\n            The content of the asset.\n        \"\"\"\n        if self.format is StickerFormatType.lottie:\n            raise TypeError('Cannot read stickers of format \"lottie\".')\n        return await super().read()\n\n\nclass StickerItem(_StickerTag):\n    \"\"\"Represents a sticker item.\n\n    .. versionadded:: 2.0\n\n    .. container:: operations\n\n        .. describe:: str(x)\n\n            Returns the name of the sticker item.\n\n        .. describe:: x == y\n\n           Checks if the sticker item is equal to another sticker item.\n\n        .. describe:: x != y\n\n           Checks if the sticker item is not equal to another sticker item.\n\n    Attributes\n    -----------\n    name: :class:`str`\n        The sticker's name.\n    id: :class:`int`\n        The id of the sticker.\n    format: :class:`StickerFormatType`\n        The format for the sticker's image.\n    url: :class:`str`\n        The URL for the sticker's image.\n    \"\"\"\n\n    __slots__ = ('_state', 'name', 'id', 'format', 'url')\n\n    def __init__(self, *, state: ConnectionState, data: StickerItemPayload) -> None:\n        self._state: ConnectionState = state\n        self.name: str = data['name']\n        self.id: int = int(data['id'])\n        self.format: StickerFormatType = try_enum(StickerFormatType, data['format_type'])\n        self.url: str = f'{Asset.BASE}/stickers/{self.id}.{self.format.file_extension}'\n\n    def __repr__(self) -> str:\n        return f'<StickerItem id={self.id} name={self.name!r} format={self.format}>'\n\n    def __str__(self) -> str:\n        return self.name\n\n    async def fetch(self) -> Union[Sticker, StandardSticker, GuildSticker]:\n        \"\"\"|coro|\n\n        Attempts to retrieve the full sticker data of the sticker item.\n\n        Raises\n        --------\n        HTTPException\n            Retrieving the sticker failed.\n\n        Returns\n        --------\n        Union[:class:`StandardSticker`, :class:`GuildSticker`]\n            The retrieved sticker.\n        \"\"\"\n        data: StickerPayload = await self._state.http.get_sticker(self.id)\n        cls, _ = _sticker_factory(data['type'])\n        return cls(state=self._state, data=data)\n\n\nclass Sticker(_StickerTag):\n    \"\"\"Represents a sticker.\n\n    .. versionadded:: 1.6\n\n    .. container:: operations\n\n        .. describe:: str(x)\n\n            Returns the name of the sticker.\n\n        .. describe:: x == y\n\n           Checks if the sticker is equal to another sticker.\n\n        .. describe:: x != y\n\n           Checks if the sticker is not equal to another sticker.\n\n    Attributes\n    ----------\n    name: :class:`str`\n        The sticker's name.\n    id: :class:`int`\n        The id of the sticker.\n    description: :class:`str`\n        The description of the sticker.\n    pack_id: :class:`int`\n        The id of the sticker's pack.\n    format: :class:`StickerFormatType`\n        The format for the sticker's image.\n    url: :class:`str`\n        The URL for the sticker's image.\n    \"\"\"\n\n    __slots__ = ('_state', 'id', 'name', 'description', 'format', 'url')\n\n    def __init__(self, *, state: ConnectionState, data: StickerPayload) -> None:\n        self._state: ConnectionState = state\n        self._from_data(data)\n\n    def _from_data(self, data: StickerPayload) -> None:\n        self.id: int = int(data['id'])\n        self.name: str = data['name']\n        self.description: str = data['description']\n        self.format: StickerFormatType = try_enum(StickerFormatType, data['format_type'])\n        if self.format is StickerFormatType.gif:\n            self.url: str = f'https://media.discordapp.net/stickers/{self.id}.gif'\n        else:\n            self.url: str = f'{Asset.BASE}/stickers/{self.id}.{self.format.file_extension}'\n\n    def __repr__(self) -> str:\n        return f'<Sticker id={self.id} name={self.name!r}>'\n\n    def __str__(self) -> str:\n        return self.name\n\n    @property\n    def created_at(self) -> datetime.datetime:\n        \"\"\":class:`datetime.datetime`: Returns the sticker's creation time in UTC.\"\"\"\n        return snowflake_time(self.id)\n\n\nclass StandardSticker(Sticker):\n    \"\"\"Represents a sticker that is found in a standard sticker pack.\n\n    .. versionadded:: 2.0\n\n    .. container:: operations\n\n        .. describe:: str(x)\n\n            Returns the name of the sticker.\n\n        .. describe:: x == y\n\n           Checks if the sticker is equal to another sticker.\n\n        .. describe:: x != y\n\n           Checks if the sticker is not equal to another sticker.\n\n    Attributes\n    ----------\n    name: :class:`str`\n        The sticker's name.\n    id: :class:`int`\n        The id of the sticker.\n    description: :class:`str`\n        The description of the sticker.\n    pack_id: :class:`int`\n        The id of the sticker's pack.\n    format: :class:`StickerFormatType`\n        The format for the sticker's image.\n    tags: List[:class:`str`]\n        A list of tags for the sticker.\n    sort_value: :class:`int`\n        The sticker's sort order within its pack.\n    \"\"\"\n\n    __slots__ = ('sort_value', 'pack_id', 'type', 'tags')\n\n    def _from_data(self, data: StandardStickerPayload) -> None:\n        super()._from_data(data)\n        self.sort_value: int = data['sort_value']\n        self.pack_id: int = int(data['pack_id'])\n        self.type: StickerType = StickerType.standard\n\n        try:\n            self.tags: List[str] = [tag.strip() for tag in data['tags'].split(',')]\n        except KeyError:\n            self.tags = []\n\n    def __repr__(self) -> str:\n        return f'<StandardSticker id={self.id} name={self.name!r} pack_id={self.pack_id}>'\n\n    async def pack(self) -> StickerPack:\n        \"\"\"|coro|\n\n        Retrieves the sticker pack that this sticker belongs to.\n\n        Raises\n        --------\n        InvalidData\n            The corresponding sticker pack was not found.\n        HTTPException\n            Retrieving the sticker pack failed.\n\n        Returns\n        --------\n        :class:`StickerPack`\n            The retrieved sticker pack.\n        \"\"\"\n        data: ListPremiumStickerPacksPayload = await self._state.http.list_premium_sticker_packs()\n        packs = data['sticker_packs']\n        pack = find(lambda d: int(d['id']) == self.pack_id, packs)\n\n        if pack:\n            return StickerPack(state=self._state, data=pack)\n        raise InvalidData(f'Could not find corresponding sticker pack for {self!r}')\n\n\nclass GuildSticker(Sticker):\n    \"\"\"Represents a sticker that belongs to a guild.\n\n    .. versionadded:: 2.0\n\n    .. container:: operations\n\n        .. describe:: str(x)\n\n            Returns the name of the sticker.\n\n        .. describe:: x == y\n\n           Checks if the sticker is equal to another sticker.\n\n        .. describe:: x != y\n\n           Checks if the sticker is not equal to another sticker.\n\n    Attributes\n    ----------\n    name: :class:`str`\n        The sticker's name.\n    id: :class:`int`\n        The id of the sticker.\n    description: :class:`str`\n        The description of the sticker.\n    format: :class:`StickerFormatType`\n        The format for the sticker's image.\n    available: :class:`bool`\n        Whether this sticker is available for use.\n    guild_id: :class:`int`\n        The ID of the guild that this sticker is from.\n    user: Optional[:class:`User`]\n        The user that created this sticker. This can only be retrieved using :meth:`Guild.fetch_sticker` and\n        having :attr:`~Permissions.manage_emojis_and_stickers`.\n    emoji: :class:`str`\n        The name of a unicode emoji that represents this sticker.\n    \"\"\"\n\n    __slots__ = ('available', 'guild_id', 'user', 'emoji', 'type', '_cs_guild')\n\n    def _from_data(self, data: GuildStickerPayload) -> None:\n        super()._from_data(data)\n        self.available: bool = data.get('available', True)\n        self.guild_id: int = int(data['guild_id'])\n        user = data.get('user')\n        self.user: Optional[User] = self._state.store_user(user) if user else None\n        self.emoji: str = data['tags']\n        self.type: StickerType = StickerType.guild\n\n    def __repr__(self) -> str:\n        return f'<GuildSticker name={self.name!r} id={self.id} guild_id={self.guild_id} user={self.user!r}>'\n\n    @cached_slot_property('_cs_guild')\n    def guild(self) -> Optional[Guild]:\n        \"\"\"Optional[:class:`Guild`]: The guild that this sticker is from.\n        Could be ``None`` if the bot is not in the guild.\n\n        .. versionadded:: 2.0\n        \"\"\"\n        return self._state._get_guild(self.guild_id)\n\n    async def edit(\n        self,\n        *,\n        name: str = MISSING,\n        description: str = MISSING,\n        emoji: str = MISSING,\n        reason: Optional[str] = None,\n    ) -> GuildSticker:\n        \"\"\"|coro|\n\n        Edits a :class:`GuildSticker` for the guild.\n\n        Parameters\n        -----------\n        name: :class:`str`\n            The sticker's new name. Must be at least 2 characters.\n        description: Optional[:class:`str`]\n            The sticker's new description. Can be ``None``.\n        emoji: :class:`str`\n            The name of a unicode emoji that represents the sticker's expression.\n        reason: :class:`str`\n            The reason for editing this sticker. Shows up on the audit log.\n\n        Raises\n        -------\n        Forbidden\n            You are not allowed to edit stickers.\n        HTTPException\n            An error occurred editing the sticker.\n\n        Returns\n        --------\n        :class:`GuildSticker`\n            The newly modified sticker.\n        \"\"\"\n        payload = {}\n\n        if name is not MISSING:\n            payload['name'] = name\n\n        if description is not MISSING:\n            payload['description'] = description\n\n        if emoji is not MISSING:\n            try:\n                emoji = unicodedata.name(emoji)\n            except TypeError:\n                pass\n            else:\n                emoji = emoji.replace(' ', '_')\n\n            payload['tags'] = emoji\n\n        data: GuildStickerPayload = await self._state.http.modify_guild_sticker(self.guild_id, self.id, payload, reason)\n        return GuildSticker(state=self._state, data=data)\n\n    async def delete(self, *, reason: Optional[str] = None) -> None:\n        \"\"\"|coro|\n\n        Deletes the custom :class:`Sticker` from the guild.\n\n        You must have :attr:`~Permissions.manage_emojis_and_stickers` to do this.\n\n        Parameters\n        -----------\n        reason: Optional[:class:`str`]\n            The reason for deleting this sticker. Shows up on the audit log.\n\n        Raises\n        -------\n        Forbidden\n            You are not allowed to delete stickers.\n        HTTPException\n            An error occurred deleting the sticker.\n        \"\"\"\n        await self._state.http.delete_guild_sticker(self.guild_id, self.id, reason)\n\n\ndef _sticker_factory(sticker_type: Literal[1, 2]) -> Tuple[Type[Union[StandardSticker, GuildSticker, Sticker]], StickerType]:\n    value = try_enum(StickerType, sticker_type)\n    if value == StickerType.standard:\n        return StandardSticker, value\n    elif value == StickerType.guild:\n        return GuildSticker, value\n    else:\n        return Sticker, value\n"
  },
  {
    "path": "discord/team.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom __future__ import annotations\n\nfrom . import utils\nfrom .user import BaseUser\nfrom .asset import Asset\nfrom .enums import TeamMemberRole, TeamMembershipState, try_enum\n\nfrom typing import TYPE_CHECKING, Optional, List\n\nif TYPE_CHECKING:\n    from .state import ConnectionState\n\n    from .types.team import (\n        Team as TeamPayload,\n        TeamMember as TeamMemberPayload,\n    )\n\n__all__ = (\n    'Team',\n    'TeamMember',\n)\n\n\nclass Team:\n    \"\"\"Represents an application team for a bot provided by Discord.\n\n    Attributes\n    -------------\n    id: :class:`int`\n        The team ID.\n    name: :class:`str`\n        The team name\n    owner_id: :class:`int`\n        The team's owner ID.\n    members: List[:class:`TeamMember`]\n        A list of the members in the team\n\n        .. versionadded:: 1.3\n    \"\"\"\n\n    __slots__ = ('_state', 'id', 'name', '_icon', 'owner_id', 'members')\n\n    def __init__(self, state: ConnectionState, data: TeamPayload) -> None:\n        self._state: ConnectionState = state\n\n        self.id: int = int(data['id'])\n        self.name: str = data['name']\n        self._icon: Optional[str] = data['icon']\n        self.owner_id: Optional[int] = utils._get_as_snowflake(data, 'owner_user_id')\n        self.members: List[TeamMember] = [TeamMember(self, self._state, member) for member in data['members']]\n\n    def __repr__(self) -> str:\n        return f'<{self.__class__.__name__} id={self.id} name={self.name}>'\n\n    @property\n    def icon(self) -> Optional[Asset]:\n        \"\"\"Optional[:class:`.Asset`]: Retrieves the team's icon asset, if any.\"\"\"\n        if self._icon is None:\n            return None\n        return Asset._from_icon(self._state, self.id, self._icon, path='team')\n\n    @property\n    def owner(self) -> Optional[TeamMember]:\n        \"\"\"Optional[:class:`TeamMember`]: The team's owner.\"\"\"\n        return utils.get(self.members, id=self.owner_id)\n\n\nclass TeamMember(BaseUser):\n    \"\"\"Represents a team member in a team.\n\n    .. container:: operations\n\n        .. describe:: x == y\n\n            Checks if two team members are equal.\n\n        .. describe:: x != y\n\n            Checks if two team members are not equal.\n\n        .. describe:: hash(x)\n\n            Return the team member's hash.\n\n        .. describe:: str(x)\n\n            Returns the team member's handle (e.g. ``name`` or ``name#discriminator``).\n\n    .. versionadded:: 1.3\n\n    Attributes\n    -------------\n    name: :class:`str`\n        The team member's username.\n    id: :class:`int`\n        The team member's unique ID.\n    discriminator: :class:`str`\n        The team member's discriminator. This is a legacy concept that is no longer used.\n    global_name: Optional[:class:`str`]\n        The team member's global nickname, taking precedence over the username in display.\n\n        .. versionadded:: 2.3\n    bot: :class:`bool`\n        Specifies if the user is a bot account.\n    team: :class:`Team`\n        The team that the member is from.\n    membership_state: :class:`TeamMembershipState`\n        The membership state of the member (e.g. invited or accepted)\n    role: :class:`TeamMemberRole`\n        The role of the member within the team.\n\n        .. versionadded:: 2.4\n    \"\"\"\n\n    __slots__ = ('team', 'membership_state', 'permissions', 'role')\n\n    def __init__(self, team: Team, state: ConnectionState, data: TeamMemberPayload) -> None:\n        self.team: Team = team\n        self.membership_state: TeamMembershipState = try_enum(TeamMembershipState, data['membership_state'])\n        self.permissions: List[str] = data.get('permissions', [])\n        self.role: TeamMemberRole = try_enum(TeamMemberRole, data['role'])\n        super().__init__(state=state, data=data['user'])\n\n    def __repr__(self) -> str:\n        return (\n            f'<{self.__class__.__name__} id={self.id} name={self.name!r} '\n            f'global_name={self.global_name!r} membership_state={self.membership_state!r}>'\n        )\n"
  },
  {
    "path": "discord/template.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom __future__ import annotations\n\nfrom typing import Any, Optional, TYPE_CHECKING, List\nfrom .utils import parse_time, _bytes_to_base64_data, MISSING\nfrom .guild import Guild\n\n# fmt: off\n__all__ = (\n    'Template',\n)\n# fmt: on\n\nif TYPE_CHECKING:\n    import datetime\n    from .types.template import Template as TemplatePayload\n    from .state import ConnectionState\n    from .user import User\n\n\nclass _FriendlyHttpAttributeErrorHelper:\n    __slots__ = ()\n\n    def __getattr__(self, attr):\n        raise AttributeError('PartialTemplateState does not support http methods.')\n\n\nclass _PartialTemplateState:\n    def __init__(self, *, state) -> None:\n        self.__state = state\n        self.http = _FriendlyHttpAttributeErrorHelper()\n\n    @property\n    def shard_count(self):\n        return self.__state.shard_count\n\n    @property\n    def user(self):\n        return self.__state.user\n\n    @property\n    def self_id(self):\n        return self.__state.user.id\n\n    @property\n    def member_cache_flags(self):\n        return self.__state.member_cache_flags\n\n    @property\n    def cache_guild_expressions(self):\n        return False\n\n    def store_emoji(self, guild, packet) -> None:\n        return None\n\n    def _get_voice_client(self, id) -> None:\n        return None\n\n    def _get_message(self, id) -> None:\n        return None\n\n    def _get_guild(self, id):\n        return self.__state._get_guild(id)\n\n    async def query_members(self, **kwargs: Any) -> List[Any]:\n        return []\n\n    def __getattr__(self, attr):\n        raise AttributeError(f'PartialTemplateState does not support {attr!r}.')\n\n\nclass Template:\n    \"\"\"Represents a Discord template.\n\n    .. versionadded:: 1.4\n\n    Attributes\n    -----------\n    code: :class:`str`\n        The template code.\n    uses: :class:`int`\n        How many times the template has been used.\n    name: :class:`str`\n        The name of the template.\n    description: :class:`str`\n        The description of the template.\n    creator: :class:`User`\n        The creator of the template.\n    created_at: :class:`datetime.datetime`\n        An aware datetime in UTC representing when the template was created.\n    updated_at: :class:`datetime.datetime`\n        An aware datetime in UTC representing when the template was last updated.\n        This is referred to as \"last synced\" in the official Discord client.\n    source_guild: :class:`Guild`\n        The guild snapshot that represents the data that this template currently holds.\n    is_dirty: Optional[:class:`bool`]\n        Whether the template has unsynced changes.\n\n        .. versionadded:: 2.0\n    \"\"\"\n\n    __slots__ = (\n        'code',\n        'uses',\n        'name',\n        'description',\n        'creator',\n        'created_at',\n        'updated_at',\n        'source_guild',\n        'is_dirty',\n        '_state',\n    )\n\n    def __init__(self, *, state: ConnectionState, data: TemplatePayload) -> None:\n        self._state = state\n        self._store(data)\n\n    def _store(self, data: TemplatePayload) -> None:\n        self.code: str = data['code']\n        self.uses: int = data['usage_count']\n        self.name: str = data['name']\n        self.description: Optional[str] = data['description']\n        creator_data = data.get('creator')\n        self.creator: Optional[User] = None if creator_data is None else self._state.create_user(creator_data)\n\n        self.created_at: Optional[datetime.datetime] = parse_time(data.get('created_at'))\n        self.updated_at: Optional[datetime.datetime] = parse_time(data.get('updated_at'))\n\n        source_serialised = data['serialized_source_guild']\n        source_serialised['id'] = int(data['source_guild_id'])\n        state = _PartialTemplateState(state=self._state)\n        # Guild expects a ConnectionState, we're passing a _PartialTemplateState\n        self.source_guild = Guild(data=source_serialised, state=state)  # type: ignore\n\n        self.is_dirty: Optional[bool] = data.get('is_dirty', None)\n\n    def __repr__(self) -> str:\n        return (\n            f'<Template code={self.code!r} uses={self.uses} name={self.name!r}'\n            f' creator={self.creator!r} source_guild={self.source_guild!r} is_dirty={self.is_dirty}>'\n        )\n\n    async def create_guild(self, name: str, icon: bytes = MISSING) -> Guild:\n        \"\"\"|coro|\n\n        Creates a :class:`.Guild` using the template.\n\n        Bot accounts in more than 10 guilds are not allowed to create guilds.\n\n        .. versionchanged:: 2.0\n            The ``region`` parameter has been removed.\n\n        .. versionchanged:: 2.0\n            This function will now raise :exc:`ValueError` instead of\n            ``InvalidArgument``.\n\n        Parameters\n        ----------\n        name: :class:`str`\n            The name of the guild.\n        icon: :class:`bytes`\n            The :term:`py:bytes-like object` representing the icon. See :meth:`.ClientUser.edit`\n            for more details on what is expected.\n\n        Raises\n        ------\n        HTTPException\n            Guild creation failed.\n        ValueError\n            Invalid icon image format given. Must be PNG or JPG.\n\n        Returns\n        -------\n        :class:`.Guild`\n            The guild created. This is not the same guild that is\n            added to cache.\n        \"\"\"\n        base64_icon = None\n        if icon is not MISSING:\n            base64_icon = _bytes_to_base64_data(icon)\n\n        data = await self._state.http.create_from_template(self.code, name, base64_icon)\n        return Guild(data=data, state=self._state)\n\n    async def sync(self) -> Template:\n        \"\"\"|coro|\n\n        Sync the template to the guild's current state.\n\n        You must have :attr:`~Permissions.manage_guild` in the source guild to do this.\n\n        .. versionadded:: 1.7\n\n        .. versionchanged:: 2.0\n            The template is no longer edited in-place, instead it is returned.\n\n        Raises\n        -------\n        HTTPException\n            Editing the template failed.\n        Forbidden\n            You don't have permissions to edit the template.\n        NotFound\n            This template does not exist.\n\n        Returns\n        --------\n        :class:`Template`\n            The newly edited template.\n        \"\"\"\n\n        data = await self._state.http.sync_template(self.source_guild.id, self.code)\n        return Template(state=self._state, data=data)\n\n    async def edit(\n        self,\n        *,\n        name: str = MISSING,\n        description: Optional[str] = MISSING,\n    ) -> Template:\n        \"\"\"|coro|\n\n        Edit the template metadata.\n\n        You must have :attr:`~Permissions.manage_guild` in the source guild to do this.\n\n        .. versionadded:: 1.7\n\n        .. versionchanged:: 2.0\n            The template is no longer edited in-place, instead it is returned.\n\n        Parameters\n        ------------\n        name: :class:`str`\n            The template's new name.\n        description: Optional[:class:`str`]\n            The template's new description.\n\n        Raises\n        -------\n        HTTPException\n            Editing the template failed.\n        Forbidden\n            You don't have permissions to edit the template.\n        NotFound\n            This template does not exist.\n\n        Returns\n        --------\n        :class:`Template`\n            The newly edited template.\n        \"\"\"\n        payload = {}\n\n        if name is not MISSING:\n            payload['name'] = name\n        if description is not MISSING:\n            payload['description'] = description\n\n        data = await self._state.http.edit_template(self.source_guild.id, self.code, payload)\n        return Template(state=self._state, data=data)\n\n    async def delete(self) -> None:\n        \"\"\"|coro|\n\n        Delete the template.\n\n        You must have :attr:`~Permissions.manage_guild` in the source guild to do this.\n\n        .. versionadded:: 1.7\n\n        Raises\n        -------\n        HTTPException\n            Editing the template failed.\n        Forbidden\n            You don't have permissions to edit the template.\n        NotFound\n            This template does not exist.\n        \"\"\"\n        await self._state.http.delete_template(self.source_guild.id, self.code)\n\n    @property\n    def url(self) -> str:\n        \"\"\":class:`str`: The template url.\n\n        .. versionadded:: 2.0\n        \"\"\"\n        return f'https://discord.new/{self.code}'\n"
  },
  {
    "path": "discord/threads.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom __future__ import annotations\n\nfrom typing import Callable, Dict, Iterable, List, Literal, Optional, Sequence, Union, TYPE_CHECKING\nfrom datetime import datetime\nimport array\n\nfrom .mixins import Hashable\nfrom .abc import Messageable, GuildChannel, _purge_helper\nfrom .enums import ChannelType, try_enum\nfrom .errors import ClientException\nfrom .flags import ChannelFlags\nfrom .permissions import Permissions\nfrom .utils import MISSING, parse_time, _get_as_snowflake, _unique\n\n__all__ = (\n    'Thread',\n    'ThreadMember',\n)\n\nif TYPE_CHECKING:\n    from typing_extensions import Self\n\n    from .types.threads import (\n        Thread as ThreadPayload,\n        ThreadMember as ThreadMemberPayload,\n        ThreadMetadata,\n        ThreadArchiveDuration,\n    )\n    from .types.snowflake import SnowflakeList\n    from .guild import Guild\n    from .channel import TextChannel, CategoryChannel, ForumChannel, ForumTag\n    from .member import Member\n    from .message import Message, PartialMessage\n    from .abc import Snowflake, SnowflakeTime\n    from .role import Role\n    from .state import ConnectionState\n\n    ThreadChannelType = Literal[ChannelType.news_thread, ChannelType.public_thread, ChannelType.private_thread]\n\n\nclass Thread(Messageable, Hashable):\n    \"\"\"Represents a Discord thread.\n\n    .. container:: operations\n\n        .. describe:: x == y\n\n            Checks if two threads are equal.\n\n        .. describe:: x != y\n\n            Checks if two threads are not equal.\n\n        .. describe:: hash(x)\n\n            Returns the thread's hash.\n\n        .. describe:: str(x)\n\n            Returns the thread's name.\n\n    .. versionadded:: 2.0\n\n    Attributes\n    -----------\n    name: :class:`str`\n        The thread name.\n    guild: :class:`Guild`\n        The guild the thread belongs to.\n    id: :class:`int`\n        The thread ID. This is the same as the thread starter message ID.\n    parent_id: :class:`int`\n        The parent :class:`TextChannel` or :class:`ForumChannel` ID this thread belongs to.\n    owner_id: :class:`int`\n        The user's ID that created this thread.\n    last_message_id: Optional[:class:`int`]\n        The last message ID of the message sent to this thread. It may\n        *not* point to an existing or valid message.\n    slowmode_delay: :class:`int`\n        The number of seconds a member must wait between sending messages\n        in this thread. A value of ``0`` denotes that it is disabled.\n        Bots and users with :attr:`~Permissions.manage_channels` or\n        :attr:`~Permissions.manage_messages` bypass slowmode.\n    message_count: :class:`int`\n        An approximate number of messages in this thread.\n    member_count: :class:`int`\n        An approximate number of members in this thread. This caps at 50.\n    me: Optional[:class:`ThreadMember`]\n        A thread member representing yourself, if you've joined the thread.\n        This could not be available.\n    archived: :class:`bool`\n        Whether the thread is archived.\n    locked: :class:`bool`\n        Whether the thread is locked.\n    invitable: :class:`bool`\n        Whether non-moderators can add other non-moderators to this thread.\n        This is always ``True`` for public threads.\n    archiver_id: Optional[:class:`int`]\n        The user's ID that archived this thread.\n\n        .. note::\n            Due to an API change, the ``archiver_id`` will always be ``None`` and can only be obtained via the audit log.\n\n    auto_archive_duration: :class:`int`\n        The duration in minutes until the thread is automatically hidden from the channel list.\n        Usually a value of 60, 1440, 4320 and 10080.\n    archive_timestamp: :class:`datetime.datetime`\n        An aware timestamp of when the thread's archived status was last updated in UTC.\n    \"\"\"\n\n    __slots__ = (\n        'name',\n        'id',\n        'guild',\n        '_type',\n        '_state',\n        '_members',\n        'owner_id',\n        'parent_id',\n        'last_message_id',\n        'message_count',\n        'member_count',\n        'slowmode_delay',\n        'me',\n        'locked',\n        'archived',\n        'invitable',\n        'archiver_id',\n        'auto_archive_duration',\n        'archive_timestamp',\n        '_created_at',\n        '_flags',\n        '_applied_tags',\n    )\n\n    def __init__(self, *, guild: Guild, state: ConnectionState, data: ThreadPayload) -> None:\n        self._state: ConnectionState = state\n        self.guild: Guild = guild\n        self._members: Dict[int, ThreadMember] = {}\n        self._from_data(data)\n\n    async def _get_channel(self) -> Self:\n        return self\n\n    def __repr__(self) -> str:\n        return (\n            f'<Thread id={self.id!r} name={self.name!r} parent={self.parent}'\n            f' owner_id={self.owner_id!r} locked={self.locked} archived={self.archived}>'\n        )\n\n    def __str__(self) -> str:\n        return self.name\n\n    def _from_data(self, data: ThreadPayload):\n        self.id: int = int(data['id'])\n        self.parent_id: int = int(data['parent_id'])\n        self.owner_id: int = int(data['owner_id'])\n        self.name: str = data['name']\n        self._type: ThreadChannelType = try_enum(ChannelType, data['type'])  # type: ignore\n        self.last_message_id: Optional[int] = _get_as_snowflake(data, 'last_message_id')\n        self.slowmode_delay: int = data.get('rate_limit_per_user', 0)\n        self.message_count: int = data['message_count']\n        self.member_count: int = data['member_count']\n        self._flags: int = data.get('flags', 0)\n        # SnowflakeList is sorted, but this would not be proper for applied tags, where order actually matters.\n        self._applied_tags: array.array[int] = array.array('Q', map(int, data.get('applied_tags', [])))\n        self._unroll_metadata(data['thread_metadata'])\n\n        self.me: Optional[ThreadMember]\n        try:\n            member = data['member']\n        except KeyError:\n            self.me = None\n        else:\n            self.me = ThreadMember(self, member)\n\n    def _unroll_metadata(self, data: ThreadMetadata):\n        self.archived: bool = data['archived']\n        self.archiver_id: Optional[int] = _get_as_snowflake(data, 'archiver_id')\n        self.auto_archive_duration: int = data['auto_archive_duration']\n        self.archive_timestamp: datetime = parse_time(data['archive_timestamp'])\n        self.locked: bool = data.get('locked', False)\n        self.invitable: bool = data.get('invitable', True)\n        self._created_at: Optional[datetime] = parse_time(data.get('create_timestamp'))\n\n    def _update(self, data: ThreadPayload) -> None:\n        try:\n            self.name = data['name']\n        except KeyError:\n            pass\n\n        self.slowmode_delay = data.get('rate_limit_per_user', 0)\n        self._flags: int = data.get('flags', 0)\n        self._applied_tags: array.array[int] = array.array('Q', map(int, data.get('applied_tags', [])))\n\n        try:\n            self._unroll_metadata(data['thread_metadata'])\n        except KeyError:\n            pass\n\n    @property\n    def type(self) -> ThreadChannelType:\n        \"\"\":class:`ChannelType`: The channel's Discord type.\"\"\"\n        return self._type\n\n    @property\n    def parent(self) -> Optional[Union[ForumChannel, TextChannel]]:\n        \"\"\"Optional[Union[:class:`ForumChannel`, :class:`TextChannel`]]: The parent channel this thread belongs to.\"\"\"\n        return self.guild.get_channel(self.parent_id)  # type: ignore\n\n    @property\n    def flags(self) -> ChannelFlags:\n        \"\"\":class:`ChannelFlags`: The flags associated with this thread.\"\"\"\n        return ChannelFlags._from_value(self._flags)\n\n    @property\n    def owner(self) -> Optional[Member]:\n        \"\"\"Optional[:class:`Member`]: The member this thread belongs to.\"\"\"\n        return self.guild.get_member(self.owner_id)\n\n    @property\n    def mention(self) -> str:\n        \"\"\":class:`str`: The string that allows you to mention the thread.\"\"\"\n        return f'<#{self.id}>'\n\n    @property\n    def jump_url(self) -> str:\n        \"\"\":class:`str`: Returns a URL that allows the client to jump to the thread.\n\n        .. versionadded:: 2.0\n        \"\"\"\n        return f'https://discord.com/channels/{self.guild.id}/{self.id}'\n\n    @property\n    def members(self) -> List[ThreadMember]:\n        \"\"\"List[:class:`ThreadMember`]: A list of thread members in this thread.\n\n        This requires :attr:`Intents.members` to be properly filled. Most of the time however,\n        this data is not provided by the gateway and a call to :meth:`fetch_members` is\n        needed.\n        \"\"\"\n        return list(self._members.values())\n\n    @property\n    def applied_tags(self) -> List[ForumTag]:\n        \"\"\"List[:class:`ForumTag`]: A list of tags applied to this thread.\n\n        .. versionadded:: 2.1\n        \"\"\"\n        tags = []\n        if self.parent is None or self.parent.type != ChannelType.forum:\n            return tags\n\n        parent = self.parent\n        for tag_id in self._applied_tags:\n            tag = parent.get_tag(tag_id)\n            if tag is not None:\n                tags.append(tag)\n\n        return tags\n\n    @property\n    def starter_message(self) -> Optional[Message]:\n        \"\"\"Returns the thread starter message from the cache.\n\n        The message might not be cached, valid, or point to an existing message.\n\n        Note that the thread starter message ID is the same ID as the thread.\n\n        Returns\n        --------\n        Optional[:class:`Message`]\n            The thread starter message or ``None`` if not found.\n        \"\"\"\n        return self._state._get_message(self.id)\n\n    @property\n    def last_message(self) -> Optional[Message]:\n        \"\"\"Returns the last message from this thread from the cache.\n\n        The message might not be valid or point to an existing message.\n\n        .. admonition:: Reliable Fetching\n            :class: helpful\n\n            For a slightly more reliable method of fetching the\n            last message, consider using either :meth:`history`\n            or :meth:`fetch_message` with the :attr:`last_message_id`\n            attribute.\n\n        Returns\n        ---------\n        Optional[:class:`Message`]\n            The last message in this channel or ``None`` if not found.\n        \"\"\"\n        return self._state._get_message(self.last_message_id) if self.last_message_id else None\n\n    @property\n    def category(self) -> Optional[CategoryChannel]:\n        \"\"\"The category channel the parent channel belongs to, if applicable.\n\n        Raises\n        -------\n        ClientException\n            The parent channel was not cached and returned ``None``.\n\n        Returns\n        -------\n        Optional[:class:`CategoryChannel`]\n            The parent channel's category.\n        \"\"\"\n\n        parent = self.parent\n        if parent is None:\n            raise ClientException('Parent channel not found')\n        return parent.category\n\n    @property\n    def category_id(self) -> Optional[int]:\n        \"\"\"The category channel ID the parent channel belongs to, if applicable.\n\n        Raises\n        -------\n        ClientException\n            The parent channel was not cached and returned ``None``.\n\n        Returns\n        -------\n        Optional[:class:`int`]\n            The parent channel's category ID.\n        \"\"\"\n\n        parent = self.parent\n        if parent is None:\n            raise ClientException('Parent channel not found')\n        return parent.category_id\n\n    @property\n    def created_at(self) -> Optional[datetime]:\n        \"\"\"An aware timestamp of when the thread was created in UTC.\n\n        .. note::\n\n            This timestamp only exists for threads created after 9 January 2022, otherwise returns ``None``.\n        \"\"\"\n        return self._created_at\n\n    def is_private(self) -> bool:\n        \"\"\":class:`bool`: Whether the thread is a private thread.\n\n        A private thread is only viewable by those that have been explicitly\n        invited or have :attr:`~.Permissions.manage_threads`.\n        \"\"\"\n        return self._type is ChannelType.private_thread\n\n    def is_news(self) -> bool:\n        \"\"\":class:`bool`: Whether the thread is a news thread.\n\n        A news thread is a thread that has a parent that is a news channel,\n        i.e. :meth:`.TextChannel.is_news` is ``True``.\n        \"\"\"\n        return self._type is ChannelType.news_thread\n\n    def is_nsfw(self) -> bool:\n        \"\"\":class:`bool`: Whether the thread is NSFW or not.\n\n        An NSFW thread is a thread that has a parent that is an NSFW channel,\n        i.e. :meth:`.TextChannel.is_nsfw` is ``True``.\n        \"\"\"\n        parent = self.parent\n        return parent is not None and parent.is_nsfw()\n\n    def permissions_for(self, obj: Union[Member, Role], /) -> Permissions:\n        \"\"\"Handles permission resolution for the :class:`~discord.Member`\n        or :class:`~discord.Role`.\n\n        Since threads do not have their own permissions, they mostly\n        inherit them from the parent channel with some implicit\n        permissions changed.\n\n        Parameters\n        ----------\n        obj: Union[:class:`~discord.Member`, :class:`~discord.Role`]\n            The object to resolve permissions for. This could be either\n            a member or a role. If it's a role then member overwrites\n            are not computed.\n\n        Raises\n        -------\n        ClientException\n            The parent channel was not cached and returned ``None``\n\n        Returns\n        -------\n        :class:`~discord.Permissions`\n            The resolved permissions for the member or role.\n        \"\"\"\n\n        parent = self.parent\n        if parent is None:\n            raise ClientException('Parent channel not found')\n\n        base = GuildChannel.permissions_for(parent, obj)\n\n        # if you can't send a message in a channel then you can't have certain\n        # permissions as well\n        if not base.send_messages_in_threads:\n            base.send_tts_messages = False\n            base.mention_everyone = False\n            base.embed_links = False\n            base.attach_files = False\n\n        # if you can't read a channel then you have no permissions there\n        if not base.read_messages:\n            denied = Permissions.all_channel()\n            base.value &= ~denied.value\n\n        return base\n\n    async def delete_messages(self, messages: Iterable[Snowflake], /, *, reason: Optional[str] = None) -> None:\n        \"\"\"|coro|\n\n        Deletes a list of messages. This is similar to :meth:`Message.delete`\n        except it bulk deletes multiple messages.\n\n        As a special case, if the number of messages is 0, then nothing\n        is done. If the number of messages is 1 then single message\n        delete is done. If it's more than two, then bulk delete is used.\n\n        You cannot bulk delete more than 100 messages or messages that\n        are older than 14 days old.\n\n        You must have :attr:`~Permissions.manage_messages` to do this.\n\n        Parameters\n        -----------\n        messages: Iterable[:class:`abc.Snowflake`]\n            An iterable of messages denoting which ones to bulk delete.\n        reason: Optional[:class:`str`]\n            The reason for deleting the messages. Shows up on the audit log.\n\n        Raises\n        ------\n        ClientException\n            The number of messages to delete was more than 100.\n        Forbidden\n            You do not have proper permissions to delete the messages or\n            you're not using a bot account.\n        NotFound\n            If single delete, then the message was already deleted.\n        HTTPException\n            Deleting the messages failed.\n        \"\"\"\n        if not isinstance(messages, (list, tuple)):\n            messages = list(messages)\n\n        if len(messages) == 0:\n            return  # do nothing\n\n        if len(messages) == 1:\n            message_id = messages[0].id\n            await self._state.http.delete_message(self.id, message_id, reason=reason)\n            return\n\n        if len(messages) > 100:\n            raise ClientException('Can only bulk delete messages up to 100 messages')\n\n        message_ids: SnowflakeList = [m.id for m in messages]\n        await self._state.http.delete_messages(self.id, message_ids, reason=reason)\n\n    async def purge(\n        self,\n        *,\n        limit: Optional[int] = 100,\n        check: Callable[[Message], bool] = MISSING,\n        before: Optional[SnowflakeTime] = None,\n        after: Optional[SnowflakeTime] = None,\n        around: Optional[SnowflakeTime] = None,\n        oldest_first: Optional[bool] = None,\n        bulk: bool = True,\n        reason: Optional[str] = None,\n    ) -> List[Message]:\n        \"\"\"|coro|\n\n        Purges a list of messages that meet the criteria given by the predicate\n        ``check``. If a ``check`` is not provided then all messages are deleted\n        without discrimination.\n\n        You must have :attr:`~Permissions.manage_messages` to\n        delete messages even if they are your own.\n        Having :attr:`~Permissions.read_message_history` is\n        also needed to retrieve message history.\n\n        Examples\n        ---------\n\n        Deleting bot's messages ::\n\n            def is_me(m):\n                return m.author == client.user\n\n            deleted = await thread.purge(limit=100, check=is_me)\n            await thread.send(f'Deleted {len(deleted)} message(s)')\n\n        Parameters\n        -----------\n        limit: Optional[:class:`int`]\n            The number of messages to search through. This is not the number\n            of messages that will be deleted, though it can be.\n        check: Callable[[:class:`Message`], :class:`bool`]\n            The function used to check if a message should be deleted.\n            It must take a :class:`Message` as its sole parameter.\n        before: Optional[Union[:class:`abc.Snowflake`, :class:`datetime.datetime`]]\n            Same as ``before`` in :meth:`history`.\n        after: Optional[Union[:class:`abc.Snowflake`, :class:`datetime.datetime`]]\n            Same as ``after`` in :meth:`history`.\n        around: Optional[Union[:class:`abc.Snowflake`, :class:`datetime.datetime`]]\n            Same as ``around`` in :meth:`history`.\n        oldest_first: Optional[:class:`bool`]\n            Same as ``oldest_first`` in :meth:`history`.\n        bulk: :class:`bool`\n            If ``True``, use bulk delete. Setting this to ``False`` is useful for mass-deleting\n            a bot's own messages without :attr:`Permissions.manage_messages`. When ``True``, will\n            fall back to single delete if messages are older than two weeks.\n        reason: Optional[:class:`str`]\n            The reason for purging the messages. Shows up on the audit log.\n\n        Raises\n        -------\n        Forbidden\n            You do not have proper permissions to do the actions required.\n        HTTPException\n            Purging the messages failed.\n\n        Returns\n        --------\n        List[:class:`.Message`]\n            The list of messages that were deleted.\n        \"\"\"\n\n        return await _purge_helper(\n            self,\n            limit=limit,\n            check=check,\n            before=before,\n            after=after,\n            around=around,\n            oldest_first=oldest_first,\n            bulk=bulk,\n            reason=reason,\n        )\n\n    async def edit(\n        self,\n        *,\n        name: str = MISSING,\n        archived: bool = MISSING,\n        locked: bool = MISSING,\n        invitable: bool = MISSING,\n        pinned: bool = MISSING,\n        slowmode_delay: int = MISSING,\n        auto_archive_duration: ThreadArchiveDuration = MISSING,\n        applied_tags: Sequence[ForumTag] = MISSING,\n        reason: Optional[str] = None,\n    ) -> Thread:\n        \"\"\"|coro|\n\n        Edits the thread.\n\n        Editing the thread requires :attr:`.Permissions.manage_threads`. The thread\n        creator can also edit ``name``, ``archived`` or ``auto_archive_duration``.\n        Note that if the thread is locked then only those with :attr:`.Permissions.manage_threads`\n        can unarchive a thread.\n\n        The thread must be unarchived to be edited.\n\n        Parameters\n        ------------\n        name: :class:`str`\n            The new name of the thread.\n        archived: :class:`bool`\n            Whether to archive the thread or not.\n        locked: :class:`bool`\n            Whether to lock the thread or not.\n        pinned: :class:`bool`\n            Whether to pin the thread or not. This only works if the thread is part of a forum.\n        invitable: :class:`bool`\n            Whether non-moderators can add other non-moderators to this thread.\n            Only available for private threads.\n        auto_archive_duration: :class:`int`\n            The new duration in minutes before a thread is automatically hidden from the channel list.\n            Must be one of ``60``, ``1440``, ``4320``, or ``10080``.\n        slowmode_delay: :class:`int`\n            Specifies the slowmode rate limit for user in this thread, in seconds.\n            A value of ``0`` disables slowmode. The maximum value possible is ``21600``.\n        applied_tags: Sequence[:class:`ForumTag`]\n            The new tags to apply to the thread. There can only be up to 5 tags applied to a thread.\n\n            .. versionadded:: 2.1\n        reason: Optional[:class:`str`]\n            The reason for editing this thread. Shows up on the audit log.\n\n        Raises\n        -------\n        Forbidden\n            You do not have permissions to edit the thread.\n        HTTPException\n            Editing the thread failed.\n\n        Returns\n        --------\n        :class:`Thread`\n            The newly edited thread.\n        \"\"\"\n        payload = {}\n        if name is not MISSING:\n            payload['name'] = str(name)\n        if archived is not MISSING:\n            payload['archived'] = archived\n        if auto_archive_duration is not MISSING:\n            payload['auto_archive_duration'] = auto_archive_duration\n        if locked is not MISSING:\n            payload['locked'] = locked\n        if invitable is not MISSING:\n            payload['invitable'] = invitable\n        if slowmode_delay is not MISSING:\n            payload['rate_limit_per_user'] = slowmode_delay\n        if pinned is not MISSING:\n            flags = self.flags\n            flags.pinned = pinned\n            payload['flags'] = flags.value\n        if applied_tags is not MISSING:\n            payload['applied_tags'] = [str(tag.id) for tag in applied_tags]\n\n        data = await self._state.http.edit_channel(self.id, **payload, reason=reason)\n        # The data payload will always be a Thread payload\n        return Thread(data=data, state=self._state, guild=self.guild)  # type: ignore\n\n    async def add_tags(self, *tags: Snowflake, reason: Optional[str] = None) -> None:\n        r\"\"\"|coro|\n\n        Adds the given forum tags to a thread.\n\n        You must have :attr:`~Permissions.manage_threads` to\n        use this or the thread must be owned by you.\n\n        Tags that have :attr:`ForumTag.moderated` set to ``True`` require\n        :attr:`~Permissions.manage_threads` to be added.\n\n        The maximum number of tags that can be added to a thread is 5.\n\n        The parent channel must be a :class:`ForumChannel`.\n\n        .. versionadded:: 2.1\n\n        Parameters\n        -----------\n        \\*tags: :class:`abc.Snowflake`\n            An argument list of :class:`abc.Snowflake` representing a :class:`ForumTag`\n            to add to the thread.\n        reason: Optional[:class:`str`]\n            The reason for adding these tags.\n\n        Raises\n        -------\n        Forbidden\n            You do not have permissions to add these tags.\n        HTTPException\n            Adding tags failed.\n        \"\"\"\n\n        applied_tags = [str(tag) for tag in self._applied_tags]\n        applied_tags.extend(str(tag.id) for tag in tags)\n\n        await self._state.http.edit_channel(self.id, applied_tags=_unique(applied_tags), reason=reason)\n\n    async def remove_tags(self, *tags: Snowflake, reason: Optional[str] = None) -> None:\n        r\"\"\"|coro|\n\n        Remove the given forum tags to a thread.\n\n        You must have :attr:`~Permissions.manage_threads` to\n        use this or the thread must be owned by you.\n\n        The parent channel must be a :class:`ForumChannel`.\n\n        .. versionadded:: 2.1\n\n        Parameters\n        -----------\n        \\*tags: :class:`abc.Snowflake`\n            An argument list of :class:`abc.Snowflake` representing a :class:`ForumTag`\n            to remove to the thread.\n        reason: Optional[:class:`str`]\n            The reason for removing these tags.\n\n        Raises\n        -------\n        Forbidden\n            You do not have permissions to remove these tags.\n        HTTPException\n            Removing tags failed.\n        \"\"\"\n\n        # Once again, taking advantage of the fact that dicts are ordered since 3.7\n        applied_tags: Dict[str, Literal[None]] = {str(tag): None for tag in self._applied_tags}\n\n        for tag in tags:\n            applied_tags.pop(str(tag.id), None)\n\n        await self._state.http.edit_channel(self.id, applied_tags=list(applied_tags.keys()), reason=reason)\n\n    async def join(self) -> None:\n        \"\"\"|coro|\n\n        Joins this thread.\n\n        You must have :attr:`~Permissions.send_messages_in_threads` to join a thread.\n        If the thread is private, :attr:`~Permissions.manage_threads` is also needed.\n\n        Raises\n        -------\n        Forbidden\n            You do not have permissions to join the thread.\n        HTTPException\n            Joining the thread failed.\n        \"\"\"\n        await self._state.http.join_thread(self.id)\n\n    async def leave(self) -> None:\n        \"\"\"|coro|\n\n        Leaves this thread.\n\n        Raises\n        -------\n        HTTPException\n            Leaving the thread failed.\n        \"\"\"\n        await self._state.http.leave_thread(self.id)\n\n    async def add_user(self, user: Snowflake, /) -> None:\n        \"\"\"|coro|\n\n        Adds a user to this thread.\n\n        You must have :attr:`~Permissions.send_messages_in_threads` to add a user to a thread.\n        If the thread is private and :attr:`invitable` is ``False`` then :attr:`~Permissions.manage_messages`\n        is required to add a user to the thread.\n\n        Parameters\n        -----------\n        user: :class:`abc.Snowflake`\n            The user to add to the thread.\n\n        Raises\n        -------\n        Forbidden\n            You do not have permissions to add the user to the thread.\n        HTTPException\n            Adding the user to the thread failed.\n        \"\"\"\n        await self._state.http.add_user_to_thread(self.id, user.id)\n\n    async def remove_user(self, user: Snowflake, /) -> None:\n        \"\"\"|coro|\n\n        Removes a user from this thread.\n\n        You must have :attr:`~Permissions.manage_threads` or be the creator of the thread to remove a user.\n\n        Parameters\n        -----------\n        user: :class:`abc.Snowflake`\n            The user to remove from the thread.\n\n        Raises\n        -------\n        Forbidden\n            You do not have permissions to remove the user from the thread.\n        HTTPException\n            Removing the user from the thread failed.\n        \"\"\"\n        await self._state.http.remove_user_from_thread(self.id, user.id)\n\n    async def fetch_member(self, user_id: int, /) -> ThreadMember:\n        \"\"\"|coro|\n\n        Retrieves a :class:`ThreadMember` for the given user ID.\n\n        Raises\n        -------\n        NotFound\n            The specified user is not a member of this thread.\n        HTTPException\n            Retrieving the member failed.\n\n        Returns\n        --------\n        :class:`ThreadMember`\n            The thread member from the user ID.\n        \"\"\"\n\n        data = await self._state.http.get_thread_member(self.id, user_id)\n        return ThreadMember(parent=self, data=data)\n\n    async def fetch_members(self) -> List[ThreadMember]:\n        \"\"\"|coro|\n\n        Retrieves all :class:`ThreadMember` that are in this thread.\n\n        This requires :attr:`Intents.members` to get information about members\n        other than yourself.\n\n        Raises\n        -------\n        HTTPException\n            Retrieving the members failed.\n\n        Returns\n        --------\n        List[:class:`ThreadMember`]\n            All thread members in the thread.\n        \"\"\"\n\n        members = await self._state.http.get_thread_members(self.id)\n        return [ThreadMember(parent=self, data=data) for data in members]\n\n    async def delete(self, *, reason: Optional[str] = None) -> None:\n        \"\"\"|coro|\n\n        Deletes this thread.\n\n        You must have :attr:`~Permissions.manage_threads` to delete threads.\n\n        Parameters\n        -----------\n        reason: Optional[:class:`str`]\n            The reason for deleting this thread.\n            Shows up on the audit log.\n\n            .. versionadded:: 2.4\n\n        Raises\n        -------\n        Forbidden\n            You do not have permissions to delete this thread.\n        HTTPException\n            Deleting the thread failed.\n        \"\"\"\n        await self._state.http.delete_channel(self.id, reason=reason)\n\n    def get_partial_message(self, message_id: int, /) -> PartialMessage:\n        \"\"\"Creates a :class:`PartialMessage` from the message ID.\n\n        This is useful if you want to work with a message and only have its ID without\n        doing an unnecessary API call.\n\n        .. versionadded:: 2.0\n\n        Parameters\n        ------------\n        message_id: :class:`int`\n            The message ID to create a partial message for.\n\n        Returns\n        ---------\n        :class:`PartialMessage`\n            The partial message.\n        \"\"\"\n\n        from .message import PartialMessage\n\n        return PartialMessage(channel=self, id=message_id)\n\n    def _add_member(self, member: ThreadMember, /) -> None:\n        self._members[member.id] = member\n\n    def _pop_member(self, member_id: int, /) -> Optional[ThreadMember]:\n        return self._members.pop(member_id, None)\n\n\nclass ThreadMember(Hashable):\n    \"\"\"Represents a Discord thread member.\n\n    .. container:: operations\n\n        .. describe:: x == y\n\n            Checks if two thread members are equal.\n\n        .. describe:: x != y\n\n            Checks if two thread members are not equal.\n\n        .. describe:: hash(x)\n\n            Returns the thread member's hash.\n\n        .. describe:: str(x)\n\n            Returns the thread member's name.\n\n    .. versionadded:: 2.0\n\n    Attributes\n    -----------\n    id: :class:`int`\n        The thread member's ID.\n    thread_id: :class:`int`\n        The thread's ID.\n    joined_at: :class:`datetime.datetime`\n        The time the member joined the thread in UTC.\n    \"\"\"\n\n    __slots__ = (\n        'id',\n        'thread_id',\n        'joined_at',\n        'flags',\n        '_state',\n        'parent',\n    )\n\n    def __init__(self, parent: Thread, data: ThreadMemberPayload) -> None:\n        self.parent: Thread = parent\n        self._state: ConnectionState = parent._state\n        self._from_data(data)\n\n    def __repr__(self) -> str:\n        return f'<ThreadMember id={self.id} thread_id={self.thread_id} joined_at={self.joined_at!r}>'\n\n    def _from_data(self, data: ThreadMemberPayload) -> None:\n        self.id: int\n        try:\n            self.id = int(data['user_id'])\n        except KeyError:\n            self.id = self._state.self_id  # type: ignore\n\n        self.thread_id: int\n        try:\n            self.thread_id = int(data['id'])\n        except KeyError:\n            self.thread_id = self.parent.id\n\n        self.joined_at: datetime = parse_time(data['join_timestamp'])\n        self.flags: int = data['flags']\n\n    @property\n    def thread(self) -> Thread:\n        \"\"\":class:`Thread`: The thread this member belongs to.\"\"\"\n        return self.parent\n"
  },
  {
    "path": "discord/types/__init__.py",
    "content": "\"\"\"\ndiscord.types\n~~~~~~~~~~~~~~\n\nTypings for the Discord API\n\n:copyright: (c) 2015-present Rapptz\n:license: MIT, see LICENSE for more details.\n\n\"\"\"\n"
  },
  {
    "path": "discord/types/activity.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom __future__ import annotations\n\nfrom typing import List, Literal, Optional, TypedDict\nfrom typing_extensions import NotRequired\nfrom .user import User\nfrom .snowflake import Snowflake\n\n\nStatusType = Literal['idle', 'dnd', 'online', 'offline']\n\n\nclass PartialPresenceUpdate(TypedDict):\n    user: User\n    guild_id: Snowflake\n    status: StatusType\n    activities: List[Activity]\n    client_status: ClientStatus\n\n\nclass ClientStatus(TypedDict, total=False):\n    desktop: StatusType\n    mobile: StatusType\n    web: StatusType\n\n\nclass ActivityTimestamps(TypedDict, total=False):\n    start: int\n    end: int\n\n\nclass ActivityParty(TypedDict, total=False):\n    id: str\n    size: List[int]\n\n\nclass ActivityAssets(TypedDict, total=False):\n    large_image: str\n    large_text: str\n    small_image: str\n    small_text: str\n\n\nclass ActivitySecrets(TypedDict, total=False):\n    join: str\n    spectate: str\n    match: str\n\n\nclass ActivityEmoji(TypedDict):\n    name: str\n    id: NotRequired[Snowflake]\n    animated: NotRequired[bool]\n\n\nActivityType = Literal[0, 1, 2, 4, 5]\n\n\nclass SendableActivity(TypedDict):\n    name: str\n    type: ActivityType\n    url: NotRequired[Optional[str]]\n\n\nclass _BaseActivity(SendableActivity):\n    created_at: int\n\n\nclass Activity(_BaseActivity, total=False):\n    state: Optional[str]\n    details: Optional[str]\n    timestamps: ActivityTimestamps\n    platform: Optional[str]\n    assets: ActivityAssets\n    party: ActivityParty\n    application_id: Snowflake\n    flags: int\n    emoji: Optional[ActivityEmoji]\n    secrets: ActivitySecrets\n    session_id: Optional[str]\n    instance: bool\n    buttons: List[str]\n    sync_id: str\n"
  },
  {
    "path": "discord/types/appinfo.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom __future__ import annotations\n\nfrom typing import TypedDict, List, Optional\nfrom typing_extensions import NotRequired\n\nfrom .user import User\nfrom .team import Team\nfrom .snowflake import Snowflake\n\n\nclass InstallParams(TypedDict):\n    scopes: List[str]\n    permissions: str\n\n\nclass BaseAppInfo(TypedDict):\n    id: Snowflake\n    name: str\n    verify_key: str\n    icon: Optional[str]\n    summary: str\n    description: str\n    flags: int\n    cover_image: NotRequired[str]\n    terms_of_service_url: NotRequired[str]\n    privacy_policy_url: NotRequired[str]\n    rpc_origins: NotRequired[List[str]]\n    interactions_endpoint_url: NotRequired[Optional[str]]\n    redirect_uris: NotRequired[List[str]]\n    role_connections_verification_url: NotRequired[Optional[str]]\n\n\nclass AppInfo(BaseAppInfo):\n    owner: User\n    bot_public: bool\n    bot_require_code_grant: bool\n    team: NotRequired[Team]\n    guild_id: NotRequired[Snowflake]\n    primary_sku_id: NotRequired[Snowflake]\n    slug: NotRequired[str]\n    hook: NotRequired[bool]\n    max_participants: NotRequired[int]\n    tags: NotRequired[List[str]]\n    install_params: NotRequired[InstallParams]\n    custom_install_url: NotRequired[str]\n\n\nclass PartialAppInfo(BaseAppInfo, total=False):\n    hook: bool\n    max_participants: int\n    approximate_guild_count: int\n\n\nclass GatewayAppInfo(TypedDict):\n    id: Snowflake\n    flags: int\n"
  },
  {
    "path": "discord/types/audit_log.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom __future__ import annotations\n\nfrom typing import List, Literal, Optional, TypedDict, Union\nfrom typing_extensions import NotRequired\n\nfrom .webhook import Webhook\nfrom .guild import MFALevel, VerificationLevel, ExplicitContentFilterLevel, DefaultMessageNotificationLevel\nfrom .integration import IntegrationExpireBehavior, PartialIntegration\nfrom .user import User\nfrom .scheduled_event import EntityType, EventStatus, GuildScheduledEvent\nfrom .snowflake import Snowflake\nfrom .role import Role\nfrom .channel import ChannelType, DefaultReaction, PrivacyLevel, VideoQualityMode, PermissionOverwrite, ForumTag\nfrom .threads import Thread\nfrom .command import ApplicationCommand, ApplicationCommandPermissions\nfrom .automod import AutoModerationTriggerMetadata\n\nAuditLogEvent = Literal[\n    1,\n    10,\n    11,\n    12,\n    13,\n    14,\n    15,\n    20,\n    21,\n    22,\n    23,\n    24,\n    25,\n    26,\n    27,\n    28,\n    30,\n    31,\n    32,\n    40,\n    41,\n    42,\n    50,\n    51,\n    52,\n    60,\n    61,\n    62,\n    72,\n    73,\n    74,\n    75,\n    80,\n    81,\n    82,\n    83,\n    84,\n    85,\n    90,\n    91,\n    92,\n    100,\n    101,\n    102,\n    110,\n    111,\n    112,\n    121,\n    140,\n    141,\n    142,\n    143,\n    144,\n    145,\n    150,\n    151,\n]\n\n\nclass _AuditLogChange_Str(TypedDict):\n    key: Literal[\n        'name',\n        'description',\n        'preferred_locale',\n        'vanity_url_code',\n        'topic',\n        'code',\n        'allow',\n        'deny',\n        'permissions',\n        'tags',\n        'unicode_emoji',\n    ]\n    new_value: str\n    old_value: str\n\n\nclass _AuditLogChange_AssetHash(TypedDict):\n    key: Literal['icon_hash', 'splash_hash', 'discovery_splash_hash', 'banner_hash', 'avatar_hash', 'asset']\n    new_value: str\n    old_value: str\n\n\nclass _AuditLogChange_Snowflake(TypedDict):\n    key: Literal[\n        'id',\n        'owner_id',\n        'afk_channel_id',\n        'rules_channel_id',\n        'public_updates_channel_id',\n        'widget_channel_id',\n        'system_channel_id',\n        'application_id',\n        'channel_id',\n        'inviter_id',\n        'guild_id',\n    ]\n    new_value: Snowflake\n    old_value: Snowflake\n\n\nclass _AuditLogChange_Bool(TypedDict):\n    key: Literal[\n        'widget_enabled',\n        'nsfw',\n        'hoist',\n        'mentionable',\n        'temporary',\n        'deaf',\n        'mute',\n        'nick',\n        'enabled_emoticons',\n        'region',\n        'rtc_region',\n        'available',\n        'archived',\n        'locked',\n    ]\n    new_value: bool\n    old_value: bool\n\n\nclass _AuditLogChange_Int(TypedDict):\n    key: Literal[\n        'afk_timeout',\n        'prune_delete_days',\n        'position',\n        'bitrate',\n        'rate_limit_per_user',\n        'color',\n        'max_uses',\n        'max_age',\n        'user_limit',\n        'auto_archive_duration',\n        'default_auto_archive_duration',\n        'default_thread_rate_limit_per_user',\n        'communication_disabled_until',\n        'flags',\n    ]\n    new_value: int\n    old_value: int\n\n\nclass _AuditLogChange_ListRole(TypedDict):\n    key: Literal['$add', '$remove']\n    new_value: List[Role]\n    old_value: List[Role]\n\n\nclass _AuditLogChange_MFALevel(TypedDict):\n    key: Literal['mfa_level']\n    new_value: MFALevel\n    old_value: MFALevel\n\n\nclass _AuditLogChange_VerificationLevel(TypedDict):\n    key: Literal['verification_level']\n    new_value: VerificationLevel\n    old_value: VerificationLevel\n\n\nclass _AuditLogChange_ExplicitContentFilter(TypedDict):\n    key: Literal['explicit_content_filter']\n    new_value: ExplicitContentFilterLevel\n    old_value: ExplicitContentFilterLevel\n\n\nclass _AuditLogChange_DefaultMessageNotificationLevel(TypedDict):\n    key: Literal['default_message_notifications']\n    new_value: DefaultMessageNotificationLevel\n    old_value: DefaultMessageNotificationLevel\n\n\nclass _AuditLogChange_ChannelType(TypedDict):\n    key: Literal['type']\n    new_value: ChannelType\n    old_value: ChannelType\n\n\nclass _AuditLogChange_IntegrationExpireBehaviour(TypedDict):\n    key: Literal['expire_behavior']\n    new_value: IntegrationExpireBehavior\n    old_value: IntegrationExpireBehavior\n\n\nclass _AuditLogChange_VideoQualityMode(TypedDict):\n    key: Literal['video_quality_mode']\n    new_value: VideoQualityMode\n    old_value: VideoQualityMode\n\n\nclass _AuditLogChange_Overwrites(TypedDict):\n    key: Literal['permission_overwrites']\n    new_value: List[PermissionOverwrite]\n    old_value: List[PermissionOverwrite]\n\n\nclass _AuditLogChange_PrivacyLevel(TypedDict):\n    key: Literal['privacy_level']\n    new_value: PrivacyLevel\n    old_value: PrivacyLevel\n\n\nclass _AuditLogChange_Status(TypedDict):\n    key: Literal['status']\n    new_value: EventStatus\n    old_value: EventStatus\n\n\nclass _AuditLogChange_EntityType(TypedDict):\n    key: Literal['entity_type']\n    new_value: EntityType\n    old_value: EntityType\n\n\nclass _AuditLogChange_AppCommandPermissions(TypedDict):\n    key: str\n    new_value: ApplicationCommandPermissions\n    old_value: ApplicationCommandPermissions\n\n\nclass _AuditLogChange_AppliedTags(TypedDict):\n    key: Literal['applied_tags']\n    new_value: List[Snowflake]\n    old_value: List[Snowflake]\n\n\nclass _AuditLogChange_AvailableTags(TypedDict):\n    key: Literal['available_tags']\n    new_value: List[ForumTag]\n    old_value: List[ForumTag]\n\n\nclass _AuditLogChange_DefaultReactionEmoji(TypedDict):\n    key: Literal['default_reaction_emoji']\n    new_value: Optional[DefaultReaction]\n    old_value: Optional[DefaultReaction]\n\n\nclass _AuditLogChange_TriggerMetadata(TypedDict):\n    key: Literal['trigger_metadata']\n    new_value: Optional[AutoModerationTriggerMetadata]\n    old_value: Optional[AutoModerationTriggerMetadata]\n\n\nAuditLogChange = Union[\n    _AuditLogChange_Str,\n    _AuditLogChange_AssetHash,\n    _AuditLogChange_Snowflake,\n    _AuditLogChange_Int,\n    _AuditLogChange_Bool,\n    _AuditLogChange_ListRole,\n    _AuditLogChange_MFALevel,\n    _AuditLogChange_VerificationLevel,\n    _AuditLogChange_ExplicitContentFilter,\n    _AuditLogChange_DefaultMessageNotificationLevel,\n    _AuditLogChange_ChannelType,\n    _AuditLogChange_IntegrationExpireBehaviour,\n    _AuditLogChange_VideoQualityMode,\n    _AuditLogChange_Overwrites,\n    _AuditLogChange_PrivacyLevel,\n    _AuditLogChange_Status,\n    _AuditLogChange_EntityType,\n    _AuditLogChange_AppCommandPermissions,\n    _AuditLogChange_AppliedTags,\n    _AuditLogChange_AvailableTags,\n    _AuditLogChange_DefaultReactionEmoji,\n    _AuditLogChange_TriggerMetadata,\n]\n\n\nclass AuditEntryInfo(TypedDict):\n    delete_member_days: str\n    members_removed: str\n    channel_id: Snowflake\n    message_id: Snowflake\n    count: str\n    id: Snowflake\n    type: Literal['0', '1']\n    role_name: str\n    application_id: Snowflake\n    guild_id: Snowflake\n    auto_moderation_rule_name: str\n    auto_moderation_rule_trigger_type: str\n    integration_type: str\n\n\nclass AuditLogEntry(TypedDict):\n    target_id: Optional[str]\n    user_id: Optional[Snowflake]\n    id: Snowflake\n    action_type: AuditLogEvent\n    changes: NotRequired[List[AuditLogChange]]\n    options: NotRequired[AuditEntryInfo]\n    reason: NotRequired[str]\n\n\nclass AuditLog(TypedDict):\n    webhooks: List[Webhook]\n    users: List[User]\n    audit_log_entries: List[AuditLogEntry]\n    integrations: List[PartialIntegration]\n    threads: List[Thread]\n    guild_scheduled_events: List[GuildScheduledEvent]\n    application_commands: List[ApplicationCommand]\n"
  },
  {
    "path": "discord/types/automod.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom typing import Literal, TypedDict, List, Union, Optional\nfrom typing_extensions import NotRequired\n\nfrom .snowflake import Snowflake\n\nAutoModerationRuleTriggerType = Literal[1, 2, 3, 4]\nAutoModerationActionTriggerType = Literal[1, 2, 3]\nAutoModerationRuleEventType = Literal[1]\nAutoModerationTriggerPresets = Literal[1, 2, 3]\n\n\nclass Empty(TypedDict):\n    ...\n\n\nclass _AutoModerationActionMetadataAlert(TypedDict):\n    channel_id: Snowflake\n\n\nclass _AutoModerationActionMetadataTimeout(TypedDict):\n    duration_seconds: int\n\n\nclass _AutoModerationActionMetadataCustomMessage(TypedDict):\n    custom_message: str\n\n\nclass _AutoModerationActionBlockMessage(TypedDict):\n    type: Literal[1]\n    metadata: NotRequired[_AutoModerationActionMetadataCustomMessage]\n\n\nclass _AutoModerationActionAlert(TypedDict):\n    type: Literal[2]\n    metadata: _AutoModerationActionMetadataAlert\n\n\nclass _AutoModerationActionTimeout(TypedDict):\n    type: Literal[3]\n    metadata: _AutoModerationActionMetadataTimeout\n\n\nAutoModerationAction = Union[_AutoModerationActionBlockMessage, _AutoModerationActionAlert, _AutoModerationActionTimeout]\n\n\nclass _AutoModerationTriggerMetadataKeyword(TypedDict):\n    keyword_filter: List[str]\n    regex_patterns: NotRequired[List[str]]\n\n\nclass _AutoModerationTriggerMetadataKeywordPreset(TypedDict):\n    presets: List[AutoModerationTriggerPresets]\n    allow_list: List[str]\n\n\nclass _AutoModerationTriggerMetadataMentionLimit(TypedDict):\n    mention_total_limit: int\n    mention_raid_protection_enabled: bool\n\n\nAutoModerationTriggerMetadata = Union[\n    _AutoModerationTriggerMetadataKeyword,\n    _AutoModerationTriggerMetadataKeywordPreset,\n    _AutoModerationTriggerMetadataMentionLimit,\n    Empty,\n]\n\n\nclass _BaseAutoModerationRule(TypedDict):\n    id: Snowflake\n    guild_id: Snowflake\n    name: str\n    creator_id: Snowflake\n    event_type: AutoModerationRuleEventType\n    actions: List[AutoModerationAction]\n    enabled: bool\n    exempt_roles: List[Snowflake]\n    exempt_channels: List[Snowflake]\n\n\nclass _AutoModerationRuleKeyword(_BaseAutoModerationRule):\n    trigger_type: Literal[1]\n    trigger_metadata: _AutoModerationTriggerMetadataKeyword\n\n\nclass _AutoModerationRuleKeywordPreset(_BaseAutoModerationRule):\n    trigger_type: Literal[4]\n    trigger_metadata: _AutoModerationTriggerMetadataKeywordPreset\n\n\nclass _AutoModerationRuleOther(_BaseAutoModerationRule):\n    trigger_type: Literal[2, 3]\n\n\nAutoModerationRule = Union[_AutoModerationRuleKeyword, _AutoModerationRuleKeywordPreset, _AutoModerationRuleOther]\n\n\nclass AutoModerationActionExecution(TypedDict):\n    guild_id: Snowflake\n    action: AutoModerationAction\n    rule_id: Snowflake\n    rule_trigger_type: AutoModerationRuleTriggerType\n    user_id: Snowflake\n    channel_id: NotRequired[Snowflake]\n    message_id: NotRequired[Snowflake]\n    alert_system_message_id: NotRequired[Snowflake]\n    content: str\n    matched_keyword: Optional[str]\n    matched_content: Optional[str]\n"
  },
  {
    "path": "discord/types/channel.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom typing import List, Literal, Optional, TypedDict, Union\nfrom typing_extensions import NotRequired\n\nfrom .user import PartialUser\nfrom .snowflake import Snowflake\nfrom .threads import ThreadMetadata, ThreadMember, ThreadArchiveDuration, ThreadType\n\n\nOverwriteType = Literal[0, 1]\n\n\nclass PermissionOverwrite(TypedDict):\n    id: Snowflake\n    type: OverwriteType\n    allow: str\n    deny: str\n\n\nChannelTypeWithoutThread = Literal[0, 1, 2, 3, 4, 5, 6, 13, 15, 16]\nChannelType = Union[ChannelTypeWithoutThread, ThreadType]\n\n\nclass _BaseChannel(TypedDict):\n    id: Snowflake\n    name: str\n\n\nclass _BaseGuildChannel(_BaseChannel):\n    guild_id: Snowflake\n    position: int\n    permission_overwrites: List[PermissionOverwrite]\n    nsfw: bool\n    parent_id: Optional[Snowflake]\n\n\nclass PartialChannel(_BaseChannel):\n    type: ChannelType\n\n\nclass _BaseTextChannel(_BaseGuildChannel, total=False):\n    topic: str\n    last_message_id: Optional[Snowflake]\n    last_pin_timestamp: str\n    rate_limit_per_user: int\n    default_thread_rate_limit_per_user: int\n    default_auto_archive_duration: ThreadArchiveDuration\n\n\nclass TextChannel(_BaseTextChannel):\n    type: Literal[0]\n\n\nclass NewsChannel(_BaseTextChannel):\n    type: Literal[5]\n\n\nVideoQualityMode = Literal[1, 2]\n\n\nclass VoiceChannel(_BaseTextChannel):\n    type: Literal[2]\n    bitrate: int\n    user_limit: int\n    rtc_region: NotRequired[Optional[str]]\n    video_quality_mode: NotRequired[VideoQualityMode]\n\n\nclass CategoryChannel(_BaseGuildChannel):\n    type: Literal[4]\n\n\nclass StageChannel(_BaseGuildChannel):\n    type: Literal[13]\n    bitrate: int\n    user_limit: int\n    rtc_region: NotRequired[Optional[str]]\n    topic: NotRequired[str]\n\n\nclass ThreadChannel(_BaseChannel):\n    type: Literal[10, 11, 12]\n    guild_id: Snowflake\n    parent_id: Snowflake\n    owner_id: Snowflake\n    nsfw: bool\n    last_message_id: Optional[Snowflake]\n    rate_limit_per_user: int\n    message_count: int\n    member_count: int\n    thread_metadata: ThreadMetadata\n    member: NotRequired[ThreadMember]\n    owner_id: NotRequired[Snowflake]\n    rate_limit_per_user: NotRequired[int]\n    last_message_id: NotRequired[Optional[Snowflake]]\n    last_pin_timestamp: NotRequired[str]\n    flags: NotRequired[int]\n    applied_tags: NotRequired[List[Snowflake]]\n\n\nclass DefaultReaction(TypedDict):\n    emoji_id: Optional[Snowflake]\n    emoji_name: Optional[str]\n\n\nclass ForumTag(TypedDict):\n    id: Snowflake\n    name: str\n    moderated: bool\n    emoji_id: Optional[Snowflake]\n    emoji_name: Optional[str]\n\n\nForumOrderType = Literal[0, 1]\nForumLayoutType = Literal[0, 1, 2]\n\n\nclass _BaseForumChannel(_BaseTextChannel):\n    available_tags: List[ForumTag]\n    default_reaction_emoji: Optional[DefaultReaction]\n    default_sort_order: Optional[ForumOrderType]\n    default_forum_layout: NotRequired[ForumLayoutType]\n    flags: NotRequired[int]\n\n\nclass ForumChannel(_BaseForumChannel):\n    type: Literal[15]\n\n\nclass MediaChannel(_BaseForumChannel):\n    type: Literal[16]\n\n\nGuildChannel = Union[\n    TextChannel, NewsChannel, VoiceChannel, CategoryChannel, StageChannel, ThreadChannel, ForumChannel, MediaChannel\n]\n\n\nclass _BaseDMChannel(_BaseChannel):\n    type: Literal[1]\n    last_message_id: Optional[Snowflake]\n\n\nclass DMChannel(_BaseDMChannel):\n    recipients: List[PartialUser]\n\n\nclass InteractionDMChannel(_BaseDMChannel):\n    recipients: NotRequired[List[PartialUser]]\n\n\nclass GroupDMChannel(_BaseChannel):\n    type: Literal[3]\n    icon: Optional[str]\n    owner_id: Snowflake\n    recipients: List[PartialUser]\n\n\nChannel = Union[GuildChannel, DMChannel, GroupDMChannel]\n\nPrivacyLevel = Literal[2]\n\n\nclass StageInstance(TypedDict):\n    id: Snowflake\n    guild_id: Snowflake\n    channel_id: Snowflake\n    topic: str\n    privacy_level: PrivacyLevel\n    discoverable_disabled: bool\n    guild_scheduled_event_id: Optional[int]\n"
  },
  {
    "path": "discord/types/command.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom __future__ import annotations\n\nfrom typing import Dict, List, Literal, Optional, TypedDict, Union\nfrom typing_extensions import NotRequired, Required\n\nfrom .channel import ChannelType\nfrom .snowflake import Snowflake\nfrom .interactions import InteractionContextType\n\nApplicationCommandType = Literal[1, 2, 3]\nApplicationCommandOptionType = Literal[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]\nApplicationIntegrationType = Literal[0, 1]\n\n\nclass _BaseApplicationCommandOption(TypedDict):\n    name: str\n    description: str\n    name_localizations: NotRequired[Optional[Dict[str, str]]]\n    description_localizations: NotRequired[Optional[Dict[str, str]]]\n\n\nclass _SubCommandCommandOption(_BaseApplicationCommandOption):\n    type: Literal[1]\n    options: List[_ValueApplicationCommandOption]\n\n\nclass _SubCommandGroupCommandOption(_BaseApplicationCommandOption):\n    type: Literal[2]\n    options: List[_SubCommandCommandOption]\n\n\nclass _BaseValueApplicationCommandOption(_BaseApplicationCommandOption, total=False):\n    required: bool\n\n\nclass _StringApplicationCommandOptionChoice(TypedDict):\n    name: str\n    name_localizations: NotRequired[Optional[Dict[str, str]]]\n    value: str\n\n\nclass _StringApplicationCommandOption(_BaseApplicationCommandOption):\n    type: Literal[3]\n    choices: NotRequired[List[_StringApplicationCommandOptionChoice]]\n    min_length: NotRequired[int]\n    max_length: NotRequired[int]\n    autocomplete: NotRequired[bool]\n\n\nclass _IntegerApplicationCommandOptionChoice(TypedDict):\n    name: str\n    name_localizations: NotRequired[Optional[Dict[str, str]]]\n    value: int\n\n\nclass _IntegerApplicationCommandOption(_BaseApplicationCommandOption, total=False):\n    type: Required[Literal[4]]\n    min_value: int\n    max_value: int\n    choices: List[_IntegerApplicationCommandOptionChoice]\n    autocomplete: bool\n\n\nclass _BooleanApplicationCommandOption(_BaseValueApplicationCommandOption):\n    type: Literal[5]\n\n\nclass _ChannelApplicationCommandOptionChoice(_BaseApplicationCommandOption):\n    type: Literal[7]\n    channel_types: NotRequired[List[ChannelType]]\n\n\nclass _NonChannelSnowflakeApplicationCommandOptionChoice(_BaseValueApplicationCommandOption):\n    type: Literal[6, 8, 9, 11]\n\n\n_SnowflakeApplicationCommandOptionChoice = Union[\n    _ChannelApplicationCommandOptionChoice,\n    _NonChannelSnowflakeApplicationCommandOptionChoice,\n]\n\n\nclass _NumberApplicationCommandOptionChoice(TypedDict):\n    name: str\n    name_localizations: NotRequired[Optional[Dict[str, str]]]\n    value: float\n\n\nclass _NumberApplicationCommandOption(_BaseValueApplicationCommandOption, total=False):\n    type: Required[Literal[10]]\n    min_value: float\n    max_value: float\n    choices: List[_NumberApplicationCommandOptionChoice]\n    autocomplete: bool\n\n\n_ValueApplicationCommandOption = Union[\n    _StringApplicationCommandOption,\n    _IntegerApplicationCommandOption,\n    _BooleanApplicationCommandOption,\n    _SnowflakeApplicationCommandOptionChoice,\n    _NumberApplicationCommandOption,\n]\n\nApplicationCommandOption = Union[\n    _SubCommandGroupCommandOption,\n    _SubCommandCommandOption,\n    _ValueApplicationCommandOption,\n]\n\nApplicationCommandOptionChoice = Union[\n    _StringApplicationCommandOptionChoice,\n    _IntegerApplicationCommandOptionChoice,\n    _NumberApplicationCommandOptionChoice,\n]\n\n\nclass _BaseApplicationCommand(TypedDict):\n    id: Snowflake\n    application_id: Snowflake\n    name: str\n    contexts: List[InteractionContextType]\n    integration_types: List[ApplicationIntegrationType]\n    dm_permission: NotRequired[Optional[bool]]\n    default_member_permissions: NotRequired[Optional[str]]\n    nsfw: NotRequired[bool]\n    version: Snowflake\n    name_localizations: NotRequired[Optional[Dict[str, str]]]\n    description_localizations: NotRequired[Optional[Dict[str, str]]]\n\n\nclass _ChatInputApplicationCommand(_BaseApplicationCommand, total=False):\n    description: Required[str]\n    type: Literal[1]\n    options: Union[\n        List[_ValueApplicationCommandOption],\n        List[Union[_SubCommandCommandOption, _SubCommandGroupCommandOption]],\n    ]\n\n\nclass _BaseContextMenuApplicationCommand(_BaseApplicationCommand):\n    description: Literal[\"\"]\n\n\nclass _UserApplicationCommand(_BaseContextMenuApplicationCommand):\n    type: Literal[2]\n\n\nclass _MessageApplicationCommand(_BaseContextMenuApplicationCommand):\n    type: Literal[3]\n\n\nGlobalApplicationCommand = Union[\n    _ChatInputApplicationCommand,\n    _UserApplicationCommand,\n    _MessageApplicationCommand,\n]\n\n\nclass _GuildChatInputApplicationCommand(_ChatInputApplicationCommand):\n    guild_id: Snowflake\n\n\nclass _GuildUserApplicationCommand(_UserApplicationCommand):\n    guild_id: Snowflake\n\n\nclass _GuildMessageApplicationCommand(_MessageApplicationCommand):\n    guild_id: Snowflake\n\n\nGuildApplicationCommand = Union[\n    _GuildChatInputApplicationCommand,\n    _GuildUserApplicationCommand,\n    _GuildMessageApplicationCommand,\n]\n\n\nApplicationCommand = Union[\n    GlobalApplicationCommand,\n    GuildApplicationCommand,\n]\n\n\nApplicationCommandPermissionType = Literal[1, 2, 3]\n\n\nclass ApplicationCommandPermissions(TypedDict):\n    id: Snowflake\n    type: ApplicationCommandPermissionType\n    permission: bool\n\n\nclass GuildApplicationCommandPermissions(TypedDict):\n    id: Snowflake\n    application_id: Snowflake\n    guild_id: Snowflake\n    permissions: List[ApplicationCommandPermissions]\n"
  },
  {
    "path": "discord/types/components.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom __future__ import annotations\n\nfrom typing import List, Literal, TypedDict, Union\nfrom typing_extensions import NotRequired\n\nfrom .emoji import PartialEmoji\nfrom .channel import ChannelType\n\nComponentType = Literal[1, 2, 3, 4]\nButtonStyle = Literal[1, 2, 3, 4, 5, 6]\nTextStyle = Literal[1, 2]\nDefaultValueType = Literal['user', 'role', 'channel']\n\n\nclass ActionRow(TypedDict):\n    type: Literal[1]\n    components: List[ActionRowChildComponent]\n\n\nclass ButtonComponent(TypedDict):\n    type: Literal[2]\n    style: ButtonStyle\n    custom_id: NotRequired[str]\n    url: NotRequired[str]\n    disabled: NotRequired[bool]\n    emoji: NotRequired[PartialEmoji]\n    label: NotRequired[str]\n    sku_id: NotRequired[str]\n\n\nclass SelectOption(TypedDict):\n    label: str\n    value: str\n    default: bool\n    description: NotRequired[str]\n    emoji: NotRequired[PartialEmoji]\n\n\nclass SelectComponent(TypedDict):\n    custom_id: str\n    placeholder: NotRequired[str]\n    min_values: NotRequired[int]\n    max_values: NotRequired[int]\n    disabled: NotRequired[bool]\n\n\nclass SelectDefaultValues(TypedDict):\n    id: int\n    type: DefaultValueType\n\n\nclass StringSelectComponent(SelectComponent):\n    type: Literal[3]\n    options: NotRequired[List[SelectOption]]\n\n\nclass UserSelectComponent(SelectComponent):\n    type: Literal[5]\n    default_values: NotRequired[List[SelectDefaultValues]]\n\n\nclass RoleSelectComponent(SelectComponent):\n    type: Literal[6]\n    default_values: NotRequired[List[SelectDefaultValues]]\n\n\nclass MentionableSelectComponent(SelectComponent):\n    type: Literal[7]\n    default_values: NotRequired[List[SelectDefaultValues]]\n\n\nclass ChannelSelectComponent(SelectComponent):\n    type: Literal[8]\n    channel_types: NotRequired[List[ChannelType]]\n    default_values: NotRequired[List[SelectDefaultValues]]\n\n\nclass TextInput(TypedDict):\n    type: Literal[4]\n    custom_id: str\n    style: TextStyle\n    label: str\n    placeholder: NotRequired[str]\n    value: NotRequired[str]\n    required: NotRequired[bool]\n    min_length: NotRequired[int]\n    max_length: NotRequired[int]\n\n\nclass SelectMenu(SelectComponent):\n    type: Literal[3, 5, 6, 7, 8]\n    options: NotRequired[List[SelectOption]]\n    channel_types: NotRequired[List[ChannelType]]\n    default_values: NotRequired[List[SelectDefaultValues]]\n\n\nActionRowChildComponent = Union[ButtonComponent, SelectMenu, TextInput]\nComponent = Union[ActionRow, ActionRowChildComponent]\n"
  },
  {
    "path": "discord/types/embed.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom typing import List, Literal, TypedDict\nfrom typing_extensions import NotRequired, Required\n\n\nclass EmbedFooter(TypedDict):\n    text: str\n    icon_url: NotRequired[str]\n    proxy_icon_url: NotRequired[str]\n\n\nclass EmbedField(TypedDict):\n    name: str\n    value: str\n    inline: NotRequired[bool]\n\n\nclass EmbedThumbnail(TypedDict, total=False):\n    url: Required[str]\n    proxy_url: str\n    height: int\n    width: int\n\n\nclass EmbedVideo(TypedDict, total=False):\n    url: str\n    proxy_url: str\n    height: int\n    width: int\n\n\nclass EmbedImage(TypedDict, total=False):\n    url: Required[str]\n    proxy_url: str\n    height: int\n    width: int\n\n\nclass EmbedProvider(TypedDict, total=False):\n    name: str\n    url: str\n\n\nclass EmbedAuthor(TypedDict, total=False):\n    name: Required[str]\n    url: str\n    icon_url: str\n    proxy_icon_url: str\n\n\nEmbedType = Literal['rich', 'image', 'video', 'gifv', 'article', 'link']\n\n\nclass Embed(TypedDict, total=False):\n    title: str\n    type: EmbedType\n    description: str\n    url: str\n    timestamp: str\n    color: int\n    footer: EmbedFooter\n    image: EmbedImage\n    thumbnail: EmbedThumbnail\n    video: EmbedVideo\n    provider: EmbedProvider\n    author: EmbedAuthor\n    fields: List[EmbedField]\n"
  },
  {
    "path": "discord/types/emoji.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom typing import Optional, TypedDict\nfrom .snowflake import Snowflake, SnowflakeList\nfrom .user import User\n\n\nclass PartialEmoji(TypedDict):\n    id: Optional[Snowflake]\n    name: Optional[str]\n\n\nclass Emoji(PartialEmoji, total=False):\n    roles: SnowflakeList\n    user: User\n    require_colons: bool\n    managed: bool\n    animated: bool\n    available: bool\n\n\nclass EditEmoji(TypedDict):\n    name: str\n    roles: Optional[SnowflakeList]\n"
  },
  {
    "path": "discord/types/gateway.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom typing import List, Literal, Optional, TypedDict\nfrom typing_extensions import NotRequired, Required\n\nfrom .automod import AutoModerationAction, AutoModerationRuleTriggerType\nfrom .activity import PartialPresenceUpdate\nfrom .sku import Entitlement\nfrom .voice import GuildVoiceState\nfrom .integration import BaseIntegration, IntegrationApplication\nfrom .role import Role\nfrom .channel import ChannelType, StageInstance\nfrom .interactions import Interaction\nfrom .invite import InviteTargetType\nfrom .emoji import Emoji, PartialEmoji\nfrom .member import MemberWithUser\nfrom .snowflake import Snowflake\nfrom .message import Message, ReactionType\nfrom .sticker import GuildSticker\nfrom .appinfo import GatewayAppInfo, PartialAppInfo\nfrom .guild import Guild, UnavailableGuild\nfrom .user import User, AvatarDecorationData\nfrom .threads import Thread, ThreadMember\nfrom .scheduled_event import GuildScheduledEvent\nfrom .audit_log import AuditLogEntry\n\n\nclass SessionStartLimit(TypedDict):\n    total: int\n    remaining: int\n    reset_after: int\n    max_concurrency: int\n\n\nclass Gateway(TypedDict):\n    url: str\n\n\nclass GatewayBot(Gateway):\n    shards: int\n    session_start_limit: SessionStartLimit\n\n\nclass ReadyEvent(TypedDict):\n    v: int\n    user: User\n    guilds: List[UnavailableGuild]\n    session_id: str\n    resume_gateway_url: str\n    shard: List[int]  # shard_id, num_shards\n    application: GatewayAppInfo\n\n\nResumedEvent = Literal[None]\n\nMessageCreateEvent = Message\n\n\nclass MessageDeleteEvent(TypedDict):\n    id: Snowflake\n    channel_id: Snowflake\n    guild_id: NotRequired[Snowflake]\n\n\nclass MessageDeleteBulkEvent(TypedDict):\n    ids: List[Snowflake]\n    channel_id: Snowflake\n    guild_id: NotRequired[Snowflake]\n\n\nclass MessageUpdateEvent(Message):\n    channel_id: Snowflake\n\n\nclass MessageReactionAddEvent(TypedDict):\n    user_id: Snowflake\n    channel_id: Snowflake\n    message_id: Snowflake\n    emoji: PartialEmoji\n    member: NotRequired[MemberWithUser]\n    guild_id: NotRequired[Snowflake]\n    message_author_id: NotRequired[Snowflake]\n    burst: bool\n    burst_colors: NotRequired[List[str]]\n    type: ReactionType\n\n\nclass MessageReactionRemoveEvent(TypedDict):\n    user_id: Snowflake\n    channel_id: Snowflake\n    message_id: Snowflake\n    emoji: PartialEmoji\n    guild_id: NotRequired[Snowflake]\n    burst: bool\n    type: ReactionType\n\n\nclass MessageReactionRemoveAllEvent(TypedDict):\n    message_id: Snowflake\n    channel_id: Snowflake\n    guild_id: NotRequired[Snowflake]\n\n\nclass MessageReactionRemoveEmojiEvent(TypedDict):\n    emoji: PartialEmoji\n    message_id: Snowflake\n    channel_id: Snowflake\n    guild_id: NotRequired[Snowflake]\n\n\nInteractionCreateEvent = Interaction\n\n\nPresenceUpdateEvent = PartialPresenceUpdate\n\n\nUserUpdateEvent = User\n\n\nclass InviteCreateEvent(TypedDict):\n    channel_id: Snowflake\n    code: str\n    created_at: str\n    max_age: int\n    max_uses: int\n    temporary: bool\n    uses: Literal[0]\n    guild_id: NotRequired[Snowflake]\n    inviter: NotRequired[User]\n    target_type: NotRequired[InviteTargetType]\n    target_user: NotRequired[User]\n    target_application: NotRequired[PartialAppInfo]\n\n\nclass InviteDeleteEvent(TypedDict):\n    channel_id: Snowflake\n    code: str\n    guild_id: NotRequired[Snowflake]\n\n\nclass _ChannelEvent(TypedDict):\n    id: Snowflake\n    type: ChannelType\n\n\nChannelCreateEvent = ChannelUpdateEvent = ChannelDeleteEvent = _ChannelEvent\n\n\nclass ChannelPinsUpdateEvent(TypedDict):\n    channel_id: Snowflake\n    guild_id: NotRequired[Snowflake]\n    last_pin_timestamp: NotRequired[Optional[str]]\n\n\nclass ThreadCreateEvent(Thread, total=False):\n    newly_created: bool\n    members: List[ThreadMember]\n\n\nThreadUpdateEvent = Thread\n\n\nclass ThreadDeleteEvent(TypedDict):\n    id: Snowflake\n    guild_id: Snowflake\n    parent_id: Snowflake\n    type: ChannelType\n\n\nclass ThreadListSyncEvent(TypedDict):\n    guild_id: Snowflake\n    threads: List[Thread]\n    members: List[ThreadMember]\n    channel_ids: NotRequired[List[Snowflake]]\n\n\nclass ThreadMemberUpdate(ThreadMember):\n    guild_id: Snowflake\n\n\nclass ThreadMembersUpdate(TypedDict):\n    id: Snowflake\n    guild_id: Snowflake\n    member_count: int\n    added_members: NotRequired[List[ThreadMember]]\n    removed_member_ids: NotRequired[List[Snowflake]]\n\n\nclass GuildMemberAddEvent(MemberWithUser):\n    guild_id: Snowflake\n\n\nclass GuildMemberRemoveEvent(TypedDict):\n    guild_id: Snowflake\n    user: User\n\n\nclass GuildMemberUpdateEvent(TypedDict):\n    guild_id: Snowflake\n    roles: List[Snowflake]\n    user: User\n    avatar: Optional[str]\n    joined_at: Optional[str]\n    flags: int\n    nick: NotRequired[str]\n    premium_since: NotRequired[Optional[str]]\n    deaf: NotRequired[bool]\n    mute: NotRequired[bool]\n    pending: NotRequired[bool]\n    communication_disabled_until: NotRequired[str]\n    avatar_decoration_data: NotRequired[AvatarDecorationData]\n\n\nclass GuildEmojisUpdateEvent(TypedDict):\n    guild_id: Snowflake\n    emojis: List[Emoji]\n\n\nclass GuildStickersUpdateEvent(TypedDict):\n    guild_id: Snowflake\n    stickers: List[GuildSticker]\n\n\nGuildCreateEvent = GuildUpdateEvent = Guild\nGuildDeleteEvent = UnavailableGuild\n\n\nclass _GuildBanEvent(TypedDict):\n    guild_id: Snowflake\n    user: User\n\n\nGuildBanAddEvent = GuildBanRemoveEvent = _GuildBanEvent\n\n\nclass _GuildRoleEvent(TypedDict):\n    guild_id: Snowflake\n    role: Role\n\n\nclass GuildRoleDeleteEvent(TypedDict):\n    guild_id: Snowflake\n    role_id: Snowflake\n\n\nGuildRoleCreateEvent = GuildRoleUpdateEvent = _GuildRoleEvent\n\n\nclass GuildMembersChunkEvent(TypedDict):\n    guild_id: Snowflake\n    members: List[MemberWithUser]\n    chunk_index: int\n    chunk_count: int\n    not_found: NotRequired[List[Snowflake]]\n    presences: NotRequired[List[PresenceUpdateEvent]]\n    nonce: NotRequired[str]\n\n\nclass GuildIntegrationsUpdateEvent(TypedDict):\n    guild_id: Snowflake\n\n\nclass _IntegrationEvent(BaseIntegration, total=False):\n    guild_id: Required[Snowflake]\n    role_id: Optional[Snowflake]\n    enable_emoticons: bool\n    subscriber_count: int\n    revoked: bool\n    application: IntegrationApplication\n\n\nIntegrationCreateEvent = IntegrationUpdateEvent = _IntegrationEvent\n\n\nclass IntegrationDeleteEvent(TypedDict):\n    id: Snowflake\n    guild_id: Snowflake\n    application_id: NotRequired[Snowflake]\n\n\nclass WebhooksUpdateEvent(TypedDict):\n    guild_id: Snowflake\n    channel_id: Snowflake\n\n\nStageInstanceCreateEvent = StageInstanceUpdateEvent = StageInstanceDeleteEvent = StageInstance\n\nGuildScheduledEventCreateEvent = GuildScheduledEventUpdateEvent = GuildScheduledEventDeleteEvent = GuildScheduledEvent\n\n\nclass _GuildScheduledEventUsersEvent(TypedDict):\n    guild_scheduled_event_id: Snowflake\n    user_id: Snowflake\n    guild_id: Snowflake\n\n\nGuildScheduledEventUserAdd = GuildScheduledEventUserRemove = _GuildScheduledEventUsersEvent\n\nVoiceStateUpdateEvent = GuildVoiceState\n\n\nclass VoiceServerUpdateEvent(TypedDict):\n    token: str\n    guild_id: Snowflake\n    endpoint: Optional[str]\n\n\nclass TypingStartEvent(TypedDict):\n    channel_id: Snowflake\n    user_id: Snowflake\n    timestamp: int\n    guild_id: NotRequired[Snowflake]\n    member: NotRequired[MemberWithUser]\n\n\nclass AutoModerationActionExecution(TypedDict):\n    guild_id: Snowflake\n    action: AutoModerationAction\n    rule_id: Snowflake\n    rule_trigger_type: AutoModerationRuleTriggerType\n    user_id: Snowflake\n    channel_id: NotRequired[Snowflake]\n    message_id: NotRequired[Snowflake]\n    alert_system_message_id: NotRequired[Snowflake]\n    content: str\n    matched_keyword: Optional[str]\n    matched_content: Optional[str]\n\n\nclass GuildAuditLogEntryCreate(AuditLogEntry):\n    guild_id: Snowflake\n\n\nEntitlementCreateEvent = EntitlementUpdateEvent = EntitlementDeleteEvent = Entitlement\n\n\nclass PollVoteActionEvent(TypedDict):\n    user_id: Snowflake\n    channel_id: Snowflake\n    message_id: Snowflake\n    guild_id: NotRequired[Snowflake]\n    answer_id: int\n"
  },
  {
    "path": "discord/types/guild.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom typing import List, Literal, Optional, TypedDict\nfrom typing_extensions import NotRequired\n\nfrom .scheduled_event import GuildScheduledEvent\nfrom .sticker import GuildSticker\nfrom .snowflake import Snowflake\nfrom .channel import GuildChannel, StageInstance\nfrom .voice import GuildVoiceState\nfrom .welcome_screen import WelcomeScreen\nfrom .activity import PartialPresenceUpdate\nfrom .role import Role\nfrom .member import Member\nfrom .emoji import Emoji\nfrom .user import User\nfrom .threads import Thread\n\n\nclass Ban(TypedDict):\n    reason: Optional[str]\n    user: User\n\n\nclass UnavailableGuild(TypedDict):\n    id: Snowflake\n    unavailable: NotRequired[bool]\n\n\nclass IncidentData(TypedDict):\n    invites_disabled_until: NotRequired[Optional[str]]\n    dms_disabled_until: NotRequired[Optional[str]]\n\n\nDefaultMessageNotificationLevel = Literal[0, 1]\nExplicitContentFilterLevel = Literal[0, 1, 2]\nMFALevel = Literal[0, 1]\nVerificationLevel = Literal[0, 1, 2, 3, 4]\nNSFWLevel = Literal[0, 1, 2, 3]\nPremiumTier = Literal[0, 1, 2, 3]\nGuildFeature = Literal[\n    'ANIMATED_BANNER',\n    'ANIMATED_ICON',\n    'APPLICATION_COMMAND_PERMISSIONS_V2',\n    'AUTO_MODERATION',\n    'BANNER',\n    'COMMUNITY',\n    'CREATOR_MONETIZABLE_PROVISIONAL',\n    'CREATOR_STORE_PAGE',\n    'DEVELOPER_SUPPORT_SERVER',\n    'DISCOVERABLE',\n    'FEATURABLE',\n    'INVITE_SPLASH',\n    'INVITES_DISABLED',\n    'MEMBER_VERIFICATION_GATE_ENABLED',\n    'MONETIZATION_ENABLED',\n    'MORE_EMOJI',\n    'MORE_STICKERS',\n    'NEWS',\n    'PARTNERED',\n    'PREVIEW_ENABLED',\n    'ROLE_ICONS',\n    'ROLE_SUBSCRIPTIONS_AVAILABLE_FOR_PURCHASE',\n    'ROLE_SUBSCRIPTIONS_ENABLED',\n    'TICKETED_EVENTS_ENABLED',\n    'VANITY_URL',\n    'VERIFIED',\n    'VIP_REGIONS',\n    'WELCOME_SCREEN_ENABLED',\n    'RAID_ALERTS_DISABLED',\n]\n\n\nclass _BaseGuildPreview(UnavailableGuild):\n    name: str\n    icon: Optional[str]\n    splash: Optional[str]\n    discovery_splash: Optional[str]\n    emojis: List[Emoji]\n    stickers: List[GuildSticker]\n    features: List[GuildFeature]\n    description: Optional[str]\n    incidents_data: Optional[IncidentData]\n\n\nclass _GuildPreviewUnique(TypedDict):\n    approximate_member_count: int\n    approximate_presence_count: int\n\n\nclass GuildPreview(_BaseGuildPreview, _GuildPreviewUnique):\n    ...\n\n\nclass Guild(_BaseGuildPreview):\n    owner_id: Snowflake\n    region: str\n    afk_channel_id: Optional[Snowflake]\n    afk_timeout: int\n    verification_level: VerificationLevel\n    default_message_notifications: DefaultMessageNotificationLevel\n    explicit_content_filter: ExplicitContentFilterLevel\n    roles: List[Role]\n    mfa_level: MFALevel\n    nsfw_level: NSFWLevel\n    application_id: Optional[Snowflake]\n    system_channel_id: Optional[Snowflake]\n    system_channel_flags: int\n    rules_channel_id: Optional[Snowflake]\n    vanity_url_code: Optional[str]\n    banner: Optional[str]\n    premium_tier: PremiumTier\n    preferred_locale: str\n    public_updates_channel_id: Optional[Snowflake]\n    stickers: List[GuildSticker]\n    stage_instances: List[StageInstance]\n    guild_scheduled_events: List[GuildScheduledEvent]\n    icon_hash: NotRequired[Optional[str]]\n    owner: NotRequired[bool]\n    permissions: NotRequired[str]\n    widget_enabled: NotRequired[bool]\n    widget_channel_id: NotRequired[Optional[Snowflake]]\n    joined_at: NotRequired[Optional[str]]\n    large: NotRequired[bool]\n    member_count: NotRequired[int]\n    voice_states: NotRequired[List[GuildVoiceState]]\n    members: NotRequired[List[Member]]\n    channels: NotRequired[List[GuildChannel]]\n    presences: NotRequired[List[PartialPresenceUpdate]]\n    threads: NotRequired[List[Thread]]\n    max_presences: NotRequired[Optional[int]]\n    max_members: NotRequired[int]\n    premium_subscription_count: NotRequired[int]\n    max_video_channel_users: NotRequired[int]\n\n\nclass InviteGuild(Guild, total=False):\n    welcome_screen: WelcomeScreen\n\n\nclass GuildWithCounts(Guild, _GuildPreviewUnique):\n    ...\n\n\nclass GuildPrune(TypedDict):\n    pruned: Optional[int]\n\n\nclass GuildMFALevel(TypedDict):\n    level: MFALevel\n\n\nclass ChannelPositionUpdate(TypedDict):\n    id: Snowflake\n    position: Optional[int]\n    lock_permissions: Optional[bool]\n    parent_id: Optional[Snowflake]\n\n\nclass _RolePositionRequired(TypedDict):\n    id: Snowflake\n\n\nclass RolePositionUpdate(_RolePositionRequired, total=False):\n    position: Optional[Snowflake]\n\n\nclass BulkBanUserResponse(TypedDict):\n    banned_users: Optional[List[Snowflake]]\n    failed_users: Optional[List[Snowflake]]\n"
  },
  {
    "path": "discord/types/integration.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom __future__ import annotations\n\nfrom typing import Literal, Optional, TypedDict, Union\nfrom typing_extensions import NotRequired\n\nfrom .snowflake import Snowflake\nfrom .user import User\n\n\nclass IntegrationApplication(TypedDict):\n    id: Snowflake\n    name: str\n    icon: Optional[str]\n    description: str\n    summary: str\n    bot: NotRequired[User]\n\n\nclass IntegrationAccount(TypedDict):\n    id: str\n    name: str\n\n\nIntegrationExpireBehavior = Literal[0, 1]\n\n\nclass PartialIntegration(TypedDict):\n    id: Snowflake\n    name: str\n    type: IntegrationType\n    account: IntegrationAccount\n    application_id: Snowflake\n\n\nIntegrationType = Literal['twitch', 'youtube', 'discord', 'guild_subscription']\n\n\nclass BaseIntegration(PartialIntegration):\n    enabled: bool\n    syncing: bool\n    synced_at: str\n    user: User\n    expire_behavior: IntegrationExpireBehavior\n    expire_grace_period: int\n\n\nclass StreamIntegration(BaseIntegration):\n    role_id: Optional[Snowflake]\n    enable_emoticons: bool\n    subscriber_count: int\n    revoked: bool\n\n\nclass BotIntegration(BaseIntegration):\n    application: IntegrationApplication\n\n\nIntegration = Union[BaseIntegration, StreamIntegration, BotIntegration]\n"
  },
  {
    "path": "discord/types/interactions.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom __future__ import annotations\n\nfrom typing import TYPE_CHECKING, Dict, List, Literal, TypedDict, Union\nfrom typing_extensions import NotRequired\n\nfrom .channel import ChannelTypeWithoutThread, ThreadMetadata, GuildChannel, InteractionDMChannel, GroupDMChannel\nfrom .sku import Entitlement\nfrom .threads import ThreadType\nfrom .member import Member\nfrom .message import Attachment\nfrom .role import Role\nfrom .snowflake import Snowflake\nfrom .user import User\nfrom .guild import GuildFeature\n\nif TYPE_CHECKING:\n    from .message import Message\n\n\nInteractionType = Literal[1, 2, 3, 4, 5]\nInteractionContextType = Literal[0, 1, 2]\nInteractionInstallationType = Literal[0, 1]\n\n\nclass _BasePartialChannel(TypedDict):\n    id: Snowflake\n    name: str\n    permissions: str\n\n\nclass PartialChannel(_BasePartialChannel):\n    type: ChannelTypeWithoutThread\n\n\nclass PartialThread(_BasePartialChannel):\n    type: ThreadType\n    thread_metadata: ThreadMetadata\n    parent_id: Snowflake\n\n\nclass ResolvedData(TypedDict, total=False):\n    users: Dict[str, User]\n    members: Dict[str, Member]\n    roles: Dict[str, Role]\n    channels: Dict[str, Union[PartialChannel, PartialThread]]\n    messages: Dict[str, Message]\n    attachments: Dict[str, Attachment]\n\n\nclass PartialInteractionGuild(TypedDict):\n    id: Snowflake\n    locale: str\n    features: List[GuildFeature]\n\n\nclass _BaseApplicationCommandInteractionDataOption(TypedDict):\n    name: str\n\n\nclass _CommandGroupApplicationCommandInteractionDataOption(_BaseApplicationCommandInteractionDataOption):\n    type: Literal[1, 2]\n    options: List[ApplicationCommandInteractionDataOption]\n\n\nclass _BaseValueApplicationCommandInteractionDataOption(_BaseApplicationCommandInteractionDataOption, total=False):\n    focused: bool\n\n\nclass _StringValueApplicationCommandInteractionDataOption(_BaseValueApplicationCommandInteractionDataOption):\n    type: Literal[3]\n    value: str\n\n\nclass _IntegerValueApplicationCommandInteractionDataOption(_BaseValueApplicationCommandInteractionDataOption):\n    type: Literal[4]\n    value: int\n\n\nclass _BooleanValueApplicationCommandInteractionDataOption(_BaseValueApplicationCommandInteractionDataOption):\n    type: Literal[5]\n    value: bool\n\n\nclass _SnowflakeValueApplicationCommandInteractionDataOption(_BaseValueApplicationCommandInteractionDataOption):\n    type: Literal[6, 7, 8, 9, 11]\n    value: Snowflake\n\n\nclass _NumberValueApplicationCommandInteractionDataOption(_BaseValueApplicationCommandInteractionDataOption):\n    type: Literal[10]\n    value: float\n\n\n_ValueApplicationCommandInteractionDataOption = Union[\n    _StringValueApplicationCommandInteractionDataOption,\n    _IntegerValueApplicationCommandInteractionDataOption,\n    _BooleanValueApplicationCommandInteractionDataOption,\n    _SnowflakeValueApplicationCommandInteractionDataOption,\n    _NumberValueApplicationCommandInteractionDataOption,\n]\n\n\nApplicationCommandInteractionDataOption = Union[\n    _CommandGroupApplicationCommandInteractionDataOption,\n    _ValueApplicationCommandInteractionDataOption,\n]\n\n\nclass _BaseApplicationCommandInteractionData(TypedDict):\n    id: Snowflake\n    name: str\n    resolved: NotRequired[ResolvedData]\n    guild_id: NotRequired[Snowflake]\n\n\nclass ChatInputApplicationCommandInteractionData(_BaseApplicationCommandInteractionData, total=False):\n    type: Literal[1]\n    options: List[ApplicationCommandInteractionDataOption]\n\n\nclass _BaseNonChatInputApplicationCommandInteractionData(_BaseApplicationCommandInteractionData):\n    target_id: Snowflake\n\n\nclass UserApplicationCommandInteractionData(_BaseNonChatInputApplicationCommandInteractionData):\n    type: Literal[2]\n\n\nclass MessageApplicationCommandInteractionData(_BaseNonChatInputApplicationCommandInteractionData):\n    type: Literal[3]\n\n\nApplicationCommandInteractionData = Union[\n    ChatInputApplicationCommandInteractionData,\n    UserApplicationCommandInteractionData,\n    MessageApplicationCommandInteractionData,\n]\n\n\nclass _BaseMessageComponentInteractionData(TypedDict):\n    custom_id: str\n\n\nclass ButtonMessageComponentInteractionData(_BaseMessageComponentInteractionData):\n    component_type: Literal[2]\n\n\nclass SelectMessageComponentInteractionData(_BaseMessageComponentInteractionData):\n    component_type: Literal[3, 5, 6, 7, 8]\n    values: List[str]\n    resolved: NotRequired[ResolvedData]\n\n\nMessageComponentInteractionData = Union[ButtonMessageComponentInteractionData, SelectMessageComponentInteractionData]\n\n\nclass ModalSubmitTextInputInteractionData(TypedDict):\n    type: Literal[4]\n    custom_id: str\n    value: str\n\n\nModalSubmitComponentItemInteractionData = ModalSubmitTextInputInteractionData\n\n\nclass ModalSubmitActionRowInteractionData(TypedDict):\n    type: Literal[1]\n    components: List[ModalSubmitComponentItemInteractionData]\n\n\nModalSubmitComponentInteractionData = Union[ModalSubmitActionRowInteractionData, ModalSubmitComponentItemInteractionData]\n\n\nclass ModalSubmitInteractionData(TypedDict):\n    custom_id: str\n    components: List[ModalSubmitComponentInteractionData]\n\n\nInteractionData = Union[\n    ApplicationCommandInteractionData,\n    MessageComponentInteractionData,\n    ModalSubmitInteractionData,\n]\n\n\nclass _BaseInteraction(TypedDict):\n    id: Snowflake\n    application_id: Snowflake\n    token: str\n    version: Literal[1]\n    guild_id: NotRequired[Snowflake]\n    guild: NotRequired[PartialInteractionGuild]\n    channel_id: NotRequired[Snowflake]\n    channel: Union[GuildChannel, InteractionDMChannel, GroupDMChannel]\n    app_permissions: NotRequired[str]\n    locale: NotRequired[str]\n    guild_locale: NotRequired[str]\n    entitlement_sku_ids: NotRequired[List[Snowflake]]\n    entitlements: NotRequired[List[Entitlement]]\n    authorizing_integration_owners: Dict[Literal['0', '1'], Snowflake]\n    context: NotRequired[InteractionContextType]\n\n\nclass PingInteraction(_BaseInteraction):\n    type: Literal[1]\n\n\nclass ApplicationCommandInteraction(_BaseInteraction):\n    type: Literal[2, 4]\n    data: ApplicationCommandInteractionData\n\n\nclass MessageComponentInteraction(_BaseInteraction):\n    type: Literal[3]\n    data: MessageComponentInteractionData\n\n\nclass ModalSubmitInteraction(_BaseInteraction):\n    type: Literal[5]\n    data: ModalSubmitInteractionData\n\n\nInteraction = Union[PingInteraction, ApplicationCommandInteraction, MessageComponentInteraction, ModalSubmitInteraction]\n\n\nclass MessageInteraction(TypedDict):\n    id: Snowflake\n    type: InteractionType\n    name: str\n    user: User\n    member: NotRequired[Member]\n\n\nclass MessageInteractionMetadata(TypedDict):\n    id: Snowflake\n    type: InteractionType\n    user: User\n    authorizing_integration_owners: Dict[Literal['0', '1'], Snowflake]\n    original_response_message_id: NotRequired[Snowflake]\n    interacted_message_id: NotRequired[Snowflake]\n    triggering_interaction_metadata: NotRequired[MessageInteractionMetadata]\n"
  },
  {
    "path": "discord/types/invite.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom __future__ import annotations\n\nfrom typing import Literal, Optional, TypedDict, Union\nfrom typing_extensions import NotRequired\n\nfrom .scheduled_event import GuildScheduledEvent\nfrom .snowflake import Snowflake\nfrom .guild import InviteGuild, _GuildPreviewUnique\nfrom .channel import PartialChannel\nfrom .user import PartialUser\nfrom .appinfo import PartialAppInfo\n\nInviteTargetType = Literal[1, 2]\nInviteType = Literal[0, 1, 2]\n\n\nclass _InviteMetadata(TypedDict, total=False):\n    uses: int\n    max_uses: int\n    max_age: int\n    temporary: bool\n    created_at: str\n    expires_at: Optional[str]\n\n\nclass VanityInvite(_InviteMetadata):\n    code: Optional[str]\n    revoked: NotRequired[bool]\n\n\nclass IncompleteInvite(_InviteMetadata):\n    code: str\n    channel: PartialChannel\n\n\nclass Invite(IncompleteInvite, total=False):\n    guild: InviteGuild\n    inviter: PartialUser\n    target_user: PartialUser\n    target_type: InviteTargetType\n    target_application: PartialAppInfo\n    guild_scheduled_event: GuildScheduledEvent\n    type: InviteType\n\n\nclass InviteWithCounts(Invite, _GuildPreviewUnique):\n    ...\n\n\nclass GatewayInviteCreate(TypedDict):\n    channel_id: Snowflake\n    code: str\n    created_at: str\n    max_age: int\n    max_uses: int\n    temporary: bool\n    uses: bool\n    guild_id: Snowflake\n    inviter: NotRequired[PartialUser]\n    target_type: NotRequired[InviteTargetType]\n    target_user: NotRequired[PartialUser]\n    target_application: NotRequired[PartialAppInfo]\n\n\nclass GatewayInviteDelete(TypedDict):\n    channel_id: Snowflake\n    code: str\n    guild_id: NotRequired[Snowflake]\n\n\nGatewayInvite = Union[GatewayInviteCreate, GatewayInviteDelete]\n"
  },
  {
    "path": "discord/types/member.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom typing import Optional, TypedDict\nfrom .snowflake import SnowflakeList\nfrom .user import User, AvatarDecorationData\nfrom typing_extensions import NotRequired\n\n\nclass Nickname(TypedDict):\n    nick: str\n\n\nclass PartialMember(TypedDict):\n    roles: SnowflakeList\n    joined_at: str\n    deaf: bool\n    mute: bool\n    flags: int\n\n\nclass Member(PartialMember, total=False):\n    avatar: str\n    user: User\n    nick: str\n    premium_since: Optional[str]\n    pending: bool\n    permissions: str\n    communication_disabled_until: str\n    banner: NotRequired[Optional[str]]\n    avatar_decoration_data: NotRequired[AvatarDecorationData]\n\n\nclass _OptionalMemberWithUser(PartialMember, total=False):\n    avatar: str\n    nick: str\n    premium_since: Optional[str]\n    pending: bool\n    permissions: str\n    communication_disabled_until: str\n    avatar_decoration_data: NotRequired[AvatarDecorationData]\n\n\nclass MemberWithUser(_OptionalMemberWithUser):\n    user: User\n\n\nclass UserWithMember(User, total=False):\n    member: _OptionalMemberWithUser\n"
  },
  {
    "path": "discord/types/message.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom __future__ import annotations\n\nfrom typing import List, Literal, Optional, TypedDict, Union\nfrom typing_extensions import NotRequired, Required\n\nfrom .snowflake import Snowflake, SnowflakeList\nfrom .member import Member, UserWithMember\nfrom .user import User\nfrom .emoji import PartialEmoji\nfrom .embed import Embed\nfrom .channel import ChannelType\nfrom .components import Component\nfrom .interactions import MessageInteraction, MessageInteractionMetadata\nfrom .sticker import StickerItem\nfrom .threads import Thread\nfrom .poll import Poll\n\n\nclass PartialMessage(TypedDict):\n    channel_id: Snowflake\n    guild_id: NotRequired[Snowflake]\n\n\nclass ChannelMention(TypedDict):\n    id: Snowflake\n    guild_id: Snowflake\n    type: ChannelType\n    name: str\n\n\nclass ReactionCountDetails(TypedDict):\n    burst: int\n    normal: int\n\n\nReactionType = Literal[0, 1]\n\n\nclass Reaction(TypedDict):\n    count: int\n    me: bool\n    emoji: PartialEmoji\n    me_burst: bool\n    count_details: ReactionCountDetails\n    burst_colors: List[str]\n\n\nclass Attachment(TypedDict):\n    id: Snowflake\n    filename: str\n    size: int\n    url: str\n    proxy_url: str\n    height: NotRequired[Optional[int]]\n    width: NotRequired[Optional[int]]\n    description: NotRequired[str]\n    content_type: NotRequired[str]\n    spoiler: NotRequired[bool]\n    ephemeral: NotRequired[bool]\n    duration_secs: NotRequired[float]\n    waveform: NotRequired[str]\n    flags: NotRequired[int]\n\n\nMessageActivityType = Literal[1, 2, 3, 5]\n\n\nclass MessageActivity(TypedDict):\n    type: MessageActivityType\n    party_id: str\n\n\nclass MessageApplication(TypedDict):\n    id: Snowflake\n    description: str\n    icon: Optional[str]\n    name: str\n    cover_image: NotRequired[str]\n\n\nclass MessageReference(TypedDict, total=False):\n    message_id: Snowflake\n    channel_id: Required[Snowflake]\n    guild_id: Snowflake\n    fail_if_not_exists: bool\n\n\nclass RoleSubscriptionData(TypedDict):\n    role_subscription_listing_id: Snowflake\n    tier_name: str\n    total_months_subscribed: int\n    is_renewal: bool\n\n\nMessageType = Literal[\n    0,\n    1,\n    2,\n    3,\n    4,\n    5,\n    6,\n    7,\n    8,\n    9,\n    10,\n    11,\n    12,\n    14,\n    15,\n    18,\n    19,\n    20,\n    21,\n    22,\n    23,\n    24,\n    25,\n    26,\n    27,\n    28,\n    29,\n    30,\n    31,\n    32,\n    36,\n    37,\n    38,\n    39,\n]\n\n\nclass Message(PartialMessage):\n    id: Snowflake\n    author: User\n    content: str\n    timestamp: str\n    edited_timestamp: Optional[str]\n    tts: bool\n    mention_everyone: bool\n    mentions: List[UserWithMember]\n    mention_roles: SnowflakeList\n    attachments: List[Attachment]\n    embeds: List[Embed]\n    pinned: bool\n    poll: NotRequired[Poll]\n    type: MessageType\n    member: NotRequired[Member]\n    mention_channels: NotRequired[List[ChannelMention]]\n    reactions: NotRequired[List[Reaction]]\n    nonce: NotRequired[Union[int, str]]\n    webhook_id: NotRequired[Snowflake]\n    activity: NotRequired[MessageActivity]\n    application: NotRequired[MessageApplication]\n    application_id: NotRequired[Snowflake]\n    message_reference: NotRequired[MessageReference]\n    flags: NotRequired[int]\n    sticker_items: NotRequired[List[StickerItem]]\n    referenced_message: NotRequired[Optional[Message]]\n    interaction: NotRequired[MessageInteraction]  # deprecated, use interaction_metadata\n    interaction_metadata: NotRequired[MessageInteractionMetadata]\n    components: NotRequired[List[Component]]\n    position: NotRequired[int]\n    role_subscription_data: NotRequired[RoleSubscriptionData]\n    thread: NotRequired[Thread]\n\n\nAllowedMentionType = Literal['roles', 'users', 'everyone']\n\n\nclass AllowedMentions(TypedDict):\n    parse: List[AllowedMentionType]\n    roles: SnowflakeList\n    users: SnowflakeList\n    replied_user: bool\n"
  },
  {
    "path": "discord/types/poll.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom __future__ import annotations\n\n\nfrom typing import List, TypedDict, Optional, Literal, TYPE_CHECKING\nfrom typing_extensions import NotRequired\n\nfrom .snowflake import Snowflake\n\nif TYPE_CHECKING:\n    from .user import User\n    from .emoji import PartialEmoji\n\n\nLayoutType = Literal[1]  # 1 = Default\n\n\nclass PollMedia(TypedDict):\n    text: str\n    emoji: NotRequired[Optional[PartialEmoji]]\n\n\nclass PollAnswer(TypedDict):\n    poll_media: PollMedia\n\n\nclass PollAnswerWithID(PollAnswer):\n    answer_id: int\n\n\nclass PollAnswerCount(TypedDict):\n    id: Snowflake\n    count: int\n    me_voted: bool\n\n\nclass PollAnswerVoters(TypedDict):\n    users: List[User]\n\n\nclass PollResult(TypedDict):\n    is_finalized: bool\n    answer_counts: List[PollAnswerCount]\n\n\nclass PollCreate(TypedDict):\n    allow_multiselect: bool\n    answers: List[PollAnswer]\n    duration: float\n    layout_type: LayoutType\n    question: PollMedia\n\n\n# We don't subclass Poll as it will\n# still have the duration field, which\n# is converted into expiry when poll is\n# fetched from a message or returned\n# by a `send` method in a Messageable\nclass Poll(TypedDict):\n    allow_multiselect: bool\n    answers: List[PollAnswerWithID]\n    expiry: str\n    layout_type: LayoutType\n    question: PollMedia\n    results: PollResult\n"
  },
  {
    "path": "discord/types/role.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom __future__ import annotations\n\nfrom typing import TypedDict, Optional\nfrom typing_extensions import NotRequired\n\nfrom .snowflake import Snowflake\n\n\nclass Role(TypedDict):\n    id: Snowflake\n    name: str\n    color: int\n    hoist: bool\n    position: int\n    permissions: str\n    managed: bool\n    mentionable: bool\n    flags: int\n    icon: NotRequired[Optional[str]]\n    unicode_emoji: NotRequired[Optional[str]]\n    tags: NotRequired[RoleTags]\n\n\nclass RoleTags(TypedDict, total=False):\n    bot_id: Snowflake\n    integration_id: Snowflake\n    subscription_listing_id: Snowflake\n    premium_subscriber: None\n    available_for_purchase: None\n    guild_connections: None\n"
  },
  {
    "path": "discord/types/scheduled_event.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom typing import List, Literal, Optional, TypedDict, Union\nfrom typing_extensions import NotRequired\n\nfrom .snowflake import Snowflake\nfrom .user import User\nfrom .member import Member\nfrom .channel import PrivacyLevel as PrivacyLevel\n\nEventStatus = Literal[1, 2, 3, 4]\nEntityType = Literal[1, 2, 3]\n\n\nclass _BaseGuildScheduledEvent(TypedDict):\n    id: Snowflake\n    guild_id: Snowflake\n    entity_id: Optional[Snowflake]\n    name: str\n    scheduled_start_time: str\n    privacy_level: PrivacyLevel\n    status: EventStatus\n    creator_id: NotRequired[Optional[Snowflake]]\n    description: NotRequired[Optional[str]]\n    creator: NotRequired[User]\n    user_count: NotRequired[int]\n    image: NotRequired[Optional[str]]\n\n\nclass _VoiceChannelScheduledEvent(_BaseGuildScheduledEvent):\n    channel_id: Snowflake\n    entity_metadata: Literal[None]\n    scheduled_end_time: NotRequired[Optional[str]]\n\n\nclass StageInstanceScheduledEvent(_VoiceChannelScheduledEvent):\n    entity_type: Literal[1]\n\n\nclass VoiceScheduledEvent(_VoiceChannelScheduledEvent):\n    entity_type: Literal[2]\n\n\nclass EntityMetadata(TypedDict):\n    location: str\n\n\nclass ExternalScheduledEvent(_BaseGuildScheduledEvent):\n    channel_id: Literal[None]\n    entity_metadata: EntityMetadata\n    scheduled_end_time: str\n    entity_type: Literal[3]\n\n\nGuildScheduledEvent = Union[StageInstanceScheduledEvent, VoiceScheduledEvent, ExternalScheduledEvent]\n\n\nclass _WithUserCount(TypedDict):\n    user_count: int\n\n\nclass _StageInstanceScheduledEventWithUserCount(StageInstanceScheduledEvent, _WithUserCount):\n    ...\n\n\nclass _VoiceScheduledEventWithUserCount(VoiceScheduledEvent, _WithUserCount):\n    ...\n\n\nclass _ExternalScheduledEventWithUserCount(ExternalScheduledEvent, _WithUserCount):\n    ...\n\n\nGuildScheduledEventWithUserCount = Union[\n    _StageInstanceScheduledEventWithUserCount, _VoiceScheduledEventWithUserCount, _ExternalScheduledEventWithUserCount\n]\n\n\nclass ScheduledEventUser(TypedDict):\n    guild_scheduled_event_id: Snowflake\n    user: User\n\n\nclass ScheduledEventUserWithMember(ScheduledEventUser):\n    member: Member\n\n\nScheduledEventUsers = List[ScheduledEventUser]\nScheduledEventUsersWithMember = List[ScheduledEventUserWithMember]\n"
  },
  {
    "path": "discord/types/sku.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom __future__ import annotations\n\nfrom typing import TypedDict, Optional, Literal\nfrom typing_extensions import NotRequired\n\n\nclass SKU(TypedDict):\n    id: str\n    type: int\n    application_id: str\n    name: str\n    slug: str\n    flags: int\n\n\nclass Entitlement(TypedDict):\n    id: str\n    sku_id: str\n    application_id: str\n    user_id: Optional[str]\n    type: int\n    deleted: bool\n    starts_at: NotRequired[str]\n    ends_at: NotRequired[str]\n    guild_id: NotRequired[str]\n    consumed: NotRequired[bool]\n\n\nEntitlementOwnerType = Literal[1, 2]\n"
  },
  {
    "path": "discord/types/snowflake.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom typing import List, Union\n\nSnowflake = Union[str, int]\nSnowflakeList = List[Snowflake]\n"
  },
  {
    "path": "discord/types/sticker.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom __future__ import annotations\n\nfrom typing import List, Literal, TypedDict, Union, Optional\nfrom typing_extensions import NotRequired\n\nfrom .snowflake import Snowflake\nfrom .user import User\n\nStickerFormatType = Literal[1, 2, 3, 4]\n\n\nclass StickerItem(TypedDict):\n    id: Snowflake\n    name: str\n    format_type: StickerFormatType\n\n\nclass BaseSticker(TypedDict):\n    id: Snowflake\n    name: str\n    description: str\n    tags: str\n    format_type: StickerFormatType\n\n\nclass StandardSticker(BaseSticker):\n    type: Literal[1]\n    sort_value: int\n    pack_id: Snowflake\n\n\nclass GuildSticker(BaseSticker):\n    type: Literal[2]\n    available: NotRequired[bool]\n    guild_id: Snowflake\n    user: NotRequired[User]\n\n\nSticker = Union[StandardSticker, GuildSticker]\n\n\nclass StickerPack(TypedDict):\n    id: Snowflake\n    stickers: List[StandardSticker]\n    name: str\n    sku_id: Snowflake\n    cover_sticker_id: Optional[Snowflake]\n    description: str\n    banner_asset_id: Optional[Snowflake]\n\n\nclass CreateGuildSticker(TypedDict):\n    name: str\n    tags: str\n    description: NotRequired[str]\n\n\nclass ListPremiumStickerPacks(TypedDict):\n    sticker_packs: List[StickerPack]\n"
  },
  {
    "path": "discord/types/team.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom __future__ import annotations\n\nfrom typing import Literal, TypedDict, List, Optional\n\nfrom .user import PartialUser\nfrom .snowflake import Snowflake\n\n\nclass TeamMember(TypedDict):\n    user: PartialUser\n    membership_state: int\n    permissions: List[str]\n    team_id: Snowflake\n    role: Literal['admin', 'developer', 'read_only']\n\n\nclass Team(TypedDict):\n    id: Snowflake\n    name: str\n    owner_id: Snowflake\n    members: List[TeamMember]\n    icon: Optional[str]\n"
  },
  {
    "path": "discord/types/template.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom __future__ import annotations\n\nfrom typing import Optional, TypedDict\nfrom .snowflake import Snowflake\nfrom .user import User\nfrom .guild import Guild\n\n\nclass CreateTemplate(TypedDict):\n    name: str\n    icon: Optional[bytes]\n\n\nclass Template(TypedDict):\n    code: str\n    name: str\n    description: Optional[str]\n    usage_count: int\n    creator_id: Snowflake\n    creator: User\n    created_at: str\n    updated_at: str\n    source_guild_id: Snowflake\n    serialized_source_guild: Guild\n    is_dirty: Optional[bool]\n"
  },
  {
    "path": "discord/types/threads.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom __future__ import annotations\n\nfrom typing import List, Literal, Optional, TypedDict\nfrom typing_extensions import NotRequired\n\nfrom .snowflake import Snowflake\nfrom .message import Message\n\nThreadType = Literal[10, 11, 12]\nThreadArchiveDuration = Literal[60, 1440, 4320, 10080]\n\n\nclass ThreadMember(TypedDict):\n    id: Snowflake\n    user_id: Snowflake\n    join_timestamp: str\n    flags: int\n\n\nclass ThreadMetadata(TypedDict):\n    archived: bool\n    auto_archive_duration: ThreadArchiveDuration\n    archive_timestamp: str\n    archiver_id: NotRequired[Snowflake]\n    locked: NotRequired[bool]\n    invitable: NotRequired[bool]\n    create_timestamp: NotRequired[str]\n\n\nclass Thread(TypedDict):\n    id: Snowflake\n    guild_id: Snowflake\n    parent_id: Snowflake\n    owner_id: Snowflake\n    name: str\n    type: ThreadType\n    member_count: int\n    message_count: int\n    rate_limit_per_user: int\n    thread_metadata: ThreadMetadata\n    member: NotRequired[ThreadMember]\n    last_message_id: NotRequired[Optional[Snowflake]]\n    last_pin_timestamp: NotRequired[Optional[Snowflake]]\n    newly_created: NotRequired[bool]\n    flags: NotRequired[int]\n    applied_tags: NotRequired[List[Snowflake]]\n\n\nclass ThreadPaginationPayload(TypedDict):\n    threads: List[Thread]\n    members: List[ThreadMember]\n    has_more: bool\n\n\nclass ForumThread(Thread):\n    message: Message\n"
  },
  {
    "path": "discord/types/user.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom .snowflake import Snowflake\nfrom typing import Literal, Optional, TypedDict\nfrom typing_extensions import NotRequired\n\n\nclass AvatarDecorationData(TypedDict):\n    asset: str\n    sku_id: Snowflake\n\n\nclass PartialUser(TypedDict):\n    id: Snowflake\n    username: str\n    discriminator: str\n    avatar: Optional[str]\n    global_name: Optional[str]\n    avatar_decoration_data: NotRequired[AvatarDecorationData]\n\n\nPremiumType = Literal[0, 1, 2, 3]\n\n\nclass User(PartialUser, total=False):\n    bot: bool\n    system: bool\n    mfa_enabled: bool\n    locale: str\n    verified: bool\n    email: Optional[str]\n    flags: int\n    premium_type: PremiumType\n    public_flags: int\n"
  },
  {
    "path": "discord/types/voice.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom typing import Optional, TypedDict, List, Literal\nfrom typing_extensions import NotRequired\n\nfrom .snowflake import Snowflake\nfrom .member import MemberWithUser\n\n\nSupportedModes = Literal['xsalsa20_poly1305_lite', 'xsalsa20_poly1305_suffix', 'xsalsa20_poly1305']\n\n\nclass _VoiceState(TypedDict):\n    user_id: Snowflake\n    session_id: str\n    deaf: bool\n    mute: bool\n    self_deaf: bool\n    self_mute: bool\n    self_video: bool\n    suppress: bool\n    member: NotRequired[MemberWithUser]\n    self_stream: NotRequired[bool]\n\n\nclass GuildVoiceState(_VoiceState):\n    channel_id: Snowflake\n\n\nclass VoiceState(_VoiceState, total=False):\n    channel_id: Optional[Snowflake]\n    guild_id: Snowflake\n\n\nclass VoiceRegion(TypedDict):\n    id: str\n    name: str\n    vip: bool\n    optimal: bool\n    deprecated: bool\n    custom: bool\n\n\nclass VoiceServerUpdate(TypedDict):\n    token: str\n    guild_id: Snowflake\n    endpoint: Optional[str]\n\n\nclass VoiceIdentify(TypedDict):\n    server_id: Snowflake\n    user_id: Snowflake\n    session_id: str\n    token: str\n\n\nclass VoiceReady(TypedDict):\n    ssrc: int\n    ip: str\n    port: int\n    modes: List[SupportedModes]\n    heartbeat_interval: int\n"
  },
  {
    "path": "discord/types/webhook.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom __future__ import annotations\n\nfrom typing import Literal, Optional, TypedDict\nfrom typing_extensions import NotRequired\n\nfrom .snowflake import Snowflake\nfrom .user import User\nfrom .channel import PartialChannel\n\n\nclass SourceGuild(TypedDict):\n    id: int\n    name: str\n    icon: str\n\n\nWebhookType = Literal[1, 2, 3]\n\n\nclass FollowerWebhook(TypedDict):\n    channel_id: Snowflake\n    webhook_id: Snowflake\n    source_channel: NotRequired[PartialChannel]\n    source_guild: NotRequired[SourceGuild]\n\n\nclass PartialWebhook(TypedDict):\n    id: Snowflake\n    type: WebhookType\n    guild_id: NotRequired[Snowflake]\n    user: NotRequired[User]\n    token: NotRequired[str]\n\n\nclass _FullWebhook(TypedDict, total=False):\n    name: Optional[str]\n    avatar: Optional[str]\n    channel_id: Snowflake\n    application_id: Optional[Snowflake]\n\n\nclass Webhook(PartialWebhook, _FullWebhook):\n    ...\n"
  },
  {
    "path": "discord/types/welcome_screen.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom __future__ import annotations\n\nfrom typing import List, Optional, TypedDict\nfrom .snowflake import Snowflake\n\n\nclass WelcomeScreen(TypedDict):\n    description: str\n    welcome_channels: List[WelcomeScreenChannel]\n\n\nclass WelcomeScreenChannel(TypedDict):\n    channel_id: Snowflake\n    description: str\n    emoji_id: Optional[Snowflake]\n    emoji_name: Optional[str]\n"
  },
  {
    "path": "discord/types/widget.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom typing import List, Optional, TypedDict\nfrom .activity import Activity\nfrom .snowflake import Snowflake\nfrom .user import User\n\n\nclass WidgetChannel(TypedDict):\n    id: Snowflake\n    name: str\n    position: int\n\n\nclass WidgetMember(User, total=False):\n    nick: str\n    game: Activity\n    status: str\n    avatar_url: str\n    deaf: bool\n    self_deaf: bool\n    mute: bool\n    self_mute: bool\n    suppress: bool\n\n\nclass Widget(TypedDict):\n    id: Snowflake\n    name: str\n    instant_invite: Optional[str]\n    channels: List[WidgetChannel]\n    members: List[WidgetMember]\n    presence_count: int\n\n\nclass WidgetSettings(TypedDict):\n    enabled: bool\n    channel_id: Optional[Snowflake]\n\n\nclass EditWidgetSettings(TypedDict, total=False):\n    enabled: bool\n    channel_id: Optional[Snowflake]\n"
  },
  {
    "path": "discord/ui/__init__.py",
    "content": "\"\"\"\ndiscord.ui\n~~~~~~~~~~~\n\nBot UI Kit helper for the Discord API\n\n:copyright: (c) 2015-present Rapptz\n:license: MIT, see LICENSE for more details.\n\n\"\"\"\n\nfrom .view import *\nfrom .modal import *\nfrom .item import *\nfrom .button import *\nfrom .select import *\nfrom .text_input import *\nfrom .dynamic import *\n"
  },
  {
    "path": "discord/ui/button.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom __future__ import annotations\n\nfrom typing import Callable, Literal, Optional, TYPE_CHECKING, Tuple, TypeVar, Union\nimport inspect\nimport os\n\n\nfrom .item import Item, ItemCallbackType\nfrom ..enums import ButtonStyle, ComponentType\nfrom ..partial_emoji import PartialEmoji, _EmojiTag\nfrom ..components import Button as ButtonComponent\n\n__all__ = (\n    'Button',\n    'button',\n)\n\nif TYPE_CHECKING:\n    from typing_extensions import Self\n\n    from .view import View\n    from ..emoji import Emoji\n    from ..types.components import ButtonComponent as ButtonComponentPayload\n\nV = TypeVar('V', bound='View', covariant=True)\n\n\nclass Button(Item[V]):\n    \"\"\"Represents a UI button.\n\n    .. versionadded:: 2.0\n\n    Parameters\n    ------------\n    style: :class:`discord.ButtonStyle`\n        The style of the button.\n    custom_id: Optional[:class:`str`]\n        The ID of the button that gets received during an interaction.\n        If this button is for a URL, it does not have a custom ID.\n        Can only be up to 100 characters.\n    url: Optional[:class:`str`]\n        The URL this button sends you to.\n    disabled: :class:`bool`\n        Whether the button is disabled or not.\n    label: Optional[:class:`str`]\n        The label of the button, if any.\n        Can only be up to 80 characters.\n    emoji: Optional[Union[:class:`.PartialEmoji`, :class:`.Emoji`, :class:`str`]]\n        The emoji of the button, if available.\n    row: Optional[:class:`int`]\n        The relative row this button belongs to. A Discord component can only have 5\n        rows. By default, items are arranged automatically into those 5 rows. If you'd\n        like to control the relative positioning of the row then passing an index is advised.\n        For example, row=1 will show up before row=2. Defaults to ``None``, which is automatic\n        ordering. The row number must be between 0 and 4 (i.e. zero indexed).\n    sku_id: Optional[:class:`int`]\n        The SKU ID this button sends you to. Can't be combined with ``url``, ``label``, ``emoji``\n        nor ``custom_id``.\n\n        .. versionadded:: 2.4\n    \"\"\"\n\n    __item_repr_attributes__: Tuple[str, ...] = (\n        'style',\n        'url',\n        'disabled',\n        'label',\n        'emoji',\n        'row',\n        'sku_id',\n    )\n\n    def __init__(\n        self,\n        *,\n        style: ButtonStyle = ButtonStyle.secondary,\n        label: Optional[str] = None,\n        disabled: bool = False,\n        custom_id: Optional[str] = None,\n        url: Optional[str] = None,\n        emoji: Optional[Union[str, Emoji, PartialEmoji]] = None,\n        row: Optional[int] = None,\n        sku_id: Optional[int] = None,\n    ):\n        super().__init__()\n        if custom_id is not None and (url is not None or sku_id is not None):\n            raise TypeError('cannot mix both url or sku_id and custom_id with Button')\n\n        if url is not None and sku_id is not None:\n            raise TypeError('cannot mix both url and sku_id')\n\n        requires_custom_id = url is None and sku_id is None\n        self._provided_custom_id = custom_id is not None\n        if requires_custom_id and custom_id is None:\n            custom_id = os.urandom(16).hex()\n\n        if custom_id is not None and not isinstance(custom_id, str):\n            raise TypeError(f'expected custom_id to be str not {custom_id.__class__.__name__}')\n\n        if url is not None:\n            style = ButtonStyle.link\n\n        if sku_id is not None:\n            style = ButtonStyle.premium\n\n        if emoji is not None:\n            if isinstance(emoji, str):\n                emoji = PartialEmoji.from_str(emoji)\n            elif isinstance(emoji, _EmojiTag):\n                emoji = emoji._to_partial()\n            else:\n                raise TypeError(f'expected emoji to be str, Emoji, or PartialEmoji not {emoji.__class__.__name__}')\n\n        self._underlying = ButtonComponent._raw_construct(\n            custom_id=custom_id,\n            url=url,\n            disabled=disabled,\n            label=label,\n            style=style,\n            emoji=emoji,\n            sku_id=sku_id,\n        )\n        self.row = row\n\n    @property\n    def style(self) -> ButtonStyle:\n        \"\"\":class:`discord.ButtonStyle`: The style of the button.\"\"\"\n        return self._underlying.style\n\n    @style.setter\n    def style(self, value: ButtonStyle) -> None:\n        self._underlying.style = value\n\n    @property\n    def custom_id(self) -> Optional[str]:\n        \"\"\"Optional[:class:`str`]: The ID of the button that gets received during an interaction.\n\n        If this button is for a URL, it does not have a custom ID.\n        \"\"\"\n        return self._underlying.custom_id\n\n    @custom_id.setter\n    def custom_id(self, value: Optional[str]) -> None:\n        if value is not None and not isinstance(value, str):\n            raise TypeError('custom_id must be None or str')\n\n        self._underlying.custom_id = value\n        self._provided_custom_id = value is not None\n\n    @property\n    def url(self) -> Optional[str]:\n        \"\"\"Optional[:class:`str`]: The URL this button sends you to.\"\"\"\n        return self._underlying.url\n\n    @url.setter\n    def url(self, value: Optional[str]) -> None:\n        if value is not None and not isinstance(value, str):\n            raise TypeError('url must be None or str')\n        self._underlying.url = value\n\n    @property\n    def disabled(self) -> bool:\n        \"\"\":class:`bool`: Whether the button is disabled or not.\"\"\"\n        return self._underlying.disabled\n\n    @disabled.setter\n    def disabled(self, value: bool) -> None:\n        self._underlying.disabled = bool(value)\n\n    @property\n    def label(self) -> Optional[str]:\n        \"\"\"Optional[:class:`str`]: The label of the button, if available.\"\"\"\n        return self._underlying.label\n\n    @label.setter\n    def label(self, value: Optional[str]) -> None:\n        self._underlying.label = str(value) if value is not None else value\n\n    @property\n    def emoji(self) -> Optional[PartialEmoji]:\n        \"\"\"Optional[:class:`.PartialEmoji`]: The emoji of the button, if available.\"\"\"\n        return self._underlying.emoji\n\n    @emoji.setter\n    def emoji(self, value: Optional[Union[str, Emoji, PartialEmoji]]) -> None:\n        if value is not None:\n            if isinstance(value, str):\n                self._underlying.emoji = PartialEmoji.from_str(value)\n            elif isinstance(value, _EmojiTag):\n                self._underlying.emoji = value._to_partial()\n            else:\n                raise TypeError(f'expected str, Emoji, or PartialEmoji, received {value.__class__.__name__} instead')\n        else:\n            self._underlying.emoji = None\n\n    @property\n    def sku_id(self) -> Optional[int]:\n        \"\"\"Optional[:class:`int`]: The SKU ID this button sends you to.\n\n        .. versionadded:: 2.4\n        \"\"\"\n        return self._underlying.sku_id\n\n    @sku_id.setter\n    def sku_id(self, value: Optional[int]) -> None:\n        if value is not None:\n            self.style = ButtonStyle.premium\n        self._underlying.sku_id = value\n\n    @classmethod\n    def from_component(cls, button: ButtonComponent) -> Self:\n        return cls(\n            style=button.style,\n            label=button.label,\n            disabled=button.disabled,\n            custom_id=button.custom_id,\n            url=button.url,\n            emoji=button.emoji,\n            row=None,\n            sku_id=button.sku_id,\n        )\n\n    @property\n    def type(self) -> Literal[ComponentType.button]:\n        return self._underlying.type\n\n    def to_component_dict(self) -> ButtonComponentPayload:\n        return self._underlying.to_dict()\n\n    def is_dispatchable(self) -> bool:\n        return self.custom_id is not None\n\n    def is_persistent(self) -> bool:\n        if self.style is ButtonStyle.link:\n            return self.url is not None\n        return super().is_persistent()\n\n    def _refresh_component(self, button: ButtonComponent) -> None:\n        self._underlying = button\n\n\ndef button(\n    *,\n    label: Optional[str] = None,\n    custom_id: Optional[str] = None,\n    disabled: bool = False,\n    style: ButtonStyle = ButtonStyle.secondary,\n    emoji: Optional[Union[str, Emoji, PartialEmoji]] = None,\n    row: Optional[int] = None,\n) -> Callable[[ItemCallbackType[V, Button[V]]], Button[V]]:\n    \"\"\"A decorator that attaches a button to a component.\n\n    The function being decorated should have three parameters, ``self`` representing\n    the :class:`discord.ui.View`, the :class:`discord.Interaction` you receive and\n    the :class:`discord.ui.Button` being pressed.\n\n    .. note::\n\n        Buttons with a URL or an SKU cannot be created with this function.\n        Consider creating a :class:`Button` manually instead.\n        This is because these buttons cannot have a callback\n        associated with them since Discord does not do any processing\n        with them.\n\n    Parameters\n    ------------\n    label: Optional[:class:`str`]\n        The label of the button, if any.\n        Can only be up to 80 characters.\n    custom_id: Optional[:class:`str`]\n        The ID of the button that gets received during an interaction.\n        It is recommended not to set this parameter to prevent conflicts.\n        Can only be up to 100 characters.\n    style: :class:`.ButtonStyle`\n        The style of the button. Defaults to :attr:`.ButtonStyle.grey`.\n    disabled: :class:`bool`\n        Whether the button is disabled or not. Defaults to ``False``.\n    emoji: Optional[Union[:class:`str`, :class:`.Emoji`, :class:`.PartialEmoji`]]\n        The emoji of the button. This can be in string form or a :class:`.PartialEmoji`\n        or a full :class:`.Emoji`.\n    row: Optional[:class:`int`]\n        The relative row this button belongs to. A Discord component can only have 5\n        rows. By default, items are arranged automatically into those 5 rows. If you'd\n        like to control the relative positioning of the row then passing an index is advised.\n        For example, row=1 will show up before row=2. Defaults to ``None``, which is automatic\n        ordering. The row number must be between 0 and 4 (i.e. zero indexed).\n    \"\"\"\n\n    def decorator(func: ItemCallbackType[V, Button[V]]) -> ItemCallbackType[V, Button[V]]:\n        if not inspect.iscoroutinefunction(func):\n            raise TypeError('button function must be a coroutine function')\n\n        func.__discord_ui_model_type__ = Button\n        func.__discord_ui_model_kwargs__ = {\n            'style': style,\n            'custom_id': custom_id,\n            'url': None,\n            'disabled': disabled,\n            'label': label,\n            'emoji': emoji,\n            'row': row,\n            'sku_id': None,\n        }\n        return func\n\n    return decorator  # type: ignore\n"
  },
  {
    "path": "discord/ui/dynamic.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom __future__ import annotations\nfrom typing import ClassVar, Dict, Generic, Optional, Tuple, Type, TypeVar, TYPE_CHECKING, Any, Union\nimport re\n\nfrom .item import Item\nfrom .._types import ClientT\n\n__all__ = ('DynamicItem',)\n\nBaseT = TypeVar('BaseT', bound='Item[Any]', covariant=True)\n\nif TYPE_CHECKING:\n    from typing_extensions import TypeVar, Self\n    from ..interactions import Interaction\n    from ..components import Component\n    from ..enums import ComponentType\n    from .view import View\n\n    V = TypeVar('V', bound='View', covariant=True, default=View)\nelse:\n    V = TypeVar('V', bound='View', covariant=True)\n\n\nclass DynamicItem(Generic[BaseT], Item['View']):\n    \"\"\"Represents an item with a dynamic ``custom_id`` that can be used to store state within\n    that ``custom_id``.\n\n    The ``custom_id`` parsing is done using the ``re`` module by passing a ``template``\n    parameter to the class parameter list.\n\n    This item is generated every time the component is dispatched. This means that\n    any variable that holds an instance of this class will eventually be out of date\n    and should not be used long term. Their only purpose is to act as a \"template\"\n    for the actual dispatched item.\n\n    When this item is generated, :attr:`view` is set to a regular :class:`View` instance\n    from the original message given from the interaction. This means that custom view\n    subclasses cannot be accessed from this item.\n\n    .. versionadded:: 2.4\n\n    Parameters\n    ------------\n    item: :class:`Item`\n        The item to wrap with dynamic custom ID parsing.\n    template: Union[:class:`str`, ``re.Pattern``]\n        The template to use for parsing the ``custom_id``. This can be a string or a compiled\n        regular expression. This must be passed as a keyword argument to the class creation.\n    row: Optional[:class:`int`]\n        The relative row this button belongs to. A Discord component can only have 5\n        rows. By default, items are arranged automatically into those 5 rows. If you'd\n        like to control the relative positioning of the row then passing an index is advised.\n        For example, row=1 will show up before row=2. Defaults to ``None``, which is automatic\n        ordering. The row number must be between 0 and 4 (i.e. zero indexed).\n\n    Attributes\n    -----------\n    item: :class:`Item`\n        The item that is wrapped with dynamic custom ID parsing.\n    \"\"\"\n\n    __item_repr_attributes__: Tuple[str, ...] = (\n        'item',\n        'template',\n    )\n\n    __discord_ui_compiled_template__: ClassVar[re.Pattern[str]]\n\n    def __init_subclass__(cls, *, template: Union[str, re.Pattern[str]]) -> None:\n        super().__init_subclass__()\n        cls.__discord_ui_compiled_template__ = re.compile(template) if isinstance(template, str) else template\n        if not isinstance(cls.__discord_ui_compiled_template__, re.Pattern):\n            raise TypeError('template must be a str or a re.Pattern')\n\n    def __init__(\n        self,\n        item: BaseT,\n        *,\n        row: Optional[int] = None,\n    ) -> None:\n        super().__init__()\n        self.item: BaseT = item\n        if row is not None:\n            self.row = row\n\n        if not self.item.is_dispatchable():\n            raise TypeError('item must be dispatchable, e.g. not a URL button')\n\n        if not self.template.match(self.custom_id):\n            raise ValueError(f'item custom_id {self.custom_id!r} must match the template {self.template.pattern!r}')\n\n    @property\n    def template(self) -> re.Pattern[str]:\n        \"\"\"``re.Pattern``: The compiled regular expression that is used to parse the ``custom_id``.\"\"\"\n        return self.__class__.__discord_ui_compiled_template__\n\n    def to_component_dict(self) -> Dict[str, Any]:\n        return self.item.to_component_dict()\n\n    def _refresh_component(self, component: Component) -> None:\n        self.item._refresh_component(component)\n\n    def _refresh_state(self, interaction: Interaction, data: Dict[str, Any]) -> None:\n        self.item._refresh_state(interaction, data)\n\n    @classmethod\n    def from_component(cls: Type[Self], component: Component) -> Self:\n        raise TypeError('Dynamic items cannot be created from components')\n\n    @property\n    def type(self) -> ComponentType:\n        return self.item.type\n\n    def is_dispatchable(self) -> bool:\n        return self.item.is_dispatchable()\n\n    def is_persistent(self) -> bool:\n        return True\n\n    @property\n    def custom_id(self) -> str:\n        \"\"\":class:`str`: The ID of the dynamic item that gets received during an interaction.\"\"\"\n        return self.item.custom_id  # type: ignore  # This attribute exists for dispatchable items\n\n    @custom_id.setter\n    def custom_id(self, value: str) -> None:\n        if not isinstance(value, str):\n            raise TypeError('custom_id must be a str')\n\n        if not self.template.match(value):\n            raise ValueError(f'custom_id must match the template {self.template.pattern!r}')\n\n        self.item.custom_id = value  # type: ignore  # This attribute exists for dispatchable items\n        self._provided_custom_id = True\n\n    @property\n    def row(self) -> Optional[int]:\n        return self.item._row\n\n    @row.setter\n    def row(self, value: Optional[int]) -> None:\n        self.item.row = value\n\n    @property\n    def width(self) -> int:\n        return self.item.width\n\n    @classmethod\n    async def from_custom_id(\n        cls: Type[Self], interaction: Interaction[ClientT], item: Item[Any], match: re.Match[str], /\n    ) -> Self:\n        \"\"\"|coro|\n\n        A classmethod that is called when the ``custom_id`` of a component matches the\n        ``template`` of the class. This is called when the component is dispatched.\n\n        It must return a new instance of the :class:`DynamicItem`.\n\n        Subclasses *must* implement this method.\n\n        Exceptions raised in this method are logged and ignored.\n\n        .. warning::\n\n            This method is called before the callback is dispatched, therefore\n            it means that it is subject to the same timing restrictions as the callback.\n            Ergo, you must reply to an interaction within 3 seconds of it being\n            dispatched.\n\n        Parameters\n        ------------\n        interaction: :class:`~discord.Interaction`\n            The interaction that the component belongs to.\n        item: :class:`~discord.ui.Item`\n            The base item that is being dispatched.\n        match: ``re.Match``\n            The match object that was created from the ``template``\n            matching the ``custom_id``.\n\n        Returns\n        --------\n        :class:`DynamicItem`\n            The new instance of the :class:`DynamicItem` with information\n            from the ``match`` object.\n        \"\"\"\n        raise NotImplementedError\n\n    async def callback(self, interaction: Interaction[ClientT]) -> Any:\n        return await self.item.callback(interaction)\n\n    async def interaction_check(self, interaction: Interaction[ClientT], /) -> bool:\n        return await self.item.interaction_check(interaction)\n"
  },
  {
    "path": "discord/ui/item.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom __future__ import annotations\n\nfrom typing import Any, Callable, Coroutine, Dict, Generic, Optional, TYPE_CHECKING, Tuple, Type, TypeVar\n\nfrom ..interactions import Interaction\nfrom .._types import ClientT\n\n# fmt: off\n__all__ = (\n    'Item',\n)\n# fmt: on\n\nif TYPE_CHECKING:\n    from ..enums import ComponentType\n    from .view import View\n    from ..components import Component\n\nI = TypeVar('I', bound='Item[Any]')\nV = TypeVar('V', bound='View', covariant=True)\nItemCallbackType = Callable[[V, Interaction[Any], I], Coroutine[Any, Any, Any]]\n\n\nclass Item(Generic[V]):\n    \"\"\"Represents the base UI item that all UI components inherit from.\n\n    The current UI items supported are:\n\n    - :class:`discord.ui.Button`\n    - :class:`discord.ui.Select`\n    - :class:`discord.ui.TextInput`\n\n    .. versionadded:: 2.0\n    \"\"\"\n\n    __item_repr_attributes__: Tuple[str, ...] = ('row',)\n\n    def __init__(self):\n        self._view: Optional[V] = None\n        self._row: Optional[int] = None\n        self._rendered_row: Optional[int] = None\n        # This works mostly well but there is a gotcha with\n        # the interaction with from_component, since that technically provides\n        # a custom_id most dispatchable items would get this set to True even though\n        # it might not be provided by the library user. However, this edge case doesn't\n        # actually affect the intended purpose of this check because from_component is\n        # only called upon edit and we're mainly interested during initial creation time.\n        self._provided_custom_id: bool = False\n\n    def to_component_dict(self) -> Dict[str, Any]:\n        raise NotImplementedError\n\n    def _refresh_component(self, component: Component) -> None:\n        return None\n\n    def _refresh_state(self, interaction: Interaction, data: Dict[str, Any]) -> None:\n        return None\n\n    @classmethod\n    def from_component(cls: Type[I], component: Component) -> I:\n        return cls()\n\n    @property\n    def type(self) -> ComponentType:\n        raise NotImplementedError\n\n    def is_dispatchable(self) -> bool:\n        return False\n\n    def is_persistent(self) -> bool:\n        return self._provided_custom_id\n\n    def __repr__(self) -> str:\n        attrs = ' '.join(f'{key}={getattr(self, key)!r}' for key in self.__item_repr_attributes__)\n        return f'<{self.__class__.__name__} {attrs}>'\n\n    @property\n    def row(self) -> Optional[int]:\n        return self._row\n\n    @row.setter\n    def row(self, value: Optional[int]) -> None:\n        if value is None:\n            self._row = None\n        elif 5 > value >= 0:\n            self._row = value\n        else:\n            raise ValueError('row cannot be negative or greater than or equal to 5')\n\n    @property\n    def width(self) -> int:\n        return 1\n\n    @property\n    def view(self) -> Optional[V]:\n        \"\"\"Optional[:class:`View`]: The underlying view for this item.\"\"\"\n        return self._view\n\n    async def callback(self, interaction: Interaction[ClientT]) -> Any:\n        \"\"\"|coro|\n\n        The callback associated with this UI item.\n\n        This can be overridden by subclasses.\n\n        Parameters\n        -----------\n        interaction: :class:`.Interaction`\n            The interaction that triggered this UI item.\n        \"\"\"\n        pass\n\n    async def interaction_check(self, interaction: Interaction[ClientT], /) -> bool:\n        \"\"\"|coro|\n\n        A callback that is called when an interaction happens within this item\n        that checks whether the callback should be processed.\n\n        This is useful to override if, for example, you want to ensure that the\n        interaction author is a given user.\n\n        The default implementation of this returns ``True``.\n\n        .. note::\n\n            If an exception occurs within the body then the check\n            is considered a failure and :meth:`discord.ui.View.on_error` is called.\n\n            For :class:`~discord.ui.DynamicItem` this does not call the ``on_error``\n            handler.\n\n        .. versionadded:: 2.4\n\n        Parameters\n        -----------\n        interaction: :class:`~discord.Interaction`\n            The interaction that occurred.\n\n        Returns\n        ---------\n        :class:`bool`\n            Whether the callback should be called.\n        \"\"\"\n        return True\n"
  },
  {
    "path": "discord/ui/modal.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom __future__ import annotations\n\nimport asyncio\nimport logging\nimport os\nfrom copy import deepcopy\nfrom typing import TYPE_CHECKING, Any, Dict, Optional, Sequence, ClassVar, List\n\nfrom ..utils import MISSING, find\nfrom .._types import ClientT\nfrom .item import Item\nfrom .view import View\n\nif TYPE_CHECKING:\n    from typing_extensions import Self\n\n    from ..interactions import Interaction\n    from ..types.interactions import ModalSubmitComponentInteractionData as ModalSubmitComponentInteractionDataPayload\n\n\n# fmt: off\n__all__ = (\n    'Modal',\n)\n# fmt: on\n\n\n_log = logging.getLogger(__name__)\n\n\nclass Modal(View):\n    \"\"\"Represents a UI modal.\n\n    This object must be inherited to create a modal popup window within discord.\n\n    .. versionadded:: 2.0\n\n    Examples\n    ----------\n\n    .. code-block:: python3\n\n        import discord\n        from discord import ui\n\n        class Questionnaire(ui.Modal, title='Questionnaire Response'):\n            name = ui.TextInput(label='Name')\n            answer = ui.TextInput(label='Answer', style=discord.TextStyle.paragraph)\n\n            async def on_submit(self, interaction: discord.Interaction):\n                await interaction.response.send_message(f'Thanks for your response, {self.name}!', ephemeral=True)\n\n    Parameters\n    -----------\n    title: :class:`str`\n        The title of the modal.\n        Can only be up to 45 characters.\n    timeout: Optional[:class:`float`]\n        Timeout in seconds from last interaction with the UI before no longer accepting input.\n        If ``None`` then there is no timeout.\n    custom_id: :class:`str`\n        The ID of the modal that gets received during an interaction.\n        If not given then one is generated for you.\n        Can only be up to 100 characters.\n\n    Attributes\n    ------------\n    title: :class:`str`\n        The title of the modal.\n    custom_id: :class:`str`\n        The ID of the modal that gets received during an interaction.\n    \"\"\"\n\n    if TYPE_CHECKING:\n        title: str\n\n    __discord_ui_modal__ = True\n    __modal_children_items__: ClassVar[Dict[str, Item[Self]]] = {}\n\n    def __init_subclass__(cls, *, title: str = MISSING) -> None:\n        if title is not MISSING:\n            cls.title = title\n\n        children = {}\n        for base in reversed(cls.__mro__):\n            for name, member in base.__dict__.items():\n                if isinstance(member, Item):\n                    children[name] = member\n\n        cls.__modal_children_items__ = children\n\n    def _init_children(self) -> List[Item]:\n        children = []\n        for name, item in self.__modal_children_items__.items():\n            item = deepcopy(item)\n            setattr(self, name, item)\n            item._view = self\n            children.append(item)\n        return children\n\n    def __init__(\n        self,\n        *,\n        title: str = MISSING,\n        timeout: Optional[float] = None,\n        custom_id: str = MISSING,\n    ) -> None:\n        if title is MISSING and getattr(self, 'title', MISSING) is MISSING:\n            raise ValueError('Modal must have a title')\n        elif title is not MISSING:\n            self.title = title\n        self.custom_id: str = os.urandom(16).hex() if custom_id is MISSING else custom_id\n\n        super().__init__(timeout=timeout)\n\n    async def on_submit(self, interaction: Interaction[ClientT], /) -> None:\n        \"\"\"|coro|\n\n        Called when the modal is submitted.\n\n        Parameters\n        -----------\n        interaction: :class:`.Interaction`\n            The interaction that submitted this modal.\n        \"\"\"\n        pass\n\n    async def on_error(self, interaction: Interaction[ClientT], error: Exception, /) -> None:\n        \"\"\"|coro|\n\n        A callback that is called when :meth:`on_submit`\n        fails with an error.\n\n        The default implementation logs to the library logger.\n\n        Parameters\n        -----------\n        interaction: :class:`~discord.Interaction`\n            The interaction that led to the failure.\n        error: :class:`Exception`\n            The exception that was raised.\n        \"\"\"\n        _log.error('Ignoring exception in modal %r:', self, exc_info=error)\n\n    def _refresh(self, interaction: Interaction, components: Sequence[ModalSubmitComponentInteractionDataPayload]) -> None:\n        for component in components:\n            if component['type'] == 1:\n                self._refresh(interaction, component['components'])\n            else:\n                item = find(lambda i: i.custom_id == component['custom_id'], self._children)  # type: ignore\n                if item is None:\n                    _log.debug(\"Modal interaction referencing unknown item custom_id %s. Discarding\", component['custom_id'])\n                    continue\n                item._refresh_state(interaction, component)  # type: ignore\n\n    async def _scheduled_task(self, interaction: Interaction, components: List[ModalSubmitComponentInteractionDataPayload]):\n        try:\n            self._refresh_timeout()\n            self._refresh(interaction, components)\n\n            allow = await self.interaction_check(interaction)\n            if not allow:\n                return\n\n            await self.on_submit(interaction)\n        except Exception as e:\n            return await self.on_error(interaction, e)\n        else:\n            # No error, so assume this will always happen\n            # In the future, maybe this will require checking if we set an error response.\n            self.stop()\n\n    def _dispatch_submit(\n        self, interaction: Interaction, components: List[ModalSubmitComponentInteractionDataPayload]\n    ) -> None:\n        asyncio.create_task(self._scheduled_task(interaction, components), name=f'discord-ui-modal-dispatch-{self.id}')\n\n    def to_dict(self) -> Dict[str, Any]:\n        payload = {\n            'custom_id': self.custom_id,\n            'title': self.title,\n            'components': self.to_components(),\n        }\n\n        return payload\n"
  },
  {
    "path": "discord/ui/select.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\nfrom __future__ import annotations\nfrom typing import (\n    Any,\n    List,\n    Literal,\n    Optional,\n    TYPE_CHECKING,\n    Tuple,\n    Type,\n    TypeVar,\n    Callable,\n    Union,\n    Dict,\n    overload,\n    Sequence,\n)\nfrom contextvars import ContextVar\nimport inspect\nimport os\n\nfrom .item import Item, ItemCallbackType\nfrom ..enums import ChannelType, ComponentType, SelectDefaultValueType\nfrom ..partial_emoji import PartialEmoji\nfrom ..emoji import Emoji\nfrom ..utils import MISSING, _human_join\nfrom ..components import (\n    SelectOption,\n    SelectMenu,\n    SelectDefaultValue,\n)\nfrom ..app_commands.namespace import Namespace\nfrom ..member import Member\nfrom ..object import Object\nfrom ..role import Role\nfrom ..user import User, ClientUser\nfrom ..abc import GuildChannel\nfrom ..threads import Thread\n\n__all__ = (\n    'Select',\n    'UserSelect',\n    'RoleSelect',\n    'MentionableSelect',\n    'ChannelSelect',\n    'select',\n)\n\nif TYPE_CHECKING:\n    from typing_extensions import TypeAlias, TypeGuard\n\n    from .view import View\n    from ..types.components import SelectMenu as SelectMenuPayload\n    from ..types.interactions import SelectMessageComponentInteractionData\n    from ..app_commands import AppCommandChannel, AppCommandThread\n    from ..interactions import Interaction\n\n    ValidSelectType: TypeAlias = Literal[\n        ComponentType.string_select,\n        ComponentType.user_select,\n        ComponentType.role_select,\n        ComponentType.channel_select,\n        ComponentType.mentionable_select,\n    ]\n    PossibleValue: TypeAlias = Union[\n        str, User, Member, Role, AppCommandChannel, AppCommandThread, Union[Role, Member], Union[Role, User]\n    ]\n    ValidDefaultValues: TypeAlias = Union[\n        SelectDefaultValue,\n        Object,\n        Role,\n        Member,\n        ClientUser,\n        User,\n        GuildChannel,\n        AppCommandChannel,\n        AppCommandThread,\n        Thread,\n    ]\n\nV = TypeVar('V', bound='View', covariant=True)\nBaseSelectT = TypeVar('BaseSelectT', bound='BaseSelect[Any]')\nSelectT = TypeVar('SelectT', bound='Select[Any]')\nUserSelectT = TypeVar('UserSelectT', bound='UserSelect[Any]')\nRoleSelectT = TypeVar('RoleSelectT', bound='RoleSelect[Any]')\nChannelSelectT = TypeVar('ChannelSelectT', bound='ChannelSelect[Any]')\nMentionableSelectT = TypeVar('MentionableSelectT', bound='MentionableSelect[Any]')\nSelectCallbackDecorator: TypeAlias = Callable[[ItemCallbackType[V, BaseSelectT]], BaseSelectT]\nDefaultSelectComponentTypes = Literal[\n    ComponentType.user_select,\n    ComponentType.role_select,\n    ComponentType.channel_select,\n    ComponentType.mentionable_select,\n]\n\nselected_values: ContextVar[Dict[str, List[PossibleValue]]] = ContextVar('selected_values')\n\n\ndef _is_valid_object_type(\n    obj: Any,\n    component_type: DefaultSelectComponentTypes,\n    type_to_supported_classes: Dict[ValidSelectType, Tuple[Type[ValidDefaultValues], ...]],\n) -> TypeGuard[Type[ValidDefaultValues]]:\n    return issubclass(obj, type_to_supported_classes[component_type])\n\n\ndef _handle_select_defaults(\n    defaults: Sequence[ValidDefaultValues], component_type: DefaultSelectComponentTypes\n) -> List[SelectDefaultValue]:\n    if not defaults or defaults is MISSING:\n        return []\n\n    from ..app_commands import AppCommandChannel, AppCommandThread\n\n    cls_to_type: Dict[Type[ValidDefaultValues], SelectDefaultValueType] = {\n        User: SelectDefaultValueType.user,\n        Member: SelectDefaultValueType.user,\n        ClientUser: SelectDefaultValueType.user,\n        Role: SelectDefaultValueType.role,\n        GuildChannel: SelectDefaultValueType.channel,\n        AppCommandChannel: SelectDefaultValueType.channel,\n        AppCommandThread: SelectDefaultValueType.channel,\n        Thread: SelectDefaultValueType.channel,\n    }\n    type_to_supported_classes: Dict[ValidSelectType, Tuple[Type[ValidDefaultValues], ...]] = {\n        ComponentType.user_select: (User, ClientUser, Member, Object),\n        ComponentType.role_select: (Role, Object),\n        ComponentType.channel_select: (GuildChannel, AppCommandChannel, AppCommandThread, Thread, Object),\n        ComponentType.mentionable_select: (User, ClientUser, Member, Role, Object),\n    }\n\n    values: List[SelectDefaultValue] = []\n    for obj in defaults:\n        if isinstance(obj, SelectDefaultValue):\n            values.append(obj)\n            continue\n\n        object_type = obj.__class__ if not isinstance(obj, Object) else obj.type\n\n        if not _is_valid_object_type(object_type, component_type, type_to_supported_classes):\n            supported_classes = _human_join([c.__name__ for c in type_to_supported_classes[component_type]])\n            raise TypeError(f'Expected an instance of {supported_classes} not {object_type.__name__}')\n\n        if object_type is Object:\n            if component_type is ComponentType.mentionable_select:\n                raise ValueError(\n                    'Object must have a type specified for the chosen select type. Please pass one using the `type`` kwarg.'\n                )\n            elif component_type is ComponentType.user_select:\n                object_type = User\n            elif component_type is ComponentType.role_select:\n                object_type = Role\n            elif component_type is ComponentType.channel_select:\n                object_type = GuildChannel\n\n        if issubclass(object_type, GuildChannel):\n            object_type = GuildChannel\n\n        values.append(SelectDefaultValue(id=obj.id, type=cls_to_type[object_type]))\n\n    return values\n\n\nclass BaseSelect(Item[V]):\n    \"\"\"The base Select model that all other Select models inherit from.\n\n    This class inherits from :class:`Item` and implements the common attributes.\n\n    The following implement this class:\n\n    - :class:`~discord.ui.Select`\n    - :class:`~discord.ui.ChannelSelect`\n    - :class:`~discord.ui.RoleSelect`\n    - :class:`~discord.ui.MentionableSelect`\n    - :class:`~discord.ui.UserSelect`\n\n    .. versionadded:: 2.1\n\n    Attributes\n    ------------\n    row: Optional[:class:`int`]\n        The relative row this select menu belongs to. A Discord component can only have 5\n        rows. By default, items are arranged automatically into those 5 rows. If you'd\n        like to control the relative positioning of the row then passing an index is advised.\n        For example, row=1 will show up before row=2. Defaults to ``None``, which is automatic\n        ordering. The row number must be between 0 and 4 (i.e. zero indexed).\n    \"\"\"\n\n    __slots__ = ('_provided_custom_id', '_underlying', 'row', '_values')\n\n    __item_repr_attributes__: Tuple[str, ...] = (\n        'placeholder',\n        'min_values',\n        'max_values',\n        'disabled',\n    )\n    __component_attributes__: Tuple[str, ...] = (\n        'custom_id',\n        'placeholder',\n        'min_values',\n        'max_values',\n        'disabled',\n    )\n\n    def __init__(\n        self,\n        type: ValidSelectType,\n        *,\n        custom_id: str = MISSING,\n        row: Optional[int] = None,\n        placeholder: Optional[str] = None,\n        min_values: Optional[int] = None,\n        max_values: Optional[int] = None,\n        disabled: bool = False,\n        options: List[SelectOption] = MISSING,\n        channel_types: List[ChannelType] = MISSING,\n        default_values: Sequence[SelectDefaultValue] = MISSING,\n    ) -> None:\n        super().__init__()\n        self._provided_custom_id = custom_id is not MISSING\n        custom_id = os.urandom(16).hex() if custom_id is MISSING else custom_id\n        if not isinstance(custom_id, str):\n            raise TypeError(f'expected custom_id to be str not {custom_id.__class__.__name__}')\n\n        self._underlying = SelectMenu._raw_construct(\n            type=type,\n            custom_id=custom_id,\n            placeholder=placeholder,\n            min_values=min_values,\n            max_values=max_values,\n            disabled=disabled,\n            channel_types=[] if channel_types is MISSING else channel_types,\n            options=[] if options is MISSING else options,\n            default_values=[] if default_values is MISSING else default_values,\n        )\n\n        self.row = row\n        self._values: List[PossibleValue] = []\n\n    @property\n    def values(self) -> List[PossibleValue]:\n        values = selected_values.get({})\n        return values.get(self.custom_id, self._values)\n\n    @property\n    def custom_id(self) -> str:\n        \"\"\":class:`str`: The ID of the select menu that gets received during an interaction.\"\"\"\n        return self._underlying.custom_id\n\n    @custom_id.setter\n    def custom_id(self, value: str) -> None:\n        if not isinstance(value, str):\n            raise TypeError('custom_id must be a str')\n\n        self._underlying.custom_id = value\n        self._provided_custom_id = True\n\n    @property\n    def placeholder(self) -> Optional[str]:\n        \"\"\"Optional[:class:`str`]: The placeholder text that is shown if nothing is selected, if any.\"\"\"\n        return self._underlying.placeholder\n\n    @placeholder.setter\n    def placeholder(self, value: Optional[str]) -> None:\n        if value is not None and not isinstance(value, str):\n            raise TypeError('placeholder must be None or str')\n\n        self._underlying.placeholder = value\n\n    @property\n    def min_values(self) -> int:\n        \"\"\":class:`int`: The minimum number of items that must be chosen for this select menu.\"\"\"\n        return self._underlying.min_values\n\n    @min_values.setter\n    def min_values(self, value: int) -> None:\n        self._underlying.min_values = int(value)\n\n    @property\n    def max_values(self) -> int:\n        \"\"\":class:`int`: The maximum number of items that can be chosen for this select menu.\"\"\"\n        return self._underlying.max_values\n\n    @max_values.setter\n    def max_values(self, value: int) -> None:\n        self._underlying.max_values = int(value)\n\n    @property\n    def disabled(self) -> bool:\n        \"\"\":class:`bool`: Whether the select is disabled or not.\"\"\"\n        return self._underlying.disabled\n\n    @disabled.setter\n    def disabled(self, value: bool) -> None:\n        self._underlying.disabled = bool(value)\n\n    @property\n    def width(self) -> int:\n        return 5\n\n    def to_component_dict(self) -> SelectMenuPayload:\n        return self._underlying.to_dict()\n\n    def _refresh_component(self, component: SelectMenu) -> None:\n        self._underlying = component\n\n    def _refresh_state(self, interaction: Interaction, data: SelectMessageComponentInteractionData) -> None:\n        values = selected_values.get({})\n        payload: List[PossibleValue]\n        try:\n            resolved = Namespace._get_resolved_items(interaction, data['resolved'])\n            payload = list(resolved.values())\n        except KeyError:\n            payload = data.get(\"values\", [])  # type: ignore\n\n        self._values = values[self.custom_id] = payload\n        selected_values.set(values)\n\n    def is_dispatchable(self) -> bool:\n        return True\n\n    @classmethod\n    def from_component(cls, component: SelectMenu) -> BaseSelect[V]:\n        type_to_cls: Dict[ComponentType, Type[BaseSelect[Any]]] = {\n            ComponentType.string_select: Select,\n            ComponentType.user_select: UserSelect,\n            ComponentType.role_select: RoleSelect,\n            ComponentType.channel_select: ChannelSelect,\n            ComponentType.mentionable_select: MentionableSelect,\n        }\n        constructor = type_to_cls.get(component.type, Select)\n        kwrgs = {key: getattr(component, key) for key in constructor.__component_attributes__}\n        return constructor(**kwrgs)\n\n\nclass Select(BaseSelect[V]):\n    \"\"\"Represents a UI select menu with a list of custom options. This is represented\n    to the user as a dropdown menu.\n\n    .. versionadded:: 2.0\n\n    Parameters\n    ------------\n    custom_id: :class:`str`\n        The ID of the select menu that gets received during an interaction.\n        If not given then one is generated for you.\n        Can only be up to 100 characters.\n    placeholder: Optional[:class:`str`]\n        The placeholder text that is shown if nothing is selected, if any.\n        Can only be up to 150 characters.\n    min_values: :class:`int`\n        The minimum number of items that must be chosen for this select menu.\n        Defaults to 1 and must be between 0 and 25.\n    max_values: :class:`int`\n        The maximum number of items that must be chosen for this select menu.\n        Defaults to 1 and must be between 1 and 25.\n    options: List[:class:`discord.SelectOption`]\n        A list of options that can be selected in this menu.\n        Can only contain up to 25 items.\n    disabled: :class:`bool`\n        Whether the select is disabled or not.\n    row: Optional[:class:`int`]\n        The relative row this select menu belongs to. A Discord component can only have 5\n        rows. By default, items are arranged automatically into those 5 rows. If you'd\n        like to control the relative positioning of the row then passing an index is advised.\n        For example, row=1 will show up before row=2. Defaults to ``None``, which is automatic\n        ordering. The row number must be between 0 and 4 (i.e. zero indexed).\n    \"\"\"\n\n    __component_attributes__ = BaseSelect.__component_attributes__ + ('options',)\n\n    def __init__(\n        self,\n        *,\n        custom_id: str = MISSING,\n        placeholder: Optional[str] = None,\n        min_values: int = 1,\n        max_values: int = 1,\n        options: List[SelectOption] = MISSING,\n        disabled: bool = False,\n        row: Optional[int] = None,\n    ) -> None:\n        super().__init__(\n            self.type,\n            custom_id=custom_id,\n            placeholder=placeholder,\n            min_values=min_values,\n            max_values=max_values,\n            disabled=disabled,\n            options=options,\n            row=row,\n        )\n\n    @property\n    def values(self) -> List[str]:\n        \"\"\"List[:class:`str`]: A list of values that have been selected by the user.\"\"\"\n        return super().values  # type: ignore\n\n    @property\n    def type(self) -> Literal[ComponentType.string_select]:\n        \"\"\":class:`.ComponentType`: The type of this component.\"\"\"\n        return ComponentType.string_select\n\n    @property\n    def options(self) -> List[SelectOption]:\n        \"\"\"List[:class:`discord.SelectOption`]: A list of options that can be selected in this menu.\"\"\"\n        return self._underlying.options\n\n    @options.setter\n    def options(self, value: List[SelectOption]) -> None:\n        if not isinstance(value, list):\n            raise TypeError('options must be a list of SelectOption')\n        if not all(isinstance(obj, SelectOption) for obj in value):\n            raise TypeError('all list items must subclass SelectOption')\n\n        self._underlying.options = value\n\n    def add_option(\n        self,\n        *,\n        label: str,\n        value: str = MISSING,\n        description: Optional[str] = None,\n        emoji: Optional[Union[str, Emoji, PartialEmoji]] = None,\n        default: bool = False,\n    ) -> None:\n        \"\"\"Adds an option to the select menu.\n\n        To append a pre-existing :class:`discord.SelectOption` use the\n        :meth:`append_option` method instead.\n\n        Parameters\n        -----------\n        label: :class:`str`\n            The label of the option. This is displayed to users.\n            Can only be up to 100 characters.\n        value: :class:`str`\n            The value of the option. This is not displayed to users.\n            If not given, defaults to the label.\n            Can only be up to 100 characters.\n        description: Optional[:class:`str`]\n            An additional description of the option, if any.\n            Can only be up to 100 characters.\n        emoji: Optional[Union[:class:`str`, :class:`.Emoji`, :class:`.PartialEmoji`]]\n            The emoji of the option, if available. This can either be a string representing\n            the custom or unicode emoji or an instance of :class:`.PartialEmoji` or :class:`.Emoji`.\n        default: :class:`bool`\n            Whether this option is selected by default.\n\n        Raises\n        -------\n        ValueError\n            The number of options exceeds 25.\n        \"\"\"\n\n        option = SelectOption(\n            label=label,\n            value=value,\n            description=description,\n            emoji=emoji,\n            default=default,\n        )\n\n        self.append_option(option)\n\n    def append_option(self, option: SelectOption) -> None:\n        \"\"\"Appends an option to the select menu.\n\n        Parameters\n        -----------\n        option: :class:`discord.SelectOption`\n            The option to append to the select menu.\n\n        Raises\n        -------\n        ValueError\n            The number of options exceeds 25.\n        \"\"\"\n\n        if len(self._underlying.options) >= 25:\n            raise ValueError('maximum number of options already provided')\n\n        self._underlying.options.append(option)\n\n\nclass UserSelect(BaseSelect[V]):\n    \"\"\"Represents a UI select menu with a list of predefined options with the current members of the guild.\n\n    If this is sent a private message, it will only allow the user to select the client\n    or themselves. Every selected option in a private message will resolve to\n    a :class:`discord.User`.\n\n    .. versionadded:: 2.1\n\n    Parameters\n    ------------\n    custom_id: :class:`str`\n        The ID of the select menu that gets received during an interaction.\n        If not given then one is generated for you.\n        Can only be up to 100 characters.\n    placeholder: Optional[:class:`str`]\n        The placeholder text that is shown if nothing is selected, if any.\n        Can only be up to 150 characters.\n    min_values: :class:`int`\n        The minimum number of items that must be chosen for this select menu.\n        Defaults to 1 and must be between 0 and 25.\n    max_values: :class:`int`\n        The maximum number of items that must be chosen for this select menu.\n        Defaults to 1 and must be between 1 and 25.\n    disabled: :class:`bool`\n        Whether the select is disabled or not.\n    default_values: Sequence[:class:`~discord.abc.Snowflake`]\n        A list of objects representing the users that should be selected by default.\n        Number of items must be in range of ``min_values`` and ``max_values``.\n\n        .. versionadded:: 2.4\n    row: Optional[:class:`int`]\n        The relative row this select menu belongs to. A Discord component can only have 5\n        rows. By default, items are arranged automatically into those 5 rows. If you'd\n        like to control the relative positioning of the row then passing an index is advised.\n        For example, row=1 will show up before row=2. Defaults to ``None``, which is automatic\n        ordering. The row number must be between 0 and 4 (i.e. zero indexed).\n    \"\"\"\n\n    __component_attributes__ = BaseSelect.__component_attributes__ + ('default_values',)\n\n    def __init__(\n        self,\n        *,\n        custom_id: str = MISSING,\n        placeholder: Optional[str] = None,\n        min_values: int = 1,\n        max_values: int = 1,\n        disabled: bool = False,\n        row: Optional[int] = None,\n        default_values: Sequence[ValidDefaultValues] = MISSING,\n    ) -> None:\n        super().__init__(\n            self.type,\n            custom_id=custom_id,\n            placeholder=placeholder,\n            min_values=min_values,\n            max_values=max_values,\n            disabled=disabled,\n            row=row,\n            default_values=_handle_select_defaults(default_values, self.type),\n        )\n\n    @property\n    def type(self) -> Literal[ComponentType.user_select]:\n        \"\"\":class:`.ComponentType`: The type of this component.\"\"\"\n        return ComponentType.user_select\n\n    @property\n    def values(self) -> List[Union[Member, User]]:\n        \"\"\"List[Union[:class:`discord.Member`, :class:`discord.User`]]: A list of members\n        and users that have been selected by the user.\n\n        If this is sent a private message, it will only allow\n        the user to select the client or themselves. Every selected option in a private\n        message will resolve to a :class:`discord.User`.\n\n        If invoked in a guild, the values will always resolve to :class:`discord.Member`.\n        \"\"\"\n        return super().values  # type: ignore\n\n    @property\n    def default_values(self) -> List[SelectDefaultValue]:\n        \"\"\"List[:class:`discord.SelectDefaultValue`]: A list of default values for the select menu.\n\n        .. versionadded:: 2.4\n        \"\"\"\n        return self._underlying.default_values\n\n    @default_values.setter\n    def default_values(self, value: Sequence[ValidDefaultValues]) -> None:\n        self._underlying.default_values = _handle_select_defaults(value, self.type)\n\n\nclass RoleSelect(BaseSelect[V]):\n    \"\"\"Represents a UI select menu with a list of predefined options with the current roles of the guild.\n\n    Please note that if you use this in a private message with a user, no roles will be displayed to the user.\n\n    .. versionadded:: 2.1\n\n    Parameters\n    ------------\n    custom_id: :class:`str`\n        The ID of the select menu that gets received during an interaction.\n        If not given then one is generated for you.\n        Can only be up to 100 characters.\n    placeholder: Optional[:class:`str`]\n        The placeholder text that is shown if nothing is selected, if any.\n        Can only be up to 150 characters.\n    min_values: :class:`int`\n        The minimum number of items that must be chosen for this select menu.\n        Defaults to 1 and must be between 0 and 25.\n    max_values: :class:`int`\n        The maximum number of items that must be chosen for this select menu.\n        Defaults to 1 and must be between 1 and 25.\n    disabled: :class:`bool`\n        Whether the select is disabled or not.\n    default_values: Sequence[:class:`~discord.abc.Snowflake`]\n        A list of objects representing the roles that should be selected by default.\n        Number of items must be in range of ``min_values`` and ``max_values``.\n\n        .. versionadded:: 2.4\n    row: Optional[:class:`int`]\n        The relative row this select menu belongs to. A Discord component can only have 5\n        rows. By default, items are arranged automatically into those 5 rows. If you'd\n        like to control the relative positioning of the row then passing an index is advised.\n        For example, row=1 will show up before row=2. Defaults to ``None``, which is automatic\n        ordering. The row number must be between 0 and 4 (i.e. zero indexed).\n    \"\"\"\n\n    __component_attributes__ = BaseSelect.__component_attributes__ + ('default_values',)\n\n    def __init__(\n        self,\n        *,\n        custom_id: str = MISSING,\n        placeholder: Optional[str] = None,\n        min_values: int = 1,\n        max_values: int = 1,\n        disabled: bool = False,\n        row: Optional[int] = None,\n        default_values: Sequence[ValidDefaultValues] = MISSING,\n    ) -> None:\n        super().__init__(\n            self.type,\n            custom_id=custom_id,\n            placeholder=placeholder,\n            min_values=min_values,\n            max_values=max_values,\n            disabled=disabled,\n            row=row,\n            default_values=_handle_select_defaults(default_values, self.type),\n        )\n\n    @property\n    def type(self) -> Literal[ComponentType.role_select]:\n        \"\"\":class:`.ComponentType`: The type of this component.\"\"\"\n        return ComponentType.role_select\n\n    @property\n    def values(self) -> List[Role]:\n        \"\"\"List[:class:`discord.Role`]: A list of roles that have been selected by the user.\"\"\"\n        return super().values  # type: ignore\n\n    @property\n    def default_values(self) -> List[SelectDefaultValue]:\n        \"\"\"List[:class:`discord.SelectDefaultValue`]: A list of default values for the select menu.\n\n        .. versionadded:: 2.4\n        \"\"\"\n        return self._underlying.default_values\n\n    @default_values.setter\n    def default_values(self, value: Sequence[ValidDefaultValues]) -> None:\n        self._underlying.default_values = _handle_select_defaults(value, self.type)\n\n\nclass MentionableSelect(BaseSelect[V]):\n    \"\"\"Represents a UI select menu with a list of predefined options with the current members and roles in the guild.\n\n    If this is sent in a private message, it will only allow the user to select\n    the client or themselves. Every selected option in a private message\n    will resolve to a :class:`discord.User`. It will not give the user any roles\n    to select.\n\n    .. versionadded:: 2.1\n\n    Parameters\n    ------------\n    custom_id: :class:`str`\n        The ID of the select menu that gets received during an interaction.\n        If not given then one is generated for you.\n        Can only be up to 100 characters.\n    placeholder: Optional[:class:`str`]\n        The placeholder text that is shown if nothing is selected, if any.\n        Can only be up to 150 characters.\n    min_values: :class:`int`\n        The minimum number of items that must be chosen for this select menu.\n        Defaults to 1 and must be between 0 and 25.\n    max_values: :class:`int`\n        The maximum number of items that must be chosen for this select menu.\n        Defaults to 1 and must be between 1 and 25.\n    disabled: :class:`bool`\n        Whether the select is disabled or not.\n    default_values: Sequence[:class:`~discord.abc.Snowflake`]\n        A list of objects representing the users/roles that should be selected by default.\n        if :class:`.Object` is passed, then the type must be specified in the constructor.\n        Number of items must be in range of ``min_values`` and ``max_values``.\n\n        .. versionadded:: 2.4\n    row: Optional[:class:`int`]\n        The relative row this select menu belongs to. A Discord component can only have 5\n        rows. By default, items are arranged automatically into those 5 rows. If you'd\n        like to control the relative positioning of the row then passing an index is advised.\n        For example, row=1 will show up before row=2. Defaults to ``None``, which is automatic\n        ordering. The row number must be between 0 and 4 (i.e. zero indexed).\n    \"\"\"\n\n    __component_attributes__ = BaseSelect.__component_attributes__ + ('default_values',)\n\n    def __init__(\n        self,\n        *,\n        custom_id: str = MISSING,\n        placeholder: Optional[str] = None,\n        min_values: int = 1,\n        max_values: int = 1,\n        disabled: bool = False,\n        row: Optional[int] = None,\n        default_values: Sequence[ValidDefaultValues] = MISSING,\n    ) -> None:\n        super().__init__(\n            self.type,\n            custom_id=custom_id,\n            placeholder=placeholder,\n            min_values=min_values,\n            max_values=max_values,\n            disabled=disabled,\n            row=row,\n            default_values=_handle_select_defaults(default_values, self.type),\n        )\n\n    @property\n    def type(self) -> Literal[ComponentType.mentionable_select]:\n        \"\"\":class:`.ComponentType`: The type of this component.\"\"\"\n        return ComponentType.mentionable_select\n\n    @property\n    def values(self) -> List[Union[Member, User, Role]]:\n        \"\"\"List[Union[:class:`discord.Role`, :class:`discord.Member`, :class:`discord.User`]]: A list of roles, members,\n        and users that have been selected by the user.\n\n        If this is sent a private message, it will only allow\n        the user to select the client or themselves. Every selected option in a private\n        message will resolve to a :class:`discord.User`.\n\n        If invoked in a guild, the values will always resolve to :class:`discord.Member`.\n        \"\"\"\n        return super().values  # type: ignore\n\n    @property\n    def default_values(self) -> List[SelectDefaultValue]:\n        \"\"\"List[:class:`discord.SelectDefaultValue`]: A list of default values for the select menu.\n\n        .. versionadded:: 2.4\n        \"\"\"\n        return self._underlying.default_values\n\n    @default_values.setter\n    def default_values(self, value: Sequence[ValidDefaultValues]) -> None:\n        self._underlying.default_values = _handle_select_defaults(value, self.type)\n\n\nclass ChannelSelect(BaseSelect[V]):\n    \"\"\"Represents a UI select menu with a list of predefined options with the current channels in the guild.\n\n    Please note that if you use this in a private message with a user, no channels will be displayed to the user.\n\n    .. versionadded:: 2.1\n\n    Parameters\n    ------------\n    custom_id: :class:`str`\n        The ID of the select menu that gets received during an interaction.\n        If not given then one is generated for you.\n        Can only be up to 100 characters.\n    channel_types: List[:class:`~discord.ChannelType`]\n        The types of channels to show in the select menu. Defaults to all channels.\n    placeholder: Optional[:class:`str`]\n        The placeholder text that is shown if nothing is selected, if any.\n        Can only be up to 150 characters.\n    min_values: :class:`int`\n        The minimum number of items that must be chosen for this select menu.\n        Defaults to 1 and must be between 0 and 25.\n    max_values: :class:`int`\n        The maximum number of items that must be chosen for this select menu.\n        Defaults to 1 and must be between 1 and 25.\n    disabled: :class:`bool`\n        Whether the select is disabled or not.\n    default_values: Sequence[:class:`~discord.abc.Snowflake`]\n        A list of objects representing the channels that should be selected by default.\n        Number of items must be in range of ``min_values`` and ``max_values``.\n\n        .. versionadded:: 2.4\n    row: Optional[:class:`int`]\n        The relative row this select menu belongs to. A Discord component can only have 5\n        rows. By default, items are arranged automatically into those 5 rows. If you'd\n        like to control the relative positioning of the row then passing an index is advised.\n        For example, row=1 will show up before row=2. Defaults to ``None``, which is automatic\n        ordering. The row number must be between 0 and 4 (i.e. zero indexed).\n    \"\"\"\n\n    __component_attributes__ = BaseSelect.__component_attributes__ + (\n        'channel_types',\n        'default_values',\n    )\n\n    def __init__(\n        self,\n        *,\n        custom_id: str = MISSING,\n        channel_types: List[ChannelType] = MISSING,\n        placeholder: Optional[str] = None,\n        min_values: int = 1,\n        max_values: int = 1,\n        disabled: bool = False,\n        row: Optional[int] = None,\n        default_values: Sequence[ValidDefaultValues] = MISSING,\n    ) -> None:\n        super().__init__(\n            self.type,\n            custom_id=custom_id,\n            placeholder=placeholder,\n            min_values=min_values,\n            max_values=max_values,\n            disabled=disabled,\n            row=row,\n            channel_types=channel_types,\n            default_values=_handle_select_defaults(default_values, self.type),\n        )\n\n    @property\n    def type(self) -> Literal[ComponentType.channel_select]:\n        \"\"\":class:`.ComponentType`: The type of this component.\"\"\"\n        return ComponentType.channel_select\n\n    @property\n    def channel_types(self) -> List[ChannelType]:\n        \"\"\"List[:class:`~discord.ChannelType`]: A list of channel types that can be selected.\"\"\"\n        return self._underlying.channel_types\n\n    @channel_types.setter\n    def channel_types(self, value: List[ChannelType]) -> None:\n        if not isinstance(value, list):\n            raise TypeError('channel_types must be a list of ChannelType')\n        if not all(isinstance(obj, ChannelType) for obj in value):\n            raise TypeError('all list items must be a ChannelType')\n\n        self._underlying.channel_types = value\n\n    @property\n    def values(self) -> List[Union[AppCommandChannel, AppCommandThread]]:\n        \"\"\"List[Union[:class:`~discord.app_commands.AppCommandChannel`, :class:`~discord.app_commands.AppCommandThread`]]: A list of channels selected by the user.\"\"\"\n        return super().values  # type: ignore\n\n    @property\n    def default_values(self) -> List[SelectDefaultValue]:\n        \"\"\"List[:class:`discord.SelectDefaultValue`]: A list of default values for the select menu.\n\n        .. versionadded:: 2.4\n        \"\"\"\n        return self._underlying.default_values\n\n    @default_values.setter\n    def default_values(self, value: Sequence[ValidDefaultValues]) -> None:\n        self._underlying.default_values = _handle_select_defaults(value, self.type)\n\n\n@overload\ndef select(\n    *,\n    cls: Type[SelectT] = Select[Any],\n    options: List[SelectOption] = MISSING,\n    channel_types: List[ChannelType] = ...,\n    placeholder: Optional[str] = ...,\n    custom_id: str = ...,\n    min_values: int = ...,\n    max_values: int = ...,\n    disabled: bool = ...,\n    row: Optional[int] = ...,\n) -> SelectCallbackDecorator[V, SelectT]:\n    ...\n\n\n@overload\ndef select(\n    *,\n    cls: Type[UserSelectT] = UserSelect[Any],\n    options: List[SelectOption] = MISSING,\n    channel_types: List[ChannelType] = ...,\n    placeholder: Optional[str] = ...,\n    custom_id: str = ...,\n    min_values: int = ...,\n    max_values: int = ...,\n    disabled: bool = ...,\n    default_values: Sequence[ValidDefaultValues] = ...,\n    row: Optional[int] = ...,\n) -> SelectCallbackDecorator[V, UserSelectT]:\n    ...\n\n\n@overload\ndef select(\n    *,\n    cls: Type[RoleSelectT] = RoleSelect[Any],\n    options: List[SelectOption] = MISSING,\n    channel_types: List[ChannelType] = ...,\n    placeholder: Optional[str] = ...,\n    custom_id: str = ...,\n    min_values: int = ...,\n    max_values: int = ...,\n    disabled: bool = ...,\n    default_values: Sequence[ValidDefaultValues] = ...,\n    row: Optional[int] = ...,\n) -> SelectCallbackDecorator[V, RoleSelectT]:\n    ...\n\n\n@overload\ndef select(\n    *,\n    cls: Type[ChannelSelectT] = ChannelSelect[Any],\n    options: List[SelectOption] = MISSING,\n    channel_types: List[ChannelType] = ...,\n    placeholder: Optional[str] = ...,\n    custom_id: str = ...,\n    min_values: int = ...,\n    max_values: int = ...,\n    disabled: bool = ...,\n    default_values: Sequence[ValidDefaultValues] = ...,\n    row: Optional[int] = ...,\n) -> SelectCallbackDecorator[V, ChannelSelectT]:\n    ...\n\n\n@overload\ndef select(\n    *,\n    cls: Type[MentionableSelectT] = MentionableSelect[Any],\n    options: List[SelectOption] = MISSING,\n    channel_types: List[ChannelType] = MISSING,\n    placeholder: Optional[str] = ...,\n    custom_id: str = ...,\n    min_values: int = ...,\n    max_values: int = ...,\n    disabled: bool = ...,\n    default_values: Sequence[ValidDefaultValues] = ...,\n    row: Optional[int] = ...,\n) -> SelectCallbackDecorator[V, MentionableSelectT]:\n    ...\n\n\ndef select(\n    *,\n    cls: Type[BaseSelectT] = Select[Any],\n    options: List[SelectOption] = MISSING,\n    channel_types: List[ChannelType] = MISSING,\n    placeholder: Optional[str] = None,\n    custom_id: str = MISSING,\n    min_values: int = 1,\n    max_values: int = 1,\n    disabled: bool = False,\n    default_values: Sequence[ValidDefaultValues] = MISSING,\n    row: Optional[int] = None,\n) -> SelectCallbackDecorator[V, BaseSelectT]:\n    \"\"\"A decorator that attaches a select menu to a component.\n\n    The function being decorated should have three parameters, ``self`` representing\n    the :class:`discord.ui.View`, the :class:`discord.Interaction` you receive and\n    the chosen select class.\n\n    To obtain the selected values inside the callback, you can use the ``values`` attribute of the chosen class in the callback. The list of values\n    will depend on the type of select menu used. View the table below for more information.\n\n    +----------------------------------------+-----------------------------------------------------------------------------------------------------------------+\n    | Select Type                            | Resolved Values                                                                                                 |\n    +========================================+=================================================================================================================+\n    | :class:`discord.ui.Select`             | List[:class:`str`]                                                                                              |\n    +----------------------------------------+-----------------------------------------------------------------------------------------------------------------+\n    | :class:`discord.ui.UserSelect`         | List[Union[:class:`discord.Member`, :class:`discord.User`]]                                                     |\n    +----------------------------------------+-----------------------------------------------------------------------------------------------------------------+\n    | :class:`discord.ui.RoleSelect`         | List[:class:`discord.Role`]                                                                                     |\n    +----------------------------------------+-----------------------------------------------------------------------------------------------------------------+\n    | :class:`discord.ui.MentionableSelect`  | List[Union[:class:`discord.Role`, :class:`discord.Member`, :class:`discord.User`]]                              |\n    +----------------------------------------+-----------------------------------------------------------------------------------------------------------------+\n    | :class:`discord.ui.ChannelSelect`      | List[Union[:class:`~discord.app_commands.AppCommandChannel`, :class:`~discord.app_commands.AppCommandThread`]]  |\n    +----------------------------------------+-----------------------------------------------------------------------------------------------------------------+\n\n    .. versionchanged:: 2.1\n        Added the following keyword-arguments: ``cls``, ``channel_types``\n\n    Example\n    ---------\n    .. code-block:: python3\n\n        class View(discord.ui.View):\n\n            @discord.ui.select(cls=ChannelSelect, channel_types=[discord.ChannelType.text])\n            async def select_channels(self, interaction: discord.Interaction, select: ChannelSelect):\n                return await interaction.response.send_message(f'You selected {select.values[0].mention}')\n\n    Parameters\n    ------------\n    cls: Union[Type[:class:`discord.ui.Select`], Type[:class:`discord.ui.UserSelect`], Type[:class:`discord.ui.RoleSelect`], \\\n        Type[:class:`discord.ui.MentionableSelect`], Type[:class:`discord.ui.ChannelSelect`]]\n        The class to use for the select menu. Defaults to :class:`discord.ui.Select`. You can use other\n        select types to display different select menus to the user. See the table above for the different\n        values you can get from each select type. Subclasses work as well, however the callback in the subclass will\n        get overridden.\n    placeholder: Optional[:class:`str`]\n        The placeholder text that is shown if nothing is selected, if any.\n        Can only be up to 150 characters.\n    custom_id: :class:`str`\n        The ID of the select menu that gets received during an interaction.\n        It is recommended not to set this parameter to prevent conflicts.\n        Can only be up to 100 characters.\n    row: Optional[:class:`int`]\n        The relative row this select menu belongs to. A Discord component can only have 5\n        rows. By default, items are arranged automatically into those 5 rows. If you'd\n        like to control the relative positioning of the row then passing an index is advised.\n        For example, row=1 will show up before row=2. Defaults to ``None``, which is automatic\n        ordering. The row number must be between 0 and 4 (i.e. zero indexed).\n    min_values: :class:`int`\n        The minimum number of items that must be chosen for this select menu.\n        Defaults to 1 and must be between 0 and 25.\n    max_values: :class:`int`\n        The maximum number of items that must be chosen for this select menu.\n        Defaults to 1 and must be between 1 and 25.\n    options: List[:class:`discord.SelectOption`]\n        A list of options that can be selected in this menu. This can only be used with\n        :class:`Select` instances.\n        Can only contain up to 25 items.\n    channel_types: List[:class:`~discord.ChannelType`]\n        The types of channels to show in the select menu. Defaults to all channels. This can only be used\n        with :class:`ChannelSelect` instances.\n    disabled: :class:`bool`\n        Whether the select is disabled or not. Defaults to ``False``.\n    default_values: Sequence[:class:`~discord.abc.Snowflake`]\n        A list of objects representing the default values for the select menu. This cannot be used with regular :class:`Select` instances.\n        If ``cls`` is :class:`MentionableSelect` and :class:`.Object` is passed, then the type must be specified in the constructor.\n        Number of items must be in range of ``min_values`` and ``max_values``.\n\n        .. versionadded:: 2.4\n    \"\"\"\n\n    def decorator(func: ItemCallbackType[V, BaseSelectT]) -> ItemCallbackType[V, BaseSelectT]:\n        if not inspect.iscoroutinefunction(func):\n            raise TypeError('select function must be a coroutine function')\n        callback_cls = getattr(cls, '__origin__', cls)\n        if not issubclass(callback_cls, BaseSelect):\n            supported_classes = ', '.join(['ChannelSelect', 'MentionableSelect', 'RoleSelect', 'Select', 'UserSelect'])\n            raise TypeError(f'cls must be one of {supported_classes} or a subclass of one of them, not {cls.__name__}.')\n\n        func.__discord_ui_model_type__ = callback_cls\n        func.__discord_ui_model_kwargs__ = {\n            'placeholder': placeholder,\n            'custom_id': custom_id,\n            'row': row,\n            'min_values': min_values,\n            'max_values': max_values,\n            'disabled': disabled,\n        }\n        if issubclass(callback_cls, Select):\n            func.__discord_ui_model_kwargs__['options'] = options\n        if issubclass(callback_cls, ChannelSelect):\n            func.__discord_ui_model_kwargs__['channel_types'] = channel_types\n        if not issubclass(callback_cls, Select):\n            cls_to_type: Dict[\n                Type[BaseSelect],\n                Literal[\n                    ComponentType.user_select,\n                    ComponentType.channel_select,\n                    ComponentType.role_select,\n                    ComponentType.mentionable_select,\n                ],\n            ] = {\n                UserSelect: ComponentType.user_select,\n                RoleSelect: ComponentType.role_select,\n                MentionableSelect: ComponentType.mentionable_select,\n                ChannelSelect: ComponentType.channel_select,\n            }\n            func.__discord_ui_model_kwargs__['default_values'] = (\n                MISSING if default_values is MISSING else _handle_select_defaults(default_values, cls_to_type[callback_cls])\n            )\n\n        return func\n\n    return decorator  # type: ignore\n"
  },
  {
    "path": "discord/ui/text_input.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom __future__ import annotations\n\nimport os\nfrom typing import TYPE_CHECKING, Literal, Optional, Tuple, TypeVar\n\nfrom ..components import TextInput as TextInputComponent\nfrom ..enums import ComponentType, TextStyle\nfrom ..utils import MISSING\nfrom .item import Item\n\nif TYPE_CHECKING:\n    from typing_extensions import Self\n\n    from ..types.components import TextInput as TextInputPayload\n    from ..types.interactions import ModalSubmitTextInputInteractionData as ModalSubmitTextInputInteractionDataPayload\n    from .view import View\n    from ..interactions import Interaction\n\n\n# fmt: off\n__all__ = (\n    'TextInput',\n)\n# fmt: on\n\nV = TypeVar('V', bound='View', covariant=True)\n\n\nclass TextInput(Item[V]):\n    \"\"\"Represents a UI text input.\n\n    .. container:: operations\n\n        .. describe:: str(x)\n\n            Returns the value of the text input or an empty string if the value is ``None``.\n\n    .. versionadded:: 2.0\n\n    Parameters\n    ------------\n    label: :class:`str`\n        The label to display above the text input.\n        Can only be up to 45 characters.\n    custom_id: :class:`str`\n        The ID of the text input that gets received during an interaction.\n        If not given then one is generated for you.\n        Can only be up to 100 characters.\n    style: :class:`discord.TextStyle`\n        The style of the text input.\n    placeholder: Optional[:class:`str`]\n        The placeholder text to display when the text input is empty.\n        Can only be up to 100 characters.\n    default: Optional[:class:`str`]\n        The default value of the text input.\n        Can only be up to 4000 characters.\n    required: :class:`bool`\n        Whether the text input is required.\n    min_length: Optional[:class:`int`]\n        The minimum length of the text input.\n        Must be between 0 and 4000.\n    max_length: Optional[:class:`int`]\n        The maximum length of the text input.\n        Must be between 1 and 4000.\n    row: Optional[:class:`int`]\n        The relative row this text input belongs to. A Discord component can only have 5\n        rows. By default, items are arranged automatically into those 5 rows. If you'd\n        like to control the relative positioning of the row then passing an index is advised.\n        For example, row=1 will show up before row=2. Defaults to ``None``, which is automatic\n        ordering. The row number must be between 0 and 4 (i.e. zero indexed).\n    \"\"\"\n\n    __item_repr_attributes__: Tuple[str, ...] = (\n        'label',\n        'placeholder',\n        'required',\n    )\n\n    def __init__(\n        self,\n        *,\n        label: str,\n        style: TextStyle = TextStyle.short,\n        custom_id: str = MISSING,\n        placeholder: Optional[str] = None,\n        default: Optional[str] = None,\n        required: bool = True,\n        min_length: Optional[int] = None,\n        max_length: Optional[int] = None,\n        row: Optional[int] = None,\n    ) -> None:\n        super().__init__()\n        self._value: Optional[str] = default\n        self._provided_custom_id = custom_id is not MISSING\n        custom_id = os.urandom(16).hex() if custom_id is MISSING else custom_id\n        if not isinstance(custom_id, str):\n            raise TypeError(f'expected custom_id to be str not {custom_id.__class__.__name__}')\n\n        self._underlying = TextInputComponent._raw_construct(\n            label=label,\n            style=style,\n            custom_id=custom_id,\n            placeholder=placeholder,\n            value=default,\n            required=required,\n            min_length=min_length,\n            max_length=max_length,\n        )\n        self.row = row\n\n    def __str__(self) -> str:\n        return self.value\n\n    @property\n    def custom_id(self) -> str:\n        \"\"\":class:`str`: The ID of the text input that gets received during an interaction.\"\"\"\n        return self._underlying.custom_id\n\n    @custom_id.setter\n    def custom_id(self, value: str) -> None:\n        if not isinstance(value, str):\n            raise TypeError('custom_id must be a str')\n\n        self._underlying.custom_id = value\n        self._provided_custom_id = True\n\n    @property\n    def width(self) -> int:\n        return 5\n\n    @property\n    def value(self) -> str:\n        \"\"\":class:`str`: The value of the text input.\"\"\"\n        return self._value or ''\n\n    @property\n    def label(self) -> str:\n        \"\"\":class:`str`: The label of the text input.\"\"\"\n        return self._underlying.label\n\n    @label.setter\n    def label(self, value: str) -> None:\n        self._underlying.label = value\n\n    @property\n    def placeholder(self) -> Optional[str]:\n        \"\"\":class:`str`: The placeholder text to display when the text input is empty.\"\"\"\n        return self._underlying.placeholder\n\n    @placeholder.setter\n    def placeholder(self, value: Optional[str]) -> None:\n        self._underlying.placeholder = value\n\n    @property\n    def required(self) -> bool:\n        \"\"\":class:`bool`: Whether the text input is required.\"\"\"\n        return self._underlying.required\n\n    @required.setter\n    def required(self, value: bool) -> None:\n        self._underlying.required = value\n\n    @property\n    def min_length(self) -> Optional[int]:\n        \"\"\":class:`int`: The minimum length of the text input.\"\"\"\n        return self._underlying.min_length\n\n    @min_length.setter\n    def min_length(self, value: Optional[int]) -> None:\n        self._underlying.min_length = value\n\n    @property\n    def max_length(self) -> Optional[int]:\n        \"\"\":class:`int`: The maximum length of the text input.\"\"\"\n        return self._underlying.max_length\n\n    @max_length.setter\n    def max_length(self, value: Optional[int]) -> None:\n        self._underlying.max_length = value\n\n    @property\n    def style(self) -> TextStyle:\n        \"\"\":class:`discord.TextStyle`: The style of the text input.\"\"\"\n        return self._underlying.style\n\n    @style.setter\n    def style(self, value: TextStyle) -> None:\n        self._underlying.style = value\n\n    @property\n    def default(self) -> Optional[str]:\n        \"\"\":class:`str`: The default value of the text input.\"\"\"\n        return self._underlying.value\n\n    @default.setter\n    def default(self, value: Optional[str]) -> None:\n        self._underlying.value = value\n\n    def to_component_dict(self) -> TextInputPayload:\n        return self._underlying.to_dict()\n\n    def _refresh_component(self, component: TextInputComponent) -> None:\n        self._underlying = component\n\n    def _refresh_state(self, interaction: Interaction, data: ModalSubmitTextInputInteractionDataPayload) -> None:\n        self._value = data.get('value', None)\n\n    @classmethod\n    def from_component(cls, component: TextInputComponent) -> Self:\n        return cls(\n            label=component.label,\n            style=component.style,\n            custom_id=component.custom_id,\n            placeholder=component.placeholder,\n            default=component.value,\n            required=component.required,\n            min_length=component.min_length,\n            max_length=component.max_length,\n            row=None,\n        )\n\n    @property\n    def type(self) -> Literal[ComponentType.text_input]:\n        return self._underlying.type\n\n    def is_dispatchable(self) -> bool:\n        return False\n"
  },
  {
    "path": "discord/ui/view.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom __future__ import annotations\nfrom typing import Any, Callable, ClassVar, Coroutine, Dict, Iterator, List, Optional, Sequence, TYPE_CHECKING, Tuple, Type\nfrom functools import partial\nfrom itertools import groupby\n\nimport asyncio\nimport logging\nimport sys\nimport time\nimport os\nfrom .item import Item, ItemCallbackType\nfrom .dynamic import DynamicItem\nfrom ..components import (\n    Component,\n    ActionRow as ActionRowComponent,\n    _component_factory,\n    Button as ButtonComponent,\n    SelectMenu as SelectComponent,\n)\n\n# fmt: off\n__all__ = (\n    'View',\n)\n# fmt: on\n\n\nif TYPE_CHECKING:\n    from typing_extensions import Self\n    import re\n\n    from ..interactions import Interaction\n    from ..message import Message\n    from ..types.components import Component as ComponentPayload\n    from ..types.interactions import ModalSubmitComponentInteractionData as ModalSubmitComponentInteractionDataPayload\n    from ..state import ConnectionState\n    from .modal import Modal\n\n\n_log = logging.getLogger(__name__)\n\n\ndef _walk_all_components(components: List[Component]) -> Iterator[Component]:\n    for item in components:\n        if isinstance(item, ActionRowComponent):\n            yield from item.children\n        else:\n            yield item\n\n\ndef _component_to_item(component: Component) -> Item:\n    if isinstance(component, ButtonComponent):\n        from .button import Button\n\n        return Button.from_component(component)\n    if isinstance(component, SelectComponent):\n        from .select import BaseSelect\n\n        return BaseSelect.from_component(component)\n\n    return Item.from_component(component)\n\n\nclass _ViewWeights:\n    # fmt: off\n    __slots__ = (\n        'weights',\n    )\n    # fmt: on\n\n    def __init__(self, children: List[Item]):\n        self.weights: List[int] = [0, 0, 0, 0, 0]\n\n        key = lambda i: sys.maxsize if i.row is None else i.row\n        children = sorted(children, key=key)\n        for row, group in groupby(children, key=key):\n            for item in group:\n                self.add_item(item)\n\n    def find_open_space(self, item: Item) -> int:\n        for index, weight in enumerate(self.weights):\n            if weight + item.width <= 5:\n                return index\n\n        raise ValueError('could not find open space for item')\n\n    def add_item(self, item: Item) -> None:\n        if item.row is not None:\n            total = self.weights[item.row] + item.width\n            if total > 5:\n                raise ValueError(f'item would not fit at row {item.row} ({total} > 5 width)')\n            self.weights[item.row] = total\n            item._rendered_row = item.row\n        else:\n            index = self.find_open_space(item)\n            self.weights[index] += item.width\n            item._rendered_row = index\n\n    def remove_item(self, item: Item) -> None:\n        if item._rendered_row is not None:\n            self.weights[item._rendered_row] -= item.width\n            item._rendered_row = None\n\n    def clear(self) -> None:\n        self.weights = [0, 0, 0, 0, 0]\n\n\nclass _ViewCallback:\n    __slots__ = ('view', 'callback', 'item')\n\n    def __init__(self, callback: ItemCallbackType[Any, Any], view: View, item: Item[View]) -> None:\n        self.callback: ItemCallbackType[Any, Any] = callback\n        self.view: View = view\n        self.item: Item[View] = item\n\n    def __call__(self, interaction: Interaction) -> Coroutine[Any, Any, Any]:\n        return self.callback(self.view, interaction, self.item)\n\n\nclass View:\n    \"\"\"Represents a UI view.\n\n    This object must be inherited to create a UI within Discord.\n\n    .. versionadded:: 2.0\n\n    Parameters\n    -----------\n    timeout: Optional[:class:`float`]\n        Timeout in seconds from last interaction with the UI before no longer accepting input.\n        If ``None`` then there is no timeout.\n    \"\"\"\n\n    __discord_ui_view__: ClassVar[bool] = True\n    __discord_ui_modal__: ClassVar[bool] = False\n    __view_children_items__: ClassVar[List[ItemCallbackType[Any, Any]]] = []\n\n    def __init_subclass__(cls) -> None:\n        super().__init_subclass__()\n\n        children: Dict[str, ItemCallbackType[Any, Any]] = {}\n        for base in reversed(cls.__mro__):\n            for name, member in base.__dict__.items():\n                if hasattr(member, '__discord_ui_model_type__'):\n                    children[name] = member\n\n        if len(children) > 25:\n            raise TypeError('View cannot have more than 25 children')\n\n        cls.__view_children_items__ = list(children.values())\n\n    def _init_children(self) -> List[Item[Self]]:\n        children = []\n        for func in self.__view_children_items__:\n            item: Item = func.__discord_ui_model_type__(**func.__discord_ui_model_kwargs__)\n            item.callback = _ViewCallback(func, self, item)\n            item._view = self\n            setattr(self, func.__name__, item)\n            children.append(item)\n        return children\n\n    def __init__(self, *, timeout: Optional[float] = 180.0):\n        self.__timeout = timeout\n        self._children: List[Item[Self]] = self._init_children()\n        self.__weights = _ViewWeights(self._children)\n        self.id: str = os.urandom(16).hex()\n        self._cache_key: Optional[int] = None\n        self.__cancel_callback: Optional[Callable[[View], None]] = None\n        self.__timeout_expiry: Optional[float] = None\n        self.__timeout_task: Optional[asyncio.Task[None]] = None\n        self.__stopped: asyncio.Future[bool] = asyncio.get_running_loop().create_future()\n\n    def __repr__(self) -> str:\n        return f'<{self.__class__.__name__} timeout={self.timeout} children={len(self._children)}>'\n\n    async def __timeout_task_impl(self) -> None:\n        while True:\n            # Guard just in case someone changes the value of the timeout at runtime\n            if self.timeout is None:\n                return\n\n            if self.__timeout_expiry is None:\n                return self._dispatch_timeout()\n\n            # Check if we've elapsed our currently set timeout\n            now = time.monotonic()\n            if now >= self.__timeout_expiry:\n                return self._dispatch_timeout()\n\n            # Wait N seconds to see if timeout data has been refreshed\n            await asyncio.sleep(self.__timeout_expiry - now)\n\n    def to_components(self) -> List[Dict[str, Any]]:\n        def key(item: Item) -> int:\n            return item._rendered_row or 0\n\n        children = sorted(self._children, key=key)\n        components: List[Dict[str, Any]] = []\n        for _, group in groupby(children, key=key):\n            children = [item.to_component_dict() for item in group]\n            if not children:\n                continue\n\n            components.append(\n                {\n                    'type': 1,\n                    'components': children,\n                }\n            )\n\n        return components\n\n    def _refresh_timeout(self) -> None:\n        if self.__timeout:\n            self.__timeout_expiry = time.monotonic() + self.__timeout\n\n    @property\n    def timeout(self) -> Optional[float]:\n        \"\"\"Optional[:class:`float`]: The timeout in seconds from last interaction with the UI before no longer accepting input.\n        If ``None`` then there is no timeout.\n        \"\"\"\n        return self.__timeout\n\n    @timeout.setter\n    def timeout(self, value: Optional[float]) -> None:\n        # If the timeout task is already running this allows it to update\n        # the expiry while it's running\n        if self.__timeout_task is not None:\n            if value is not None:\n                self.__timeout_expiry = time.monotonic() + value\n            else:\n                self.__timeout_expiry = None\n\n        self.__timeout = value\n\n    @property\n    def children(self) -> List[Item[Self]]:\n        \"\"\"List[:class:`Item`]: The list of children attached to this view.\"\"\"\n        return self._children.copy()\n\n    @classmethod\n    def from_message(cls, message: Message, /, *, timeout: Optional[float] = 180.0) -> View:\n        \"\"\"Converts a message's components into a :class:`View`.\n\n        The :attr:`.Message.components` of a message are read-only\n        and separate types from those in the ``discord.ui`` namespace.\n        In order to modify and edit message components they must be\n        converted into a :class:`View` first.\n\n        Parameters\n        -----------\n        message: :class:`discord.Message`\n            The message with components to convert into a view.\n        timeout: Optional[:class:`float`]\n            The timeout of the converted view.\n\n        Returns\n        --------\n        :class:`View`\n            The converted view. This always returns a :class:`View` and not\n            one of its subclasses.\n        \"\"\"\n        view = View(timeout=timeout)\n        row = 0\n        for component in message.components:\n            if isinstance(component, ActionRowComponent):\n                for child in component.children:\n                    item = _component_to_item(child)\n                    item.row = row\n                    view.add_item(item)\n                row += 1\n            else:\n                item = _component_to_item(component)\n                item.row = row\n                view.add_item(item)\n\n        return view\n\n    def add_item(self, item: Item[Any]) -> Self:\n        \"\"\"Adds an item to the view.\n\n        This function returns the class instance to allow for fluent-style\n        chaining.\n\n        Parameters\n        -----------\n        item: :class:`Item`\n            The item to add to the view.\n\n        Raises\n        --------\n        TypeError\n            An :class:`Item` was not passed.\n        ValueError\n            Maximum number of children has been exceeded (25)\n            or the row the item is trying to be added to is full.\n        \"\"\"\n\n        if len(self._children) >= 25:\n            raise ValueError('maximum number of children exceeded')\n\n        if not isinstance(item, Item):\n            raise TypeError(f'expected Item not {item.__class__.__name__}')\n\n        self.__weights.add_item(item)\n\n        item._view = self\n        self._children.append(item)\n        return self\n\n    def remove_item(self, item: Item[Any]) -> Self:\n        \"\"\"Removes an item from the view.\n\n        This function returns the class instance to allow for fluent-style\n        chaining.\n\n        Parameters\n        -----------\n        item: :class:`Item`\n            The item to remove from the view.\n        \"\"\"\n\n        try:\n            self._children.remove(item)\n        except ValueError:\n            pass\n        else:\n            self.__weights.remove_item(item)\n        return self\n\n    def clear_items(self) -> Self:\n        \"\"\"Removes all items from the view.\n\n        This function returns the class instance to allow for fluent-style\n        chaining.\n        \"\"\"\n        self._children.clear()\n        self.__weights.clear()\n        return self\n\n    async def interaction_check(self, interaction: Interaction, /) -> bool:\n        \"\"\"|coro|\n\n        A callback that is called when an interaction happens within the view\n        that checks whether the view should process item callbacks for the interaction.\n\n        This is useful to override if, for example, you want to ensure that the\n        interaction author is a given user.\n\n        The default implementation of this returns ``True``.\n\n        .. note::\n\n            If an exception occurs within the body then the check\n            is considered a failure and :meth:`on_error` is called.\n\n        Parameters\n        -----------\n        interaction: :class:`~discord.Interaction`\n            The interaction that occurred.\n\n        Returns\n        ---------\n        :class:`bool`\n            Whether the view children's callbacks should be called.\n        \"\"\"\n        return True\n\n    async def on_timeout(self) -> None:\n        \"\"\"|coro|\n\n        A callback that is called when a view's timeout elapses without being explicitly stopped.\n        \"\"\"\n        pass\n\n    async def on_error(self, interaction: Interaction, error: Exception, item: Item[Any], /) -> None:\n        \"\"\"|coro|\n\n        A callback that is called when an item's callback or :meth:`interaction_check`\n        fails with an error.\n\n        The default implementation logs to the library logger.\n\n        Parameters\n        -----------\n        interaction: :class:`~discord.Interaction`\n            The interaction that led to the failure.\n        error: :class:`Exception`\n            The exception that was raised.\n        item: :class:`Item`\n            The item that failed the dispatch.\n        \"\"\"\n        _log.error('Ignoring exception in view %r for item %r', self, item, exc_info=error)\n\n    async def _scheduled_task(self, item: Item, interaction: Interaction):\n        try:\n            item._refresh_state(interaction, interaction.data)  # type: ignore\n\n            allow = await item.interaction_check(interaction) and await self.interaction_check(interaction)\n            if not allow:\n                return\n\n            if self.timeout:\n                self.__timeout_expiry = time.monotonic() + self.timeout\n\n            await item.callback(interaction)\n        except Exception as e:\n            return await self.on_error(interaction, e, item)\n\n    def _start_listening_from_store(self, store: ViewStore) -> None:\n        self.__cancel_callback = partial(store.remove_view)\n        if self.timeout:\n            if self.__timeout_task is not None:\n                self.__timeout_task.cancel()\n\n            self.__timeout_expiry = time.monotonic() + self.timeout\n            self.__timeout_task = asyncio.create_task(self.__timeout_task_impl())\n\n    def _dispatch_timeout(self):\n        if self.__stopped.done():\n            return\n\n        if self.__cancel_callback:\n            self.__cancel_callback(self)\n            self.__cancel_callback = None\n\n        self.__stopped.set_result(True)\n        asyncio.create_task(self.on_timeout(), name=f'discord-ui-view-timeout-{self.id}')\n\n    def _dispatch_item(self, item: Item, interaction: Interaction):\n        if self.__stopped.done():\n            return\n\n        asyncio.create_task(self._scheduled_task(item, interaction), name=f'discord-ui-view-dispatch-{self.id}')\n\n    def _refresh(self, components: List[Component]) -> None:\n        # fmt: off\n        old_state: Dict[str, Item[Any]] = {\n            item.custom_id: item  # type: ignore\n            for item in self._children\n            if item.is_dispatchable()\n        }\n        # fmt: on\n\n        for component in _walk_all_components(components):\n            custom_id = getattr(component, 'custom_id', None)\n            if custom_id is None:\n                continue\n\n            try:\n                older = old_state[custom_id]\n            except KeyError:\n                _log.debug('View interaction referenced an unknown item custom_id %s. Discarding', custom_id)\n                continue\n            else:\n                older._refresh_component(component)\n\n    def stop(self) -> None:\n        \"\"\"Stops listening to interaction events from this view.\n\n        This operation cannot be undone.\n        \"\"\"\n        if not self.__stopped.done():\n            self.__stopped.set_result(False)\n\n        self.__timeout_expiry = None\n        if self.__timeout_task is not None:\n            self.__timeout_task.cancel()\n            self.__timeout_task = None\n\n        if self.__cancel_callback:\n            self.__cancel_callback(self)\n            self.__cancel_callback = None\n\n    def is_finished(self) -> bool:\n        \"\"\":class:`bool`: Whether the view has finished interacting.\"\"\"\n        return self.__stopped.done()\n\n    def is_dispatching(self) -> bool:\n        \"\"\":class:`bool`: Whether the view has been added for dispatching purposes.\"\"\"\n        return self.__cancel_callback is not None\n\n    def is_persistent(self) -> bool:\n        \"\"\":class:`bool`: Whether the view is set up as persistent.\n\n        A persistent view has all their components with a set ``custom_id`` and\n        a :attr:`timeout` set to ``None``.\n        \"\"\"\n        return self.timeout is None and all(item.is_persistent() for item in self._children)\n\n    async def wait(self) -> bool:\n        \"\"\"|coro|\n\n        Waits until the view has finished interacting.\n\n        A view is considered finished when :meth:`stop` is called\n        or it times out.\n\n        Returns\n        --------\n        :class:`bool`\n            If ``True``, then the view timed out. If ``False`` then\n            the view finished normally.\n        \"\"\"\n        return await self.__stopped\n\n\nclass ViewStore:\n    def __init__(self, state: ConnectionState):\n        # entity_id: {(component_type, custom_id): Item}\n        self._views: Dict[Optional[int], Dict[Tuple[int, str], Item[View]]] = {}\n        # message_id: View\n        self._synced_message_views: Dict[int, View] = {}\n        # custom_id: Modal\n        self._modals: Dict[str, Modal] = {}\n        # component_type is the key\n        self._dynamic_items: Dict[re.Pattern[str], Type[DynamicItem[Item[Any]]]] = {}\n        self._state: ConnectionState = state\n\n    @property\n    def persistent_views(self) -> Sequence[View]:\n        # fmt: off\n        views = {\n            item.view.id: item.view\n            for items in self._views.values()\n            for item in items.values()\n            if item.view and item.view.is_persistent()\n        }\n        # fmt: on\n        return list(views.values())\n\n    def add_dynamic_items(self, *items: Type[DynamicItem[Item[Any]]]) -> None:\n        for item in items:\n            pattern = item.__discord_ui_compiled_template__\n            self._dynamic_items[pattern] = item\n\n    def remove_dynamic_items(self, *items: Type[DynamicItem[Item[Any]]]) -> None:\n        for item in items:\n            pattern = item.__discord_ui_compiled_template__\n            self._dynamic_items.pop(pattern, None)\n\n    def add_view(self, view: View, message_id: Optional[int] = None) -> None:\n        view._start_listening_from_store(self)\n        if view.__discord_ui_modal__:\n            self._modals[view.custom_id] = view  # type: ignore\n            return\n\n        dispatch_info = self._views.setdefault(message_id, {})\n        is_fully_dynamic = True\n        for item in view._children:\n            if isinstance(item, DynamicItem):\n                pattern = item.__discord_ui_compiled_template__\n                self._dynamic_items[pattern] = item.__class__\n            elif item.is_dispatchable():\n                dispatch_info[(item.type.value, item.custom_id)] = item  # type: ignore\n                is_fully_dynamic = False\n\n        view._cache_key = message_id\n        if message_id is not None and not is_fully_dynamic:\n            self._synced_message_views[message_id] = view\n\n    def remove_view(self, view: View) -> None:\n        if view.__discord_ui_modal__:\n            self._modals.pop(view.custom_id, None)  # type: ignore\n            return\n\n        dispatch_info = self._views.get(view._cache_key)\n        if dispatch_info:\n            for item in view._children:\n                if isinstance(item, DynamicItem):\n                    pattern = item.__discord_ui_compiled_template__\n                    self._dynamic_items.pop(pattern, None)\n                elif item.is_dispatchable():\n                    dispatch_info.pop((item.type.value, item.custom_id), None)  # type: ignore\n\n            if len(dispatch_info) == 0:\n                self._views.pop(view._cache_key, None)\n\n        self._synced_message_views.pop(view._cache_key, None)  # type: ignore\n\n    async def schedule_dynamic_item_call(\n        self,\n        component_type: int,\n        factory: Type[DynamicItem[Item[Any]]],\n        interaction: Interaction,\n        custom_id: str,\n        match: re.Match[str],\n    ) -> None:\n        if interaction.message is None:\n            return\n\n        view = View.from_message(interaction.message, timeout=None)\n\n        try:\n            base_item_index, base_item = next(\n                (index, child)\n                for index, child in enumerate(view._children)\n                if child.type.value == component_type and getattr(child, 'custom_id', None) == custom_id\n            )\n        except StopIteration:\n            return\n\n        try:\n            item = await factory.from_custom_id(interaction, base_item, match)\n        except Exception:\n            _log.exception('Ignoring exception in dynamic item creation for %r', factory)\n            return\n\n        # Swap the item in the view with our new dynamic item\n        view._children[base_item_index] = item\n        item._view = view\n        item._rendered_row = base_item._rendered_row\n        item._refresh_state(interaction, interaction.data)  # type: ignore\n\n        try:\n            allow = await item.interaction_check(interaction)\n        except Exception:\n            allow = False\n\n        if not allow:\n            return\n\n        try:\n            await item.callback(interaction)\n        except Exception:\n            _log.exception('Ignoring exception in dynamic item callback for %r', item)\n\n    def dispatch_dynamic_items(self, component_type: int, custom_id: str, interaction: Interaction) -> None:\n        for pattern, item in self._dynamic_items.items():\n            match = pattern.fullmatch(custom_id)\n            if match is not None:\n                asyncio.create_task(\n                    self.schedule_dynamic_item_call(component_type, item, interaction, custom_id, match),\n                    name=f'discord-ui-dynamic-item-{item.__name__}-{custom_id}',\n                )\n\n    def dispatch_view(self, component_type: int, custom_id: str, interaction: Interaction) -> None:\n        self.dispatch_dynamic_items(component_type, custom_id, interaction)\n        interaction_id: Optional[int] = None\n        message_id: Optional[int] = None\n        # Realistically, in a component based interaction the Interaction.message will never be None\n        # However, this guard is just in case Discord screws up somehow\n        msg = interaction.message\n        if msg is not None:\n            message_id = msg.id\n            if msg.interaction_metadata:\n                interaction_id = msg.interaction_metadata.id\n\n        key = (component_type, custom_id)\n\n        # The entity_id can either be message_id, interaction_id, or None in that priority order.\n        item: Optional[Item[View]] = None\n        if message_id is not None:\n            item = self._views.get(message_id, {}).get(key)\n\n        if item is None and interaction_id is not None:\n            try:\n                items = self._views.pop(interaction_id)\n            except KeyError:\n                item = None\n            else:\n                item = items.get(key)\n                # If we actually got the items, then these keys should probably be moved\n                # to the proper message_id instead of the interaction_id as they are now.\n                # An interaction_id is only used as a temporary stop gap for\n                # InteractionResponse.send_message so multiple view instances do not\n                # override each other.\n                # NOTE: Fix this mess if /callback endpoint ever gets proper return types\n                self._views.setdefault(message_id, {}).update(items)\n\n        if item is None:\n            # Fallback to None message_id searches in case a persistent view\n            # was added without an associated message_id\n            item = self._views.get(None, {}).get(key)\n\n        # If 3 lookups failed at this point then just discard it\n        if item is None:\n            return\n\n        # Note, at this point the View is *not* None\n        item.view._dispatch_item(item, interaction)  # type: ignore\n\n    def dispatch_modal(\n        self,\n        custom_id: str,\n        interaction: Interaction,\n        components: List[ModalSubmitComponentInteractionDataPayload],\n    ) -> None:\n        modal = self._modals.get(custom_id)\n        if modal is None:\n            _log.debug(\"Modal interaction referencing unknown custom_id %s. Discarding\", custom_id)\n            return\n\n        modal._dispatch_submit(interaction, components)\n\n    def remove_interaction_mapping(self, interaction_id: int) -> None:\n        # This is called before re-adding the view\n        self._views.pop(interaction_id, None)\n        self._synced_message_views.pop(interaction_id, None)\n\n    def is_message_tracked(self, message_id: int) -> bool:\n        return message_id in self._synced_message_views\n\n    def remove_message_tracking(self, message_id: int) -> Optional[View]:\n        return self._synced_message_views.pop(message_id, None)\n\n    def update_from_message(self, message_id: int, data: List[ComponentPayload]) -> None:\n        components: List[Component] = []\n\n        for component_data in data:\n            component = _component_factory(component_data)\n\n            if component is not None:\n                components.append(component)\n\n        # pre-req: is_message_tracked == true\n        view = self._synced_message_views[message_id]\n        view._refresh(components)\n"
  },
  {
    "path": "discord/user.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom __future__ import annotations\n\nfrom typing import Any, Dict, List, Optional, TYPE_CHECKING, Union\n\nimport discord.abc\nfrom .asset import Asset\nfrom .colour import Colour\nfrom .enums import DefaultAvatar\nfrom .flags import PublicUserFlags\nfrom .utils import snowflake_time, _bytes_to_base64_data, MISSING, _get_as_snowflake\n\nif TYPE_CHECKING:\n    from typing_extensions import Self\n\n    from datetime import datetime\n\n    from .channel import DMChannel\n    from .guild import Guild\n    from .message import Message\n    from .state import ConnectionState\n    from .types.channel import DMChannel as DMChannelPayload\n    from .types.user import PartialUser as PartialUserPayload, User as UserPayload, AvatarDecorationData\n\n\n__all__ = (\n    'User',\n    'ClientUser',\n)\n\n\nclass _UserTag:\n    __slots__ = ()\n    id: int\n\n\nclass BaseUser(_UserTag):\n    __slots__ = (\n        'name',\n        'id',\n        'discriminator',\n        'global_name',\n        '_avatar',\n        '_banner',\n        '_accent_colour',\n        'bot',\n        'system',\n        '_public_flags',\n        '_state',\n        '_avatar_decoration_data',\n    )\n\n    if TYPE_CHECKING:\n        name: str\n        id: int\n        discriminator: str\n        global_name: Optional[str]\n        bot: bool\n        system: bool\n        _state: ConnectionState\n        _avatar: Optional[str]\n        _banner: Optional[str]\n        _accent_colour: Optional[int]\n        _public_flags: int\n        _avatar_decoration_data: Optional[AvatarDecorationData]\n\n    def __init__(self, *, state: ConnectionState, data: Union[UserPayload, PartialUserPayload]) -> None:\n        self._state = state\n        self._update(data)\n\n    def __repr__(self) -> str:\n        return (\n            f\"<BaseUser id={self.id} name={self.name!r} global_name={self.global_name!r}\"\n            f\" bot={self.bot} system={self.system}>\"\n        )\n\n    def __str__(self) -> str:\n        if self.discriminator == '0':\n            return self.name\n        return f'{self.name}#{self.discriminator}'\n\n    def __eq__(self, other: object) -> bool:\n        return isinstance(other, _UserTag) and other.id == self.id\n\n    def __ne__(self, other: object) -> bool:\n        return not self.__eq__(other)\n\n    def __hash__(self) -> int:\n        return self.id >> 22\n\n    def _update(self, data: Union[UserPayload, PartialUserPayload]) -> None:\n        self.name = data['username']\n        self.id = int(data['id'])\n        self.discriminator = data['discriminator']\n        self.global_name = data.get('global_name')\n        self._avatar = data['avatar']\n        self._banner = data.get('banner', None)\n        self._accent_colour = data.get('accent_color', None)\n        self._public_flags = data.get('public_flags', 0)\n        self.bot = data.get('bot', False)\n        self.system = data.get('system', False)\n        self._avatar_decoration_data = data.get('avatar_decoration_data')\n\n    @classmethod\n    def _copy(cls, user: Self) -> Self:\n        self = cls.__new__(cls)  # bypass __init__\n\n        self.name = user.name\n        self.id = user.id\n        self.discriminator = user.discriminator\n        self.global_name = user.global_name\n        self._avatar = user._avatar\n        self._banner = user._banner\n        self._accent_colour = user._accent_colour\n        self.bot = user.bot\n        self._state = user._state\n        self._public_flags = user._public_flags\n        self._avatar_decoration_data = user._avatar_decoration_data\n\n        return self\n\n    def _to_minimal_user_json(self) -> Dict[str, Any]:\n        return {\n            'username': self.name,\n            'id': self.id,\n            'avatar': self._avatar,\n            'discriminator': self.discriminator,\n            'global_name': self.global_name,\n            'bot': self.bot,\n        }\n\n    @property\n    def public_flags(self) -> PublicUserFlags:\n        \"\"\":class:`PublicUserFlags`: The publicly available flags the user has.\"\"\"\n        return PublicUserFlags._from_value(self._public_flags)\n\n    @property\n    def avatar(self) -> Optional[Asset]:\n        \"\"\"Optional[:class:`Asset`]: Returns an :class:`Asset` for the avatar the user has.\n\n        If the user has not uploaded a global avatar, ``None`` is returned.\n        If you want the avatar that a user has displayed, consider :attr:`display_avatar`.\n        \"\"\"\n        if self._avatar is not None:\n            return Asset._from_avatar(self._state, self.id, self._avatar)\n        return None\n\n    @property\n    def default_avatar(self) -> Asset:\n        \"\"\":class:`Asset`: Returns the default avatar for a given user.\"\"\"\n        if self.discriminator == '0':\n            avatar_id = (self.id >> 22) % len(DefaultAvatar)\n        else:\n            avatar_id = int(self.discriminator) % 5\n\n        return Asset._from_default_avatar(self._state, avatar_id)\n\n    @property\n    def display_avatar(self) -> Asset:\n        \"\"\":class:`Asset`: Returns the user's display avatar.\n\n        For regular users this is just their default avatar or uploaded avatar.\n\n        .. versionadded:: 2.0\n        \"\"\"\n        return self.avatar or self.default_avatar\n\n    @property\n    def avatar_decoration(self) -> Optional[Asset]:\n        \"\"\"Optional[:class:`Asset`]: Returns an :class:`Asset` for the avatar decoration the user has.\n\n        If the user has not set an avatar decoration, ``None`` is returned.\n\n        .. versionadded:: 2.4\n        \"\"\"\n        if self._avatar_decoration_data is not None:\n            return Asset._from_avatar_decoration(self._state, self._avatar_decoration_data['asset'])\n        return None\n\n    @property\n    def avatar_decoration_sku_id(self) -> Optional[int]:\n        \"\"\"Optional[:class:`int`]: Returns the SKU ID of the avatar decoration the user has.\n\n        If the user has not set an avatar decoration, ``None`` is returned.\n\n        .. versionadded:: 2.4\n        \"\"\"\n        if self._avatar_decoration_data is not None:\n            return _get_as_snowflake(self._avatar_decoration_data, 'sku_id')\n        return None\n\n    @property\n    def banner(self) -> Optional[Asset]:\n        \"\"\"Optional[:class:`Asset`]: Returns the user's banner asset, if available.\n\n        .. versionadded:: 2.0\n\n\n        .. note::\n            This information is only available via :meth:`Client.fetch_user`.\n        \"\"\"\n        if self._banner is None:\n            return None\n        return Asset._from_user_banner(self._state, self.id, self._banner)\n\n    @property\n    def accent_colour(self) -> Optional[Colour]:\n        \"\"\"Optional[:class:`Colour`]: Returns the user's accent colour, if applicable.\n\n        A user's accent colour is only shown if they do not have a banner.\n        This will only be available if the user explicitly sets a colour.\n\n        There is an alias for this named :attr:`accent_color`.\n\n        .. versionadded:: 2.0\n\n        .. note::\n\n            This information is only available via :meth:`Client.fetch_user`.\n        \"\"\"\n        if self._accent_colour is None:\n            return None\n        return Colour(self._accent_colour)\n\n    @property\n    def accent_color(self) -> Optional[Colour]:\n        \"\"\"Optional[:class:`Colour`]: Returns the user's accent color, if applicable.\n\n        A user's accent color is only shown if they do not have a banner.\n        This will only be available if the user explicitly sets a color.\n\n        There is an alias for this named :attr:`accent_colour`.\n\n        .. versionadded:: 2.0\n\n        .. note::\n\n            This information is only available via :meth:`Client.fetch_user`.\n        \"\"\"\n        return self.accent_colour\n\n    @property\n    def colour(self) -> Colour:\n        \"\"\":class:`Colour`: A property that returns a colour denoting the rendered colour\n        for the user. This always returns :meth:`Colour.default`.\n\n        There is an alias for this named :attr:`color`.\n        \"\"\"\n        return Colour.default()\n\n    @property\n    def color(self) -> Colour:\n        \"\"\":class:`Colour`: A property that returns a color denoting the rendered color\n        for the user. This always returns :meth:`Colour.default`.\n\n        There is an alias for this named :attr:`colour`.\n        \"\"\"\n        return self.colour\n\n    @property\n    def mention(self) -> str:\n        \"\"\":class:`str`: Returns a string that allows you to mention the given user.\"\"\"\n        return f'<@{self.id}>'\n\n    @property\n    def created_at(self) -> datetime:\n        \"\"\":class:`datetime.datetime`: Returns the user's creation time in UTC.\n\n        This is when the user's Discord account was created.\n        \"\"\"\n        return snowflake_time(self.id)\n\n    @property\n    def display_name(self) -> str:\n        \"\"\":class:`str`: Returns the user's display name.\n\n        For regular users this is just their global name or their username,\n        but if they have a guild specific nickname then that\n        is returned instead.\n        \"\"\"\n        if self.global_name:\n            return self.global_name\n        return self.name\n\n    def mentioned_in(self, message: Message) -> bool:\n        \"\"\"Checks if the user is mentioned in the specified message.\n\n        Parameters\n        -----------\n        message: :class:`Message`\n            The message to check if you're mentioned in.\n\n        Returns\n        -------\n        :class:`bool`\n            Indicates if the user is mentioned in the message.\n        \"\"\"\n\n        if message.mention_everyone:\n            return True\n\n        return any(user.id == self.id for user in message.mentions)\n\n\nclass ClientUser(BaseUser):\n    \"\"\"Represents your Discord user.\n\n    .. container:: operations\n\n        .. describe:: x == y\n\n            Checks if two users are equal.\n\n        .. describe:: x != y\n\n            Checks if two users are not equal.\n\n        .. describe:: hash(x)\n\n            Return the user's hash.\n\n        .. describe:: str(x)\n\n            Returns the user's handle (e.g. ``name`` or ``name#discriminator``).\n\n    Attributes\n    -----------\n    name: :class:`str`\n        The user's username.\n    id: :class:`int`\n        The user's unique ID.\n    discriminator: :class:`str`\n        The user's discriminator. This is a legacy concept that is no longer used.\n    global_name: Optional[:class:`str`]\n        The user's global nickname, taking precedence over the username in display.\n\n        .. versionadded:: 2.3\n    bot: :class:`bool`\n        Specifies if the user is a bot account.\n    system: :class:`bool`\n        Specifies if the user is a system user (i.e. represents Discord officially).\n\n        .. versionadded:: 1.3\n\n    verified: :class:`bool`\n        Specifies if the user's email is verified.\n    locale: Optional[:class:`str`]\n        The IETF language tag used to identify the language the user is using.\n    mfa_enabled: :class:`bool`\n        Specifies if the user has MFA turned on and working.\n    \"\"\"\n\n    __slots__ = ('locale', '_flags', 'verified', 'mfa_enabled', '__weakref__')\n\n    if TYPE_CHECKING:\n        verified: bool\n        locale: Optional[str]\n        mfa_enabled: bool\n        _flags: int\n\n    def __init__(self, *, state: ConnectionState, data: UserPayload) -> None:\n        super().__init__(state=state, data=data)\n\n    def __repr__(self) -> str:\n        return (\n            f'<ClientUser id={self.id} name={self.name!r} global_name={self.global_name!r}'\n            f' bot={self.bot} verified={self.verified} mfa_enabled={self.mfa_enabled}>'\n        )\n\n    def _update(self, data: UserPayload) -> None:\n        super()._update(data)\n        # There's actually an Optional[str] phone field as well but I won't use it\n        self.verified = data.get('verified', False)\n        self.locale = data.get('locale')\n        self._flags = data.get('flags', 0)\n        self.mfa_enabled = data.get('mfa_enabled', False)\n\n    async def edit(\n        self, *, username: str = MISSING, avatar: Optional[bytes] = MISSING, banner: Optional[bytes] = MISSING\n    ) -> ClientUser:\n        \"\"\"|coro|\n\n        Edits the current profile of the client.\n\n        .. note::\n\n            To upload an avatar, a :term:`py:bytes-like object` must be passed in that\n            represents the image being uploaded. If this is done through a file\n            then the file must be opened via ``open('some_filename', 'rb')`` and\n            the :term:`py:bytes-like object` is given through the use of ``fp.read()``.\n\n\n        .. versionchanged:: 2.0\n            The edit is no longer in-place, instead the newly edited client user is returned.\n\n        .. versionchanged:: 2.0\n            This function will now raise :exc:`ValueError` instead of\n            ``InvalidArgument``.\n\n        Parameters\n        -----------\n        username: :class:`str`\n            The new username you wish to change to.\n        avatar: Optional[:class:`bytes`]\n            A :term:`py:bytes-like object` representing the image to upload.\n            Could be ``None`` to denote no avatar.\n            Only image formats supported for uploading are JPEG, PNG, GIF, and WEBP.\n        banner: Optional[:class:`bytes`]\n            A :term:`py:bytes-like object` representing the image to upload.\n            Could be ``None`` to denote no banner.\n            Only image formats supported for uploading are JPEG, PNG, GIF and WEBP.\n\n            .. versionadded:: 2.4\n\n        Raises\n        ------\n        HTTPException\n            Editing your profile failed.\n        ValueError\n            Wrong image format passed for ``avatar``.\n\n        Returns\n        ---------\n        :class:`ClientUser`\n            The newly edited client user.\n        \"\"\"\n        payload: Dict[str, Any] = {}\n        if username is not MISSING:\n            payload['username'] = username\n\n        if avatar is not MISSING:\n            if avatar is not None:\n                payload['avatar'] = _bytes_to_base64_data(avatar)\n            else:\n                payload['avatar'] = None\n\n        if banner is not MISSING:\n            if banner is not None:\n                payload['banner'] = _bytes_to_base64_data(banner)\n            else:\n                payload['banner'] = None\n\n        data: UserPayload = await self._state.http.edit_profile(payload)\n        return ClientUser(state=self._state, data=data)\n\n    @property\n    def mutual_guilds(self) -> List[Guild]:\n        \"\"\"List[:class:`Guild`]: The guilds that the user shares with the client.\n\n        .. note::\n\n            This will only return mutual guilds within the client's internal cache.\n\n        .. versionadded:: 1.7\n        \"\"\"\n        return list(self._state.guilds)\n\n\nclass User(BaseUser, discord.abc.Messageable):\n    \"\"\"Represents a Discord user.\n\n    .. container:: operations\n\n        .. describe:: x == y\n\n            Checks if two users are equal.\n\n        .. describe:: x != y\n\n            Checks if two users are not equal.\n\n        .. describe:: hash(x)\n\n            Return the user's hash.\n\n        .. describe:: str(x)\n\n            Returns the user's handle (e.g. ``name`` or ``name#discriminator``).\n\n    Attributes\n    -----------\n    name: :class:`str`\n        The user's username.\n    id: :class:`int`\n        The user's unique ID.\n    discriminator: :class:`str`\n        The user's discriminator. This is a legacy concept that is no longer used.\n    global_name: Optional[:class:`str`]\n        The user's global nickname, taking precedence over the username in display.\n\n        .. versionadded:: 2.3\n    bot: :class:`bool`\n        Specifies if the user is a bot account.\n    system: :class:`bool`\n        Specifies if the user is a system user (i.e. represents Discord officially).\n    \"\"\"\n\n    __slots__ = ('__weakref__',)\n\n    def __repr__(self) -> str:\n        return f'<User id={self.id} name={self.name!r} global_name={self.global_name!r} bot={self.bot}>'\n\n    async def _get_channel(self) -> DMChannel:\n        ch = await self.create_dm()\n        return ch\n\n    @property\n    def dm_channel(self) -> Optional[DMChannel]:\n        \"\"\"Optional[:class:`DMChannel`]: Returns the channel associated with this user if it exists.\n\n        If this returns ``None``, you can create a DM channel by calling the\n        :meth:`create_dm` coroutine function.\n        \"\"\"\n        return self._state._get_private_channel_by_user(self.id)\n\n    @property\n    def mutual_guilds(self) -> List[Guild]:\n        \"\"\"List[:class:`Guild`]: The guilds that the user shares with the client.\n\n        .. note::\n\n            This will only return mutual guilds within the client's internal cache.\n\n        .. versionadded:: 1.7\n        \"\"\"\n        return [guild for guild in self._state._guilds.values() if guild.get_member(self.id)]\n\n    async def create_dm(self) -> DMChannel:\n        \"\"\"|coro|\n\n        Creates a :class:`DMChannel` with this user.\n\n        This should be rarely called, as this is done transparently for most\n        people.\n\n        Returns\n        -------\n        :class:`.DMChannel`\n            The channel that was created.\n        \"\"\"\n        found = self.dm_channel\n        if found is not None:\n            return found\n\n        state = self._state\n        data: DMChannelPayload = await state.http.start_private_message(self.id)\n        return state.add_dm_channel(data)\n"
  },
  {
    "path": "discord/utils.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\nfrom __future__ import annotations\n\nimport array\nimport asyncio\nfrom textwrap import TextWrapper\nfrom typing import (\n    Any,\n    AsyncIterable,\n    AsyncIterator,\n    Awaitable,\n    Callable,\n    Collection,\n    Coroutine,\n    Dict,\n    ForwardRef,\n    Generic,\n    Iterable,\n    Iterator,\n    List,\n    Literal,\n    Mapping,\n    NamedTuple,\n    Optional,\n    Protocol,\n    Set,\n    Sequence,\n    SupportsIndex,\n    Tuple,\n    Type,\n    TypeVar,\n    Union,\n    overload,\n    TYPE_CHECKING,\n)\nimport unicodedata\nfrom base64 import b64encode, b64decode\nfrom bisect import bisect_left\nimport datetime\nimport functools\nfrom inspect import isawaitable as _isawaitable, signature as _signature\nfrom operator import attrgetter\nfrom urllib.parse import urlencode\nimport json\nimport re\nimport os\nimport sys\nimport types\nimport typing\nimport warnings\nimport logging\n\nimport yarl\n\ntry:\n    import orjson  # type: ignore\nexcept ModuleNotFoundError:\n    HAS_ORJSON = False\nelse:\n    HAS_ORJSON = True\n\n\n__all__ = (\n    'oauth_url',\n    'snowflake_time',\n    'time_snowflake',\n    'find',\n    'get',\n    'sleep_until',\n    'utcnow',\n    'remove_markdown',\n    'escape_markdown',\n    'escape_mentions',\n    'maybe_coroutine',\n    'as_chunks',\n    'format_dt',\n    'MISSING',\n    'setup_logging',\n)\n\nDISCORD_EPOCH = 1420070400000\nDEFAULT_FILE_SIZE_LIMIT_BYTES = 26214400\n\n\nclass _MissingSentinel:\n    __slots__ = ()\n\n    def __eq__(self, other) -> bool:\n        return False\n\n    def __bool__(self) -> bool:\n        return False\n\n    def __hash__(self) -> int:\n        return 0\n\n    def __repr__(self):\n        return '...'\n\n\nMISSING: Any = _MissingSentinel()\n\n\nclass _cached_property:\n    def __init__(self, function) -> None:\n        self.function = function\n        self.__doc__ = getattr(function, '__doc__')\n\n    def __get__(self, instance, owner):\n        if instance is None:\n            return self\n\n        value = self.function(instance)\n        setattr(instance, self.function.__name__, value)\n\n        return value\n\n\nif TYPE_CHECKING:\n    from functools import cached_property as cached_property\n\n    from typing_extensions import ParamSpec, Self, TypeGuard\n\n    from .permissions import Permissions\n    from .abc import Snowflake\n    from .invite import Invite\n    from .template import Template\n\n    class _RequestLike(Protocol):\n        headers: Mapping[str, Any]\n\n    P = ParamSpec('P')\n\n    MaybeAwaitableFunc = Callable[P, 'MaybeAwaitable[T]']\n\n    _SnowflakeListBase = array.array[int]\n\nelse:\n    cached_property = _cached_property\n    _SnowflakeListBase = array.array\n\n\nT = TypeVar('T')\nT_co = TypeVar('T_co', covariant=True)\n_Iter = Union[Iterable[T], AsyncIterable[T]]\nCoro = Coroutine[Any, Any, T]\nMaybeAwaitable = Union[T, Awaitable[T]]\n\n\nclass CachedSlotProperty(Generic[T, T_co]):\n    def __init__(self, name: str, function: Callable[[T], T_co]) -> None:\n        self.name = name\n        self.function = function\n        self.__doc__ = getattr(function, '__doc__')\n\n    @overload\n    def __get__(self, instance: None, owner: Type[T]) -> CachedSlotProperty[T, T_co]:\n        ...\n\n    @overload\n    def __get__(self, instance: T, owner: Type[T]) -> T_co:\n        ...\n\n    def __get__(self, instance: Optional[T], owner: Type[T]) -> Any:\n        if instance is None:\n            return self\n\n        try:\n            return getattr(instance, self.name)\n        except AttributeError:\n            value = self.function(instance)\n            setattr(instance, self.name, value)\n            return value\n\n\nclass classproperty(Generic[T_co]):\n    def __init__(self, fget: Callable[[Any], T_co]) -> None:\n        self.fget = fget\n\n    def __get__(self, instance: Optional[Any], owner: Type[Any]) -> T_co:\n        return self.fget(owner)\n\n    def __set__(self, instance: Optional[Any], value: Any) -> None:\n        raise AttributeError('cannot set attribute')\n\n\ndef cached_slot_property(name: str) -> Callable[[Callable[[T], T_co]], CachedSlotProperty[T, T_co]]:\n    def decorator(func: Callable[[T], T_co]) -> CachedSlotProperty[T, T_co]:\n        return CachedSlotProperty(name, func)\n\n    return decorator\n\n\nclass SequenceProxy(Sequence[T_co]):\n    \"\"\"A proxy of a sequence that only creates a copy when necessary.\"\"\"\n\n    def __init__(self, proxied: Collection[T_co], *, sorted: bool = False):\n        self.__proxied: Collection[T_co] = proxied\n        self.__sorted: bool = sorted\n\n    @cached_property\n    def __copied(self) -> List[T_co]:\n        if self.__sorted:\n            # The type checker thinks the variance is wrong, probably due to the comparison requirements\n            self.__proxied = sorted(self.__proxied)  # type: ignore\n        else:\n            self.__proxied = list(self.__proxied)\n        return self.__proxied\n\n    def __repr__(self) -> str:\n        return f\"SequenceProxy({self.__proxied!r})\"\n\n    @overload\n    def __getitem__(self, idx: SupportsIndex) -> T_co:\n        ...\n\n    @overload\n    def __getitem__(self, idx: slice) -> List[T_co]:\n        ...\n\n    def __getitem__(self, idx: Union[SupportsIndex, slice]) -> Union[T_co, List[T_co]]:\n        return self.__copied[idx]\n\n    def __len__(self) -> int:\n        return len(self.__proxied)\n\n    def __contains__(self, item: Any) -> bool:\n        return item in self.__copied\n\n    def __iter__(self) -> Iterator[T_co]:\n        return iter(self.__copied)\n\n    def __reversed__(self) -> Iterator[T_co]:\n        return reversed(self.__copied)\n\n    def index(self, value: Any, *args: Any, **kwargs: Any) -> int:\n        return self.__copied.index(value, *args, **kwargs)\n\n    def count(self, value: Any) -> int:\n        return self.__copied.count(value)\n\n\n@overload\ndef parse_time(timestamp: None) -> None:\n    ...\n\n\n@overload\ndef parse_time(timestamp: str) -> datetime.datetime:\n    ...\n\n\n@overload\ndef parse_time(timestamp: Optional[str]) -> Optional[datetime.datetime]:\n    ...\n\n\ndef parse_time(timestamp: Optional[str]) -> Optional[datetime.datetime]:\n    if timestamp:\n        return datetime.datetime.fromisoformat(timestamp)\n    return None\n\n\ndef copy_doc(original: Callable[..., Any]) -> Callable[[T], T]:\n    def decorator(overridden: T) -> T:\n        overridden.__doc__ = original.__doc__\n        overridden.__signature__ = _signature(original)  # type: ignore\n        return overridden\n\n    return decorator\n\n\ndef deprecated(instead: Optional[str] = None) -> Callable[[Callable[P, T]], Callable[P, T]]:\n    def actual_decorator(func: Callable[P, T]) -> Callable[P, T]:\n        @functools.wraps(func)\n        def decorated(*args: P.args, **kwargs: P.kwargs) -> T:\n            warnings.simplefilter('always', DeprecationWarning)  # turn off filter\n            if instead:\n                fmt = \"{0.__name__} is deprecated, use {1} instead.\"\n            else:\n                fmt = '{0.__name__} is deprecated.'\n\n            warnings.warn(fmt.format(func, instead), stacklevel=3, category=DeprecationWarning)\n            warnings.simplefilter('default', DeprecationWarning)  # reset filter\n            return func(*args, **kwargs)\n\n        return decorated\n\n    return actual_decorator\n\n\ndef oauth_url(\n    client_id: Union[int, str],\n    *,\n    permissions: Permissions = MISSING,\n    guild: Snowflake = MISSING,\n    redirect_uri: str = MISSING,\n    scopes: Iterable[str] = MISSING,\n    disable_guild_select: bool = False,\n    state: str = MISSING,\n) -> str:\n    \"\"\"A helper function that returns the OAuth2 URL for inviting the bot\n    into guilds.\n\n    .. versionchanged:: 2.0\n\n        ``permissions``, ``guild``, ``redirect_uri``, ``scopes`` and ``state`` parameters\n        are now keyword-only.\n\n    Parameters\n    -----------\n    client_id: Union[:class:`int`, :class:`str`]\n        The client ID for your bot.\n    permissions: :class:`~discord.Permissions`\n        The permissions you're requesting. If not given then you won't be requesting any\n        permissions.\n    guild: :class:`~discord.abc.Snowflake`\n        The guild to pre-select in the authorization screen, if available.\n    redirect_uri: :class:`str`\n        An optional valid redirect URI.\n    scopes: Iterable[:class:`str`]\n        An optional valid list of scopes. Defaults to ``('bot', 'applications.commands')``.\n\n        .. versionadded:: 1.7\n    disable_guild_select: :class:`bool`\n        Whether to disallow the user from changing the guild dropdown.\n\n        .. versionadded:: 2.0\n    state: :class:`str`\n        The state to return after the authorization.\n\n        .. versionadded:: 2.0\n\n    Returns\n    --------\n    :class:`str`\n        The OAuth2 URL for inviting the bot into guilds.\n    \"\"\"\n    url = f'https://discord.com/oauth2/authorize?client_id={client_id}'\n    url += '&scope=' + '+'.join(scopes or ('bot', 'applications.commands'))\n    if permissions is not MISSING:\n        url += f'&permissions={permissions.value}'\n    if guild is not MISSING:\n        url += f'&guild_id={guild.id}'\n    if disable_guild_select:\n        url += '&disable_guild_select=true'\n    if redirect_uri is not MISSING:\n        url += '&response_type=code&' + urlencode({'redirect_uri': redirect_uri})\n    if state is not MISSING:\n        url += f'&{urlencode({\"state\": state})}'\n    return url\n\n\ndef snowflake_time(id: int, /) -> datetime.datetime:\n    \"\"\"Returns the creation time of the given snowflake.\n\n    .. versionchanged:: 2.0\n        The ``id`` parameter is now positional-only.\n\n    Parameters\n    -----------\n    id: :class:`int`\n        The snowflake ID.\n\n    Returns\n    --------\n    :class:`datetime.datetime`\n        An aware datetime in UTC representing the creation time of the snowflake.\n    \"\"\"\n    timestamp = ((id >> 22) + DISCORD_EPOCH) / 1000\n    return datetime.datetime.fromtimestamp(timestamp, tz=datetime.timezone.utc)\n\n\ndef time_snowflake(dt: datetime.datetime, /, *, high: bool = False) -> int:\n    \"\"\"Returns a numeric snowflake pretending to be created at the given date.\n\n    When using as the lower end of a range, use ``time_snowflake(dt, high=False) - 1``\n    to be inclusive, ``high=True`` to be exclusive.\n\n    When using as the higher end of a range, use ``time_snowflake(dt, high=True) + 1``\n    to be inclusive, ``high=False`` to be exclusive.\n\n    .. versionchanged:: 2.0\n        The ``high`` parameter is now keyword-only and the ``dt`` parameter is now\n        positional-only.\n\n    Parameters\n    -----------\n    dt: :class:`datetime.datetime`\n        A datetime object to convert to a snowflake.\n        If naive, the timezone is assumed to be local time.\n    high: :class:`bool`\n        Whether or not to set the lower 22 bit to high or low.\n\n    Returns\n    --------\n    :class:`int`\n        The snowflake representing the time given.\n    \"\"\"\n    discord_millis = int(dt.timestamp() * 1000 - DISCORD_EPOCH)\n    return (discord_millis << 22) + (2**22 - 1 if high else 0)\n\n\ndef _find(predicate: Callable[[T], Any], iterable: Iterable[T], /) -> Optional[T]:\n    return next((element for element in iterable if predicate(element)), None)\n\n\nasync def _afind(predicate: Callable[[T], Any], iterable: AsyncIterable[T], /) -> Optional[T]:\n    async for element in iterable:\n        if predicate(element):\n            return element\n\n    return None\n\n\n@overload\ndef find(predicate: Callable[[T], Any], iterable: AsyncIterable[T], /) -> Coro[Optional[T]]:\n    ...\n\n\n@overload\ndef find(predicate: Callable[[T], Any], iterable: Iterable[T], /) -> Optional[T]:\n    ...\n\n\ndef find(predicate: Callable[[T], Any], iterable: _Iter[T], /) -> Union[Optional[T], Coro[Optional[T]]]:\n    r\"\"\"A helper to return the first element found in the sequence\n    that meets the predicate. For example: ::\n\n        member = discord.utils.find(lambda m: m.name == 'Mighty', channel.guild.members)\n\n    would find the first :class:`~discord.Member` whose name is 'Mighty' and return it.\n    If an entry is not found, then ``None`` is returned.\n\n    This is different from :func:`py:filter` due to the fact it stops the moment it finds\n    a valid entry.\n\n    .. versionchanged:: 2.0\n\n        Both parameters are now positional-only.\n\n    .. versionchanged:: 2.0\n\n        The ``iterable`` parameter supports :term:`asynchronous iterable`\\s.\n\n    Parameters\n    -----------\n    predicate\n        A function that returns a boolean-like result.\n    iterable: Union[:class:`collections.abc.Iterable`, :class:`collections.abc.AsyncIterable`]\n        The iterable to search through. Using a :class:`collections.abc.AsyncIterable`,\n        makes this function return a :term:`coroutine`.\n    \"\"\"\n\n    return (\n        _afind(predicate, iterable)  # type: ignore\n        if hasattr(iterable, '__aiter__')  # isinstance(iterable, collections.abc.AsyncIterable) is too slow\n        else _find(predicate, iterable)  # type: ignore\n    )\n\n\ndef _get(iterable: Iterable[T], /, **attrs: Any) -> Optional[T]:\n    # global -> local\n    _all = all\n    attrget = attrgetter\n\n    # Special case the single element call\n    if len(attrs) == 1:\n        k, v = attrs.popitem()\n        pred = attrget(k.replace('__', '.'))\n        return next((elem for elem in iterable if pred(elem) == v), None)\n\n    converted = [(attrget(attr.replace('__', '.')), value) for attr, value in attrs.items()]\n    for elem in iterable:\n        if _all(pred(elem) == value for pred, value in converted):\n            return elem\n    return None\n\n\nasync def _aget(iterable: AsyncIterable[T], /, **attrs: Any) -> Optional[T]:\n    # global -> local\n    _all = all\n    attrget = attrgetter\n\n    # Special case the single element call\n    if len(attrs) == 1:\n        k, v = attrs.popitem()\n        pred = attrget(k.replace('__', '.'))\n        async for elem in iterable:\n            if pred(elem) == v:\n                return elem\n        return None\n\n    converted = [(attrget(attr.replace('__', '.')), value) for attr, value in attrs.items()]\n\n    async for elem in iterable:\n        if _all(pred(elem) == value for pred, value in converted):\n            return elem\n    return None\n\n\n@overload\ndef get(iterable: AsyncIterable[T], /, **attrs: Any) -> Coro[Optional[T]]:\n    ...\n\n\n@overload\ndef get(iterable: Iterable[T], /, **attrs: Any) -> Optional[T]:\n    ...\n\n\ndef get(iterable: _Iter[T], /, **attrs: Any) -> Union[Optional[T], Coro[Optional[T]]]:\n    r\"\"\"A helper that returns the first element in the iterable that meets\n    all the traits passed in ``attrs``. This is an alternative for\n    :func:`~discord.utils.find`.\n\n    When multiple attributes are specified, they are checked using\n    logical AND, not logical OR. Meaning they have to meet every\n    attribute passed in and not one of them.\n\n    To have a nested attribute search (i.e. search by ``x.y``) then\n    pass in ``x__y`` as the keyword argument.\n\n    If nothing is found that matches the attributes passed, then\n    ``None`` is returned.\n\n    .. versionchanged:: 2.0\n\n        The ``iterable`` parameter is now positional-only.\n\n    .. versionchanged:: 2.0\n\n        The ``iterable`` parameter supports :term:`asynchronous iterable`\\s.\n\n    Examples\n    ---------\n\n    Basic usage:\n\n    .. code-block:: python3\n\n        member = discord.utils.get(message.guild.members, name='Foo')\n\n    Multiple attribute matching:\n\n    .. code-block:: python3\n\n        channel = discord.utils.get(guild.voice_channels, name='Foo', bitrate=64000)\n\n    Nested attribute matching:\n\n    .. code-block:: python3\n\n        channel = discord.utils.get(client.get_all_channels(), guild__name='Cool', name='general')\n\n    Async iterables:\n\n    .. code-block:: python3\n\n        msg = await discord.utils.get(channel.history(), author__name='Dave')\n\n    Parameters\n    -----------\n    iterable: Union[:class:`collections.abc.Iterable`, :class:`collections.abc.AsyncIterable`]\n        The iterable to search through. Using a :class:`collections.abc.AsyncIterable`,\n        makes this function return a :term:`coroutine`.\n    \\*\\*attrs\n        Keyword arguments that denote attributes to search with.\n    \"\"\"\n\n    return (\n        _aget(iterable, **attrs)  # type: ignore\n        if hasattr(iterable, '__aiter__')  # isinstance(iterable, collections.abc.AsyncIterable) is too slow\n        else _get(iterable, **attrs)  # type: ignore\n    )\n\n\ndef _unique(iterable: Iterable[T]) -> List[T]:\n    return [x for x in dict.fromkeys(iterable)]\n\n\ndef _get_as_snowflake(data: Any, key: str) -> Optional[int]:\n    try:\n        value = data[key]\n    except KeyError:\n        return None\n    else:\n        return value and int(value)\n\n\ndef _get_mime_type_for_image(data: bytes):\n    if data.startswith(b'\\x89\\x50\\x4E\\x47\\x0D\\x0A\\x1A\\x0A'):\n        return 'image/png'\n    elif data[0:3] == b'\\xff\\xd8\\xff' or data[6:10] in (b'JFIF', b'Exif'):\n        return 'image/jpeg'\n    elif data.startswith((b'\\x47\\x49\\x46\\x38\\x37\\x61', b'\\x47\\x49\\x46\\x38\\x39\\x61')):\n        return 'image/gif'\n    elif data.startswith(b'RIFF') and data[8:12] == b'WEBP':\n        return 'image/webp'\n    else:\n        raise ValueError('Unsupported image type given')\n\n\ndef _bytes_to_base64_data(data: bytes) -> str:\n    fmt = 'data:{mime};base64,{data}'\n    mime = _get_mime_type_for_image(data)\n    b64 = b64encode(data).decode('ascii')\n    return fmt.format(mime=mime, data=b64)\n\n\ndef _base64_to_bytes(data: str) -> bytes:\n    return b64decode(data.encode('ascii'))\n\n\ndef _is_submodule(parent: str, child: str) -> bool:\n    return parent == child or child.startswith(parent + '.')\n\n\nif HAS_ORJSON:\n\n    def _to_json(obj: Any) -> str:\n        return orjson.dumps(obj).decode('utf-8')\n\n    _from_json = orjson.loads  # type: ignore\n\nelse:\n\n    def _to_json(obj: Any) -> str:\n        return json.dumps(obj, separators=(',', ':'), ensure_ascii=True)\n\n    _from_json = json.loads\n\n\ndef _parse_ratelimit_header(request: Any, *, use_clock: bool = False) -> float:\n    reset_after: Optional[str] = request.headers.get('X-Ratelimit-Reset-After')\n    if use_clock or not reset_after:\n        utc = datetime.timezone.utc\n        now = datetime.datetime.now(utc)\n        reset = datetime.datetime.fromtimestamp(float(request.headers['X-Ratelimit-Reset']), utc)\n        return (reset - now).total_seconds()\n    else:\n        return float(reset_after)\n\n\nasync def maybe_coroutine(f: MaybeAwaitableFunc[P, T], *args: P.args, **kwargs: P.kwargs) -> T:\n    r\"\"\"|coro|\n\n    A helper function that will await the result of a function if it's a coroutine\n    or return the result if it's not.\n\n    This is useful for functions that may or may not be coroutines.\n\n    .. versionadded:: 2.2\n\n    Parameters\n    -----------\n    f: Callable[..., Any]\n        The function or coroutine to call.\n    \\*args\n        The arguments to pass to the function.\n    \\*\\*kwargs\n        The keyword arguments to pass to the function.\n\n    Returns\n    --------\n    Any\n        The result of the function or coroutine.\n    \"\"\"\n\n    value = f(*args, **kwargs)\n    if _isawaitable(value):\n        return await value\n    else:\n        return value  # type: ignore\n\n\nasync def async_all(\n    gen: Iterable[Union[T, Awaitable[T]]],\n    *,\n    check: Callable[[Union[T, Awaitable[T]]], TypeGuard[Awaitable[T]]] = _isawaitable,\n) -> bool:\n    for elem in gen:\n        if check(elem):\n            elem = await elem\n        if not elem:\n            return False\n    return True\n\n\nasync def sane_wait_for(futures: Iterable[Awaitable[T]], *, timeout: Optional[float]) -> Set[asyncio.Task[T]]:\n    ensured = [asyncio.ensure_future(fut) for fut in futures]\n    done, pending = await asyncio.wait(ensured, timeout=timeout, return_when=asyncio.ALL_COMPLETED)\n\n    if len(pending) != 0:\n        raise asyncio.TimeoutError()\n\n    return done\n\n\ndef get_slots(cls: Type[Any]) -> Iterator[str]:\n    for mro in reversed(cls.__mro__):\n        try:\n            yield from mro.__slots__\n        except AttributeError:\n            continue\n\n\ndef compute_timedelta(dt: datetime.datetime) -> float:\n    if dt.tzinfo is None:\n        dt = dt.astimezone()\n    now = datetime.datetime.now(datetime.timezone.utc)\n    return max((dt - now).total_seconds(), 0)\n\n\n@overload\nasync def sleep_until(when: datetime.datetime, result: T) -> T:\n    ...\n\n\n@overload\nasync def sleep_until(when: datetime.datetime) -> None:\n    ...\n\n\nasync def sleep_until(when: datetime.datetime, result: Optional[T] = None) -> Optional[T]:\n    \"\"\"|coro|\n\n    Sleep until a specified time.\n\n    If the time supplied is in the past this function will yield instantly.\n\n    .. versionadded:: 1.3\n\n    Parameters\n    -----------\n    when: :class:`datetime.datetime`\n        The timestamp in which to sleep until. If the datetime is naive then\n        it is assumed to be local time.\n    result: Any\n        If provided is returned to the caller when the coroutine completes.\n    \"\"\"\n    delta = compute_timedelta(when)\n    return await asyncio.sleep(delta, result)\n\n\ndef utcnow() -> datetime.datetime:\n    \"\"\"A helper function to return an aware UTC datetime representing the current time.\n\n    This should be preferred to :meth:`datetime.datetime.utcnow` since it is an aware\n    datetime, compared to the naive datetime in the standard library.\n\n    .. versionadded:: 2.0\n\n    Returns\n    --------\n    :class:`datetime.datetime`\n        The current aware datetime in UTC.\n    \"\"\"\n    return datetime.datetime.now(datetime.timezone.utc)\n\n\ndef valid_icon_size(size: int) -> bool:\n    \"\"\"Icons must be power of 2 within [16, 4096].\"\"\"\n    return not size & (size - 1) and 4096 >= size >= 16\n\n\nclass SnowflakeList(_SnowflakeListBase):\n    \"\"\"Internal data storage class to efficiently store a list of snowflakes.\n\n    This should have the following characteristics:\n\n    - Low memory usage\n    - O(n) iteration (obviously)\n    - O(n log n) initial creation if data is unsorted\n    - O(log n) search and indexing\n    - O(n) insertion\n    \"\"\"\n\n    __slots__ = ()\n\n    if TYPE_CHECKING:\n\n        def __init__(self, data: Iterable[int], *, is_sorted: bool = False):\n            ...\n\n    def __new__(cls, data: Iterable[int], *, is_sorted: bool = False) -> Self:\n        return array.array.__new__(cls, 'Q', data if is_sorted else sorted(data))  # type: ignore\n\n    def add(self, element: int) -> None:\n        i = bisect_left(self, element)\n        self.insert(i, element)\n\n    def get(self, element: int) -> Optional[int]:\n        i = bisect_left(self, element)\n        return self[i] if i != len(self) and self[i] == element else None\n\n    def has(self, element: int) -> bool:\n        i = bisect_left(self, element)\n        return i != len(self) and self[i] == element\n\n\ndef _string_width(string: str) -> int:\n    \"\"\"Returns string's width.\"\"\"\n    if string.isascii():\n        return len(string)\n\n    UNICODE_WIDE_CHAR_TYPE = 'WFA'\n    func = unicodedata.east_asian_width\n    return sum(2 if func(char) in UNICODE_WIDE_CHAR_TYPE else 1 for char in string)\n\n\nclass ResolvedInvite(NamedTuple):\n    code: str\n    event: Optional[int]\n\n\ndef resolve_invite(invite: Union[Invite, str]) -> ResolvedInvite:\n    \"\"\"Resolves an invite from a :class:`~discord.Invite`, URL or code.\n\n    .. versionchanged:: 2.0\n        Now returns a :class:`.ResolvedInvite` instead of a\n        :class:`str`.\n\n    Parameters\n    -----------\n    invite: Union[:class:`~discord.Invite`, :class:`str`]\n        The invite.\n\n    Returns\n    --------\n    :class:`.ResolvedInvite`\n        A data class containing the invite code and the event ID.\n    \"\"\"\n    from .invite import Invite  # circular import\n\n    if isinstance(invite, Invite):\n        return ResolvedInvite(invite.code, invite.scheduled_event_id)\n    else:\n        rx = r'(?:https?\\:\\/\\/)?discord(?:\\.gg|(?:app)?\\.com\\/invite)\\/[^/]+'\n        m = re.match(rx, invite)\n\n        if m:\n            url = yarl.URL(invite)\n            code = url.parts[-1]\n            event_id = url.query.get('event')\n\n            return ResolvedInvite(code, int(event_id) if event_id else None)\n    return ResolvedInvite(invite, None)\n\n\ndef resolve_template(code: Union[Template, str]) -> str:\n    \"\"\"\n    Resolves a template code from a :class:`~discord.Template`, URL or code.\n\n    .. versionadded:: 1.4\n\n    Parameters\n    -----------\n    code: Union[:class:`~discord.Template`, :class:`str`]\n        The code.\n\n    Returns\n    --------\n    :class:`str`\n        The template code.\n    \"\"\"\n    from .template import Template  # circular import\n\n    if isinstance(code, Template):\n        return code.code\n    else:\n        rx = r'(?:https?\\:\\/\\/)?discord(?:\\.new|(?:app)?\\.com\\/template)\\/(.+)'\n        m = re.match(rx, code)\n        if m:\n            return m.group(1)\n    return code\n\n\n_MARKDOWN_ESCAPE_SUBREGEX = '|'.join(r'\\{0}(?=([\\s\\S]*((?<!\\{0})\\{0})))'.format(c) for c in ('*', '`', '_', '~', '|'))\n\n_MARKDOWN_ESCAPE_COMMON = r'^>(?:>>)?\\s|\\[.+\\]\\(.+\\)|^#{1,3}|^\\s*-'\n\n_MARKDOWN_ESCAPE_REGEX = re.compile(fr'(?P<markdown>{_MARKDOWN_ESCAPE_SUBREGEX}|{_MARKDOWN_ESCAPE_COMMON})', re.MULTILINE)\n\n_URL_REGEX = r'(?P<url><[^: >]+:\\/[^ >]+>|(?:https?|steam):\\/\\/[^\\s<]+[^<.,:;\\\"\\'\\]\\s])'\n\n_MARKDOWN_STOCK_REGEX = fr'(?P<markdown>[_\\\\~|\\*`]|{_MARKDOWN_ESCAPE_COMMON})'\n\n\ndef remove_markdown(text: str, *, ignore_links: bool = True) -> str:\n    \"\"\"A helper function that removes markdown characters.\n\n    .. versionadded:: 1.7\n\n    .. note::\n            This function is not markdown aware and may remove meaning from the original text. For example,\n            if the input contains ``10 * 5`` then it will be converted into ``10  5``.\n\n    Parameters\n    -----------\n    text: :class:`str`\n        The text to remove markdown from.\n    ignore_links: :class:`bool`\n        Whether to leave links alone when removing markdown. For example,\n        if a URL in the text contains characters such as ``_`` then it will\n        be left alone. Defaults to ``True``.\n\n    Returns\n    --------\n    :class:`str`\n        The text with the markdown special characters removed.\n    \"\"\"\n\n    def replacement(match: re.Match[str]) -> str:\n        groupdict = match.groupdict()\n        return groupdict.get('url', '')\n\n    regex = _MARKDOWN_STOCK_REGEX\n    if ignore_links:\n        regex = f'(?:{_URL_REGEX}|{regex})'\n    return re.sub(regex, replacement, text, 0, re.MULTILINE)\n\n\ndef escape_markdown(text: str, *, as_needed: bool = False, ignore_links: bool = True) -> str:\n    r\"\"\"A helper function that escapes Discord's markdown.\n\n    Parameters\n    -----------\n    text: :class:`str`\n        The text to escape markdown from.\n    as_needed: :class:`bool`\n        Whether to escape the markdown characters as needed. This\n        means that it does not escape extraneous characters if it's\n        not necessary, e.g. ``**hello**`` is escaped into ``\\*\\*hello**``\n        instead of ``\\*\\*hello\\*\\*``. Note however that this can open\n        you up to some clever syntax abuse. Defaults to ``False``.\n    ignore_links: :class:`bool`\n        Whether to leave links alone when escaping markdown. For example,\n        if a URL in the text contains characters such as ``_`` then it will\n        be left alone. This option is not supported with ``as_needed``.\n        Defaults to ``True``.\n\n    Returns\n    --------\n    :class:`str`\n        The text with the markdown special characters escaped with a slash.\n    \"\"\"\n\n    if not as_needed:\n\n        def replacement(match):\n            groupdict = match.groupdict()\n            is_url = groupdict.get('url')\n            if is_url:\n                return is_url\n            return '\\\\' + groupdict['markdown']\n\n        regex = _MARKDOWN_STOCK_REGEX\n        if ignore_links:\n            regex = f'(?:{_URL_REGEX}|{regex})'\n        return re.sub(regex, replacement, text, 0, re.MULTILINE)\n    else:\n        text = re.sub(r'\\\\', r'\\\\\\\\', text)\n        return _MARKDOWN_ESCAPE_REGEX.sub(r'\\\\\\1', text)\n\n\ndef escape_mentions(text: str) -> str:\n    \"\"\"A helper function that escapes everyone, here, role, and user mentions.\n\n    .. note::\n\n        This does not include channel mentions.\n\n    .. note::\n\n        For more granular control over what mentions should be escaped\n        within messages, refer to the :class:`~discord.AllowedMentions`\n        class.\n\n    Parameters\n    -----------\n    text: :class:`str`\n        The text to escape mentions from.\n\n    Returns\n    --------\n    :class:`str`\n        The text with the mentions removed.\n    \"\"\"\n    return re.sub(r'@(everyone|here|[!&]?[0-9]{17,20})', '@\\u200b\\\\1', text)\n\n\ndef _chunk(iterator: Iterable[T], max_size: int) -> Iterator[List[T]]:\n    ret = []\n    n = 0\n    for item in iterator:\n        ret.append(item)\n        n += 1\n        if n == max_size:\n            yield ret\n            ret = []\n            n = 0\n    if ret:\n        yield ret\n\n\nasync def _achunk(iterator: AsyncIterable[T], max_size: int) -> AsyncIterator[List[T]]:\n    ret = []\n    n = 0\n    async for item in iterator:\n        ret.append(item)\n        n += 1\n        if n == max_size:\n            yield ret\n            ret = []\n            n = 0\n    if ret:\n        yield ret\n\n\n@overload\ndef as_chunks(iterator: AsyncIterable[T], max_size: int) -> AsyncIterator[List[T]]:\n    ...\n\n\n@overload\ndef as_chunks(iterator: Iterable[T], max_size: int) -> Iterator[List[T]]:\n    ...\n\n\ndef as_chunks(iterator: _Iter[T], max_size: int) -> _Iter[List[T]]:\n    \"\"\"A helper function that collects an iterator into chunks of a given size.\n\n    .. versionadded:: 2.0\n\n    Parameters\n    ----------\n    iterator: Union[:class:`collections.abc.Iterable`, :class:`collections.abc.AsyncIterable`]\n        The iterator to chunk, can be sync or async.\n    max_size: :class:`int`\n        The maximum chunk size.\n\n\n    .. warning::\n\n        The last chunk collected may not be as large as ``max_size``.\n\n    Returns\n    --------\n    Union[:class:`Iterator`, :class:`AsyncIterator`]\n        A new iterator which yields chunks of a given size.\n    \"\"\"\n    if max_size <= 0:\n        raise ValueError('Chunk sizes must be greater than 0.')\n\n    if isinstance(iterator, AsyncIterable):\n        return _achunk(iterator, max_size)\n    return _chunk(iterator, max_size)\n\n\nPY_310 = sys.version_info >= (3, 10)\nPY_312 = sys.version_info >= (3, 12)\n\n\ndef flatten_literal_params(parameters: Iterable[Any]) -> Tuple[Any, ...]:\n    params = []\n    literal_cls = type(Literal[0])\n    for p in parameters:\n        if isinstance(p, literal_cls):\n            params.extend(p.__args__)\n        else:\n            params.append(p)\n    return tuple(params)\n\n\ndef normalise_optional_params(parameters: Iterable[Any]) -> Tuple[Any, ...]:\n    none_cls = type(None)\n    return tuple(p for p in parameters if p is not none_cls) + (none_cls,)\n\n\ndef evaluate_annotation(\n    tp: Any,\n    globals: Dict[str, Any],\n    locals: Dict[str, Any],\n    cache: Dict[str, Any],\n    *,\n    implicit_str: bool = True,\n) -> Any:\n    if isinstance(tp, ForwardRef):\n        tp = tp.__forward_arg__\n        # ForwardRefs always evaluate their internals\n        implicit_str = True\n\n    if implicit_str and isinstance(tp, str):\n        if tp in cache:\n            return cache[tp]\n        evaluated = evaluate_annotation(eval(tp, globals, locals), globals, locals, cache)\n        cache[tp] = evaluated\n        return evaluated\n\n    if PY_312 and getattr(tp.__repr__, '__objclass__', None) is typing.TypeAliasType:  # type: ignore\n        temp_locals = dict(**locals, **{t.__name__: t for t in tp.__type_params__})\n        annotation = evaluate_annotation(tp.__value__, globals, temp_locals, cache.copy())\n        if hasattr(tp, '__args__'):\n            annotation = annotation[tp.__args__]\n        return annotation\n\n    if hasattr(tp, '__supertype__'):\n        return evaluate_annotation(tp.__supertype__, globals, locals, cache)\n\n    if hasattr(tp, '__metadata__'):\n        # Annotated[X, Y] can access Y via __metadata__\n        metadata = tp.__metadata__[0]\n        return evaluate_annotation(metadata, globals, locals, cache)\n\n    if hasattr(tp, '__args__'):\n        implicit_str = True\n        is_literal = False\n        args = tp.__args__\n        if not hasattr(tp, '__origin__'):\n            if PY_310 and tp.__class__ is types.UnionType:  # type: ignore\n                converted = Union[args]  # type: ignore\n                return evaluate_annotation(converted, globals, locals, cache)\n\n            return tp\n        if tp.__origin__ is Union:\n            try:\n                if args.index(type(None)) != len(args) - 1:\n                    args = normalise_optional_params(tp.__args__)\n            except ValueError:\n                pass\n        if tp.__origin__ is Literal:\n            if not PY_310:\n                args = flatten_literal_params(tp.__args__)\n            implicit_str = False\n            is_literal = True\n\n        evaluated_args = tuple(evaluate_annotation(arg, globals, locals, cache, implicit_str=implicit_str) for arg in args)\n\n        if is_literal and not all(isinstance(x, (str, int, bool, type(None))) for x in evaluated_args):\n            raise TypeError('Literal arguments must be of type str, int, bool, or NoneType.')\n\n        try:\n            return tp.copy_with(evaluated_args)\n        except AttributeError:\n            return tp.__origin__[evaluated_args]\n\n    return tp\n\n\ndef resolve_annotation(\n    annotation: Any,\n    globalns: Dict[str, Any],\n    localns: Optional[Dict[str, Any]],\n    cache: Optional[Dict[str, Any]],\n) -> Any:\n    if annotation is None:\n        return type(None)\n    if isinstance(annotation, str):\n        annotation = ForwardRef(annotation)\n\n    locals = globalns if localns is None else localns\n    if cache is None:\n        cache = {}\n    return evaluate_annotation(annotation, globalns, locals, cache)\n\n\ndef is_inside_class(func: Callable[..., Any]) -> bool:\n    # For methods defined in a class, the qualname has a dotted path\n    # denoting which class it belongs to. So, e.g. for A.foo the qualname\n    # would be A.foo while a global foo() would just be foo.\n    #\n    # Unfortunately, for nested functions this breaks. So inside an outer\n    # function named outer, those two would end up having a qualname with\n    # outer.<locals>.A.foo and outer.<locals>.foo\n\n    if func.__qualname__ == func.__name__:\n        return False\n    (remaining, _, _) = func.__qualname__.rpartition('.')\n    return not remaining.endswith('<locals>')\n\n\nTimestampStyle = Literal['f', 'F', 'd', 'D', 't', 'T', 'R']\n\n\ndef format_dt(dt: datetime.datetime, /, style: Optional[TimestampStyle] = None) -> str:\n    \"\"\"A helper function to format a :class:`datetime.datetime` for presentation within Discord.\n\n    This allows for a locale-independent way of presenting data using Discord specific Markdown.\n\n    +-------------+----------------------------+-----------------+\n    |    Style    |       Example Output       |   Description   |\n    +=============+============================+=================+\n    | t           | 22:57                      | Short Time      |\n    +-------------+----------------------------+-----------------+\n    | T           | 22:57:58                   | Long Time       |\n    +-------------+----------------------------+-----------------+\n    | d           | 17/05/2016                 | Short Date      |\n    +-------------+----------------------------+-----------------+\n    | D           | 17 May 2016                | Long Date       |\n    +-------------+----------------------------+-----------------+\n    | f (default) | 17 May 2016 22:57          | Short Date Time |\n    +-------------+----------------------------+-----------------+\n    | F           | Tuesday, 17 May 2016 22:57 | Long Date Time  |\n    +-------------+----------------------------+-----------------+\n    | R           | 5 years ago                | Relative Time   |\n    +-------------+----------------------------+-----------------+\n\n    Note that the exact output depends on the user's locale setting in the client. The example output\n    presented is using the ``en-GB`` locale.\n\n    .. versionadded:: 2.0\n\n    Parameters\n    -----------\n    dt: :class:`datetime.datetime`\n        The datetime to format.\n    style: :class:`str`\n        The style to format the datetime with.\n\n    Returns\n    --------\n    :class:`str`\n        The formatted string.\n    \"\"\"\n    if style is None:\n        return f'<t:{int(dt.timestamp())}>'\n    return f'<t:{int(dt.timestamp())}:{style}>'\n\n\ndef is_docker() -> bool:\n    path = '/proc/self/cgroup'\n    return os.path.exists('/.dockerenv') or (os.path.isfile(path) and any('docker' in line for line in open(path)))\n\n\ndef stream_supports_colour(stream: Any) -> bool:\n    is_a_tty = hasattr(stream, 'isatty') and stream.isatty()\n\n    # Pycharm and Vscode support colour in their inbuilt editors\n    if 'PYCHARM_HOSTED' in os.environ or os.environ.get('TERM_PROGRAM') == 'vscode':\n        return is_a_tty\n\n    if sys.platform != 'win32':\n        # Docker does not consistently have a tty attached to it\n        return is_a_tty or is_docker()\n\n    # ANSICON checks for things like ConEmu\n    # WT_SESSION checks if this is Windows Terminal\n    return is_a_tty and ('ANSICON' in os.environ or 'WT_SESSION' in os.environ)\n\n\nclass _ColourFormatter(logging.Formatter):\n\n    # ANSI codes are a bit weird to decipher if you're unfamiliar with them, so here's a refresher\n    # It starts off with a format like \\x1b[XXXm where XXX is a semicolon separated list of commands\n    # The important ones here relate to colour.\n    # 30-37 are black, red, green, yellow, blue, magenta, cyan and white in that order\n    # 40-47 are the same except for the background\n    # 90-97 are the same but \"bright\" foreground\n    # 100-107 are the same as the bright ones but for the background.\n    # 1 means bold, 2 means dim, 0 means reset, and 4 means underline.\n\n    LEVEL_COLOURS = [\n        (logging.DEBUG, '\\x1b[40;1m'),\n        (logging.INFO, '\\x1b[34;1m'),\n        (logging.WARNING, '\\x1b[33;1m'),\n        (logging.ERROR, '\\x1b[31m'),\n        (logging.CRITICAL, '\\x1b[41m'),\n    ]\n\n    FORMATS = {\n        level: logging.Formatter(\n            f'\\x1b[30;1m%(asctime)s\\x1b[0m {colour}%(levelname)-8s\\x1b[0m \\x1b[35m%(name)s\\x1b[0m %(message)s',\n            '%Y-%m-%d %H:%M:%S',\n        )\n        for level, colour in LEVEL_COLOURS\n    }\n\n    def format(self, record):\n        formatter = self.FORMATS.get(record.levelno)\n        if formatter is None:\n            formatter = self.FORMATS[logging.DEBUG]\n\n        # Override the traceback to always print in red\n        if record.exc_info:\n            text = formatter.formatException(record.exc_info)\n            record.exc_text = f'\\x1b[31m{text}\\x1b[0m'\n\n        output = formatter.format(record)\n\n        # Remove the cache layer\n        record.exc_text = None\n        return output\n\n\ndef setup_logging(\n    *,\n    handler: logging.Handler = MISSING,\n    formatter: logging.Formatter = MISSING,\n    level: int = MISSING,\n    root: bool = True,\n) -> None:\n    \"\"\"A helper function to setup logging.\n\n    This is superficially similar to :func:`logging.basicConfig` but\n    uses different defaults and a colour formatter if the stream can\n    display colour.\n\n    This is used by the :class:`~discord.Client` to set up logging\n    if ``log_handler`` is not ``None``.\n\n    .. versionadded:: 2.0\n\n    Parameters\n    -----------\n    handler: :class:`logging.Handler`\n        The log handler to use for the library's logger.\n\n        The default log handler if not provided is :class:`logging.StreamHandler`.\n    formatter: :class:`logging.Formatter`\n        The formatter to use with the given log handler. If not provided then it\n        defaults to a colour based logging formatter (if available). If colour\n        is not available then a simple logging formatter is provided.\n    level: :class:`int`\n        The default log level for the library's logger. Defaults to ``logging.INFO``.\n    root: :class:`bool`\n        Whether to set up the root logger rather than the library logger.\n        Unlike the default for :class:`~discord.Client`, this defaults to ``True``.\n    \"\"\"\n\n    if level is MISSING:\n        level = logging.INFO\n\n    if handler is MISSING:\n        handler = logging.StreamHandler()\n\n    if formatter is MISSING:\n        if isinstance(handler, logging.StreamHandler) and stream_supports_colour(handler.stream):\n            formatter = _ColourFormatter()\n        else:\n            dt_fmt = '%Y-%m-%d %H:%M:%S'\n            formatter = logging.Formatter('[{asctime}] [{levelname:<8}] {name}: {message}', dt_fmt, style='{')\n\n    if root:\n        logger = logging.getLogger()\n    else:\n        library, _, _ = __name__.partition('.')\n        logger = logging.getLogger(library)\n\n    handler.setFormatter(formatter)\n    logger.setLevel(level)\n    logger.addHandler(handler)\n\n\ndef _shorten(\n    input: str,\n    *,\n    _wrapper: TextWrapper = TextWrapper(width=100, max_lines=1, replace_whitespace=True, placeholder='…'),\n) -> str:\n    try:\n        # split on the first double newline since arguments may appear after that\n        input, _ = re.split(r'\\n\\s*\\n', input, maxsplit=1)\n    except ValueError:\n        pass\n    return _wrapper.fill(' '.join(input.strip().split()))\n\n\nCAMEL_CASE_REGEX = re.compile(r'(?<!^)(?=[A-Z])')\n\n\ndef _to_kebab_case(text: str) -> str:\n    return CAMEL_CASE_REGEX.sub('-', text).lower()\n\n\ndef _human_join(seq: Sequence[str], /, *, delimiter: str = ', ', final: str = 'or') -> str:\n    size = len(seq)\n    if size == 0:\n        return ''\n\n    if size == 1:\n        return seq[0]\n\n    if size == 2:\n        return f'{seq[0]} {final} {seq[1]}'\n\n    return delimiter.join(seq[:-1]) + f' {final} {seq[-1]}'\n"
  },
  {
    "path": "discord/voice_client.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom __future__ import annotations\n\nimport asyncio\nimport logging\nimport struct\nfrom typing import Any, Callable, List, Optional, TYPE_CHECKING, Tuple, Union\n\nfrom . import opus\nfrom .gateway import *\nfrom .errors import ClientException\nfrom .player import AudioPlayer, AudioSource\nfrom .utils import MISSING\nfrom .voice_state import VoiceConnectionState\n\nif TYPE_CHECKING:\n    from .gateway import DiscordVoiceWebSocket\n    from .client import Client\n    from .guild import Guild\n    from .state import ConnectionState\n    from .user import ClientUser\n    from .opus import Encoder, APPLICATION_CTL, BAND_CTL, SIGNAL_CTL\n    from .channel import StageChannel, VoiceChannel\n    from . import abc\n\n    from .types.voice import (\n        GuildVoiceState as GuildVoiceStatePayload,\n        VoiceServerUpdate as VoiceServerUpdatePayload,\n        SupportedModes,\n    )\n\n    VocalGuildChannel = Union[VoiceChannel, StageChannel]\n\n\nhas_nacl: bool\n\ntry:\n    import nacl.secret  # type: ignore\n    import nacl.utils  # type: ignore\n\n    has_nacl = True\nexcept ImportError:\n    has_nacl = False\n\n__all__ = (\n    'VoiceProtocol',\n    'VoiceClient',\n)\n\n\n_log = logging.getLogger(__name__)\n\n\nclass VoiceProtocol:\n    \"\"\"A class that represents the Discord voice protocol.\n\n    This is an abstract class. The library provides a concrete implementation\n    under :class:`VoiceClient`.\n\n    This class allows you to implement a protocol to allow for an external\n    method of sending voice, such as Lavalink_ or a native library implementation.\n\n    These classes are passed to :meth:`abc.Connectable.connect <VoiceChannel.connect>`.\n\n    .. _Lavalink: https://github.com/freyacodes/Lavalink\n\n    Parameters\n    ------------\n    client: :class:`Client`\n        The client (or its subclasses) that started the connection request.\n    channel: :class:`abc.Connectable`\n        The voice channel that is being connected to.\n    \"\"\"\n\n    def __init__(self, client: Client, channel: abc.Connectable) -> None:\n        self.client: Client = client\n        self.channel: abc.Connectable = channel\n\n    async def on_voice_state_update(self, data: GuildVoiceStatePayload, /) -> None:\n        \"\"\"|coro|\n\n        An abstract method that is called when the client's voice state\n        has changed. This corresponds to ``VOICE_STATE_UPDATE``.\n\n        .. warning::\n\n            This method is not the same as the event. See: :func:`on_voice_state_update`\n\n        Parameters\n        ------------\n        data: :class:`dict`\n            The raw :ddocs:`voice state payload <resources/voice#voice-state-object>`.\n        \"\"\"\n        raise NotImplementedError\n\n    async def on_voice_server_update(self, data: VoiceServerUpdatePayload, /) -> None:\n        \"\"\"|coro|\n\n        An abstract method that is called when initially connecting to voice.\n        This corresponds to ``VOICE_SERVER_UPDATE``.\n\n        Parameters\n        ------------\n        data: :class:`dict`\n            The raw :ddocs:`voice server update payload <topics/gateway-events#voice-server-update>`.\n        \"\"\"\n        raise NotImplementedError\n\n    async def connect(self, *, timeout: float, reconnect: bool, self_deaf: bool = False, self_mute: bool = False) -> None:\n        \"\"\"|coro|\n\n        An abstract method called when the client initiates the connection request.\n\n        When a connection is requested initially, the library calls the constructor\n        under ``__init__`` and then calls :meth:`connect`. If :meth:`connect` fails at\n        some point then :meth:`disconnect` is called.\n\n        Within this method, to start the voice connection flow it is recommended to\n        use :meth:`Guild.change_voice_state` to start the flow. After which,\n        :meth:`on_voice_server_update` and :meth:`on_voice_state_update` will be called.\n        The order that these two are called is unspecified.\n\n        Parameters\n        ------------\n        timeout: :class:`float`\n            The timeout for the connection.\n        reconnect: :class:`bool`\n            Whether reconnection is expected.\n        self_mute: :class:`bool`\n            Indicates if the client should be self-muted.\n\n            .. versionadded:: 2.0\n        self_deaf: :class:`bool`\n            Indicates if the client should be self-deafened.\n\n            .. versionadded:: 2.0\n        \"\"\"\n        raise NotImplementedError\n\n    async def disconnect(self, *, force: bool) -> None:\n        \"\"\"|coro|\n\n        An abstract method called when the client terminates the connection.\n\n        See :meth:`cleanup`.\n\n        Parameters\n        ------------\n        force: :class:`bool`\n            Whether the disconnection was forced.\n        \"\"\"\n        raise NotImplementedError\n\n    def cleanup(self) -> None:\n        \"\"\"This method *must* be called to ensure proper clean-up during a disconnect.\n\n        It is advisable to call this from within :meth:`disconnect` when you are\n        completely done with the voice protocol instance.\n\n        This method removes it from the internal state cache that keeps track of\n        currently alive voice clients. Failure to clean-up will cause subsequent\n        connections to report that it's still connected.\n        \"\"\"\n        key_id, _ = self.channel._get_voice_client_key()\n        self.client._connection._remove_voice_client(key_id)\n\n\nclass VoiceClient(VoiceProtocol):\n    \"\"\"Represents a Discord voice connection.\n\n    You do not create these, you typically get them from\n    e.g. :meth:`VoiceChannel.connect`.\n\n    Warning\n    --------\n    In order to use PCM based AudioSources, you must have the opus library\n    installed on your system and loaded through :func:`opus.load_opus`.\n    Otherwise, your AudioSources must be opus encoded (e.g. using :class:`FFmpegOpusAudio`)\n    or the library will not be able to transmit audio.\n\n    Attributes\n    -----------\n    session_id: :class:`str`\n        The voice connection session ID.\n    token: :class:`str`\n        The voice connection token.\n    endpoint: :class:`str`\n        The endpoint we are connecting to.\n    channel: Union[:class:`VoiceChannel`, :class:`StageChannel`]\n        The voice channel connected to.\n    \"\"\"\n\n    channel: VocalGuildChannel\n\n    def __init__(self, client: Client, channel: abc.Connectable) -> None:\n        if not has_nacl:\n            raise RuntimeError(\"PyNaCl library needed in order to use voice\")\n\n        super().__init__(client, channel)\n        state = client._connection\n        self.server_id: int = MISSING\n        self.socket = MISSING\n        self.loop: asyncio.AbstractEventLoop = state.loop\n        self._state: ConnectionState = state\n\n        self.sequence: int = 0\n        self.timestamp: int = 0\n        self._player: Optional[AudioPlayer] = None\n        self.encoder: Encoder = MISSING\n        self._lite_nonce: int = 0\n\n        self._connection: VoiceConnectionState = self.create_connection_state()\n\n    warn_nacl: bool = not has_nacl\n    supported_modes: Tuple[SupportedModes, ...] = (\n        'xsalsa20_poly1305_lite',\n        'xsalsa20_poly1305_suffix',\n        'xsalsa20_poly1305',\n    )\n\n    @property\n    def guild(self) -> Guild:\n        \"\"\":class:`Guild`: The guild we're connected to.\"\"\"\n        return self.channel.guild\n\n    @property\n    def user(self) -> ClientUser:\n        \"\"\":class:`ClientUser`: The user connected to voice (i.e. ourselves).\"\"\"\n        return self._state.user  # type: ignore\n\n    @property\n    def session_id(self) -> Optional[str]:\n        return self._connection.session_id\n\n    @property\n    def token(self) -> Optional[str]:\n        return self._connection.token\n\n    @property\n    def endpoint(self) -> Optional[str]:\n        return self._connection.endpoint\n\n    @property\n    def ssrc(self) -> int:\n        return self._connection.ssrc\n\n    @property\n    def mode(self) -> SupportedModes:\n        return self._connection.mode\n\n    @property\n    def secret_key(self) -> List[int]:\n        return self._connection.secret_key\n\n    @property\n    def ws(self) -> DiscordVoiceWebSocket:\n        return self._connection.ws\n\n    @property\n    def timeout(self) -> float:\n        return self._connection.timeout\n\n    def checked_add(self, attr: str, value: int, limit: int) -> None:\n        val = getattr(self, attr)\n        if val + value > limit:\n            setattr(self, attr, 0)\n        else:\n            setattr(self, attr, val + value)\n\n    # connection related\n\n    def create_connection_state(self) -> VoiceConnectionState:\n        return VoiceConnectionState(self)\n\n    async def on_voice_state_update(self, data: GuildVoiceStatePayload) -> None:\n        await self._connection.voice_state_update(data)\n\n    async def on_voice_server_update(self, data: VoiceServerUpdatePayload) -> None:\n        await self._connection.voice_server_update(data)\n\n    async def connect(self, *, reconnect: bool, timeout: float, self_deaf: bool = False, self_mute: bool = False) -> None:\n        await self._connection.connect(\n            reconnect=reconnect, timeout=timeout, self_deaf=self_deaf, self_mute=self_mute, resume=False\n        )\n\n    def wait_until_connected(self, timeout: Optional[float] = 30.0) -> bool:\n        self._connection.wait(timeout)\n        return self._connection.is_connected()\n\n    @property\n    def latency(self) -> float:\n        \"\"\":class:`float`: Latency between a HEARTBEAT and a HEARTBEAT_ACK in seconds.\n\n        This could be referred to as the Discord Voice WebSocket latency and is\n        an analogue of user's voice latencies as seen in the Discord client.\n\n        .. versionadded:: 1.4\n        \"\"\"\n        ws = self._connection.ws\n        return float(\"inf\") if not ws else ws.latency\n\n    @property\n    def average_latency(self) -> float:\n        \"\"\":class:`float`: Average of most recent 20 HEARTBEAT latencies in seconds.\n\n        .. versionadded:: 1.4\n        \"\"\"\n        ws = self._connection.ws\n        return float(\"inf\") if not ws else ws.average_latency\n\n    async def disconnect(self, *, force: bool = False) -> None:\n        \"\"\"|coro|\n\n        Disconnects this voice client from voice.\n        \"\"\"\n        self.stop()\n        await self._connection.disconnect(force=force, wait=True)\n        self.cleanup()\n\n    async def move_to(self, channel: Optional[abc.Snowflake], *, timeout: Optional[float] = 30.0) -> None:\n        \"\"\"|coro|\n\n        Moves you to a different voice channel.\n\n        Parameters\n        -----------\n        channel: Optional[:class:`abc.Snowflake`]\n            The channel to move to. Must be a voice channel.\n        timeout: Optional[:class:`float`]\n            How long to wait for the move to complete.\n\n            .. versionadded:: 2.4\n\n        Raises\n        -------\n        asyncio.TimeoutError\n            The move did not complete in time, but may still be ongoing.\n        \"\"\"\n        await self._connection.move_to(channel, timeout)\n\n    def is_connected(self) -> bool:\n        \"\"\"Indicates if the voice client is connected to voice.\"\"\"\n        return self._connection.is_connected()\n\n    # audio related\n\n    def _get_voice_packet(self, data):\n        header = bytearray(12)\n\n        # Formulate rtp header\n        header[0] = 0x80\n        header[1] = 0x78\n        struct.pack_into('>H', header, 2, self.sequence)\n        struct.pack_into('>I', header, 4, self.timestamp)\n        struct.pack_into('>I', header, 8, self.ssrc)\n\n        encrypt_packet = getattr(self, '_encrypt_' + self.mode)\n        return encrypt_packet(header, data)\n\n    def _encrypt_xsalsa20_poly1305(self, header: bytes, data) -> bytes:\n        box = nacl.secret.SecretBox(bytes(self.secret_key))\n        nonce = bytearray(24)\n        nonce[:12] = header\n\n        return header + box.encrypt(bytes(data), bytes(nonce)).ciphertext\n\n    def _encrypt_xsalsa20_poly1305_suffix(self, header: bytes, data) -> bytes:\n        box = nacl.secret.SecretBox(bytes(self.secret_key))\n        nonce = nacl.utils.random(nacl.secret.SecretBox.NONCE_SIZE)\n\n        return header + box.encrypt(bytes(data), nonce).ciphertext + nonce\n\n    def _encrypt_xsalsa20_poly1305_lite(self, header: bytes, data) -> bytes:\n        box = nacl.secret.SecretBox(bytes(self.secret_key))\n        nonce = bytearray(24)\n\n        nonce[:4] = struct.pack('>I', self._lite_nonce)\n        self.checked_add('_lite_nonce', 1, 4294967295)\n\n        return header + box.encrypt(bytes(data), bytes(nonce)).ciphertext + nonce[:4]\n\n    def play(\n        self,\n        source: AudioSource,\n        *,\n        after: Optional[Callable[[Optional[Exception]], Any]] = None,\n        application: APPLICATION_CTL = 'audio',\n        bitrate: int = 128,\n        fec: bool = True,\n        expected_packet_loss: float = 0.15,\n        bandwidth: BAND_CTL = 'full',\n        signal_type: SIGNAL_CTL = 'auto',\n    ) -> None:\n        \"\"\"Plays an :class:`AudioSource`.\n\n        The finalizer, ``after`` is called after the source has been exhausted\n        or an error occurred.\n\n        If an error happens while the audio player is running, the exception is\n        caught and the audio player is then stopped.  If no after callback is\n        passed, any caught exception will be logged using the library logger.\n\n        Extra parameters may be passed to the internal opus encoder if a PCM based\n        source is used.  Otherwise, they are ignored.\n\n        .. versionchanged:: 2.0\n            Instead of writing to ``sys.stderr``, the library's logger is used.\n\n        .. versionchanged:: 2.4\n            Added encoder parameters as keyword arguments.\n\n        Parameters\n        -----------\n        source: :class:`AudioSource`\n            The audio source we're reading from.\n        after: Callable[[Optional[:class:`Exception`]], Any]\n            The finalizer that is called after the stream is exhausted.\n            This function must have a single parameter, ``error``, that\n            denotes an optional exception that was raised during playing.\n        application: :class:`str`\n            Configures the encoder's intended application.  Can be one of:\n            ``'audio'``, ``'voip'``, ``'lowdelay'``.\n            Defaults to ``'audio'``.\n        bitrate: :class:`int`\n            Configures the bitrate in the encoder.  Can be between ``16`` and ``512``.\n            Defaults to ``128``.\n        fec: :class:`bool`\n            Configures the encoder's use of inband forward error correction.\n            Defaults to ``True``.\n        expected_packet_loss: :class:`float`\n            Configures the encoder's expected packet loss percentage.  Requires FEC.\n            Defaults to ``0.15``.\n        bandwidth: :class:`str`\n            Configures the encoder's bandpass.  Can be one of:\n            ``'narrow'``, ``'medium'``, ``'wide'``, ``'superwide'``, ``'full'``.\n            Defaults to ``'full'``.\n        signal_type: :class:`str`\n            Configures the type of signal being encoded.  Can be one of:\n            ``'auto'``, ``'voice'``, ``'music'``.\n            Defaults to ``'auto'``.\n\n        Raises\n        -------\n        ClientException\n            Already playing audio or not connected.\n        TypeError\n            Source is not a :class:`AudioSource` or after is not a callable.\n        OpusNotLoaded\n            Source is not opus encoded and opus is not loaded.\n        ValueError\n            An improper value was passed as an encoder parameter.\n        \"\"\"\n\n        if not self.is_connected():\n            raise ClientException('Not connected to voice.')\n\n        if self.is_playing():\n            raise ClientException('Already playing audio.')\n\n        if not isinstance(source, AudioSource):\n            raise TypeError(f'source must be an AudioSource not {source.__class__.__name__}')\n\n        if not source.is_opus():\n            self.encoder = opus.Encoder(\n                application=application,\n                bitrate=bitrate,\n                fec=fec,\n                expected_packet_loss=expected_packet_loss,\n                bandwidth=bandwidth,\n                signal_type=signal_type,\n            )\n\n        self._player = AudioPlayer(source, self, after=after)\n        self._player.start()\n\n    def is_playing(self) -> bool:\n        \"\"\"Indicates if we're currently playing audio.\"\"\"\n        return self._player is not None and self._player.is_playing()\n\n    def is_paused(self) -> bool:\n        \"\"\"Indicates if we're playing audio, but if we're paused.\"\"\"\n        return self._player is not None and self._player.is_paused()\n\n    def stop(self) -> None:\n        \"\"\"Stops playing audio.\"\"\"\n        if self._player:\n            self._player.stop()\n            self._player = None\n\n    def pause(self) -> None:\n        \"\"\"Pauses the audio playing.\"\"\"\n        if self._player:\n            self._player.pause()\n\n    def resume(self) -> None:\n        \"\"\"Resumes the audio playing.\"\"\"\n        if self._player:\n            self._player.resume()\n\n    @property\n    def source(self) -> Optional[AudioSource]:\n        \"\"\"Optional[:class:`AudioSource`]: The audio source being played, if playing.\n\n        This property can also be used to change the audio source currently being played.\n        \"\"\"\n        return self._player.source if self._player else None\n\n    @source.setter\n    def source(self, value: AudioSource) -> None:\n        if not isinstance(value, AudioSource):\n            raise TypeError(f'expected AudioSource not {value.__class__.__name__}.')\n\n        if self._player is None:\n            raise ValueError('Not playing anything.')\n\n        self._player.set_source(value)\n\n    def send_audio_packet(self, data: bytes, *, encode: bool = True) -> None:\n        \"\"\"Sends an audio packet composed of the data.\n\n        You must be connected to play audio.\n\n        Parameters\n        ----------\n        data: :class:`bytes`\n            The :term:`py:bytes-like object` denoting PCM or Opus voice data.\n        encode: :class:`bool`\n            Indicates if ``data`` should be encoded into Opus.\n\n        Raises\n        -------\n        ClientException\n            You are not connected.\n        opus.OpusError\n            Encoding the data failed.\n        \"\"\"\n\n        self.checked_add('sequence', 1, 65535)\n        if encode:\n            encoded_data = self.encoder.encode(data, self.encoder.SAMPLES_PER_FRAME)\n        else:\n            encoded_data = data\n        packet = self._get_voice_packet(encoded_data)\n        try:\n            self._connection.send_packet(packet)\n        except OSError:\n            _log.debug('A packet has been dropped (seq: %s, timestamp: %s)', self.sequence, self.timestamp)\n\n        self.checked_add('timestamp', opus.Encoder.SAMPLES_PER_FRAME, 4294967295)\n"
  },
  {
    "path": "discord/voice_state.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\n\nSome documentation to refer to:\n\n- Our main web socket (mWS) sends opcode 4 with a guild ID and channel ID.\n- The mWS receives VOICE_STATE_UPDATE and VOICE_SERVER_UPDATE.\n- We pull the session_id from VOICE_STATE_UPDATE.\n- We pull the token, endpoint and server_id from VOICE_SERVER_UPDATE.\n- Then we initiate the voice web socket (vWS) pointing to the endpoint.\n- We send opcode 0 with the user_id, server_id, session_id and token using the vWS.\n- The vWS sends back opcode 2 with an ssrc, port, modes(array) and heartbeat_interval.\n- We send a UDP discovery packet to endpoint:port and receive our IP and our port in LE.\n- Then we send our IP and port via vWS with opcode 1.\n- When that's all done, we receive opcode 4 from the vWS.\n- Finally we can transmit data to endpoint:port.\n\"\"\"\n\nfrom __future__ import annotations\n\nimport select\nimport socket\nimport asyncio\nimport logging\nimport threading\n\nfrom typing import TYPE_CHECKING, Optional, Dict, List, Callable, Coroutine, Any, Tuple\n\nfrom .enums import Enum\nfrom .utils import MISSING, sane_wait_for\nfrom .errors import ConnectionClosed\nfrom .backoff import ExponentialBackoff\nfrom .gateway import DiscordVoiceWebSocket\n\nif TYPE_CHECKING:\n    from . import abc\n    from .guild import Guild\n    from .user import ClientUser\n    from .member import VoiceState\n    from .voice_client import VoiceClient\n\n    from .types.voice import (\n        GuildVoiceState as GuildVoiceStatePayload,\n        VoiceServerUpdate as VoiceServerUpdatePayload,\n        SupportedModes,\n    )\n\n    WebsocketHook = Optional[Callable[[DiscordVoiceWebSocket, Dict[str, Any]], Coroutine[Any, Any, Any]]]\n    SocketReaderCallback = Callable[[bytes], Any]\n\n\n__all__ = ('VoiceConnectionState',)\n\n_log = logging.getLogger(__name__)\n\n\nclass SocketReader(threading.Thread):\n    def __init__(self, state: VoiceConnectionState, *, start_paused: bool = True) -> None:\n        super().__init__(daemon=True, name=f'voice-socket-reader:{id(self):#x}')\n        self.state: VoiceConnectionState = state\n        self.start_paused = start_paused\n        self._callbacks: List[SocketReaderCallback] = []\n        self._running = threading.Event()\n        self._end = threading.Event()\n        # If we have paused reading due to having no callbacks\n        self._idle_paused: bool = True\n\n    def register(self, callback: SocketReaderCallback) -> None:\n        self._callbacks.append(callback)\n        if self._idle_paused:\n            self._idle_paused = False\n            self._running.set()\n\n    def unregister(self, callback: SocketReaderCallback) -> None:\n        try:\n            self._callbacks.remove(callback)\n        except ValueError:\n            pass\n        else:\n            if not self._callbacks and self._running.is_set():\n                # If running is not set, we are either explicitly paused and\n                # should be explicitly resumed, or we are already idle paused\n                self._idle_paused = True\n                self._running.clear()\n\n    def pause(self) -> None:\n        self._idle_paused = False\n        self._running.clear()\n\n    def resume(self, *, force: bool = False) -> None:\n        if self._running.is_set():\n            return\n        # Don't resume if there are no callbacks registered\n        if not force and not self._callbacks:\n            # We tried to resume but there was nothing to do, so resume when ready\n            self._idle_paused = True\n            return\n        self._idle_paused = False\n        self._running.set()\n\n    def stop(self) -> None:\n        self._end.set()\n        self._running.set()\n\n    def run(self) -> None:\n        self._end.clear()\n        self._running.set()\n        if self.start_paused:\n            self.pause()\n        try:\n            self._do_run()\n        except Exception:\n            _log.exception('Error in %s', self)\n        finally:\n            self.stop()\n            self._running.clear()\n            self._callbacks.clear()\n\n    def _do_run(self) -> None:\n        while not self._end.is_set():\n            if not self._running.is_set():\n                self._running.wait()\n                continue\n\n            # Since this socket is a non blocking socket, select has to be used to wait on it for reading.\n            try:\n                readable, _, _ = select.select([self.state.socket], [], [], 30)\n            except (ValueError, TypeError, OSError) as e:\n                _log.debug(\n                    \"Select error handling socket in reader, this should be safe to ignore: %s: %s\", e.__class__.__name__, e\n                )\n                # The socket is either closed or doesn't exist at the moment\n                continue\n\n            if not readable:\n                continue\n\n            try:\n                data = self.state.socket.recv(2048)\n            except OSError:\n                _log.debug('Error reading from socket in %s, this should be safe to ignore', self, exc_info=True)\n            else:\n                for cb in self._callbacks:\n                    try:\n                        cb(data)\n                    except Exception:\n                        _log.exception('Error calling %s in %s', cb, self)\n\n\nclass ConnectionFlowState(Enum):\n    \"\"\"Enum representing voice connection flow state.\"\"\"\n\n    # fmt: off\n    disconnected            = 0\n    set_guild_voice_state   = 1\n    got_voice_state_update  = 2\n    got_voice_server_update = 3\n    got_both_voice_updates  = 4\n    websocket_connected     = 5\n    got_websocket_ready     = 6\n    got_ip_discovery        = 7\n    connected               = 8\n    # fmt: on\n\n\nclass VoiceConnectionState:\n    \"\"\"Represents the internal state of a voice connection.\"\"\"\n\n    def __init__(self, voice_client: VoiceClient, *, hook: Optional[WebsocketHook] = None) -> None:\n        self.voice_client = voice_client\n        self.hook = hook\n\n        self.timeout: float = 30.0\n        self.reconnect: bool = True\n        self.self_deaf: bool = False\n        self.self_mute: bool = False\n        self.token: Optional[str] = None\n        self.session_id: Optional[str] = None\n        self.endpoint: Optional[str] = None\n        self.endpoint_ip: Optional[str] = None\n        self.server_id: Optional[int] = None\n        self.ip: Optional[str] = None\n        self.port: Optional[int] = None\n        self.voice_port: Optional[int] = None\n        self.secret_key: List[int] = MISSING\n        self.ssrc: int = MISSING\n        self.mode: SupportedModes = MISSING\n        self.socket: socket.socket = MISSING\n        self.ws: DiscordVoiceWebSocket = MISSING\n\n        self._state: ConnectionFlowState = ConnectionFlowState.disconnected\n        self._expecting_disconnect: bool = False\n        self._connected = threading.Event()\n        self._state_event = asyncio.Event()\n        self._disconnected = asyncio.Event()\n        self._runner: Optional[asyncio.Task] = None\n        self._connector: Optional[asyncio.Task] = None\n        self._socket_reader = SocketReader(self)\n        self._socket_reader.start()\n\n    @property\n    def state(self) -> ConnectionFlowState:\n        return self._state\n\n    @state.setter\n    def state(self, state: ConnectionFlowState) -> None:\n        if state is not self._state:\n            _log.debug('Connection state changed to %s', state.name)\n        self._state = state\n        self._state_event.set()\n        self._state_event.clear()\n\n        if state is ConnectionFlowState.connected:\n            self._connected.set()\n        else:\n            self._connected.clear()\n\n    @property\n    def guild(self) -> Guild:\n        return self.voice_client.guild\n\n    @property\n    def user(self) -> ClientUser:\n        return self.voice_client.user\n\n    @property\n    def supported_modes(self) -> Tuple[SupportedModes, ...]:\n        return self.voice_client.supported_modes\n\n    @property\n    def self_voice_state(self) -> Optional[VoiceState]:\n        return self.guild.me.voice\n\n    async def voice_state_update(self, data: GuildVoiceStatePayload) -> None:\n        channel_id = data['channel_id']\n\n        if channel_id is None:\n            self._disconnected.set()\n\n            # If we know we're going to get a voice_state_update where we have no channel due to\n            # being in the reconnect or disconnect flow, we ignore it.  Otherwise, it probably wasn't from us.\n            if self._expecting_disconnect:\n                self._expecting_disconnect = False\n            else:\n                _log.debug('We were externally disconnected from voice.')\n                await self.disconnect()\n\n            return\n\n        channel_id = int(channel_id)\n        self.session_id = data['session_id']\n\n        # we got the event while connecting\n        if self.state in (ConnectionFlowState.set_guild_voice_state, ConnectionFlowState.got_voice_server_update):\n            if self.state is ConnectionFlowState.set_guild_voice_state:\n                self.state = ConnectionFlowState.got_voice_state_update\n\n                # we moved ourselves\n                if channel_id != self.voice_client.channel.id:\n                    self._update_voice_channel(channel_id)\n\n            else:\n                self.state = ConnectionFlowState.got_both_voice_updates\n            return\n\n        if self.state is ConnectionFlowState.connected:\n            self._update_voice_channel(channel_id)\n\n        elif self.state is not ConnectionFlowState.disconnected:\n            if channel_id != self.voice_client.channel.id:\n                # For some unfortunate reason we were moved during the connection flow\n                _log.info('Handling channel move while connecting...')\n\n                self._update_voice_channel(channel_id)\n                await self.soft_disconnect(with_state=ConnectionFlowState.got_voice_state_update)\n                await self.connect(\n                    reconnect=self.reconnect,\n                    timeout=self.timeout,\n                    self_deaf=(self.self_voice_state or self).self_deaf,\n                    self_mute=(self.self_voice_state or self).self_mute,\n                    resume=False,\n                    wait=False,\n                )\n            else:\n                _log.debug('Ignoring unexpected voice_state_update event')\n\n    async def voice_server_update(self, data: VoiceServerUpdatePayload) -> None:\n        previous_token = self.token\n        previous_server_id = self.server_id\n        previous_endpoint = self.endpoint\n\n        self.token = data['token']\n        self.server_id = int(data['guild_id'])\n        endpoint = data.get('endpoint')\n\n        if self.token is None or endpoint is None:\n            _log.warning(\n                'Awaiting endpoint... This requires waiting. '\n                'If timeout occurred considering raising the timeout and reconnecting.'\n            )\n            return\n\n        self.endpoint, _, _ = endpoint.rpartition(':')\n        if self.endpoint.startswith('wss://'):\n            # Just in case, strip it off since we're going to add it later\n            self.endpoint = self.endpoint[6:]\n\n        # we got the event while connecting\n        if self.state in (ConnectionFlowState.set_guild_voice_state, ConnectionFlowState.got_voice_state_update):\n            # This gets set after READY is received\n            self.endpoint_ip = MISSING\n            self._create_socket()\n\n            if self.state is ConnectionFlowState.set_guild_voice_state:\n                self.state = ConnectionFlowState.got_voice_server_update\n            else:\n                self.state = ConnectionFlowState.got_both_voice_updates\n\n        elif self.state is ConnectionFlowState.connected:\n            _log.debug('Voice server update, closing old voice websocket')\n            await self.ws.close(4014)\n            self.state = ConnectionFlowState.got_voice_server_update\n\n        elif self.state is not ConnectionFlowState.disconnected:\n            # eventual consistency\n            if previous_token == self.token and previous_server_id == self.server_id and previous_token == self.token:\n                return\n\n            _log.debug('Unexpected server update event, attempting to handle')\n\n            await self.soft_disconnect(with_state=ConnectionFlowState.got_voice_server_update)\n            await self.connect(\n                reconnect=self.reconnect,\n                timeout=self.timeout,\n                self_deaf=(self.self_voice_state or self).self_deaf,\n                self_mute=(self.self_voice_state or self).self_mute,\n                resume=False,\n                wait=False,\n            )\n            self._create_socket()\n\n    async def connect(\n        self, *, reconnect: bool, timeout: float, self_deaf: bool, self_mute: bool, resume: bool, wait: bool = True\n    ) -> None:\n        if self._connector:\n            self._connector.cancel()\n            self._connector = None\n\n        if self._runner:\n            self._runner.cancel()\n            self._runner = None\n\n        self.timeout = timeout\n        self.reconnect = reconnect\n        self._connector = self.voice_client.loop.create_task(\n            self._wrap_connect(reconnect, timeout, self_deaf, self_mute, resume), name='Voice connector'\n        )\n        if wait:\n            await self._connector\n\n    async def _wrap_connect(self, *args: Any) -> None:\n        try:\n            await self._connect(*args)\n        except asyncio.CancelledError:\n            _log.debug('Cancelling voice connection')\n            await self.soft_disconnect()\n            raise\n        except asyncio.TimeoutError:\n            _log.info('Timed out connecting to voice')\n            await self.disconnect()\n            raise\n        except Exception:\n            _log.exception('Error connecting to voice... disconnecting')\n            await self.disconnect()\n            raise\n\n    async def _inner_connect(self, reconnect: bool, self_deaf: bool, self_mute: bool, resume: bool) -> None:\n        for i in range(5):\n            _log.info('Starting voice handshake... (connection attempt %d)', i + 1)\n\n            await self._voice_connect(self_deaf=self_deaf, self_mute=self_mute)\n            # Setting this unnecessarily will break reconnecting\n            if self.state is ConnectionFlowState.disconnected:\n                self.state = ConnectionFlowState.set_guild_voice_state\n\n            await self._wait_for_state(ConnectionFlowState.got_both_voice_updates)\n\n            _log.info('Voice handshake complete. Endpoint found: %s', self.endpoint)\n\n            try:\n                self.ws = await self._connect_websocket(resume)\n                await self._handshake_websocket()\n                break\n            except ConnectionClosed:\n                if reconnect:\n                    wait = 1 + i * 2.0\n                    _log.exception('Failed to connect to voice... Retrying in %ss...', wait)\n                    await self.disconnect(cleanup=False)\n                    await asyncio.sleep(wait)\n                    continue\n                else:\n                    await self.disconnect()\n                    raise\n\n    async def _connect(self, reconnect: bool, timeout: float, self_deaf: bool, self_mute: bool, resume: bool) -> None:\n        _log.info('Connecting to voice...')\n\n        await asyncio.wait_for(\n            self._inner_connect(reconnect=reconnect, self_deaf=self_deaf, self_mute=self_mute, resume=resume),\n            timeout=timeout,\n        )\n        _log.info('Voice connection complete.')\n\n        if not self._runner:\n            self._runner = self.voice_client.loop.create_task(self._poll_voice_ws(reconnect), name='Voice websocket poller')\n\n    async def disconnect(self, *, force: bool = True, cleanup: bool = True, wait: bool = False) -> None:\n        if not force and not self.is_connected():\n            return\n\n        try:\n            await self._voice_disconnect()\n            if self.ws:\n                await self.ws.close()\n        except Exception:\n            _log.debug('Ignoring exception disconnecting from voice', exc_info=True)\n        finally:\n            self.state = ConnectionFlowState.disconnected\n            self._socket_reader.pause()\n\n            # Stop threads before we unlock waiters so they end properly\n            if cleanup:\n                self._socket_reader.stop()\n                self.voice_client.stop()\n\n            # Flip the connected event to unlock any waiters\n            self._connected.set()\n            self._connected.clear()\n\n            if self.socket:\n                self.socket.close()\n\n            self.ip = MISSING\n            self.port = MISSING\n\n            # Skip this part if disconnect was called from the poll loop task\n            if wait and not self._inside_runner():\n                # Wait for the voice_state_update event confirming the bot left the voice channel.\n                # This prevents a race condition caused by disconnecting and immediately connecting again.\n                # The new VoiceConnectionState object receives the voice_state_update event containing channel=None while still\n                # connecting leaving it in a bad state.  Since there's no nice way to transfer state to the new one, we have to do this.\n                try:\n                    await asyncio.wait_for(self._disconnected.wait(), timeout=self.timeout)\n                except TimeoutError:\n                    _log.debug('Timed out waiting for voice disconnection confirmation')\n                except asyncio.CancelledError:\n                    pass\n\n            if cleanup:\n                self.voice_client.cleanup()\n\n    async def soft_disconnect(self, *, with_state: ConnectionFlowState = ConnectionFlowState.got_both_voice_updates) -> None:\n        _log.debug('Soft disconnecting from voice')\n        # Stop the websocket reader because closing the websocket will trigger an unwanted reconnect\n        if self._runner:\n            self._runner.cancel()\n            self._runner = None\n\n        try:\n            if self.ws:\n                await self.ws.close()\n        except Exception:\n            _log.debug('Ignoring exception soft disconnecting from voice', exc_info=True)\n        finally:\n            self.state = with_state\n            self._socket_reader.pause()\n\n            if self.socket:\n                self.socket.close()\n\n            self.ip = MISSING\n            self.port = MISSING\n\n    async def move_to(self, channel: Optional[abc.Snowflake], timeout: Optional[float]) -> None:\n        if channel is None:\n            # This function should only be called externally so its ok to wait for the disconnect.\n            await self.disconnect(wait=True)\n            return\n\n        if self.voice_client.channel and channel.id == self.voice_client.channel.id:\n            return\n\n        previous_state = self.state\n\n        # this is only an outgoing ws request\n        # if it fails, nothing happens and nothing changes (besides self.state)\n        await self._move_to(channel)\n\n        last_state = self.state\n        try:\n            await self.wait_async(timeout)\n        except asyncio.TimeoutError:\n            _log.warning('Timed out trying to move to channel %s in guild %s', channel.id, self.guild.id)\n            if self.state is last_state:\n                _log.debug('Reverting to previous state %s', previous_state.name)\n                self.state = previous_state\n\n    def wait(self, timeout: Optional[float] = None) -> bool:\n        return self._connected.wait(timeout)\n\n    async def wait_async(self, timeout: Optional[float] = None) -> None:\n        await self._wait_for_state(ConnectionFlowState.connected, timeout=timeout)\n\n    def is_connected(self) -> bool:\n        return self.state is ConnectionFlowState.connected\n\n    def send_packet(self, packet: bytes) -> None:\n        self.socket.sendall(packet)\n\n    def add_socket_listener(self, callback: SocketReaderCallback) -> None:\n        _log.debug('Registering socket listener callback %s', callback)\n        self._socket_reader.register(callback)\n\n    def remove_socket_listener(self, callback: SocketReaderCallback) -> None:\n        _log.debug('Unregistering socket listener callback %s', callback)\n        self._socket_reader.unregister(callback)\n\n    def _inside_runner(self) -> bool:\n        return self._runner is not None and asyncio.current_task() == self._runner\n\n    async def _wait_for_state(\n        self, state: ConnectionFlowState, *other_states: ConnectionFlowState, timeout: Optional[float] = None\n    ) -> None:\n        states = (state, *other_states)\n        while True:\n            if self.state in states:\n                return\n            await sane_wait_for([self._state_event.wait()], timeout=timeout)\n\n    async def _voice_connect(self, *, self_deaf: bool = False, self_mute: bool = False) -> None:\n        channel = self.voice_client.channel\n        await channel.guild.change_voice_state(channel=channel, self_deaf=self_deaf, self_mute=self_mute)\n\n    async def _voice_disconnect(self) -> None:\n        _log.info(\n            'The voice handshake is being terminated for Channel ID %s (Guild ID %s)',\n            self.voice_client.channel.id,\n            self.voice_client.guild.id,\n        )\n        self.state = ConnectionFlowState.disconnected\n        await self.voice_client.channel.guild.change_voice_state(channel=None)\n        self._expecting_disconnect = True\n        self._disconnected.clear()\n\n    async def _connect_websocket(self, resume: bool) -> DiscordVoiceWebSocket:\n        ws = await DiscordVoiceWebSocket.from_connection_state(self, resume=resume, hook=self.hook)\n        self.state = ConnectionFlowState.websocket_connected\n        return ws\n\n    async def _handshake_websocket(self) -> None:\n        while not self.ip:\n            await self.ws.poll_event()\n        self.state = ConnectionFlowState.got_ip_discovery\n        while self.ws.secret_key is None:\n            await self.ws.poll_event()\n        self.state = ConnectionFlowState.connected\n\n    def _create_socket(self) -> None:\n        self.socket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)\n        self.socket.setblocking(False)\n        self._socket_reader.resume()\n\n    async def _poll_voice_ws(self, reconnect: bool) -> None:\n        backoff = ExponentialBackoff()\n        while True:\n            try:\n                await self.ws.poll_event()\n            except asyncio.CancelledError:\n                return\n            except (ConnectionClosed, asyncio.TimeoutError) as exc:\n                if isinstance(exc, ConnectionClosed):\n                    # The following close codes are undocumented so I will document them here.\n                    # 1000 - normal closure (obviously)\n                    # 4014 - we were externally disconnected (voice channel deleted, we were moved, etc)\n                    # 4015 - voice server has crashed\n                    if exc.code in (1000, 4015):\n                        # Don't call disconnect a second time if the websocket closed from a disconnect call\n                        if not self._expecting_disconnect:\n                            _log.info('Disconnecting from voice normally, close code %d.', exc.code)\n                            await self.disconnect()\n                        break\n\n                    if exc.code == 4014:\n                        # We were disconnected by discord\n                        # This condition is a race between the main ws event and the voice ws closing\n                        if self._disconnected.is_set():\n                            _log.info('Disconnected from voice by discord, close code %d.', exc.code)\n                            await self.disconnect()\n                            break\n\n                        # We may have been moved to a different channel\n                        _log.info('Disconnected from voice by force... potentially reconnecting.')\n                        successful = await self._potential_reconnect()\n                        if not successful:\n                            _log.info('Reconnect was unsuccessful, disconnecting from voice normally...')\n                            # Don't bother to disconnect if already disconnected\n                            if self.state is not ConnectionFlowState.disconnected:\n                                await self.disconnect()\n                            break\n                        else:\n                            continue\n\n                    _log.debug('Not handling close code %s (%s)', exc.code, exc.reason or 'no reason')\n\n                if not reconnect:\n                    await self.disconnect()\n                    raise\n\n                retry = backoff.delay()\n                _log.exception('Disconnected from voice... Reconnecting in %.2fs.', retry)\n                await asyncio.sleep(retry)\n                await self.disconnect(cleanup=False)\n\n                try:\n                    await self._connect(\n                        reconnect=reconnect,\n                        timeout=self.timeout,\n                        self_deaf=(self.self_voice_state or self).self_deaf,\n                        self_mute=(self.self_voice_state or self).self_mute,\n                        resume=False,\n                    )\n                except asyncio.TimeoutError:\n                    # at this point we've retried 5 times... let's continue the loop.\n                    _log.warning('Could not connect to voice... Retrying...')\n                    continue\n\n    async def _potential_reconnect(self) -> bool:\n        try:\n            await self._wait_for_state(\n                ConnectionFlowState.got_voice_server_update,\n                ConnectionFlowState.got_both_voice_updates,\n                ConnectionFlowState.disconnected,\n                timeout=self.timeout,\n            )\n        except asyncio.TimeoutError:\n            return False\n        else:\n            if self.state is ConnectionFlowState.disconnected:\n                return False\n\n        previous_ws = self.ws\n        try:\n            self.ws = await self._connect_websocket(False)\n            await self._handshake_websocket()\n        except (ConnectionClosed, asyncio.TimeoutError):\n            return False\n        else:\n            return True\n        finally:\n            await previous_ws.close()\n\n    async def _move_to(self, channel: abc.Snowflake) -> None:\n        await self.voice_client.channel.guild.change_voice_state(channel=channel)\n        self.state = ConnectionFlowState.set_guild_voice_state\n\n    def _update_voice_channel(self, channel_id: Optional[int]) -> None:\n        self.voice_client.channel = channel_id and self.guild.get_channel(channel_id)  # type: ignore\n"
  },
  {
    "path": "discord/webhook/__init__.py",
    "content": "\"\"\"\ndiscord.webhook\n~~~~~~~~~~~~~~\n\nWebhook support\n\n:copyright: (c) 2015-present Rapptz\n:license: MIT, see LICENSE for more details.\n\n\"\"\"\n\nfrom .async_ import *\nfrom .sync import *\n"
  },
  {
    "path": "discord/webhook/async_.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom __future__ import annotations\n\nimport logging\nimport asyncio\nimport re\n\nfrom urllib.parse import quote as urlquote\nfrom typing import Any, Dict, List, Literal, Optional, TYPE_CHECKING, Sequence, Tuple, Union, TypeVar, Type, overload\nfrom contextvars import ContextVar\nimport weakref\n\nimport aiohttp\n\nfrom .. import utils\nfrom ..errors import HTTPException, Forbidden, NotFound, DiscordServerError\nfrom ..message import Message\nfrom ..enums import try_enum, WebhookType, ChannelType\nfrom ..user import BaseUser, User\nfrom ..flags import MessageFlags\nfrom ..asset import Asset\nfrom ..partial_emoji import PartialEmoji\nfrom ..http import Route, handle_message_parameters, MultipartParameters, HTTPClient, json_or_text\nfrom ..mixins import Hashable\nfrom ..channel import TextChannel, ForumChannel, PartialMessageable, ForumTag\nfrom ..file import File\n\n__all__ = (\n    'Webhook',\n    'WebhookMessage',\n    'PartialWebhookChannel',\n    'PartialWebhookGuild',\n)\n\n_log = logging.getLogger(__name__)\n\nif TYPE_CHECKING:\n    from typing_extensions import Self\n    from types import TracebackType\n\n    from ..embeds import Embed\n    from ..client import Client\n    from ..mentions import AllowedMentions\n    from ..message import Attachment\n    from ..state import ConnectionState\n    from ..http import Response\n    from ..guild import Guild\n    from ..emoji import Emoji\n    from ..channel import VoiceChannel\n    from ..abc import Snowflake\n    from ..ui.view import View\n    from ..poll import Poll\n    import datetime\n    from ..types.webhook import (\n        Webhook as WebhookPayload,\n        SourceGuild as SourceGuildPayload,\n    )\n    from ..types.message import (\n        Message as MessagePayload,\n    )\n    from ..types.user import (\n        User as UserPayload,\n        PartialUser as PartialUserPayload,\n    )\n    from ..types.channel import (\n        PartialChannel as PartialChannelPayload,\n    )\n    from ..types.emoji import PartialEmoji as PartialEmojiPayload\n    from ..types.snowflake import SnowflakeList\n\n    BE = TypeVar('BE', bound=BaseException)\n    _State = Union[ConnectionState, '_WebhookState']\n\nMISSING: Any = utils.MISSING\n\n\nclass AsyncDeferredLock:\n    def __init__(self, lock: asyncio.Lock):\n        self.lock = lock\n        self.delta: Optional[float] = None\n\n    async def __aenter__(self) -> Self:\n        await self.lock.acquire()\n        return self\n\n    def delay_by(self, delta: float) -> None:\n        self.delta = delta\n\n    async def __aexit__(\n        self,\n        exc_type: Optional[Type[BE]],\n        exc: Optional[BE],\n        traceback: Optional[TracebackType],\n    ) -> None:\n        if self.delta:\n            await asyncio.sleep(self.delta)\n        self.lock.release()\n\n\nclass AsyncWebhookAdapter:\n    def __init__(self):\n        self._locks: weakref.WeakValueDictionary[Any, asyncio.Lock] = weakref.WeakValueDictionary()\n\n    async def request(\n        self,\n        route: Route,\n        session: aiohttp.ClientSession,\n        *,\n        payload: Optional[Dict[str, Any]] = None,\n        multipart: Optional[List[Dict[str, Any]]] = None,\n        proxy: Optional[str] = None,\n        proxy_auth: Optional[aiohttp.BasicAuth] = None,\n        files: Optional[Sequence[File]] = None,\n        reason: Optional[str] = None,\n        auth_token: Optional[str] = None,\n        params: Optional[Dict[str, Any]] = None,\n    ) -> Any:\n        headers: Dict[str, str] = {}\n        files = files or []\n        to_send: Optional[Union[str, aiohttp.FormData]] = None\n        bucket = (route.webhook_id, route.webhook_token)\n\n        try:\n            lock = self._locks[bucket]\n        except KeyError:\n            self._locks[bucket] = lock = asyncio.Lock()\n\n        if payload is not None:\n            headers['Content-Type'] = 'application/json'\n            to_send = utils._to_json(payload)\n\n        if auth_token is not None:\n            headers['Authorization'] = f'Bot {auth_token}'\n\n        if reason is not None:\n            headers['X-Audit-Log-Reason'] = urlquote(reason, safe='/ ')\n\n        response: Optional[aiohttp.ClientResponse] = None\n        data: Optional[Union[Dict[str, Any], str]] = None\n        method = route.method\n        url = route.url\n        webhook_id = route.webhook_id\n\n        async with AsyncDeferredLock(lock) as lock:\n            for attempt in range(5):\n                for file in files:\n                    file.reset(seek=attempt)\n\n                if multipart:\n                    form_data = aiohttp.FormData(quote_fields=False)\n                    for p in multipart:\n                        form_data.add_field(**p)\n                    to_send = form_data\n\n                try:\n                    async with session.request(\n                        method, url, data=to_send, headers=headers, params=params, proxy=proxy, proxy_auth=proxy_auth\n                    ) as response:\n                        _log.debug(\n                            'Webhook ID %s with %s %s has returned status code %s',\n                            webhook_id,\n                            method,\n                            url,\n                            response.status,\n                        )\n                        data = await json_or_text(response)\n\n                        remaining = response.headers.get('X-Ratelimit-Remaining')\n                        if remaining == '0' and response.status != 429:\n                            delta = utils._parse_ratelimit_header(response)\n                            _log.debug(\n                                'Webhook ID %s has exhausted its rate limit bucket (retry: %s).',\n                                webhook_id,\n                                delta,\n                            )\n                            lock.delay_by(delta)\n\n                        if 300 > response.status >= 200:\n                            return data\n\n                        if response.status == 429:\n                            if not response.headers.get('Via'):\n                                raise HTTPException(response, data)\n                            fmt = 'Webhook ID %s is rate limited. Retrying in %.2f seconds.'\n\n                            retry_after: float = data['retry_after']  # type: ignore\n                            _log.warning(fmt, webhook_id, retry_after)\n                            await asyncio.sleep(retry_after)\n                            continue\n\n                        if response.status >= 500:\n                            await asyncio.sleep(1 + attempt * 2)\n                            continue\n\n                        if response.status == 403:\n                            raise Forbidden(response, data)\n                        elif response.status == 404:\n                            raise NotFound(response, data)\n                        else:\n                            raise HTTPException(response, data)\n\n                except OSError as e:\n                    if attempt < 4 and e.errno in (54, 10054):\n                        await asyncio.sleep(1 + attempt * 2)\n                        continue\n                    raise\n\n            if response:\n                if response.status >= 500:\n                    raise DiscordServerError(response, data)\n                raise HTTPException(response, data)\n\n            raise RuntimeError('Unreachable code in HTTP handling.')\n\n    def delete_webhook(\n        self,\n        webhook_id: int,\n        *,\n        token: Optional[str] = None,\n        session: aiohttp.ClientSession,\n        proxy: Optional[str] = None,\n        proxy_auth: Optional[aiohttp.BasicAuth] = None,\n        reason: Optional[str] = None,\n    ) -> Response[None]:\n        route = Route('DELETE', '/webhooks/{webhook_id}', webhook_id=webhook_id)\n        return self.request(route, session=session, proxy=proxy, proxy_auth=proxy_auth, reason=reason, auth_token=token)\n\n    def delete_webhook_with_token(\n        self,\n        webhook_id: int,\n        token: str,\n        *,\n        session: aiohttp.ClientSession,\n        proxy: Optional[str] = None,\n        proxy_auth: Optional[aiohttp.BasicAuth] = None,\n        reason: Optional[str] = None,\n    ) -> Response[None]:\n        route = Route('DELETE', '/webhooks/{webhook_id}/{webhook_token}', webhook_id=webhook_id, webhook_token=token)\n        return self.request(route, session=session, proxy=proxy, proxy_auth=proxy_auth, reason=reason)\n\n    def edit_webhook(\n        self,\n        webhook_id: int,\n        token: str,\n        payload: Dict[str, Any],\n        *,\n        session: aiohttp.ClientSession,\n        proxy: Optional[str] = None,\n        proxy_auth: Optional[aiohttp.BasicAuth] = None,\n        reason: Optional[str] = None,\n    ) -> Response[WebhookPayload]:\n        route = Route('PATCH', '/webhooks/{webhook_id}', webhook_id=webhook_id)\n        return self.request(\n            route,\n            session=session,\n            proxy=proxy,\n            proxy_auth=proxy_auth,\n            reason=reason,\n            payload=payload,\n            auth_token=token,\n        )\n\n    def edit_webhook_with_token(\n        self,\n        webhook_id: int,\n        token: str,\n        payload: Dict[str, Any],\n        *,\n        session: aiohttp.ClientSession,\n        proxy: Optional[str] = None,\n        proxy_auth: Optional[aiohttp.BasicAuth] = None,\n        reason: Optional[str] = None,\n    ) -> Response[WebhookPayload]:\n        route = Route('PATCH', '/webhooks/{webhook_id}/{webhook_token}', webhook_id=webhook_id, webhook_token=token)\n        return self.request(route, session=session, proxy=proxy, proxy_auth=proxy_auth, reason=reason, payload=payload)\n\n    def execute_webhook(\n        self,\n        webhook_id: int,\n        token: str,\n        *,\n        session: aiohttp.ClientSession,\n        proxy: Optional[str] = None,\n        proxy_auth: Optional[aiohttp.BasicAuth] = None,\n        payload: Optional[Dict[str, Any]] = None,\n        multipart: Optional[List[Dict[str, Any]]] = None,\n        files: Optional[Sequence[File]] = None,\n        thread_id: Optional[int] = None,\n        wait: bool = False,\n    ) -> Response[Optional[MessagePayload]]:\n        params = {'wait': int(wait)}\n        if thread_id:\n            params['thread_id'] = thread_id\n        route = Route('POST', '/webhooks/{webhook_id}/{webhook_token}', webhook_id=webhook_id, webhook_token=token)\n        return self.request(\n            route,\n            session=session,\n            proxy=proxy,\n            proxy_auth=proxy_auth,\n            payload=payload,\n            multipart=multipart,\n            files=files,\n            params=params,\n        )\n\n    def get_webhook_message(\n        self,\n        webhook_id: int,\n        token: str,\n        message_id: int,\n        *,\n        session: aiohttp.ClientSession,\n        proxy: Optional[str] = None,\n        proxy_auth: Optional[aiohttp.BasicAuth] = None,\n        thread_id: Optional[int] = None,\n    ) -> Response[MessagePayload]:\n        route = Route(\n            'GET',\n            '/webhooks/{webhook_id}/{webhook_token}/messages/{message_id}',\n            webhook_id=webhook_id,\n            webhook_token=token,\n            message_id=message_id,\n        )\n        params = None if thread_id is None else {'thread_id': thread_id}\n        return self.request(route, session=session, proxy=proxy, proxy_auth=proxy_auth, params=params)\n\n    def edit_webhook_message(\n        self,\n        webhook_id: int,\n        token: str,\n        message_id: int,\n        *,\n        session: aiohttp.ClientSession,\n        proxy: Optional[str] = None,\n        proxy_auth: Optional[aiohttp.BasicAuth] = None,\n        payload: Optional[Dict[str, Any]] = None,\n        multipart: Optional[List[Dict[str, Any]]] = None,\n        files: Optional[Sequence[File]] = None,\n        thread_id: Optional[int] = None,\n    ) -> Response[Message]:\n        route = Route(\n            'PATCH',\n            '/webhooks/{webhook_id}/{webhook_token}/messages/{message_id}',\n            webhook_id=webhook_id,\n            webhook_token=token,\n            message_id=message_id,\n        )\n        params = None if thread_id is None else {'thread_id': thread_id}\n        return self.request(\n            route,\n            session=session,\n            proxy=proxy,\n            proxy_auth=proxy_auth,\n            payload=payload,\n            multipart=multipart,\n            files=files,\n            params=params,\n        )\n\n    def delete_webhook_message(\n        self,\n        webhook_id: int,\n        token: str,\n        message_id: int,\n        *,\n        session: aiohttp.ClientSession,\n        proxy: Optional[str] = None,\n        proxy_auth: Optional[aiohttp.BasicAuth] = None,\n        thread_id: Optional[int] = None,\n    ) -> Response[None]:\n        route = Route(\n            'DELETE',\n            '/webhooks/{webhook_id}/{webhook_token}/messages/{message_id}',\n            webhook_id=webhook_id,\n            webhook_token=token,\n            message_id=message_id,\n        )\n        params = None if thread_id is None else {'thread_id': thread_id}\n        return self.request(route, session=session, proxy=proxy, proxy_auth=proxy_auth, params=params)\n\n    def fetch_webhook(\n        self,\n        webhook_id: int,\n        token: str,\n        *,\n        session: aiohttp.ClientSession,\n        proxy: Optional[str] = None,\n        proxy_auth: Optional[aiohttp.BasicAuth] = None,\n    ) -> Response[WebhookPayload]:\n        route = Route('GET', '/webhooks/{webhook_id}', webhook_id=webhook_id)\n        return self.request(route, session=session, proxy=proxy, proxy_auth=proxy_auth, auth_token=token)\n\n    def fetch_webhook_with_token(\n        self,\n        webhook_id: int,\n        token: str,\n        *,\n        session: aiohttp.ClientSession,\n        proxy: Optional[str] = None,\n        proxy_auth: Optional[aiohttp.BasicAuth] = None,\n    ) -> Response[WebhookPayload]:\n        route = Route('GET', '/webhooks/{webhook_id}/{webhook_token}', webhook_id=webhook_id, webhook_token=token)\n        return self.request(route, session=session, proxy=proxy, proxy_auth=proxy_auth)\n\n    def create_interaction_response(\n        self,\n        interaction_id: int,\n        token: str,\n        *,\n        session: aiohttp.ClientSession,\n        proxy: Optional[str] = None,\n        proxy_auth: Optional[aiohttp.BasicAuth] = None,\n        params: MultipartParameters,\n    ) -> Response[None]:\n        route = Route(\n            'POST',\n            '/interactions/{webhook_id}/{webhook_token}/callback',\n            webhook_id=interaction_id,\n            webhook_token=token,\n        )\n\n        if params.files:\n            return self.request(\n                route,\n                session=session,\n                proxy=proxy,\n                proxy_auth=proxy_auth,\n                files=params.files,\n                multipart=params.multipart,\n            )\n        else:\n            return self.request(route, session=session, proxy=proxy, proxy_auth=proxy_auth, payload=params.payload)\n\n    def get_original_interaction_response(\n        self,\n        application_id: int,\n        token: str,\n        *,\n        session: aiohttp.ClientSession,\n        proxy: Optional[str] = None,\n        proxy_auth: Optional[aiohttp.BasicAuth] = None,\n    ) -> Response[MessagePayload]:\n        r = Route(\n            'GET',\n            '/webhooks/{webhook_id}/{webhook_token}/messages/@original',\n            webhook_id=application_id,\n            webhook_token=token,\n        )\n        return self.request(r, session=session, proxy=proxy, proxy_auth=proxy_auth)\n\n    def edit_original_interaction_response(\n        self,\n        application_id: int,\n        token: str,\n        *,\n        session: aiohttp.ClientSession,\n        proxy: Optional[str] = None,\n        proxy_auth: Optional[aiohttp.BasicAuth] = None,\n        payload: Optional[Dict[str, Any]] = None,\n        multipart: Optional[List[Dict[str, Any]]] = None,\n        files: Optional[Sequence[File]] = None,\n    ) -> Response[MessagePayload]:\n        r = Route(\n            'PATCH',\n            '/webhooks/{webhook_id}/{webhook_token}/messages/@original',\n            webhook_id=application_id,\n            webhook_token=token,\n        )\n        return self.request(\n            r,\n            session=session,\n            proxy=proxy,\n            proxy_auth=proxy_auth,\n            payload=payload,\n            multipart=multipart,\n            files=files,\n        )\n\n    def delete_original_interaction_response(\n        self,\n        application_id: int,\n        token: str,\n        *,\n        session: aiohttp.ClientSession,\n        proxy: Optional[str] = None,\n        proxy_auth: Optional[aiohttp.BasicAuth] = None,\n    ) -> Response[None]:\n        r = Route(\n            'DELETE',\n            '/webhooks/{webhook_id}/{webhook_token}/messages/@original',\n            webhook_id=application_id,\n            webhook_token=token,\n        )\n        return self.request(r, session=session, proxy=proxy, proxy_auth=proxy_auth)\n\n\ndef interaction_response_params(type: int, data: Optional[Dict[str, Any]] = None) -> MultipartParameters:\n    payload: Dict[str, Any] = {\n        'type': type,\n    }\n    if data is not None:\n        payload['data'] = data\n\n    return MultipartParameters(payload=payload, multipart=None, files=None)\n\n\n# This is a subset of handle_message_parameters\ndef interaction_message_response_params(\n    *,\n    type: int,\n    content: Optional[str] = MISSING,\n    tts: bool = False,\n    flags: MessageFlags = MISSING,\n    file: File = MISSING,\n    files: Sequence[File] = MISSING,\n    embed: Optional[Embed] = MISSING,\n    embeds: Sequence[Embed] = MISSING,\n    attachments: Sequence[Union[Attachment, File]] = MISSING,\n    view: Optional[View] = MISSING,\n    allowed_mentions: Optional[AllowedMentions] = MISSING,\n    previous_allowed_mentions: Optional[AllowedMentions] = None,\n    poll: Poll = MISSING,\n) -> MultipartParameters:\n    if files is not MISSING and file is not MISSING:\n        raise TypeError('Cannot mix file and files keyword arguments.')\n    if embeds is not MISSING and embed is not MISSING:\n        raise TypeError('Cannot mix embed and embeds keyword arguments.')\n\n    if file is not MISSING:\n        files = [file]\n\n    if attachments is not MISSING and files is not MISSING:\n        raise TypeError('Cannot mix attachments and files keyword arguments.')\n\n    data: Optional[Dict[str, Any]] = {\n        'tts': tts,\n    }\n\n    if embeds is not MISSING:\n        if len(embeds) > 10:\n            raise ValueError('embeds has a maximum of 10 elements.')\n        data['embeds'] = [e.to_dict() for e in embeds]\n\n    if embed is not MISSING:\n        if embed is None:\n            data['embeds'] = []\n        else:\n            data['embeds'] = [embed.to_dict()]\n\n    if content is not MISSING:\n        if content is not None:\n            data['content'] = str(content)\n        else:\n            data['content'] = None\n\n    if view is not MISSING:\n        if view is not None:\n            data['components'] = view.to_components()\n        else:\n            data['components'] = []\n\n    if flags is not MISSING:\n        data['flags'] = flags.value\n\n    if allowed_mentions:\n        if previous_allowed_mentions is not None:\n            data['allowed_mentions'] = previous_allowed_mentions.merge(allowed_mentions).to_dict()\n        else:\n            data['allowed_mentions'] = allowed_mentions.to_dict()\n    elif previous_allowed_mentions is not None:\n        data['allowed_mentions'] = previous_allowed_mentions.to_dict()\n\n    if attachments is MISSING:\n        attachments = files\n    else:\n        files = [a for a in attachments if isinstance(a, File)]\n\n    if attachments is not MISSING:\n        file_index = 0\n        attachments_payload = []\n        for attachment in attachments:\n            if isinstance(attachment, File):\n                attachments_payload.append(attachment.to_dict(file_index))\n                file_index += 1\n            else:\n                attachments_payload.append(attachment.to_dict())\n\n        data['attachments'] = attachments_payload\n\n    if poll is not MISSING:\n        data['poll'] = poll._to_dict()\n\n    multipart = []\n    if files:\n        data = {'type': type, 'data': data}\n        multipart.append({'name': 'payload_json', 'value': utils._to_json(data)})\n        data = None\n        for index, file in enumerate(files):\n            multipart.append(\n                {\n                    'name': f'files[{index}]',\n                    'value': file.fp,\n                    'filename': file.filename,\n                    'content_type': 'application/octet-stream',\n                }\n            )\n    else:\n        data = {'type': type, 'data': data}\n\n    return MultipartParameters(payload=data, multipart=multipart, files=files)\n\n\nasync_context: ContextVar[AsyncWebhookAdapter] = ContextVar('async_webhook_context', default=AsyncWebhookAdapter())\n\n\nclass PartialWebhookChannel(Hashable):\n    \"\"\"Represents a partial channel for webhooks.\n\n    These are typically given for channel follower webhooks.\n\n    .. versionadded:: 2.0\n\n    Attributes\n    -----------\n    id: :class:`int`\n        The partial channel's ID.\n    name: :class:`str`\n        The partial channel's name.\n    \"\"\"\n\n    __slots__ = ('id', 'name')\n\n    def __init__(self, *, data: PartialChannelPayload) -> None:\n        self.id: int = int(data['id'])\n        self.name: str = data['name']\n\n    def __repr__(self) -> str:\n        return f'<PartialWebhookChannel name={self.name!r} id={self.id}>'\n\n\nclass PartialWebhookGuild(Hashable):\n    \"\"\"Represents a partial guild for webhooks.\n\n    These are typically given for channel follower webhooks.\n\n    .. versionadded:: 2.0\n\n    Attributes\n    -----------\n    id: :class:`int`\n        The partial guild's ID.\n    name: :class:`str`\n        The partial guild's name.\n    \"\"\"\n\n    __slots__ = ('id', 'name', '_icon', '_state')\n\n    def __init__(self, *, data: SourceGuildPayload, state: _State) -> None:\n        self._state: _State = state\n        self.id: int = int(data['id'])\n        self.name: str = data['name']\n        self._icon: str = data['icon']\n\n    def __repr__(self) -> str:\n        return f'<PartialWebhookGuild name={self.name!r} id={self.id}>'\n\n    @property\n    def icon(self) -> Optional[Asset]:\n        \"\"\"Optional[:class:`Asset`]: Returns the guild's icon asset, if available.\"\"\"\n        if self._icon is None:\n            return None\n        return Asset._from_guild_icon(self._state, self.id, self._icon)\n\n\nclass _FriendlyHttpAttributeErrorHelper:\n    __slots__ = ()\n\n    def __getattr__(self, attr: str) -> Any:\n        raise AttributeError('PartialWebhookState does not support http methods.')\n\n\nclass _WebhookState:\n    __slots__ = ('_parent', '_webhook', '_thread')\n\n    def __init__(self, webhook: Any, parent: Optional[_State], thread: Snowflake = MISSING):\n        self._webhook: Any = webhook\n\n        self._parent: Optional[ConnectionState]\n        if isinstance(parent, _WebhookState):\n            self._parent = None\n        else:\n            self._parent = parent\n\n        self._thread: Snowflake = thread\n\n    def _get_guild(self, guild_id: Optional[int]) -> Optional[Guild]:\n        if self._parent is not None:\n            return self._parent._get_guild(guild_id)\n        return None\n\n    def _get_poll(self, msg_id: Optional[int]) -> Optional[Poll]:\n        if self._parent is not None:\n            return self._parent._get_poll(msg_id)\n        return None\n\n    def store_user(self, data: Union[UserPayload, PartialUserPayload], *, cache: bool = True) -> BaseUser:\n        if self._parent is not None:\n            return self._parent.store_user(data, cache=cache)\n        # state parameter is artificial\n        return BaseUser(state=self, data=data)  # type: ignore\n\n    def create_user(self, data: Union[UserPayload, PartialUserPayload]) -> BaseUser:\n        # state parameter is artificial\n        return BaseUser(state=self, data=data)  # type: ignore\n\n    @property\n    def allowed_mentions(self) -> Optional[AllowedMentions]:\n        return None\n\n    def get_reaction_emoji(self, data: PartialEmojiPayload) -> Union[PartialEmoji, Emoji, str]:\n        if self._parent is not None:\n            return self._parent.get_reaction_emoji(data)\n\n        emoji_id = utils._get_as_snowflake(data, 'id')\n\n        if not emoji_id:\n            # the name key will be a str\n            return data['name']  # type: ignore\n\n        return PartialEmoji(animated=data.get('animated', False), id=emoji_id, name=data['name'])  # type: ignore\n\n    @property\n    def http(self) -> Union[HTTPClient, _FriendlyHttpAttributeErrorHelper]:\n        if self._parent is not None:\n            return self._parent.http\n\n        # Some data classes assign state.http and that should be kosher\n        # however, using it should result in a late-binding error.\n        return _FriendlyHttpAttributeErrorHelper()\n\n    def __getattr__(self, attr: str) -> Any:\n        if self._parent is not None:\n            return getattr(self._parent, attr)\n\n        raise AttributeError(f'PartialWebhookState does not support {attr!r}.')\n\n\nclass WebhookMessage(Message):\n    \"\"\"Represents a message sent from your webhook.\n\n    This allows you to edit or delete a message sent by your\n    webhook.\n\n    This inherits from :class:`discord.Message` with changes to\n    :meth:`edit` and :meth:`delete` to work.\n\n    .. versionadded:: 1.6\n    \"\"\"\n\n    _state: _WebhookState\n\n    async def edit(\n        self,\n        *,\n        content: Optional[str] = MISSING,\n        embeds: Sequence[Embed] = MISSING,\n        embed: Optional[Embed] = MISSING,\n        attachments: Sequence[Union[Attachment, File]] = MISSING,\n        view: Optional[View] = MISSING,\n        allowed_mentions: Optional[AllowedMentions] = None,\n    ) -> WebhookMessage:\n        \"\"\"|coro|\n\n        Edits the message.\n\n        .. versionadded:: 1.6\n\n        .. versionchanged:: 2.0\n            The edit is no longer in-place, instead the newly edited message is returned.\n\n        .. versionchanged:: 2.0\n            This function will now raise :exc:`ValueError` instead of\n            ``InvalidArgument``.\n\n        Parameters\n        ------------\n        content: Optional[:class:`str`]\n            The content to edit the message with or ``None`` to clear it.\n        embeds: List[:class:`Embed`]\n            A list of embeds to edit the message with.\n        embed: Optional[:class:`Embed`]\n            The embed to edit the message with. ``None`` suppresses the embeds.\n            This should not be mixed with the ``embeds`` parameter.\n        attachments: List[Union[:class:`Attachment`, :class:`File`]]\n            A list of attachments to keep in the message as well as new files to upload. If ``[]`` is passed\n            then all attachments are removed.\n\n            .. note::\n\n                New files will always appear after current attachments.\n\n            .. versionadded:: 2.0\n        allowed_mentions: :class:`AllowedMentions`\n            Controls the mentions being processed in this message.\n            See :meth:`.abc.Messageable.send` for more information.\n        view: Optional[:class:`~discord.ui.View`]\n            The updated view to update this message with. If ``None`` is passed then\n            the view is removed.\n\n            .. versionadded:: 2.0\n\n        Raises\n        -------\n        HTTPException\n            Editing the message failed.\n        Forbidden\n            Edited a message that is not yours.\n        TypeError\n            You specified both ``embed`` and ``embeds``\n        ValueError\n            The length of ``embeds`` was invalid or\n            there was no token associated with this webhook.\n\n        Returns\n        --------\n        :class:`WebhookMessage`\n            The newly edited message.\n        \"\"\"\n        return await self._state._webhook.edit_message(\n            self.id,\n            content=content,\n            embeds=embeds,\n            embed=embed,\n            attachments=attachments,\n            view=view,\n            allowed_mentions=allowed_mentions,\n            thread=self._state._thread,\n        )\n\n    async def add_files(self, *files: File) -> WebhookMessage:\n        r\"\"\"|coro|\n\n        Adds new files to the end of the message attachments.\n\n        .. versionadded:: 2.0\n\n        Parameters\n        -----------\n        \\*files: :class:`File`\n            New files to add to the message.\n\n        Raises\n        -------\n        HTTPException\n            Editing the message failed.\n        Forbidden\n            Tried to edit a message that isn't yours.\n\n        Returns\n        --------\n        :class:`WebhookMessage`\n            The newly edited message.\n        \"\"\"\n        return await self.edit(attachments=[*self.attachments, *files])\n\n    async def remove_attachments(self, *attachments: Attachment) -> WebhookMessage:\n        r\"\"\"|coro|\n\n        Removes attachments from the message.\n\n        .. versionadded:: 2.0\n\n        Parameters\n        -----------\n        \\*attachments: :class:`Attachment`\n            Attachments to remove from the message.\n\n        Raises\n        -------\n        HTTPException\n            Editing the message failed.\n        Forbidden\n            Tried to edit a message that isn't yours.\n\n        Returns\n        --------\n        :class:`WebhookMessage`\n            The newly edited message.\n        \"\"\"\n        return await self.edit(attachments=[a for a in self.attachments if a not in attachments])\n\n    async def delete(self, *, delay: Optional[float] = None) -> None:\n        \"\"\"|coro|\n\n        Deletes the message.\n\n        Parameters\n        -----------\n        delay: Optional[:class:`float`]\n            If provided, the number of seconds to wait before deleting the message.\n            The waiting is done in the background and deletion failures are ignored.\n\n        Raises\n        ------\n        Forbidden\n            You do not have proper permissions to delete the message.\n        NotFound\n            The message was deleted already.\n        HTTPException\n            Deleting the message failed.\n        \"\"\"\n\n        if delay is not None:\n\n            async def inner_call(delay: float = delay):\n                await asyncio.sleep(delay)\n                try:\n                    await self._state._webhook.delete_message(self.id, thread=self._state._thread)\n                except HTTPException:\n                    pass\n\n            asyncio.create_task(inner_call())\n        else:\n            await self._state._webhook.delete_message(self.id, thread=self._state._thread)\n\n\nclass BaseWebhook(Hashable):\n    __slots__: Tuple[str, ...] = (\n        'id',\n        'type',\n        'guild_id',\n        'channel_id',\n        'token',\n        'auth_token',\n        'user',\n        'name',\n        '_avatar',\n        'source_channel',\n        'source_guild',\n        '_state',\n    )\n\n    def __init__(\n        self,\n        data: WebhookPayload,\n        token: Optional[str] = None,\n        state: Optional[_State] = None,\n    ) -> None:\n        self.auth_token: Optional[str] = token\n        self._state: _State = state or _WebhookState(self, parent=state)\n        self._update(data)\n\n    def _update(self, data: WebhookPayload) -> None:\n        self.id: int = int(data['id'])\n        self.type: WebhookType = try_enum(WebhookType, int(data['type']))\n        self.channel_id: Optional[int] = utils._get_as_snowflake(data, 'channel_id')\n        self.guild_id: Optional[int] = utils._get_as_snowflake(data, 'guild_id')\n        self.name: Optional[str] = data.get('name')\n        self._avatar: Optional[str] = data.get('avatar')\n        self.token: Optional[str] = data.get('token')\n\n        user = data.get('user')\n        self.user: Optional[Union[BaseUser, User]] = None\n        if user is not None:\n            # state parameter may be _WebhookState\n            self.user = User(state=self._state, data=user)  # type: ignore\n\n        source_channel = data.get('source_channel')\n        if source_channel:\n            source_channel = PartialWebhookChannel(data=source_channel)\n\n        self.source_channel: Optional[PartialWebhookChannel] = source_channel\n\n        source_guild = data.get('source_guild')\n        if source_guild:\n            source_guild = PartialWebhookGuild(data=source_guild, state=self._state)\n\n        self.source_guild: Optional[PartialWebhookGuild] = source_guild\n\n    def is_partial(self) -> bool:\n        \"\"\":class:`bool`: Whether the webhook is a \"partial\" webhook.\n\n        .. versionadded:: 2.0\"\"\"\n        return self.channel_id is None\n\n    def is_authenticated(self) -> bool:\n        \"\"\":class:`bool`: Whether the webhook is authenticated with a bot token.\n\n        .. versionadded:: 2.0\n        \"\"\"\n        return self.auth_token is not None\n\n    @property\n    def guild(self) -> Optional[Guild]:\n        \"\"\"Optional[:class:`Guild`]: The guild this webhook belongs to.\n\n        If this is a partial webhook, then this will always return ``None``.\n        \"\"\"\n        return self._state and self._state._get_guild(self.guild_id)\n\n    @property\n    def channel(self) -> Optional[Union[ForumChannel, VoiceChannel, TextChannel]]:\n        \"\"\"Optional[Union[:class:`ForumChannel`, :class:`VoiceChannel`, :class:`TextChannel`]]: The channel this webhook belongs to.\n\n        If this is a partial webhook, then this will always return ``None``.\n        \"\"\"\n        guild = self.guild\n        return guild and guild.get_channel(self.channel_id)  # type: ignore\n\n    @property\n    def created_at(self) -> datetime.datetime:\n        \"\"\":class:`datetime.datetime`: Returns the webhook's creation time in UTC.\"\"\"\n        return utils.snowflake_time(self.id)\n\n    @property\n    def avatar(self) -> Optional[Asset]:\n        \"\"\"Optional[:class:`Asset`]: Returns an :class:`Asset` for the avatar the webhook has.\n\n        If the webhook does not have a traditional avatar, ``None`` is returned.\n        If you want the avatar that a webhook has displayed, consider :attr:`display_avatar`.\n        \"\"\"\n        if self._avatar is not None:\n            return Asset._from_avatar(self._state, self.id, self._avatar)\n        return None\n\n    @property\n    def default_avatar(self) -> Asset:\n        \"\"\"\n        :class:`Asset`: Returns the default avatar. This is always the blurple avatar.\n\n        .. versionadded:: 2.0\n        \"\"\"\n        # Default is always blurple apparently\n        return Asset._from_default_avatar(self._state, 0)\n\n    @property\n    def display_avatar(self) -> Asset:\n        \"\"\":class:`Asset`: Returns the webhook's display avatar.\n\n        This is either webhook's default avatar or uploaded avatar.\n\n        .. versionadded:: 2.0\n        \"\"\"\n        return self.avatar or self.default_avatar\n\n\nclass Webhook(BaseWebhook):\n    \"\"\"Represents an asynchronous Discord webhook.\n\n    Webhooks are a form to send messages to channels in Discord without a\n    bot user or authentication.\n\n    There are two main ways to use Webhooks. The first is through the ones\n    received by the library such as :meth:`.Guild.webhooks`,\n    :meth:`.TextChannel.webhooks`, :meth:`.VoiceChannel.webhooks`\n    and :meth:`.ForumChannel.webhooks`.\n    The ones received by the library will automatically be\n    bound using the library's internal HTTP session.\n\n    The second form involves creating a webhook object manually using the\n    :meth:`~.Webhook.from_url` or :meth:`~.Webhook.partial` classmethods.\n\n    For example, creating a webhook from a URL and using :doc:`aiohttp <aio:index>`:\n\n    .. code-block:: python3\n\n        from discord import Webhook\n        import aiohttp\n\n        async def foo():\n            async with aiohttp.ClientSession() as session:\n                webhook = Webhook.from_url('url-here', session=session)\n                await webhook.send('Hello World', username='Foo')\n\n    For a synchronous counterpart, see :class:`SyncWebhook`.\n\n    .. container:: operations\n\n        .. describe:: x == y\n\n            Checks if two webhooks are equal.\n\n        .. describe:: x != y\n\n            Checks if two webhooks are not equal.\n\n        .. describe:: hash(x)\n\n            Returns the webhooks's hash.\n\n    .. versionchanged:: 1.4\n        Webhooks are now comparable and hashable.\n\n    Attributes\n    ------------\n    id: :class:`int`\n        The webhook's ID\n    type: :class:`WebhookType`\n        The type of the webhook.\n\n        .. versionadded:: 1.3\n\n    token: Optional[:class:`str`]\n        The authentication token of the webhook. If this is ``None``\n        then the webhook cannot be used to make requests.\n    guild_id: Optional[:class:`int`]\n        The guild ID this webhook is for.\n    channel_id: Optional[:class:`int`]\n        The channel ID this webhook is for.\n    user: Optional[:class:`abc.User`]\n        The user this webhook was created by. If the webhook was\n        received without authentication then this will be ``None``.\n    name: Optional[:class:`str`]\n        The default name of the webhook.\n    source_guild: Optional[:class:`PartialWebhookGuild`]\n        The guild of the channel that this webhook is following.\n        Only given if :attr:`type` is :attr:`WebhookType.channel_follower`.\n\n        .. versionadded:: 2.0\n\n    source_channel: Optional[:class:`PartialWebhookChannel`]\n        The channel that this webhook is following.\n        Only given if :attr:`type` is :attr:`WebhookType.channel_follower`.\n\n        .. versionadded:: 2.0\n    \"\"\"\n\n    __slots__: Tuple[str, ...] = ('session', 'proxy', 'proxy_auth')\n\n    def __init__(\n        self,\n        data: WebhookPayload,\n        session: aiohttp.ClientSession,\n        token: Optional[str] = None,\n        state: Optional[_State] = None,\n        proxy: Optional[str] = None,\n        proxy_auth: Optional[aiohttp.BasicAuth] = None,\n    ) -> None:\n        super().__init__(data, token, state)\n        self.session: aiohttp.ClientSession = session\n        self.proxy: Optional[str] = proxy\n        self.proxy_auth: Optional[aiohttp.BasicAuth] = proxy_auth\n\n    def __repr__(self) -> str:\n        return f'<Webhook id={self.id!r} type={self.type!r} name={self.name!r}>'\n\n    @property\n    def url(self) -> str:\n        \"\"\":class:`str` : Returns the webhook's url.\"\"\"\n        return f'https://discord.com/api/webhooks/{self.id}/{self.token}'\n\n    @classmethod\n    def partial(\n        cls,\n        id: int,\n        token: str,\n        *,\n        session: aiohttp.ClientSession = MISSING,\n        client: Client = MISSING,\n        bot_token: Optional[str] = None,\n    ) -> Self:\n        \"\"\"Creates a partial :class:`Webhook`.\n\n        Parameters\n        -----------\n        id: :class:`int`\n            The ID of the webhook.\n        token: :class:`str`\n            The authentication token of the webhook.\n        session: :class:`aiohttp.ClientSession`\n            The session to use to send requests with. Note\n            that the library does not manage the session and\n            will not close it.\n\n            .. versionadded:: 2.0\n        client: :class:`Client`\n            The client to initialise this webhook with. This allows it to\n            attach the client's internal state. If ``session`` is not given\n            while this is given then the client's internal session will be used.\n\n            .. versionadded:: 2.2\n        bot_token: Optional[:class:`str`]\n            The bot authentication token for authenticated requests\n            involving the webhook.\n\n            .. versionadded:: 2.0\n\n        Raises\n        -------\n        TypeError\n            Neither ``session`` nor ``client`` were given.\n\n        Returns\n        --------\n        :class:`Webhook`\n            A partial :class:`Webhook`.\n            A partial webhook is just a webhook object with an ID and a token.\n        \"\"\"\n        data: WebhookPayload = {\n            'id': id,\n            'type': 1,\n            'token': token,\n        }\n\n        state = None\n        if client is not MISSING:\n            state = client._connection\n            if session is MISSING:\n                session = client.http._HTTPClient__session  # type: ignore\n\n        if session is MISSING:\n            raise TypeError('session or client must be given')\n\n        return cls(data, session, token=bot_token, state=state)\n\n    @classmethod\n    def from_url(\n        cls,\n        url: str,\n        *,\n        session: aiohttp.ClientSession = MISSING,\n        client: Client = MISSING,\n        bot_token: Optional[str] = None,\n    ) -> Self:\n        \"\"\"Creates a partial :class:`Webhook` from a webhook URL.\n\n        .. versionchanged:: 2.0\n            This function will now raise :exc:`ValueError` instead of\n            ``InvalidArgument``.\n\n        Parameters\n        ------------\n        url: :class:`str`\n            The URL of the webhook.\n        session: :class:`aiohttp.ClientSession`\n            The session to use to send requests with. Note\n            that the library does not manage the session and\n            will not close it.\n\n            .. versionadded:: 2.0\n        client: :class:`Client`\n            The client to initialise this webhook with. This allows it to\n            attach the client's internal state. If ``session`` is not given\n            while this is given then the client's internal session will be used.\n\n            .. versionadded:: 2.2\n        bot_token: Optional[:class:`str`]\n            The bot authentication token for authenticated requests\n            involving the webhook.\n\n            .. versionadded:: 2.0\n\n        Raises\n        -------\n        ValueError\n            The URL is invalid.\n        TypeError\n            Neither ``session`` nor ``client`` were given.\n\n        Returns\n        --------\n        :class:`Webhook`\n            A partial :class:`Webhook`.\n            A partial webhook is just a webhook object with an ID and a token.\n        \"\"\"\n        m = re.search(r'discord(?:app)?\\.com/api/webhooks/(?P<id>[0-9]{17,20})/(?P<token>[A-Za-z0-9\\.\\-\\_]{60,})', url)\n        if m is None:\n            raise ValueError('Invalid webhook URL given.')\n\n        state = None\n        if client is not MISSING:\n            state = client._connection\n            if session is MISSING:\n                session = client.http._HTTPClient__session  # type: ignore\n\n        if session is MISSING:\n            raise TypeError('session or client must be given')\n\n        data: Dict[str, Any] = m.groupdict()\n        data['type'] = 1\n        return cls(data, session, token=bot_token, state=state)  # type: ignore  # Casting dict[str, Any] to WebhookPayload\n\n    @classmethod\n    def _as_follower(cls, data, *, channel, user) -> Self:\n        name = f\"{channel.guild} #{channel}\"\n        feed: WebhookPayload = {\n            'id': data['webhook_id'],\n            'type': 2,\n            'name': name,\n            'channel_id': channel.id,\n            'guild_id': channel.guild.id,\n            'user': {\n                'username': user.name,\n                'discriminator': user.discriminator,\n                'id': user.id,\n                'avatar': user._avatar,\n                'avatar_decoration_data': user._avatar_decoration_data,\n                'global_name': user.global_name,\n            },\n        }\n\n        state = channel._state\n        http = state.http\n        session = http._HTTPClient__session\n        proxy_auth = http.proxy_auth\n        proxy = http.proxy\n        return cls(feed, session=session, state=state, proxy_auth=proxy_auth, proxy=proxy, token=state.http.token)\n\n    @classmethod\n    def from_state(cls, data: WebhookPayload, state: ConnectionState) -> Self:\n        http = state.http\n        session = http._HTTPClient__session  # type: ignore\n        proxy_auth = http.proxy_auth\n        proxy = http.proxy\n        return cls(data, session=session, state=state, proxy_auth=proxy_auth, proxy=proxy, token=state.http.token)\n\n    async def fetch(self, *, prefer_auth: bool = True) -> Webhook:\n        \"\"\"|coro|\n\n        Fetches the current webhook.\n\n        This could be used to get a full webhook from a partial webhook.\n\n        .. versionadded:: 2.0\n\n        .. note::\n\n            When fetching with an unauthenticated webhook, i.e.\n            :meth:`is_authenticated` returns ``False``, then the\n            returned webhook does not contain any user information.\n\n        Parameters\n        -----------\n        prefer_auth: :class:`bool`\n            Whether to use the bot token over the webhook token\n            if available. Defaults to ``True``.\n\n        Raises\n        -------\n        HTTPException\n            Could not fetch the webhook\n        NotFound\n            Could not find the webhook by this ID\n        ValueError\n            This webhook does not have a token associated with it.\n\n        Returns\n        --------\n        :class:`Webhook`\n            The fetched webhook.\n        \"\"\"\n        adapter = async_context.get()\n\n        if prefer_auth and self.auth_token:\n            data = await adapter.fetch_webhook(\n                self.id,\n                self.auth_token,\n                session=self.session,\n                proxy=self.proxy,\n                proxy_auth=self.proxy_auth,\n            )\n        elif self.token:\n            data = await adapter.fetch_webhook_with_token(\n                self.id,\n                self.token,\n                session=self.session,\n                proxy=self.proxy,\n                proxy_auth=self.proxy_auth,\n            )\n        else:\n            raise ValueError('This webhook does not have a token associated with it')\n\n        return Webhook(\n            data,\n            session=self.session,\n            proxy=self.proxy,\n            proxy_auth=self.proxy_auth,\n            token=self.auth_token,\n            state=self._state,\n        )\n\n    async def delete(self, *, reason: Optional[str] = None, prefer_auth: bool = True) -> None:\n        \"\"\"|coro|\n\n        Deletes this Webhook.\n\n        Parameters\n        ------------\n        reason: Optional[:class:`str`]\n            The reason for deleting this webhook. Shows up on the audit log.\n\n            .. versionadded:: 1.4\n        prefer_auth: :class:`bool`\n            Whether to use the bot token over the webhook token\n            if available. Defaults to ``True``.\n\n            .. versionadded:: 2.0\n\n        Raises\n        -------\n        HTTPException\n            Deleting the webhook failed.\n        NotFound\n            This webhook does not exist.\n        Forbidden\n            You do not have permissions to delete this webhook.\n        ValueError\n            This webhook does not have a token associated with it.\n        \"\"\"\n        if self.token is None and self.auth_token is None:\n            raise ValueError('This webhook does not have a token associated with it')\n\n        adapter = async_context.get()\n\n        if prefer_auth and self.auth_token:\n            await adapter.delete_webhook(\n                self.id,\n                token=self.auth_token,\n                session=self.session,\n                proxy=self.proxy,\n                proxy_auth=self.proxy_auth,\n                reason=reason,\n            )\n        elif self.token:\n            await adapter.delete_webhook_with_token(\n                self.id,\n                self.token,\n                session=self.session,\n                proxy=self.proxy,\n                proxy_auth=self.proxy_auth,\n                reason=reason,\n            )\n\n    async def edit(\n        self,\n        *,\n        reason: Optional[str] = None,\n        name: Optional[str] = MISSING,\n        avatar: Optional[bytes] = MISSING,\n        channel: Optional[Snowflake] = None,\n        prefer_auth: bool = True,\n    ) -> Webhook:\n        \"\"\"|coro|\n\n        Edits this Webhook.\n\n        .. versionchanged:: 2.0\n            This function will now raise :exc:`ValueError` instead of\n            ``InvalidArgument``.\n\n        Parameters\n        ------------\n        name: Optional[:class:`str`]\n            The webhook's new default name.\n        avatar: Optional[:class:`bytes`]\n            A :term:`py:bytes-like object` representing the webhook's new default avatar.\n        channel: Optional[:class:`abc.Snowflake`]\n            The webhook's new channel. This requires an authenticated webhook.\n\n            .. versionadded:: 2.0\n        reason: Optional[:class:`str`]\n            The reason for editing this webhook. Shows up on the audit log.\n\n            .. versionadded:: 1.4\n        prefer_auth: :class:`bool`\n            Whether to use the bot token over the webhook token\n            if available. Defaults to ``True``.\n\n            .. versionadded:: 2.0\n\n        Raises\n        -------\n        HTTPException\n            Editing the webhook failed.\n        NotFound\n            This webhook does not exist.\n        ValueError\n            This webhook does not have a token associated with it\n            or it tried editing a channel without authentication.\n        \"\"\"\n        if self.token is None and self.auth_token is None:\n            raise ValueError('This webhook does not have a token associated with it')\n\n        payload = {}\n        if name is not MISSING:\n            payload['name'] = str(name) if name is not None else None\n\n        if avatar is not MISSING:\n            payload['avatar'] = utils._bytes_to_base64_data(avatar) if avatar is not None else None\n\n        adapter = async_context.get()\n\n        data: Optional[WebhookPayload] = None\n        # If a channel is given, always use the authenticated endpoint\n        if channel is not None:\n            if self.auth_token is None:\n                raise ValueError('Editing channel requires authenticated webhook')\n\n            payload['channel_id'] = channel.id\n            data = await adapter.edit_webhook(\n                self.id,\n                self.auth_token,\n                payload=payload,\n                session=self.session,\n                proxy=self.proxy,\n                proxy_auth=self.proxy_auth,\n                reason=reason,\n            )\n        elif prefer_auth and self.auth_token:\n            data = await adapter.edit_webhook(\n                self.id,\n                self.auth_token,\n                payload=payload,\n                session=self.session,\n                proxy=self.proxy,\n                proxy_auth=self.proxy_auth,\n                reason=reason,\n            )\n        elif self.token:\n            data = await adapter.edit_webhook_with_token(\n                self.id,\n                self.token,\n                payload=payload,\n                session=self.session,\n                proxy=self.proxy,\n                proxy_auth=self.proxy_auth,\n                reason=reason,\n            )\n\n        if data is None:\n            raise RuntimeError('Unreachable code hit: data was not assigned')\n\n        return Webhook(\n            data,\n            session=self.session,\n            proxy=self.proxy,\n            proxy_auth=self.proxy_auth,\n            token=self.auth_token,\n            state=self._state,\n        )\n\n    def _create_message(self, data, *, thread: Snowflake):\n        state = _WebhookState(self, parent=self._state, thread=thread)\n        # state may be artificial (unlikely at this point...)\n        if thread is MISSING:\n            channel_id = int(data['channel_id'])\n            channel = self.channel\n            # If this thread is created via thread_name then the channel_id would not be the same as the webhook's channel_id\n            # which would be the forum channel.\n            if self.channel_id != channel_id:\n                type = ChannelType.public_thread if isinstance(channel, ForumChannel) else (channel and channel.type)\n                channel = PartialMessageable(state=self._state, guild_id=self.guild_id, id=channel_id, type=type)  # type: ignore\n            else:\n                channel = self.channel or PartialMessageable(state=self._state, guild_id=self.guild_id, id=channel_id)  # type: ignore\n        else:\n            channel = self.channel\n            if isinstance(channel, (ForumChannel, TextChannel)):\n                channel = channel.get_thread(thread.id)\n\n            if channel is None:\n                channel = PartialMessageable(state=self._state, guild_id=self.guild_id, id=int(data['channel_id']))  # type: ignore\n\n        # state is artificial\n        return WebhookMessage(data=data, state=state, channel=channel)  # type: ignore\n\n    @overload\n    async def send(\n        self,\n        content: str = MISSING,\n        *,\n        username: str = MISSING,\n        avatar_url: Any = MISSING,\n        tts: bool = MISSING,\n        ephemeral: bool = MISSING,\n        file: File = MISSING,\n        files: Sequence[File] = MISSING,\n        embed: Embed = MISSING,\n        embeds: Sequence[Embed] = MISSING,\n        allowed_mentions: AllowedMentions = MISSING,\n        view: View = MISSING,\n        thread: Snowflake = MISSING,\n        thread_name: str = MISSING,\n        wait: Literal[True],\n        suppress_embeds: bool = MISSING,\n        silent: bool = MISSING,\n        applied_tags: List[ForumTag] = MISSING,\n        poll: Poll = MISSING,\n    ) -> WebhookMessage:\n        ...\n\n    @overload\n    async def send(\n        self,\n        content: str = MISSING,\n        *,\n        username: str = MISSING,\n        avatar_url: Any = MISSING,\n        tts: bool = MISSING,\n        ephemeral: bool = MISSING,\n        file: File = MISSING,\n        files: Sequence[File] = MISSING,\n        embed: Embed = MISSING,\n        embeds: Sequence[Embed] = MISSING,\n        allowed_mentions: AllowedMentions = MISSING,\n        view: View = MISSING,\n        thread: Snowflake = MISSING,\n        thread_name: str = MISSING,\n        wait: Literal[False] = ...,\n        suppress_embeds: bool = MISSING,\n        silent: bool = MISSING,\n        applied_tags: List[ForumTag] = MISSING,\n        poll: Poll = MISSING,\n    ) -> None:\n        ...\n\n    async def send(\n        self,\n        content: str = MISSING,\n        *,\n        username: str = MISSING,\n        avatar_url: Any = MISSING,\n        tts: bool = False,\n        ephemeral: bool = False,\n        file: File = MISSING,\n        files: Sequence[File] = MISSING,\n        embed: Embed = MISSING,\n        embeds: Sequence[Embed] = MISSING,\n        allowed_mentions: AllowedMentions = MISSING,\n        view: View = MISSING,\n        thread: Snowflake = MISSING,\n        thread_name: str = MISSING,\n        wait: bool = False,\n        suppress_embeds: bool = False,\n        silent: bool = False,\n        applied_tags: List[ForumTag] = MISSING,\n        poll: Poll = MISSING,\n    ) -> Optional[WebhookMessage]:\n        \"\"\"|coro|\n\n        Sends a message using the webhook.\n\n        The content must be a type that can convert to a string through ``str(content)``.\n\n        To upload a single file, the ``file`` parameter should be used with a\n        single :class:`File` object.\n\n        If the ``embed`` parameter is provided, it must be of type :class:`Embed` and\n        it must be a rich embed type. You cannot mix the ``embed`` parameter with the\n        ``embeds`` parameter, which must be a :class:`list` of :class:`Embed` objects to send.\n\n        .. versionchanged:: 2.0\n            This function will now raise :exc:`ValueError` instead of\n            ``InvalidArgument``.\n\n        Parameters\n        ------------\n        content: :class:`str`\n            The content of the message to send.\n        wait: :class:`bool`\n            Whether the server should wait before sending a response. This essentially\n            means that the return type of this function changes from ``None`` to\n            a :class:`WebhookMessage` if set to ``True``. If the type of webhook\n            is :attr:`WebhookType.application` then this is always set to ``True``.\n        username: :class:`str`\n            The username to send with this message. If no username is provided\n            then the default username for the webhook is used.\n        avatar_url: :class:`str`\n            The avatar URL to send with this message. If no avatar URL is provided\n            then the default avatar for the webhook is used. If this is not a\n            string then it is explicitly cast using ``str``.\n        tts: :class:`bool`\n            Indicates if the message should be sent using text-to-speech.\n        ephemeral: :class:`bool`\n            Indicates if the message should only be visible to the user.\n            This is only available to :attr:`WebhookType.application` webhooks.\n            If a view is sent with an ephemeral message and it has no timeout set\n            then the timeout is set to 15 minutes.\n\n            .. versionadded:: 2.0\n        file: :class:`File`\n            The file to upload. This cannot be mixed with ``files`` parameter.\n        files: List[:class:`File`]\n            A list of files to send with the content. This cannot be mixed with the\n            ``file`` parameter.\n        embed: :class:`Embed`\n            The rich embed for the content to send. This cannot be mixed with\n            ``embeds`` parameter.\n        embeds: List[:class:`Embed`]\n            A list of embeds to send with the content. Maximum of 10. This cannot\n            be mixed with the ``embed`` parameter.\n        allowed_mentions: :class:`AllowedMentions`\n            Controls the mentions being processed in this message.\n\n            .. versionadded:: 1.4\n        view: :class:`discord.ui.View`\n            The view to send with the message. You can only send a view\n            if this webhook is not partial and has state attached. A\n            webhook has state attached if the webhook is managed by the\n            library.\n\n            .. versionadded:: 2.0\n        thread: :class:`~discord.abc.Snowflake`\n            The thread to send this webhook to.\n\n            .. versionadded:: 2.0\n        thread_name: :class:`str`\n            The thread name to create with this webhook if the webhook belongs\n            to a :class:`~discord.ForumChannel`. Note that this is mutually\n            exclusive with the ``thread`` parameter, as this will create a\n            new thread with the given name.\n\n            .. versionadded:: 2.0\n        suppress_embeds: :class:`bool`\n            Whether to suppress embeds for the message. This sends the message without any embeds if set to ``True``.\n\n            .. versionadded:: 2.0\n        silent: :class:`bool`\n            Whether to suppress push and desktop notifications for the message. This will increment the mention counter\n            in the UI, but will not actually send a notification.\n\n            .. versionadded:: 2.2\n        applied_tags: List[:class:`ForumTag`]\n            Tags to apply to the thread if the webhook belongs to a :class:`~discord.ForumChannel`.\n\n            .. versionadded:: 2.4\n\n        poll: :class:`Poll`\n            The poll to send with this message.\n\n            .. warning::\n\n                When sending a Poll via webhook, you cannot manually end it.\n\n            .. versionadded:: 2.4\n\n        Raises\n        --------\n        HTTPException\n            Sending the message failed.\n        NotFound\n            This webhook was not found.\n        Forbidden\n            The authorization token for the webhook is incorrect.\n        TypeError\n            You specified both ``embed`` and ``embeds`` or ``file`` and ``files``\n            or ``thread`` and ``thread_name``.\n        ValueError\n            The length of ``embeds`` was invalid, there was no token\n            associated with this webhook or ``ephemeral`` was passed\n            with the improper webhook type or there was no state\n            attached with this webhook when giving it a view.\n\n        Returns\n        ---------\n        Optional[:class:`WebhookMessage`]\n            If ``wait`` is ``True`` then the message that was sent, otherwise ``None``.\n        \"\"\"\n\n        if self.token is None:\n            raise ValueError('This webhook does not have a token associated with it')\n\n        previous_mentions: Optional[AllowedMentions] = getattr(self._state, 'allowed_mentions', None)\n        if content is None:\n            content = MISSING\n        if ephemeral or suppress_embeds or silent:\n            flags = MessageFlags._from_value(0)\n            flags.ephemeral = ephemeral\n            flags.suppress_embeds = suppress_embeds\n            flags.suppress_notifications = silent\n        else:\n            flags = MISSING\n\n        application_webhook = self.type is WebhookType.application\n        if ephemeral and not application_webhook:\n            raise ValueError('ephemeral messages can only be sent from application webhooks')\n\n        if application_webhook:\n            wait = True\n\n        if view is not MISSING:\n            if isinstance(self._state, _WebhookState):\n                raise ValueError('Webhook views require an associated state with the webhook')\n\n            if not hasattr(view, '__discord_ui_view__'):\n                raise TypeError(f'expected view parameter to be of type View not {view.__class__.__name__}')\n\n            if ephemeral is True and view.timeout is None:\n                view.timeout = 15 * 60.0\n\n        if thread_name is not MISSING and thread is not MISSING:\n            raise TypeError('Cannot mix thread_name and thread keyword arguments.')\n\n        if applied_tags is MISSING:\n            applied_tag_ids = MISSING\n        else:\n            applied_tag_ids: SnowflakeList = [tag.id for tag in applied_tags]\n\n        with handle_message_parameters(\n            content=content,\n            username=username,\n            avatar_url=avatar_url,\n            tts=tts,\n            file=file,\n            files=files,\n            embed=embed,\n            embeds=embeds,\n            flags=flags,\n            view=view,\n            thread_name=thread_name,\n            allowed_mentions=allowed_mentions,\n            previous_allowed_mentions=previous_mentions,\n            applied_tags=applied_tag_ids,\n            poll=poll,\n        ) as params:\n            adapter = async_context.get()\n            thread_id: Optional[int] = None\n            if thread is not MISSING:\n                thread_id = thread.id\n\n            data = await adapter.execute_webhook(\n                self.id,\n                self.token,\n                session=self.session,\n                proxy=self.proxy,\n                proxy_auth=self.proxy_auth,\n                payload=params.payload,\n                multipart=params.multipart,\n                files=params.files,\n                thread_id=thread_id,\n                wait=wait,\n            )\n\n        msg = None\n        if wait:\n            msg = self._create_message(data, thread=thread)\n\n        if view is not MISSING and not view.is_finished():\n            message_id = None if msg is None else msg.id\n            self._state.store_view(view, message_id)\n\n        if poll is not MISSING and msg:\n            poll._update(msg)\n\n        return msg\n\n    async def fetch_message(self, id: int, /, *, thread: Snowflake = MISSING) -> WebhookMessage:\n        \"\"\"|coro|\n\n        Retrieves a single :class:`~discord.WebhookMessage` owned by this webhook.\n\n        .. versionadded:: 2.0\n\n        Parameters\n        ------------\n        id: :class:`int`\n            The message ID to look for.\n        thread: :class:`~discord.abc.Snowflake`\n            The thread to look in.\n\n        Raises\n        --------\n        ~discord.NotFound\n            The specified message was not found.\n        ~discord.Forbidden\n            You do not have the permissions required to get a message.\n        ~discord.HTTPException\n            Retrieving the message failed.\n        ValueError\n            There was no token associated with this webhook.\n\n        Returns\n        --------\n        :class:`~discord.WebhookMessage`\n            The message asked for.\n        \"\"\"\n\n        if self.token is None:\n            raise ValueError('This webhook does not have a token associated with it')\n\n        thread_id: Optional[int] = None\n        if thread is not MISSING:\n            thread_id = thread.id\n\n        adapter = async_context.get()\n        data = await adapter.get_webhook_message(\n            self.id,\n            self.token,\n            id,\n            session=self.session,\n            proxy=self.proxy,\n            proxy_auth=self.proxy_auth,\n            thread_id=thread_id,\n        )\n        return self._create_message(data, thread=thread)\n\n    async def edit_message(\n        self,\n        message_id: int,\n        *,\n        content: Optional[str] = MISSING,\n        embeds: Sequence[Embed] = MISSING,\n        embed: Optional[Embed] = MISSING,\n        attachments: Sequence[Union[Attachment, File]] = MISSING,\n        view: Optional[View] = MISSING,\n        allowed_mentions: Optional[AllowedMentions] = None,\n        thread: Snowflake = MISSING,\n    ) -> WebhookMessage:\n        \"\"\"|coro|\n\n        Edits a message owned by this webhook.\n\n        This is a lower level interface to :meth:`WebhookMessage.edit` in case\n        you only have an ID.\n\n        .. versionadded:: 1.6\n\n        .. versionchanged:: 2.0\n            The edit is no longer in-place, instead the newly edited message is returned.\n\n        .. versionchanged:: 2.0\n            This function will now raise :exc:`ValueError` instead of\n            ``InvalidArgument``.\n\n        Parameters\n        ------------\n        message_id: :class:`int`\n            The message ID to edit.\n        content: Optional[:class:`str`]\n            The content to edit the message with or ``None`` to clear it.\n        embeds: List[:class:`Embed`]\n            A list of embeds to edit the message with.\n        embed: Optional[:class:`Embed`]\n            The embed to edit the message with. ``None`` suppresses the embeds.\n            This should not be mixed with the ``embeds`` parameter.\n        attachments: List[Union[:class:`Attachment`, :class:`File`]]\n            A list of attachments to keep in the message as well as new files to upload. If ``[]`` is passed\n            then all attachments are removed.\n\n            .. versionadded:: 2.0\n        allowed_mentions: :class:`AllowedMentions`\n            Controls the mentions being processed in this message.\n            See :meth:`.abc.Messageable.send` for more information.\n        view: Optional[:class:`~discord.ui.View`]\n            The updated view to update this message with. If ``None`` is passed then\n            the view is removed. The webhook must have state attached, similar to\n            :meth:`send`.\n\n            .. versionadded:: 2.0\n        thread: :class:`~discord.abc.Snowflake`\n            The thread the webhook message belongs to.\n\n            .. versionadded:: 2.0\n\n        Raises\n        -------\n        HTTPException\n            Editing the message failed.\n        Forbidden\n            Edited a message that is not yours.\n        TypeError\n            You specified both ``embed`` and ``embeds``\n        ValueError\n            The length of ``embeds`` was invalid,\n            there was no token associated with this webhook or the webhook had\n            no state.\n\n        Returns\n        --------\n        :class:`WebhookMessage`\n            The newly edited webhook message.\n        \"\"\"\n\n        if self.token is None:\n            raise ValueError('This webhook does not have a token associated with it')\n\n        if view is not MISSING:\n            if isinstance(self._state, _WebhookState):\n                raise ValueError('This webhook does not have state associated with it')\n\n            self._state.prevent_view_updates_for(message_id)\n\n        previous_mentions: Optional[AllowedMentions] = getattr(self._state, 'allowed_mentions', None)\n        with handle_message_parameters(\n            content=content,\n            attachments=attachments,\n            embed=embed,\n            embeds=embeds,\n            view=view,\n            allowed_mentions=allowed_mentions,\n            previous_allowed_mentions=previous_mentions,\n        ) as params:\n            thread_id: Optional[int] = None\n            if thread is not MISSING:\n                thread_id = thread.id\n\n            adapter = async_context.get()\n            data = await adapter.edit_webhook_message(\n                self.id,\n                self.token,\n                message_id,\n                session=self.session,\n                proxy=self.proxy,\n                proxy_auth=self.proxy_auth,\n                payload=params.payload,\n                multipart=params.multipart,\n                files=params.files,\n                thread_id=thread_id,\n            )\n\n        message = self._create_message(data, thread=thread)\n        if view and not view.is_finished():\n            self._state.store_view(view, message_id)\n        return message\n\n    async def delete_message(self, message_id: int, /, *, thread: Snowflake = MISSING) -> None:\n        \"\"\"|coro|\n\n        Deletes a message owned by this webhook.\n\n        This is a lower level interface to :meth:`WebhookMessage.delete` in case\n        you only have an ID.\n\n        .. versionadded:: 1.6\n\n        .. versionchanged:: 2.0\n\n            ``message_id`` parameter is now positional-only.\n\n        .. versionchanged:: 2.0\n            This function will now raise :exc:`ValueError` instead of\n            ``InvalidArgument``.\n\n        Parameters\n        ------------\n        message_id: :class:`int`\n            The message ID to delete.\n        thread: :class:`~discord.abc.Snowflake`\n            The thread the webhook message belongs to.\n\n            .. versionadded:: 2.0\n\n        Raises\n        -------\n        HTTPException\n            Deleting the message failed.\n        Forbidden\n            Deleted a message that is not yours.\n        ValueError\n            This webhook does not have a token associated with it.\n        \"\"\"\n        if self.token is None:\n            raise ValueError('This webhook does not have a token associated with it')\n\n        thread_id: Optional[int] = None\n        if thread is not MISSING:\n            thread_id = thread.id\n\n        adapter = async_context.get()\n        await adapter.delete_webhook_message(\n            self.id,\n            self.token,\n            message_id,\n            session=self.session,\n            proxy=self.proxy,\n            proxy_auth=self.proxy_auth,\n            thread_id=thread_id,\n        )\n"
  },
  {
    "path": "discord/webhook/sync.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\n# If you're wondering why this is essentially copy pasted from the async_.py\n# file, then it's due to needing two separate types to make the typing shenanigans\n# a bit easier to write. It's an unfortunate design. Originally, these types were\n# merged and an adapter was used to differentiate between the async and sync versions.\n# However, this proved to be difficult to provide typings for, so here we are.\n\nfrom __future__ import annotations\n\nimport threading\nimport logging\nimport json\nimport time\nimport re\n\nfrom urllib.parse import quote as urlquote\nfrom typing import Any, Dict, List, Literal, Optional, TYPE_CHECKING, Sequence, Tuple, Union, TypeVar, Type, overload\nimport weakref\n\nfrom .. import utils\nfrom ..errors import HTTPException, Forbidden, NotFound, DiscordServerError\nfrom ..message import Message, MessageFlags\nfrom ..http import Route, handle_message_parameters\nfrom ..channel import PartialMessageable, ForumTag\n\nfrom .async_ import BaseWebhook, _WebhookState\n\n__all__ = (\n    'SyncWebhook',\n    'SyncWebhookMessage',\n)\n\n_log = logging.getLogger(__name__)\n\nif TYPE_CHECKING:\n    from typing_extensions import Self\n    from types import TracebackType\n\n    from ..file import File\n    from ..embeds import Embed\n    from ..poll import Poll\n    from ..mentions import AllowedMentions\n    from ..message import Attachment\n    from ..abc import Snowflake\n    from ..state import ConnectionState\n    from ..types.webhook import (\n        Webhook as WebhookPayload,\n    )\n    from ..types.message import (\n        Message as MessagePayload,\n    )\n    from ..types.snowflake import SnowflakeList\n\n    BE = TypeVar('BE', bound=BaseException)\n\n    try:\n        from requests import Session, Response\n    except ModuleNotFoundError:\n        pass\n\nMISSING: Any = utils.MISSING\n\n\nclass DeferredLock:\n    def __init__(self, lock: threading.Lock) -> None:\n        self.lock: threading.Lock = lock\n        self.delta: Optional[float] = None\n\n    def __enter__(self) -> Self:\n        self.lock.acquire()\n        return self\n\n    def delay_by(self, delta: float) -> None:\n        self.delta = delta\n\n    def __exit__(\n        self,\n        exc_type: Optional[Type[BE]],\n        exc: Optional[BE],\n        traceback: Optional[TracebackType],\n    ) -> None:\n        if self.delta:\n            time.sleep(self.delta)\n        self.lock.release()\n\n\nclass WebhookAdapter:\n    def __init__(self):\n        self._locks: weakref.WeakValueDictionary[Any, threading.Lock] = weakref.WeakValueDictionary()\n\n    def request(\n        self,\n        route: Route,\n        session: Session,\n        *,\n        payload: Optional[Dict[str, Any]] = None,\n        multipart: Optional[List[Dict[str, Any]]] = None,\n        files: Optional[Sequence[File]] = None,\n        reason: Optional[str] = None,\n        auth_token: Optional[str] = None,\n        params: Optional[Dict[str, Any]] = None,\n    ) -> Any:\n        headers: Dict[str, str] = {}\n        files = files or []\n        to_send: Optional[Union[str, bytes, Dict[str, Any]]] = None\n        bucket = (route.webhook_id, route.webhook_token)\n\n        try:\n            lock = self._locks[bucket]\n        except KeyError:\n            self._locks[bucket] = lock = threading.Lock()\n\n        if payload is not None:\n            headers['Content-Type'] = 'application/json; charset=utf-8'\n            to_send = utils._to_json(payload).encode('utf-8')\n\n        if auth_token is not None:\n            headers['Authorization'] = f'Bot {auth_token}'\n\n        if reason is not None:\n            headers['X-Audit-Log-Reason'] = urlquote(reason, safe='/ ')\n\n        response: Optional[Response] = None\n        data: Optional[Union[Dict[str, Any], str]] = None\n        file_data: Optional[Dict[str, Any]] = None\n        method = route.method\n        url = route.url\n        webhook_id = route.webhook_id\n\n        with DeferredLock(lock) as lock:\n            for attempt in range(5):\n                for file in files:\n                    file.reset(seek=attempt)\n\n                if multipart:\n                    file_data = {}\n                    for p in multipart:\n                        name = p['name']\n                        if name == 'payload_json':\n                            to_send = {'payload_json': p['value']}\n                        else:\n                            file_data[name] = (p['filename'], p['value'], p['content_type'])\n\n                try:\n                    with session.request(\n                        method, url, data=to_send, files=file_data, headers=headers, params=params\n                    ) as response:\n                        _log.debug(\n                            'Webhook ID %s with %s %s has returned status code %s',\n                            webhook_id,\n                            method,\n                            url,\n                            response.status_code,\n                        )\n                        response.encoding = 'utf-8'\n                        # Compatibility with aiohttp\n                        response.status = response.status_code  # type: ignore\n\n                        data = response.text or None\n                        try:\n                            if data and response.headers['Content-Type'] == 'application/json':\n                                data = json.loads(data)\n                        except KeyError:\n                            pass\n\n                        remaining = response.headers.get('X-Ratelimit-Remaining')\n                        if remaining == '0' and response.status_code != 429:\n                            delta = utils._parse_ratelimit_header(response)\n                            _log.debug(\n                                'Webhook ID %s has exhausted its rate limit bucket (retry: %s).',\n                                webhook_id,\n                                delta,\n                            )\n                            lock.delay_by(delta)\n\n                        if 300 > response.status_code >= 200:\n                            return data\n\n                        if response.status_code == 429:\n                            if not response.headers.get('Via'):\n                                raise HTTPException(response, data)\n                            fmt = 'Webhook ID %s is rate limited. Retrying in %.2f seconds.'\n\n                            retry_after: float = data['retry_after']  # type: ignore\n                            _log.warning(fmt, webhook_id, retry_after)\n                            time.sleep(retry_after)\n                            continue\n\n                        if response.status_code >= 500:\n                            time.sleep(1 + attempt * 2)\n                            continue\n\n                        if response.status_code == 403:\n                            raise Forbidden(response, data)\n                        elif response.status_code == 404:\n                            raise NotFound(response, data)\n                        else:\n                            raise HTTPException(response, data)\n\n                except OSError as e:\n                    if attempt < 4 and e.errno in (54, 10054):\n                        time.sleep(1 + attempt * 2)\n                        continue\n                    raise\n\n            if response:\n                if response.status_code >= 500:\n                    raise DiscordServerError(response, data)\n                raise HTTPException(response, data)\n\n            raise RuntimeError('Unreachable code in HTTP handling.')\n\n    def delete_webhook(\n        self,\n        webhook_id: int,\n        *,\n        token: Optional[str] = None,\n        session: Session,\n        reason: Optional[str] = None,\n    ) -> None:\n        route = Route('DELETE', '/webhooks/{webhook_id}', webhook_id=webhook_id)\n        return self.request(route, session, reason=reason, auth_token=token)\n\n    def delete_webhook_with_token(\n        self,\n        webhook_id: int,\n        token: str,\n        *,\n        session: Session,\n        reason: Optional[str] = None,\n    ) -> None:\n        route = Route('DELETE', '/webhooks/{webhook_id}/{webhook_token}', webhook_id=webhook_id, webhook_token=token)\n        return self.request(route, session, reason=reason)\n\n    def edit_webhook(\n        self,\n        webhook_id: int,\n        token: str,\n        payload: Dict[str, Any],\n        *,\n        session: Session,\n        reason: Optional[str] = None,\n    ) -> WebhookPayload:\n        route = Route('PATCH', '/webhooks/{webhook_id}', webhook_id=webhook_id)\n        return self.request(route, session, reason=reason, payload=payload, auth_token=token)\n\n    def edit_webhook_with_token(\n        self,\n        webhook_id: int,\n        token: str,\n        payload: Dict[str, Any],\n        *,\n        session: Session,\n        reason: Optional[str] = None,\n    ) -> WebhookPayload:\n        route = Route('PATCH', '/webhooks/{webhook_id}/{webhook_token}', webhook_id=webhook_id, webhook_token=token)\n        return self.request(route, session, reason=reason, payload=payload)\n\n    def execute_webhook(\n        self,\n        webhook_id: int,\n        token: str,\n        *,\n        session: Session,\n        payload: Optional[Dict[str, Any]] = None,\n        multipart: Optional[List[Dict[str, Any]]] = None,\n        files: Optional[Sequence[File]] = None,\n        thread_id: Optional[int] = None,\n        wait: bool = False,\n    ) -> MessagePayload:\n        params = {'wait': int(wait)}\n        if thread_id:\n            params['thread_id'] = thread_id\n        route = Route('POST', '/webhooks/{webhook_id}/{webhook_token}', webhook_id=webhook_id, webhook_token=token)\n        return self.request(route, session, payload=payload, multipart=multipart, files=files, params=params)\n\n    def get_webhook_message(\n        self,\n        webhook_id: int,\n        token: str,\n        message_id: int,\n        *,\n        session: Session,\n        thread_id: Optional[int] = None,\n    ) -> MessagePayload:\n        route = Route(\n            'GET',\n            '/webhooks/{webhook_id}/{webhook_token}/messages/{message_id}',\n            webhook_id=webhook_id,\n            webhook_token=token,\n            message_id=message_id,\n        )\n        params = None if thread_id is None else {'thread_id': thread_id}\n        return self.request(route, session, params=params)\n\n    def edit_webhook_message(\n        self,\n        webhook_id: int,\n        token: str,\n        message_id: int,\n        *,\n        session: Session,\n        payload: Optional[Dict[str, Any]] = None,\n        multipart: Optional[List[Dict[str, Any]]] = None,\n        files: Optional[Sequence[File]] = None,\n        thread_id: Optional[int] = None,\n    ) -> MessagePayload:\n        route = Route(\n            'PATCH',\n            '/webhooks/{webhook_id}/{webhook_token}/messages/{message_id}',\n            webhook_id=webhook_id,\n            webhook_token=token,\n            message_id=message_id,\n        )\n        params = None if thread_id is None else {'thread_id': thread_id}\n        return self.request(route, session, payload=payload, multipart=multipart, files=files, params=params)\n\n    def delete_webhook_message(\n        self,\n        webhook_id: int,\n        token: str,\n        message_id: int,\n        *,\n        session: Session,\n        thread_id: Optional[int] = None,\n    ) -> None:\n        route = Route(\n            'DELETE',\n            '/webhooks/{webhook_id}/{webhook_token}/messages/{message_id}',\n            webhook_id=webhook_id,\n            webhook_token=token,\n            message_id=message_id,\n        )\n        params = None if thread_id is None else {'thread_id': thread_id}\n        return self.request(route, session, params=params)\n\n    def fetch_webhook(\n        self,\n        webhook_id: int,\n        token: str,\n        *,\n        session: Session,\n    ) -> WebhookPayload:\n        route = Route('GET', '/webhooks/{webhook_id}', webhook_id=webhook_id)\n        return self.request(route, session=session, auth_token=token)\n\n    def fetch_webhook_with_token(\n        self,\n        webhook_id: int,\n        token: str,\n        *,\n        session: Session,\n    ) -> WebhookPayload:\n        route = Route('GET', '/webhooks/{webhook_id}/{webhook_token}', webhook_id=webhook_id, webhook_token=token)\n        return self.request(route, session=session)\n\n\nclass _WebhookContext(threading.local):\n    adapter: Optional[WebhookAdapter] = None\n\n\n_context = _WebhookContext()\n\n\ndef _get_webhook_adapter() -> WebhookAdapter:\n    if _context.adapter is None:\n        _context.adapter = WebhookAdapter()\n    return _context.adapter\n\n\nclass SyncWebhookMessage(Message):\n    \"\"\"Represents a message sent from your webhook.\n\n    This allows you to edit or delete a message sent by your\n    webhook.\n\n    This inherits from :class:`discord.Message` with changes to\n    :meth:`edit` and :meth:`delete` to work.\n\n    .. versionadded:: 2.0\n    \"\"\"\n\n    _state: _WebhookState\n\n    def edit(\n        self,\n        *,\n        content: Optional[str] = MISSING,\n        embeds: Sequence[Embed] = MISSING,\n        embed: Optional[Embed] = MISSING,\n        attachments: Sequence[Union[Attachment, File]] = MISSING,\n        allowed_mentions: Optional[AllowedMentions] = None,\n    ) -> SyncWebhookMessage:\n        \"\"\"Edits the message.\n\n        .. versionchanged:: 2.0\n            This function will now raise :exc:`TypeError` or\n            :exc:`ValueError` instead of ``InvalidArgument``.\n\n        Parameters\n        ------------\n        content: Optional[:class:`str`]\n            The content to edit the message with or ``None`` to clear it.\n        embeds: List[:class:`Embed`]\n            A list of embeds to edit the message with.\n        embed: Optional[:class:`Embed`]\n            The embed to edit the message with. ``None`` suppresses the embeds.\n            This should not be mixed with the ``embeds`` parameter.\n        attachments: List[Union[:class:`Attachment`, :class:`File`]]\n            A list of attachments to keep in the message as well as new files to upload. If ``[]`` is passed\n            then all attachments are removed.\n\n            .. note::\n\n                New files will always appear after current attachments.\n\n            .. versionadded:: 2.0\n        allowed_mentions: :class:`AllowedMentions`\n            Controls the mentions being processed in this message.\n            See :meth:`.abc.Messageable.send` for more information.\n\n        Raises\n        -------\n        HTTPException\n            Editing the message failed.\n        Forbidden\n            Edited a message that is not yours.\n        TypeError\n            You specified both ``embed`` and ``embeds``\n        ValueError\n            The length of ``embeds`` was invalid or\n            there was no token associated with this webhook.\n\n        Returns\n        --------\n        :class:`SyncWebhookMessage`\n            The newly edited message.\n        \"\"\"\n        return self._state._webhook.edit_message(\n            self.id,\n            content=content,\n            embeds=embeds,\n            embed=embed,\n            attachments=attachments,\n            allowed_mentions=allowed_mentions,\n            thread=self._state._thread,\n        )\n\n    def add_files(self, *files: File) -> SyncWebhookMessage:\n        r\"\"\"Adds new files to the end of the message attachments.\n\n        .. versionadded:: 2.0\n\n        Parameters\n        -----------\n        \\*files: :class:`File`\n            New files to add to the message.\n\n        Raises\n        -------\n        HTTPException\n            Editing the message failed.\n        Forbidden\n            Tried to edit a message that isn't yours.\n\n        Returns\n        --------\n        :class:`SyncWebhookMessage`\n            The newly edited message.\n        \"\"\"\n        return self.edit(attachments=[*self.attachments, *files])\n\n    def remove_attachments(self, *attachments: Attachment) -> SyncWebhookMessage:\n        r\"\"\"Removes attachments from the message.\n\n        .. versionadded:: 2.0\n\n        Parameters\n        -----------\n        \\*attachments: :class:`Attachment`\n            Attachments to remove from the message.\n\n        Raises\n        -------\n        HTTPException\n            Editing the message failed.\n        Forbidden\n            Tried to edit a message that isn't yours.\n\n        Returns\n        --------\n        :class:`SyncWebhookMessage`\n            The newly edited message.\n        \"\"\"\n        return self.edit(attachments=[a for a in self.attachments if a not in attachments])\n\n    def delete(self, *, delay: Optional[float] = None) -> None:\n        \"\"\"Deletes the message.\n\n        Parameters\n        -----------\n        delay: Optional[:class:`float`]\n            If provided, the number of seconds to wait before deleting the message.\n            This blocks the thread.\n\n        Raises\n        ------\n        Forbidden\n            You do not have proper permissions to delete the message.\n        NotFound\n            The message was deleted already.\n        HTTPException\n            Deleting the message failed.\n        \"\"\"\n\n        if delay is not None:\n            time.sleep(delay)\n        self._state._webhook.delete_message(self.id, thread=self._state._thread)\n\n\nclass SyncWebhook(BaseWebhook):\n    \"\"\"Represents a synchronous Discord webhook.\n\n    For an asynchronous counterpart, see :class:`Webhook`.\n\n    .. container:: operations\n\n        .. describe:: x == y\n\n            Checks if two webhooks are equal.\n\n        .. describe:: x != y\n\n            Checks if two webhooks are not equal.\n\n        .. describe:: hash(x)\n\n            Returns the webhooks's hash.\n\n    .. versionchanged:: 1.4\n        Webhooks are now comparable and hashable.\n\n    Attributes\n    ------------\n    id: :class:`int`\n        The webhook's ID\n    type: :class:`WebhookType`\n        The type of the webhook.\n\n        .. versionadded:: 1.3\n\n    token: Optional[:class:`str`]\n        The authentication token of the webhook. If this is ``None``\n        then the webhook cannot be used to make requests.\n    guild_id: Optional[:class:`int`]\n        The guild ID this webhook is for.\n    channel_id: Optional[:class:`int`]\n        The channel ID this webhook is for.\n    user: Optional[:class:`abc.User`]\n        The user this webhook was created by. If the webhook was\n        received without authentication then this will be ``None``.\n    name: Optional[:class:`str`]\n        The default name of the webhook.\n    source_guild: Optional[:class:`PartialWebhookGuild`]\n        The guild of the channel that this webhook is following.\n        Only given if :attr:`type` is :attr:`WebhookType.channel_follower`.\n\n        .. versionadded:: 2.0\n\n    source_channel: Optional[:class:`PartialWebhookChannel`]\n        The channel that this webhook is following.\n        Only given if :attr:`type` is :attr:`WebhookType.channel_follower`.\n\n        .. versionadded:: 2.0\n    \"\"\"\n\n    __slots__: Tuple[str, ...] = ('session',)\n\n    def __init__(\n        self,\n        data: WebhookPayload,\n        session: Session,\n        token: Optional[str] = None,\n        state: Optional[Union[ConnectionState, _WebhookState]] = None,\n    ) -> None:\n        super().__init__(data, token, state)\n        self.session: Session = session\n\n    def __repr__(self) -> str:\n        return f'<Webhook id={self.id!r} type={self.type!r} name={self.name!r}>'\n\n    @property\n    def url(self) -> str:\n        \"\"\":class:`str` : Returns the webhook's url.\"\"\"\n        return f'https://discord.com/api/webhooks/{self.id}/{self.token}'\n\n    @classmethod\n    def partial(cls, id: int, token: str, *, session: Session = MISSING, bot_token: Optional[str] = None) -> SyncWebhook:\n        \"\"\"Creates a partial :class:`Webhook`.\n\n        Parameters\n        -----------\n        id: :class:`int`\n            The ID of the webhook.\n        token: :class:`str`\n            The authentication token of the webhook.\n        session: :class:`requests.Session`\n            The session to use to send requests with. Note\n            that the library does not manage the session and\n            will not close it. If not given, the ``requests``\n            auto session creation functions are used instead.\n        bot_token: Optional[:class:`str`]\n            The bot authentication token for authenticated requests\n            involving the webhook.\n\n        Returns\n        --------\n        :class:`SyncWebhook`\n            A partial :class:`SyncWebhook`.\n            A partial :class:`SyncWebhook` is just a :class:`SyncWebhook` object with an ID and a token.\n        \"\"\"\n        data: WebhookPayload = {\n            'id': id,\n            'type': 1,\n            'token': token,\n        }\n        import requests\n\n        if session is not MISSING:\n            if not isinstance(session, requests.Session):\n                raise TypeError(f'expected requests.Session not {session.__class__.__name__}')\n        else:\n            session = requests  # type: ignore\n        return cls(data, session, token=bot_token)\n\n    @classmethod\n    def from_url(cls, url: str, *, session: Session = MISSING, bot_token: Optional[str] = None) -> SyncWebhook:\n        \"\"\"Creates a partial :class:`Webhook` from a webhook URL.\n\n        Parameters\n        ------------\n        url: :class:`str`\n            The URL of the webhook.\n        session: :class:`requests.Session`\n            The session to use to send requests with. Note\n            that the library does not manage the session and\n            will not close it. If not given, the ``requests``\n            auto session creation functions are used instead.\n        bot_token: Optional[:class:`str`]\n            The bot authentication token for authenticated requests\n            involving the webhook.\n\n        Raises\n        -------\n        ValueError\n            The URL is invalid.\n\n        Returns\n        --------\n        :class:`SyncWebhook`\n            A partial :class:`SyncWebhook`.\n            A partial :class:`SyncWebhook` is just a :class:`SyncWebhook` object with an ID and a token.\n        \"\"\"\n        m = re.search(r'discord(?:app)?\\.com/api/webhooks/(?P<id>[0-9]{17,20})/(?P<token>[A-Za-z0-9\\.\\-\\_]{60,})', url)\n        if m is None:\n            raise ValueError('Invalid webhook URL given.')\n\n        data: Dict[str, Any] = m.groupdict()\n        data['type'] = 1\n        import requests\n\n        if session is not MISSING:\n            if not isinstance(session, requests.Session):\n                raise TypeError(f'expected requests.Session not {session.__class__.__name__}')\n        else:\n            session = requests  # type: ignore\n        return cls(data, session, token=bot_token)  # type: ignore\n\n    def fetch(self, *, prefer_auth: bool = True) -> SyncWebhook:\n        \"\"\"Fetches the current webhook.\n\n        This could be used to get a full webhook from a partial webhook.\n\n        .. note::\n\n            When fetching with an unauthenticated webhook, i.e.\n            :meth:`is_authenticated` returns ``False``, then the\n            returned webhook does not contain any user information.\n\n        Parameters\n        -----------\n        prefer_auth: :class:`bool`\n            Whether to use the bot token over the webhook token\n            if available. Defaults to ``True``.\n\n        Raises\n        -------\n        HTTPException\n            Could not fetch the webhook\n        NotFound\n            Could not find the webhook by this ID\n        ValueError\n            This webhook does not have a token associated with it.\n\n        Returns\n        --------\n        :class:`SyncWebhook`\n            The fetched webhook.\n        \"\"\"\n        adapter: WebhookAdapter = _get_webhook_adapter()\n\n        if prefer_auth and self.auth_token:\n            data = adapter.fetch_webhook(self.id, self.auth_token, session=self.session)\n        elif self.token:\n            data = adapter.fetch_webhook_with_token(self.id, self.token, session=self.session)\n        else:\n            raise ValueError('This webhook does not have a token associated with it')\n\n        return SyncWebhook(data, self.session, token=self.auth_token, state=self._state)\n\n    def delete(self, *, reason: Optional[str] = None, prefer_auth: bool = True) -> None:\n        \"\"\"Deletes this Webhook.\n\n        Parameters\n        ------------\n        reason: Optional[:class:`str`]\n            The reason for deleting this webhook. Shows up on the audit log.\n\n            .. versionadded:: 1.4\n        prefer_auth: :class:`bool`\n            Whether to use the bot token over the webhook token\n            if available. Defaults to ``True``.\n\n        Raises\n        -------\n        HTTPException\n            Deleting the webhook failed.\n        NotFound\n            This webhook does not exist.\n        Forbidden\n            You do not have permissions to delete this webhook.\n        ValueError\n            This webhook does not have a token associated with it.\n        \"\"\"\n        if self.token is None and self.auth_token is None:\n            raise ValueError('This webhook does not have a token associated with it')\n\n        adapter: WebhookAdapter = _get_webhook_adapter()\n\n        if prefer_auth and self.auth_token:\n            adapter.delete_webhook(self.id, token=self.auth_token, session=self.session, reason=reason)\n        elif self.token:\n            adapter.delete_webhook_with_token(self.id, self.token, session=self.session, reason=reason)\n\n    def edit(\n        self,\n        *,\n        reason: Optional[str] = None,\n        name: Optional[str] = MISSING,\n        avatar: Optional[bytes] = MISSING,\n        channel: Optional[Snowflake] = None,\n        prefer_auth: bool = True,\n    ) -> SyncWebhook:\n        \"\"\"Edits this Webhook.\n\n        Parameters\n        ------------\n        name: Optional[:class:`str`]\n            The webhook's new default name.\n        avatar: Optional[:class:`bytes`]\n            A :term:`py:bytes-like object` representing the webhook's new default avatar.\n        channel: Optional[:class:`abc.Snowflake`]\n            The webhook's new channel. This requires an authenticated webhook.\n        reason: Optional[:class:`str`]\n            The reason for editing this webhook. Shows up on the audit log.\n\n            .. versionadded:: 1.4\n        prefer_auth: :class:`bool`\n            Whether to use the bot token over the webhook token\n            if available. Defaults to ``True``.\n\n        Raises\n        -------\n        HTTPException\n            Editing the webhook failed.\n        NotFound\n            This webhook does not exist.\n        ValueError\n            This webhook does not have a token associated with it\n            or it tried editing a channel without authentication.\n\n        Returns\n        --------\n        :class:`SyncWebhook`\n            The newly edited webhook.\n        \"\"\"\n        if self.token is None and self.auth_token is None:\n            raise ValueError('This webhook does not have a token associated with it')\n\n        payload = {}\n        if name is not MISSING:\n            payload['name'] = str(name) if name is not None else None\n\n        if avatar is not MISSING:\n            payload['avatar'] = utils._bytes_to_base64_data(avatar) if avatar is not None else None\n\n        adapter: WebhookAdapter = _get_webhook_adapter()\n\n        data: Optional[WebhookPayload] = None\n        # If a channel is given, always use the authenticated endpoint\n        if channel is not None:\n            if self.auth_token is None:\n                raise ValueError('Editing channel requires authenticated webhook')\n\n            payload['channel_id'] = channel.id\n            data = adapter.edit_webhook(self.id, self.auth_token, payload=payload, session=self.session, reason=reason)\n        elif prefer_auth and self.auth_token:\n            data = adapter.edit_webhook(self.id, self.auth_token, payload=payload, session=self.session, reason=reason)\n        elif self.token:\n            data = adapter.edit_webhook_with_token(self.id, self.token, payload=payload, session=self.session, reason=reason)\n\n        if data is None:\n            raise RuntimeError('Unreachable code hit: data was not assigned')\n\n        return SyncWebhook(data=data, session=self.session, token=self.auth_token, state=self._state)\n\n    def _create_message(self, data: MessagePayload, *, thread: Snowflake = MISSING) -> SyncWebhookMessage:\n        state = _WebhookState(self, parent=self._state, thread=thread)\n        # state may be artificial (unlikely at this point...)\n        channel = self.channel or PartialMessageable(state=self._state, guild_id=self.guild_id, id=int(data['channel_id']))  # type: ignore\n        # state is artificial\n        return SyncWebhookMessage(data=data, state=state, channel=channel)  # type: ignore\n\n    @overload\n    def send(\n        self,\n        content: str = MISSING,\n        *,\n        username: str = MISSING,\n        avatar_url: Any = MISSING,\n        tts: bool = MISSING,\n        file: File = MISSING,\n        files: Sequence[File] = MISSING,\n        embed: Embed = MISSING,\n        embeds: Sequence[Embed] = MISSING,\n        allowed_mentions: AllowedMentions = MISSING,\n        thread: Snowflake = MISSING,\n        thread_name: str = MISSING,\n        wait: Literal[True],\n        suppress_embeds: bool = MISSING,\n        silent: bool = MISSING,\n        applied_tags: List[ForumTag] = MISSING,\n        poll: Poll = MISSING,\n    ) -> SyncWebhookMessage:\n        ...\n\n    @overload\n    def send(\n        self,\n        content: str = MISSING,\n        *,\n        username: str = MISSING,\n        avatar_url: Any = MISSING,\n        tts: bool = MISSING,\n        file: File = MISSING,\n        files: Sequence[File] = MISSING,\n        embed: Embed = MISSING,\n        embeds: Sequence[Embed] = MISSING,\n        allowed_mentions: AllowedMentions = MISSING,\n        thread: Snowflake = MISSING,\n        thread_name: str = MISSING,\n        wait: Literal[False] = ...,\n        suppress_embeds: bool = MISSING,\n        silent: bool = MISSING,\n        applied_tags: List[ForumTag] = MISSING,\n        poll: Poll = MISSING,\n    ) -> None:\n        ...\n\n    def send(\n        self,\n        content: str = MISSING,\n        *,\n        username: str = MISSING,\n        avatar_url: Any = MISSING,\n        tts: bool = False,\n        file: File = MISSING,\n        files: Sequence[File] = MISSING,\n        embed: Embed = MISSING,\n        embeds: Sequence[Embed] = MISSING,\n        allowed_mentions: AllowedMentions = MISSING,\n        thread: Snowflake = MISSING,\n        thread_name: str = MISSING,\n        wait: bool = False,\n        suppress_embeds: bool = False,\n        silent: bool = False,\n        applied_tags: List[ForumTag] = MISSING,\n        poll: Poll = MISSING,\n    ) -> Optional[SyncWebhookMessage]:\n        \"\"\"Sends a message using the webhook.\n\n        The content must be a type that can convert to a string through ``str(content)``.\n\n        To upload a single file, the ``file`` parameter should be used with a\n        single :class:`File` object.\n\n        If the ``embed`` parameter is provided, it must be of type :class:`Embed` and\n        it must be a rich embed type. You cannot mix the ``embed`` parameter with the\n        ``embeds`` parameter, which must be a :class:`list` of :class:`Embed` objects to send.\n\n        Parameters\n        ------------\n        content: :class:`str`\n            The content of the message to send.\n        wait: :class:`bool`\n            Whether the server should wait before sending a response. This essentially\n            means that the return type of this function changes from ``None`` to\n            a :class:`WebhookMessage` if set to ``True``.\n        username: :class:`str`\n            The username to send with this message. If no username is provided\n            then the default username for the webhook is used.\n        avatar_url: :class:`str`\n            The avatar URL to send with this message. If no avatar URL is provided\n            then the default avatar for the webhook is used. If this is not a\n            string then it is explicitly cast using ``str``.\n        tts: :class:`bool`\n            Indicates if the message should be sent using text-to-speech.\n        file: :class:`File`\n            The file to upload. This cannot be mixed with ``files`` parameter.\n        files: List[:class:`File`]\n            A list of files to send with the content. This cannot be mixed with the\n            ``file`` parameter.\n        embed: :class:`Embed`\n            The rich embed for the content to send. This cannot be mixed with\n            ``embeds`` parameter.\n        embeds: List[:class:`Embed`]\n            A list of embeds to send with the content. Maximum of 10. This cannot\n            be mixed with the ``embed`` parameter.\n        allowed_mentions: :class:`AllowedMentions`\n            Controls the mentions being processed in this message.\n\n            .. versionadded:: 1.4\n        thread: :class:`~discord.abc.Snowflake`\n            The thread to send this message to.\n\n            .. versionadded:: 2.0\n        thread_name: :class:`str`\n            The thread name to create with this webhook if the webhook belongs\n            to a :class:`~discord.ForumChannel`. Note that this is mutually\n            exclusive with the ``thread`` parameter, as this will create a\n            new thread with the given name.\n\n            .. versionadded:: 2.0\n        suppress_embeds: :class:`bool`\n            Whether to suppress embeds for the message. This sends the message without any embeds if set to ``True``.\n\n            .. versionadded:: 2.0\n        silent: :class:`bool`\n            Whether to suppress push and desktop notifications for the message. This will increment the mention counter\n            in the UI, but will not actually send a notification.\n\n            .. versionadded:: 2.2\n        poll: :class:`Poll`\n            The poll to send with this message.\n\n            .. warning::\n\n                When sending a Poll via webhook, you cannot manually end it.\n\n            .. versionadded:: 2.4\n\n        Raises\n        --------\n        HTTPException\n            Sending the message failed.\n        NotFound\n            This webhook was not found.\n        Forbidden\n            The authorization token for the webhook is incorrect.\n        TypeError\n            You specified both ``embed`` and ``embeds`` or ``file`` and ``files``\n            or ``thread`` and ``thread_name``.\n        ValueError\n            The length of ``embeds`` was invalid or\n            there was no token associated with this webhook.\n\n        Returns\n        ---------\n        Optional[:class:`SyncWebhookMessage`]\n            If ``wait`` is ``True`` then the message that was sent, otherwise ``None``.\n        \"\"\"\n\n        if self.token is None:\n            raise ValueError('This webhook does not have a token associated with it')\n\n        previous_mentions: Optional[AllowedMentions] = getattr(self._state, 'allowed_mentions', None)\n        if content is None:\n            content = MISSING\n\n        if suppress_embeds or silent:\n            flags = MessageFlags._from_value(0)\n            flags.suppress_embeds = suppress_embeds\n            flags.suppress_notifications = silent\n        else:\n            flags = MISSING\n\n        if thread_name is not MISSING and thread is not MISSING:\n            raise TypeError('Cannot mix thread_name and thread keyword arguments.')\n\n        if applied_tags is MISSING:\n            applied_tag_ids = MISSING\n        else:\n            applied_tag_ids: SnowflakeList = [tag.id for tag in applied_tags]\n\n        with handle_message_parameters(\n            content=content,\n            username=username,\n            avatar_url=avatar_url,\n            tts=tts,\n            file=file,\n            files=files,\n            embed=embed,\n            embeds=embeds,\n            thread_name=thread_name,\n            allowed_mentions=allowed_mentions,\n            previous_allowed_mentions=previous_mentions,\n            flags=flags,\n            applied_tags=applied_tag_ids,\n            poll=poll,\n        ) as params:\n            adapter: WebhookAdapter = _get_webhook_adapter()\n            thread_id: Optional[int] = None\n            if thread is not MISSING:\n                thread_id = thread.id\n\n            data = adapter.execute_webhook(\n                self.id,\n                self.token,\n                session=self.session,\n                payload=params.payload,\n                multipart=params.multipart,\n                files=params.files,\n                thread_id=thread_id,\n                wait=wait,\n            )\n\n        msg = None\n\n        if wait:\n            msg = self._create_message(data, thread=thread)\n\n        if poll is not MISSING and msg:\n            poll._update(msg)\n\n        return msg\n\n    def fetch_message(self, id: int, /, *, thread: Snowflake = MISSING) -> SyncWebhookMessage:\n        \"\"\"Retrieves a single :class:`~discord.SyncWebhookMessage` owned by this webhook.\n\n        .. versionadded:: 2.0\n\n        Parameters\n        ------------\n        id: :class:`int`\n            The message ID to look for.\n        thread: :class:`~discord.abc.Snowflake`\n            The thread to look in.\n\n        Raises\n        --------\n        ~discord.NotFound\n            The specified message was not found.\n        ~discord.Forbidden\n            You do not have the permissions required to get a message.\n        ~discord.HTTPException\n            Retrieving the message failed.\n        ValueError\n            There was no token associated with this webhook.\n\n        Returns\n        --------\n        :class:`~discord.SyncWebhookMessage`\n            The message asked for.\n        \"\"\"\n\n        if self.token is None:\n            raise ValueError('This webhook does not have a token associated with it')\n\n        thread_id: Optional[int] = None\n        if thread is not MISSING:\n            thread_id = thread.id\n\n        adapter: WebhookAdapter = _get_webhook_adapter()\n        data = adapter.get_webhook_message(\n            self.id,\n            self.token,\n            id,\n            session=self.session,\n            thread_id=thread_id,\n        )\n        return self._create_message(data, thread=thread)\n\n    def edit_message(\n        self,\n        message_id: int,\n        *,\n        content: Optional[str] = MISSING,\n        embeds: Sequence[Embed] = MISSING,\n        embed: Optional[Embed] = MISSING,\n        attachments: Sequence[Union[Attachment, File]] = MISSING,\n        allowed_mentions: Optional[AllowedMentions] = None,\n        thread: Snowflake = MISSING,\n    ) -> SyncWebhookMessage:\n        \"\"\"Edits a message owned by this webhook.\n\n        This is a lower level interface to :meth:`WebhookMessage.edit` in case\n        you only have an ID.\n\n        .. versionadded:: 1.6\n\n        Parameters\n        ------------\n        message_id: :class:`int`\n            The message ID to edit.\n        content: Optional[:class:`str`]\n            The content to edit the message with or ``None`` to clear it.\n        embeds: List[:class:`Embed`]\n            A list of embeds to edit the message with.\n        embed: Optional[:class:`Embed`]\n            The embed to edit the message with. ``None`` suppresses the embeds.\n            This should not be mixed with the ``embeds`` parameter.\n        attachments: List[Union[:class:`Attachment`, :class:`File`]]\n            A list of attachments to keep in the message as well as new files to upload. If ``[]`` is passed\n            then all attachments are removed.\n\n            .. versionadded:: 2.0\n        allowed_mentions: :class:`AllowedMentions`\n            Controls the mentions being processed in this message.\n            See :meth:`.abc.Messageable.send` for more information.\n        thread: :class:`~discord.abc.Snowflake`\n            The thread the webhook message belongs to.\n\n            .. versionadded:: 2.0\n\n        Raises\n        -------\n        HTTPException\n            Editing the message failed.\n        Forbidden\n            Edited a message that is not yours.\n        TypeError\n            You specified both ``embed`` and ``embeds``\n        ValueError\n            The length of ``embeds`` was invalid or\n            there was no token associated with this webhook.\n        \"\"\"\n\n        if self.token is None:\n            raise ValueError('This webhook does not have a token associated with it')\n\n        previous_mentions: Optional[AllowedMentions] = getattr(self._state, 'allowed_mentions', None)\n        with handle_message_parameters(\n            content=content,\n            attachments=attachments,\n            embed=embed,\n            embeds=embeds,\n            allowed_mentions=allowed_mentions,\n            previous_allowed_mentions=previous_mentions,\n        ) as params:\n            thread_id: Optional[int] = None\n            if thread is not MISSING:\n                thread_id = thread.id\n\n            adapter: WebhookAdapter = _get_webhook_adapter()\n            data = adapter.edit_webhook_message(\n                self.id,\n                self.token,\n                message_id,\n                session=self.session,\n                payload=params.payload,\n                multipart=params.multipart,\n                files=params.files,\n                thread_id=thread_id,\n            )\n            return self._create_message(data, thread=thread)\n\n    def delete_message(self, message_id: int, /, *, thread: Snowflake = MISSING) -> None:\n        \"\"\"Deletes a message owned by this webhook.\n\n        This is a lower level interface to :meth:`WebhookMessage.delete` in case\n        you only have an ID.\n\n        .. versionadded:: 1.6\n\n        Parameters\n        ------------\n        message_id: :class:`int`\n            The message ID to delete.\n        thread: :class:`~discord.abc.Snowflake`\n            The thread the webhook message belongs to.\n\n            .. versionadded:: 2.0\n\n        Raises\n        -------\n        HTTPException\n            Deleting the message failed.\n        Forbidden\n            Deleted a message that is not yours.\n        ValueError\n            This webhook does not have a token associated with it.\n        \"\"\"\n        if self.token is None:\n            raise ValueError('This webhook does not have a token associated with it')\n\n        thread_id: Optional[int] = None\n        if thread is not MISSING:\n            thread_id = thread.id\n\n        adapter: WebhookAdapter = _get_webhook_adapter()\n        adapter.delete_webhook_message(\n            self.id,\n            self.token,\n            message_id,\n            session=self.session,\n            thread_id=thread_id,\n        )\n"
  },
  {
    "path": "discord/welcome_screen.py",
    "content": "# -*- coding: utf-8 -*-\n\n\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom __future__ import annotations\n\nfrom typing import List, Optional, TYPE_CHECKING, Union\nfrom .utils import _get_as_snowflake, get, MISSING\nfrom .partial_emoji import _EmojiTag\n\n__all__ = (\n    'WelcomeChannel',\n    'WelcomeScreen',\n)\n\nif TYPE_CHECKING:\n    from typing_extensions import Self\n    from .types.welcome_screen import (\n        WelcomeScreen as WelcomeScreenPayload,\n        WelcomeScreenChannel as WelcomeScreenChannelPayload,\n    )\n    from .abc import Snowflake\n    from .guild import Guild\n    from .partial_emoji import PartialEmoji\n    from .emoji import Emoji\n\n\nclass WelcomeChannel:\n    \"\"\"Represents a :class:`WelcomeScreen` welcome channel.\n\n    .. versionadded:: 2.0\n\n    Attributes\n    -----------\n    channel: :class:`abc.Snowflake`\n        The guild channel that is being referenced.\n    description: :class:`str`\n        The description shown of the channel.\n    emoji: Optional[:class:`PartialEmoji`, :class:`Emoji`, :class:`str`]\n        The emoji used beside the channel description.\n    \"\"\"\n\n    def __init__(\n        self, *, channel: Snowflake, description: str, emoji: Optional[Union[PartialEmoji, Emoji, str]] = None\n    ) -> None:\n        self.channel = channel\n        self.description = description\n        self.emoji = emoji\n\n    def __repr__(self) -> str:\n        return f'<WelcomeChannel channel={self.channel!r} description={self.description!r} emoji={self.emoji!r}>'\n\n    @classmethod\n    def _from_dict(cls, *, data: WelcomeScreenChannelPayload, guild: Guild) -> WelcomeChannel:\n        channel_id = int(data['channel_id'])\n\n        channel = guild.get_channel(channel_id)\n\n        description = data['description']\n        _emoji_id = _get_as_snowflake(data, 'emoji_id')\n        _emoji_name = data['emoji_name']\n\n        if _emoji_id:\n            # custom\n            emoji = get(guild.emojis, id=_emoji_id)\n        else:\n            # unicode or None\n            emoji = _emoji_name\n\n        return cls(channel=channel, description=description, emoji=emoji)  # type: ignore\n\n    def to_dict(self) -> WelcomeScreenChannelPayload:\n        ret: WelcomeScreenChannelPayload = {\n            'channel_id': self.channel.id,\n            'description': self.description,\n            'emoji_id': None,\n            'emoji_name': None,\n        }\n\n        if isinstance(self.emoji, _EmojiTag):\n            ret['emoji_id'] = self.emoji.id\n            ret['emoji_name'] = self.emoji.name\n        else:\n            # unicode or None\n            ret['emoji_name'] = self.emoji\n\n        return ret\n\n\nclass WelcomeScreen:\n    \"\"\"Represents a :class:`Guild` welcome screen.\n\n    .. versionadded:: 2.0\n\n    Attributes\n    -----------\n    description: :class:`str`\n        The description shown on the welcome screen.\n    welcome_channels: List[:class:`WelcomeChannel`]\n        The channels shown on the welcome screen.\n    \"\"\"\n\n    def __init__(self, *, data: WelcomeScreenPayload, guild: Guild) -> None:\n        self._state = guild._state\n        self._guild = guild\n        self._store(data)\n\n    def _store(self, data: WelcomeScreenPayload) -> None:\n        self.description: str = data['description']\n        welcome_channels = data.get('welcome_channels', [])\n        self.welcome_channels: List[WelcomeChannel] = [\n            WelcomeChannel._from_dict(data=wc, guild=self._guild) for wc in welcome_channels\n        ]\n\n    def __repr__(self) -> str:\n        return f'<WelcomeScreen description={self.description!r} welcome_channels={self.welcome_channels!r} enabled={self.enabled}>'\n\n    @property\n    def enabled(self) -> bool:\n        \"\"\":class:`bool`: Whether the welcome screen is displayed.\n\n        This is equivalent to checking if ``WELCOME_SCREEN_ENABLED``\n        is present in :attr:`Guild.features`.\n        \"\"\"\n        return 'WELCOME_SCREEN_ENABLED' in self._guild.features\n\n    async def edit(\n        self,\n        *,\n        description: str = MISSING,\n        welcome_channels: List[WelcomeChannel] = MISSING,\n        enabled: bool = MISSING,\n        reason: Optional[str] = None,\n    ) -> Self:\n        \"\"\"|coro|\n\n        Edit the welcome screen.\n\n        Welcome channels can only accept custom emojis if :attr:`Guild.premium_tier` is level 2 or above.\n\n        You must have :attr:`~Permissions.manage_guild` in the guild to do this.\n\n        Usage: ::\n\n            rules_channel = guild.get_channel(12345678)\n            announcements_channel = guild.get_channel(87654321)\n\n            custom_emoji = utils.get(guild.emojis, name='loudspeaker')\n\n            await welcome_screen.edit(\n                description='This is a very cool community server!',\n                welcome_channels=[\n                    WelcomeChannel(channel=rules_channel, description='Read the rules!', emoji='👨‍🏫'),\n                    WelcomeChannel(channel=announcements_channel, description='Watch out for announcements!', emoji=custom_emoji),\n                ]\n            )\n\n        Parameters\n        ------------\n        description: Optional[:class:`str`]\n            The welcome screen's description.\n        welcome_channels: Optional[List[:class:`WelcomeChannel`]]\n            The welcome channels, in their respective order.\n        enabled: Optional[:class:`bool`]\n            Whether the welcome screen should be displayed.\n        reason: Optional[:class:`str`]\n            The reason for editing the welcome screen. Shows up on the audit log.\n\n        Raises\n        -------\n        HTTPException\n            Editing the welcome screen failed.\n        Forbidden\n            You don't have permissions to edit the welcome screen.\n        NotFound\n            This welcome screen does not exist.\n        \"\"\"\n        fields = {}\n\n        if welcome_channels is not MISSING:\n            welcome_channels_serialised = []\n            for wc in welcome_channels:\n                if not isinstance(wc, WelcomeChannel):\n                    raise TypeError('welcome_channels parameter must be a list of WelcomeChannel')\n                welcome_channels_serialised.append(wc.to_dict())\n            fields['welcome_channels'] = welcome_channels_serialised\n\n        if description is not MISSING:\n            fields['description'] = description\n\n        if enabled is not MISSING:\n            fields['enabled'] = enabled\n\n        data = await self._state.http.edit_welcome_screen(self._guild.id, reason=reason, **fields)\n        return self.__class__(data=data, guild=self._guild)\n"
  },
  {
    "path": "discord/widget.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom __future__ import annotations\n\nfrom typing import List, Optional, TYPE_CHECKING, Union\n\nfrom .utils import snowflake_time, _get_as_snowflake, resolve_invite\nfrom .user import BaseUser\nfrom .activity import BaseActivity, Spotify, create_activity\nfrom .invite import Invite\nfrom .enums import Status, try_enum\n\nif TYPE_CHECKING:\n    import datetime\n    from .state import ConnectionState\n    from .types.widget import (\n        WidgetMember as WidgetMemberPayload,\n        Widget as WidgetPayload,\n    )\n\n__all__ = (\n    'WidgetChannel',\n    'WidgetMember',\n    'Widget',\n)\n\n\nclass WidgetChannel:\n    \"\"\"Represents a \"partial\" widget channel.\n\n    .. container:: operations\n\n        .. describe:: x == y\n\n            Checks if two partial channels are the same.\n\n        .. describe:: x != y\n\n            Checks if two partial channels are not the same.\n\n        .. describe:: hash(x)\n\n            Return the partial channel's hash.\n\n        .. describe:: str(x)\n\n            Returns the partial channel's name.\n\n    Attributes\n    -----------\n    id: :class:`int`\n        The channel's ID.\n    name: :class:`str`\n        The channel's name.\n    position: :class:`int`\n        The channel's position\n    \"\"\"\n\n    __slots__ = ('id', 'name', 'position')\n\n    def __init__(self, id: int, name: str, position: int) -> None:\n        self.id: int = id\n        self.name: str = name\n        self.position: int = position\n\n    def __str__(self) -> str:\n        return self.name\n\n    def __repr__(self) -> str:\n        return f'<WidgetChannel id={self.id} name={self.name!r} position={self.position!r}>'\n\n    @property\n    def mention(self) -> str:\n        \"\"\":class:`str`: The string that allows you to mention the channel.\"\"\"\n        return f'<#{self.id}>'\n\n    @property\n    def created_at(self) -> datetime.datetime:\n        \"\"\":class:`datetime.datetime`: Returns the channel's creation time in UTC.\"\"\"\n        return snowflake_time(self.id)\n\n\nclass WidgetMember(BaseUser):\n    \"\"\"Represents a \"partial\" member of the widget's guild.\n\n    .. container:: operations\n\n        .. describe:: x == y\n\n            Checks if two widget members are the same.\n\n        .. describe:: x != y\n\n            Checks if two widget members are not the same.\n\n        .. describe:: hash(x)\n\n            Return the widget member's hash.\n\n        .. describe:: str(x)\n\n            Returns the widget member's handle (e.g. ``name`` or ``name#discriminator``).\n\n    Attributes\n    -----------\n    id: :class:`int`\n        The member's ID.\n    name: :class:`str`\n        The member's username.\n    discriminator: :class:`str`\n        The member's discriminator. This is a legacy concept that is no longer used.\n    global_name: Optional[:class:`str`]\n        The member's global nickname, taking precedence over the username in display.\n\n        .. versionadded:: 2.3\n    bot: :class:`bool`\n        Whether the member is a bot.\n    status: :class:`Status`\n        The member's status.\n    nick: Optional[:class:`str`]\n        The member's guild-specific nickname. Takes precedence over the global name.\n    avatar: Optional[:class:`str`]\n        The member's avatar hash.\n    activity: Optional[Union[:class:`BaseActivity`, :class:`Spotify`]]\n        The member's activity.\n    deafened: Optional[:class:`bool`]\n        Whether the member is currently deafened.\n    muted: Optional[:class:`bool`]\n        Whether the member is currently muted.\n    suppress: Optional[:class:`bool`]\n        Whether the member is currently being suppressed.\n    connected_channel: Optional[:class:`WidgetChannel`]\n        Which channel the member is connected to.\n    \"\"\"\n\n    __slots__ = (\n        'status',\n        'nick',\n        'avatar',\n        'activity',\n        'deafened',\n        'suppress',\n        'muted',\n        'connected_channel',\n    )\n\n    if TYPE_CHECKING:\n        activity: Optional[Union[BaseActivity, Spotify]]\n\n    def __init__(\n        self,\n        *,\n        state: ConnectionState,\n        data: WidgetMemberPayload,\n        connected_channel: Optional[WidgetChannel] = None,\n    ) -> None:\n        super().__init__(state=state, data=data)\n        self.nick: Optional[str] = data.get('nick')\n        self.status: Status = try_enum(Status, data.get('status'))\n        self.deafened: Optional[bool] = data.get('deaf', False) or data.get('self_deaf', False)\n        self.muted: Optional[bool] = data.get('mute', False) or data.get('self_mute', False)\n        self.suppress: Optional[bool] = data.get('suppress', False)\n\n        try:\n            game = data['game']\n        except KeyError:\n            activity = None\n        else:\n            activity = create_activity(game, state)\n\n        self.activity: Optional[Union[BaseActivity, Spotify]] = activity\n\n        self.connected_channel: Optional[WidgetChannel] = connected_channel\n\n    def __repr__(self) -> str:\n        return f\"<WidgetMember name={self.name!r} global_name={self.global_name!r}\" f\" bot={self.bot} nick={self.nick!r}>\"\n\n    @property\n    def display_name(self) -> str:\n        \"\"\":class:`str`: Returns the member's display name.\"\"\"\n        return self.nick or self.name\n\n\nclass Widget:\n    \"\"\"Represents a :class:`Guild` widget.\n\n    .. container:: operations\n\n        .. describe:: x == y\n\n            Checks if two widgets are the same.\n\n        .. describe:: x != y\n\n            Checks if two widgets are not the same.\n\n        .. describe:: str(x)\n\n            Returns the widget's JSON URL.\n\n    Attributes\n    -----------\n    id: :class:`int`\n        The guild's ID.\n    name: :class:`str`\n        The guild's name.\n    channels: List[:class:`WidgetChannel`]\n        The accessible voice channels in the guild.\n    members: List[:class:`WidgetMember`]\n        The online members in the guild. Offline members\n        do not appear in the widget.\n\n        .. note::\n\n            Due to a Discord limitation, if this data is available\n            the users will be \"anonymized\" with linear IDs and discriminator\n            information being incorrect. Likewise, the number of members\n            retrieved is capped.\n    presence_count: :class:`int`\n        The approximate number of online members in the guild.\n        Offline members are not included in this count.\n\n        .. versionadded:: 2.0\n\n    \"\"\"\n\n    __slots__ = ('_state', 'channels', '_invite', 'id', 'members', 'name', 'presence_count')\n\n    def __init__(self, *, state: ConnectionState, data: WidgetPayload) -> None:\n        self._state = state\n        self._invite = data['instant_invite']\n        self.name: str = data['name']\n        self.id: int = int(data['id'])\n\n        self.channels: List[WidgetChannel] = []\n        for channel in data.get('channels', []):\n            _id = int(channel['id'])\n            self.channels.append(WidgetChannel(id=_id, name=channel['name'], position=channel['position']))\n\n        self.members: List[WidgetMember] = []\n        channels = {channel.id: channel for channel in self.channels}\n        for member in data.get('members', []):\n            connected_channel = _get_as_snowflake(member, 'channel_id')\n            if connected_channel is not None:\n                if connected_channel in channels:\n                    connected_channel = channels[connected_channel]\n                else:\n                    connected_channel = WidgetChannel(id=connected_channel, name='', position=0)\n\n            self.members.append(WidgetMember(state=self._state, data=member, connected_channel=connected_channel))\n\n        self.presence_count: int = data['presence_count']\n\n    def __str__(self) -> str:\n        return self.json_url\n\n    def __eq__(self, other: object) -> bool:\n        if isinstance(other, Widget):\n            return self.id == other.id\n        return False\n\n    def __repr__(self) -> str:\n        return f'<Widget id={self.id} name={self.name!r} invite_url={self.invite_url!r}>'\n\n    @property\n    def created_at(self) -> datetime.datetime:\n        \"\"\":class:`datetime.datetime`: Returns the member's creation time in UTC.\"\"\"\n        return snowflake_time(self.id)\n\n    @property\n    def json_url(self) -> str:\n        \"\"\":class:`str`: The JSON URL of the widget.\"\"\"\n        return f\"https://discord.com/api/guilds/{self.id}/widget.json\"\n\n    @property\n    def invite_url(self) -> Optional[str]:\n        \"\"\"Optional[:class:`str`]: The invite URL for the guild, if available.\"\"\"\n        return self._invite\n\n    async def fetch_invite(self, *, with_counts: bool = True) -> Optional[Invite]:\n        \"\"\"|coro|\n\n        Retrieves an :class:`Invite` from the widget's invite URL.\n        This is the same as :meth:`Client.fetch_invite`; the invite\n        code is abstracted away.\n\n        Parameters\n        -----------\n        with_counts: :class:`bool`\n            Whether to include count information in the invite. This fills the\n            :attr:`Invite.approximate_member_count` and :attr:`Invite.approximate_presence_count`\n            fields.\n\n        Returns\n        --------\n        Optional[:class:`Invite`]\n            The invite from the widget's invite URL, if available.\n        \"\"\"\n        if self._invite:\n            resolved = resolve_invite(self._invite)\n            data = await self._state.http.get_invite(resolved.code, with_counts=with_counts)\n            return Invite.from_incomplete(state=self._state, data=data)\n        return None\n"
  },
  {
    "path": "docs/Makefile",
    "content": "# Makefile for Sphinx documentation\n#\n\n# You can set these variables from the command line.\nSPHINXOPTS    =\nSPHINXBUILD   = sphinx-build\nPAPER         =\nBUILDDIR      = _build\n\n# User-friendly check for sphinx-build\nifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)\n$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/)\nendif\n\n# Internal variables.\nPAPEROPT_a4     = -D latex_paper_size=a4\nPAPEROPT_letter = -D latex_paper_size=letter\nALLSPHINXOPTS   = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .\n# the i18n builder cannot share the environment and doctrees with the others\nI18NSPHINXOPTS  = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .\n\n.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest coverage gettext\n\nhelp:\n\t@echo \"Please use \\`make <target>' where <target> is one of\"\n\t@echo \"  html       to make standalone HTML files\"\n\t@echo \"  dirhtml    to make HTML files named index.html in directories\"\n\t@echo \"  singlehtml to make a single large HTML file\"\n\t@echo \"  pickle     to make pickle files\"\n\t@echo \"  json       to make JSON files\"\n\t@echo \"  htmlhelp   to make HTML files and a HTML help project\"\n\t@echo \"  qthelp     to make HTML files and a qthelp project\"\n\t@echo \"  devhelp    to make HTML files and a Devhelp project\"\n\t@echo \"  epub       to make an epub\"\n\t@echo \"  latex      to make LaTeX files, you can set PAPER=a4 or PAPER=letter\"\n\t@echo \"  latexpdf   to make LaTeX files and run them through pdflatex\"\n\t@echo \"  latexpdfja to make LaTeX files and run them through platex/dvipdfmx\"\n\t@echo \"  text       to make text files\"\n\t@echo \"  man        to make manual pages\"\n\t@echo \"  texinfo    to make Texinfo files\"\n\t@echo \"  info       to make Texinfo files and run them through makeinfo\"\n\t@echo \"  gettext    to make PO message catalogs\"\n\t@echo \"  changes    to make an overview of all changed/added/deprecated items\"\n\t@echo \"  xml        to make Docutils-native XML files\"\n\t@echo \"  pseudoxml  to make pseudoxml-XML files for display purposes\"\n\t@echo \"  linkcheck  to check all external links for integrity\"\n\t@echo \"  doctest    to run all doctests embedded in the documentation (if enabled)\"\n\t@echo \"  coverage   to run coverage check of the documentation (if enabled)\"\n\nclean:\n\trm -rf $(BUILDDIR)/*\n\nhtml:\n\t$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html\n\t@echo\n\t@echo \"Build finished. The HTML pages are in $(BUILDDIR)/html.\"\n\ndirhtml:\n\t$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml\n\t@echo\n\t@echo \"Build finished. The HTML pages are in $(BUILDDIR)/dirhtml.\"\n\nsinglehtml:\n\t$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml\n\t@echo\n\t@echo \"Build finished. The HTML page is in $(BUILDDIR)/singlehtml.\"\n\npickle:\n\t$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle\n\t@echo\n\t@echo \"Build finished; now you can process the pickle files.\"\n\njson:\n\t$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json\n\t@echo\n\t@echo \"Build finished; now you can process the JSON files.\"\n\nhtmlhelp:\n\t$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp\n\t@echo\n\t@echo \"Build finished; now you can run HTML Help Workshop with the\" \\\n\t      \".hhp project file in $(BUILDDIR)/htmlhelp.\"\n\nqthelp:\n\t$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp\n\t@echo\n\t@echo \"Build finished; now you can run \"qcollectiongenerator\" with the\" \\\n\t      \".qhcp project file in $(BUILDDIR)/qthelp, like this:\"\n\t@echo \"# qcollectiongenerator $(BUILDDIR)/qthelp/discord.py.qhcp\"\n\t@echo \"To view the help file:\"\n\t@echo \"# assistant -collectionFile $(BUILDDIR)/qthelp/discord.py.qhc\"\n\ndevhelp:\n\t$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp\n\t@echo\n\t@echo \"Build finished.\"\n\t@echo \"To view the help file:\"\n\t@echo \"# mkdir -p $$HOME/.local/share/devhelp/discord.py\"\n\t@echo \"# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/discord.py\"\n\t@echo \"# devhelp\"\n\nepub:\n\t$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub\n\t@echo\n\t@echo \"Build finished. The epub file is in $(BUILDDIR)/epub.\"\n\nlatex:\n\t$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex\n\t@echo\n\t@echo \"Build finished; the LaTeX files are in $(BUILDDIR)/latex.\"\n\t@echo \"Run \\`make' in that directory to run these through (pdf)latex\" \\\n\t      \"(use \\`make latexpdf' here to do that automatically).\"\n\nlatexpdf:\n\t$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex\n\t@echo \"Running LaTeX files through pdflatex...\"\n\t$(MAKE) -C $(BUILDDIR)/latex all-pdf\n\t@echo \"pdflatex finished; the PDF files are in $(BUILDDIR)/latex.\"\n\nlatexpdfja:\n\t$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex\n\t@echo \"Running LaTeX files through platex and dvipdfmx...\"\n\t$(MAKE) -C $(BUILDDIR)/latex all-pdf-ja\n\t@echo \"pdflatex finished; the PDF files are in $(BUILDDIR)/latex.\"\n\ntext:\n\t$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text\n\t@echo\n\t@echo \"Build finished. The text files are in $(BUILDDIR)/text.\"\n\nman:\n\t$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man\n\t@echo\n\t@echo \"Build finished. The manual pages are in $(BUILDDIR)/man.\"\n\ntexinfo:\n\t$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo\n\t@echo\n\t@echo \"Build finished. The Texinfo files are in $(BUILDDIR)/texinfo.\"\n\t@echo \"Run \\`make' in that directory to run these through makeinfo\" \\\n\t      \"(use \\`make info' here to do that automatically).\"\n\ninfo:\n\t$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo\n\t@echo \"Running Texinfo files through makeinfo...\"\n\tmake -C $(BUILDDIR)/texinfo info\n\t@echo \"makeinfo finished; the Info files are in $(BUILDDIR)/texinfo.\"\n\ngettext:\n\t$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale\n\t@echo\n\t@echo \"Build finished. The message catalogs are in $(BUILDDIR)/locale.\"\n\nchanges:\n\t$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes\n\t@echo\n\t@echo \"The overview file is in $(BUILDDIR)/changes.\"\n\nlinkcheck:\n\t$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck\n\t@echo\n\t@echo \"Link check complete; look for any errors in the above output \" \\\n\t      \"or in $(BUILDDIR)/linkcheck/output.txt.\"\n\ndoctest:\n\t$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest\n\t@echo \"Testing of doctests in the sources finished, look at the \" \\\n\t      \"results in $(BUILDDIR)/doctest/output.txt.\"\n\ncoverage:\n\t$(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(BUILDDIR)/coverage\n\t@echo \"Testing of coverage in the sources finished, look at the \" \\\n\t      \"results in $(BUILDDIR)/coverage/python.txt.\"\n\nxml:\n\t$(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml\n\t@echo\n\t@echo \"Build finished. The XML files are in $(BUILDDIR)/xml.\"\n\npseudoxml:\n\t$(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml\n\t@echo\n\t@echo \"Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml.\"\n"
  },
  {
    "path": "docs/_static/codeblocks.css",
    "content": "/* light theme: default */\n.highlight .hll { background-color: #ffffcc }\n.highlight  { background: #f0f0f0; }\n.highlight .c { color: #60a0b0; font-style: italic } /* Comment */\n.highlight .err { border: 1px solid #FF0000 } /* Error */\n.highlight .k { color: #007020; font-weight: bold } /* Keyword */\n.highlight .o { color: #666666 } /* Operator */\n.highlight .ch { color: #60a0b0; font-style: italic } /* Comment.Hashbang */\n.highlight .cm { color: #60a0b0; font-style: italic } /* Comment.Multiline */\n.highlight .cp { color: #007020 } /* Comment.Preproc */\n.highlight .cpf { color: #60a0b0; font-style: italic } /* Comment.PreprocFile */\n.highlight .c1 { color: #60a0b0; font-style: italic } /* Comment.Single */\n.highlight .cs { color: #60a0b0; background-color: #fff0f0 } /* Comment.Special */\n.highlight .gd { color: #A00000 } /* Generic.Deleted */\n.highlight .ge { font-style: italic } /* Generic.Emph */\n.highlight .gr { color: #FF0000 } /* Generic.Error */\n.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */\n.highlight .gi { color: #00A000 } /* Generic.Inserted */\n.highlight .go { color: #888888 } /* Generic.Output */\n.highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */\n.highlight .gs { font-weight: bold } /* Generic.Strong */\n.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */\n.highlight .gt { color: #0044DD } /* Generic.Traceback */\n.highlight .kc { color: #007020; font-weight: bold } /* Keyword.Constant */\n.highlight .kd { color: #007020; font-weight: bold } /* Keyword.Declaration */\n.highlight .kn { color: #007020; font-weight: bold } /* Keyword.Namespace */\n.highlight .kp { color: #007020 } /* Keyword.Pseudo */\n.highlight .kr { color: #007020; font-weight: bold } /* Keyword.Reserved */\n.highlight .kt { color: #902000 } /* Keyword.Type */\n.highlight .m { color: #40a070 } /* Literal.Number */\n.highlight .s { color: #4070a0 } /* Literal.String */\n.highlight .na { color: #4070a0 } /* Name.Attribute */\n.highlight .nb { color: #007020 } /* Name.Builtin */\n.highlight .nc { color: #0e84b5; font-weight: bold } /* Name.Class */\n.highlight .no { color: #60add5 } /* Name.Constant */\n.highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */\n.highlight .ni { color: #d55537; font-weight: bold } /* Name.Entity */\n.highlight .ne { color: #007020 } /* Name.Exception */\n.highlight .nf { color: #06287e } /* Name.Function */\n.highlight .nl { color: #002070; font-weight: bold } /* Name.Label */\n.highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */\n.highlight .nt { color: #062873; font-weight: bold } /* Name.Tag */\n.highlight .nv { color: #bb60d5 } /* Name.Variable */\n.highlight .ow { color: #007020; font-weight: bold } /* Operator.Word */\n.highlight .w { color: #bbbbbb } /* Text.Whitespace */\n.highlight .mb { color: #40a070 } /* Literal.Number.Bin */\n.highlight .mf { color: #40a070 } /* Literal.Number.Float */\n.highlight .mh { color: #40a070 } /* Literal.Number.Hex */\n.highlight .mi { color: #40a070 } /* Literal.Number.Integer */\n.highlight .mo { color: #40a070 } /* Literal.Number.Oct */\n.highlight .sa { color: #4070a0 } /* Literal.String.Affix */\n.highlight .sb { color: #4070a0 } /* Literal.String.Backtick */\n.highlight .sc { color: #4070a0 } /* Literal.String.Char */\n.highlight .dl { color: #4070a0 } /* Literal.String.Delimiter */\n.highlight .sd { color: #4070a0; font-style: italic } /* Literal.String.Doc */\n.highlight .s2 { color: #4070a0 } /* Literal.String.Double */\n.highlight .se { color: #4070a0; font-weight: bold } /* Literal.String.Escape */\n.highlight .sh { color: #4070a0 } /* Literal.String.Heredoc */\n.highlight .si { color: #70a0d0; font-style: italic } /* Literal.String.Interpol */\n.highlight .sx { color: #c65d09 } /* Literal.String.Other */\n.highlight .sr { color: #235388 } /* Literal.String.Regex */\n.highlight .s1 { color: #4070a0 } /* Literal.String.Single */\n.highlight .ss { color: #517918 } /* Literal.String.Symbol */\n.highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */\n.highlight .fm { color: #06287e } /* Name.Function.Magic */\n.highlight .vc { color: #bb60d5 } /* Name.Variable.Class */\n.highlight .vg { color: #bb60d5 } /* Name.Variable.Global */\n.highlight .vi { color: #bb60d5 } /* Name.Variable.Instance */\n.highlight .vm { color: #bb60d5 } /* Name.Variable.Magic */\n.highlight .il { color: #40a070 } /* Literal.Number.Integer.Long */\n\n/* dark theme: modified \"native\" */\n:root[data-theme=\"dark\"] .highlight pre { background-color: #2a2a2e }\n:root[data-theme=\"dark\"] .highlight .hll { background-color: #2a2a2e }\n:root[data-theme=\"dark\"] .highlight .c { color: #999999; font-style: italic } /* Comment */\n:root[data-theme=\"dark\"] .highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */\n:root[data-theme=\"dark\"] .highlight .g { color: #d0d0d0 } /* Generic */\n:root[data-theme=\"dark\"] .highlight .k { color: #6ab825; font-weight: bold } /* Keyword */\n:root[data-theme=\"dark\"] .highlight .l { color: #d0d0d0 } /* Literal */\n:root[data-theme=\"dark\"] .highlight .n { color: #d0d0d0 } /* Name */\n:root[data-theme=\"dark\"] .highlight .o { color: #d0d0d0 } /* Operator */\n:root[data-theme=\"dark\"] .highlight .x { color: #d0d0d0 } /* Other */\n:root[data-theme=\"dark\"] .highlight .p { color: #d0d0d0 } /* Punctuation */\n:root[data-theme=\"dark\"] .highlight .cm { color: #999999; font-style: italic } /* Comment.Multiline */\n:root[data-theme=\"dark\"] .highlight .cp { color: #cd2828; font-weight: bold } /* Comment.Preproc */\n:root[data-theme=\"dark\"] .highlight .c1 { color: #999999; font-style: italic } /* Comment.Single */\n:root[data-theme=\"dark\"] .highlight .cs { color: #e50808; font-weight: bold; background-color: #520000 } /* Comment.Special */\n:root[data-theme=\"dark\"] .highlight .gd { color: #d22323 } /* Generic.Deleted */\n:root[data-theme=\"dark\"] .highlight .ge { color: #d0d0d0; font-style: italic } /* Generic.Emph */\n:root[data-theme=\"dark\"] .highlight .gr { color: #d22323 } /* Generic.Error */\n:root[data-theme=\"dark\"] .highlight .gh { color: #ffffff; font-weight: bold } /* Generic.Heading */\n:root[data-theme=\"dark\"] .highlight .gi { color: #589819 } /* Generic.Inserted */\n:root[data-theme=\"dark\"] .highlight .go { color: #cccccc } /* Generic.Output */\n:root[data-theme=\"dark\"] .highlight .gp { color: #aaaaaa } /* Generic.Prompt */\n:root[data-theme=\"dark\"] .highlight .gs { color: #d0d0d0; font-weight: bold } /* Generic.Strong */\n:root[data-theme=\"dark\"] .highlight .gu { color: #ffffff; text-decoration: underline } /* Generic.Subheading */\n:root[data-theme=\"dark\"] .highlight .gt { color: #d22323 } /* Generic.Traceback */\n:root[data-theme=\"dark\"] .highlight .kc { color: #6ab825; font-weight: bold } /* Keyword.Constant */\n:root[data-theme=\"dark\"] .highlight .kd { color: #6ab825; font-weight: bold } /* Keyword.Declaration */\n:root[data-theme=\"dark\"] .highlight .kn { color: #6ab825; font-weight: bold } /* Keyword.Namespace */\n:root[data-theme=\"dark\"] .highlight .kp { color: #6ab825 } /* Keyword.Pseudo */\n:root[data-theme=\"dark\"] .highlight .kr { color: #6ab825; font-weight: bold } /* Keyword.Reserved */\n:root[data-theme=\"dark\"] .highlight .kt { color: #6ab825; font-weight: bold } /* Keyword.Type */\n:root[data-theme=\"dark\"] .highlight .ld { color: #d0d0d0 } /* Literal.Date */\n:root[data-theme=\"dark\"] .highlight .m { color: #7fb1d7 } /* Literal.Number */\n:root[data-theme=\"dark\"] .highlight .s { color: #ed9d13 } /* Literal.String */\n:root[data-theme=\"dark\"] .highlight .na { color: #bbbbbb; } /* Name.Attribute */\n:root[data-theme=\"dark\"] .highlight .nb { color: #29a5b3; } /* Name.Builtin */\n:root[data-theme=\"dark\"] .highlight .nc { color: #6494d8;} /* Name.Class */\n:root[data-theme=\"dark\"] .highlight .no { color: #40ffff; } /* Name.Constant */\n:root[data-theme=\"dark\"] .highlight .nd { color: #ffa500; } /* Name.Decorator */\n:root[data-theme=\"dark\"] .highlight .ni { color: #d0d0d0; } /* Name.Entity */\n:root[data-theme=\"dark\"] .highlight .ne { color: #bbbbbb; } /* Name.Exception */\n:root[data-theme=\"dark\"] .highlight .nf { color: #6494d8; } /* Name.Function */\n:root[data-theme=\"dark\"] .highlight .fm { color: #6494d8; } /* Name.Function.Magic */\n:root[data-theme=\"dark\"] .highlight .nl { color: #d0d0d0; } /* Name.Label */\n:root[data-theme=\"dark\"] .highlight .nn { color: #6494d8;} /* Name.Namespace */\n:root[data-theme=\"dark\"] .highlight .nx { color: #d0d0d0; } /* Name.Other */\n:root[data-theme=\"dark\"] .highlight .py { color: #d0d0d0; } /* Name.Property */\n:root[data-theme=\"dark\"] .highlight .nt { color: #6ab825; font-weight: bold } /* Name.Tag */\n:root[data-theme=\"dark\"] .highlight .nv { color: #40ffff; } /* Name.Variable */\n:root[data-theme=\"dark\"] .highlight .ow { color: #6ab825; font-weight: bold } /* Operator.Word */\n:root[data-theme=\"dark\"] .highlight .w  { color: #666666; } /* Text.Whitespace */\n:root[data-theme=\"dark\"] .highlight .mf { color: #7fb1d7; } /* Literal.Number.Float */\n:root[data-theme=\"dark\"] .highlight .mh { color: #7fb1d7; } /* Literal.Number.Hex */\n:root[data-theme=\"dark\"] .highlight .mi { color: #7fb1d7; } /* Literal.Number.Integer */\n:root[data-theme=\"dark\"] .highlight .mo { color: #7fb1d7; } /* Literal.Number.Oct */\n:root[data-theme=\"dark\"] .highlight .sb { color: #ed9d13; } /* Literal.String.Backtick */\n:root[data-theme=\"dark\"] .highlight .sc { color: #ed9d13; } /* Literal.String.Char */\n:root[data-theme=\"dark\"] .highlight .sd { color: #ed9d13; } /* Literal.String.Doc */\n:root[data-theme=\"dark\"] .highlight .s2 { color: #ed9d13; } /* Literal.String.Double */\n:root[data-theme=\"dark\"] .highlight .se { color: #ed9d13; } /* Literal.String.Escape */\n:root[data-theme=\"dark\"] .highlight .sh { color: #ed9d13; } /* Literal.String.Heredoc */\n:root[data-theme=\"dark\"] .highlight .si { color: #ed9d13; } /* Literal.String.Interpol */\n:root[data-theme=\"dark\"] .highlight .sx { color: #ffa500; } /* Literal.String.Other */\n:root[data-theme=\"dark\"] .highlight .sr { color: #ed9d13; } /* Literal.String.Regex */\n:root[data-theme=\"dark\"] .highlight .s1 { color: #ed9d13; } /* Literal.String.Single */\n:root[data-theme=\"dark\"] .highlight .ss { color: #ed9d13; } /* Literal.String.Symbol */\n:root[data-theme=\"dark\"] .highlight .bp { color: #29a5b3; } /* Name.Builtin.Pseudo */\n:root[data-theme=\"dark\"] .highlight .vc { color: #40ffff; } /* Name.Variable.Class */\n:root[data-theme=\"dark\"] .highlight .vg { color: #40ffff; } /* Name.Variable.Global */\n:root[data-theme=\"dark\"] .highlight .vi { color: #40ffff; } /* Name.Variable.Instance */\n:root[data-theme=\"dark\"] .highlight .il { color: #7fb1d7; } /* Literal.Number.Integer.Long */\n"
  },
  {
    "path": "docs/_static/copy.js",
    "content": "const COPY = \"content_copy\";\nconst COPIED = \"done\";\n\nconst copy = async (obj) => {\n  // <span class=\"copy\"><span class=\"material-icons\">{{text}}</span></span>\n  await navigator.clipboard.writeText(obj.children[1].innerText).then(\n    () => {\n      let icon = obj.children[0].children[0];\n      icon.textContent = COPIED;\n      setTimeout(() => (icon.textContent = COPY), 2500);\n    },\n    (r) => alert(DPY_TRANSLATIONS.copy_code_error + '\\n' + r.toString())\n  );\n};\n\ndocument.addEventListener(\"DOMContentLoaded\", () => {\n  let allCodeblocks = document.querySelectorAll(\"div[class='highlight']\");\n\n  for (let codeblock of allCodeblocks) {\n    codeblock.parentNode.className += \" relative-copy\";\n    let copyEl = document.createElement(\"span\");\n    copyEl.addEventListener('click', () => copy(codeblock));\n    copyEl.className = \"copy\";\n    copyEl.setAttribute(\"aria-label\", DPY_TRANSLATIONS.copy_code);\n    copyEl.setAttribute(\"title\", DPY_TRANSLATIONS.copy_code);\n\n    let copyIcon = document.createElement(\"span\");\n    copyIcon.className = \"material-icons\";\n    copyIcon.textContent = COPY;\n    copyEl.append(copyIcon);\n\n    codeblock.prepend(copyEl);\n  }\n});\n"
  },
  {
    "path": "docs/_static/custom.js",
    "content": "'use-strict';\n\nlet activeModal = null;\nlet bottomHeightThreshold, sections;\nlet hamburgerToggle;\nlet mobileSearch;\nlet sidebar;\nlet toTop;\n\nclass Modal {\n  constructor(element) {\n    this.element = element;\n  }\n\n  close() {\n    activeModal = null;\n    this.element.style.display = 'none'\n  }\n\n  open() {\n    if (activeModal) {\n      activeModal.close();\n    }\n    activeModal = this;\n    this.element.style.display = 'flex'\n  }\n}\n\nclass SearchBar {\n\n  constructor() {\n    this.box = document.querySelector('nav.mobile-only');\n    this.bar = document.querySelector('nav.mobile-only input[type=\"search\"]');\n    this.openButton = document.getElementById('open-search');\n    this.closeButton = document.getElementById('close-search');\n  }\n\n  open() {\n    this.openButton.hidden = true;\n    this.closeButton.hidden = false;\n    this.box.style.top = \"100%\";\n    this.bar.focus();\n  }\n\n  close() {\n    this.openButton.hidden = false;\n    this.closeButton.hidden = true;\n    this.box.style.top = \"0\";\n  }\n\n}\n\nfunction scrollToTop() {\n  window.scrollTo({ top: 0, behavior: 'smooth' });\n}\n\ndocument.addEventListener('DOMContentLoaded', () => {\n  mobileSearch = new SearchBar();\n\n  bottomHeightThreshold = document.documentElement.scrollHeight - 30;\n  sections = document.querySelectorAll('section');\n  hamburgerToggle = document.getElementById('hamburger-toggle');\n  \n  toTop = document.getElementById('to-top');\n  toTop.hidden = !(window.scrollY > 0);\n\n  if (hamburgerToggle) {\n    hamburgerToggle.addEventListener('click', (e) => {\n      sidebar.element.classList.toggle('sidebar-toggle');\n      let button = hamburgerToggle.firstElementChild;\n      if (button.textContent == 'menu') {\n        button.textContent = 'close';\n      }\n      else {\n        button.textContent = 'menu';\n      }\n    });\n  }\n\n  const tables = document.querySelectorAll('.py-attribute-table[data-move-to-id]');\n  tables.forEach(table => {\n    let element = document.getElementById(table.getAttribute('data-move-to-id'));\n    let parent = element.parentNode;\n    // insert ourselves after the element\n    parent.insertBefore(table, element.nextSibling);\n  });\n\n  window.addEventListener('scroll', () => {\n    toTop.hidden = !(window.scrollY > 0);\n  });\n});\n\ndocument.addEventListener('keydown', (event) => {\n  if (event.code == \"Escape\" && activeModal) {\n    activeModal.close();\n  }\n});\n\nfunction searchBarClick(event, which) {\n  event.preventDefault();\n\n  if (event.button === 1 || event.buttons === 4) {\n      which.target = \"_blank\";  // Middle mouse button was clicked. Set our target to a new tab.\n  }\n  else if (event.button === 2) {\n    return  // Right button was clicked... Don't do anything here.\n  }\n  else {\n    which.target = \"_self\";  // Revert to same window.\n  }\n\n  which.submit();\n}\n"
  },
  {
    "path": "docs/_static/icons.css",
    "content": "@font-face {\n    font-family: 'Custom Icons';\n    font-style: normal;\n    font-weight: 400;\n    src: url('icons.woff') format('woff2');\n}\n\n.custom-icons {\n    font-family: 'Custom Icons' !important;\n}\n"
  },
  {
    "path": "docs/_static/scorer.js",
    "content": "'use-strict';\n\nlet queryBeingDone = null;\nlet pattern = null;\n\nconst escapedRegex = /[-\\/\\\\^$*+?.()|[\\]{}]/g;\nfunction escapeRegex(e) {\n    return e.replace(escapedRegex, '\\\\$&');\n}\n\n// for some reason Sphinx shows some entries twice\n// if something has been scored already I'd rather sort it to the bottom\nconst beenScored = new Set();\n\nfunction __score(haystack, regex) {\n    let match = regex.exec(haystack);\n    if (match == null) {\n        return Number.MAX_VALUE;\n    }\n    let subLength = match[0].length;\n    let start = match.index;\n    return (subLength * 1000 + start) / 1000.0;\n}\n\n// unused for now\nfunction __cleanNamespaces(query) {\n    return query.replace(/(discord\\.(ext\\.)?)?(.+)/, '$3');\n}\n\nScorer = {\n\n    // Implement the following function to further tweak the score for each result\n    // The function takes a result array [filename, title, anchor, descr, score]\n    // and returns the new score.\n    score: (result) => {\n        // only inflate the score of things that are actual API reference things\n        const [, title, , , score] = result;\n\n        if (pattern !== null && title.startsWith('discord.')) {\n            let _score = __score(title, pattern);\n            if (_score === Number.MAX_VALUE) {\n                return score;\n            }\n            if (beenScored.has(title)) {\n                return 0;\n            }\n            beenScored.add(title);\n            let newScore = 100 + queryBeingDone.length - _score;\n            // console.log(`${title}: ${score} -> ${newScore} (${_score})`);\n            return newScore;\n        }\n        return score;\n    },\n\n    // query matches the full name of an object\n    objNameMatch: 15,\n    // or matches in the last dotted part of the object name\n    objPartialMatch: 11,\n    // Additive scores depending on the priority of the object\n    objPrio: {\n        0: 15,  // used to be importantResults\n        1: 7,   // used to be objectResults\n        2: -5   // used to be unimportantResults\n    },\n    //  Used when the priority is not in the mapping.\n    objPrioDefault: 0,\n\n    // query found in title\n    title: 15,\n    partialTitle: 7,\n    // query found in terms\n    term: 5,\n    partialTerm: 2\n};\n\ndocument.addEventListener('DOMContentLoaded', () => {\n    const params = new URLSearchParams(window.location.search);\n    queryBeingDone = params.get('q');\n    if (queryBeingDone) {\n        let pattern = Array.from(queryBeingDone).map(escapeRegex).join('.*?');\n        pattern = new RegExp(pattern, 'i');\n    }\n});\n"
  },
  {
    "path": "docs/_static/settings.js",
    "content": "'use-strict';\n\nlet settingsModal;\n\nclass Setting {\n  constructor(name, defaultValue, setter) {\n    this.name = name;\n    this.defaultValue = defaultValue;\n    this.setValue = setter;\n  }\n\n  setElement() {\n    throw new TypeError('Abstract methods should be implemented.');\n  }\n\n  load() {\n    let value = JSON.parse(localStorage.getItem(this.name));\n    this.value = value === null ? this.defaultValue : value;\n    try {\n      this.setValue(this.value);\n    } catch (error) {\n      console.error(`Failed to apply setting \"${this.name}\" With value:`, this.value);\n      console.error(error);\n    }\n  }\n\n  update() {\n    throw new TypeError('Abstract methods should be implemented.');\n  }\n\n}\n\nclass CheckboxSetting extends Setting {\n\n  setElement() {\n    let element = document.querySelector(`input[name=${this.name}]`);\n    element.checked = this.value;\n  }\n\n  update(element) {\n    localStorage.setItem(this.name, element.checked);\n    this.setValue(element.checked);\n  }\n\n}\n\nclass RadioSetting extends Setting {\n\n  setElement() {\n    let element = document.querySelector(`input[name=${this.name}][value=${this.value}]`);\n    element.checked = true;\n  }\n\n  update(element) {\n    localStorage.setItem(this.name, `\"${element.value}\"`);\n    this.setValue(element.value);\n  }\n\n}\n\nfunction getRootAttributeToggle(attributeName, valueName) {\n  function toggleRootAttribute(set) {\n    if (set) {\n      document.documentElement.setAttribute(`data-${attributeName}`, valueName);\n    } else {\n      document.documentElement.removeAttribute(`data-${attributeName}`);\n    }\n  }\n  return toggleRootAttribute;\n}\n\nfunction setTheme(value) {\n  if (value === 'automatic') {\n    if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {\n      document.documentElement.setAttribute('data-theme', 'dark');\n    } else {\n      document.documentElement.setAttribute('data-theme', 'light');\n    }\n  }\n  else {\n    document.documentElement.setAttribute('data-theme', value);\n  }\n}\n\nconst settings = [\n  new CheckboxSetting('useSerifFont', false, getRootAttributeToggle('font', 'serif')),\n  new RadioSetting('setTheme', 'automatic', setTheme)\n]\n\nfunction updateSetting(element) {\n  let setting = settings.find((s) => s.name == element.name);\n  if (setting) {\n    setting.update(element);\n  }\n}\n\nfor (const setting of settings) {\n  setting.load();\n}\n\ndocument.addEventListener('DOMContentLoaded', () => {\n  settingsModal = new Modal(document.querySelector('div#settings.modal'));\n  for (const setting of settings) {\n    setting.setElement();\n  }\n});\n"
  },
  {
    "path": "docs/_static/sidebar.js",
    "content": "class Sidebar {\n  constructor(element) {\n    this.element = element;\n    this.activeLink = null;\n\n    this.element.addEventListener('click', (e) => {\n      // If we click a navigation, close the hamburger menu\n      if (e.target.tagName == 'A' && this.element.classList.contains('sidebar-toggle')) {\n        this.element.classList.remove('sidebar-toggle');\n        let button = hamburgerToggle.firstElementChild;\n        button.textContent = 'menu';\n\n        // Scroll a little up to actually see the header\n        // Note: this is generally around ~55px\n        // A proper solution is getComputedStyle but it can be slow\n        // Instead let's just rely on this quirk and call it a day\n        // This has to be done after the browser actually processes\n        // the section movement\n        setTimeout(() => window.scrollBy(0, -100), 75);\n      }\n    });\n  }\n\n  createCollapsableSections() {\n    let toc = this.element.querySelector('ul');\n    if (!toc) {\n      return\n    }\n    let allReferences = toc.querySelectorAll('a.reference.internal:not([href=\"#\"])');\n\n    for (let ref of allReferences) {\n\n      let next = ref.nextElementSibling;\n\n      if (next && next.tagName === \"UL\") {\n\n        let icon = document.createElement('span');\n        icon.className = 'material-icons collapsible-arrow expanded';\n        icon.innerText = 'expand_more';\n\n        if (next.parentElement.tagName == \"LI\") {\n          next.parentElement.classList.add('no-list-style')\n        }\n\n        icon.addEventListener('click', () => {\n          if (icon.classList.contains('expanded')) {\n            this.collapseSection(icon);\n          } else {\n            this.expandSection(icon);\n          }\n        })\n\n        ref.classList.add('ref-internal-padding')\n        ref.parentNode.insertBefore(icon, ref);\n      }\n    }\n  }\n\n  resize() {\n    let rect = this.element.getBoundingClientRect();\n    this.element.style.height = `calc(100vh - 1em - ${rect.top + document.body.offsetTop}px)`;\n  }\n\n  collapseSection(icon) {\n    icon.classList.remove('expanded');\n    icon.classList.add('collapsed');\n    let children = icon.nextElementSibling.nextElementSibling;\n    // <arrow><heading>\n    // --> <square><children>\n    setTimeout(() => children.style.display = \"none\", 75)\n  }\n\n  expandSection(icon) {\n    icon.classList.remove('collapse');\n    icon.classList.add('expanded');\n    let children = icon.nextElementSibling.nextElementSibling;\n    setTimeout(() => children.style.display = \"block\", 75)\n  }\n\n  setActiveLink(section) {\n    if (this.activeLink) {\n      this.activeLink.parentElement.classList.remove('active');\n    }\n    if (section) {\n      this.activeLink = document.querySelector(`#sidebar a[href=\"#${section.id}\"]`);\n      if (this.activeLink) {\n        let headingChildren = this.activeLink.parentElement.parentElement;\n        let heading = headingChildren.previousElementSibling.previousElementSibling;\n\n        if (heading && headingChildren.style.display === 'none') {\n          this.activeLink = heading;\n        }\n        this.activeLink.parentElement.classList.add('active');\n      }\n    }\n  }\n\n}\n\nfunction getCurrentSection() {\n  let currentSection;\n  if (window.scrollY + window.innerHeight > bottomHeightThreshold) {\n    currentSection = sections[sections.length - 1];\n  }\n  else {\n    if (sections) {\n      sections.forEach(section => {\n        let rect = section.getBoundingClientRect();\n        if (rect.top + document.body.offsetTop < 1) {\n          currentSection = section;\n        }\n      });\n    }\n  }\n  return currentSection;\n}\n\ndocument.addEventListener('DOMContentLoaded', () => {\n  sidebar = new Sidebar(document.getElementById('sidebar'));\n  sidebar.resize();\n  sidebar.createCollapsableSections();\n\n  window.addEventListener('scroll', () => {\n    sidebar.setActiveLink(getCurrentSection());\n    sidebar.resize();\n  });\n});\n"
  },
  {
    "path": "docs/_static/style.css",
    "content": "/*\nThis theme was created from scratch.\nHistorically however, thanks to:\n- Alabaster for being a good base\n  - Which thanks Flask + KR theme\n- Sphinx Readable Theme\n  - Which also proved to be a great base\n*/\n\n/*\n  note: this CSS is \"mobile first\"\n  The desktop implementation is near the bottom\n*/\n\n* {\n  box-sizing: border-box;\n}\n\nsection {\n  word-break: break-word;\n}\n\n/* CSS variables would go here */\n:root {\n  --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;\n  --monospace-font-family: 'Consolas', 'Menlo', 'Deja Vu Sans Mono', 'Bitstream Vera Sans Mono', monospace;\n\n  /* palette goes here */\n  --white: #ffffff;\n  --grey-1: #f9f9fa;\n  --grey-1-8: rgba(249, 249, 250, 0.8);\n  --grey-2: #ededf0;\n  --grey-3: #d7d7db;\n  --grey-4: #b1b1b3;\n  --grey-5: #737373;\n  --grey-6: #4a4a4f;\n  --grey-7: #38383d;\n  --grey-8: #2a2a2e;\n  --black: #0c0c0d;\n\n  --blue-1: #3399ff;\n  --blue-2: #0a84ff;\n  --blue-3: #0060df;\n  --blue-4: #003eaa;\n  --blue-5: #002275;\n  --blue-6: #000f40;\n\n  --settings: var(--grey-1);\n  --settings-hover: var(--grey-1-8);\n  --main-background: var(--grey-1);\n  --link-text: var(--blue-2);\n  --link-hover-text: var(--blue-6);\n  --main-text: var(--black);\n  --mobile-nav-background: var(--black);\n  --mobile-nav-text: var(--white);\n  --mobile-nav-hover-text: var(--white);\n  --mobile-nav-header-text: var(--white);\n  --nav-background: var(--main-background);\n  --nav-text: var(--grey-6);\n  --nav-hover-text: var(--grey-6);\n  --nav-header-text: var(--black);\n  --sub-header-background: var(--grey-6);\n  --search-border: var(--grey-4);\n  --search-text: var(--white);\n  --search-focus: var(--blue-1);\n  --search-button: var(--grey-1);\n  --search-button-hover: var(--grey-1-8);\n  --search-sidebar-background: var(--grey-1);\n  --search-sidebar-text: var(--grey-7);\n  --footer-text: var(--grey-5);\n  --footer-link: var(--grey-6);\n  --hr-border: var(--grey-2);\n  --main-big-headers-text: var(--black);\n  --main-big-headers-border: var(--grey-4);\n  --main-h5-header-text: var(--black);\n  --main-h6-header-text: var(--grey-4);\n  --main-h4-header-border: var(--grey-4);\n  --header-link: var(--grey-6);\n  --header-link-hover-text: var(--white);\n  --admonition-background: var(--grey-2);\n  --note-background: var(--blue-1);\n  --note-text: var(--white);\n  --warning-background: #ffe900;\n  --warning-text: var(--black);\n  --error-background: #d70022;\n  --error-text: var(--white);\n  --helpful-background: #00c8d7;\n  --helpful-text: var(--black);\n  --codeblock-background: var(--grey-2);\n  --codeblock-border: var(--grey-4);\n  --codeblock-text: var(--grey-6);\n  --inline-code-background: var(--grey-3);\n  --xref-code-background: transparent;\n  --api-entry-background: var(--grey-2);\n  --table-header-background: var(--grey-3);\n  --table-text: var(--black);\n  --table-border: var(--grey-4);\n  --mobile-active-toc: var(--grey-7);\n  --active-toc: var(--grey-3);\n  --scrollbar: rgba(0,0,0,0.2);\n  --scrollbar-hover: rgba(0,0,0,0.4);\n  --rtd-ad-border: var(--grey-3);\n  --rtd-ad-background: var(--grey-2);\n  --rtd-ad-main-text: var(--grey-6);\n  --rtd-ad-small-text: var(--grey-4);\n  --rtd-version-background: #272525;\n  --rtd-version-main-text: #fcfcfc;\n  --attribute-table-title: var(--grey-6);\n  --attribute-table-entry-border: var(--grey-3);\n  --attribute-table-entry-text: var(--grey-5);\n  --attribute-table-entry-hover-border: var(--blue-2);\n  --attribute-table-entry-hover-background: var(--grey-2);\n  --attribute-table-entry-hover-text: var(--blue-2);\n  --attribute-table-badge: var(--grey-7);\n  --highlighted-text: rgb(252, 233, 103);\n  --tabs--label-text: var(--main-text);\n  --tabs--label-text--hover: var(--main-text);\n  --tabs--label-text--active: var(--blue-1);\n  --tabs--label-text--active--hover: var(--blue-1);\n  --tabs--label-border--active: var(--blue-1);\n  --tabs--label-border--active--hover: var(--blue-1);\n}\n\n:root[data-font=\"serif\"] {\n  --font-family: 'Georgia', 'Yu Gothic', 'Noto Sans CJK JP Regular', serif;\n}\n\n:root[data-theme=\"dark\"] {\n  --main-background: var(--grey-7);\n  --link-text: var(--blue-1);\n  --link-hover-text: var(--blue-2);\n  --main-text: var(--white);\n  --sub-header-background: var(--grey-8);\n  --search-border: var(--grey-5);\n  --nav-background: var(--main-background);\n  --nav-text: var(--grey-1);\n  --nav-hover-text: var(--grey-2);\n  --nav-header-text: var(--white);\n  --footer-text: var(--grey-2);\n  --footer-link: var(--grey-1);\n  --hr-border: var(--grey-1);\n  --main-big-headers-text: var(--grey-1);\n  --main-big-headers-border: var(--grey-1);\n  --main-h5-header-text: var(--grey-4);\n  --main-h6-header-text: var(--grey-5);\n  --main-h4-header-border: var(--grey-2);\n  --header-link: var(--grey-2);\n  --header-link-hover-text: var(--grey-6);\n  --admonition-background: var(--grey-8);\n  --note-background: var(--blue-3);\n  --note-text: var(--white);\n  --warning-background: #d7b600;\n  --warning-text: var(--black);\n  --error-background:  #d70022;\n  --error-text: var(--white);\n  --helpful-background: #008ea4;\n  --helpful-text: var(--white);\n  --codeblock-background: var(--grey-6);\n  --codeblock-border: var(--black);\n  --codeblock-text: var(--grey-1);\n  --inline-code-background: var(--grey-8);\n  --xref-code-background: transparent;\n  --api-entry-background: var(--grey-6);\n  --table-header-background: var(--grey-6);\n  --table-text: var(--grey-1);\n  --table-border: var(--grey-4);\n  --active-toc: var(--grey-6);\n  --scrollbar: rgba(0,0,0,0.5);\n  --scrollbar-hover: rgba(0,0,0,0.7);\n  --rtd-ad-border: var(--grey-6);\n  --rtd-ad-background: var(--grey-5);\n  --rtd-ad-main-text: var(--grey-2);\n  --rtd-ad-small-text: var(--grey-1);\n  --attribute-table-title: var(--grey-3);\n  --attribute-table-entry-border: var(--grey-5);\n  --attribute-table-entry-text: var(--grey-3);\n  --attribute-table-entry-hover-border: var(--blue-1);\n  --attribute-table-entry-hover-background: var(--grey-6);\n  --attribute-table-entry-hover-text: var(--blue-1);\n  --attribute-table-badge: var(--grey-4);\n  --highlighted-text: rgba(250, 166, 26, 0.2);\n  --search-sidebar-background: var(--grey-7);\n  --search-sidebar-text: var(--search-text);\n}\n\nimg[src$=\"snake_dark.svg\"]  {\n  display: none;\n}\n:root[data-theme=\"dark\"] img[src$=\"snake.svg\"] {\n  display: none;\n}\n:root[data-theme=\"dark\"] img[src$=\"snake_dark.svg\"] {\n  display: inherit;\n}\n\nbody {\n  font-family: var(--font-family);\n  font-size: 16px;\n  margin: 0;\n  padding: 0;\n  height: 100%;\n  background-color: var(--main-background);\n  color: var(--main-text);\n}\n\n\n/* Scrollbar related */\n\n#sidebar::-webkit-scrollbar {\n  width: 0.5em;\n}\n\n#sidebar::-webkit-scrollbar-thumb {\n  background-color: var(--scrollbar);\n  border-radius: 0.25em;\n}\n\n#sidebar::-webkit-scrollbar-thumb:hover {\n  background-color: var(--scrollbar-hover);\n}\n\n\n/* grid related */\n\n.main-grid {\n  display: grid;\n  min-height: 100%;\n  grid-auto-rows: min-content auto min-content;\n  grid-template-columns: minmax(0, 1fr);\n  grid-template-areas:\n    \"s\"\n    \"h\"\n    \"n\"\n    \"c\"\n    \"f\";\n}\n\n.grid-item {\n  max-width: 100vw;\n  padding: 0.8em;\n}\n\n/* all URLs only show underline on hover */\na {\n  text-decoration: none;\n  color: var(--link-text);\n}\n\na:hover {\n  text-decoration: underline;\n  color: var(--link-hover-text);\n}\n\n/* headers */\n\nheader.grid-item {\n  grid-area: h;\n  color: var(--main-text);\n  position: relative;\n  z-index: 1;\n  padding: 0;\n}\n\nheader > nav {\n  background-color: var(--sub-header-background);\n  padding: 0.8em;\n  display: flex;\n  flex-direction: row;\n  justify-content: flex-end;\n  align-items: center;\n}\n\nheader > nav a {\n  color: var(--white);\n}\n\nheader > nav.mobile-only {\n  width: 100%;\n  position: absolute;\n  top: 0;\n  right: 0;\n  z-index: -1;\n  padding-top: 0;\n  transition: top 0.5s ease-in-out;\n}\n\nheader > nav.mobile-only .search {\n  width: 100%;\n}\n\nheader > nav.mobile-only .search-wrapper {\n  background-color: var(--sub-header-background);\n}\n\n.main-heading {\n  margin-right: auto;\n}\n\nheader > nav a:not(.main-heading) {\n  margin: 0 0.5em;\n}\n\nheader > nav > a:hover {\n  color: var(--grey-1-8);\n  text-decoration: underline;\n}\n\n.sub-header {\n  grid-area: n;\n  background-color: var(--sub-header-background);\n  color: var(--white);\n  display: none;\n}\n\n/* these aren't shown on mobile */\n\n.sub-header > label {\n  display: none;\n  margin-right: 1em;\n}\n\n.sub-header > select {\n  display: none;\n  background-color: transparent;\n  padding: 0.4em 0;\n  font-size: 1em;\n  width: 13.5%;\n  color: white;\n  border: none;\n  border-bottom: 1px solid var(--search-border);\n\n  appearance: none;\n  background-image: url('drop_down_icon.svg');\n  background-repeat: no-repeat;\n  background-position-x: 100%;\n  background-position-y: 50%;\n\n  cursor: pointer;\n}\n\n.sub-header option {\n    color: black;\n}\n\n.sub-header > select:focus {\n  outline: none;\n}\n\n.sub-header > .settings {\n  color: var(--settings);\n  display: none;\n  margin-left: 1em;\n  margin-right: 0.5em;\n}\n\n.setting h3 {\n  display: inline-block;\n  margin-left: 2em;\n}\n\n.sub-header > .settings:hover {\n  color: var(--settings-hover);\n}\n\n/* footer stuff */\nfooter {\n  grid-area: f;\n  font-size: 14px;\n  text-align: right;\n  color: var(--footer-text);\n}\n\nfooter a {\n  text-decoration: underline;\n  color: var(--footer-link);\n}\n\n/* sidebar stuff */\n\naside {\n  grid-area: s;\n  font-size: 14px;\n  line-height: 1.75em;\n  top: 0;\n  position: -webkit-sticky; /* safari */\n  position: sticky;\n  background-color: var(--mobile-nav-background);\n  color: var(--mobile-nav-text);\n  z-index: 2;\n  max-height: 100vh;\n  overflow-y: auto;\n  overscroll-behavior-y: contain;\n}\n\naside h3 {\n  color: var(--mobile-nav-header-text);\n  font-size: 24px;\n  font-weight: normal;\n}\n\n.collapsible-arrow {\n  font-size: 1.5em!important;\n  left: -1.166em;\n  top: 0.25em;\n  user-select: none;\n  position: relative;\n  line-height: 0.5em;\n  transition: transform 0.4s;\n  transform: rotate(-90deg);\n}\n\n.expanded {\n  transition: transform 0.4s;\n  transform: rotate(0deg);\n}\n\n.ref-internal-padding {\n  position: relative;\n  left: -20px;\n}\n\n#settings-toggle {\n  float: right;\n}\n\naside .material-icons,\n.settings > .material-icons {\n  cursor: pointer;\n  font-size: 2em;\n}\n\n.sidebar-toggle {\n  display: unset !important;\n}\n\n#sidebar {\n  display: none;\n}\n\n#sidebar a {\n  color: var(--mobile-nav-text);\n}\n\n#sidebar a:hover {\n  color: var(--mobile-nav-hover-text);\n}\n\n#sidebar h3 {\n  font-size: 24px;\n  margin: 1em 1em 0 0;\n}\n\n#sidebar ul {\n  list-style: none;\n  margin: 1em 2em 2em 1em;\n  padding: 0;\n}\n\n#sidebar ul ul {\n  list-style: square;\n  margin: 0em;\n  margin-left: 1.5em;\n}\n\n#sidebar li.no-list-style {\n  list-style: none;\n}\n\n#sidebar form {\n  margin: 1em 0;\n  display: flex;\n  align-items: baseline;\n}\n\n/* search button stuff */\n\n.search-wrapper {\n  display: flex;\n  align-items: stretch;\n}\n\n.search-wrapper > input[type=search] {\n  font-family: \"Roboto\", Corbel, Avenir, \"Lucida Grande\", \"Lucida Sans\", sans-serif;\n  outline: none;\n  appearance: none;\n  font-size: 1em;\n}\n\n.search-wrapper > input[type=search],\n.search-wrapper > button[type=submit] {\n  background-color: var(--sub-header-background);\n  border: none;\n  color: var(--search-text);\n  padding: 0.5em;\n  min-height: 2.5em;\n  flex: 9;\n}\n\n.search-wrapper {\n  border-bottom: 1px solid var(--search-border);\n}\n\n.search-wrapper:focus-within {\n  border-bottom: 1px solid var(--search-focus);\n}\n\n/* .search-wrapper > input[type=search] {\n  border: 1px solid var(--search-border);\n  border-right: none;\n  border-top-left-radius: 4px;\n  border-bottom-left-radius: 4px;\n}\n\n.search-wrapper > input[type=search]:focus,\nbutton[type=submit]:focus ~ input[type=search] {\n  border: 1px solid var(--search-focus);\n  border-right: none;\n} */\n\n.search-wrapper > button[type=submit] {\n  color: var(--search-button);\n  /* border: 1px solid var(--search-border); */\n  /* border-left: none; */\n  /* border-bottom-right-radius: 4px; */\n  /* border-top-right-radius: 4px; */\n  cursor: pointer;\n  flex: 1;\n}\n\n/* .search-wrapper > button[type=submit]:focus,\ninput[type=search]:focus ~ button[type=submit] {\n  border: 1px solid var(--search-focus);\n  border-left: none;\n} */\n\n.search-wrapper > button[type=submit]:hover {\n  background-color: var(--search-border);\n  color: var(--search-button-hover);\n}\n\n/* search sidebar */\n\n.search-sidebar > input[type=search],\n.search-sidebar > button[type=submit] {\n  background-color: var(--search-sidebar-background);\n  color: var(--search-sidebar-text);\n}\n\n.sidebar-toggle .search-sidebar > input[type=search],\n.sidebar-toggle .search-sidebar > button[type=submit] {\n  background-color: var(--mobile-nav-background);\n  color: var(--mobile-nav-text);\n}\n\n/* main content area */\n\nmain {\n  grid-area: c;\n}\n\np {\n  margin-bottom: 8px;\n}\n\n/* modal stuff */\n\ndiv.modal {\n  position: fixed;\n  z-index: 10;\n  left: 0;\n  top: 0;\n  width: 100%;\n  height: 100%;\n  overflow: hidden;\n  background-color: rgba(0,0,0,0.4);\n  cursor: pointer;\n  display: none;\n}\n\ndiv.modal-content {\n  background-color: var(--main-background);\n  box-shadow: 0 2px 8px rgba(0,0,0,0.54);\n  padding: 24px;\n  border-radius: 4px;\n  max-width: 40%;\n  min-width: 350px;\n  cursor: initial;\n  flex: 1;\n  margin: auto;\n}\n\ndiv.modal-content > span.close {\n  color: #888;\n  float: right;\n  font-weight: bold;\n  -moz-user-select: none;\n  -webkit-user-select: none;\n  cursor: pointer;\n}\n\ndiv.modal-content > span.close:hover,\ndiv.modal-content > span.close:focus {\n  color: #444;\n}\n\ndiv.modal input {\n  cursor: pointer;\n}\n\n/* scroll to top button */\n\n#to-top {\n  position: fixed;\n  bottom: 50px;\n  right: 20px;\n\n  cursor: pointer;\n}\n\n#to-top.is-rtd {\n  bottom: 90px;\n}\n\n#to-top > span {\n  display: block;\n\n  width: auto;\n  height: 30px;\n  padding: 0 6px;\n\n  background-color: var(--rtd-version-background);\n  color: var(--rtd-version-main-text);\n}\n\n#to-top span {\n  line-height: 30px;\n  font-size: 90%;\n  text-align: center;\n}\n\n/* copy button */\n\n.relative-copy {\n  position: relative;\n}\n\n.copy {\n  cursor: pointer;\n  position: absolute;\n  top: 0px;\n  right: 0px;\n  border: 1px solid var(--codeblock-border);\n  font-size: 0.875em;\n  padding: 0.2em 0.5em;\n  border-bottom-left-radius: 4px;\n  display: flex;\n}\n\n/* -- body styles --------------------------------------------------------- */\n\nhr {\n  border: 1px solid var(--hr-border);\n}\n\nmain h1,\nmain h2,\nmain h3,\nmain h4,\nmain h5,\nmain h6 { font-weight: normal; }\n\nmain h1,\nmain h2,\nmain h3,\nmain h4 { color: var(--main-big-headers-text); }\nmain h5 { color: var(--main-h5-header-text); }\nmain h6 { color: var(--main-h6-header-text); }\n\nmain h1 { margin: 0 0 10px 0; }\nmain h2,\nmain h3 { margin: 10px 0px 10px 0px; }\nmain h4,\nmain h5,\nmain h6 { margin: 20px 0px 10px 0px; }\n\nmain h1 { padding: 0 0 10px 0; }\nmain h2,\nmain h3 { padding: 10px 0 10px 0; }\nmain h4 { padding: 10px 0 10px 0; }\nmain h5,\nmain h6 { padding: 10px 0 0 0; }\n\nmain h1,\nmain h2,\nmain h3 { border-bottom: 1px solid var(--main-big-headers-border); }\nmain h4 { border-bottom: 1px solid var(--main-h4-header-border); }\n\nmain h1 { font-size: 2.3em; }\nmain h2 { font-size: 1.8em; }\nmain h3 { font-size: 1.3em; }\nmain h4 { font-size: 1.1em; }\nmain h5 { font-size: 1.05em; }\nmain h6 { font-size: 1em; }\n\na.headerlink {\n  color: var(--header-link);\n  font-size: 0.8em;\n  padding: 0 4px 0 4px;\n  text-decoration: none;\n  visibility: hidden;\n}\n\na.headerlink:hover {\n  background-color: var(--header-link);\n  color: var(--header-link-hover-text);\n}\n\nh1:hover > a.headerlink,\nh2:hover > a.headerlink,\nh3:hover > a.headerlink,\nh4:hover > a.headerlink,\nh5:hover > a.headerlink,\nh6:hover > a.headerlink,\ndt:hover > a.headerlink,\ncaption:hover > a.headerlink,\np.caption:hover > a.headerlink,\ndiv.code-block-caption:hover > a.headerlink {\n    visibility: visible;\n}\n\n.versionmodified {\n  font-style: italic;\n}\n\nmain ul {\n  list-style: disc;\n  margin: 1em 0;\n  padding-left: 1.3em;\n}\n\nmain ul ul, main ol ul {\n  margin: .2em 0;\n  padding-left: 1.2em;\n}\n\nmain ul li {\n  padding: 2px 0;\n}\n\nmain ul.search li {\n  padding: 5px 0 5px 20px;\n}\n\nmain ol {\n  counter-reset: li;\n  margin-left: 0;\n  padding-left: 0;\n}\n\nmain ol ol {\n  margin: .2em 0;\n}\n\nmain ol > li {\n  list-style: none;\n  margin: 0 0 0 1.9em;\n  padding: 2px 1px;\n  position: relative;\n}\n\nmain ol > li::before {\n  content: counter(li) \".\";\n  counter-increment: li;\n  top: -2px;\n  left: -1.1em;\n  width: 1.1em;\n  padding: 4px 0;\n  position: absolute;\n  text-align: left;\n}\n\nmain p,\nmain dd,\nmain li {\n  line-height: 1.4;\n}\n\nmain img {\n  width: 100%;\n  max-width: 500px;\n}\n\n/* weird margins */\nli > p {\n  margin: 2px;\n}\n\nli > blockquote {\n  margin: 10px;\n}\n\n/* admonitions */\ndiv.admonition {\n  padding: 0 0.8em 0.8em 0.8em !important;\n  margin: 0.8em 0;\n  border-radius: 2.5px;\n  border-left-width: 6px;\n  border-left-style: solid;\n  background-color: var(--admonition-background);\n}\n\np.admonition-title {\n  font-weight: bold;\n  margin: 0 -0.8rem !important;\n  padding: 0.4rem 0.6rem 0.4rem 2.5rem;\n  position: relative;\n  -moz-user-select: none;\n  -webkit-user-select: none;\n  -ms-user-select: none;\n  user-select: none;\n}\n\np.admonition-title::before {\n  font: normal normal normal 24px/1 'Material Icons';\n  display: inline-block;\n  width: 24px;\n  height: 24px;\n  position: absolute;\n  left: 9.6px;\n}\n\ndiv.important, div.note, div.hint, div.tip {\n  border-left-color: var(--note-background);\n}\n\ndiv.important > p.admonition-title,\ndiv.note > p.admonition-title,\ndiv.hint > p.admonition-title,\ndiv.tip > p.admonition-title {\n  background-color: var(--note-background);\n  color: var(--note-text);\n}\n\ndiv.important > p.admonition-title::before,\ndiv.note > p.admonition-title::before,\ndiv.hint > p.admonition-title::before,\ndiv.tip > p.admonition-title::before {\n  content: '\\0e88e';\n}\n\ndiv.attention, div.warning, div.caution {\n  border-left-color: var(--warning-background);\n}\n\ndiv.attention > p.admonition-title,\ndiv.warning > p.admonition-title,\ndiv.caution > p.admonition-title {\n  background-color: var(--warning-background);\n  color: var(--warning-text);\n}\n\ndiv.attention > p.admonition-title::before,\ndiv.warning > p.admonition-title::before,\ndiv.caution > p.admonition-title::before {\n  content: '\\0e002';\n}\n\ndiv.danger, div.error {\n  border-left-color: var(--error-background);\n}\n\ndiv.danger > p.admonition-title,\ndiv.error > p.admonition-title {\n  background-color: var(--error-background);\n  color: var(--error-text);\n}\n\ndiv.danger > p.admonition-title::before,\ndiv.error > p.admonition-title::before {\n  content: '\\0e000';\n}\n\n/* helpful admonitions */\ndiv.helpful {\n  border-left-color: var(--helpful-background);\n}\n\ndiv.helpful > p.admonition-title {\n  background-color: var(--helpful-background);\n  color: var(--helpful-text);\n}\n\ndiv.helpful > p.admonition-title::before {\n  content: '\\0e873';\n}\n\ndl.field-list > dd {\n  margin-top: 3px;\n  margin-bottom: 10px;\n  margin-left: 20px;\n}\n\n/* no disgusting background in the FAQ */\ndiv.topic {\n  background-color: transparent;\n  border: none;\n}\n\n/* don't link-ify the FAQ page */\na.toc-backref {\n  text-decoration: none;\n  color: var(--main-text);\n}\n\n/* bold and fix the Parameter, Raises, etc. */\ndl.field-list > dt {\n  font-weight: bold;\n}\n\n/* remove flex from field lists */\ndl.field-list {\n  display: block;\n}\n\n/* cross-references are forced to bold for some reason */\na.reference > strong {\n  font-weight: unset;\n  font-family: var(--monospace-font-family);\n}\na.reference.pep > strong,\na.reference.rfc > strong {\n  font-family: inherit;\n}\n\n/* exception hierarchy */\n\n.exception-hierarchy-content dd,\n.exception-hierarchy-content dl {\n  margin: 0px 2px;\n}\n\n.exception-hierarchy-content {\n  margin-left: 0.5em;\n}\n\n.exception-hierarchy-content ul {\n  list-style: '»' !important;\n}\n\n/* attribute tables */\n.py-attribute-table {\n  display: flex;\n  flex-wrap: wrap;\n  flex-direction: row;\n  margin: 0 2em;\n  padding-top: 16px;\n}\n\n.py-attribute-table-column {\n  flex: 1 1 auto;\n}\n\n.py-attribute-table-column:not(:first-child) {\n  margin-top: 1em;\n}\n\n.py-attribute-table-column > span {\n  font-weight: bold;\n  color: var(--attribute-table-title);\n}\n\nmain .py-attribute-table-column > ul {\n  list-style: none;\n  margin: 4px 0px;\n  padding-left: 0;\n  font-size: 0.95em;\n}\n\n.py-attribute-table-entry {\n  margin: 0;\n  padding: 2px 0;\n  padding-left: 0.2em;\n  border-left: 2px solid var(--attribute-table-entry-border);\n  display: flex;\n  line-height: 1.2em;\n}\n\n.py-attribute-table-entry > a {\n  padding-left: 0.5em;\n  color: var(--attribute-table-entry-text);\n  flex-grow: 1;\n}\n\n.py-attribute-table-entry > a:hover {\n  color: var(--attribute-table-entry-hover-text);\n  text-decoration: none;\n}\n\n.py-attribute-table-entry:hover {\n  background-color: var(--attribute-table-entry-hover-background);\n  border-left: 2px solid var(--attribute-table-entry-hover-border);\n  text-decoration: none;\n}\n\n.py-attribute-table-badge {\n  flex-basis: 3em;\n  text-align: right;\n  font-size: 0.9em;\n  color: var(--attribute-table-badge);\n  -moz-user-select: none;\n  -webkit-user-select: none;\n  user-select: none;\n}\n\npre {\n  background-color: var(--codeblock-background);\n  border: 1px solid var(--codeblock-border);\n  color: var(--codeblock-text);\n  font-size: 0.75em;\n  line-height: 1.5em;\n  margin: 1.5em 0 1.5em 0;\n  padding: 10px;\n  overflow-x: auto;\n}\n\npre, code {\n  font-family: var(--monospace-font-family);\n  font-size: 0.9em;\n  overflow-wrap: break-word;\n}\n\ncode {\n  background-color: var(--inline-code-background);\n  padding: .15em;\n  border-radius: 3px;\n}\n\ncode.descname {\n  background-color: transparent;\n  font-weight: bold;\n  font-size: 0.95em;\n}\n\ncode.descclassname {\n  background-color: transparent;\n  padding-right: 0;\n}\n\ncode.descclassname + code.descname {\n  padding-left: 0;\n}\n\ncode.xref, a code {\n  font-weight: normal;\n  background-color: var(--xref-code-background);\n}\n\nspan.pre {\n  padding: 0 2px;\n  white-space: pre-wrap !important;\n}\n\ndl.class {\n  margin-bottom: 50px;\n}\n\ndl.data > dt,\ndl.describe > dt,\ndl.function > dt,\ndl.attribute > dt,\ndl.classmethod > dt,\ndl.method > dt,\ndl.property > dt,\ndl.class > dt,\ndl.exception > dt {\n  background-color: var(--api-entry-background);\n  padding: 1px 10px;\n}\n\n/* bug in sphinx: https://github.com/sphinx-doc/sphinx/issues/9384 */\ndl.property > dt > span.descname + em.property {\n  display: none;\n}\n\ndd {\n  margin-top: 0.5em;\n  margin-bottom: 0.5em;\n  margin-left: 1.5em;\n}\n\ndt:target, span.highlighted {\n    background-color: var(--highlighted-text);\n}\n\nrect.highlighted {\n    fill: var(--highlighted-text);\n}\n\n.container.operations {\n  padding: 10px;\n  border: 1px solid var(--codeblock-border);\n  margin-bottom: 20px;\n}\n\n.container.operations::before {\n  content: 'Supported Operations';\n  color: var(--main-big-headers-text);\n  display: block;\n  padding-bottom: 0.5em;\n}\n\n.container.operations > dl.describe > dt {\n  background-color: var(--api-entry-background);\n}\n\n.table-wrapper {\n  overflow-x: auto;\n}\n\ntable.docutils {\n  width: 100%;\n  border-collapse: collapse;\n}\n\ntable.docutils.footnote {\n  width: auto;\n}\n\ntable.docutils thead,\ntable.docutils tfoot {\n  background: var(--table-header-background);\n}\n\ntable.docutils thead tr th {\n  color: var(--table-text);\n  font-weight: normal;\n  padding: 7px 5px;\n  vertical-align: middle;\n}\n\ntable.docutils tbody tr th,\ntable.docutils tbody tr td {\n  border-bottom: 0;\n  padding: 7px 5px;\n  vertical-align: top;\n}\n\ntable.docutils tbody tr:not(:first-child) {\n  border-top: solid 1px var(--table-border);\n}\n\ntable.docutils tbody tr:last-child th,\ntable.docutils tbody tr:last-child td {\n  border-bottom: solid 1px var(--table-border);\n}\n\ntable.docutils thead tr td p,\ntable.docutils tfoot tr td p,\ntable.docutils tbody tr td p,\ntable.docutils thead tr td ul,\ntable.docutils tfoot tr td ul,\ntable.docutils tbody tr td ul,\ntable.docutils thead tr td ol,\ntable.docutils tfoot tr td ol,\ntable.docutils tbody tr td ol {\n  margin: 0 0 .5em;\n}\ntable.docutils thead tr td p.last,\ntable.docutils tfoot tr td p.last,\ntable.docutils tbody tr td p.last,\ntable.docutils thead tr td ul.last,\ntable.docutils tfoot tr td ul.last,\ntable.docutils tbody tr td ul.last,\ntable.docutils thead tr td ol.last,\ntable.docutils tfoot tr td ol.last,\ntable.docutils tbody tr td ol.last {\n  margin-bottom: 0;\n}\n\n/* added when the `align` attribute is specified in the `image` directive */\nmain img.align-left {\n  margin-left: .5em;\n}\n\nmain img.align-right {\n  margin-right: .5em;\n}\n\n.align-default {\n  text-align: left !important;\n}\n\n/* hide the welcome text */\nsection#welcome-to-discord-py > h1 {\n  display: none;\n}\n\n/* make the RTD ad look a little less jarring */\n\n.ethical-fixedfooter {\n  background-color: var(--rtd-ad-background) !important;\n  border-top: 1px solid var(--rtd-ad-border) !important;\n}\n\n.ethical-fixedfooter a {\n  color: var(--rtd-ad-main-text) !important;\n}\n\n.ethical-callout > small > em > a {\n  color: var(--rtd-ad-small-text) !important;\n}\n\n.active {\n  background-color: var(--mobile-active-toc);\n  border-left: 5px solid var(--mobile-active-toc);\n}\n\ndiv.code-block-caption {\n  font-size: medium;\n  font-weight: bold;\n}\n\n\n/* desktop stuff */\n\n@media screen and (min-width: 768px) {\n  .grid-item {\n    max-width: unset;\n  }\n\n  .main-grid {\n    grid-template-columns: repeat(6, 1fr);\n    grid-template-areas:\n      \"h h h h h h\"\n      \"n n n n n n\"\n      \"s s c c c c\"\n      \"s s f f f f\";\n  }\n\n  .mobile-only {\n    display: none;\n  }\n\n  header {\n    background-color: var(--black);\n  }\n\n  header > nav {\n    background-color: unset;\n  }\n\n  .sub-header {\n    display: flex;\n    align-items: center;\n  }\n\n  .sub-header > label {\n    display: initial;\n  }\n\n  .sub-header > select {\n    display: initial;\n    margin-right: auto;\n  }\n\n  .sub-header > .settings {\n    display: initial;\n  }\n\n  aside {\n    top: initial;\n    position: initial;\n    background-color: var(--nav-background);\n    color: var(--nav-text);\n    max-height: unset;\n    overflow-y: unset;\n    overscroll-behavior-y: unset;\n  }\n\n  aside h3 {\n    color: var(--nav-header-text);\n  }\n\n  #sidebar {\n    display: inline-block;\n    position: sticky;\n    top: 1em;\n    max-height: calc(100vh - 2em);\n    max-width: 100%;\n    overflow-y: auto;\n    margin: 1em;\n  }\n\n  #sidebar a {\n    color: var(--nav-text);\n  }\n\n  .active {\n    background-color: transparent;\n    border-left: none;\n    position: relative;\n  }\n\n  .active::before {\n    content: \"\";\n    display: inline-block;\n    background-color: var(--active-toc);\n    position: absolute;\n    top: 0;\n    bottom: 0;\n    right: 0;\n    width: calc(100% + 0.5em);\n    border-radius: 4px;\n    z-index: -1;\n  }\n\n  #sidebar a:hover {\n    color: var(--nav-hover-text);\n  }\n\n  #hamburger-toggle, #settings-toggle {\n    display: none;\n\n  }\n}\n\n@media screen and (min-width: 1200px) {\n  .main-grid {\n    /* 62.5% width => multiple of 5/8 content */\n    /* sidebar takes up 20% of the inner area */\n    grid-template-columns: repeat(16, 1fr);\n    grid-template-areas:\n      \"h h h h h h h h h h h h h h h h\"\n      \"n n n n n n n n n n n n n n n n\"\n      \"s s s . . c c c c c c c c c . .\"\n      \"s s s f f f f f f f f f f f f f\"\n  }\n\n  #sidebar {\n    max-width: unset;\n  }\n\n  header > nav {\n    margin-left: 18.75%;\n    margin-right: 18.75%;\n  }\n\n  .sub-header > label {\n    margin-left: 18.75%;\n    margin-right: 1em;\n  }\n\n  .sub-header > .settings {\n    margin-right: 18.75%;\n    margin-left: 1em;\n  }\n\n  .sub-header > .search {\n    width: 20%;\n  }\n\n  .py-attribute-table-column:not(:first-child) {\n    margin-top: unset;\n  }\n\n  main img {\n    display: block;\n    margin-left: auto;\n    margin-right: auto;\n  }\n}\n"
  },
  {
    "path": "docs/_templates/genindex.html",
    "content": "{%- extends \"basic/genindex.html\" %}\n\n{% block body %}\n  {{ super() }}\n  <!-- Inject some JavaScript to convert the index names into something useful. -->\n  <script>\n    let elements = document.querySelectorAll(\"table.indextable a\");\n\n    // this is pretty finicky but it should work.\n    for(let el of elements) {\n      let key = el.getAttribute('href').split('#', 2)[1]\n      if(!key.startsWith('discord.')) {\n        continue;\n      }\n\n      if(key.startsWith('discord.ext.')) {\n        key = key.substr(12); // discord.ext.\n      }\n\n      if(el.textContent.indexOf('()') !== -1) {\n        key = key + '()'\n      }\n      el.textContent = key;\n    }\n    document.querySelectorAll(\"td\").forEach(el => el.style.width = 'auto');\n  </script>\n{% endblock %}\n"
  },
  {
    "path": "docs/_templates/gettext/message.pot_t",
    "content": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) {{ copyright }}\n# This file is distributed under the same license as the {{ project }} package.\n# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.\n#\n#, fuzzy\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: {{ project|e }} {{ version|e }}\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: {{ ctime|e }}\\n\"\n\"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\\n\"\n\"Last-Translator: {{ last_translator|e }}\\n\"\n\"Language-Team: {{ language_team|e }}\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n{% for message in messages %}\n{% if display_location -%}\n{% for source, line in message.locations[:5] -%}\n#: {{ relpath(source) }}:{{ line }}\n{% endfor -%}\n{% endif -%}\n\n{% if display_uuid -%}\n{% for uuid in message.uuids -%}\n#: {{ uuid }}\n{% endfor -%}\n{% endif -%}\n\nmsgid \"{{ message.text|e }}\"\nmsgstr \"\"\n{% endfor -%}\n"
  },
  {
    "path": "docs/_templates/layout.html",
    "content": "<!DOCTYPE html>\n<html>\n<head>\n  <meta charset=\"utf-8\">\n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n  <title>{{ title|striptags|e }}{{ titlesuffix }}</title>\n  {%- block extrahead %} {% endblock %}\n  <!-- end extra head -->\n  <link href=\"https://fonts.googleapis.com/icon?family=Material+Icons\" rel=\"stylesheet\">\n  {%- block css %}\n  {%- for css in css_files %}\n    {%- if css|attr(\"filename\") %}\n  {{ css_tag(css) }}\n    {%- else %}\n  <link rel=\"stylesheet\" href=\"{{ pathto(css, 1)|e }}\" type=\"text/css\" />\n    {%- endif %}\n  {%- endfor %}\n  {%- endblock %}\n  <link rel=\"stylesheet\" href=\"{{ pathto('_static/style.css', 1)|e }}\" type=\"text/css\" />\n  <link rel=\"stylesheet\" href=\"{{ pathto('_static/codeblocks.css', 1) }}\" type=\"text/css\" />\n  <link rel=\"stylesheet\" href=\"{{ pathto('_static/icons.css', 1)|e }}\" type=\"text/css\" />\n  {%- block scripts %}\n  <script id=\"documentation_options\" data-url_root=\"{{ pathto('', 1) }}\" src=\"{{ pathto('_static/documentation_options.js', 1) }}\"></script>\n  {#- In order to allow strings to be translated, they must be passed to gettext here #}\n  {#- Any user-facing string that is translated must be in this object #}\n  {#- Note that these can only be simple key-value translations #}\n  {#- If something better comes along this will be removed #}\n  <script type=\"text/javascript\">\n    var DPY_TRANSLATIONS = {{ \"{\" }}\n      copy_code: \"{{ _('Copy Code') }}\",\n      copy_code_error: \"{{ _('Could not copy codeblock:') }}\",\n    {{ \"}\" }}\n  </script>\n  {%- for js in script_files %}\n  {{ js_tag(js) }}\n  {%- endfor %}\n  {%- endblock %}\n  {%- if pageurl %}\n  <link rel=\"canonical\" href=\"{{ pageurl|e }}\" />\n  {%- endif %}\n  {%- if favicon %}\n  <link rel=\"shortcut icon\" href=\"{{ pathto('_static/' + favicon, 1)|e }}\"/>\n  {%- endif %}\n  {%- block linktags %}\n  {%- if hasdoc('about') %}\n  <link rel=\"author\" title=\"{{ _('About these documents') }}\" href=\"{{ pathto('about') }}\" />\n  {%- endif %}\n  {%- if hasdoc('genindex') %}\n  <link rel=\"index\" title=\"{{ _('Index') }}\" href=\"{{ pathto('genindex') }}\" />\n  {%- endif %}\n  {%- if hasdoc('search') %}\n  <link rel=\"search\" title=\"{{ _('Search') }}\" href=\"{{ pathto('search') }}\" />\n  {%- endif %}\n  {%- if hasdoc('copyright') %}\n  <link rel=\"copyright\" title=\"{{ _('Copyright') }}\" href=\"{{ pathto('copyright') }}\" />\n  {%- endif %}\n  {%- if next %}\n  <link rel=\"next\" title=\"{{ next.title|striptags|e }}\" href=\"{{ next.link|e }}\" />\n  {%- endif %}\n  {%- if prev %}\n  <link rel=\"prev\" title=\"{{ prev.title|striptags|e }}\" href=\"{{ prev.link|e }}\" />\n  {%- endif %}\n  {%- endblock %}\n</head>\n<body>\n{%- block header %}{% endblock %}\n  <div class=\"main-grid\">\n    {#- The main navigation header #}\n    <header class=\"grid-item\">\n      <nav>\n        <a href=\"{{ pathto(master_doc)|e }}\" class=\"main-heading\">discord.py</a>\n        <a href=\"https://github.com/Rapptz/discord.py\" title=\"GitHub\"><span class=\"material-icons custom-icons\">github</span></a>\n        <a href=\"{{ discord_invite }}\" title=\"{{ _('Discord') }}\"><span class=\"material-icons custom-icons\">discord</span></a>\n        <a href=\"{{ pathto('faq') }}\" title=\"{{ _('FAQ') }}\"><span class=\"material-icons\">help_center</span></a>\n        {#- If we have more links we can put them here #}\n        <a onclick=\"mobileSearch.open();\" title=\"{{ _('Search') }}\" id=\"open-search\" class=\"mobile-only\"><span class=\"material-icons\">search</span></a>\n        <a onclick=\"mobileSearch.close();\" title=\"{{ _('Close') }}\" id=\"close-search\" class=\"mobile-only\" hidden><span class=\"material-icons\">close</span></a>\n      </nav>\n      <nav class=\"mobile-only\">\n        <form role=\"search\" class=\"search\" action=\"{{ pathto('search') }}\" method=\"get\">\n          <div class=\"search-wrapper\">\n            <input type=\"search\" name=\"q\" placeholder=\"{{ _('Search documentation') }}\" />\n            <button type=\"submit\">\n              <span class=\"material-icons\">search</span>\n            </button>\n          </div>\n        </form>\n      </nav>\n    </header>\n    {#- The sub-header with search and extension related selection #}\n    <div class=\"sub-header grid-item\">\n      <label for=\"documentation_select\">{{ _('View Documentation For') }}</label>\n      <select id=\"documentation_select\" onchange=\"window.location = this.value;\">\n        {%- if pagename is prefixedwith 'ext/' %}\n        <option value=\"{{ pathto(master_doc)|e }}\">discord</option>\n        {%- else %}\n        <option value=\"{{ pathto(pagename) }}\" selected>discord</option>\n        {%- endif %}\n        {%- for ext, p in discord_extensions %}\n        <option value=\"{{ pathto(p + '/index')|e }}\" {% if pagename is prefixedwith p %}selected{% endif %}>{{ ext }}</option>\n        {%- endfor %}\n      </select>\n      <form id=\"search-form\" role=\"search\" class=\"search\" action=\"{{ pathto('search') }}\" method=\"get\">\n        <div class=\"search-wrapper\">\n          <input type=\"search\" name=\"q\" placeholder=\"{{ _('Search documentation') }}\" />\n          <button type=\"submit\" onmousedown=\"searchBarClick(event, document.getElementById('search-form'));\">\n            <span class=\"material-icons\">search</span>\n          </button>\n        </div>\n      </form>\n      <a accesskey=\"S\" class=\"settings\" onclick=\"settingsModal.open();\"><span class=\"material-icons\">settings</span></a>\n    </div>\n    {#- The sidebar component #}\n    <aside class=\"grid-item\">\n      {%- if display_toc %}\n      <span id=\"hamburger-toggle\">\n        <span class=\"material-icons\">menu</span>\n      </span>\n      {%- endif %}\n      <span id=\"settings-toggle\" class=\"settings\" onclick=\"settingsModal.open();\">\n        <span class=\"material-icons\">settings</span>\n      </span>\n      <div id=\"sidebar\">\n        <form id=\"sidebar-form\" role=\"search\" class=\"search\" action=\"{{ pathto('search') }}\" method=\"get\">\n        <div class=\"search-wrapper search-sidebar\">\n          <input type=\"search\" name=\"q\" placeholder=\"{{ _('Search documentation') }}\" />\n          <button type=\"submit\" onmousedown=\"searchBarClick(event, document.getElementById('sidebar-form'));\">\n            <span class=\"material-icons\">search</span>\n          </button>\n        </div>\n      </form>\n        {%- include \"localtoc.html\" %}\n      </div>\n    </aside>\n    {#- The actual body of the contents #}\n    <main class=\"grid-item\" role=\"main\">\n      {% block body %} {% endblock %}\n    </main>\n{%- block footer %}\n    <footer class=\"grid-item\">\n    {%- if show_copyright %}\n      {%- if hasdoc('copyright') %}\n        {% trans path=pathto('copyright'), copyright=copyright|e %}&#169; <a href=\"{{ path }}\">Copyright</a> {{ copyright }}.{% endtrans %}\n      {%- else %}\n        {% trans copyright=copyright|e %}&#169; Copyright {{ copyright }}.{% endtrans %}\n      {%- endif %}\n    {%- endif %}\n    {%- if last_updated %}\n      {% trans last_updated=last_updated|e %}Last updated on {{ last_updated }}.{% endtrans %}\n    {%- endif %}\n    {%- if show_sphinx %}\n      {% trans sphinx_version=sphinx_version|e %}Created using <a href=\"https://www.sphinx-doc.org/\">Sphinx</a> {{ sphinx_version }}.{% endtrans %}\n    {%- endif %}\n    </footer>\n{%- endblock %}\n  </div>\n  {%- if READTHEDOCS %}\n  <script>\n    if (typeof READTHEDOCS_DATA !== \"undefined\") {\n        if (!READTHEDOCS_DATA.features) {\n          READTHEDOCS_DATA.features = {};\n        }\n        READTHEDOCS_DATA.features.docsearch_disabled = true;\n      }\n  </script>\n  {%- endif %}\n\n  <div id=\"settings\" class=\"modal\" onclick=\"if (event.target == this){ settingsModal.close(); }\" hidden>\n    <div class=\"modal-content\">\n      <span class=\"close\" onclick=\"settingsModal.close();\" title=\"{{ _('Close') }}\">\n        <span class=\"material-icons\">close</span>\n      </span>\n      <h1>{{ _('Settings') }}</h1>\n\n      <h2>{{ _('Font') }}</h2>\n      <div class=\"setting\">\n        <h3>{{ _('Use a serif font:') }}\n          <label class=\"toggle\"\n            title=\"{{ _('Use a serif font? Your system font will be used, falling back to serif.')}}\">\n            <input type=\"checkbox\" name=\"useSerifFont\" onclick=\"updateSetting(this);\">\n            <span class=\"toggle-slider\"></span>\n          </label>\n        </h3>\n      </div>\n\n      <h2>{{ _('Theme') }}</h2>\n      <div class=\"setting\">\n        <h3>\n          <label class=\"toggle\" title=\"{{ _('Set your theme based on your system preferences') }}\">\n            <input type=\"radio\" name=\"setTheme\" onclick=\"updateSetting(this);\" value=\"automatic\" checked>\n          </label>\n          {{ _('Automatic') }}\n        </h3>\n        <h3>\n          <label class=\"toggle\" title=\"{{ _('Set your theme to light theme') }}\">\n            <input type=\"radio\" name=\"setTheme\" onclick=\"updateSetting(this);\" value=\"light\">\n          </label>\n          {{ _('Light') }}\n        </h3>\n        <h3>\n          <label class=\"toggle\" title=\"{{ _('Set your theme to dark theme') }}\">\n            <input type=\"radio\" name=\"setTheme\" onclick=\"updateSetting(this);\" value=\"dark\">\n          </label>\n          {{ _('Dark') }}\n        </h3>\n      </div>\n\n    </div>\n  </div>\n\n  <div id=\"to-top\" onclick=\"scrollToTop()\"{%- if READTHEDOCS %} class=\"is-rtd\"{%- endif %} hidden>\n    <span><span class=\"material-icons\">arrow_upward</span>{{ _('to top') }}</span>\n  </div>\n\n</body>\n</html>\n"
  },
  {
    "path": "docs/_templates/relations.html",
    "content": "<!-- purposefully empty -->\n"
  },
  {
    "path": "docs/api.rst",
    "content": ".. currentmodule:: discord\n\nAPI Reference\n===============\n\nThe following section outlines the API of discord.py.\n\n.. note::\n\n    This module uses the Python logging module to log diagnostic and errors\n    in an output independent way.  If the logging module is not configured,\n    these logs will not be output anywhere.  See :ref:`logging_setup` for\n    more information on how to set up and use the logging module with\n    discord.py.\n\nVersion Related Info\n---------------------\n\nThere are two main ways to query version information about the library. For guarantees, check :ref:`version_guarantees`.\n\n.. data:: version_info\n\n    A named tuple that is similar to :obj:`py:sys.version_info`.\n\n    Just like :obj:`py:sys.version_info` the valid values for ``releaselevel`` are\n    'alpha', 'beta', 'candidate' and 'final'.\n\n.. data:: __version__\n\n    A string representation of the version. e.g. ``'1.0.0rc1'``. This is based\n    off of :pep:`440`.\n\nClients\n--------\n\nClient\n~~~~~~~\n\n.. attributetable:: Client\n\n.. autoclass:: Client\n    :members:\n    :exclude-members: event\n\n    .. automethod:: Client.event()\n        :decorator:\n\nAutoShardedClient\n~~~~~~~~~~~~~~~~~~\n\n.. attributetable:: AutoShardedClient\n\n.. autoclass:: AutoShardedClient\n    :members:\n\nApplication Info\n------------------\n\nAppInfo\n~~~~~~~~\n\n.. attributetable:: AppInfo\n\n.. autoclass:: AppInfo()\n    :members:\n\nPartialAppInfo\n~~~~~~~~~~~~~~~\n\n.. attributetable:: PartialAppInfo\n\n.. autoclass:: PartialAppInfo()\n    :members:\n\nAppInstallParams\n~~~~~~~~~~~~~~~~\n\n.. attributetable:: AppInstallParams\n\n.. autoclass:: AppInstallParams()\n    :members:\n\nTeam\n~~~~~\n\n.. attributetable:: Team\n\n.. autoclass:: Team()\n    :members:\n\nTeamMember\n~~~~~~~~~~~\n\n.. attributetable:: TeamMember\n\n.. autoclass:: TeamMember()\n    :members:\n    :inherited-members:\n\nVoice Related\n---------------\n\nVoiceClient\n~~~~~~~~~~~~\n\n.. attributetable:: VoiceClient\n\n.. autoclass:: VoiceClient()\n    :members:\n    :exclude-members: connect, on_voice_state_update, on_voice_server_update\n\nVoiceProtocol\n~~~~~~~~~~~~~~~\n\n.. attributetable:: VoiceProtocol\n\n.. autoclass:: VoiceProtocol\n    :members:\n\nAudioSource\n~~~~~~~~~~~~\n\n.. attributetable:: AudioSource\n\n.. autoclass:: AudioSource\n    :members:\n\nPCMAudio\n~~~~~~~~~\n\n.. attributetable:: PCMAudio\n\n.. autoclass:: PCMAudio\n    :members:\n\nFFmpegAudio\n~~~~~~~~~~~~\n\n.. attributetable:: FFmpegAudio\n\n.. autoclass:: FFmpegAudio\n    :members:\n\nFFmpegPCMAudio\n~~~~~~~~~~~~~~~\n\n.. attributetable:: FFmpegPCMAudio\n\n.. autoclass:: FFmpegPCMAudio\n    :members:\n\nFFmpegOpusAudio\n~~~~~~~~~~~~~~~~\n\n.. attributetable:: FFmpegOpusAudio\n\n.. autoclass:: FFmpegOpusAudio\n    :members:\n\nPCMVolumeTransformer\n~~~~~~~~~~~~~~~~~~~~~\n\n.. attributetable:: PCMVolumeTransformer\n\n.. autoclass:: PCMVolumeTransformer\n    :members:\n\nOpus Library\n~~~~~~~~~~~~~\n\n.. autofunction:: discord.opus.load_opus\n\n.. autofunction:: discord.opus.is_loaded\n\n.. _discord-api-events:\n\nEvent Reference\n---------------\n\nThis section outlines the different types of events listened by :class:`Client`.\n\nThere are two ways to register an event, the first way is through the use of\n:meth:`Client.event`. The second way is through subclassing :class:`Client` and\noverriding the specific events. For example: ::\n\n    import discord\n\n    class MyClient(discord.Client):\n        async def on_message(self, message):\n            if message.author == self.user:\n                return\n\n            if message.content.startswith('$hello'):\n                await message.channel.send('Hello World!')\n\n\nIf an event handler raises an exception, :func:`on_error` will be called\nto handle it, which defaults to logging the traceback and ignoring the exception.\n\n.. warning::\n\n    All the events must be a |coroutine_link|_. If they aren't, then you might get unexpected\n    errors. In order to turn a function into a coroutine they must be ``async def``\n    functions.\n\nApp Commands\n~~~~~~~~~~~~~\n\n.. function:: on_raw_app_command_permissions_update(payload)\n\n    Called when application command permissions are updated.\n\n    .. versionadded:: 2.0\n\n    :param payload: The raw event payload data.\n    :type payload: :class:`RawAppCommandPermissionsUpdateEvent`\n\n.. function:: on_app_command_completion(interaction, command)\n\n    Called when a :class:`app_commands.Command` or :class:`app_commands.ContextMenu` has\n    successfully completed without error.\n\n    .. versionadded:: 2.0\n\n    :param interaction: The interaction of the command.\n    :type interaction: :class:`Interaction`\n    :param command: The command that completed successfully\n    :type command: Union[:class:`app_commands.Command`, :class:`app_commands.ContextMenu`]\n\nAutoMod\n~~~~~~~~\n\n.. function:: on_automod_rule_create(rule)\n\n    Called when a :class:`AutoModRule` is created.\n    You must have :attr:`~Permissions.manage_guild` to receive this.\n\n    This requires :attr:`Intents.auto_moderation_configuration` to be enabled.\n\n    .. versionadded:: 2.0\n\n    :param rule: The rule that was created.\n    :type rule: :class:`AutoModRule`\n\n.. function:: on_automod_rule_update(rule)\n\n    Called when a :class:`AutoModRule` is updated.\n    You must have :attr:`~Permissions.manage_guild` to receive this.\n\n    This requires :attr:`Intents.auto_moderation_configuration` to be enabled.\n\n    .. versionadded:: 2.0\n\n    :param rule: The rule that was updated.\n    :type rule: :class:`AutoModRule`\n\n.. function:: on_automod_rule_delete(rule)\n\n    Called when a :class:`AutoModRule` is deleted.\n    You must have :attr:`~Permissions.manage_guild` to receive this.\n\n    This requires :attr:`Intents.auto_moderation_configuration` to be enabled.\n\n    .. versionadded:: 2.0\n\n    :param rule: The rule that was deleted.\n    :type rule: :class:`AutoModRule`\n\n.. function:: on_automod_action(execution)\n\n    Called when a :class:`AutoModAction` is created/performed.\n    You must have :attr:`~Permissions.manage_guild` to receive this.\n\n    This requires :attr:`Intents.auto_moderation_execution` to be enabled.\n\n    .. versionadded:: 2.0\n\n    :param execution: The rule execution that was performed.\n    :type execution: :class:`AutoModAction`\n\nChannels\n~~~~~~~~~\n\n.. function:: on_guild_channel_delete(channel)\n              on_guild_channel_create(channel)\n\n    Called whenever a guild channel is deleted or created.\n\n    Note that you can get the guild from :attr:`~abc.GuildChannel.guild`.\n\n    This requires :attr:`Intents.guilds` to be enabled.\n\n    :param channel: The guild channel that got created or deleted.\n    :type channel: :class:`abc.GuildChannel`\n\n.. function:: on_guild_channel_update(before, after)\n\n    Called whenever a guild channel is updated. e.g. changed name, topic, permissions.\n\n    This requires :attr:`Intents.guilds` to be enabled.\n\n    :param before: The updated guild channel's old info.\n    :type before: :class:`abc.GuildChannel`\n    :param after: The updated guild channel's new info.\n    :type after: :class:`abc.GuildChannel`\n\n.. function:: on_guild_channel_pins_update(channel, last_pin)\n\n    Called whenever a message is pinned or unpinned from a guild channel.\n\n    This requires :attr:`Intents.guilds` to be enabled.\n\n    :param channel: The guild channel that had its pins updated.\n    :type channel: Union[:class:`abc.GuildChannel`, :class:`Thread`]\n    :param last_pin: The latest message that was pinned as an aware datetime in UTC. Could be ``None``.\n    :type last_pin: Optional[:class:`datetime.datetime`]\n\n.. function:: on_private_channel_update(before, after)\n\n    Called whenever a private group DM is updated. e.g. changed name or topic.\n\n    This requires :attr:`Intents.messages` to be enabled.\n\n    :param before: The updated group channel's old info.\n    :type before: :class:`GroupChannel`\n    :param after: The updated group channel's new info.\n    :type after: :class:`GroupChannel`\n\n.. function:: on_private_channel_pins_update(channel, last_pin)\n\n    Called whenever a message is pinned or unpinned from a private channel.\n\n    :param channel: The private channel that had its pins updated.\n    :type channel: :class:`abc.PrivateChannel`\n    :param last_pin: The latest message that was pinned as an aware datetime in UTC. Could be ``None``.\n    :type last_pin: Optional[:class:`datetime.datetime`]\n\n.. function:: on_typing(channel, user, when)\n\n    Called when someone begins typing a message.\n\n    The ``channel`` parameter can be a :class:`abc.Messageable` instance.\n    Which could either be :class:`TextChannel`, :class:`GroupChannel`, or\n    :class:`DMChannel`.\n\n    If the ``channel`` is a :class:`TextChannel` then the ``user`` parameter\n    is a :class:`Member`, otherwise it is a :class:`User`.\n\n    If the channel or user could not be found in the internal cache this event\n    will not be called, you may use :func:`on_raw_typing` instead.\n\n    This requires :attr:`Intents.typing` to be enabled.\n\n    :param channel: The location where the typing originated from.\n    :type channel: :class:`abc.Messageable`\n    :param user: The user that started typing.\n    :type user: Union[:class:`User`, :class:`Member`]\n    :param when: When the typing started as an aware datetime in UTC.\n    :type when: :class:`datetime.datetime`\n\n.. function:: on_raw_typing(payload)\n\n    Called when someone begins typing a message. Unlike :func:`on_typing` this\n    is called regardless of the channel and user being in the internal cache.\n\n    This requires :attr:`Intents.typing` to be enabled.\n\n    .. versionadded:: 2.0\n\n    :param payload: The raw event payload data.\n    :type payload: :class:`RawTypingEvent`\n\nConnection\n~~~~~~~~~~~\n\n.. function:: on_connect()\n\n    Called when the client has successfully connected to Discord. This is not\n    the same as the client being fully prepared, see :func:`on_ready` for that.\n\n    The warnings on :func:`on_ready` also apply.\n\n.. function:: on_disconnect()\n\n    Called when the client has disconnected from Discord, or a connection attempt to Discord has failed.\n    This could happen either through the internet being disconnected, explicit calls to close,\n    or Discord terminating the connection one way or the other.\n\n    This function can be called many times without a corresponding :func:`on_connect` call.\n\n.. function:: on_shard_connect(shard_id)\n\n    Similar to :func:`on_connect` except used by :class:`AutoShardedClient`\n    to denote when a particular shard ID has connected to Discord.\n\n    .. versionadded:: 1.4\n\n    :param shard_id: The shard ID that has connected.\n    :type shard_id: :class:`int`\n\n\n.. function:: on_shard_disconnect(shard_id)\n\n    Similar to :func:`on_disconnect` except used by :class:`AutoShardedClient`\n    to denote when a particular shard ID has disconnected from Discord.\n\n    .. versionadded:: 1.4\n\n    :param shard_id: The shard ID that has disconnected.\n    :type shard_id: :class:`int`\n\nDebug\n~~~~~~\n\n.. function:: on_error(event, *args, **kwargs)\n\n    Usually when an event raises an uncaught exception, a traceback is\n    logged to stderr and the exception is ignored. If you want to\n    change this behaviour and handle the exception for whatever reason\n    yourself, this event can be overridden. Which, when done, will\n    suppress the default action of printing the traceback.\n\n    The information of the exception raised and the exception itself can\n    be retrieved with a standard call to :func:`sys.exc_info`.\n\n    .. note::\n\n        ``on_error`` will only be dispatched to :meth:`Client.event`.\n\n        It will not be received by :meth:`Client.wait_for`, or, if used,\n        :ref:`ext_commands_api_bot` listeners such as\n        :meth:`~ext.commands.Bot.listen` or :meth:`~ext.commands.Cog.listener`.\n\n    .. versionchanged:: 2.0\n\n        The traceback is now logged rather than printed.\n\n    :param event: The name of the event that raised the exception.\n    :type event: :class:`str`\n\n    :param args: The positional arguments for the event that raised the\n        exception.\n    :param kwargs: The keyword arguments for the event that raised the\n        exception.\n\n.. function:: on_socket_event_type(event_type)\n\n    Called whenever a websocket event is received from the WebSocket.\n\n    This is mainly useful for logging how many events you are receiving\n    from the Discord gateway.\n\n    .. versionadded:: 2.0\n\n    :param event_type: The event type from Discord that is received, e.g. ``'READY'``.\n    :type event_type: :class:`str`\n\n.. function:: on_socket_raw_receive(msg)\n\n    Called whenever a message is completely received from the WebSocket, before\n    it's processed and parsed. This event is always dispatched when a\n    complete message is received and the passed data is not parsed in any way.\n\n    This is only really useful for grabbing the WebSocket stream and\n    debugging purposes.\n\n    This requires setting the ``enable_debug_events`` setting in the :class:`Client`.\n\n    .. note::\n\n        This is only for the messages received from the client\n        WebSocket. The voice WebSocket will not trigger this event.\n\n    :param msg: The message passed in from the WebSocket library.\n    :type msg: :class:`str`\n\n.. function:: on_socket_raw_send(payload)\n\n    Called whenever a send operation is done on the WebSocket before the\n    message is sent. The passed parameter is the message that is being\n    sent to the WebSocket.\n\n    This is only really useful for grabbing the WebSocket stream and\n    debugging purposes.\n\n    This requires setting the ``enable_debug_events`` setting in the :class:`Client`.\n\n    .. note::\n\n        This is only for the messages sent from the client\n        WebSocket. The voice WebSocket will not trigger this event.\n\n    :param payload: The message that is about to be passed on to the\n                    WebSocket library. It can be :class:`bytes` to denote a binary\n                    message or :class:`str` to denote a regular text message.\n    :type payload: Union[:class:`bytes`, :class:`str`]\n\n\nEntitlements\n~~~~~~~~~~~~\n\n.. function:: on_entitlement_create(entitlement)\n\n    Called when a user subscribes to a SKU.\n\n    .. versionadded:: 2.4\n\n    :param entitlement: The entitlement that was created.\n    :type entitlement: :class:`Entitlement`\n\n.. function:: on_entitlement_update(entitlement)\n\n    Called when a user updates their subscription to a SKU. This is usually called when\n    the user renews or cancels their subscription.\n\n    .. versionadded:: 2.4\n\n    :param entitlement: The entitlement that was updated.\n    :type entitlement: :class:`Entitlement`\n\n.. function:: on_entitlement_delete(entitlement)\n\n    Called when a users subscription to a SKU is cancelled. This is typically only called when:\n\n    - Discord issues a refund for the subscription.\n    - Discord removes an entitlement from a user.\n\n    .. warning::\n\n        This event won't be called if the user cancels their subscription manually, instead\n        :func:`on_entitlement_update` will be called with :attr:`Entitlement.ends_at` set to the end of the\n        current billing period.\n\n    .. versionadded:: 2.4\n\n    :param entitlement: The entitlement that was deleted.\n    :type entitlement: :class:`Entitlement`\n\n\nGateway\n~~~~~~~~\n\n.. function:: on_ready()\n\n    Called when the client is done preparing the data received from Discord. Usually after login is successful\n    and the :attr:`Client.guilds` and co. are filled up.\n\n    .. warning::\n\n        This function is not guaranteed to be the first event called.\n        Likewise, this function is **not** guaranteed to only be called\n        once. This library implements reconnection logic and thus will\n        end up calling this event whenever a RESUME request fails.\n\n.. function:: on_resumed()\n\n    Called when the client has resumed a session.\n\n.. function:: on_shard_ready(shard_id)\n\n    Similar to :func:`on_ready` except used by :class:`AutoShardedClient`\n    to denote when a particular shard ID has become ready.\n\n    :param shard_id: The shard ID that is ready.\n    :type shard_id: :class:`int`\n\n\n.. function:: on_shard_resumed(shard_id)\n\n    Similar to :func:`on_resumed` except used by :class:`AutoShardedClient`\n    to denote when a particular shard ID has resumed a session.\n\n    .. versionadded:: 1.4\n\n    :param shard_id: The shard ID that has resumed.\n    :type shard_id: :class:`int`\n\nGuilds\n~~~~~~~\n\n.. function:: on_guild_available(guild)\n              on_guild_unavailable(guild)\n\n    Called when a guild becomes available or unavailable. The guild must have\n    existed in the :attr:`Client.guilds` cache.\n\n    This requires :attr:`Intents.guilds` to be enabled.\n\n    :param guild: The :class:`Guild` that has changed availability.\n\n.. function:: on_guild_join(guild)\n\n    Called when a :class:`Guild` is either created by the :class:`Client` or when the\n    :class:`Client` joins a guild.\n\n    This requires :attr:`Intents.guilds` to be enabled.\n\n    :param guild: The guild that was joined.\n    :type guild: :class:`Guild`\n\n.. function:: on_guild_remove(guild)\n\n    Called when a :class:`Guild` is removed from the :class:`Client`.\n\n    This happens through, but not limited to, these circumstances:\n\n    - The client got banned.\n    - The client got kicked.\n    - The client left the guild.\n    - The client or the guild owner deleted the guild.\n\n    In order for this event to be invoked then the :class:`Client` must have\n    been part of the guild to begin with. (i.e. it is part of :attr:`Client.guilds`)\n\n    This requires :attr:`Intents.guilds` to be enabled.\n\n    :param guild: The guild that got removed.\n    :type guild: :class:`Guild`\n\n.. function:: on_guild_update(before, after)\n\n    Called when a :class:`Guild` updates, for example:\n\n    - Changed name\n    - Changed AFK channel\n    - Changed AFK timeout\n    - etc\n\n    This requires :attr:`Intents.guilds` to be enabled.\n\n    :param before: The guild prior to being updated.\n    :type before: :class:`Guild`\n    :param after: The guild after being updated.\n    :type after: :class:`Guild`\n\n.. function:: on_guild_emojis_update(guild, before, after)\n\n    Called when a :class:`Guild` adds or removes :class:`Emoji`.\n\n    This requires :attr:`Intents.emojis_and_stickers` to be enabled.\n\n    :param guild: The guild who got their emojis updated.\n    :type guild: :class:`Guild`\n    :param before: A list of emojis before the update.\n    :type before: Sequence[:class:`Emoji`]\n    :param after: A list of emojis after the update.\n    :type after: Sequence[:class:`Emoji`]\n\n.. function:: on_guild_stickers_update(guild, before, after)\n\n    Called when a :class:`Guild` updates its stickers.\n\n    This requires :attr:`Intents.emojis_and_stickers` to be enabled.\n\n    .. versionadded:: 2.0\n\n    :param guild: The guild who got their stickers updated.\n    :type guild: :class:`Guild`\n    :param before: A list of stickers before the update.\n    :type before: Sequence[:class:`GuildSticker`]\n    :param after: A list of stickers after the update.\n    :type after: Sequence[:class:`GuildSticker`]\n\n.. function:: on_audit_log_entry_create(entry)\n\n    Called when a :class:`Guild` gets a new audit log entry.\n    You must have :attr:`~Permissions.view_audit_log` to receive this.\n\n    This requires :attr:`Intents.moderation` to be enabled.\n\n    .. versionadded:: 2.2\n\n    .. warning::\n\n        Audit log entries received through the gateway are subject to data retrieval\n        from cache rather than REST. This means that some data might not be present\n        when you expect it to be. For example, the :attr:`AuditLogEntry.target`\n        attribute will usually be a :class:`discord.Object` and the\n        :attr:`AuditLogEntry.user` attribute will depend on user and member cache.\n\n        To get the user ID of entry, :attr:`AuditLogEntry.user_id` can be used instead.\n\n    :param entry: The audit log entry that was created.\n    :type entry: :class:`AuditLogEntry`\n\n.. function:: on_invite_create(invite)\n\n    Called when an :class:`Invite` is created.\n    You must have :attr:`~Permissions.manage_channels` to receive this.\n\n    .. versionadded:: 1.3\n\n    .. note::\n\n        There is a rare possibility that the :attr:`Invite.guild` and :attr:`Invite.channel`\n        attributes will be of :class:`Object` rather than the respective models.\n\n    This requires :attr:`Intents.invites` to be enabled.\n\n    :param invite: The invite that was created.\n    :type invite: :class:`Invite`\n\n.. function:: on_invite_delete(invite)\n\n    Called when an :class:`Invite` is deleted.\n    You must have :attr:`~Permissions.manage_channels` to receive this.\n\n    .. versionadded:: 1.3\n\n    .. note::\n\n        There is a rare possibility that the :attr:`Invite.guild` and :attr:`Invite.channel`\n        attributes will be of :class:`Object` rather than the respective models.\n\n        Outside of those two attributes, the only other attribute guaranteed to be\n        filled by the Discord gateway for this event is :attr:`Invite.code`.\n\n    This requires :attr:`Intents.invites` to be enabled.\n\n    :param invite: The invite that was deleted.\n    :type invite: :class:`Invite`\n\n\nIntegrations\n~~~~~~~~~~~~~\n\n.. function:: on_integration_create(integration)\n\n    Called when an integration is created.\n\n    This requires :attr:`Intents.integrations` to be enabled.\n\n    .. versionadded:: 2.0\n\n    :param integration: The integration that was created.\n    :type integration: :class:`Integration`\n\n.. function:: on_integration_update(integration)\n\n    Called when an integration is updated.\n\n    This requires :attr:`Intents.integrations` to be enabled.\n\n    .. versionadded:: 2.0\n\n    :param integration: The integration that was updated.\n    :type integration: :class:`Integration`\n\n.. function:: on_guild_integrations_update(guild)\n\n    Called whenever an integration is created, modified, or removed from a guild.\n\n    This requires :attr:`Intents.integrations` to be enabled.\n\n    .. versionadded:: 1.4\n\n    :param guild: The guild that had its integrations updated.\n    :type guild: :class:`Guild`\n\n.. function:: on_webhooks_update(channel)\n\n    Called whenever a webhook is created, modified, or removed from a guild channel.\n\n    This requires :attr:`Intents.webhooks` to be enabled.\n\n    :param channel: The channel that had its webhooks updated.\n    :type channel: :class:`abc.GuildChannel`\n\n.. function:: on_raw_integration_delete(payload)\n\n    Called when an integration is deleted.\n\n    This requires :attr:`Intents.integrations` to be enabled.\n\n    .. versionadded:: 2.0\n\n    :param payload: The raw event payload data.\n    :type payload: :class:`RawIntegrationDeleteEvent`\n\nInteractions\n~~~~~~~~~~~~~\n\n.. function:: on_interaction(interaction)\n\n    Called when an interaction happened.\n\n    This currently happens due to slash command invocations or components being used.\n\n    .. warning::\n\n        This is a low level function that is not generally meant to be used.\n        If you are working with components, consider using the callbacks associated\n        with the :class:`~discord.ui.View` instead as it provides a nicer user experience.\n\n    .. versionadded:: 2.0\n\n    :param interaction: The interaction data.\n    :type interaction: :class:`Interaction`\n\nMembers\n~~~~~~~~\n\n.. function:: on_member_join(member)\n\n    Called when a :class:`Member` joins a :class:`Guild`.\n\n    This requires :attr:`Intents.members` to be enabled.\n\n    :param member: The member who joined.\n    :type member: :class:`Member`\n\n.. function:: on_member_remove(member)\n\n    Called when a :class:`Member` leaves a :class:`Guild`.\n\n    If the guild or member could not be found in the internal cache this event\n    will not be called, you may use :func:`on_raw_member_remove` instead.\n\n    This requires :attr:`Intents.members` to be enabled.\n\n    :param member: The member who left.\n    :type member: :class:`Member`\n\n.. function:: on_raw_member_remove(payload)\n\n    Called when a :class:`Member` leaves a :class:`Guild`.\n\n    Unlike :func:`on_member_remove`\n    this is called regardless of the guild or member being in the internal cache.\n\n    This requires :attr:`Intents.members` to be enabled.\n\n    .. versionadded:: 2.0\n\n    :param payload: The raw event payload data.\n    :type payload: :class:`RawMemberRemoveEvent`\n\n.. function:: on_member_update(before, after)\n\n    Called when a :class:`Member` updates their profile.\n\n    This is called when one or more of the following things change:\n\n    - nickname\n    - roles\n    - pending\n    - timeout\n    - guild avatar\n    - flags\n\n    Due to a Discord limitation, this event is not dispatched when a member's timeout expires.\n\n    This requires :attr:`Intents.members` to be enabled.\n\n    :param before: The updated member's old info.\n    :type before: :class:`Member`\n    :param after: The updated member's updated info.\n    :type after: :class:`Member`\n\n.. function:: on_user_update(before, after)\n\n    Called when a :class:`User` updates their profile.\n\n    This is called when one or more of the following things change:\n\n    - avatar\n    - username\n    - discriminator\n\n    This requires :attr:`Intents.members` to be enabled.\n\n    :param before: The updated user's old info.\n    :type before: :class:`User`\n    :param after: The updated user's updated info.\n    :type after: :class:`User`\n\n.. function:: on_member_ban(guild, user)\n\n    Called when a user gets banned from a :class:`Guild`.\n\n    This requires :attr:`Intents.moderation` to be enabled.\n\n    :param guild: The guild the user got banned from.\n    :type guild: :class:`Guild`\n    :param user: The user that got banned.\n                 Can be either :class:`User` or :class:`Member` depending if\n                 the user was in the guild or not at the time of removal.\n    :type user: Union[:class:`User`, :class:`Member`]\n\n.. function:: on_member_unban(guild, user)\n\n    Called when a :class:`User` gets unbanned from a :class:`Guild`.\n\n    This requires :attr:`Intents.moderation` to be enabled.\n\n    :param guild: The guild the user got unbanned from.\n    :type guild: :class:`Guild`\n    :param user: The user that got unbanned.\n    :type user: :class:`User`\n\n.. function:: on_presence_update(before, after)\n\n    Called when a :class:`Member` updates their presence.\n\n    This is called when one or more of the following things change:\n\n    - status\n    - activity\n\n    This requires :attr:`Intents.presences` and :attr:`Intents.members` to be enabled.\n\n    .. versionadded:: 2.0\n\n    :param before: The updated member's old info.\n    :type before: :class:`Member`\n    :param after: The updated member's updated info.\n    :type after: :class:`Member`\n\nMessages\n~~~~~~~~~\n\n.. function:: on_message(message)\n\n    Called when a :class:`Message` is created and sent.\n\n    This requires :attr:`Intents.messages` to be enabled.\n\n    .. warning::\n\n        Your bot's own messages and private messages are sent through this\n        event. This can lead cases of 'recursion' depending on how your bot was\n        programmed. If you want the bot to not reply to itself, consider\n        checking the user IDs. Note that :class:`~ext.commands.Bot` does not\n        have this problem.\n\n    :param message: The current message.\n    :type message: :class:`Message`\n\n.. function:: on_message_edit(before, after)\n\n    Called when a :class:`Message` receives an update event. If the message is not found\n    in the internal message cache, then these events will not be called.\n    Messages might not be in cache if the message is too old\n    or the client is participating in high traffic guilds.\n\n    If this occurs increase the :class:`max_messages <Client>` parameter\n    or use the :func:`on_raw_message_edit` event instead.\n\n    The following non-exhaustive cases trigger this event:\n\n    - A message has been pinned or unpinned.\n    - The message content has been changed.\n    - The message has received an embed.\n\n        - For performance reasons, the embed server does not do this in a \"consistent\" manner.\n\n    - The message's embeds were suppressed or unsuppressed.\n    - A call message has received an update to its participants or ending time.\n\n    This requires :attr:`Intents.messages` to be enabled.\n\n    :param before: The previous version of the message.\n    :type before: :class:`Message`\n    :param after: The current version of the message.\n    :type after: :class:`Message`\n\n.. function:: on_message_delete(message)\n\n    Called when a message is deleted. If the message is not found in the\n    internal message cache, then this event will not be called.\n    Messages might not be in cache if the message is too old\n    or the client is participating in high traffic guilds.\n\n    If this occurs increase the :class:`max_messages <Client>` parameter\n    or use the :func:`on_raw_message_delete` event instead.\n\n    This requires :attr:`Intents.messages` to be enabled.\n\n    :param message: The deleted message.\n    :type message: :class:`Message`\n\n.. function:: on_bulk_message_delete(messages)\n\n    Called when messages are bulk deleted. If none of the messages deleted\n    are found in the internal message cache, then this event will not be called.\n    If individual messages were not found in the internal message cache,\n    this event will still be called, but the messages not found will not be included in\n    the messages list. Messages might not be in cache if the message is too old\n    or the client is participating in high traffic guilds.\n\n    If this occurs increase the :class:`max_messages <Client>` parameter\n    or use the :func:`on_raw_bulk_message_delete` event instead.\n\n    This requires :attr:`Intents.messages` to be enabled.\n\n    :param messages: The messages that have been deleted.\n    :type messages: List[:class:`Message`]\n\n.. function:: on_raw_message_edit(payload)\n\n    Called when a message is edited. Unlike :func:`on_message_edit`, this is called\n    regardless of the state of the internal message cache.\n\n    If the message is found in the message cache,\n    it can be accessed via :attr:`RawMessageUpdateEvent.cached_message`. The cached message represents\n    the message before it has been edited. For example, if the content of a message is modified and\n    triggers the :func:`on_raw_message_edit` coroutine, the :attr:`RawMessageUpdateEvent.cached_message`\n    will return a :class:`Message` object that represents the message before the content was modified.\n\n    Due to the inherently raw nature of this event, the data parameter coincides with\n    the raw data given by the :ddocs:`gateway <topics/gateway-events#message-update>`.\n\n    Since the data payload can be partial, care must be taken when accessing stuff in the dictionary.\n    One example of a common case of partial data is when the ``'content'`` key is inaccessible. This\n    denotes an \"embed\" only edit, which is an edit in which only the embeds are updated by the Discord\n    embed server.\n\n    This requires :attr:`Intents.messages` to be enabled.\n\n    :param payload: The raw event payload data.\n    :type payload: :class:`RawMessageUpdateEvent`\n\n\n.. function:: on_raw_message_delete(payload)\n\n    Called when a message is deleted. Unlike :func:`on_message_delete`, this is\n    called regardless of the message being in the internal message cache or not.\n\n    If the message is found in the message cache,\n    it can be accessed via :attr:`RawMessageDeleteEvent.cached_message`\n\n    This requires :attr:`Intents.messages` to be enabled.\n\n    :param payload: The raw event payload data.\n    :type payload: :class:`RawMessageDeleteEvent`\n\n.. function:: on_raw_bulk_message_delete(payload)\n\n    Called when a bulk delete is triggered. Unlike :func:`on_bulk_message_delete`, this is\n    called regardless of the messages being in the internal message cache or not.\n\n    If the messages are found in the message cache,\n    they can be accessed via :attr:`RawBulkMessageDeleteEvent.cached_messages`\n\n    This requires :attr:`Intents.messages` to be enabled.\n\n    :param payload: The raw event payload data.\n    :type payload: :class:`RawBulkMessageDeleteEvent`\n\nPolls\n~~~~~~\n\n.. function:: on_poll_vote_add(user, answer)\n              on_poll_vote_remove(user, answer)\n\n    Called when a :class:`Poll` gains or loses a vote. If the ``user`` or ``answer``'s poll\n    parent message are not cached then this event will not be called.\n\n    This requires :attr:`Intents.message_content` and :attr:`Intents.polls` to be enabled.\n\n    .. note::\n\n        If the poll allows multiple answers and the user removes or adds multiple votes, this\n        event will be called as many times as votes that are added or removed.\n\n    .. versionadded:: 2.4\n\n    :param user: The user that performed the action.\n    :type user: Union[:class:`User`, :class:`Member`]\n    :param answer: The answer the user voted or removed their vote from.\n    :type answer: :class:`PollAnswer`\n\n.. function:: on_raw_poll_vote_add(payload)\n              on_raw_poll_vote_remove(payload)\n\n    Called when a :class:`Poll` gains or loses a vote. Unlike :func:`on_poll_vote_add` and :func:`on_poll_vote_remove`\n    this is called regardless of the state of the internal user and message cache.\n\n    This requires :attr:`Intents.message_content` and :attr:`Intents.polls` to be enabled.\n\n    .. note::\n\n        If the poll allows multiple answers and the user removes or adds multiple votes, this\n        event will be called as many times as votes that are added or removed.\n\n    .. versionadded:: 2.4\n\n    :param payload: The raw event payload data.\n    :type payload: :class:`RawPollVoteActionEvent`\n\nReactions\n~~~~~~~~~~\n\n.. function:: on_reaction_add(reaction, user)\n\n    Called when a message has a reaction added to it. Similar to :func:`on_message_edit`,\n    if the message is not found in the internal message cache, then this\n    event will not be called. Consider using :func:`on_raw_reaction_add` instead.\n\n    .. note::\n\n        To get the :class:`Message` being reacted, access it via :attr:`Reaction.message`.\n\n    This requires :attr:`Intents.reactions` to be enabled.\n\n    .. note::\n\n        This doesn't require :attr:`Intents.members` within a guild context,\n        but due to Discord not providing updated user information in a direct message\n        it's required for direct messages to receive this event.\n        Consider using :func:`on_raw_reaction_add` if you need this and do not otherwise want\n        to enable the members intent.\n\n    .. warning::\n\n        This event does not have a way of differentiating whether a reaction is a\n        burst reaction (also known as \"super reaction\") or not. If you need this,\n        consider using :func:`on_raw_reaction_add` instead.\n\n    :param reaction: The current state of the reaction.\n    :type reaction: :class:`Reaction`\n    :param user: The user who added the reaction.\n    :type user: Union[:class:`Member`, :class:`User`]\n\n.. function:: on_reaction_remove(reaction, user)\n\n    Called when a message has a reaction removed from it. Similar to on_message_edit,\n    if the message is not found in the internal message cache, then this event\n    will not be called.\n\n    .. note::\n\n        To get the message being reacted, access it via :attr:`Reaction.message`.\n\n    This requires both :attr:`Intents.reactions` and :attr:`Intents.members` to be enabled.\n\n    .. note::\n\n        Consider using :func:`on_raw_reaction_remove` if you need this and do not want\n        to enable the members intent.\n\n    .. warning::\n\n        This event does not have a way of differentiating whether a reaction is a\n        burst reaction (also known as \"super reaction\") or not. If you need this,\n        consider using :func:`on_raw_reaction_remove` instead.\n\n    :param reaction: The current state of the reaction.\n    :type reaction: :class:`Reaction`\n    :param user: The user whose reaction was removed.\n    :type user: Union[:class:`Member`, :class:`User`]\n\n.. function:: on_reaction_clear(message, reactions)\n\n    Called when a message has all its reactions removed from it. Similar to :func:`on_message_edit`,\n    if the message is not found in the internal message cache, then this event\n    will not be called. Consider using :func:`on_raw_reaction_clear` instead.\n\n    This requires :attr:`Intents.reactions` to be enabled.\n\n    :param message: The message that had its reactions cleared.\n    :type message: :class:`Message`\n    :param reactions: The reactions that were removed.\n    :type reactions: List[:class:`Reaction`]\n\n.. function:: on_reaction_clear_emoji(reaction)\n\n    Called when a message has a specific reaction removed from it. Similar to :func:`on_message_edit`,\n    if the message is not found in the internal message cache, then this event\n    will not be called. Consider using :func:`on_raw_reaction_clear_emoji` instead.\n\n    This requires :attr:`Intents.reactions` to be enabled.\n\n    .. versionadded:: 1.3\n\n    :param reaction: The reaction that got cleared.\n    :type reaction: :class:`Reaction`\n\n\n.. function:: on_raw_reaction_add(payload)\n\n    Called when a message has a reaction added. Unlike :func:`on_reaction_add`, this is\n    called regardless of the state of the internal message cache.\n\n    This requires :attr:`Intents.reactions` to be enabled.\n\n    :param payload: The raw event payload data.\n    :type payload: :class:`RawReactionActionEvent`\n\n.. function:: on_raw_reaction_remove(payload)\n\n    Called when a message has a reaction removed. Unlike :func:`on_reaction_remove`, this is\n    called regardless of the state of the internal message cache.\n\n    This requires :attr:`Intents.reactions` to be enabled.\n\n    :param payload: The raw event payload data.\n    :type payload: :class:`RawReactionActionEvent`\n\n.. function:: on_raw_reaction_clear(payload)\n\n    Called when a message has all its reactions removed. Unlike :func:`on_reaction_clear`,\n    this is called regardless of the state of the internal message cache.\n\n    This requires :attr:`Intents.reactions` to be enabled.\n\n    :param payload: The raw event payload data.\n    :type payload: :class:`RawReactionClearEvent`\n\n.. function:: on_raw_reaction_clear_emoji(payload)\n\n    Called when a message has a specific reaction removed from it. Unlike :func:`on_reaction_clear_emoji` this is called\n    regardless of the state of the internal message cache.\n\n    This requires :attr:`Intents.reactions` to be enabled.\n\n    .. versionadded:: 1.3\n\n    :param payload: The raw event payload data.\n    :type payload: :class:`RawReactionClearEmojiEvent`\n\n\nRoles\n~~~~~~\n\n.. function:: on_guild_role_create(role)\n              on_guild_role_delete(role)\n\n    Called when a :class:`Guild` creates or deletes a new :class:`Role`.\n\n    To get the guild it belongs to, use :attr:`Role.guild`.\n\n    This requires :attr:`Intents.guilds` to be enabled.\n\n    :param role: The role that was created or deleted.\n    :type role: :class:`Role`\n\n.. function:: on_guild_role_update(before, after)\n\n    Called when a :class:`Role` is changed guild-wide.\n\n    This requires :attr:`Intents.guilds` to be enabled.\n\n    :param before: The updated role's old info.\n    :type before: :class:`Role`\n    :param after: The updated role's updated info.\n    :type after: :class:`Role`\n\n\nScheduled Events\n~~~~~~~~~~~~~~~~~\n\n.. function:: on_scheduled_event_create(event)\n              on_scheduled_event_delete(event)\n\n    Called when a :class:`ScheduledEvent` is created or deleted.\n\n    This requires :attr:`Intents.guild_scheduled_events` to be enabled.\n\n    .. versionadded:: 2.0\n\n    :param event: The scheduled event that was created or deleted.\n    :type event: :class:`ScheduledEvent`\n\n.. function:: on_scheduled_event_update(before, after)\n\n    Called when a :class:`ScheduledEvent` is updated.\n\n    This requires :attr:`Intents.guild_scheduled_events` to be enabled.\n\n    The following, but not limited to, examples illustrate when this event is called:\n\n    - The scheduled start/end times are changed.\n    - The channel is changed.\n    - The description is changed.\n    - The status is changed.\n    - The image is changed.\n\n    .. versionadded:: 2.0\n\n    :param before: The scheduled event before the update.\n    :type before: :class:`ScheduledEvent`\n    :param after: The scheduled event after the update.\n    :type after: :class:`ScheduledEvent`\n\n.. function:: on_scheduled_event_user_add(event, user)\n              on_scheduled_event_user_remove(event, user)\n\n    Called when a user is added or removed from a :class:`ScheduledEvent`.\n\n    This requires :attr:`Intents.guild_scheduled_events` to be enabled.\n\n    .. versionadded:: 2.0\n\n    :param event: The scheduled event that the user was added or removed from.\n    :type event: :class:`ScheduledEvent`\n    :param user: The user that was added or removed.\n    :type user: :class:`User`\n\n\nStages\n~~~~~~~\n\n.. function:: on_stage_instance_create(stage_instance)\n              on_stage_instance_delete(stage_instance)\n\n    Called when a :class:`StageInstance` is created or deleted for a :class:`StageChannel`.\n\n    .. versionadded:: 2.0\n\n    :param stage_instance: The stage instance that was created or deleted.\n    :type stage_instance: :class:`StageInstance`\n\n.. function:: on_stage_instance_update(before, after)\n\n    Called when a :class:`StageInstance` is updated.\n\n    The following, but not limited to, examples illustrate when this event is called:\n\n    - The topic is changed.\n    - The privacy level is changed.\n\n    .. versionadded:: 2.0\n\n    :param before: The stage instance before the update.\n    :type before: :class:`StageInstance`\n    :param after: The stage instance after the update.\n    :type after: :class:`StageInstance`\n\nThreads\n~~~~~~~~\n\n.. function:: on_thread_create(thread)\n\n    Called whenever a thread is created.\n\n    Note that you can get the guild from :attr:`Thread.guild`.\n\n    This requires :attr:`Intents.guilds` to be enabled.\n\n    .. versionadded:: 2.0\n\n    :param thread: The thread that was created.\n    :type thread: :class:`Thread`\n\n.. function:: on_thread_join(thread)\n\n    Called whenever a thread is joined.\n\n    Note that you can get the guild from :attr:`Thread.guild`.\n\n    This requires :attr:`Intents.guilds` to be enabled.\n\n    .. versionadded:: 2.0\n\n    :param thread: The thread that got joined.\n    :type thread: :class:`Thread`\n\n.. function:: on_thread_update(before, after)\n\n    Called whenever a thread is updated. If the thread could\n    not be found in the internal cache this event will not be called.\n    Threads will not be in the cache if they are archived.\n\n    If you need this information use :func:`on_raw_thread_update` instead.\n\n    This requires :attr:`Intents.guilds` to be enabled.\n\n    .. versionadded:: 2.0\n\n    :param before: The updated thread's old info.\n    :type before: :class:`Thread`\n    :param after: The updated thread's new info.\n    :type after: :class:`Thread`\n\n.. function:: on_thread_remove(thread)\n\n    Called whenever a thread is removed. This is different from a thread being deleted.\n\n    Note that you can get the guild from :attr:`Thread.guild`.\n\n    This requires :attr:`Intents.guilds` to be enabled.\n\n    .. warning::\n\n        Due to technical limitations, this event might not be called\n        as soon as one expects. Since the library tracks thread membership\n        locally, the API only sends updated thread membership status upon being\n        synced by joining a thread.\n\n    .. versionadded:: 2.0\n\n    :param thread: The thread that got removed.\n    :type thread: :class:`Thread`\n\n.. function:: on_thread_delete(thread)\n\n    Called whenever a thread is deleted. If the thread could\n    not be found in the internal cache this event will not be called.\n    Threads will not be in the cache if they are archived.\n\n    If you need this information use :func:`on_raw_thread_delete` instead.\n\n    Note that you can get the guild from :attr:`Thread.guild`.\n\n    This requires :attr:`Intents.guilds` to be enabled.\n\n    .. versionadded:: 2.0\n\n    :param thread: The thread that got deleted.\n    :type thread: :class:`Thread`\n\n.. function:: on_raw_thread_update(payload)\n\n    Called whenever a thread is updated. Unlike :func:`on_thread_update` this\n    is called regardless of the thread being in the internal thread cache or not.\n\n    This requires :attr:`Intents.guilds` to be enabled.\n\n    .. versionadded:: 2.0\n\n    :param payload: The raw event payload data.\n    :type payload: :class:`RawThreadUpdateEvent`\n\n.. function:: on_raw_thread_delete(payload)\n\n    Called whenever a thread is deleted. Unlike :func:`on_thread_delete` this\n    is called regardless of the thread being in the internal thread cache or not.\n\n    This requires :attr:`Intents.guilds` to be enabled.\n\n    .. versionadded:: 2.0\n\n    :param payload: The raw event payload data.\n    :type payload: :class:`RawThreadDeleteEvent`\n\n.. function:: on_thread_member_join(member)\n              on_thread_member_remove(member)\n\n    Called when a :class:`ThreadMember` leaves or joins a :class:`Thread`.\n\n    You can get the thread a member belongs in by accessing :attr:`ThreadMember.thread`.\n\n    This requires :attr:`Intents.members` to be enabled.\n\n    .. versionadded:: 2.0\n\n    :param member: The member who joined or left.\n    :type member: :class:`ThreadMember`\n\n.. function:: on_raw_thread_member_remove(payload)\n\n    Called when a :class:`ThreadMember` leaves a :class:`Thread`. Unlike :func:`on_thread_member_remove` this\n    is called regardless of the member being in the internal thread's members cache or not.\n\n    This requires :attr:`Intents.members` to be enabled.\n\n    .. versionadded:: 2.0\n\n    :param payload: The raw event payload data.\n    :type payload: :class:`RawThreadMembersUpdate`\n\nVoice\n~~~~~~\n\n.. function:: on_voice_state_update(member, before, after)\n\n    Called when a :class:`Member` changes their :class:`VoiceState`.\n\n    The following, but not limited to, examples illustrate when this event is called:\n\n    - A member joins a voice or stage channel.\n    - A member leaves a voice or stage channel.\n    - A member is muted or deafened by their own accord.\n    - A member is muted or deafened by a guild administrator.\n\n    This requires :attr:`Intents.voice_states` to be enabled.\n\n    :param member: The member whose voice states changed.\n    :type member: :class:`Member`\n    :param before: The voice state prior to the changes.\n    :type before: :class:`VoiceState`\n    :param after: The voice state after the changes.\n    :type after: :class:`VoiceState`\n\n.. _discord-api-utils:\n\nUtility Functions\n-----------------\n\n.. autofunction:: discord.utils.find\n\n.. autofunction:: discord.utils.get\n\n.. autofunction:: discord.utils.setup_logging\n\n.. autofunction:: discord.utils.maybe_coroutine\n\n.. autofunction:: discord.utils.snowflake_time\n\n.. autofunction:: discord.utils.time_snowflake\n\n.. autofunction:: discord.utils.oauth_url\n\n.. autofunction:: discord.utils.remove_markdown\n\n.. autofunction:: discord.utils.escape_markdown\n\n.. autofunction:: discord.utils.escape_mentions\n\n.. class:: ResolvedInvite\n\n    A data class which represents a resolved invite returned from :func:`discord.utils.resolve_invite`.\n\n    .. attribute:: code\n\n        The invite code.\n\n        :type: :class:`str`\n\n    ..  attribute:: event\n\n        The id of the scheduled event that the invite refers to.\n\n        :type: Optional[:class:`int`]\n\n.. autofunction:: discord.utils.resolve_invite\n\n.. autofunction:: discord.utils.resolve_template\n\n.. autofunction:: discord.utils.sleep_until\n\n.. autofunction:: discord.utils.utcnow\n\n.. autofunction:: discord.utils.format_dt\n\n.. autofunction:: discord.utils.as_chunks\n\n.. data:: MISSING\n    :module: discord.utils\n\n    A type safe sentinel used in the library to represent something as missing. Used to distinguish from ``None`` values.\n\n    .. versionadded:: 2.0\n\n.. _discord-api-enums:\n\nEnumerations\n-------------\n\nThe API provides some enumerations for certain types of strings to avoid the API\nfrom being stringly typed in case the strings change in the future.\n\nAll enumerations are subclasses of an internal class which mimics the behaviour\nof :class:`enum.Enum`.\n\n.. class:: ChannelType\n\n    Specifies the type of channel.\n\n    .. attribute:: text\n\n        A text channel.\n    .. attribute:: voice\n\n        A voice channel.\n    .. attribute:: private\n\n        A private text channel. Also called a direct message.\n    .. attribute:: group\n\n        A private group text channel.\n    .. attribute:: category\n\n        A category channel.\n    .. attribute:: news\n\n        A guild news channel.\n\n    .. attribute:: stage_voice\n\n        A guild stage voice channel.\n\n        .. versionadded:: 1.7\n\n    .. attribute:: news_thread\n\n        A news thread\n\n        .. versionadded:: 2.0\n\n    .. attribute:: public_thread\n\n        A public thread\n\n        .. versionadded:: 2.0\n\n    .. attribute:: private_thread\n\n        A private thread\n\n        .. versionadded:: 2.0\n\n    .. attribute:: forum\n\n        A forum channel.\n\n        .. versionadded:: 2.0\n\n    .. attribute:: media\n\n        A media channel.\n\n        .. versionadded:: 2.4\n\n.. class:: MessageType\n\n    Specifies the type of :class:`Message`. This is used to denote if a message\n    is to be interpreted as a system message or a regular message.\n\n    .. container:: operations\n\n      .. describe:: x == y\n\n          Checks if two messages are equal.\n      .. describe:: x != y\n\n          Checks if two messages are not equal.\n\n    .. attribute:: default\n\n        The default message type. This is the same as regular messages.\n    .. attribute:: recipient_add\n\n        The system message when a user is added to a group private\n        message or a thread.\n    .. attribute:: recipient_remove\n\n        The system message when a user is removed from a group private\n        message or a thread.\n    .. attribute:: call\n\n        The system message denoting call state, e.g. missed call, started call,\n        etc.\n    .. attribute:: channel_name_change\n\n        The system message denoting that a channel's name has been changed.\n    .. attribute:: channel_icon_change\n\n        The system message denoting that a channel's icon has been changed.\n    .. attribute:: pins_add\n\n        The system message denoting that a pinned message has been added to a channel.\n    .. attribute:: new_member\n\n        The system message denoting that a new member has joined a Guild.\n\n    .. attribute:: premium_guild_subscription\n\n        The system message denoting that a member has \"nitro boosted\" a guild.\n    .. attribute:: premium_guild_tier_1\n\n        The system message denoting that a member has \"nitro boosted\" a guild\n        and it achieved level 1.\n    .. attribute:: premium_guild_tier_2\n\n        The system message denoting that a member has \"nitro boosted\" a guild\n        and it achieved level 2.\n    .. attribute:: premium_guild_tier_3\n\n        The system message denoting that a member has \"nitro boosted\" a guild\n        and it achieved level 3.\n    .. attribute:: channel_follow_add\n\n        The system message denoting that an announcement channel has been followed.\n\n        .. versionadded:: 1.3\n    .. attribute:: guild_stream\n\n        The system message denoting that a member is streaming in the guild.\n\n        .. versionadded:: 1.7\n    .. attribute:: guild_discovery_disqualified\n\n        The system message denoting that the guild is no longer eligible for Server\n        Discovery.\n\n        .. versionadded:: 1.7\n    .. attribute:: guild_discovery_requalified\n\n        The system message denoting that the guild has become eligible again for Server\n        Discovery.\n\n        .. versionadded:: 1.7\n    .. attribute:: guild_discovery_grace_period_initial_warning\n\n        The system message denoting that the guild has failed to meet the Server\n        Discovery requirements for one week.\n\n        .. versionadded:: 1.7\n    .. attribute:: guild_discovery_grace_period_final_warning\n\n        The system message denoting that the guild has failed to meet the Server\n        Discovery requirements for 3 weeks in a row.\n\n        .. versionadded:: 1.7\n    .. attribute:: thread_created\n\n        The system message denoting that a thread has been created. This is only\n        sent if the thread has been created from an older message. The period of time\n        required for a message to be considered old cannot be relied upon and is up to\n        Discord.\n\n        .. versionadded:: 2.0\n    .. attribute:: reply\n\n        The system message denoting that the author is replying to a message.\n\n        .. versionadded:: 2.0\n    .. attribute:: chat_input_command\n\n        The system message denoting that a slash command was executed.\n\n        .. versionadded:: 2.0\n    .. attribute:: guild_invite_reminder\n\n        The system message sent as a reminder to invite people to the guild.\n\n        .. versionadded:: 2.0\n    .. attribute:: thread_starter_message\n\n        The system message denoting the message in the thread that is the one that started the\n        thread's conversation topic.\n\n        .. versionadded:: 2.0\n    .. attribute:: context_menu_command\n\n        The system message denoting that a context menu command was executed.\n\n        .. versionadded:: 2.0\n    .. attribute:: auto_moderation_action\n\n        The system message sent when an AutoMod rule is triggered. This is only\n        sent if the rule is configured to sent an alert when triggered.\n\n        .. versionadded:: 2.0\n    .. attribute:: role_subscription_purchase\n\n        The system message sent when a user purchases or renews a role subscription.\n\n        .. versionadded:: 2.2\n    .. attribute:: interaction_premium_upsell\n\n        The system message sent when a user is given an advertisement to purchase a premium tier for\n        an application during an interaction.\n\n        .. versionadded:: 2.2\n    .. attribute:: stage_start\n\n        The system message sent when the stage starts.\n\n        .. versionadded:: 2.2\n    .. attribute:: stage_end\n\n        The system message sent when the stage ends.\n\n        .. versionadded:: 2.2\n    .. attribute:: stage_speaker\n\n        The system message sent when the stage speaker changes.\n\n        .. versionadded:: 2.2\n    .. attribute:: stage_raise_hand\n\n        The system message sent when a user is requesting to speak by raising their hands.\n\n        .. versionadded:: 2.2\n    .. attribute:: stage_topic\n\n        The system message sent when the stage topic changes.\n\n        .. versionadded:: 2.2\n    .. attribute:: guild_application_premium_subscription\n\n        The system message sent when an application's premium subscription is purchased for the guild.\n\n        .. versionadded:: 2.2\n\n    .. attribute:: guild_incident_alert_mode_enabled\n\n        The system message sent when security actions is enabled.\n\n        .. versionadded:: 2.4\n\n    .. attribute:: guild_incident_alert_mode_disabled\n\n        The system message sent when security actions is disabled.\n\n        .. versionadded:: 2.4\n\n    .. attribute:: guild_incident_report_raid\n\n        The system message sent when a raid is reported.\n\n        .. versionadded:: 2.4\n\n    .. attribute:: guild_incident_report_false_alarm\n\n        The system message sent when a false alarm is reported.\n\n        .. versionadded:: 2.4\n\n.. class:: UserFlags\n\n    Represents Discord User flags.\n\n    .. attribute:: staff\n\n        The user is a Discord Employee.\n    .. attribute:: partner\n\n        The user is a Discord Partner.\n    .. attribute:: hypesquad\n\n        The user is a HypeSquad Events member.\n    .. attribute:: bug_hunter\n\n        The user is a Bug Hunter.\n    .. attribute:: mfa_sms\n\n        The user has SMS recovery for Multi Factor Authentication enabled.\n    .. attribute:: premium_promo_dismissed\n\n        The user has dismissed the Discord Nitro promotion.\n    .. attribute:: hypesquad_bravery\n\n        The user is a HypeSquad Bravery member.\n    .. attribute:: hypesquad_brilliance\n\n        The user is a HypeSquad Brilliance member.\n    .. attribute:: hypesquad_balance\n\n        The user is a HypeSquad Balance member.\n    .. attribute:: early_supporter\n\n        The user is an Early Supporter.\n    .. attribute:: team_user\n\n        The user is a Team User.\n    .. attribute:: system\n\n        The user is a system user (i.e. represents Discord officially).\n    .. attribute:: has_unread_urgent_messages\n\n        The user has an unread system message.\n    .. attribute:: bug_hunter_level_2\n\n        The user is a Bug Hunter Level 2.\n    .. attribute:: verified_bot\n\n        The user is a Verified Bot.\n    .. attribute:: verified_bot_developer\n\n        The user is an Early Verified Bot Developer.\n    .. attribute:: discord_certified_moderator\n\n        The user is a Moderator Programs Alumni.\n    .. attribute:: bot_http_interactions\n\n        The user is a bot that only uses HTTP interactions and is shown in the online member list.\n\n        .. versionadded:: 2.0\n    .. attribute:: spammer\n\n        The user is flagged as a spammer by Discord.\n\n        .. versionadded:: 2.0\n\n    .. attribute:: active_developer\n\n        The user is an active developer.\n\n        .. versionadded:: 2.1\n\n.. class:: ActivityType\n\n    Specifies the type of :class:`Activity`. This is used to check how to\n    interpret the activity itself.\n\n    .. attribute:: unknown\n\n        An unknown activity type. This should generally not happen.\n    .. attribute:: playing\n\n        A \"Playing\" activity type.\n    .. attribute:: streaming\n\n        A \"Streaming\" activity type.\n    .. attribute:: listening\n\n        A \"Listening\" activity type.\n    .. attribute:: watching\n\n        A \"Watching\" activity type.\n    .. attribute:: custom\n\n        A custom activity type.\n    .. attribute:: competing\n\n        A competing activity type.\n\n        .. versionadded:: 1.5\n\n.. class:: VerificationLevel\n\n    Specifies a :class:`Guild`\\'s verification level, which is the criteria in\n    which a member must meet before being able to send messages to the guild.\n\n    .. container:: operations\n\n        .. versionadded:: 2.0\n\n        .. describe:: x == y\n\n            Checks if two verification levels are equal.\n        .. describe:: x != y\n\n            Checks if two verification levels are not equal.\n        .. describe:: x > y\n\n            Checks if a verification level is higher than another.\n        .. describe:: x < y\n\n            Checks if a verification level is lower than another.\n        .. describe:: x >= y\n\n            Checks if a verification level is higher or equal to another.\n        .. describe:: x <= y\n\n            Checks if a verification level is lower or equal to another.\n\n    .. attribute:: none\n\n        No criteria set.\n    .. attribute:: low\n\n        Member must have a verified email on their Discord account.\n    .. attribute:: medium\n\n        Member must have a verified email and be registered on Discord for more\n        than five minutes.\n    .. attribute:: high\n\n        Member must have a verified email, be registered on Discord for more\n        than five minutes, and be a member of the guild itself for more than\n        ten minutes.\n    .. attribute:: highest\n\n        Member must have a verified phone on their Discord account.\n\n.. class:: NotificationLevel\n\n    Specifies whether a :class:`Guild` has notifications on for all messages or mentions only by default.\n\n    .. container:: operations\n\n        .. versionadded:: 2.0\n\n        .. describe:: x == y\n\n            Checks if two notification levels are equal.\n        .. describe:: x != y\n\n            Checks if two notification levels are not equal.\n        .. describe:: x > y\n\n            Checks if a notification level is higher than another.\n        .. describe:: x < y\n\n            Checks if a notification level is lower than another.\n        .. describe:: x >= y\n\n            Checks if a notification level is higher or equal to another.\n        .. describe:: x <= y\n\n            Checks if a notification level is lower or equal to another.\n\n    .. attribute:: all_messages\n\n        Members receive notifications for every message regardless of them being mentioned.\n    .. attribute:: only_mentions\n\n        Members receive notifications for messages they are mentioned in.\n\n.. class:: ContentFilter\n\n    Specifies a :class:`Guild`\\'s explicit content filter, which is the machine\n    learning algorithms that Discord uses to detect if an image contains\n    pornography or otherwise explicit content.\n\n    .. container:: operations\n\n        .. versionadded:: 2.0\n\n        .. describe:: x == y\n\n            Checks if two content filter levels are equal.\n        .. describe:: x != y\n\n            Checks if two content filter levels are not equal.\n        .. describe:: x > y\n\n            Checks if a content filter level is higher than another.\n        .. describe:: x < y\n\n            Checks if a content filter level is lower than another.\n        .. describe:: x >= y\n\n            Checks if a content filter level is higher or equal to another.\n        .. describe:: x <= y\n\n            Checks if a content filter level is lower or equal to another.\n\n    .. attribute:: disabled\n\n        The guild does not have the content filter enabled.\n    .. attribute:: no_role\n\n        The guild has the content filter enabled for members without a role.\n    .. attribute:: all_members\n\n        The guild has the content filter enabled for every member.\n\n.. class:: Status\n\n    Specifies a :class:`Member` 's status.\n\n    .. attribute:: online\n\n        The member is online.\n    .. attribute:: offline\n\n        The member is offline.\n    .. attribute:: idle\n\n        The member is idle.\n    .. attribute:: dnd\n\n        The member is \"Do Not Disturb\".\n    .. attribute:: do_not_disturb\n\n        An alias for :attr:`dnd`.\n    .. attribute:: invisible\n\n        The member is \"invisible\". In reality, this is only used when sending\n        a presence a la :meth:`Client.change_presence`. When you receive a\n        user's presence this will be :attr:`offline` instead.\n\n\n.. class:: AuditLogAction\n\n    Represents the type of action being done for a :class:`AuditLogEntry`\\,\n    which is retrievable via :meth:`Guild.audit_logs`.\n\n    .. attribute:: guild_update\n\n        The guild has updated. Things that trigger this include:\n\n        - Changing the guild vanity URL\n        - Changing the guild invite splash\n        - Changing the guild AFK channel or timeout\n        - Changing the guild voice server region\n        - Changing the guild icon, banner, or discovery splash\n        - Changing the guild moderation settings\n        - Changing things related to the guild widget\n\n        When this is the action, the type of :attr:`~AuditLogEntry.target` is\n        the :class:`Guild`.\n\n        Possible attributes for :class:`AuditLogDiff`:\n\n        - :attr:`~AuditLogDiff.afk_channel`\n        - :attr:`~AuditLogDiff.system_channel`\n        - :attr:`~AuditLogDiff.afk_timeout`\n        - :attr:`~AuditLogDiff.default_notifications`\n        - :attr:`~AuditLogDiff.explicit_content_filter`\n        - :attr:`~AuditLogDiff.mfa_level`\n        - :attr:`~AuditLogDiff.name`\n        - :attr:`~AuditLogDiff.owner`\n        - :attr:`~AuditLogDiff.splash`\n        - :attr:`~AuditLogDiff.discovery_splash`\n        - :attr:`~AuditLogDiff.icon`\n        - :attr:`~AuditLogDiff.banner`\n        - :attr:`~AuditLogDiff.vanity_url_code`\n        - :attr:`~AuditLogDiff.description`\n        - :attr:`~AuditLogDiff.preferred_locale`\n        - :attr:`~AuditLogDiff.prune_delete_days`\n        - :attr:`~AuditLogDiff.public_updates_channel`\n        - :attr:`~AuditLogDiff.rules_channel`\n        - :attr:`~AuditLogDiff.verification_level`\n        - :attr:`~AuditLogDiff.widget_channel`\n        - :attr:`~AuditLogDiff.widget_enabled`\n        - :attr:`~AuditLogDiff.premium_progress_bar_enabled`\n        - :attr:`~AuditLogDiff.system_channel_flags`\n\n    .. attribute:: channel_create\n\n        A new channel was created.\n\n        When this is the action, the type of :attr:`~AuditLogEntry.target` is\n        either a :class:`abc.GuildChannel` or :class:`Object` with an ID.\n\n        A more filled out object in the :class:`Object` case can be found\n        by using :attr:`~AuditLogEntry.after`.\n\n        Possible attributes for :class:`AuditLogDiff`:\n\n        - :attr:`~AuditLogDiff.name`\n        - :attr:`~AuditLogDiff.type`\n        - :attr:`~AuditLogDiff.overwrites`\n\n    .. attribute:: channel_update\n\n        A channel was updated. Things that trigger this include:\n\n        - The channel name or topic was changed\n        - The channel bitrate was changed\n\n        When this is the action, the type of :attr:`~AuditLogEntry.target` is\n        the :class:`abc.GuildChannel` or :class:`Object` with an ID.\n\n        A more filled out object in the :class:`Object` case can be found\n        by using :attr:`~AuditLogEntry.after` or :attr:`~AuditLogEntry.before`.\n\n        Possible attributes for :class:`AuditLogDiff`:\n\n        - :attr:`~AuditLogDiff.name`\n        - :attr:`~AuditLogDiff.type`\n        - :attr:`~AuditLogDiff.position`\n        - :attr:`~AuditLogDiff.overwrites`\n        - :attr:`~AuditLogDiff.topic`\n        - :attr:`~AuditLogDiff.bitrate`\n        - :attr:`~AuditLogDiff.rtc_region`\n        - :attr:`~AuditLogDiff.video_quality_mode`\n        - :attr:`~AuditLogDiff.default_auto_archive_duration`\n        - :attr:`~AuditLogDiff.nsfw`\n        - :attr:`~AuditLogDiff.slowmode_delay`\n        - :attr:`~AuditLogDiff.user_limit`\n\n    .. attribute:: channel_delete\n\n        A channel was deleted.\n\n        When this is the action, the type of :attr:`~AuditLogEntry.target` is\n        an :class:`Object` with an ID.\n\n        A more filled out object can be found by using the\n        :attr:`~AuditLogEntry.before` object.\n\n        Possible attributes for :class:`AuditLogDiff`:\n\n        - :attr:`~AuditLogDiff.name`\n        - :attr:`~AuditLogDiff.type`\n        - :attr:`~AuditLogDiff.overwrites`\n        - :attr:`~AuditLogDiff.flags`\n        - :attr:`~AuditLogDiff.nsfw`\n        - :attr:`~AuditLogDiff.slowmode_delay`\n\n    .. attribute:: overwrite_create\n\n        A channel permission overwrite was created.\n\n        When this is the action, the type of :attr:`~AuditLogEntry.target` is\n        the :class:`abc.GuildChannel` or :class:`Object` with an ID.\n\n        When this is the action, the type of :attr:`~AuditLogEntry.extra` is\n        either a :class:`Role` or :class:`Member`. If the object is not found\n        then it is a :class:`Object` with an ID being filled, a name, and a\n        ``type`` attribute set to either ``'role'`` or ``'member'`` to help\n        dictate what type of ID it is.\n\n        Possible attributes for :class:`AuditLogDiff`:\n\n        - :attr:`~AuditLogDiff.deny`\n        - :attr:`~AuditLogDiff.allow`\n        - :attr:`~AuditLogDiff.id`\n        - :attr:`~AuditLogDiff.type`\n\n    .. attribute:: overwrite_update\n\n        A channel permission overwrite was changed, this is typically\n        when the permission values change.\n\n        See :attr:`overwrite_create` for more information on how the\n        :attr:`~AuditLogEntry.target` and :attr:`~AuditLogEntry.extra` fields\n        are set.\n\n        Possible attributes for :class:`AuditLogDiff`:\n\n        - :attr:`~AuditLogDiff.deny`\n        - :attr:`~AuditLogDiff.allow`\n        - :attr:`~AuditLogDiff.id`\n        - :attr:`~AuditLogDiff.type`\n\n    .. attribute:: overwrite_delete\n\n        A channel permission overwrite was deleted.\n\n        See :attr:`overwrite_create` for more information on how the\n        :attr:`~AuditLogEntry.target` and :attr:`~AuditLogEntry.extra` fields\n        are set.\n\n        Possible attributes for :class:`AuditLogDiff`:\n\n        - :attr:`~AuditLogDiff.deny`\n        - :attr:`~AuditLogDiff.allow`\n        - :attr:`~AuditLogDiff.id`\n        - :attr:`~AuditLogDiff.type`\n\n    .. attribute:: kick\n\n        A member was kicked.\n\n        When this is the action, the type of :attr:`~AuditLogEntry.target` is\n        the :class:`User` or :class:`Object` who got kicked.\n\n        When this is the action, the type of :attr:`~AuditLogEntry.extra` is\n        set to an unspecified proxy object with one attribute:\n\n        - ``integration_type``: An optional string that denotes the type of integration that did the action.\n\n        When this is the action, :attr:`~AuditLogEntry.changes` is empty.\n\n    .. attribute:: member_prune\n\n        A member prune was triggered.\n\n        When this is the action, the type of :attr:`~AuditLogEntry.target` is\n        set to ``None``.\n\n        When this is the action, the type of :attr:`~AuditLogEntry.extra` is\n        set to an unspecified proxy object with two attributes:\n\n        - ``delete_member_days``: An integer specifying how far the prune was.\n        - ``members_removed``: An integer specifying how many members were removed.\n\n        When this is the action, :attr:`~AuditLogEntry.changes` is empty.\n\n    .. attribute:: ban\n\n        A member was banned.\n\n        When this is the action, the type of :attr:`~AuditLogEntry.target` is\n        the :class:`User` or :class:`Object` who got banned.\n\n        When this is the action, :attr:`~AuditLogEntry.changes` is empty.\n\n    .. attribute:: unban\n\n        A member was unbanned.\n\n        When this is the action, the type of :attr:`~AuditLogEntry.target` is\n        the :class:`User` or :class:`Object` who got unbanned.\n\n        When this is the action, :attr:`~AuditLogEntry.changes` is empty.\n\n    .. attribute:: member_update\n\n        A member has updated. This triggers in the following situations:\n\n        - A nickname was changed\n        - They were server muted or deafened (or it was undo'd)\n\n        When this is the action, the type of :attr:`~AuditLogEntry.target` is\n        the :class:`Member`, :class:`User`, or :class:`Object` who got updated.\n\n        Possible attributes for :class:`AuditLogDiff`:\n\n        - :attr:`~AuditLogDiff.nick`\n        - :attr:`~AuditLogDiff.mute`\n        - :attr:`~AuditLogDiff.deaf`\n        - :attr:`~AuditLogDiff.timed_out_until`\n\n    .. attribute:: member_role_update\n\n        A member's role has been updated. This triggers when a member\n        either gains a role or loses a role.\n\n        When this is the action, the type of :attr:`~AuditLogEntry.target` is\n        the :class:`Member`, :class:`User`, or :class:`Object` who got the role.\n\n        When this is the action, the type of :attr:`~AuditLogEntry.extra` is\n        set to an unspecified proxy object with one attribute:\n\n        - ``integration_type``: An optional string that denotes the type of integration that did the action.\n\n        Possible attributes for :class:`AuditLogDiff`:\n\n        - :attr:`~AuditLogDiff.roles`\n\n    .. attribute:: member_move\n\n        A member's voice channel has been updated. This triggers when a\n        member is moved to a different voice channel.\n\n        When this is the action, the type of :attr:`~AuditLogEntry.extra` is\n        set to an unspecified proxy object with two attributes:\n\n        - ``channel``: A :class:`TextChannel` or :class:`Object` with the channel ID where the members were moved.\n        - ``count``: An integer specifying how many members were moved.\n\n        .. versionadded:: 1.3\n\n    .. attribute:: member_disconnect\n\n        A member's voice state has changed. This triggers when a\n        member is force disconnected from voice.\n\n        When this is the action, the type of :attr:`~AuditLogEntry.extra` is\n        set to an unspecified proxy object with one attribute:\n\n        - ``count``: An integer specifying how many members were disconnected.\n\n        .. versionadded:: 1.3\n\n    .. attribute:: bot_add\n\n        A bot was added to the guild.\n\n        When this is the action, the type of :attr:`~AuditLogEntry.target` is\n        the :class:`Member`, :class:`User`, or :class:`Object` which was added to the guild.\n\n        .. versionadded:: 1.3\n\n    .. attribute:: role_create\n\n        A new role was created.\n\n        When this is the action, the type of :attr:`~AuditLogEntry.target` is\n        the :class:`Role` or a :class:`Object` with the ID.\n\n        Possible attributes for :class:`AuditLogDiff`:\n\n        - :attr:`~AuditLogDiff.colour`\n        - :attr:`~AuditLogDiff.mentionable`\n        - :attr:`~AuditLogDiff.hoist`\n        - :attr:`~AuditLogDiff.icon`\n        - :attr:`~AuditLogDiff.unicode_emoji`\n        - :attr:`~AuditLogDiff.name`\n        - :attr:`~AuditLogDiff.permissions`\n\n    .. attribute:: role_update\n\n        A role was updated. This triggers in the following situations:\n\n        - The name has changed\n        - The permissions have changed\n        - The colour has changed\n        - The role icon (or unicode emoji) has changed\n        - Its hoist/mentionable state has changed\n\n        When this is the action, the type of :attr:`~AuditLogEntry.target` is\n        the :class:`Role` or a :class:`Object` with the ID.\n\n        Possible attributes for :class:`AuditLogDiff`:\n\n        - :attr:`~AuditLogDiff.colour`\n        - :attr:`~AuditLogDiff.mentionable`\n        - :attr:`~AuditLogDiff.hoist`\n        - :attr:`~AuditLogDiff.icon`\n        - :attr:`~AuditLogDiff.unicode_emoji`\n        - :attr:`~AuditLogDiff.name`\n        - :attr:`~AuditLogDiff.permissions`\n\n    .. attribute:: role_delete\n\n        A role was deleted.\n\n        When this is the action, the type of :attr:`~AuditLogEntry.target` is\n        the :class:`Role` or a :class:`Object` with the ID.\n\n        Possible attributes for :class:`AuditLogDiff`:\n\n        - :attr:`~AuditLogDiff.colour`\n        - :attr:`~AuditLogDiff.mentionable`\n        - :attr:`~AuditLogDiff.hoist`\n        - :attr:`~AuditLogDiff.name`\n        - :attr:`~AuditLogDiff.permissions`\n\n    .. attribute:: invite_create\n\n        An invite was created.\n\n        When this is the action, the type of :attr:`~AuditLogEntry.target` is\n        the :class:`Invite` that was created.\n\n        Possible attributes for :class:`AuditLogDiff`:\n\n        - :attr:`~AuditLogDiff.max_age`\n        - :attr:`~AuditLogDiff.code`\n        - :attr:`~AuditLogDiff.temporary`\n        - :attr:`~AuditLogDiff.inviter`\n        - :attr:`~AuditLogDiff.channel`\n        - :attr:`~AuditLogDiff.uses`\n        - :attr:`~AuditLogDiff.max_uses`\n\n    .. attribute:: invite_update\n\n        An invite was updated.\n\n        When this is the action, the type of :attr:`~AuditLogEntry.target` is\n        the :class:`Invite` that was updated.\n\n    .. attribute:: invite_delete\n\n        An invite was deleted.\n\n        When this is the action, the type of :attr:`~AuditLogEntry.target` is\n        the :class:`Invite` that was deleted.\n\n        Possible attributes for :class:`AuditLogDiff`:\n\n        - :attr:`~AuditLogDiff.max_age`\n        - :attr:`~AuditLogDiff.code`\n        - :attr:`~AuditLogDiff.temporary`\n        - :attr:`~AuditLogDiff.inviter`\n        - :attr:`~AuditLogDiff.channel`\n        - :attr:`~AuditLogDiff.uses`\n        - :attr:`~AuditLogDiff.max_uses`\n\n    .. attribute:: webhook_create\n\n        A webhook was created.\n\n        When this is the action, the type of :attr:`~AuditLogEntry.target` is\n        the :class:`Object` with the webhook ID.\n\n        Possible attributes for :class:`AuditLogDiff`:\n\n        - :attr:`~AuditLogDiff.channel`\n        - :attr:`~AuditLogDiff.name`\n        - :attr:`~AuditLogDiff.type` (always set to ``1`` if so)\n\n    .. attribute:: webhook_update\n\n        A webhook was updated. This trigger in the following situations:\n\n        - The webhook name changed\n        - The webhook channel changed\n\n        When this is the action, the type of :attr:`~AuditLogEntry.target` is\n        the :class:`Object` with the webhook ID.\n\n        Possible attributes for :class:`AuditLogDiff`:\n\n        - :attr:`~AuditLogDiff.channel`\n        - :attr:`~AuditLogDiff.name`\n        - :attr:`~AuditLogDiff.avatar`\n\n    .. attribute:: webhook_delete\n\n        A webhook was deleted.\n\n        When this is the action, the type of :attr:`~AuditLogEntry.target` is\n        the :class:`Object` with the webhook ID.\n\n        Possible attributes for :class:`AuditLogDiff`:\n\n        - :attr:`~AuditLogDiff.channel`\n        - :attr:`~AuditLogDiff.name`\n        - :attr:`~AuditLogDiff.type` (always set to ``1`` if so)\n\n    .. attribute:: emoji_create\n\n        An emoji was created.\n\n        When this is the action, the type of :attr:`~AuditLogEntry.target` is\n        the :class:`Emoji` or :class:`Object` with the emoji ID.\n\n        Possible attributes for :class:`AuditLogDiff`:\n\n        - :attr:`~AuditLogDiff.name`\n\n    .. attribute:: emoji_update\n\n        An emoji was updated. This triggers when the name has changed.\n\n        When this is the action, the type of :attr:`~AuditLogEntry.target` is\n        the :class:`Emoji` or :class:`Object` with the emoji ID.\n\n        Possible attributes for :class:`AuditLogDiff`:\n\n        - :attr:`~AuditLogDiff.name`\n\n    .. attribute:: emoji_delete\n\n        An emoji was deleted.\n\n        When this is the action, the type of :attr:`~AuditLogEntry.target` is\n        the :class:`Object` with the emoji ID.\n\n        Possible attributes for :class:`AuditLogDiff`:\n\n        - :attr:`~AuditLogDiff.name`\n\n    .. attribute:: message_delete\n\n        A message was deleted by a moderator. Note that this\n        only triggers if the message was deleted by someone other than the author.\n\n        When this is the action, the type of :attr:`~AuditLogEntry.target` is\n        the :class:`Member`, :class:`User`, or :class:`Object` who had their message deleted.\n\n        When this is the action, the type of :attr:`~AuditLogEntry.extra` is\n        set to an unspecified proxy object with two attributes:\n\n        - ``count``: An integer specifying how many messages were deleted.\n        - ``channel``: A :class:`TextChannel` or :class:`Object` with the channel ID where the message got deleted.\n\n    .. attribute:: message_bulk_delete\n\n        Messages were bulk deleted by a moderator.\n\n        When this is the action, the type of :attr:`~AuditLogEntry.target` is\n        the :class:`TextChannel` or :class:`Object` with the ID of the channel that was purged.\n\n        When this is the action, the type of :attr:`~AuditLogEntry.extra` is\n        set to an unspecified proxy object with one attribute:\n\n        - ``count``: An integer specifying how many messages were deleted.\n\n        .. versionadded:: 1.3\n\n    .. attribute:: message_pin\n\n        A message was pinned in a channel.\n\n        When this is the action, the type of :attr:`~AuditLogEntry.target` is\n        the :class:`Member`, :class:`User`, or :class:`Object` who had their message pinned.\n\n        When this is the action, the type of :attr:`~AuditLogEntry.extra` is\n        set to an unspecified proxy object with two attributes:\n\n        - ``channel``: A :class:`TextChannel` or :class:`Object` with the channel ID where the message was pinned.\n        - ``message_id``: the ID of the message which was pinned.\n\n        .. versionadded:: 1.3\n\n    .. attribute:: message_unpin\n\n        A message was unpinned in a channel.\n\n        When this is the action, the type of :attr:`~AuditLogEntry.target` is\n        the :class:`Member`, :class:`User`, or :class:`Object` who had their message unpinned.\n\n        When this is the action, the type of :attr:`~AuditLogEntry.extra` is\n        set to an unspecified proxy object with two attributes:\n\n        - ``channel``: A :class:`TextChannel` or :class:`Object` with the channel ID where the message was unpinned.\n        - ``message_id``: the ID of the message which was unpinned.\n\n        .. versionadded:: 1.3\n\n    .. attribute:: integration_create\n\n        A guild integration was created.\n\n        When this is the action, the type of :attr:`~AuditLogEntry.target` is\n        a :class:`PartialIntegration` or :class:`Object` with the\n        integration ID of the integration which was created.\n\n        .. versionadded:: 1.3\n\n    .. attribute:: integration_update\n\n        A guild integration was updated.\n\n        When this is the action, the type of :attr:`~AuditLogEntry.target` is\n        a :class:`PartialIntegration` or :class:`Object` with the\n        integration ID of the integration which was updated.\n\n        .. versionadded:: 1.3\n\n    .. attribute:: integration_delete\n\n        A guild integration was deleted.\n\n        When this is the action, the type of :attr:`~AuditLogEntry.target` is\n        a :class:`PartialIntegration` or :class:`Object` with the\n        integration ID of the integration which was deleted.\n\n        .. versionadded:: 1.3\n\n    .. attribute:: stage_instance_create\n\n        A stage instance was started.\n\n        When this is the action, the type of :attr:`~AuditLogEntry.target` is\n        the :class:`StageInstance` or :class:`Object` with the ID of the stage\n        instance which was created.\n\n        Possible attributes for :class:`AuditLogDiff`:\n\n        - :attr:`~AuditLogDiff.topic`\n        - :attr:`~AuditLogDiff.privacy_level`\n\n        .. versionadded:: 2.0\n\n    .. attribute:: stage_instance_update\n\n        A stage instance was updated.\n\n        When this is the action, the type of :attr:`~AuditLogEntry.target` is\n        the :class:`StageInstance` or :class:`Object` with the ID of the stage\n        instance which was updated.\n\n        Possible attributes for :class:`AuditLogDiff`:\n\n        - :attr:`~AuditLogDiff.topic`\n        - :attr:`~AuditLogDiff.privacy_level`\n\n        .. versionadded:: 2.0\n\n    .. attribute:: stage_instance_delete\n\n        A stage instance was ended.\n\n        .. versionadded:: 2.0\n\n    .. attribute:: sticker_create\n\n        A sticker was created.\n\n        When this is the action, the type of :attr:`~AuditLogEntry.target` is\n        the :class:`GuildSticker` or :class:`Object` with the ID of the sticker\n        which was created.\n\n        Possible attributes for :class:`AuditLogDiff`:\n\n        - :attr:`~AuditLogDiff.name`\n        - :attr:`~AuditLogDiff.emoji`\n        - :attr:`~AuditLogDiff.type`\n        - :attr:`~AuditLogDiff.format_type`\n        - :attr:`~AuditLogDiff.description`\n        - :attr:`~AuditLogDiff.available`\n\n        .. versionadded:: 2.0\n\n    .. attribute:: sticker_update\n\n        A sticker was updated.\n\n        When this is the action, the type of :attr:`~AuditLogEntry.target` is\n        the :class:`GuildSticker` or :class:`Object` with the ID of the sticker\n        which was updated.\n\n        Possible attributes for :class:`AuditLogDiff`:\n\n        - :attr:`~AuditLogDiff.name`\n        - :attr:`~AuditLogDiff.emoji`\n        - :attr:`~AuditLogDiff.type`\n        - :attr:`~AuditLogDiff.format_type`\n        - :attr:`~AuditLogDiff.description`\n        - :attr:`~AuditLogDiff.available`\n\n        .. versionadded:: 2.0\n\n    .. attribute:: sticker_delete\n\n        A sticker was deleted.\n\n        When this is the action, the type of :attr:`~AuditLogEntry.target` is\n        the :class:`GuildSticker` or :class:`Object` with the ID of the sticker\n        which was updated.\n\n        Possible attributes for :class:`AuditLogDiff`:\n\n        - :attr:`~AuditLogDiff.name`\n        - :attr:`~AuditLogDiff.emoji`\n        - :attr:`~AuditLogDiff.type`\n        - :attr:`~AuditLogDiff.format_type`\n        - :attr:`~AuditLogDiff.description`\n        - :attr:`~AuditLogDiff.available`\n\n        .. versionadded:: 2.0\n\n    .. attribute:: scheduled_event_create\n\n        A scheduled event was created.\n\n        When this is the action, the type of :attr:`~AuditLogEntry.target` is\n        the :class:`ScheduledEvent` or :class:`Object` with the ID of the event\n        which was created.\n\n        Possible attributes for :class:`AuditLogDiff`:\n        - :attr:`~AuditLogDiff.name`\n        - :attr:`~AuditLogDiff.channel`\n        - :attr:`~AuditLogDiff.description`\n        - :attr:`~AuditLogDiff.privacy_level`\n        - :attr:`~AuditLogDiff.status`\n        - :attr:`~AuditLogDiff.entity_type`\n        - :attr:`~AuditLogDiff.cover_image`\n\n        .. versionadded:: 2.0\n\n    .. attribute:: scheduled_event_update\n\n        A scheduled event was created.\n\n        When this is the action, the type of :attr:`~AuditLogEntry.target` is\n        the :class:`ScheduledEvent` or :class:`Object` with the ID of the event\n        which was updated.\n\n        Possible attributes for :class:`AuditLogDiff`:\n        - :attr:`~AuditLogDiff.name`\n        - :attr:`~AuditLogDiff.channel`\n        - :attr:`~AuditLogDiff.description`\n        - :attr:`~AuditLogDiff.privacy_level`\n        - :attr:`~AuditLogDiff.status`\n        - :attr:`~AuditLogDiff.entity_type`\n        - :attr:`~AuditLogDiff.cover_image`\n\n        .. versionadded:: 2.0\n\n    .. attribute:: scheduled_event_delete\n\n        A scheduled event was created.\n\n        When this is the action, the type of :attr:`~AuditLogEntry.target` is\n        the :class:`ScheduledEvent` or :class:`Object` with the ID of the event\n        which was deleted.\n\n        Possible attributes for :class:`AuditLogDiff`:\n        - :attr:`~AuditLogDiff.name`\n        - :attr:`~AuditLogDiff.channel`\n        - :attr:`~AuditLogDiff.description`\n        - :attr:`~AuditLogDiff.privacy_level`\n        - :attr:`~AuditLogDiff.status`\n        - :attr:`~AuditLogDiff.entity_type`\n        - :attr:`~AuditLogDiff.cover_image`\n\n        .. versionadded:: 2.0\n\n    .. attribute:: thread_create\n\n        A thread was created.\n\n        When this is the action, the type of :attr:`~AuditLogEntry.target` is\n        the :class:`Thread` or :class:`Object` with the ID of the thread which\n        was created.\n\n        Possible attributes for :class:`AuditLogDiff`:\n\n        - :attr:`~AuditLogDiff.name`\n        - :attr:`~AuditLogDiff.archived`\n        - :attr:`~AuditLogDiff.locked`\n        - :attr:`~AuditLogDiff.auto_archive_duration`\n        - :attr:`~AuditLogDiff.invitable`\n\n        .. versionadded:: 2.0\n\n    .. attribute:: thread_update\n\n        A thread was updated.\n\n        When this is the action, the type of :attr:`~AuditLogEntry.target` is\n        the :class:`Thread` or :class:`Object` with the ID of the thread which\n        was updated.\n\n        Possible attributes for :class:`AuditLogDiff`:\n\n        - :attr:`~AuditLogDiff.name`\n        - :attr:`~AuditLogDiff.archived`\n        - :attr:`~AuditLogDiff.locked`\n        - :attr:`~AuditLogDiff.auto_archive_duration`\n        - :attr:`~AuditLogDiff.invitable`\n\n        .. versionadded:: 2.0\n\n    .. attribute:: thread_delete\n\n        A thread was deleted.\n\n        When this is the action, the type of :attr:`~AuditLogEntry.target` is\n        the :class:`Thread` or :class:`Object` with the ID of the thread which\n        was deleted.\n\n        Possible attributes for :class:`AuditLogDiff`:\n\n        - :attr:`~AuditLogDiff.name`\n        - :attr:`~AuditLogDiff.archived`\n        - :attr:`~AuditLogDiff.locked`\n        - :attr:`~AuditLogDiff.auto_archive_duration`\n        - :attr:`~AuditLogDiff.invitable`\n\n        .. versionadded:: 2.0\n\n    .. attribute:: app_command_permission_update\n\n        An application command or integrations application command permissions\n        were updated.\n\n        When this is the action, the type of :attr:`~AuditLogEntry.target` is\n        a :class:`PartialIntegration` for an integrations general permissions,\n        :class:`~discord.app_commands.AppCommand` for a specific commands permissions,\n        or :class:`Object` with the ID of the command or integration which\n        was updated.\n\n        When this is the action, the type of :attr:`~AuditLogEntry.extra` is\n        set to an :class:`PartialIntegration` or :class:`Object` with the ID of\n        application that command or integration belongs to.\n\n        Possible attributes for :class:`AuditLogDiff`:\n\n        - :attr:`~AuditLogDiff.app_command_permissions`\n\n        .. versionadded:: 2.0\n\n    .. attribute:: automod_rule_create\n\n        An automod rule was created.\n\n        When this is the action, the type of :attr:`~AuditLogEntry.target` is\n        a :class:`AutoModRule` or :class:`Object` with the ID of the automod\n        rule that was created.\n\n        Possible attributes for :class:`AuditLogDiff`:\n\n        - :attr:`~AuditLogDiff.name`\n        - :attr:`~AuditLogDiff.enabled`\n        - :attr:`~AuditLogDiff.event_type`\n        - :attr:`~AuditLogDiff.trigger_type`\n        - :attr:`~AuditLogDiff.trigger`\n        - :attr:`~AuditLogDiff.actions`\n        - :attr:`~AuditLogDiff.exempt_roles`\n        - :attr:`~AuditLogDiff.exempt_channels`\n\n        .. versionadded:: 2.0\n\n    .. attribute:: automod_rule_update\n\n        An automod rule was updated.\n\n        When this is the action, the type of :attr:`~AuditLogEntry.target` is\n        a :class:`AutoModRule` or :class:`Object` with the ID of the automod\n        rule that was created.\n\n        Possible attributes for :class:`AuditLogDiff`:\n\n        - :attr:`~AuditLogDiff.name`\n        - :attr:`~AuditLogDiff.enabled`\n        - :attr:`~AuditLogDiff.event_type`\n        - :attr:`~AuditLogDiff.trigger_type`\n        - :attr:`~AuditLogDiff.trigger`\n        - :attr:`~AuditLogDiff.actions`\n        - :attr:`~AuditLogDiff.exempt_roles`\n        - :attr:`~AuditLogDiff.exempt_channels`\n\n        .. versionadded:: 2.0\n\n    .. attribute:: automod_rule_delete\n\n        An automod rule was deleted.\n\n        When this is the action, the type of :attr:`~AuditLogEntry.target` is\n        a :class:`AutoModRule` or :class:`Object` with the ID of the automod\n        rule that was created.\n\n        Possible attributes for :class:`AuditLogDiff`:\n\n        - :attr:`~AuditLogDiff.name`\n        - :attr:`~AuditLogDiff.enabled`\n        - :attr:`~AuditLogDiff.event_type`\n        - :attr:`~AuditLogDiff.trigger_type`\n        - :attr:`~AuditLogDiff.trigger`\n        - :attr:`~AuditLogDiff.actions`\n        - :attr:`~AuditLogDiff.exempt_roles`\n        - :attr:`~AuditLogDiff.exempt_channels`\n\n        .. versionadded:: 2.0\n\n    .. attribute:: automod_block_message\n\n        An automod rule blocked a message from being sent.\n\n        When this is the action, the type of :attr:`~AuditLogEntry.target` is\n        a :class:`Member` with the ID of the person who triggered the automod rule.\n\n        When this is the action, the type of :attr:`~AuditLogEntry.extra` is\n        set to an unspecified proxy object with 3 attributes:\n\n        - ``automod_rule_name``: The name of the automod rule that was triggered.\n        - ``automod_rule_trigger_type``: A :class:`AutoModRuleTriggerType` representation of the rule type that was triggered.\n        - ``channel``: The channel in which the automod rule was triggered.\n\n        When this is the action, :attr:`AuditLogEntry.changes` is empty.\n\n        .. versionadded:: 2.0\n\n    .. attribute:: automod_flag_message\n\n        An automod rule flagged a message.\n\n        When this is the action, the type of :attr:`~AuditLogEntry.target` is\n        a :class:`Member` with the ID of the person who triggered the automod rule.\n\n        When this is the action, the type of :attr:`~AuditLogEntry.extra` is\n        set to an unspecified proxy object with 3 attributes:\n\n        - ``automod_rule_name``: The name of the automod rule that was triggered.\n        - ``automod_rule_trigger_type``: A :class:`AutoModRuleTriggerType` representation of the rule type that was triggered.\n        - ``channel``: The channel in which the automod rule was triggered.\n\n        When this is the action, :attr:`AuditLogEntry.changes` is empty.\n\n        .. versionadded:: 2.1\n\n    .. attribute:: automod_timeout_member\n\n        An automod rule timed-out a member.\n\n        When this is the action, the type of :attr:`~AuditLogEntry.target` is\n        a :class:`Member` with the ID of the person who triggered the automod rule.\n\n        When this is the action, the type of :attr:`~AuditLogEntry.extra` is\n        set to an unspecified proxy object with 3 attributes:\n\n        - ``automod_rule_name``: The name of the automod rule that was triggered.\n        - ``automod_rule_trigger_type``: A :class:`AutoModRuleTriggerType` representation of the rule type that was triggered.\n        - ``channel``: The channel in which the automod rule was triggered.\n\n        When this is the action, :attr:`AuditLogEntry.changes` is empty.\n\n        .. versionadded:: 2.1\n\n    .. attribute:: creator_monetization_request_created\n\n        A request to monetize the server was created.\n\n        .. versionadded:: 2.4\n\n    .. attribute:: creator_monetization_terms_accepted\n\n        The terms and conditions for creator monetization were accepted.\n\n        .. versionadded:: 2.4\n\n.. class:: AuditLogActionCategory\n\n    Represents the category that the :class:`AuditLogAction` belongs to.\n\n    This can be retrieved via :attr:`AuditLogEntry.category`.\n\n    .. attribute:: create\n\n        The action is the creation of something.\n\n    .. attribute:: delete\n\n        The action is the deletion of something.\n\n    .. attribute:: update\n\n        The action is the update of something.\n\n.. class:: TeamMembershipState\n\n    Represents the membership state of a team member retrieved through :func:`Client.application_info`.\n\n    .. versionadded:: 1.3\n\n    .. attribute:: invited\n\n        Represents an invited member.\n\n    .. attribute:: accepted\n\n        Represents a member currently in the team.\n\n.. class:: TeamMemberRole\n\n    Represents the type of role of a team member retrieved through :func:`Client.application_info`.\n\n    .. versionadded:: 2.4\n\n    .. attribute:: admin\n\n        The team member is an admin. This allows them to invite members to the team, access credentials, edit the application,\n        and do most things the owner can do. However they cannot do destructive actions.\n\n    .. attribute:: developer\n\n        The team member is a developer. This allows them to access information, like the client secret or public key.\n        They can also configure interaction endpoints or reset the bot token. Developers cannot invite anyone to the team\n        nor can they do destructive actions.\n\n    .. attribute:: read_only\n\n        The team member is a read-only member. This allows them to access information, but not edit anything.\n\n.. class:: WebhookType\n\n    Represents the type of webhook that can be received.\n\n    .. versionadded:: 1.3\n\n    .. attribute:: incoming\n\n        Represents a webhook that can post messages to channels with a token.\n\n    .. attribute:: channel_follower\n\n        Represents a webhook that is internally managed by Discord, used for following channels.\n\n    .. attribute:: application\n\n        Represents a webhook that is used for interactions or applications.\n\n        .. versionadded:: 2.0\n\n.. class:: ExpireBehaviour\n\n    Represents the behaviour the :class:`Integration` should perform\n    when a user's subscription has finished.\n\n    There is an alias for this called ``ExpireBehavior``.\n\n    .. versionadded:: 1.4\n\n    .. attribute:: remove_role\n\n        This will remove the :attr:`StreamIntegration.role` from the user\n        when their subscription is finished.\n\n    .. attribute:: kick\n\n        This will kick the user when their subscription is finished.\n\n.. class:: DefaultAvatar\n\n    Represents the default avatar of a Discord :class:`User`\n\n    .. attribute:: blurple\n\n        Represents the default avatar with the colour blurple.\n        See also :attr:`Colour.blurple`\n    .. attribute:: grey\n\n        Represents the default avatar with the colour grey.\n        See also :attr:`Colour.greyple`\n    .. attribute:: gray\n\n        An alias for :attr:`grey`.\n    .. attribute:: green\n\n        Represents the default avatar with the colour green.\n        See also :attr:`Colour.green`\n    .. attribute:: orange\n\n        Represents the default avatar with the colour orange.\n        See also :attr:`Colour.orange`\n    .. attribute:: red\n\n        Represents the default avatar with the colour red.\n        See also :attr:`Colour.red`\n    .. attribute:: pink\n\n        Represents the default avatar with the colour pink.\n        See also :attr:`Colour.pink`\n\n        .. versionadded:: 2.3\n\n.. class:: StickerType\n\n    Represents the type of sticker.\n\n    .. versionadded:: 2.0\n\n    .. attribute:: standard\n\n        Represents a standard sticker that all Nitro users can use.\n\n    .. attribute:: guild\n\n        Represents a custom sticker created in a guild.\n\n.. class:: StickerFormatType\n\n    Represents the type of sticker images.\n\n    .. versionadded:: 1.6\n\n    .. attribute:: png\n\n        Represents a sticker with a png image.\n\n    .. attribute:: apng\n\n        Represents a sticker with an apng image.\n\n    .. attribute:: lottie\n\n        Represents a sticker with a lottie image.\n\n    .. attribute:: gif\n\n        Represents a sticker with a gif image.\n\n        .. versionadded:: 2.2\n\n.. class:: InviteTarget\n\n    Represents the invite type for voice channel invites.\n\n    .. versionadded:: 2.0\n\n    .. attribute:: unknown\n\n        The invite doesn't target anyone or anything.\n\n    .. attribute:: stream\n\n        A stream invite that targets a user.\n\n    .. attribute:: embedded_application\n\n        A stream invite that targets an embedded application.\n\n.. class:: VideoQualityMode\n\n    Represents the camera video quality mode for voice channel participants.\n\n    .. versionadded:: 2.0\n\n    .. attribute:: auto\n\n        Represents auto camera video quality.\n\n    .. attribute:: full\n\n        Represents full camera video quality.\n\n.. class:: PrivacyLevel\n\n    Represents the privacy level of a stage instance or scheduled event.\n\n    .. versionadded:: 2.0\n\n    .. attribute:: guild_only\n\n       The stage instance or scheduled event is only accessible within the guild.\n\n.. class:: NSFWLevel\n\n    Represents the NSFW level of a guild.\n\n    .. versionadded:: 2.0\n\n    .. container:: operations\n\n        .. describe:: x == y\n\n            Checks if two NSFW levels are equal.\n        .. describe:: x != y\n\n            Checks if two NSFW levels are not equal.\n        .. describe:: x > y\n\n            Checks if a NSFW level is higher than another.\n        .. describe:: x < y\n\n            Checks if a NSFW level is lower than another.\n        .. describe:: x >= y\n\n            Checks if a NSFW level is higher or equal to another.\n        .. describe:: x <= y\n\n            Checks if a NSFW level is lower or equal to another.\n\n    .. attribute:: default\n\n        The guild has not been categorised yet.\n\n    .. attribute:: explicit\n\n        The guild contains NSFW content.\n\n    .. attribute:: safe\n\n        The guild does not contain any NSFW content.\n\n    .. attribute:: age_restricted\n\n        The guild may contain NSFW content.\n\n.. class:: Locale\n\n    Supported locales by Discord. Mainly used for application command localisation.\n\n    .. versionadded:: 2.0\n\n    .. attribute:: american_english\n\n        The ``en-US`` locale.\n\n    .. attribute:: british_english\n\n        The ``en-GB`` locale.\n\n    .. attribute:: bulgarian\n\n        The ``bg`` locale.\n\n    .. attribute:: chinese\n\n        The ``zh-CN`` locale.\n\n    .. attribute:: taiwan_chinese\n\n        The ``zh-TW`` locale.\n\n    .. attribute:: croatian\n\n        The ``hr`` locale.\n\n    .. attribute:: czech\n\n        The ``cs`` locale.\n\n    .. attribute:: indonesian\n\n        The ``id`` locale.\n\n        .. versionadded:: 2.2\n\n    .. attribute:: danish\n\n        The ``da`` locale.\n\n    .. attribute:: dutch\n\n        The ``nl`` locale.\n\n    .. attribute:: finnish\n\n        The ``fi`` locale.\n\n    .. attribute:: french\n\n        The ``fr`` locale.\n\n    .. attribute:: german\n\n        The ``de`` locale.\n\n    .. attribute:: greek\n\n        The ``el`` locale.\n\n    .. attribute:: hindi\n\n        The ``hi`` locale.\n\n    .. attribute:: hungarian\n\n        The ``hu`` locale.\n\n    .. attribute:: italian\n\n        The ``it`` locale.\n\n    .. attribute:: japanese\n\n        The ``ja`` locale.\n\n    .. attribute:: korean\n\n        The ``ko`` locale.\n\n    .. attribute:: latin_american_spanish\n\n        The ``es-419`` locale.\n\n        .. versionadded:: 2.4\n\n    .. attribute:: lithuanian\n\n        The ``lt`` locale.\n\n    .. attribute:: norwegian\n\n        The ``no`` locale.\n\n    .. attribute:: polish\n\n        The ``pl`` locale.\n\n    .. attribute:: brazil_portuguese\n\n        The ``pt-BR`` locale.\n\n    .. attribute:: romanian\n\n        The ``ro`` locale.\n\n    .. attribute:: russian\n\n        The ``ru`` locale.\n\n    .. attribute:: spain_spanish\n\n        The ``es-ES`` locale.\n\n    .. attribute:: swedish\n\n        The ``sv-SE`` locale.\n\n    .. attribute:: thai\n\n        The ``th`` locale.\n\n    .. attribute:: turkish\n\n        The ``tr`` locale.\n\n    .. attribute:: ukrainian\n\n        The ``uk`` locale.\n\n    .. attribute:: vietnamese\n\n        The ``vi`` locale.\n\n\n.. class:: MFALevel\n\n    Represents the Multi-Factor Authentication requirement level of a guild.\n\n    .. versionadded:: 2.0\n\n    .. container:: operations\n\n        .. describe:: x == y\n\n            Checks if two MFA levels are equal.\n        .. describe:: x != y\n\n            Checks if two MFA levels are not equal.\n        .. describe:: x > y\n\n            Checks if a MFA level is higher than another.\n        .. describe:: x < y\n\n            Checks if a MFA level is lower than another.\n        .. describe:: x >= y\n\n            Checks if a MFA level is higher or equal to another.\n        .. describe:: x <= y\n\n            Checks if a MFA level is lower or equal to another.\n\n    .. attribute:: disabled\n\n        The guild has no MFA requirement.\n\n    .. attribute:: require_2fa\n\n        The guild requires 2 factor authentication.\n\n.. class:: EntityType\n\n    Represents the type of entity that a scheduled event is for.\n\n    .. versionadded:: 2.0\n\n    .. attribute:: stage_instance\n\n        The scheduled event will occur in a stage instance.\n\n    .. attribute:: voice\n\n        The scheduled event will occur in a voice channel.\n\n    .. attribute:: external\n\n        The scheduled event will occur externally.\n\n.. class:: EventStatus\n\n    Represents the status of an event.\n\n    .. versionadded:: 2.0\n\n    .. attribute:: scheduled\n\n        The event is scheduled.\n\n    .. attribute:: active\n\n        The event is active.\n\n    .. attribute:: completed\n\n        The event has ended.\n\n    .. attribute:: cancelled\n\n        The event has been cancelled.\n\n    .. attribute:: canceled\n\n        An alias for :attr:`cancelled`.\n\n    .. attribute:: ended\n\n        An alias for :attr:`completed`.\n\n.. class:: AutoModRuleTriggerType\n\n    Represents the trigger type of an automod rule.\n\n    .. versionadded:: 2.0\n\n    .. attribute:: keyword\n\n        The rule will trigger when a keyword is mentioned.\n\n    .. attribute:: harmful_link\n\n        The rule will trigger when a harmful link is posted.\n\n    .. attribute:: spam\n\n        The rule will trigger when a spam message is posted.\n\n    .. attribute:: keyword_preset\n\n        The rule will trigger when something triggers based on the set keyword preset types.\n\n    .. attribute:: mention_spam\n\n        The rule will trigger when combined number of role and user mentions\n        is greater than the set limit.\n\n    .. attribute:: member_profile\n\n        The rule will trigger when a user's profile contains a keyword.\n\n        .. versionadded:: 2.4\n\n.. class:: AutoModRuleEventType\n\n    Represents the event type of an automod rule.\n\n    .. versionadded:: 2.0\n\n    .. attribute:: message_send\n\n        The rule will trigger when a message is sent.\n\n    .. attribute:: member_update\n\n        The rule will trigger when a member's profile is updated.\n\n        .. versionadded:: 2.4\n\n.. class:: AutoModRuleActionType\n\n    Represents the action type of an automod rule.\n\n    .. versionadded:: 2.0\n\n    .. attribute:: block_message\n\n        The rule will block a message from being sent.\n\n    .. attribute:: send_alert_message\n\n        The rule will send an alert message to a predefined channel.\n\n    .. attribute:: timeout\n\n        The rule will timeout a user.\n\n    .. attribute:: block_member_interactions\n\n        Similar to :attr:`timeout`, except the user will be timed out indefinitely.\n        This will request the user to edit it's profile.\n\n        .. versionadded:: 2.4\n\n.. class:: ForumLayoutType\n\n    Represents how a forum's posts are layed out in the client.\n\n    .. versionadded:: 2.2\n\n    .. attribute:: not_set\n\n        No default has been set, so it is up to the client to know how to lay it out.\n\n    .. attribute:: list_view\n\n        Displays posts as a list.\n\n    .. attribute:: gallery_view\n\n        Displays posts as a collection of tiles.\n\n\n.. class:: ForumOrderType\n\n    Represents how a forum's posts are sorted in the client.\n\n    .. versionadded:: 2.3\n\n    .. attribute:: latest_activity\n\n        Sort forum posts by activity.\n\n    .. attribute:: creation_date\n\n        Sort forum posts by creation time (from most recent to oldest).\n\n.. class:: SelectDefaultValueType\n\n    Represents the default value of a select menu.\n\n    .. versionadded:: 2.4\n\n    .. attribute:: user\n\n        The underlying type of the ID is a user.\n\n    .. attribute:: role\n\n        The underlying type of the ID is a role.\n\n    .. attribute:: channel\n\n        The underlying type of the ID is a channel or thread.\n\n\n.. class:: SKUType\n\n    Represents the type of a SKU.\n\n    .. versionadded:: 2.4\n\n    .. attribute:: durable\n\n        The SKU is a durable one-time purchase.\n\n    .. attribute:: consumable\n\n        The SKU is a consumable one-time purchase.\n\n    .. attribute:: subscription\n\n        The SKU is a recurring subscription.\n\n    .. attribute:: subscription_group\n\n        The SKU is a system-generated group which is created for each :attr:`SKUType.subscription`.\n\n\n.. class:: EntitlementType\n\n    Represents the type of an entitlement.\n\n    .. versionadded:: 2.4\n\n    .. attribute:: purchase\n\n        The entitlement was purchased by the user.\n\n    .. attribute:: premium_subscription\n\n        The entitlement is for a nitro subscription.\n\n    .. attribute:: developer_gift\n\n        The entitlement was gifted by the developer.\n\n    .. attribute:: test_mode_purchase\n\n        The entitlement was purchased by a developer in application test mode.\n\n    .. attribute:: free_purchase\n\n        The entitlement was granted, when the SKU was free.\n\n    .. attribute:: user_gift\n\n        The entitlement was gifted by a another user.\n\n    .. attribute:: premium_purchase\n\n        The entitlement was claimed for free by a nitro subscriber.\n\n    .. attribute:: application_subscription\n\n        The entitlement was purchased as an app subscription.\n\n\n.. class:: EntitlementOwnerType\n\n    Represents the type of an entitlement owner.\n\n    .. versionadded:: 2.4\n\n    .. attribute:: guild\n\n        The entitlement owner is a guild.\n\n    .. attribute:: user\n\n            The entitlement owner is a user.\n\n\n.. class:: PollLayoutType\n\n    Represents how a poll answers are shown.\n\n    .. versionadded:: 2.4\n\n    .. attribute:: default\n\n        The default layout.\n\n\n.. class:: InviteType\n\n    Represents the type of an invite.\n\n    .. versionadded:: 2.4\n\n    .. attribute:: guild\n\n        The invite is a guild invite.\n\n    .. attribute:: group_dm\n\n        The invite is a group DM invite.\n\n    .. attribute:: friend\n\n        The invite is a friend invite.\n\n\n.. class:: ReactionType\n\n    Represents the type of a reaction.\n\n    .. versionadded:: 2.4\n\n    .. attribute:: normal\n\n        A normal reaction.\n\n    .. attribute:: burst\n\n        A burst reaction, also known as a \"super reaction\".\n\n\n.. _discord-api-audit-logs:\n\nAudit Log Data\n----------------\n\nWorking with :meth:`Guild.audit_logs` is a complicated process with a lot of machinery\ninvolved. The library attempts to make it easy to use and friendly. In order to accomplish\nthis goal, it must make use of a couple of data classes that aid in this goal.\n\nAuditLogEntry\n~~~~~~~~~~~~~~~\n\n.. attributetable:: AuditLogEntry\n\n.. autoclass:: AuditLogEntry\n    :members:\n\nAuditLogChanges\n~~~~~~~~~~~~~~~~~\n\n.. attributetable:: AuditLogChanges\n\n.. class:: AuditLogChanges\n\n    An audit log change set.\n\n    .. attribute:: before\n\n        The old value. The attribute has the type of :class:`AuditLogDiff`.\n\n        Depending on the :class:`AuditLogActionCategory` retrieved by\n        :attr:`~AuditLogEntry.category`\\, the data retrieved by this\n        attribute differs:\n\n        +----------------------------------------+---------------------------------------------------+\n        |                Category                |                    Description                    |\n        +----------------------------------------+---------------------------------------------------+\n        | :attr:`~AuditLogActionCategory.create` | All attributes are set to ``None``.               |\n        +----------------------------------------+---------------------------------------------------+\n        | :attr:`~AuditLogActionCategory.delete` | All attributes are set the value before deletion. |\n        +----------------------------------------+---------------------------------------------------+\n        | :attr:`~AuditLogActionCategory.update` | All attributes are set the value before updating. |\n        +----------------------------------------+---------------------------------------------------+\n        | ``None``                               | No attributes are set.                            |\n        +----------------------------------------+---------------------------------------------------+\n\n    .. attribute:: after\n\n        The new value. The attribute has the type of :class:`AuditLogDiff`.\n\n        Depending on the :class:`AuditLogActionCategory` retrieved by\n        :attr:`~AuditLogEntry.category`\\, the data retrieved by this\n        attribute differs:\n\n        +----------------------------------------+--------------------------------------------------+\n        |                Category                |                   Description                    |\n        +----------------------------------------+--------------------------------------------------+\n        | :attr:`~AuditLogActionCategory.create` | All attributes are set to the created value      |\n        +----------------------------------------+--------------------------------------------------+\n        | :attr:`~AuditLogActionCategory.delete` | All attributes are set to ``None``               |\n        +----------------------------------------+--------------------------------------------------+\n        | :attr:`~AuditLogActionCategory.update` | All attributes are set the value after updating. |\n        +----------------------------------------+--------------------------------------------------+\n        | ``None``                               | No attributes are set.                           |\n        +----------------------------------------+--------------------------------------------------+\n\nAuditLogDiff\n~~~~~~~~~~~~~\n\n.. attributetable:: AuditLogDiff\n\n.. class:: AuditLogDiff\n\n    Represents an audit log \"change\" object. A change object has dynamic\n    attributes that depend on the type of action being done. Certain actions\n    map to certain attributes being set.\n\n    Note that accessing an attribute that does not match the specified action\n    will lead to an attribute error.\n\n    To get a list of attributes that have been set, you can iterate over\n    them. To see a list of all possible attributes that could be set based\n    on the action being done, check the documentation for :class:`AuditLogAction`,\n    otherwise check the documentation below for all attributes that are possible.\n\n    .. container:: operations\n\n        .. describe:: iter(diff)\n\n            Returns an iterator over (attribute, value) tuple of this diff.\n\n    .. attribute:: name\n\n        A name of something.\n\n        :type: :class:`str`\n\n    .. attribute:: guild\n\n        The guild of something.\n\n        :type: :class:`Guild`\n\n    .. attribute:: icon\n\n        A guild's or role's icon. See also :attr:`Guild.icon` or :attr:`Role.icon`.\n\n        :type: :class:`Asset`\n\n    .. attribute:: splash\n\n        The guild's invite splash. See also :attr:`Guild.splash`.\n\n        :type: :class:`Asset`\n\n    .. attribute:: discovery_splash\n\n        The guild's discovery splash. See also :attr:`Guild.discovery_splash`.\n\n        :type: :class:`Asset`\n\n    .. attribute:: banner\n\n        The guild's banner. See also :attr:`Guild.banner`.\n\n        :type: :class:`Asset`\n\n    .. attribute:: owner\n\n        The guild's owner. See also :attr:`Guild.owner`\n\n        :type: Union[:class:`Member`, :class:`User`]\n\n    .. attribute:: afk_channel\n\n        The guild's AFK channel.\n\n        If this could not be found, then it falls back to a :class:`Object`\n        with the ID being set.\n\n        See :attr:`Guild.afk_channel`.\n\n        :type: Union[:class:`VoiceChannel`, :class:`Object`]\n\n    .. attribute:: system_channel\n\n        The guild's system channel.\n\n        If this could not be found, then it falls back to a :class:`Object`\n        with the ID being set.\n\n        See :attr:`Guild.system_channel`.\n\n        :type: Union[:class:`TextChannel`, :class:`Object`]\n\n\n    .. attribute:: rules_channel\n\n        The guild's rules channel.\n\n        If this could not be found then it falls back to a :class:`Object`\n        with the ID being set.\n\n        See :attr:`Guild.rules_channel`.\n\n        :type: Union[:class:`TextChannel`, :class:`Object`]\n\n\n    .. attribute:: public_updates_channel\n\n        The guild's public updates channel.\n\n        If this could not be found then it falls back to a :class:`Object`\n        with the ID being set.\n\n        See :attr:`Guild.public_updates_channel`.\n\n        :type: Union[:class:`TextChannel`, :class:`Object`]\n\n    .. attribute:: afk_timeout\n\n        The guild's AFK timeout. See :attr:`Guild.afk_timeout`.\n\n        :type: :class:`int`\n\n    .. attribute:: mfa_level\n\n        The guild's MFA level. See :attr:`Guild.mfa_level`.\n\n        :type: :class:`MFALevel`\n\n    .. attribute:: widget_enabled\n\n        The guild's widget has been enabled or disabled.\n\n        :type: :class:`bool`\n\n    .. attribute:: widget_channel\n\n        The widget's channel.\n\n        If this could not be found then it falls back to a :class:`Object`\n        with the ID being set.\n\n        :type: Union[:class:`TextChannel`, :class:`Object`]\n\n    .. attribute:: verification_level\n\n        The guild's verification level.\n\n        See also :attr:`Guild.verification_level`.\n\n        :type: :class:`VerificationLevel`\n\n    .. attribute:: default_notifications\n\n        The guild's default notification level.\n\n        See also :attr:`Guild.default_notifications`.\n\n        :type: :class:`NotificationLevel`\n\n    .. attribute:: explicit_content_filter\n\n        The guild's content filter.\n\n        See also :attr:`Guild.explicit_content_filter`.\n\n        :type: :class:`ContentFilter`\n\n    .. attribute:: vanity_url_code\n\n        The guild's vanity URL.\n\n        See also :meth:`Guild.vanity_invite` and :meth:`Guild.edit`.\n\n        :type: :class:`str`\n\n    .. attribute:: position\n\n        The position of a :class:`Role` or :class:`abc.GuildChannel`.\n\n        :type: :class:`int`\n\n    .. attribute:: type\n\n        The type of channel, sticker, webhook or integration.\n\n        :type: Union[:class:`ChannelType`, :class:`StickerType`, :class:`WebhookType`, :class:`str`]\n\n    .. attribute:: topic\n\n        The topic of a :class:`TextChannel` or :class:`StageChannel`.\n\n        See also :attr:`TextChannel.topic` or :attr:`StageChannel.topic`.\n\n        :type: :class:`str`\n\n    .. attribute:: bitrate\n\n        The bitrate of a :class:`VoiceChannel`.\n\n        See also :attr:`VoiceChannel.bitrate`.\n\n        :type: :class:`int`\n\n    .. attribute:: overwrites\n\n        A list of permission overwrite tuples that represents a target and a\n        :class:`PermissionOverwrite` for said target.\n\n        The first element is the object being targeted, which can either\n        be a :class:`Member` or :class:`User` or :class:`Role`. If this object\n        is not found then it is a :class:`Object` with an ID being filled and\n        a ``type`` attribute set to either ``'role'`` or ``'member'`` to help\n        decide what type of ID it is.\n\n        :type: List[Tuple[target, :class:`PermissionOverwrite`]]\n\n    .. attribute:: privacy_level\n\n        The privacy level of the stage instance or scheduled event\n\n        :type: :class:`PrivacyLevel`\n\n    .. attribute:: roles\n\n        A list of roles being added or removed from a member.\n\n        If a role is not found then it is a :class:`Object` with the ID and name being\n        filled in.\n\n        :type: List[Union[:class:`Role`, :class:`Object`]]\n\n    .. attribute:: nick\n\n        The nickname of a member.\n\n        See also :attr:`Member.nick`\n\n        :type: Optional[:class:`str`]\n\n    .. attribute:: deaf\n\n        Whether the member is being server deafened.\n\n        See also :attr:`VoiceState.deaf`.\n\n        :type: :class:`bool`\n\n    .. attribute:: mute\n\n        Whether the member is being server muted.\n\n        See also :attr:`VoiceState.mute`.\n\n        :type: :class:`bool`\n\n    .. attribute:: permissions\n\n        The permissions of a role.\n\n        See also :attr:`Role.permissions`.\n\n        :type: :class:`Permissions`\n\n    .. attribute:: colour\n                   color\n\n        The colour of a role.\n\n        See also :attr:`Role.colour`\n\n        :type: :class:`Colour`\n\n    .. attribute:: hoist\n\n        Whether the role is being hoisted or not.\n\n        See also :attr:`Role.hoist`\n\n        :type: :class:`bool`\n\n    .. attribute:: mentionable\n\n        Whether the role is mentionable or not.\n\n        See also :attr:`Role.mentionable`\n\n        :type: :class:`bool`\n\n    .. attribute:: code\n\n        The invite's code.\n\n        See also :attr:`Invite.code`\n\n        :type: :class:`str`\n\n    .. attribute:: channel\n\n        A guild channel.\n\n        If the channel is not found then it is a :class:`Object` with the ID\n        being set. In some cases the channel name is also set.\n\n        :type: Union[:class:`abc.GuildChannel`, :class:`Object`]\n\n    .. attribute:: inviter\n\n        The user who created the invite.\n\n        See also :attr:`Invite.inviter`.\n\n        :type: Optional[:class:`User`]\n\n    .. attribute:: max_uses\n\n        The invite's max uses.\n\n        See also :attr:`Invite.max_uses`.\n\n        :type: :class:`int`\n\n    .. attribute:: uses\n\n        The invite's current uses.\n\n        See also :attr:`Invite.uses`.\n\n        :type: :class:`int`\n\n    .. attribute:: max_age\n\n        The invite's max age in seconds.\n\n        See also :attr:`Invite.max_age`.\n\n        :type: :class:`int`\n\n    .. attribute:: temporary\n\n        If the invite is a temporary invite.\n\n        See also :attr:`Invite.temporary`.\n\n        :type: :class:`bool`\n\n    .. attribute:: allow\n                   deny\n\n        The permissions being allowed or denied.\n\n        :type: :class:`Permissions`\n\n    .. attribute:: id\n\n        The ID of the object being changed.\n\n        :type: :class:`int`\n\n    .. attribute:: avatar\n\n        The avatar of a member.\n\n        See also :attr:`User.avatar`.\n\n        :type: :class:`Asset`\n\n    .. attribute:: slowmode_delay\n\n        The number of seconds members have to wait before\n        sending another message in the channel.\n\n        See also :attr:`TextChannel.slowmode_delay`.\n\n        :type: :class:`int`\n\n    .. attribute:: rtc_region\n\n        The region for the voice channel’s voice communication.\n        A value of ``None`` indicates automatic voice region detection.\n\n        See also :attr:`VoiceChannel.rtc_region`.\n\n        :type: :class:`str`\n\n    .. attribute:: video_quality_mode\n\n        The camera video quality for the voice channel's participants.\n\n        See also :attr:`VoiceChannel.video_quality_mode`.\n\n        :type: :class:`VideoQualityMode`\n\n    .. attribute:: format_type\n\n        The format type of a sticker being changed.\n\n        See also :attr:`GuildSticker.format`\n\n        :type: :class:`StickerFormatType`\n\n    .. attribute:: emoji\n\n        The name of the emoji that represents a sticker being changed.\n\n        See also :attr:`GuildSticker.emoji`.\n\n        :type: :class:`str`\n\n    .. attribute:: unicode_emoji\n\n        The unicode emoji that is used as an icon for the role being changed.\n\n        See also :attr:`Role.unicode_emoji`.\n\n        :type: :class:`str`\n\n    .. attribute:: description\n\n        The description of a guild, a sticker, or a scheduled event.\n\n        See also :attr:`Guild.description`, :attr:`GuildSticker.description`, or\n        :attr:`ScheduledEvent.description`.\n\n        :type: :class:`str`\n\n    .. attribute:: available\n\n        The availability of a sticker being changed.\n\n        See also :attr:`GuildSticker.available`\n\n        :type: :class:`bool`\n\n    .. attribute:: archived\n\n        The thread is now archived.\n\n        :type: :class:`bool`\n\n    .. attribute:: locked\n\n        The thread is being locked or unlocked.\n\n        :type: :class:`bool`\n\n    .. attribute:: auto_archive_duration\n\n        The thread's auto archive duration being changed.\n\n        See also :attr:`Thread.auto_archive_duration`\n\n        :type: :class:`int`\n\n    .. attribute:: default_auto_archive_duration\n\n        The default auto archive duration for newly created threads being changed.\n\n        :type: :class:`int`\n\n    .. attribute:: invitable\n\n        Whether non-moderators can add users to this private thread.\n\n        :type: :class:`bool`\n\n    .. attribute:: timed_out_until\n\n        Whether the user is timed out, and if so until when.\n\n        :type: Optional[:class:`datetime.datetime`]\n\n    .. attribute:: enable_emoticons\n\n        Integration emoticons were enabled or disabled.\n\n        See also :attr:`StreamIntegration.enable_emoticons`\n\n        :type: :class:`bool`\n\n    .. attribute:: expire_behaviour\n                   expire_behavior\n\n        The behaviour of expiring subscribers changed.\n\n        See also :attr:`StreamIntegration.expire_behaviour`\n\n        :type: :class:`ExpireBehaviour`\n\n    .. attribute:: expire_grace_period\n\n        The grace period before expiring subscribers changed.\n\n        See also :attr:`StreamIntegration.expire_grace_period`\n\n        :type: :class:`int`\n\n    .. attribute:: preferred_locale\n\n        The preferred locale for the guild changed.\n\n        See also :attr:`Guild.preferred_locale`\n\n        :type: :class:`Locale`\n\n    .. attribute:: prune_delete_days\n\n        The number of days after which inactive and role-unassigned members are kicked has been changed.\n\n        :type: :class:`int`\n\n    .. attribute:: status\n\n        The status of the scheduled event.\n\n        :type: :class:`EventStatus`\n\n    .. attribute:: entity_type\n\n        The type of entity this scheduled event is for.\n\n        :type: :class:`EntityType`\n\n    .. attribute:: cover_image\n\n        The scheduled event's cover image.\n\n        See also :attr:`ScheduledEvent.cover_image`.\n\n        :type: :class:`Asset`\n\n    .. attribute:: app_command_permissions\n\n        List of permissions for the app command.\n\n        :type: List[:class:`~discord.app_commands.AppCommandPermissions`]\n\n    .. attribute:: enabled\n\n        Whether the automod rule is active or not.\n\n        :type: :class:`bool`\n\n    .. attribute:: event_type\n\n        The event type for triggering the automod rule.\n\n        :type: :class:`AutoModRuleEventType`\n\n    .. attribute:: trigger_type\n\n        The trigger type for the automod rule.\n\n        :type: :class:`AutoModRuleTriggerType`\n\n    .. attribute:: trigger\n\n        The trigger for the automod rule.\n\n        .. note ::\n\n            The :attr:`~AutoModTrigger.type` of the trigger may be incorrect.\n            Some attributes such as :attr:`~AutoModTrigger.keyword_filter`, :attr:`~AutoModTrigger.regex_patterns`,\n            and :attr:`~AutoModTrigger.allow_list` will only have the added or removed values.\n\n        :type: :class:`AutoModTrigger`\n\n    .. attribute:: actions\n\n        The actions to take when an automod rule is triggered.\n\n        :type: List[AutoModRuleAction]\n\n    .. attribute:: exempt_roles\n\n        The list of roles that are exempt from the automod rule.\n\n        :type: List[Union[:class:`Role`, :class:`Object`]]\n\n    .. attribute:: exempt_channels\n\n        The list of channels or threads that are exempt from the automod rule.\n\n        :type: List[:class:`abc.GuildChannel`, :class:`Thread`, :class:`Object`]\n\n    .. attribute:: premium_progress_bar_enabled\n\n        The guild’s display setting to show boost progress bar.\n\n        :type: :class:`bool`\n\n    .. attribute:: system_channel_flags\n\n        The guild’s system channel settings.\n\n        See also :attr:`Guild.system_channel_flags`\n\n        :type: :class:`SystemChannelFlags`\n\n    .. attribute:: nsfw\n\n        Whether the channel is marked as “not safe for work” or “age restricted”.\n\n        :type: :class:`bool`\n\n    .. attribute:: user_limit\n\n        The channel’s limit for number of members that can be in a voice or stage channel.\n\n        See also :attr:`VoiceChannel.user_limit` and :attr:`StageChannel.user_limit`\n\n        :type: :class:`int`\n\n    .. attribute:: flags\n\n        The channel flags associated with this thread or forum post.\n\n        See also :attr:`ForumChannel.flags` and :attr:`Thread.flags`\n\n        :type: :class:`ChannelFlags`\n\n    .. attribute:: default_thread_slowmode_delay\n\n        The default slowmode delay for threads created in this text channel or forum.\n\n        See also :attr:`TextChannel.default_thread_slowmode_delay` and :attr:`ForumChannel.default_thread_slowmode_delay`\n\n        :type: :class:`int`\n\n    .. attribute:: applied_tags\n\n        The applied tags of a forum post.\n\n        See also :attr:`Thread.applied_tags`\n\n        :type: List[Union[:class:`ForumTag`, :class:`Object`]]\n\n    .. attribute:: available_tags\n\n        The available tags of a forum.\n\n        See also :attr:`ForumChannel.available_tags`\n\n        :type: Sequence[:class:`ForumTag`]\n\n    .. attribute:: default_reaction_emoji\n\n        The default_reaction_emoji for forum posts.\n\n        See also :attr:`ForumChannel.default_reaction_emoji`\n\n        :type: Optional[:class:`PartialEmoji`]\n\n.. this is currently missing the following keys: reason and application_id\n   I'm not sure how to port these\n\nWebhook Support\n------------------\n\ndiscord.py offers support for creating, editing, and executing webhooks through the :class:`Webhook` class.\n\nWebhook\n~~~~~~~~~\n\n.. attributetable:: Webhook\n\n.. autoclass:: Webhook()\n    :members:\n    :inherited-members:\n\nWebhookMessage\n~~~~~~~~~~~~~~~~\n\n.. attributetable:: WebhookMessage\n\n.. autoclass:: WebhookMessage()\n    :members:\n    :inherited-members:\n\nSyncWebhook\n~~~~~~~~~~~~\n\n.. attributetable:: SyncWebhook\n\n.. autoclass:: SyncWebhook()\n    :members:\n    :inherited-members:\n\nSyncWebhookMessage\n~~~~~~~~~~~~~~~~~~~\n\n.. attributetable:: SyncWebhookMessage\n\n.. autoclass:: SyncWebhookMessage()\n    :members:\n\n.. _discord_api_abcs:\n\nAbstract Base Classes\n-----------------------\n\nAn :term:`abstract base class` (also known as an ``abc``) is a class that models can inherit\nto get their behaviour. **Abstract base classes should not be instantiated**.\nThey are mainly there for usage with :func:`isinstance` and :func:`issubclass`\\.\n\nThis library has a module related to abstract base classes, in which all the ABCs are subclasses of\n:class:`typing.Protocol`.\n\nSnowflake\n~~~~~~~~~~\n\n.. attributetable:: discord.abc.Snowflake\n\n.. autoclass:: discord.abc.Snowflake()\n    :members:\n\nUser\n~~~~~\n\n.. attributetable:: discord.abc.User\n\n.. autoclass:: discord.abc.User()\n    :members:\n\nPrivateChannel\n~~~~~~~~~~~~~~~\n\n.. attributetable:: discord.abc.PrivateChannel\n\n.. autoclass:: discord.abc.PrivateChannel()\n    :members:\n\nGuildChannel\n~~~~~~~~~~~~~\n\n.. attributetable:: discord.abc.GuildChannel\n\n.. autoclass:: discord.abc.GuildChannel()\n    :members:\n\nMessageable\n~~~~~~~~~~~~\n\n.. attributetable:: discord.abc.Messageable\n\n.. autoclass:: discord.abc.Messageable()\n    :members:\n    :exclude-members: typing\n\n    .. automethod:: discord.abc.Messageable.typing\n        :async-with:\n\nConnectable\n~~~~~~~~~~~~\n\n.. attributetable:: discord.abc.Connectable\n\n.. autoclass:: discord.abc.Connectable()\n    :members:\n\n.. _discord_api_models:\n\nDiscord Models\n---------------\n\nModels are classes that are received from Discord and are not meant to be created by\nthe user of the library.\n\n.. danger::\n\n    The classes listed below are **not intended to be created by users** and are also\n    **read-only**.\n\n    For example, this means that you should not make your own :class:`User` instances\n    nor should you modify the :class:`User` instance yourself.\n\n    If you want to get one of these model classes instances they'd have to be through\n    the cache, and a common way of doing so is through the :func:`utils.find` function\n    or attributes of model classes that you receive from the events specified in the\n    :ref:`discord-api-events`.\n\n.. note::\n\n    Nearly all classes here have :ref:`py:slots` defined which means that it is\n    impossible to have dynamic attributes to the data classes.\n\n\nClientUser\n~~~~~~~~~~~~\n\n.. attributetable:: ClientUser\n\n.. autoclass:: ClientUser()\n    :members:\n    :inherited-members:\n\nUser\n~~~~~\n\n.. attributetable:: User\n\n.. autoclass:: User()\n    :members:\n    :inherited-members:\n    :exclude-members: typing\n\n    .. automethod:: typing\n        :async-with:\n\nAutoMod\n~~~~~~~\n\n.. attributetable:: AutoModRule\n\n.. autoclass:: AutoModRule()\n    :members:\n\n.. attributetable:: AutoModAction\n\n.. autoclass:: AutoModAction()\n    :members:\n\nAttachment\n~~~~~~~~~~~\n\n.. attributetable:: Attachment\n\n.. autoclass:: Attachment()\n    :members:\n\nAsset\n~~~~~\n\n.. attributetable:: Asset\n\n.. autoclass:: Asset()\n    :members:\n    :inherited-members:\n\nMessage\n~~~~~~~\n\n.. attributetable:: Message\n\n.. autoclass:: Message()\n    :members:\n    :inherited-members:\n\nDeletedReferencedMessage\n~~~~~~~~~~~~~~~~~~~~~~~~~\n\n.. attributetable:: DeletedReferencedMessage\n\n.. autoclass:: DeletedReferencedMessage()\n    :members:\n\n\nReaction\n~~~~~~~~~\n\n.. attributetable:: Reaction\n\n.. autoclass:: Reaction()\n    :members:\n\nGuild\n~~~~~~\n\n.. attributetable:: Guild\n\n.. autoclass:: Guild()\n    :members:\n\n.. class:: BanEntry\n\n    A namedtuple which represents a ban returned from :meth:`~Guild.bans`.\n\n    .. attribute:: reason\n\n        The reason this user was banned.\n\n        :type: Optional[:class:`str`]\n    .. attribute:: user\n\n        The :class:`User` that was banned.\n\n        :type: :class:`User`\n\n.. class:: BulkBanResult\n\n    A namedtuple which represents the result returned from :meth:`~Guild.bulk_ban`.\n\n    .. versionadded:: 2.4\n\n    .. attribute:: banned\n\n        The list of users that were banned. The inner :class:`Object` of the list\n        has the :attr:`Object.type` set to :class:`User`.\n\n        :type: List[:class:`Object`]\n    .. attribute:: failed\n\n        The list of users that could not be banned. The inner :class:`Object` of the list\n        has the :attr:`Object.type` set to :class:`User`.\n\n        :type: List[:class:`Object`]\n\n\nScheduledEvent\n~~~~~~~~~~~~~~\n\n.. attributetable:: ScheduledEvent\n\n.. autoclass:: ScheduledEvent()\n    :members:\n\n\nIntegration\n~~~~~~~~~~~~\n\n.. attributetable:: Integration\n\n.. autoclass:: Integration()\n    :members:\n\n.. attributetable:: IntegrationAccount\n\n.. autoclass:: IntegrationAccount()\n    :members:\n\n.. attributetable:: BotIntegration\n\n.. autoclass:: BotIntegration()\n    :members:\n\n.. attributetable:: IntegrationApplication\n\n.. autoclass:: IntegrationApplication()\n    :members:\n\n.. attributetable:: StreamIntegration\n\n.. autoclass:: StreamIntegration()\n    :members:\n\n.. attributetable:: PartialIntegration\n\n.. autoclass:: PartialIntegration()\n    :members:\n\nMember\n~~~~~~\n\n.. attributetable:: Member\n\n.. autoclass:: Member()\n    :members:\n    :inherited-members:\n    :exclude-members: typing\n\n    .. automethod:: typing\n        :async-with:\n\nSpotify\n~~~~~~~~\n\n.. attributetable:: Spotify\n\n.. autoclass:: Spotify()\n    :members:\n\nVoiceState\n~~~~~~~~~~~\n\n.. attributetable:: VoiceState\n\n.. autoclass:: VoiceState()\n    :members:\n\nEmoji\n~~~~~\n\n.. attributetable:: Emoji\n\n.. autoclass:: Emoji()\n    :members:\n    :inherited-members:\n\nPartialEmoji\n~~~~~~~~~~~~~~~~~~~~~~\n\n.. attributetable:: PartialEmoji\n\n.. autoclass:: PartialEmoji()\n    :members:\n    :inherited-members:\n\nRole\n~~~~~\n\n.. attributetable:: Role\n\n.. autoclass:: Role()\n    :members:\n\nRoleTags\n~~~~~~~~~~\n\n.. attributetable:: RoleTags\n\n.. autoclass:: RoleTags()\n    :members:\n\nPartialMessageable\n~~~~~~~~~~~~~~~~~~~~\n\n.. attributetable:: PartialMessageable\n\n.. autoclass:: PartialMessageable()\n    :members:\n    :inherited-members:\n\nTextChannel\n~~~~~~~~~~~~\n\n.. attributetable:: TextChannel\n\n.. autoclass:: TextChannel()\n    :members:\n    :inherited-members:\n    :exclude-members: typing\n\n    .. automethod:: typing\n        :async-with:\n\nForumChannel\n~~~~~~~~~~~~~\n\n.. attributetable:: ForumChannel\n\n.. autoclass:: ForumChannel()\n    :members:\n    :inherited-members:\n\nThread\n~~~~~~~~\n\n.. attributetable:: Thread\n\n.. autoclass:: Thread()\n    :members:\n    :inherited-members:\n    :exclude-members: typing\n\n    .. automethod:: typing\n        :async-with:\n\nThreadMember\n~~~~~~~~~~~~~\n\n.. attributetable:: ThreadMember\n\n.. autoclass:: ThreadMember()\n    :members:\n\nVoiceChannel\n~~~~~~~~~~~~~\n\n.. attributetable:: VoiceChannel\n\n.. autoclass:: VoiceChannel()\n    :members:\n    :inherited-members:\n\nStageChannel\n~~~~~~~~~~~~~\n\n.. attributetable:: StageChannel\n\n.. autoclass:: StageChannel()\n    :members:\n    :inherited-members:\n\n\nStageInstance\n~~~~~~~~~~~~~~\n\n.. attributetable:: StageInstance\n\n.. autoclass:: StageInstance()\n    :members:\n\nCategoryChannel\n~~~~~~~~~~~~~~~~~\n\n.. attributetable:: CategoryChannel\n\n.. autoclass:: CategoryChannel()\n    :members:\n    :inherited-members:\n\nDMChannel\n~~~~~~~~~\n\n.. attributetable:: DMChannel\n\n.. autoclass:: DMChannel()\n    :members:\n    :inherited-members:\n    :exclude-members: typing\n\n    .. automethod:: typing\n        :async-with:\n\nGroupChannel\n~~~~~~~~~~~~\n\n.. attributetable:: GroupChannel\n\n.. autoclass:: GroupChannel()\n    :members:\n    :inherited-members:\n    :exclude-members: typing\n\n    .. automethod:: typing\n        :async-with:\n\nPartialInviteGuild\n~~~~~~~~~~~~~~~~~~~\n\n.. attributetable:: PartialInviteGuild\n\n.. autoclass:: PartialInviteGuild()\n    :members:\n\nPartialInviteChannel\n~~~~~~~~~~~~~~~~~~~~~\n\n.. attributetable:: PartialInviteChannel\n\n.. autoclass:: PartialInviteChannel()\n    :members:\n\nInvite\n~~~~~~~\n\n.. attributetable:: Invite\n\n.. autoclass:: Invite()\n    :members:\n\nTemplate\n~~~~~~~~~\n\n.. attributetable:: Template\n\n.. autoclass:: Template()\n    :members:\n\nWelcomeScreen\n~~~~~~~~~~~~~~~\n\n.. attributetable:: WelcomeScreen\n\n.. autoclass:: WelcomeScreen()\n    :members:\n\nWelcomeChannel\n~~~~~~~~~~~~~~~\n\n.. attributetable:: WelcomeChannel\n\n.. autoclass:: WelcomeChannel()\n    :members:\n\nWidgetChannel\n~~~~~~~~~~~~~~~\n\n.. attributetable:: WidgetChannel\n\n.. autoclass:: WidgetChannel()\n    :members:\n\nWidgetMember\n~~~~~~~~~~~~~\n\n.. attributetable:: WidgetMember\n\n.. autoclass:: WidgetMember()\n    :members:\n    :inherited-members:\n\nWidget\n~~~~~~~\n\n.. attributetable:: Widget\n\n.. autoclass:: Widget()\n    :members:\n\nStickerPack\n~~~~~~~~~~~~~\n\n.. attributetable:: StickerPack\n\n.. autoclass:: StickerPack()\n    :members:\n\nStickerItem\n~~~~~~~~~~~~~\n\n.. attributetable:: StickerItem\n\n.. autoclass:: StickerItem()\n    :members:\n\nSticker\n~~~~~~~~~~~~~~~\n\n.. attributetable:: Sticker\n\n.. autoclass:: Sticker()\n    :members:\n\nStandardSticker\n~~~~~~~~~~~~~~~~\n\n.. attributetable:: StandardSticker\n\n.. autoclass:: StandardSticker()\n    :members:\n\nGuildSticker\n~~~~~~~~~~~~~\n\n.. attributetable:: GuildSticker\n\n.. autoclass:: GuildSticker()\n    :members:\n\nShardInfo\n~~~~~~~~~~~\n\n.. attributetable:: ShardInfo\n\n.. autoclass:: ShardInfo()\n    :members:\n\nSKU\n~~~~~~~~~~~\n\n.. attributetable:: SKU\n\n.. autoclass:: SKU()\n    :members:\n\nEntitlement\n~~~~~~~~~~~\n\n.. attributetable:: Entitlement\n\n.. autoclass:: Entitlement()\n    :members:\n\nRawMessageDeleteEvent\n~~~~~~~~~~~~~~~~~~~~~~~\n\n.. attributetable:: RawMessageDeleteEvent\n\n.. autoclass:: RawMessageDeleteEvent()\n    :members:\n\nRawBulkMessageDeleteEvent\n~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n.. attributetable:: RawBulkMessageDeleteEvent\n\n.. autoclass:: RawBulkMessageDeleteEvent()\n    :members:\n\nRawMessageUpdateEvent\n~~~~~~~~~~~~~~~~~~~~~~\n\n.. attributetable:: RawMessageUpdateEvent\n\n.. autoclass:: RawMessageUpdateEvent()\n    :members:\n\nRawReactionActionEvent\n~~~~~~~~~~~~~~~~~~~~~~~\n\n.. attributetable:: RawReactionActionEvent\n\n.. autoclass:: RawReactionActionEvent()\n    :members:\n\nRawReactionClearEvent\n~~~~~~~~~~~~~~~~~~~~~~\n\n.. attributetable:: RawReactionClearEvent\n\n.. autoclass:: RawReactionClearEvent()\n    :members:\n\nRawReactionClearEmojiEvent\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n.. attributetable:: RawReactionClearEmojiEvent\n\n.. autoclass:: RawReactionClearEmojiEvent()\n    :members:\n\nRawIntegrationDeleteEvent\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n.. attributetable:: RawIntegrationDeleteEvent\n\n.. autoclass:: RawIntegrationDeleteEvent()\n    :members:\n\nRawThreadUpdateEvent\n~~~~~~~~~~~~~~~~~~~~~~\n\n.. attributetable:: RawThreadUpdateEvent\n\n.. autoclass:: RawThreadUpdateEvent()\n    :members:\n\nRawThreadMembersUpdate\n~~~~~~~~~~~~~~~~~~~~~~\n\n.. attributetable:: RawThreadMembersUpdate\n\n.. autoclass:: RawThreadMembersUpdate()\n    :members:\n\nRawThreadDeleteEvent\n~~~~~~~~~~~~~~~~~~~~~~\n\n.. attributetable:: RawThreadDeleteEvent\n\n.. autoclass:: RawThreadDeleteEvent()\n    :members:\n\nRawTypingEvent\n~~~~~~~~~~~~~~~~\n\n.. attributetable:: RawTypingEvent\n\n.. autoclass:: RawTypingEvent()\n    :members:\n\nRawMemberRemoveEvent\n~~~~~~~~~~~~~~~~~~~~~~\n\n.. attributetable:: RawMemberRemoveEvent\n\n.. autoclass:: RawMemberRemoveEvent()\n    :members:\n\nRawAppCommandPermissionsUpdateEvent\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n.. attributetable:: RawAppCommandPermissionsUpdateEvent\n\n.. autoclass:: RawAppCommandPermissionsUpdateEvent()\n    :members:\n\nRawPollVoteActionEvent\n~~~~~~~~~~~~~~~~~~~~~~\n\n.. attributetable:: RawPollVoteActionEvent\n\n.. autoclass:: RawPollVoteActionEvent()\n    :members:\n\nPartialWebhookGuild\n~~~~~~~~~~~~~~~~~~~~\n\n.. attributetable:: PartialWebhookGuild\n\n.. autoclass:: PartialWebhookGuild()\n    :members:\n\nPartialWebhookChannel\n~~~~~~~~~~~~~~~~~~~~~~~\n\n.. attributetable:: PartialWebhookChannel\n\n.. autoclass:: PartialWebhookChannel()\n    :members:\n\nPollAnswer\n~~~~~~~~~~\n\n.. attributetable:: PollAnswer\n\n.. autoclass:: PollAnswer()\n    :members:\n\n.. _discord_api_data:\n\nData Classes\n--------------\n\nSome classes are just there to be data containers, this lists them.\n\nUnlike :ref:`models <discord_api_models>` you are allowed to create\nmost of these yourself, even if they can also be used to hold attributes.\n\nNearly all classes here have :ref:`py:slots` defined which means that it is\nimpossible to have dynamic attributes to the data classes.\n\nThe only exception to this rule is :class:`Object`, which is made with\ndynamic attributes in mind.\n\n\nObject\n~~~~~~~\n\n.. attributetable:: Object\n\n.. autoclass:: Object\n    :members:\n\nEmbed\n~~~~~~\n\n.. attributetable:: Embed\n\n.. autoclass:: Embed\n    :members:\n\nAllowedMentions\n~~~~~~~~~~~~~~~~~\n\n.. attributetable:: AllowedMentions\n\n.. autoclass:: AllowedMentions\n    :members:\n\nMessageReference\n~~~~~~~~~~~~~~~~~\n\n.. attributetable:: MessageReference\n\n.. autoclass:: MessageReference\n    :members:\n\nPartialMessage\n~~~~~~~~~~~~~~~~~\n\n.. attributetable:: PartialMessage\n\n.. autoclass:: PartialMessage\n    :members:\n\nMessageApplication\n~~~~~~~~~~~~~~~~~~~\n\n.. attributetable:: MessageApplication\n\n.. autoclass:: MessageApplication\n    :members:\n\nRoleSubscriptionInfo\n~~~~~~~~~~~~~~~~~~~~~\n\n.. attributetable:: RoleSubscriptionInfo\n\n.. autoclass:: RoleSubscriptionInfo\n    :members:\n\nIntents\n~~~~~~~~~~\n\n.. attributetable:: Intents\n\n.. autoclass:: Intents\n    :members:\n\nMemberCacheFlags\n~~~~~~~~~~~~~~~~~~\n\n.. attributetable:: MemberCacheFlags\n\n.. autoclass:: MemberCacheFlags\n    :members:\n\nApplicationFlags\n~~~~~~~~~~~~~~~~~\n\n.. attributetable:: ApplicationFlags\n\n.. autoclass:: ApplicationFlags\n    :members:\n\nChannelFlags\n~~~~~~~~~~~~~~\n\n.. attributetable:: ChannelFlags\n\n.. autoclass:: ChannelFlags\n    :members:\n\nAutoModPresets\n~~~~~~~~~~~~~~\n\n.. attributetable:: AutoModPresets\n\n.. autoclass:: AutoModPresets\n    :members:\n\nAutoModRuleAction\n~~~~~~~~~~~~~~~~~\n\n.. attributetable:: AutoModRuleAction\n\n.. autoclass:: AutoModRuleAction\n    :members:\n\nAutoModTrigger\n~~~~~~~~~~~~~~\n\n.. attributetable:: AutoModTrigger\n\n.. autoclass:: AutoModTrigger\n    :members:\n\nFile\n~~~~~\n\n.. attributetable:: File\n\n.. autoclass:: File\n    :members:\n\nColour\n~~~~~~\n\n.. attributetable:: Colour\n\n.. autoclass:: Colour\n    :members:\n\nBaseActivity\n~~~~~~~~~~~~~~\n\n.. attributetable:: BaseActivity\n\n.. autoclass:: BaseActivity\n    :members:\n\nActivity\n~~~~~~~~~\n\n.. attributetable:: Activity\n\n.. autoclass:: Activity\n    :members:\n\nGame\n~~~~~\n\n.. attributetable:: Game\n\n.. autoclass:: Game\n    :members:\n\nStreaming\n~~~~~~~~~~~\n\n.. attributetable:: Streaming\n\n.. autoclass:: Streaming\n    :members:\n\nCustomActivity\n~~~~~~~~~~~~~~~\n\n.. attributetable:: CustomActivity\n\n.. autoclass:: CustomActivity\n    :members:\n\nPermissions\n~~~~~~~~~~~~\n\n.. attributetable:: Permissions\n\n.. autoclass:: Permissions\n    :members:\n\nPermissionOverwrite\n~~~~~~~~~~~~~~~~~~~~\n\n.. attributetable:: PermissionOverwrite\n\n.. autoclass:: PermissionOverwrite\n    :members:\n\nSystemChannelFlags\n~~~~~~~~~~~~~~~~~~~~\n\n.. attributetable:: SystemChannelFlags\n\n.. autoclass:: SystemChannelFlags\n    :members:\n\nMessageFlags\n~~~~~~~~~~~~\n\n.. attributetable:: MessageFlags\n\n.. autoclass:: MessageFlags\n    :members:\n\nPublicUserFlags\n~~~~~~~~~~~~~~~\n\n.. attributetable:: PublicUserFlags\n\n.. autoclass:: PublicUserFlags\n    :members:\n\nMemberFlags\n~~~~~~~~~~~~\n\n.. attributetable:: MemberFlags\n\n.. autoclass:: MemberFlags\n    :members:\n\nAttachmentFlags\n~~~~~~~~~~~~~~~~\n\n.. attributetable:: AttachmentFlags\n\n.. autoclass:: AttachmentFlags\n    :members:\n\nRoleFlags\n~~~~~~~~~~\n\n.. attributetable:: RoleFlags\n\n.. autoclass:: RoleFlags\n    :members:\n\nSKUFlags\n~~~~~~~~~~~\n\n.. attributetable:: SKUFlags\n\n.. autoclass:: SKUFlags()\n    :members:\n\nForumTag\n~~~~~~~~~\n\n.. attributetable:: ForumTag\n\n.. autoclass:: ForumTag\n    :members:\n\nPoll\n~~~~\n\n.. attributetable:: Poll\n\n.. autoclass:: Poll\n    :members:\n\nPollMedia\n~~~~~~~~~\n\n.. attributetable:: PollMedia\n\n.. autoclass:: PollMedia\n    :members:\n\n\nExceptions\n------------\n\nThe following exceptions are thrown by the library.\n\n.. autoexception:: DiscordException\n\n.. autoexception:: ClientException\n\n.. autoexception:: LoginFailure\n\n.. autoexception:: HTTPException\n    :members:\n\n.. autoexception:: RateLimited\n    :members:\n\n.. autoexception:: Forbidden\n\n.. autoexception:: NotFound\n\n.. autoexception:: DiscordServerError\n\n.. autoexception:: InvalidData\n\n.. autoexception:: GatewayNotFound\n\n.. autoexception:: ConnectionClosed\n\n.. autoexception:: PrivilegedIntentsRequired\n\n.. autoexception:: InteractionResponded\n\n.. autoexception:: discord.opus.OpusError\n\n.. autoexception:: discord.opus.OpusNotLoaded\n\nException Hierarchy\n~~~~~~~~~~~~~~~~~~~~~\n\n.. exception_hierarchy::\n\n    - :exc:`Exception`\n        - :exc:`DiscordException`\n            - :exc:`ClientException`\n                - :exc:`InvalidData`\n                - :exc:`LoginFailure`\n                - :exc:`ConnectionClosed`\n                - :exc:`PrivilegedIntentsRequired`\n                - :exc:`InteractionResponded`\n            - :exc:`GatewayNotFound`\n            - :exc:`HTTPException`\n                - :exc:`Forbidden`\n                - :exc:`NotFound`\n                - :exc:`DiscordServerError`\n                - :exc:`app_commands.CommandSyncFailure`\n            - :exc:`RateLimited`\n"
  },
  {
    "path": "docs/conf.py",
    "content": "#\n# discord.py documentation build configuration file, created by\n# sphinx-quickstart on Fri Aug 21 05:43:30 2015.\n#\n# This file is execfile()d with the current directory set to its\n# containing dir.\n#\n# Note that not all possible configuration values are present in this\n# autogenerated file.\n#\n# All configuration values have a default; values that are commented out\n# serve to show the default.\n\nimport logging\nimport sys\nimport os\nimport re\n\n# If extensions (or modules to document with autodoc) are in another directory,\n# add these directories to sys.path here. If the directory is relative to the\n# documentation root, use os.path.abspath to make it absolute, like shown here.\nsys.path.insert(0, os.path.abspath('..'))\nsys.path.append(os.path.abspath('extensions'))\n\n# -- General configuration ------------------------------------------------\n\n# If your documentation needs a minimal Sphinx version, state it here.\n#needs_sphinx = '1.0'\n\n# Add any Sphinx extension module names here, as strings. They can be\n# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom\n# ones.\nextensions = [\n    'builder',\n    'sphinx.ext.autodoc',\n    'sphinx.ext.extlinks',\n    'sphinx.ext.intersphinx',\n    'sphinx.ext.napoleon',\n    'sphinxcontrib_trio',\n    'sphinx_inline_tabs',\n    'details',\n    'exception_hierarchy',\n    'attributetable',\n    'resourcelinks',\n    'nitpick_file_ignorer',\n    'colour_preview',\n]\n\nautodoc_member_order = 'bysource'\nautodoc_typehints = 'none'\n# maybe consider this?\n# napoleon_attr_annotations = False\n\nextlinks = {\n    'issue': ('https://github.com/Rapptz/discord.py/issues/%s', 'GH-%s'),\n    'ddocs': ('https://discord.com/developers/docs/%s', None),\n}\n\n# Links used for cross-referencing stuff in other documentation\nintersphinx_mapping = {\n  'py': ('https://docs.python.org/3', None),\n  'aio': ('https://docs.aiohttp.org/en/stable/', None),\n  'req': ('https://requests.readthedocs.io/en/latest/', None)\n}\n\nrst_prolog = \"\"\"\n.. |coro| replace:: This function is a |coroutine_link|_.\n.. |maybecoro| replace:: This function *could be a* |coroutine_link|_.\n.. |coroutine_link| replace:: *coroutine*\n.. _coroutine_link: https://docs.python.org/3/library/asyncio-task.html#coroutine\n\"\"\"\n\n# Add any paths that contain templates here, relative to this directory.\ntemplates_path = ['_templates']\n\n# The suffix of source filenames.\nsource_suffix = '.rst'\n\n# The encoding of source files.\n#source_encoding = 'utf-8-sig'\n\n# The master toctree document.\nmaster_doc = 'index'\n\n# General information about the project.\nproject = 'discord.py'\ncopyright = '2015-present, Rapptz'\n\n# The version info for the project you're documenting, acts as replacement for\n# |version| and |release|, also used in various other places throughout the\n# built documents.\n#\n# The short X.Y version.\n\nversion = ''\nwith open('../discord/__init__.py') as f:\n    version = re.search(r'^__version__\\s*=\\s*[\\'\"]([^\\'\"]*)[\\'\"]', f.read(), re.MULTILINE).group(1)\n\n# The full version, including alpha/beta/rc tags.\nrelease = version\n\n# This assumes a tag is available for final releases\nbranch = 'master' if version.endswith('a') else 'v' + version\n\n# The language for content autogenerated by Sphinx. Refer to documentation\n# for a list of supported languages.\n#\n# This is also used if you do content translation via gettext catalogs.\n# Usually you set \"language\" from the command line for these cases.\nlanguage = None\n\nlocale_dirs = ['locale/']\ngettext_compact = False\n\n# There are two options for replacing |today|: either, you set today to some\n# non-false value, then it is used:\n#today = ''\n# Else, today_fmt is used as the format for a strftime call.\n#today_fmt = '%B %d, %Y'\n\n# List of patterns, relative to source directory, that match files and\n# directories to ignore when looking for source files.\nexclude_patterns = ['_build']\n\n# The reST default role (used for this markup: `text`) to use for all\n# documents.\n#default_role = None\n\n# If true, '()' will be appended to :func: etc. cross-reference text.\n#add_function_parentheses = True\n\n# If true, the current module name will be prepended to all description\n# unit titles (such as .. function::).\n#add_module_names = True\n\n# If true, sectionauthor and moduleauthor directives will be shown in the\n# output. They are ignored by default.\n#show_authors = False\n\n# The name of the Pygments (syntax highlighting) style to use.\npygments_style = 'friendly'\n\n# A list of ignored prefixes for module index sorting.\n#modindex_common_prefix = []\n\n# If true, keep warnings as \"system message\" paragraphs in the built documents.\n#keep_warnings = False\n\n\n# Nitpicky mode options\nnitpick_ignore_files = [\n  \"migrating_to_async\",\n  \"migrating_to_v1\",\n  \"migrating\",\n  \"whats_new\",\n]\n\n\n# Ignore warnings about inconsistent order and/or count of references in translated messages.\n# This makes no sense, different languages can have different word order...\ndef _i18n_warning_filter(record: logging.LogRecord) -> bool:\n  return not record.msg.startswith(\n    (\n      'inconsistent references in translated message',\n      'inconsistent term references in translated message',\n    )\n  )\n\n\n_i18n_logger = logging.getLogger('sphinx')\n_i18n_logger.addFilter(_i18n_warning_filter)\n\n# -- Options for HTML output ----------------------------------------------\n\nhtml_experimental_html5_writer = True\n\n# The theme to use for HTML and HTML Help pages.  See the documentation for\n# a list of builtin themes.\nhtml_theme = 'basic'\n\nhtml_context = {\n  'discord_invite': 'https://discord.gg/r3sSKJJ',\n  'discord_extensions': [\n    ('discord.ext.commands', 'ext/commands'),\n    ('discord.ext.tasks', 'ext/tasks'),\n  ],\n}\n\nresource_links = {\n  'discord': 'https://discord.gg/r3sSKJJ',\n  'issues': 'https://github.com/Rapptz/discord.py/issues',\n  'discussions': 'https://github.com/Rapptz/discord.py/discussions',\n  'examples': f'https://github.com/Rapptz/discord.py/tree/{branch}/examples',\n}\n\n# Theme options are theme-specific and customize the look and feel of a theme\n# further.  For a list of options available for each theme, see the\n# documentation.\n# html_theme_options = {\n# }\n\n# Add any paths that contain custom themes here, relative to this directory.\n#html_theme_path = []\n\n# The name for this set of Sphinx documents.  If None, it defaults to\n# \"<project> v<release> documentation\".\n#html_title = None\n\n# A shorter title for the navigation bar.  Default is the same as html_title.\n#html_short_title = None\n\n# The name of an image file (relative to this directory) to place at the top\n# of the sidebar.\n#html_logo = None\n\n# The name of an image file (within the static path) to use as favicon of the\n# docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32\n# pixels large.\nhtml_favicon = './images/discord_py_logo.ico'\n\n# Add any paths that contain custom static files (such as style sheets) here,\n# relative to this directory. They are copied after the builtin static files,\n# so a file named \"default.css\" will overwrite the builtin \"default.css\".\nhtml_static_path = ['_static']\n\n# Add any extra paths that contain custom files (such as robots.txt or\n# .htaccess) here, relative to this directory. These files are copied\n# directly to the root of the documentation.\n#html_extra_path = []\n\n# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,\n# using the given strftime format.\n#html_last_updated_fmt = '%b %d, %Y'\n\n# If true, SmartyPants will be used to convert quotes and dashes to\n# typographically correct entities.\n#html_use_smartypants = True\n\n# Custom sidebar templates, maps document names to template names.\n#html_sidebars = {}\n\n# Additional templates that should be rendered to pages, maps page names to\n# template names.\n#html_additional_pages = {}\n\n# If false, no module index is generated.\n#html_domain_indices = True\n\n# If false, no index is generated.\n#html_use_index = True\n\n# If true, the index is split into individual pages for each letter.\n#html_split_index = False\n\n# If true, links to the reST sources are added to the pages.\n#html_show_sourcelink = True\n\n# If true, \"Created using Sphinx\" is shown in the HTML footer. Default is True.\n#html_show_sphinx = True\n\n# If true, \"(C) Copyright ...\" is shown in the HTML footer. Default is True.\n#html_show_copyright = True\n\n# If true, an OpenSearch description file will be output, and all pages will\n# contain a <link> tag referring to it.  The value of this option must be the\n# base URL from which the finished HTML is served.\n#html_use_opensearch = ''\n\n# This is the file name suffix for HTML files (e.g. \".xhtml\").\n#html_file_suffix = None\n\n# Language to be used for generating the HTML full-text search index.\n# Sphinx supports the following languages:\n#   'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja'\n#   'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr'\n#html_search_language = 'en'\n\n# A dictionary with options for the search language support, empty by default.\n# Now only 'ja' uses this config value\n#html_search_options = {'type': 'default'}\n\n# The name of a javascript file (relative to the configuration directory) that\n# implements a search results scorer. If empty, the default will be used.\nhtml_search_scorer = '_static/scorer.js'\n\nhtml_js_files = [\n  'custom.js',\n  'settings.js',\n  'copy.js',\n  'sidebar.js'\n]\n\n# Output file base name for HTML help builder.\nhtmlhelp_basename = 'discord.pydoc'\n\n# -- Options for LaTeX output ---------------------------------------------\n\nlatex_elements = {\n# The paper size ('letterpaper' or 'a4paper').\n#'papersize': 'letterpaper',\n\n# The font size ('10pt', '11pt' or '12pt').\n#'pointsize': '10pt',\n\n# Additional stuff for the LaTeX preamble.\n#'preamble': '',\n\n# Latex figure (float) alignment\n#'figure_align': 'htbp',\n}\n\n# Grouping the document tree into LaTeX files. List of tuples\n# (source start file, target name, title,\n#  author, documentclass [howto, manual, or own class]).\nlatex_documents = [\n  ('index', 'discord.py.tex', 'discord.py Documentation',\n   'Rapptz', 'manual'),\n]\n\n# The name of an image file (relative to this directory) to place at the top of\n# the title page.\n#latex_logo = None\n\n# For \"manual\" documents, if this is true, then toplevel headings are parts,\n# not chapters.\n#latex_use_parts = False\n\n# If true, show page references after internal links.\n#latex_show_pagerefs = False\n\n# If true, show URL addresses after external links.\n#latex_show_urls = False\n\n# Documents to append as an appendix to all manuals.\n#latex_appendices = []\n\n# If false, no module index is generated.\n#latex_domain_indices = True\n\n\n# -- Options for manual page output ---------------------------------------\n\n# One entry per manual page. List of tuples\n# (source start file, name, description, authors, manual section).\nman_pages = [\n    ('index', 'discord.py', 'discord.py Documentation',\n     ['Rapptz'], 1)\n]\n\n# If true, show URL addresses after external links.\n#man_show_urls = False\n\n\n# -- Options for Texinfo output -------------------------------------------\n\n# Grouping the document tree into Texinfo files. List of tuples\n# (source start file, target name, title, author,\n#  dir menu entry, description, category)\ntexinfo_documents = [\n  ('index', 'discord.py', 'discord.py Documentation',\n   'Rapptz', 'discord.py', 'One line description of project.',\n   'Miscellaneous'),\n]\n\n# Documents to append as an appendix to all manuals.\n#texinfo_appendices = []\n\n# If false, no module index is generated.\n#texinfo_domain_indices = True\n\n# How to display URL addresses: 'footnote', 'no', or 'inline'.\n#texinfo_show_urls = 'footnote'\n\n# If true, do not generate a @detailmenu in the \"Top\" node's menu.\n#texinfo_no_detailmenu = False\n\ndef setup(app):\n  if app.config.language == 'ja':\n    app.config.intersphinx_mapping['py'] = ('https://docs.python.org/ja/3', None)\n    app.config.html_context['discord_invite'] = 'https://discord.gg/nXzj3dg'\n    app.config.resource_links['discord'] = 'https://discord.gg/nXzj3dg'\n"
  },
  {
    "path": "docs/crowdin.yml",
    "content": "# -*- coding: utf-8 -*-\n\nproject_id: \"362783\"\napi_token_env: CROWDIN_API_KEY\n\nfiles:\n  - source: /_build/locale/**/*.pot\n    translation: /locale/%two_letters_code%/LC_MESSAGES/%original_path%/%file_name%.po\n\n# You must use `crowdin download --all` for this project\n# I discovered after like an hour of debugging the Java CLI that `--all` actually means \"use server sources\"\n# Without this, crowdin tries to determine the mapping itself, and decides that because\n#  `/locale/ja/LC_MESSAGES/_build/locale/...` doesn't exist, that it won't download anything\n# There is no workaround for this. I tried. Trying to adjust the project base path just breaks things further.\n\n# Crowdin does the conflict resolution on its end. The process to update translations is thus:\n# - make gettext\n# - crowdin upload\n# - crowdin download --all\n# You must set ${CROWDIN_API_KEY} in the environment.\n# I will write an Actions workflow for this at a later date.\n"
  },
  {
    "path": "docs/discord.rst",
    "content": ":orphan:\n\n.. _discord-intro:\n\nCreating a Bot Account\n========================\n\nIn order to work with the library and the Discord API in general, we must first create a Discord Bot account.\n\nCreating a Bot account is a pretty straightforward process.\n\n1. Make sure you're logged on to the `Discord website <https://discord.com>`_.\n2. Navigate to the `application page <https://discord.com/developers/applications>`_\n3. Click on the \"New Application\" button.\n\n    .. image:: /images/discord_create_app_button.png\n        :alt: The new application button.\n\n4. Give the application a name and click \"Create\".\n\n    .. image:: /images/discord_create_app_form.png\n        :alt: The new application form filled in.\n\n5. Navigate to the \"Bot\" tab to configure it.\n6. Make sure that **Public Bot** is ticked if you want others to invite your bot.\n\n    - You should also make sure that **Require OAuth2 Code Grant** is unchecked unless you\n      are developing a service that needs it. If you're unsure, then **leave it unchecked**.\n\n    .. image:: /images/discord_bot_user_options.png\n        :alt: How the Bot User options should look like for most people.\n\n7. Copy the token using the \"Copy\" button.\n\n    - **This is not the Client Secret at the General Information page.**\n\n    .. warning::\n\n        It should be worth noting that this token is essentially your bot's\n        password. You should **never** share this with someone else. In doing so,\n        someone can log in to your bot and do malicious things, such as leaving\n        servers, ban all members inside a server, or pinging everyone maliciously.\n\n        The possibilities are endless, so **do not share this token.**\n\n        If you accidentally leaked your token, click the \"Regenerate\" button as soon\n        as possible. This revokes your old token and re-generates a new one.\n        Now you need to use the new token to login.\n\nAnd that's it. You now have a bot account and you can login with that token.\n\n.. _discord_invite_bot:\n\nInviting Your Bot\n-------------------\n\nSo you've made a Bot User but it's not actually in any server.\n\nIf you want to invite your bot you must create an invite URL for it.\n\n1. Make sure you're logged on to the `Discord website <https://discord.com>`_.\n2. Navigate to the `application page <https://discord.com/developers/applications>`_\n3. Click on your bot's page.\n4. Go to the \"OAuth2 > URL Generator\" tab.\n\n    .. image:: /images/discord_oauth2.png\n        :alt: How the OAuth2 page should look like.\n\n5. Tick the \"bot\" checkbox under \"scopes\".\n\n    .. image:: /images/discord_oauth2_scope.png\n        :alt: The scopes checkbox with \"bot\" ticked.\n\n6. Tick the permissions required for your bot to function under \"Bot Permissions\".\n\n    - Please be aware of the consequences of requiring your bot to have the \"Administrator\" permission.\n\n    - 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.\n\n    .. image:: /images/discord_oauth2_perms.png\n        :alt: The permission checkboxes with some permissions checked.\n\n7. 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\".\n\n\n.. note::\n\n    The person adding the bot needs \"Manage Server\" permissions to do so.\n\nIf you want to generate this URL dynamically at run-time inside your bot and using the\n:class:`discord.Permissions` interface, you can use :func:`discord.utils.oauth_url`.\n"
  },
  {
    "path": "docs/ext/commands/api.rst",
    "content": ".. currentmodule:: discord\n\nAPI Reference\n===============\n\nThe following section outlines the API of discord.py's command extension module.\n\n.. _ext_commands_api_bot:\n\nBots\n------\n\nBot\n~~~~\n\n.. attributetable:: discord.ext.commands.Bot\n\n.. autoclass:: discord.ext.commands.Bot\n    :members:\n    :inherited-members:\n    :exclude-members: after_invoke, before_invoke, check, check_once, command, event, group, hybrid_command, hybrid_group, listen\n\n    .. automethod:: Bot.after_invoke()\n        :decorator:\n\n    .. automethod:: Bot.before_invoke()\n        :decorator:\n\n    .. automethod:: Bot.check()\n        :decorator:\n\n    .. automethod:: Bot.check_once()\n        :decorator:\n\n    .. automethod:: Bot.command(*args, **kwargs)\n        :decorator:\n\n    .. automethod:: Bot.event()\n        :decorator:\n\n    .. automethod:: Bot.group(*args, **kwargs)\n        :decorator:\n\n    .. automethod:: Bot.hybrid_command(name=..., with_app_command=True, *args, **kwargs)\n        :decorator:\n\n    .. automethod:: Bot.hybrid_group(name=..., with_app_command=True, *args, **kwargs)\n        :decorator:\n\n    .. automethod:: Bot.listen(name=None)\n        :decorator:\n\nAutoShardedBot\n~~~~~~~~~~~~~~~~\n\n.. attributetable:: discord.ext.commands.AutoShardedBot\n\n.. autoclass:: discord.ext.commands.AutoShardedBot\n    :members:\n\nPrefix Helpers\n----------------\n\n.. autofunction:: discord.ext.commands.when_mentioned\n\n.. autofunction:: discord.ext.commands.when_mentioned_or\n\n.. _ext_commands_api_events:\n\nEvent Reference\n-----------------\n\nThese events function similar to :ref:`the regular events <discord-api-events>`, except they\nare custom to the command extension module.\n\n.. function:: discord.ext.commands.on_command_error(ctx, error)\n\n    An error handler that is called when an error is raised\n    inside a command either through user input error, check\n    failure, or an error in your own code.\n\n    A default one is provided (:meth:`.Bot.on_command_error`).\n\n    :param ctx: The invocation context.\n    :type ctx: :class:`.Context`\n    :param error: The error that was raised.\n    :type error: :class:`.CommandError` derived\n\n.. function:: discord.ext.commands.on_command(ctx)\n\n    An event that is called when a command is found and is about to be invoked.\n\n    This event is called regardless of whether the command itself succeeds via\n    error or completes.\n\n    :param ctx: The invocation context.\n    :type ctx: :class:`.Context`\n\n.. function:: discord.ext.commands.on_command_completion(ctx)\n\n    An event that is called when a command has completed its invocation.\n\n    This event is called only if the command succeeded, i.e. all checks have\n    passed and the user input it correctly.\n\n    :param ctx: The invocation context.\n    :type ctx: :class:`.Context`\n\n.. _ext_commands_api_command:\n\nCommands\n----------\n\nDecorators\n~~~~~~~~~~~~\n\n.. autofunction:: discord.ext.commands.command\n    :decorator:\n\n.. autofunction:: discord.ext.commands.group\n    :decorator:\n\n.. autofunction:: discord.ext.commands.hybrid_command\n    :decorator:\n\n.. autofunction:: discord.ext.commands.hybrid_group\n    :decorator:\n\n\nCommand\n~~~~~~~~~\n\n.. attributetable:: discord.ext.commands.Command\n\n.. autoclass:: discord.ext.commands.Command\n    :members:\n    :special-members: __call__\n    :exclude-members: after_invoke, before_invoke, error\n\n    .. automethod:: Command.after_invoke()\n        :decorator:\n\n    .. automethod:: Command.before_invoke()\n        :decorator:\n\n    .. automethod:: Command.error()\n        :decorator:\n\nGroup\n~~~~~~\n\n.. attributetable:: discord.ext.commands.Group\n\n.. autoclass:: discord.ext.commands.Group\n    :members:\n    :inherited-members:\n    :exclude-members: after_invoke, before_invoke, command, error, group\n\n    .. automethod:: Group.after_invoke()\n        :decorator:\n\n    .. automethod:: Group.before_invoke()\n        :decorator:\n\n    .. automethod:: Group.command(*args, **kwargs)\n        :decorator:\n\n    .. automethod:: Group.error()\n        :decorator:\n\n    .. automethod:: Group.group(*args, **kwargs)\n        :decorator:\n\nGroupMixin\n~~~~~~~~~~~\n\n.. attributetable:: discord.ext.commands.GroupMixin\n\n.. autoclass:: discord.ext.commands.GroupMixin\n    :members:\n    :exclude-members: command, group\n\n    .. automethod:: GroupMixin.command(*args, **kwargs)\n        :decorator:\n\n    .. automethod:: GroupMixin.group(*args, **kwargs)\n        :decorator:\n\nHybridCommand\n~~~~~~~~~~~~~~\n\n.. attributetable:: discord.ext.commands.HybridCommand\n\n.. autoclass:: discord.ext.commands.HybridCommand\n    :members:\n    :special-members: __call__\n    :exclude-members: after_invoke, autocomplete, before_invoke, error\n\n    .. automethod:: HybridCommand.after_invoke()\n        :decorator:\n\n    .. automethod:: HybridCommand.autocomplete(name)\n        :decorator:\n\n    .. automethod:: HybridCommand.before_invoke()\n        :decorator:\n\n    .. automethod:: HybridCommand.error()\n        :decorator:\n\nHybridGroup\n~~~~~~~~~~~~\n\n.. attributetable:: discord.ext.commands.HybridGroup\n\n.. autoclass:: discord.ext.commands.HybridGroup\n    :members:\n    :inherited-members:\n    :exclude-members: after_invoke, autocomplete, before_invoke, command, error, group\n\n    .. automethod:: HybridGroup.after_invoke()\n        :decorator:\n\n    .. automethod:: HybridGroup.autocomplete(name)\n        :decorator:\n\n    .. automethod:: HybridGroup.before_invoke()\n        :decorator:\n\n    .. automethod:: HybridGroup.command(*args, **kwargs)\n        :decorator:\n\n    .. automethod:: HybridGroup.error()\n        :decorator:\n\n    .. automethod:: HybridGroup.group(*args, **kwargs)\n        :decorator:\n\n\n.. _ext_commands_api_cogs:\n\nCogs\n------\n\nCog\n~~~~\n\n.. attributetable:: discord.ext.commands.Cog\n\n.. autoclass:: discord.ext.commands.Cog\n    :members:\n\nGroupCog\n~~~~~~~~~\n\n.. attributetable:: discord.ext.commands.GroupCog\n\n.. autoclass:: discord.ext.commands.GroupCog\n    :members: interaction_check\n\n\nCogMeta\n~~~~~~~~\n\n.. attributetable:: discord.ext.commands.CogMeta\n\n.. autoclass:: discord.ext.commands.CogMeta\n    :members:\n\n.. _ext_commands_help_command:\n\nHelp Commands\n---------------\n\nHelpCommand\n~~~~~~~~~~~~\n\n.. attributetable:: discord.ext.commands.HelpCommand\n\n.. autoclass:: discord.ext.commands.HelpCommand\n    :members:\n\nDefaultHelpCommand\n~~~~~~~~~~~~~~~~~~~\n\n.. attributetable:: discord.ext.commands.DefaultHelpCommand\n\n.. autoclass:: discord.ext.commands.DefaultHelpCommand\n    :members:\n    :exclude-members: send_bot_help, send_cog_help, send_group_help, send_command_help, prepare_help_command\n\nMinimalHelpCommand\n~~~~~~~~~~~~~~~~~~~\n\n.. attributetable:: discord.ext.commands.MinimalHelpCommand\n\n.. autoclass:: discord.ext.commands.MinimalHelpCommand\n    :members:\n    :exclude-members: send_bot_help, send_cog_help, send_group_help, send_command_help, prepare_help_command\n\nPaginator\n~~~~~~~~~~\n\n.. attributetable:: discord.ext.commands.Paginator\n\n.. autoclass:: discord.ext.commands.Paginator\n    :members:\n\nEnums\n------\n\n.. class:: BucketType\n    :module: discord.ext.commands\n\n    Specifies a type of bucket for, e.g. a cooldown.\n\n    .. attribute:: default\n\n        The default bucket operates on a global basis.\n    .. attribute:: user\n\n        The user bucket operates on a per-user basis.\n    .. attribute:: guild\n\n        The guild bucket operates on a per-guild basis.\n    .. attribute:: channel\n\n        The channel bucket operates on a per-channel basis.\n    .. attribute:: member\n\n        The member bucket operates on a per-member basis.\n    .. attribute:: category\n\n        The category bucket operates on a per-category basis.\n    .. attribute:: role\n\n        The role bucket operates on a per-role basis.\n\n        .. versionadded:: 1.3\n\n\n.. _ext_commands_api_checks:\n\nChecks\n-------\n\n.. autofunction:: discord.ext.commands.check(predicate)\n    :decorator:\n\n.. autofunction:: discord.ext.commands.check_any(*checks)\n    :decorator:\n\n.. autofunction:: discord.ext.commands.has_role(item)\n    :decorator:\n\n.. autofunction:: discord.ext.commands.has_permissions(**perms)\n    :decorator:\n\n.. autofunction:: discord.ext.commands.has_guild_permissions(**perms)\n    :decorator:\n\n.. autofunction:: discord.ext.commands.has_any_role(*items)\n    :decorator:\n\n.. autofunction:: discord.ext.commands.bot_has_role(item)\n    :decorator:\n\n.. autofunction:: discord.ext.commands.bot_has_permissions(**perms)\n    :decorator:\n\n.. autofunction:: discord.ext.commands.bot_has_guild_permissions(**perms)\n    :decorator:\n\n.. autofunction:: discord.ext.commands.bot_has_any_role(*items)\n    :decorator:\n\n.. autofunction:: discord.ext.commands.cooldown(rate, per, type=discord.ext.commands.BucketType.default)\n    :decorator:\n\n.. autofunction:: discord.ext.commands.dynamic_cooldown(cooldown, type)\n    :decorator:\n\n.. autofunction:: discord.ext.commands.max_concurrency(number, per=discord.ext.commands.BucketType.default, *, wait=False)\n    :decorator:\n\n.. autofunction:: discord.ext.commands.before_invoke(coro)\n    :decorator:\n\n.. autofunction:: discord.ext.commands.after_invoke(coro)\n    :decorator:\n\n.. autofunction:: discord.ext.commands.guild_only(,)\n    :decorator:\n\n.. autofunction:: discord.ext.commands.dm_only(,)\n    :decorator:\n\n.. autofunction:: discord.ext.commands.is_owner(,)\n    :decorator:\n\n.. autofunction:: discord.ext.commands.is_nsfw(,)\n    :decorator:\n\n.. _ext_commands_api_context:\n\nContext\n--------\n\n.. attributetable:: discord.ext.commands.Context\n\n.. autoclass:: discord.ext.commands.Context\n    :members:\n    :inherited-members:\n    :exclude-members: typing\n\n    .. automethod:: discord.ext.commands.Context.typing\n        :async-with:\n\n.. _ext_commands_api_converters:\n\nConverters\n------------\n\n.. attributetable:: discord.ext.commands.Converter\n\n.. autoclass:: discord.ext.commands.Converter\n    :members:\n\n.. attributetable:: discord.ext.commands.ObjectConverter\n\n.. autoclass:: discord.ext.commands.ObjectConverter\n    :members:\n\n.. attributetable:: discord.ext.commands.MemberConverter\n\n.. autoclass:: discord.ext.commands.MemberConverter\n    :members:\n\n.. attributetable:: discord.ext.commands.UserConverter\n\n.. autoclass:: discord.ext.commands.UserConverter\n    :members:\n\n.. attributetable:: discord.ext.commands.MessageConverter\n\n.. autoclass:: discord.ext.commands.MessageConverter\n    :members:\n\n.. attributetable:: discord.ext.commands.PartialMessageConverter\n\n.. autoclass:: discord.ext.commands.PartialMessageConverter\n    :members:\n\n.. attributetable:: discord.ext.commands.GuildChannelConverter\n\n.. autoclass:: discord.ext.commands.GuildChannelConverter\n    :members:\n\n.. attributetable:: discord.ext.commands.TextChannelConverter\n\n.. autoclass:: discord.ext.commands.TextChannelConverter\n    :members:\n\n.. attributetable:: discord.ext.commands.VoiceChannelConverter\n\n.. autoclass:: discord.ext.commands.VoiceChannelConverter\n    :members:\n\n.. attributetable:: discord.ext.commands.StageChannelConverter\n\n.. autoclass:: discord.ext.commands.StageChannelConverter\n    :members:\n\n.. attributetable:: discord.ext.commands.CategoryChannelConverter\n\n.. autoclass:: discord.ext.commands.CategoryChannelConverter\n    :members:\n\n.. attributetable:: discord.ext.commands.ForumChannelConverter\n\n.. autoclass:: discord.ext.commands.ForumChannelConverter\n    :members:\n\n.. attributetable:: discord.ext.commands.InviteConverter\n\n.. autoclass:: discord.ext.commands.InviteConverter\n    :members:\n\n.. attributetable:: discord.ext.commands.GuildConverter\n\n.. autoclass:: discord.ext.commands.GuildConverter\n    :members:\n\n.. attributetable:: discord.ext.commands.RoleConverter\n\n.. autoclass:: discord.ext.commands.RoleConverter\n    :members:\n\n.. attributetable:: discord.ext.commands.GameConverter\n\n.. autoclass:: discord.ext.commands.GameConverter\n    :members:\n\n.. attributetable:: discord.ext.commands.ColourConverter\n\n.. autoclass:: discord.ext.commands.ColourConverter\n    :members:\n\n.. attributetable:: discord.ext.commands.EmojiConverter\n\n.. autoclass:: discord.ext.commands.EmojiConverter\n    :members:\n\n.. attributetable:: discord.ext.commands.PartialEmojiConverter\n\n.. autoclass:: discord.ext.commands.PartialEmojiConverter\n    :members:\n\n.. attributetable:: discord.ext.commands.ThreadConverter\n\n.. autoclass:: discord.ext.commands.ThreadConverter\n    :members:\n\n.. attributetable:: discord.ext.commands.GuildStickerConverter\n\n.. autoclass:: discord.ext.commands.GuildStickerConverter\n    :members:\n\n.. attributetable:: discord.ext.commands.ScheduledEventConverter\n\n.. autoclass:: discord.ext.commands.ScheduledEventConverter\n    :members:\n\n.. attributetable:: discord.ext.commands.clean_content\n\n.. autoclass:: discord.ext.commands.clean_content\n    :members:\n\n.. attributetable:: discord.ext.commands.Greedy\n\n.. autoclass:: discord.ext.commands.Greedy()\n\n.. attributetable:: discord.ext.commands.Range\n\n.. autoclass:: discord.ext.commands.Range()\n\n.. autofunction:: discord.ext.commands.run_converters\n\nFlag Converter\n~~~~~~~~~~~~~~~\n\n.. attributetable:: discord.ext.commands.FlagConverter\n\n.. autoclass:: discord.ext.commands.FlagConverter\n    :members:\n\n.. attributetable:: discord.ext.commands.Flag\n\n.. autoclass:: discord.ext.commands.Flag()\n    :members:\n\n.. autofunction:: discord.ext.commands.flag\n\n\nDefaults\n--------\n\n.. attributetable:: discord.ext.commands.Parameter\n\n.. autoclass:: discord.ext.commands.Parameter()\n    :members:\n\n.. autofunction:: discord.ext.commands.parameter\n\n.. autofunction:: discord.ext.commands.param\n\n.. data:: discord.ext.commands.Author\n\n    A default :class:`Parameter` which returns the :attr:`~.Context.author` for this context.\n\n    .. versionadded:: 2.0\n\n.. data:: discord.ext.commands.CurrentChannel\n\n    A default :class:`Parameter` which returns the :attr:`~.Context.channel` for this context.\n\n    .. versionadded:: 2.0\n\n.. data:: discord.ext.commands.CurrentGuild\n\n    A default :class:`Parameter` which returns the :attr:`~.Context.guild` for this context. This will never be ``None``. If the command is called in a DM context then :exc:`~discord.ext.commands.NoPrivateMessage` is raised to the error handlers.\n\n    .. versionadded:: 2.0\n\n.. _ext_commands_api_errors:\n\nExceptions\n-----------\n\n.. autoexception:: discord.ext.commands.CommandError\n    :members:\n\n.. autoexception:: discord.ext.commands.ConversionError\n    :members:\n\n.. autoexception:: discord.ext.commands.MissingRequiredArgument\n    :members:\n\n.. autoexception:: discord.ext.commands.MissingRequiredAttachment\n    :members:\n\n.. autoexception:: discord.ext.commands.ArgumentParsingError\n    :members:\n\n.. autoexception:: discord.ext.commands.UnexpectedQuoteError\n    :members:\n\n.. autoexception:: discord.ext.commands.InvalidEndOfQuotedStringError\n    :members:\n\n.. autoexception:: discord.ext.commands.ExpectedClosingQuoteError\n    :members:\n\n.. autoexception:: discord.ext.commands.BadArgument\n    :members:\n\n.. autoexception:: discord.ext.commands.BadUnionArgument\n    :members:\n\n.. autoexception:: discord.ext.commands.BadLiteralArgument\n    :members:\n\n.. autoexception:: discord.ext.commands.PrivateMessageOnly\n    :members:\n\n.. autoexception:: discord.ext.commands.NoPrivateMessage\n    :members:\n\n.. autoexception:: discord.ext.commands.CheckFailure\n    :members:\n\n.. autoexception:: discord.ext.commands.CheckAnyFailure\n    :members:\n\n.. autoexception:: discord.ext.commands.CommandNotFound\n    :members:\n\n.. autoexception:: discord.ext.commands.DisabledCommand\n    :members:\n\n.. autoexception:: discord.ext.commands.CommandInvokeError\n    :members:\n\n.. autoexception:: discord.ext.commands.TooManyArguments\n    :members:\n\n.. autoexception:: discord.ext.commands.UserInputError\n    :members:\n\n.. autoexception:: discord.ext.commands.CommandOnCooldown\n    :members:\n\n.. autoexception:: discord.ext.commands.MaxConcurrencyReached\n    :members:\n\n.. autoexception:: discord.ext.commands.NotOwner\n    :members:\n\n.. autoexception:: discord.ext.commands.MessageNotFound\n    :members:\n\n.. autoexception:: discord.ext.commands.MemberNotFound\n    :members:\n\n.. autoexception:: discord.ext.commands.GuildNotFound\n    :members:\n\n.. autoexception:: discord.ext.commands.UserNotFound\n    :members:\n\n.. autoexception:: discord.ext.commands.ChannelNotFound\n    :members:\n\n.. autoexception:: discord.ext.commands.ChannelNotReadable\n    :members:\n\n.. autoexception:: discord.ext.commands.ThreadNotFound\n    :members:\n\n.. autoexception:: discord.ext.commands.BadColourArgument\n    :members:\n\n.. autoexception:: discord.ext.commands.RoleNotFound\n    :members:\n\n.. autoexception:: discord.ext.commands.BadInviteArgument\n    :members:\n\n.. autoexception:: discord.ext.commands.EmojiNotFound\n    :members:\n\n.. autoexception:: discord.ext.commands.PartialEmojiConversionFailure\n    :members:\n\n.. autoexception:: discord.ext.commands.GuildStickerNotFound\n    :members:\n\n.. autoexception:: discord.ext.commands.ScheduledEventNotFound\n    :members:\n\n.. autoexception:: discord.ext.commands.BadBoolArgument\n    :members:\n\n.. autoexception:: discord.ext.commands.RangeError\n    :members:\n\n.. autoexception:: discord.ext.commands.MissingPermissions\n    :members:\n\n.. autoexception:: discord.ext.commands.BotMissingPermissions\n    :members:\n\n.. autoexception:: discord.ext.commands.MissingRole\n    :members:\n\n.. autoexception:: discord.ext.commands.BotMissingRole\n    :members:\n\n.. autoexception:: discord.ext.commands.MissingAnyRole\n    :members:\n\n.. autoexception:: discord.ext.commands.BotMissingAnyRole\n    :members:\n\n.. autoexception:: discord.ext.commands.NSFWChannelRequired\n    :members:\n\n.. autoexception:: discord.ext.commands.FlagError\n    :members:\n\n.. autoexception:: discord.ext.commands.BadFlagArgument\n    :members:\n\n.. autoexception:: discord.ext.commands.MissingFlagArgument\n    :members:\n\n.. autoexception:: discord.ext.commands.TooManyFlags\n    :members:\n\n.. autoexception:: discord.ext.commands.MissingRequiredFlag\n    :members:\n\n.. autoexception:: discord.ext.commands.ExtensionError\n    :members:\n\n.. autoexception:: discord.ext.commands.ExtensionAlreadyLoaded\n    :members:\n\n.. autoexception:: discord.ext.commands.ExtensionNotLoaded\n    :members:\n\n.. autoexception:: discord.ext.commands.NoEntryPointError\n    :members:\n\n.. autoexception:: discord.ext.commands.ExtensionFailed\n    :members:\n\n.. autoexception:: discord.ext.commands.ExtensionNotFound\n    :members:\n\n.. autoexception:: discord.ext.commands.CommandRegistrationError\n    :members:\n\n.. autoexception:: discord.ext.commands.HybridCommandError\n    :members:\n\n\nException Hierarchy\n~~~~~~~~~~~~~~~~~~~~~\n\n.. exception_hierarchy::\n\n    - :exc:`~.DiscordException`\n        - :exc:`~.commands.CommandError`\n            - :exc:`~.commands.ConversionError`\n            - :exc:`~.commands.UserInputError`\n                - :exc:`~.commands.MissingRequiredArgument`\n                - :exc:`~.commands.MissingRequiredAttachment`\n                - :exc:`~.commands.TooManyArguments`\n                - :exc:`~.commands.BadArgument`\n                    - :exc:`~.commands.MessageNotFound`\n                    - :exc:`~.commands.MemberNotFound`\n                    - :exc:`~.commands.GuildNotFound`\n                    - :exc:`~.commands.UserNotFound`\n                    - :exc:`~.commands.ChannelNotFound`\n                    - :exc:`~.commands.ChannelNotReadable`\n                    - :exc:`~.commands.BadColourArgument`\n                    - :exc:`~.commands.RoleNotFound`\n                    - :exc:`~.commands.BadInviteArgument`\n                    - :exc:`~.commands.EmojiNotFound`\n                    - :exc:`~.commands.GuildStickerNotFound`\n                    - :exc:`~.commands.ScheduledEventNotFound`\n                    - :exc:`~.commands.PartialEmojiConversionFailure`\n                    - :exc:`~.commands.BadBoolArgument`\n                    - :exc:`~.commands.RangeError`\n                    - :exc:`~.commands.ThreadNotFound`\n                    - :exc:`~.commands.FlagError`\n                        - :exc:`~.commands.BadFlagArgument`\n                        - :exc:`~.commands.MissingFlagArgument`\n                        - :exc:`~.commands.TooManyFlags`\n                        - :exc:`~.commands.MissingRequiredFlag`\n                - :exc:`~.commands.BadUnionArgument`\n                - :exc:`~.commands.BadLiteralArgument`\n                - :exc:`~.commands.ArgumentParsingError`\n                    - :exc:`~.commands.UnexpectedQuoteError`\n                    - :exc:`~.commands.InvalidEndOfQuotedStringError`\n                    - :exc:`~.commands.ExpectedClosingQuoteError`\n            - :exc:`~.commands.CommandNotFound`\n            - :exc:`~.commands.CheckFailure`\n                - :exc:`~.commands.CheckAnyFailure`\n                - :exc:`~.commands.PrivateMessageOnly`\n                - :exc:`~.commands.NoPrivateMessage`\n                - :exc:`~.commands.NotOwner`\n                - :exc:`~.commands.MissingPermissions`\n                - :exc:`~.commands.BotMissingPermissions`\n                - :exc:`~.commands.MissingRole`\n                - :exc:`~.commands.BotMissingRole`\n                - :exc:`~.commands.MissingAnyRole`\n                - :exc:`~.commands.BotMissingAnyRole`\n                - :exc:`~.commands.NSFWChannelRequired`\n            - :exc:`~.commands.DisabledCommand`\n            - :exc:`~.commands.CommandInvokeError`\n            - :exc:`~.commands.CommandOnCooldown`\n            - :exc:`~.commands.MaxConcurrencyReached`\n            - :exc:`~.commands.HybridCommandError`\n        - :exc:`~.commands.ExtensionError`\n            - :exc:`~.commands.ExtensionAlreadyLoaded`\n            - :exc:`~.commands.ExtensionNotLoaded`\n            - :exc:`~.commands.NoEntryPointError`\n            - :exc:`~.commands.ExtensionFailed`\n            - :exc:`~.commands.ExtensionNotFound`\n    - :exc:`~.ClientException`\n        - :exc:`~.commands.CommandRegistrationError`\n"
  },
  {
    "path": "docs/ext/commands/cogs.rst",
    "content": ".. currentmodule:: discord\n\n.. _ext_commands_cogs:\n\nCogs\n======\n\nThere 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.\n\nThe gist:\n\n- Each cog is a Python class that subclasses :class:`.commands.Cog`.\n- Every command is marked with the :func:`.commands.command` decorator.\n- Every hybrid command is marked with the :func:`.commands.hybrid_command` decorator.\n- Every listener is marked with the :meth:`.commands.Cog.listener` decorator.\n- Cogs are then registered with the :meth:`.Bot.add_cog` call.\n- Cogs are subsequently removed with the :meth:`.Bot.remove_cog` call.\n\nIt should be noted that cogs are typically used alongside with :ref:`ext_commands_extensions`.\n\nQuick Example\n---------------\n\nThis 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>`.\n\n.. code-block:: python3\n\n    class Greetings(commands.Cog):\n        def __init__(self, bot):\n            self.bot = bot\n            self._last_member = None\n\n        @commands.Cog.listener()\n        async def on_member_join(self, member):\n            channel = member.guild.system_channel\n            if channel is not None:\n                await channel.send(f'Welcome {member.mention}.')\n\n        @commands.command()\n        async def hello(self, ctx, *, member: discord.Member = None):\n            \"\"\"Says hello\"\"\"\n            member = member or ctx.author\n            if self._last_member is None or self._last_member.id != member.id:\n                await ctx.send(f'Hello {member.name}~')\n            else:\n                await ctx.send(f'Hello {member.name}... This feels familiar.')\n            self._last_member = member\n\nA couple of technical notes to take into consideration:\n\n- All listeners must be explicitly marked via decorator, :meth:`~.commands.Cog.listener`.\n- The name of the cog is automatically derived from the class name but can be overridden. See :ref:`ext_commands_cogs_meta_options`.\n- All commands must now take a ``self`` parameter to allow usage of instance attributes that can be used to maintain state.\n\nCog Registration\n-------------------\n\nOnce 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.\n\n.. code-block:: python3\n\n    await bot.add_cog(Greetings(bot))\n\nThis binds the cog to the bot, adding all commands and listeners to the bot automatically.\n\nNote 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.\n\n.. code-block:: python3\n\n    await bot.remove_cog('Greetings')\n\nUsing Cogs\n-------------\n\nJust 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:\n\n.. code-block:: python3\n    :emphasize-lines: 22,24\n\n    class Economy(commands.Cog):\n        ...\n\n        async def withdraw_money(self, member, money):\n            # implementation here\n            ...\n\n        async def deposit_money(self, member, money):\n            # implementation here\n            ...\n\n    class Gambling(commands.Cog):\n        def __init__(self, bot):\n            self.bot = bot\n\n        def coinflip(self):\n            return random.randint(0, 1)\n\n        @commands.command()\n        async def gamble(self, ctx, money: int):\n            \"\"\"Gambles some money.\"\"\"\n            economy = self.bot.get_cog('Economy')\n            if economy is not None:\n                await economy.withdraw_money(ctx.author, money)\n                if self.coinflip() == 1:\n                    await economy.deposit_money(ctx.author, money * 1.5)\n\n.. _ext_commands_cogs_special_methods:\n\nSpecial Methods\n-----------------\n\nAs 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.\n\nThey are as follows:\n\n- :meth:`.Cog.cog_load`\n- :meth:`.Cog.cog_unload`\n- :meth:`.Cog.cog_check`\n- :meth:`.Cog.cog_command_error`\n- :meth:`.Cog.cog_before_invoke`\n- :meth:`.Cog.cog_after_invoke`\n- :meth:`.Cog.bot_check`\n- :meth:`.Cog.bot_check_once`\n\nYou can visit the reference to get more detail.\n\n.. _ext_commands_cogs_meta_options:\n\nMeta Options\n--------------\n\nAt 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:\n\n.. code-block:: python3\n\n    class MyCog(commands.Cog, name='My Cog'):\n        pass\n\nTo see more options that you can set, see the documentation of :class:`.commands.CogMeta`.\n\nInspection\n------------\n\nSince cogs ultimately are classes, we have some tools to help us inspect certain properties of the cog.\n\n\nTo get a :class:`list` of commands, we can use :meth:`.Cog.get_commands`. ::\n\n    >>> cog = bot.get_cog('Greetings')\n    >>> commands = cog.get_commands()\n    >>> print([c.name for c in commands])\n\nIf we want to get the subcommands as well, we can use the :meth:`.Cog.walk_commands` generator. ::\n\n    >>> print([c.qualified_name for c in cog.walk_commands()])\n\nTo 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. ::\n\n    >>> for name, func in cog.get_listeners():\n    ...     print(name, '->', func)\n\n"
  },
  {
    "path": "docs/ext/commands/commands.rst",
    "content": ".. currentmodule:: discord\n\n.. _ext_commands_commands:\n\nCommands\n==========\n\nOne of the most appealing aspects of the command extension is how easy it is to define commands and\nhow you can arbitrarily nest groups and commands to have a rich sub-command system.\n\nCommands are defined by attaching it to a regular Python function. The command is then invoked by the user using a similar\nsignature to the Python function.\n\n.. warning::\n\n    You must have access to the :attr:`~discord.Intents.message_content` intent for the commands extension\n    to function. This must be set both in the developer portal and within your code.\n\n    Failure to do this will result in your bot not responding to any of your commands.\n\nFor example, in the given command definition:\n\n.. code-block:: python3\n\n    @bot.command()\n    async def foo(ctx, arg):\n        await ctx.send(arg)\n\nWith the following prefix (``$``), it would be invoked by the user via:\n\n.. code-block:: none\n\n    $foo abc\n\nA command must always have at least one parameter, ``ctx``, which is the :class:`.Context` as the first one.\n\nThere are two ways of registering a command. The first one is by using :meth:`.Bot.command` decorator,\nas seen in the example above. The second is using the :func:`~ext.commands.command` decorator followed by\n:meth:`.Bot.add_command` on the instance.\n\nEssentially, these two are equivalent: ::\n\n    import discord\n    from discord.ext import commands\n\n    intents = discord.Intents.default()\n    intents.message_content = True\n\n    bot = commands.Bot(command_prefix='$', intents=intents)\n\n    @bot.command()\n    async def test(ctx):\n        pass\n\n    # or:\n\n    @commands.command()\n    async def test(ctx):\n        pass\n\n    bot.add_command(test)\n\nSince the :meth:`.Bot.command` decorator is shorter and easier to comprehend, it will be the one used throughout the\ndocumentation here.\n\nAny parameter that is accepted by the :class:`~discord.ext.commands.Command` constructor can be passed into the decorator. For example, to change\nthe name to something other than the function would be as simple as doing this:\n\n.. code-block:: python3\n\n    @bot.command(name='list')\n    async def _list(ctx, arg):\n        pass\n\nParameters\n------------\n\nSince we define commands by making Python functions, we also define the argument passing behaviour by the function\nparameters.\n\nCertain parameter types do different things in the user side and most forms of parameter types are supported.\n\nPositional\n++++++++++++\n\nThe most basic form of parameter passing is the positional parameter. This is where we pass a parameter as-is:\n\n.. code-block:: python3\n\n    @bot.command()\n    async def test(ctx, arg):\n        await ctx.send(arg)\n\n\nOn the bot using side, you can provide positional arguments by just passing a regular string:\n\n.. image:: /images/commands/positional1.png\n\nTo make use of a word with spaces in between, you should quote it:\n\n.. image:: /images/commands/positional2.png\n\nAs a note of warning, if you omit the quotes, you will only get the first word:\n\n.. image:: /images/commands/positional3.png\n\nSince positional arguments are just regular Python arguments, you can have as many as you want:\n\n.. code-block:: python3\n\n    @bot.command()\n    async def test(ctx, arg1, arg2):\n        await ctx.send(f'You passed {arg1} and {arg2}')\n\nVariable\n++++++++++\n\nSometimes you want users to pass in an undetermined number of parameters. The library supports this\nsimilar to how variable list parameters are done in Python:\n\n.. code-block:: python3\n\n    @bot.command()\n    async def test(ctx, *args):\n        arguments = ', '.join(args)\n        await ctx.send(f'{len(args)} arguments: {arguments}')\n\nThis allows our user to accept either one or many arguments as they please. This works similar to positional arguments,\nso multi-word parameters should be quoted.\n\nFor example, on the bot side:\n\n.. image:: /images/commands/variable1.png\n\nIf the user wants to input a multi-word argument, they have to quote it like earlier:\n\n.. image:: /images/commands/variable2.png\n\nDo note that similar to the Python function behaviour, a user can technically pass no arguments\nat all:\n\n.. image:: /images/commands/variable3.png\n\nSince the ``args`` variable is a :class:`py:tuple`,\nyou can do anything you would usually do with one.\n\nKeyword-Only Arguments\n++++++++++++++++++++++++\n\nWhen you want to handle parsing of the argument yourself or do not feel like you want to wrap multi-word user input into\nquotes, you can ask the library to give you the rest as a single argument. We do this by using a **keyword-only argument**,\nseen below:\n\n.. code-block:: python3\n\n    @bot.command()\n    async def test(ctx, *, arg):\n        await ctx.send(arg)\n\n.. warning::\n\n    You can only have one keyword-only argument due to parsing ambiguities.\n\nOn the bot side, we do not need to quote input with spaces:\n\n.. image:: /images/commands/keyword1.png\n\nDo keep in mind that wrapping it in quotes leaves it as-is:\n\n.. image:: /images/commands/keyword2.png\n\nBy default, the keyword-only arguments are stripped of white space to make it easier to work with. This behaviour can be\ntoggled by the :attr:`.Command.rest_is_raw` argument in the decorator.\n\n.. _ext_commands_context:\n\nInvocation Context\n-------------------\n\nAs seen earlier, every command must take at least a single parameter, called the :class:`~ext.commands.Context`.\n\nThis parameter gives you access to something called the \"invocation context\". Essentially all the information you need to\nknow how the command was executed. It contains a lot of useful information:\n\n- :attr:`.Context.guild` returns the :class:`Guild` of the command, if any.\n- :attr:`.Context.message` returns the :class:`Message` of the command.\n- :attr:`.Context.author` returns the :class:`Member` or :class:`User` that called the command.\n- :meth:`.Context.send` to send a message to the channel the command was used in.\n\nThe context implements the :class:`abc.Messageable` interface, so anything you can do on a :class:`abc.Messageable` you\ncan do on the :class:`~ext.commands.Context`.\n\nConverters\n------------\n\nAdding bot arguments with function parameters is only the first step in defining your bot's command interface. To actually\nmake use of the arguments, we usually want to convert the data into a target type. We call these\n:ref:`ext_commands_api_converters`.\n\nConverters come in a few flavours:\n\n- A regular callable object that takes an argument as a sole parameter and returns a different type.\n\n    - These range from your own function, to something like :class:`bool` or :class:`int`.\n\n- A custom class that inherits from :class:`~ext.commands.Converter`.\n\n.. _ext_commands_basic_converters:\n\nBasic Converters\n++++++++++++++++++\n\nAt its core, a basic converter is a callable that takes in an argument and turns it into something else.\n\nFor example, if we wanted to add two numbers together, we could request that they are turned into integers\nfor us by specifying the converter:\n\n.. code-block:: python3\n\n    @bot.command()\n    async def add(ctx, a: int, b: int):\n        await ctx.send(a + b)\n\nWe specify converters by using something called a **function annotation**. This is a Python 3 exclusive feature that was\nintroduced in :pep:`3107`.\n\nThis works with any callable, such as a function that would convert a string to all upper-case:\n\n.. code-block:: python3\n\n    def to_upper(argument):\n        return argument.upper()\n\n    @bot.command()\n    async def up(ctx, *, content: to_upper):\n        await ctx.send(content)\n\nbool\n^^^^^^\n\nUnlike 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:\n\n.. code-block:: python3\n\n    if lowered in ('yes', 'y', 'true', 't', '1', 'enable', 'on'):\n        return True\n    elif lowered in ('no', 'n', 'false', 'f', '0', 'disable', 'off'):\n        return False\n\n.. _ext_commands_adv_converters:\n\nAdvanced Converters\n+++++++++++++++++++++\n\nSometimes a basic converter doesn't have enough information that we need. For example, sometimes we want to get some\ninformation from the :class:`Message` that called the command or we want to do some asynchronous processing.\n\nFor this, the library provides the :class:`~ext.commands.Converter` interface. This allows you to have access to the\n:class:`.Context` and have the callable be asynchronous. Defining a custom converter using this interface requires\noverriding a single method, :meth:`.Converter.convert`.\n\nAn example converter:\n\n.. code-block:: python3\n\n    import random\n\n    class Slapper(commands.Converter):\n        async def convert(self, ctx, argument):\n            to_slap = random.choice(ctx.guild.members)\n            return f'{ctx.author} slapped {to_slap} because *{argument}*'\n\n    @bot.command()\n    async def slap(ctx, *, reason: Slapper):\n        await ctx.send(reason)\n\nThe converter provided can either be constructed or not. Essentially these two are equivalent:\n\n.. code-block:: python3\n\n    @bot.command()\n    async def slap(ctx, *, reason: Slapper):\n        await ctx.send(reason)\n\n    # is the same as...\n\n    @bot.command()\n    async def slap(ctx, *, reason: Slapper()):\n        await ctx.send(reason)\n\nHaving the possibility of the converter be constructed allows you to set up some state in the converter's ``__init__`` for\nfine tuning the converter. An example of this is actually in the library, :class:`~ext.commands.clean_content`.\n\n.. code-block:: python3\n\n    @bot.command()\n    async def clean(ctx, *, content: commands.clean_content):\n        await ctx.send(content)\n\n    # or for fine-tuning\n\n    @bot.command()\n    async def clean(ctx, *, content: commands.clean_content(use_nicknames=False)):\n        await ctx.send(content)\n\n\nIf a converter fails to convert an argument to its designated target type, the :exc:`.BadArgument` exception must be\nraised.\n\nInline Advanced Converters\n+++++++++++++++++++++++++++++\n\nIf we don't want to inherit from :class:`~ext.commands.Converter`, we can still provide a converter that has the\nadvanced functionalities of an advanced converter and save us from specifying two types.\n\nFor example, a common idiom would be to have a class and a converter for that class:\n\n.. code-block:: python3\n\n    class JoinDistance:\n        def __init__(self, joined, created):\n            self.joined = joined\n            self.created = created\n\n        @property\n        def delta(self):\n            return self.joined - self.created\n\n    class JoinDistanceConverter(commands.MemberConverter):\n        async def convert(self, ctx, argument):\n            member = await super().convert(ctx, argument)\n            return JoinDistance(member.joined_at, member.created_at)\n\n    @bot.command()\n    async def delta(ctx, *, member: JoinDistanceConverter):\n        is_new = member.delta.days < 100\n        if is_new:\n            await ctx.send(\"Hey you're pretty new!\")\n        else:\n            await ctx.send(\"Hm you're not so new.\")\n\nThis can get tedious, so an inline advanced converter is possible through a :func:`classmethod` inside the type:\n\n.. code-block:: python3\n\n    class JoinDistance:\n        def __init__(self, joined, created):\n            self.joined = joined\n            self.created = created\n\n        @classmethod\n        async def convert(cls, ctx, argument):\n            member = await commands.MemberConverter().convert(ctx, argument)\n            return cls(member.joined_at, member.created_at)\n\n        @property\n        def delta(self):\n            return self.joined - self.created\n\n    @bot.command()\n    async def delta(ctx, *, member: JoinDistance):\n        is_new = member.delta.days < 100\n        if is_new:\n            await ctx.send(\"Hey you're pretty new!\")\n        else:\n            await ctx.send(\"Hm you're not so new.\")\n\nDiscord Converters\n++++++++++++++++++++\n\nWorking with :ref:`discord_api_models` is a fairly common thing when defining commands, as a result the library makes\nworking with them easy.\n\nFor example, to receive a :class:`Member` you can just pass it as a converter:\n\n.. code-block:: python3\n\n    @bot.command()\n    async def joined(ctx, *, member: discord.Member):\n        await ctx.send(f'{member} joined on {member.joined_at}')\n\nWhen this command is executed, it attempts to convert the string given into a :class:`Member` and then passes it as a\nparameter for the function. This works by checking if the string is a mention, an ID, a nickname, a username + discriminator,\nor just a regular username. The default set of converters have been written to be as easy to use as possible.\n\nA lot of discord models work out of the gate as a parameter:\n\n- :class:`Object` (since v2.0)\n- :class:`Member`\n- :class:`User`\n- :class:`Message` (since v1.1)\n- :class:`PartialMessage` (since v1.7)\n- :class:`abc.GuildChannel` (since 2.0)\n- :class:`TextChannel`\n- :class:`VoiceChannel`\n- :class:`StageChannel` (since v1.7)\n- :class:`CategoryChannel`\n- :class:`ForumChannel` (since v2.0)\n- :class:`Invite`\n- :class:`Guild` (since v1.7)\n- :class:`Role`\n- :class:`Game`\n- :class:`Colour`\n- :class:`Emoji`\n- :class:`PartialEmoji`\n- :class:`Thread` (since v2.0)\n- :class:`GuildSticker` (since v2.0)\n- :class:`ScheduledEvent` (since v2.0)\n\nHaving any of these set as the converter will intelligently convert the argument to the appropriate target type you\nspecify.\n\nUnder the hood, these are implemented by the :ref:`ext_commands_adv_converters` interface. A table of the equivalent\nconverter is given below:\n\n+--------------------------+-------------------------------------------------+\n|     Discord Class        |                    Converter                    |\n+--------------------------+-------------------------------------------------+\n| :class:`Object`          | :class:`~ext.commands.ObjectConverter`          |\n+--------------------------+-------------------------------------------------+\n| :class:`Member`          | :class:`~ext.commands.MemberConverter`          |\n+--------------------------+-------------------------------------------------+\n| :class:`User`            | :class:`~ext.commands.UserConverter`            |\n+--------------------------+-------------------------------------------------+\n| :class:`Message`         | :class:`~ext.commands.MessageConverter`         |\n+--------------------------+-------------------------------------------------+\n| :class:`PartialMessage`  | :class:`~ext.commands.PartialMessageConverter`  |\n+--------------------------+-------------------------------------------------+\n| :class:`.GuildChannel`   | :class:`~ext.commands.GuildChannelConverter`    |\n+--------------------------+-------------------------------------------------+\n| :class:`TextChannel`     | :class:`~ext.commands.TextChannelConverter`     |\n+--------------------------+-------------------------------------------------+\n| :class:`VoiceChannel`    | :class:`~ext.commands.VoiceChannelConverter`    |\n+--------------------------+-------------------------------------------------+\n| :class:`StageChannel`    | :class:`~ext.commands.StageChannelConverter`    |\n+--------------------------+-------------------------------------------------+\n| :class:`CategoryChannel` | :class:`~ext.commands.CategoryChannelConverter` |\n+--------------------------+-------------------------------------------------+\n| :class:`ForumChannel`    | :class:`~ext.commands.ForumChannelConverter`    |\n+--------------------------+-------------------------------------------------+\n| :class:`Invite`          | :class:`~ext.commands.InviteConverter`          |\n+--------------------------+-------------------------------------------------+\n| :class:`Guild`           | :class:`~ext.commands.GuildConverter`           |\n+--------------------------+-------------------------------------------------+\n| :class:`Role`            | :class:`~ext.commands.RoleConverter`            |\n+--------------------------+-------------------------------------------------+\n| :class:`Game`            | :class:`~ext.commands.GameConverter`            |\n+--------------------------+-------------------------------------------------+\n| :class:`Colour`          | :class:`~ext.commands.ColourConverter`          |\n+--------------------------+-------------------------------------------------+\n| :class:`Emoji`           | :class:`~ext.commands.EmojiConverter`           |\n+--------------------------+-------------------------------------------------+\n| :class:`PartialEmoji`    | :class:`~ext.commands.PartialEmojiConverter`    |\n+--------------------------+-------------------------------------------------+\n| :class:`Thread`          | :class:`~ext.commands.ThreadConverter`          |\n+--------------------------+-------------------------------------------------+\n| :class:`GuildSticker`    | :class:`~ext.commands.GuildStickerConverter`    |\n+--------------------------+-------------------------------------------------+\n| :class:`ScheduledEvent`  | :class:`~ext.commands.ScheduledEventConverter`  |\n+--------------------------+-------------------------------------------------+\n\nBy providing the converter it allows us to use them as building blocks for another converter:\n\n.. code-block:: python3\n\n    class MemberRoles(commands.MemberConverter):\n        async def convert(self, ctx, argument):\n            member = await super().convert(ctx, argument)\n            return [role.name for role in member.roles[1:]] # Remove everyone role!\n\n    @bot.command()\n    async def roles(ctx, *, member: MemberRoles):\n        \"\"\"Tells you a member's roles.\"\"\"\n        await ctx.send('I see the following roles: ' + ', '.join(member))\n\n.. _ext_commands_special_converters:\n\nSpecial Converters\n++++++++++++++++++++\n\nThe command extension also has support for certain converters to allow for more advanced and intricate use cases that go\nbeyond the generic linear parsing. These converters allow you to introduce some more relaxed and dynamic grammar to your\ncommands in an easy to use manner.\n\ntyping.Union\n^^^^^^^^^^^^^^\n\nA :data:`typing.Union` is a special type hint that allows for the command to take in any of the specific types instead of\na singular type. For example, given the following:\n\n.. code-block:: python3\n\n    import typing\n\n    @bot.command()\n    async def union(ctx, what: typing.Union[discord.TextChannel, discord.Member]):\n        await ctx.send(what)\n\n\nThe ``what`` parameter would either take a :class:`discord.TextChannel` converter or a :class:`discord.Member` converter.\nThe way this works is through a left-to-right order. It first attempts to convert the input to a\n:class:`discord.TextChannel`, and if it fails it tries to convert it to a :class:`discord.Member`. If all converters fail,\nthen a special error is raised, :exc:`~ext.commands.BadUnionArgument`.\n\nNote that any valid converter discussed above can be passed in to the argument list of a :data:`typing.Union`.\n\ntyping.Optional\n^^^^^^^^^^^^^^^^^\n\nA :data:`typing.Optional` is a special type hint that allows for \"back-referencing\" behaviour. If the converter fails to\nparse into the specified type, the parser will skip the parameter and then either ``None`` or the specified default will be\npassed into the parameter instead. The parser will then continue on to the next parameters and converters, if any.\n\nConsider the following example:\n\n.. code-block:: python3\n\n    import typing\n\n    @bot.command()\n    async def bottles(ctx, amount: typing.Optional[int] = 99, *, liquid=\"beer\"):\n        await ctx.send(f'{amount} bottles of {liquid} on the wall!')\n\n\n.. image:: /images/commands/optional1.png\n\nIn this example, since the argument could not be converted into an ``int``, the default of ``99`` is passed and the parser\nresumes handling, which in this case would be to pass it into the ``liquid`` parameter.\n\n.. note::\n\n    This converter only works in regular positional parameters, not variable parameters or keyword-only parameters.\n\ntyping.Literal\n^^^^^^^^^^^^^^^^\n\n.. versionadded:: 2.0\n\nA :data:`typing.Literal` is a special type hint that requires the passed parameter to be equal to one of the listed values\nafter being converted to the same type. For example, given the following:\n\n.. code-block:: python3\n\n    from typing import Literal\n\n    @bot.command()\n    async def shop(ctx, buy_sell: Literal['buy', 'sell'], amount: Literal[1, 2], *, item: str):\n        await ctx.send(f'{buy_sell.capitalize()}ing {amount} {item}(s)!')\n\n\nThe ``buy_sell`` parameter must be either the literal string ``\"buy\"`` or ``\"sell\"`` and ``amount`` must convert to the\n``int`` ``1`` or ``2``. If ``buy_sell`` or ``amount`` don't match any value, then a special error is raised,\n:exc:`~.ext.commands.BadLiteralArgument`. Any literal values can be mixed and matched within the same :data:`typing.Literal` converter.\n\nNote that ``typing.Literal[True]`` and ``typing.Literal[False]`` still follow the :class:`bool` converter rules.\n\ntyping.Annotated\n^^^^^^^^^^^^^^^^^\n\n.. versionadded:: 2.0\n\nA :data:`typing.Annotated` is a special type introduced in Python 3.9 that allows the type checker to see one type, but allows the library to see another type. This is useful for appeasing the type checker for complicated converters. The second parameter of ``Annotated`` must be the converter that the library should use.\n\nFor example, given the following:\n\n.. code-block:: python3\n\n    from typing import Annotated\n\n    @bot.command()\n    async def fun(ctx, arg: Annotated[str, lambda s: s.upper()]):\n        await ctx.send(arg)\n\nThe type checker will see ``arg`` as a regular :class:`str` but the library will know you wanted to change the input into all upper-case.\n\n.. note::\n\n    For Python versions below 3.9, it is recommended to install the ``typing_extensions`` library and import ``Annotated`` from there.\n\n\nGreedy\n^^^^^^^^\n\nThe :class:`~ext.commands.Greedy` converter is a generalisation of the :data:`typing.Optional` converter, except applied\nto a list of arguments. In simple terms, this means that it tries to convert as much as it can until it can't convert\nany further.\n\nConsider the following example:\n\n.. code-block:: python3\n\n    @bot.command()\n    async def slap(ctx, members: commands.Greedy[discord.Member], *, reason='no reason'):\n        slapped = \", \".join(x.name for x in members)\n        await ctx.send(f'{slapped} just got slapped for {reason}')\n\nWhen invoked, it allows for any number of members to be passed in:\n\n.. image:: /images/commands/greedy1.png\n\nThe type passed when using this converter depends on the parameter type that it is being attached to:\n\n- Positional parameter types will receive either the default parameter or a :class:`list` of the converted values.\n- Variable parameter types will be a :class:`tuple` as usual.\n- Keyword-only parameter types will be the same as if :class:`~ext.commands.Greedy` was not passed at all.\n\n:class:`~ext.commands.Greedy` parameters can also be made optional by specifying an optional value.\n\nWhen mixed with the :data:`typing.Optional` converter you can provide simple and expressive command invocation syntaxes:\n\n.. code-block:: python3\n\n    import typing\n\n    @bot.command()\n    async def ban(ctx, members: commands.Greedy[discord.Member],\n                       delete_days: typing.Optional[int] = 0, *,\n                       reason: str):\n        \"\"\"Mass bans members with an optional delete_days parameter\"\"\"\n        delete_seconds = delete_days * 86400 # one day\n        for member in members:\n            await member.ban(delete_message_seconds=delete_seconds, reason=reason)\n\n\nThis command can be invoked any of the following ways:\n\n.. code-block:: none\n\n    $ban @Member @Member2 spam bot\n    $ban @Member @Member2 7 spam bot\n    $ban @Member spam\n\n.. warning::\n\n    The usage of :class:`~ext.commands.Greedy` and :data:`typing.Optional` are powerful and useful, however as a\n    price, they open you up to some parsing ambiguities that might surprise some people.\n\n    For example, a signature expecting a :data:`typing.Optional` of a :class:`discord.Member` followed by a\n    :class:`int` could catch a member named after a number due to the different ways a\n    :class:`~ext.commands.MemberConverter` decides to fetch members. You should take care to not introduce\n    unintended parsing ambiguities in your code. One technique would be to clamp down the expected syntaxes\n    allowed through custom converters or reordering the parameters to minimise clashes.\n\n    To help aid with some parsing ambiguities, :class:`str`, ``None``, :data:`typing.Optional` and\n    :class:`~ext.commands.Greedy` are forbidden as parameters for the :class:`~ext.commands.Greedy` converter.\n\n\ndiscord.Attachment\n^^^^^^^^^^^^^^^^^^^\n\n.. versionadded:: 2.0\n\nThe :class:`discord.Attachment` converter is a special converter that retrieves an attachment from the uploaded attachments on a message. This converter *does not* look at the message content at all and just the uploaded attachments.\n\nConsider the following example:\n\n.. code-block:: python3\n\n    import discord\n\n    @bot.command()\n    async def upload(ctx, attachment: discord.Attachment):\n        await ctx.send(f'You have uploaded <{attachment.url}>')\n\n\nWhen this command is invoked, the user must directly upload a file for the command body to be executed. When combined with the :data:`typing.Optional` converter, the user does not have to provide an attachment.\n\n.. code-block:: python3\n\n    import typing\n    import discord\n\n    @bot.command()\n    async def upload(ctx, attachment: typing.Optional[discord.Attachment]):\n        if attachment is None:\n            await ctx.send('You did not upload anything!')\n        else:\n            await ctx.send(f'You have uploaded <{attachment.url}>')\n\n\nThis also works with multiple attachments:\n\n.. code-block:: python3\n\n    import typing\n    import discord\n\n    @bot.command()\n    async def upload_many(\n        ctx,\n        first: discord.Attachment,\n        second: typing.Optional[discord.Attachment],\n    ):\n        if second is None:\n            files = [first.url]\n        else:\n            files = [first.url, second.url]\n\n        await ctx.send(f'You uploaded: {\" \".join(files)}')\n\n\nIn this example the user must provide at least one file but the second one is optional.\n\nAs a special case, using :class:`~ext.commands.Greedy` will return the remaining attachments in the message, if any.\n\n.. code-block:: python3\n\n    import discord\n    from discord.ext import commands\n\n    @bot.command()\n    async def upload_many(\n        ctx,\n        first: discord.Attachment,\n        remaining: commands.Greedy[discord.Attachment],\n    ):\n        files = [first.url]\n        files.extend(a.url for a in remaining)\n        await ctx.send(f'You uploaded: {\" \".join(files)}')\n\n\nNote that using a :class:`discord.Attachment` converter after a :class:`~ext.commands.Greedy` of :class:`discord.Attachment` will always fail since the greedy had already consumed the remaining attachments.\n\nIf an attachment is expected but not given, then :exc:`~ext.commands.MissingRequiredAttachment` is raised to the error handlers.\n\n.. _ext_commands_flag_converter:\n\nFlagConverter\n++++++++++++++\n\n.. versionadded:: 2.0\n\nA :class:`~ext.commands.FlagConverter` allows the user to specify user-friendly \"flags\" using :pep:`526` type annotations\nor a syntax more reminiscent of the :mod:`py:dataclasses` module.\n\nFor example, the following code:\n\n.. code-block:: python3\n\n    from discord.ext import commands\n    import discord\n\n    class BanFlags(commands.FlagConverter):\n        member: discord.Member\n        reason: str\n        days: int = 1\n\n    @commands.command()\n    async def ban(ctx, *, flags: BanFlags):\n        plural = f'{flags.days} days' if flags.days != 1 else f'{flags.days} day'\n        await ctx.send(f'Banned {flags.member} for {flags.reason!r} (deleted {plural} worth of messages)')\n\nAllows the user to invoke the command using a simple flag-like syntax:\n\n.. image:: /images/commands/flags1.png\n\nFlags use a syntax that allows the user to not require quotes when passing in values to the flag. The goal of the\nflag syntax is to be as user-friendly as possible. This makes flags a good choice for complicated commands that can have\nmultiple knobs to turn or simulating keyword-only parameters in your external command interface. **It is recommended to use\nkeyword-only parameters with the flag converter**. This ensures proper parsing and behaviour with quoting.\n\nInternally, the :class:`~ext.commands.FlagConverter` class examines the class to find flags. A flag can either be a\nclass variable with a type annotation or a class variable that's been assigned the result of the :func:`~ext.commands.flag`\nfunction. These flags are then used to define the interface that your users will use. The annotations correspond to\nthe converters that the flag arguments must adhere to.\n\nFor most use cases, no extra work is required to define flags. However, if customisation is needed to control the flag name\nor the default value then the :func:`~ext.commands.flag` function can come in handy:\n\n.. code-block:: python3\n\n    from typing import List\n\n    class BanFlags(commands.FlagConverter):\n        members: List[discord.Member] = commands.flag(name='member', default=lambda ctx: [])\n\nThis tells the parser that the ``members`` attribute is mapped to a flag named ``member`` and that\nthe default value is an empty list. For greater customisability, the default can either be a value or a callable\nthat takes the :class:`~ext.commands.Context` as a sole parameter. This callable can either be a function or a coroutine.\n\nA positional flag can be defined by setting the :attr:`~ext.commands.Flag.positional` attribute to ``True``. This\ntells the parser that the content provided before the parsing occurs is part of the flag. This is useful for commands that\nrequire a parameter to be used first and the flags are optional, such as the following:\n\n.. code-block:: python3\n\n    class BanFlags(commands.FlagConverter):\n        members: List[discord.Member] = commands.flag(name='member', positional=True, default=lambda ctx: [])\n        reason: Optional[str] = None\n\n.. note::\n    Only one positional flag is allowed in a flag converter.\n\nIn order to customise the flag syntax we also have a few options that can be passed to the class parameter list:\n\n.. code-block:: python3\n\n    # --hello world syntax\n    class PosixLikeFlags(commands.FlagConverter, delimiter=' ', prefix='--'):\n        hello: str\n\n\n    # /make food\n    class WindowsLikeFlags(commands.FlagConverter, prefix='/', delimiter=''):\n        make: str\n\n    # TOPIC: not allowed nsfw: yes Slowmode: 100\n    class Settings(commands.FlagConverter, case_insensitive=True):\n        topic: Optional[str]\n        nsfw: Optional[bool]\n        slowmode: Optional[int]\n    \n    # Hello there --bold True\n    class Greeting(commands.FlagConverter):\n        text: str = commands.flag(positional=True)\n        bold: bool = False\n\n.. note::\n\n    Despite the similarities in these examples to command like arguments, the syntax and parser is not\n    a command line parser. The syntax is mainly inspired by Discord's search bar input and as a result\n    all flags need a corresponding value unless part of a positional flag.\n\nFlag converters will only raise :exc:`~ext.commands.FlagError` derived exceptions. If an error is raised while\nconverting a flag, :exc:`~ext.commands.BadFlagArgument` is raised instead and the original exception\ncan be accessed with the :attr:`~ext.commands.BadFlagArgument.original` attribute.\n\nThe flag converter is similar to regular commands and allows you to use most types of converters\n(with the exception of :class:`~ext.commands.Greedy`) as the type annotation. Some extra support is added for specific\nannotations as described below.\n\ntyping.List\n^^^^^^^^^^^^^\n\nIf a list is given as a flag annotation it tells the parser that the argument can be passed multiple times.\n\nFor example, augmenting the example above:\n\n.. code-block:: python3\n\n    from discord.ext import commands\n    from typing import List\n    import discord\n\n    class BanFlags(commands.FlagConverter):\n        members: List[discord.Member] = commands.flag(name='member')\n        reason: str\n        days: int = 1\n\n    @commands.command()\n    async def ban(ctx, *, flags: BanFlags):\n        for member in flags.members:\n            await member.ban(reason=flags.reason, delete_message_days=flags.days)\n\n        members = ', '.join(str(member) for member in flags.members)\n        plural = f'{flags.days} days' if flags.days != 1 else f'{flags.days} day'\n        await ctx.send(f'Banned {members} for {flags.reason!r} (deleted {plural} worth of messages)')\n\nThis is called by repeatedly specifying the flag:\n\n.. image:: /images/commands/flags2.png\n\ntyping.Tuple\n^^^^^^^^^^^^^\n\nSince the above syntax can be a bit repetitive when specifying a flag many times, the :class:`py:tuple` type annotation\nallows for \"greedy-like\" semantics using a variadic tuple:\n\n.. code-block:: python3\n\n    from discord.ext import commands\n    from typing import Tuple\n    import discord\n\n    class BanFlags(commands.FlagConverter):\n        members: Tuple[discord.Member, ...]\n        reason: str\n        days: int = 1\n\nThis allows the previous ``ban`` command to be called like this:\n\n.. image:: /images/commands/flags3.png\n\nThe :class:`py:tuple` annotation also allows for parsing of pairs. For example, given the following code:\n\n.. code-block:: python3\n\n    # point: 10 11 point: 12 13\n    class Coordinates(commands.FlagConverter):\n        point: Tuple[int, int]\n\n\n.. warning::\n\n    Due to potential parsing ambiguities, the parser expects tuple arguments to be quoted\n    if they require spaces. So if one of the inner types is :class:`str` and the argument requires spaces\n    then quotes should be used to disambiguate it from the other element of the tuple.\n\ntyping.Dict\n^^^^^^^^^^^^^\n\nA :class:`dict` annotation is functionally equivalent to ``List[Tuple[K, V]]`` except with the return type\ngiven as a :class:`dict` rather than a :class:`list`.\n\n\nHybrid Command Interaction\n^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nWhen used as a hybrid command, the parameters are flattened into different parameters for the application command. For example, the following converter:\n\n.. code-block:: python3\n\n    class BanFlags(commands.FlagConverter):\n        member: discord.Member\n        reason: str\n        days: int = 1\n\n\n    @commands.hybrid_command()\n    async def ban(ctx, *, flags: BanFlags):\n        ...\n\nWould be equivalent to an application command defined as this:\n\n.. code-block:: python3\n\n    @commands.hybrid_command()\n    async def ban(ctx, member: discord.Member, reason: str, days: int = 1):\n        ...\n\nThis means that decorators that refer to a parameter by name will use the flag name instead:\n\n.. code-block:: python3\n\n    class BanFlags(commands.FlagConverter):\n        member: discord.Member\n        reason: str\n        days: int = 1\n\n\n    @commands.hybrid_command()\n    @app_commands.describe(\n        member='The member to ban',\n        reason='The reason for the ban',\n        days='The number of days worth of messages to delete',\n    )\n    async def ban(ctx, *, flags: BanFlags):\n        ...\n\nFor ease of use, the :func:`~ext.commands.flag` function accepts a ``description`` keyword argument to allow you to pass descriptions inline:\n\n.. code-block:: python3\n\n    class BanFlags(commands.FlagConverter):\n        member: discord.Member = commands.flag(description='The member to ban')\n        reason: str = commands.flag(description='The reason for the ban')\n        days: int = commands.flag(default=1, description='The number of days worth of messages to delete')\n\n\n    @commands.hybrid_command()\n    async def ban(ctx, *, flags: BanFlags):\n        ...\n\n\nLikewise, use of the ``name`` keyword argument allows you to pass renames for the parameter, similar to the :func:`~discord.app_commands.rename` decorator.\n\nNote that in hybrid command form, a few annotations are unsupported due to Discord limitations:\n\n- ``typing.Tuple``\n- ``typing.List``\n- ``typing.Dict``\n\n.. note::\n\n    Only one flag converter is supported per hybrid command. Due to the flag converter's way of working, it is unlikely for a user to have two of them in one signature.\n\n.. _ext_commands_parameter:\n\nParameter Metadata\n-------------------\n\n:func:`~ext.commands.parameter` assigns custom metadata to a :class:`~ext.commands.Command`'s parameter.\n\nThis is useful for:\n\n- Custom converters as annotating a parameter with a custom converter works at runtime, type checkers don't like it\n  because they can't understand what's going on.\n\n  .. code-block:: python3\n\n      class SomeType:\n          foo: int\n\n      class MyVeryCoolConverter(commands.Converter[SomeType]):\n          ...  # implementation left as an exercise for the reader\n\n      @bot.command()\n      async def bar(ctx, cool_value: MyVeryCoolConverter):\n          cool_value.foo  # type checker warns MyVeryCoolConverter has no value foo (uh-oh)\n\n  However, fear not we can use :func:`~ext.commands.parameter` to tell type checkers what's going on.\n\n  .. code-block:: python3\n\n      @bot.command()\n      async def bar(ctx, cool_value: SomeType = commands.parameter(converter=MyVeryCoolConverter)):\n          cool_value.foo  # no error (hurray)\n\n- Late binding behaviour\n\n  .. code-block:: python3\n\n      @bot.command()\n      async def wave(ctx, to: discord.User = commands.parameter(default=lambda ctx: ctx.author)):\n          await ctx.send(f'Hello {to.mention} :wave:')\n\n  Because this is such a common use-case, the library provides :obj:`~.ext.commands.Author`, :obj:`~.ext.commands.CurrentChannel` and\n  :obj:`~.ext.commands.CurrentGuild`, armed with this we can simplify ``wave`` to:\n\n  .. code-block:: python3\n\n      @bot.command()\n      async def wave(ctx, to: discord.User = commands.Author):\n          await ctx.send(f'Hello {to.mention} :wave:')\n\n  :obj:`~.ext.commands.Author` and co also have other benefits like having the displayed default being filled.\n\n\n.. _ext_commands_error_handler:\n\nError Handling\n----------------\n\nWhen our commands fail to parse we will, by default, receive a noisy error in ``stderr`` of our console that tells us\nthat an error has happened and has been silently ignored.\n\nIn order to handle our errors, we must use something called an error handler. There is a global error handler, called\n:func:`.on_command_error` which works like any other event in the :ref:`discord-api-events`. This global error handler is\ncalled for every error reached.\n\nMost of the time however, we want to handle an error local to the command itself. Luckily, commands come with local error\nhandlers that allow us to do just that. First we decorate an error handler function with :meth:`~discord.ext.commands.Command.error`:\n\n.. code-block:: python3\n\n    @bot.command()\n    async def info(ctx, *, member: discord.Member):\n        \"\"\"Tells you some info about the member.\"\"\"\n        msg = f'{member} joined on {member.joined_at} and has {len(member.roles)} roles.'\n        await ctx.send(msg)\n\n    @info.error\n    async def info_error(ctx, error):\n        if isinstance(error, commands.BadArgument):\n            await ctx.send('I could not find that member...')\n\nThe first parameter of the error handler is the :class:`.Context` while the second one is an exception that is derived from\n:exc:`~ext.commands.CommandError`. A list of errors is found in the :ref:`ext_commands_api_errors` page of the documentation.\n\nChecks\n-------\n\nThere 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\nthem from using our bot earlier. The commands extension comes with full support for these things in a concept called a\n:ref:`ext_commands_api_checks`.\n\nA check is a basic predicate that can take in a :class:`.Context` as its sole parameter. Within it, you have the following\noptions:\n\n- Return ``True`` to signal that the person can run the command.\n- Return ``False`` to signal that the person cannot run the command.\n- Raise a :exc:`~ext.commands.CommandError` derived exception to signal the person cannot run the command.\n\n    - This allows you to have custom error messages for you to handle in the\n      :ref:`error handlers <ext_commands_error_handler>`.\n\nTo register a check for a command, we would have two ways of doing so. The first is using the :meth:`~ext.commands.check`\ndecorator. For example:\n\n.. code-block:: python3\n\n    async def is_owner(ctx):\n        return ctx.author.id == 316026178463072268\n\n    @bot.command(name='eval')\n    @commands.check(is_owner)\n    async def _eval(ctx, *, code):\n        \"\"\"A bad example of an eval command\"\"\"\n        await ctx.send(eval(code))\n\nThis would only evaluate the command if the function ``is_owner`` returns ``True``. Sometimes we re-use a check often and\nwant to split it into its own decorator. To do that we can just add another level of depth:\n\n.. code-block:: python3\n\n    def is_owner():\n        async def predicate(ctx):\n            return ctx.author.id == 316026178463072268\n        return commands.check(predicate)\n\n    @bot.command(name='eval')\n    @is_owner()\n    async def _eval(ctx, *, code):\n        \"\"\"A bad example of an eval command\"\"\"\n        await ctx.send(eval(code))\n\n\nSince an owner check is so common, the library provides it for you (:func:`~ext.commands.is_owner`):\n\n.. code-block:: python3\n\n    @bot.command(name='eval')\n    @commands.is_owner()\n    async def _eval(ctx, *, code):\n        \"\"\"A bad example of an eval command\"\"\"\n        await ctx.send(eval(code))\n\nWhen multiple checks are specified, **all** of them must be ``True``:\n\n.. code-block:: python3\n\n    def is_in_guild(guild_id):\n        async def predicate(ctx):\n            return ctx.guild and ctx.guild.id == guild_id\n        return commands.check(predicate)\n\n    @bot.command()\n    @commands.is_owner()\n    @is_in_guild(41771983423143937)\n    async def secretguilddata(ctx):\n        \"\"\"super secret stuff\"\"\"\n        await ctx.send('secret stuff')\n\nIf any of those checks fail in the example above, then the command will not be run.\n\nWhen an error happens, the error is propagated to the :ref:`error handlers <ext_commands_error_handler>`. If you do not\nraise a custom :exc:`~ext.commands.CommandError` derived exception, then it will get wrapped up into a\n:exc:`~ext.commands.CheckFailure` exception as so:\n\n.. code-block:: python3\n\n    @bot.command()\n    @commands.is_owner()\n    @is_in_guild(41771983423143937)\n    async def secretguilddata(ctx):\n        \"\"\"super secret stuff\"\"\"\n        await ctx.send('secret stuff')\n\n    @secretguilddata.error\n    async def secretguilddata_error(ctx, error):\n        if isinstance(error, commands.CheckFailure):\n            await ctx.send('nothing to see here comrade.')\n\nIf you want a more robust error system, you can derive from the exception and raise it instead of returning ``False``:\n\n.. code-block:: python3\n\n    class NoPrivateMessages(commands.CheckFailure):\n        pass\n\n    def guild_only():\n        async def predicate(ctx):\n            if ctx.guild is None:\n                raise NoPrivateMessages('Hey no DMs!')\n            return True\n        return commands.check(predicate)\n\n    @bot.command()\n    @guild_only()\n    async def test(ctx):\n        await ctx.send('Hey this is not a DM! Nice.')\n\n    @test.error\n    async def test_error(ctx, error):\n        if isinstance(error, NoPrivateMessages):\n            await ctx.send(error)\n\n.. note::\n\n    Since having a ``guild_only`` decorator is pretty common, it comes built-in via :func:`~ext.commands.guild_only`.\n\nGlobal Checks\n++++++++++++++\n\nSometimes we want to apply a check to **every** command, not just certain commands. The library supports this as well\nusing the global check concept.\n\nGlobal checks work similarly to regular checks except they are registered with the :meth:`.Bot.check` decorator.\n\nFor example, to block all DMs we could do the following:\n\n.. code-block:: python3\n\n    @bot.check\n    async def globally_block_dms(ctx):\n        return ctx.guild is not None\n\n.. warning::\n\n    Be careful on how you write your global checks, as it could also lock you out of your own bot.\n\n.. need a note on global check once here I think\n\n\nHybrid Commands\n---------------\n\n.. versionadded:: 2.0\n\n:class:`.commands.HybridCommand` is a command that can be invoked as both a text and a slash command.\nThis allows you to define a command as both slash and text command without writing separate code for\nboth counterparts.\n\n\nIn order to define a hybrid command, The command callback should be decorated with\n:meth:`.Bot.hybrid_command` decorator.\n\n.. code-block:: python3\n\n    @bot.hybrid_command()\n    async def test(ctx):\n        await ctx.send(\"This is a hybrid command!\")\n\nThe above command can be invoked as both text and slash command. Note that you have to manually\nsync your :class:`~app_commands.CommandTree` by calling :class:`~app_commands.CommandTree.sync` in order\nfor slash commands to appear.\n\n.. image:: /images/commands/hybrid1.png\n.. image:: /images/commands/hybrid2.png\n\nYou can create hybrid command groups and sub-commands using the :meth:`.Bot.hybrid_group`\ndecorator.\n\n.. code-block:: python3\n\n    @bot.hybrid_group(fallback=\"get\")\n    async def tag(ctx, name):\n        await ctx.send(f\"Showing tag: {name}\")\n\n    @tag.command()\n    async def create(ctx, name):\n        await ctx.send(f\"Created tag: {name}\")\n\nDue to a Discord limitation, slash command groups cannot be invoked directly so the ``fallback``\nparameter allows you to create a sub-command that will be bound to callback of parent group.\n\n.. image:: /images/commands/hybrid3.png\n.. image:: /images/commands/hybrid4.png\n\nDue to certain limitations on slash commands, some features of text commands are not supported\non hybrid commands. You can define a hybrid command as long as it meets the same subset that is\nsupported for slash commands.\n\nFollowing are currently **not supported** by hybrid commands:\n\n- Variable number of arguments. e.g. ``*arg: int``\n- Group commands with a depth greater than 1.\n- Most :class:`typing.Union` types.\n    - Unions of channel types are allowed\n    - Unions of user types are allowed\n    - Unions of user types with roles are allowed\n\nApart from that, all other features such as converters, checks, autocomplete, flags etc.\nare supported on hybrid commands. Note that due to a design constraint, decorators related to application commands\nsuch as :func:`discord.app_commands.autocomplete` should be placed below the :func:`~ext.commands.hybrid_command` decorator.\n\nFor convenience and ease in writing code, The :class:`~ext.commands.Context` class implements\nsome behavioural changes for various methods and attributes:\n\n- :attr:`.Context.interaction` can be used to retrieve the slash command interaction.\n- Since interaction can only be responded to once, The :meth:`.Context.send` automatically\n  determines whether to send an interaction response or a followup response.\n- :meth:`.Context.defer` defers the interaction response for slash commands but shows typing\n  indicator for text commands.\n"
  },
  {
    "path": "docs/ext/commands/extensions.rst",
    "content": ".. currentmodule:: discord\n\n.. _ext_commands_extensions:\n\nExtensions\n=============\n\nThere 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**.\n\nPrimer\n--------\n\nAn extension at its core is a python file with an entry point called ``setup``. This setup function must be a Python coroutine. It takes a single parameter -- the :class:`~.commands.Bot` that loads the extension.\n\nAn example extension looks like this:\n\n.. code-block:: python3\n    :caption: hello.py\n    :emphasize-lines: 7,8\n\n    from discord.ext import commands\n\n    @commands.command()\n    async def hello(ctx):\n        await ctx.send(f'Hello {ctx.author.display_name}.')\n\n    async def setup(bot):\n        bot.add_command(hello)\n\nIn 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:`.Bot.load_extension`. To load this extension we call ``await bot.load_extension('hello')``.\n\n.. admonition:: Cogs\n    :class: helpful\n\n    Extensions are usually used in conjunction with cogs. To read more about them, check out the documentation, :ref:`ext_commands_cogs`.\n\n.. note::\n\n    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``.\n\nReloading\n-----------\n\nWhen 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`.\n\n.. code-block:: python3\n\n    >>> await bot.reload_extension('hello')\n\nOnce 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.\n\nCleaning Up\n-------------\n\nAlthough 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.\n\nExceptions raised in the ``teardown`` function are ignored, and the extension is still unloaded.\n\n.. code-block:: python3\n    :caption: basic_ext.py\n\n    async def setup(bot):\n        print('I am being loaded!')\n\n    async def teardown(bot):\n        print('I am being unloaded!')\n"
  },
  {
    "path": "docs/ext/commands/index.rst",
    "content": ".. _discord_ext_commands:\n\n``discord.ext.commands`` -- Bot commands framework\n====================================================\n\n``discord.py`` offers a lower level aspect on interacting with Discord. Often times, the library is used for the creation of\nbots. However this task can be daunting and confusing to get correctly the first time. Many times there comes a repetition in\ncreating a bot command framework that is extensible, flexible, and powerful. For this reason, ``discord.py`` comes with an\nextension library that handles this for you.\n\n\n.. toctree::\n    :maxdepth: 2\n\n    commands\n    cogs\n    extensions\n    api\n"
  },
  {
    "path": "docs/ext/tasks/index.rst",
    "content": ".. _discord_ext_tasks:\n\n``discord.ext.tasks`` -- asyncio.Task helpers\n====================================================\n\n.. versionadded:: 1.1.0\n\nOne 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:\n\n- How do I handle :exc:`asyncio.CancelledError`?\n- What do I do if the internet goes out?\n- What is the maximum number of seconds I can sleep anyway?\n\nThe goal of this discord.py extension is to abstract all these worries away from you.\n\nRecipes\n---------\n\nA simple background task in a :class:`~discord.ext.commands.Cog`:\n\n.. code-block:: python3\n\n    from discord.ext import tasks, commands\n\n    class MyCog(commands.Cog):\n        def __init__(self):\n            self.index = 0\n            self.printer.start()\n\n        def cog_unload(self):\n            self.printer.cancel()\n\n        @tasks.loop(seconds=5.0)\n        async def printer(self):\n            print(self.index)\n            self.index += 1\n\nAdding an exception to handle during reconnect:\n\n.. code-block:: python3\n\n    import asyncpg\n    from discord.ext import tasks, commands\n\n    class MyCog(commands.Cog):\n        def __init__(self, bot):\n            self.bot = bot\n            self.data = []\n            self.batch_update.add_exception_type(asyncpg.PostgresConnectionError)\n            self.batch_update.start()\n\n        def cog_unload(self):\n            self.batch_update.cancel()\n\n        @tasks.loop(minutes=5.0)\n        async def batch_update(self):\n            async with self.bot.pool.acquire() as con:\n                # batch update here...\n                pass\n\nLooping a certain amount of times before exiting:\n\n.. code-block:: python3\n\n    from discord.ext import tasks\n    import discord\n\n    @tasks.loop(seconds=5.0, count=5)\n    async def slow_count():\n        print(slow_count.current_loop)\n\n    @slow_count.after_loop\n    async def after_slow_count():\n        print('done!')\n\n    class MyClient(discord.Client):\n        async def setup_hook(self):\n            slow_count.start()\n\nWaiting until the bot is ready before the loop starts:\n\n.. code-block:: python3\n\n    from discord.ext import tasks, commands\n\n    class MyCog(commands.Cog):\n        def __init__(self, bot):\n            self.index = 0\n            self.bot = bot\n            self.printer.start()\n\n        def cog_unload(self):\n            self.printer.cancel()\n\n        @tasks.loop(seconds=5.0)\n        async def printer(self):\n            print(self.index)\n            self.index += 1\n\n        @printer.before_loop\n        async def before_printer(self):\n            print('waiting...')\n            await self.bot.wait_until_ready()\n\nDoing something during cancellation:\n\n.. code-block:: python3\n\n    from discord.ext import tasks, commands\n    import asyncio\n\n    class MyCog(commands.Cog):\n        def __init__(self, bot):\n            self.bot = bot\n            self._batch = []\n            self.lock = asyncio.Lock()\n            self.bulker.start()\n\n        async def cog_unload(self):\n            self.bulker.cancel()\n\n        async def do_bulk(self):\n            # bulk insert data here\n            ...\n\n        @tasks.loop(seconds=10.0)\n        async def bulker(self):\n            async with self.lock:\n                await self.do_bulk()\n\n        @bulker.after_loop\n        async def on_bulker_cancel(self):\n            if self.bulker.is_being_cancelled() and len(self._batch) != 0:\n                # if we're cancelled and we have some data left...\n                # let's insert it to our database\n                await self.do_bulk()\n\nDoing something at a specific time each day:\n\n.. code-block:: python3\n\n    import datetime\n    from discord.ext import commands, tasks\n\n    utc = datetime.timezone.utc\n\n    # If no tzinfo is given then UTC is assumed.\n    time = datetime.time(hour=8, minute=30, tzinfo=utc)\n\n    class MyCog(commands.Cog):\n        def __init__(self, bot):\n            self.bot = bot\n            self.my_task.start()\n\n        def cog_unload(self):\n            self.my_task.cancel()\n\n        @tasks.loop(time=time)\n        async def my_task(self):\n            print(\"My task is running!\")\n\nDoing something at multiple specific times each day:\n\n.. code-block:: python3\n\n    import datetime\n    from discord.ext import commands, tasks\n\n    utc = datetime.timezone.utc\n\n    # If no tzinfo is given then UTC is assumed.\n    times = [\n        datetime.time(hour=8, tzinfo=utc),\n        datetime.time(hour=12, minute=30, tzinfo=utc),\n        datetime.time(hour=16, minute=40, second=30, tzinfo=utc)\n    ]\n\n    class MyCog(commands.Cog):\n        def __init__(self, bot):\n            self.bot = bot\n            self.my_task.start()\n\n        def cog_unload(self):\n            self.my_task.cancel()\n\n        @tasks.loop(time=times)\n        async def my_task(self):\n            print(\"My task is running!\")\n\n.. _ext_tasks_api:\n\nAPI Reference\n---------------\n\n.. attributetable:: discord.ext.tasks.Loop\n\n.. autoclass:: discord.ext.tasks.Loop()\n    :members:\n    :special-members: __call__\n    :exclude-members: after_loop, before_loop, error\n\n    .. automethod:: Loop.after_loop()\n        :decorator:\n\n    .. automethod:: Loop.before_loop()\n        :decorator:\n\n    .. automethod:: Loop.error()\n        :decorator:\n\n.. autofunction:: discord.ext.tasks.loop\n    :decorator:\n"
  },
  {
    "path": "docs/extensions/attributetable.py",
    "content": "from __future__ import annotations\nimport importlib\nimport inspect\nimport re\nfrom typing import Dict, List, NamedTuple, Optional, Tuple, Sequence, TYPE_CHECKING\n\nfrom docutils import nodes\nfrom sphinx import addnodes\nfrom sphinx.application import Sphinx\nfrom sphinx.environment import BuildEnvironment\nfrom sphinx.locale import _\nfrom sphinx.util.docutils import SphinxDirective\nfrom sphinx.util.typing import OptionSpec\n\nif TYPE_CHECKING:\n    from .builder import DPYHTML5Translator\n\n\nclass attributetable(nodes.General, nodes.Element):\n    pass\n\n\nclass attributetablecolumn(nodes.General, nodes.Element):\n    pass\n\n\nclass attributetabletitle(nodes.TextElement):\n    pass\n\n\nclass attributetableplaceholder(nodes.General, nodes.Element):\n    pass\n\n\nclass attributetablebadge(nodes.TextElement):\n    pass\n\n\nclass attributetable_item(nodes.Part, nodes.Element):\n    pass\n\n\ndef visit_attributetable_node(self: DPYHTML5Translator, node: attributetable) -> None:\n    class_ = node['python-class']\n    self.body.append(f'<div class=\"py-attribute-table\" data-move-to-id=\"{class_}\">')\n\n\ndef visit_attributetablecolumn_node(self: DPYHTML5Translator, node: attributetablecolumn) -> None:\n    self.body.append(self.starttag(node, 'div', CLASS='py-attribute-table-column'))\n\n\ndef visit_attributetabletitle_node(self: DPYHTML5Translator, node: attributetabletitle) -> None:\n    self.body.append(self.starttag(node, 'span'))\n\n\ndef visit_attributetablebadge_node(self: DPYHTML5Translator, node: attributetablebadge) -> None:\n    attributes = {\n        'class': 'py-attribute-table-badge',\n        'title': node['badge-type'],\n    }\n    self.body.append(self.starttag(node, 'span', **attributes))\n\n\ndef visit_attributetable_item_node(self: DPYHTML5Translator, node: attributetable_item) -> None:\n    self.body.append(self.starttag(node, 'li', CLASS='py-attribute-table-entry'))\n\n\ndef depart_attributetable_node(self: DPYHTML5Translator, node: attributetable) -> None:\n    self.body.append('</div>')\n\n\ndef depart_attributetablecolumn_node(self: DPYHTML5Translator, node: attributetablecolumn) -> None:\n    self.body.append('</div>')\n\n\ndef depart_attributetabletitle_node(self: DPYHTML5Translator, node: attributetabletitle) -> None:\n    self.body.append('</span>')\n\n\ndef depart_attributetablebadge_node(self: DPYHTML5Translator, node: attributetablebadge) -> None:\n    self.body.append('</span>')\n\n\ndef depart_attributetable_item_node(self: DPYHTML5Translator, node: attributetable_item) -> None:\n    self.body.append('</li>')\n\n\n_name_parser_regex = re.compile(r'(?P<module>[\\w.]+\\.)?(?P<name>\\w+)')\n\n\nclass PyAttributeTable(SphinxDirective):\n    has_content = False\n    required_arguments = 1\n    optional_arguments = 0\n    final_argument_whitespace = False\n    option_spec: OptionSpec = {}\n\n    def parse_name(self, content: str) -> Tuple[str, str]:\n        match = _name_parser_regex.match(content)\n        if match is None:\n            raise RuntimeError(f\"content {content} somehow doesn't match regex in {self.env.docname}.\")\n        path, name = match.groups()\n        if path:\n            modulename = path.rstrip('.')\n        else:\n            modulename = self.env.temp_data.get('autodoc:module')\n            if not modulename:\n                modulename = self.env.ref_context.get('py:module')\n        if modulename is None:\n            raise RuntimeError(f'modulename somehow None for {content} in {self.env.docname}.')\n\n        return modulename, name\n\n    def run(self) -> List[attributetableplaceholder]:\n        \"\"\"If you're curious on the HTML this is meant to generate:\n\n        <div class=\"py-attribute-table\">\n            <div class=\"py-attribute-table-column\">\n                <span>_('Attributes')</span>\n                <ul>\n                    <li>\n                        <a href=\"...\">\n                    </li>\n                </ul>\n            </div>\n            <div class=\"py-attribute-table-column\">\n                <span>_('Methods')</span>\n                <ul>\n                    <li>\n                        <a href=\"...\"></a>\n                        <span class=\"py-attribute-badge\" title=\"decorator\">D</span>\n                    </li>\n                </ul>\n            </div>\n        </div>\n\n        However, since this requires the tree to be complete\n        and parsed, it'll need to be done at a different stage and then\n        replaced.\n        \"\"\"\n        content = self.arguments[0].strip()\n        node = attributetableplaceholder('')\n        modulename, name = self.parse_name(content)\n        node['python-doc'] = self.env.docname\n        node['python-module'] = modulename\n        node['python-class'] = name\n        node['python-full-name'] = f'{modulename}.{name}'\n        return [node]\n\n\ndef build_lookup_table(env: BuildEnvironment) -> Dict[str, List[str]]:\n    # Given an environment, load up a lookup table of\n    # full-class-name: objects\n    result = {}\n    domain = env.domains['py']\n\n    ignored = {\n        'data',\n        'exception',\n        'module',\n        'class',\n    }\n\n    for fullname, _, objtype, docname, _, _ in domain.get_objects():\n        if objtype in ignored:\n            continue\n\n        classname, _, child = fullname.rpartition('.')\n        try:\n            result[classname].append(child)\n        except KeyError:\n            result[classname] = [child]\n\n    return result\n\n\nclass TableElement(NamedTuple):\n    fullname: str\n    label: str\n    badge: Optional[attributetablebadge]\n\n\ndef process_attributetable(app: Sphinx, doctree: nodes.Node, fromdocname: str) -> None:\n    env = app.builder.env\n\n    lookup = build_lookup_table(env)\n    for node in doctree.traverse(attributetableplaceholder):\n        modulename, classname, fullname = node['python-module'], node['python-class'], node['python-full-name']\n        groups = get_class_results(lookup, modulename, classname, fullname)\n        table = attributetable('')\n        for label, subitems in groups.items():\n            if not subitems:\n                continue\n            table.append(class_results_to_node(label, sorted(subitems, key=lambda c: c.label)))\n\n        table['python-class'] = fullname\n\n        if not table:\n            node.replace_self([])\n        else:\n            node.replace_self([table])\n\n\ndef get_class_results(\n    lookup: Dict[str, List[str]], modulename: str, name: str, fullname: str\n) -> Dict[str, List[TableElement]]:\n    module = importlib.import_module(modulename)\n    cls = getattr(module, name)\n\n    groups: Dict[str, List[TableElement]] = {\n        _('Attributes'): [],\n        _('Methods'): [],\n    }\n\n    try:\n        members = lookup[fullname]\n    except KeyError:\n        return groups\n\n    for attr in members:\n        attrlookup = f'{fullname}.{attr}'\n        key = _('Attributes')\n        badge = None\n        label = attr\n        value = None\n\n        for base in cls.__mro__:\n            value = base.__dict__.get(attr)\n            if value is not None:\n                break\n\n        if value is not None:\n            doc = value.__doc__ or ''\n            if inspect.iscoroutinefunction(value) or doc.startswith('|coro|'):\n                key = _('Methods')\n                badge = attributetablebadge('async', 'async')\n                badge['badge-type'] = _('coroutine')\n            elif isinstance(value, classmethod):\n                key = _('Methods')\n                label = f'{name}.{attr}'\n                badge = attributetablebadge('cls', 'cls')\n                badge['badge-type'] = _('classmethod')\n            elif inspect.isfunction(value):\n                if doc.startswith(('A decorator', 'A shortcut decorator')):\n                    # finicky but surprisingly consistent\n                    key = _('Methods')\n                    badge = attributetablebadge('@', '@')\n                    badge['badge-type'] = _('decorator')\n                elif inspect.isasyncgenfunction(value):\n                    key = _('Methods')\n                    badge = attributetablebadge('async for', 'async for')\n                    badge['badge-type'] = _('async iterable')\n                else:\n                    key = _('Methods')\n                    badge = attributetablebadge('def', 'def')\n                    badge['badge-type'] = _('method')\n\n        groups[key].append(TableElement(fullname=attrlookup, label=label, badge=badge))\n\n    return groups\n\n\ndef class_results_to_node(key: str, elements: Sequence[TableElement]) -> attributetablecolumn:\n    title = attributetabletitle(key, key)\n    ul = nodes.bullet_list('')\n    for element in elements:\n        ref = nodes.reference(\n            '', '', internal=True, refuri=f'#{element.fullname}', anchorname='', *[nodes.Text(element.label)]\n        )\n        para = addnodes.compact_paragraph('', '', ref)\n        if element.badge is not None:\n            ul.append(attributetable_item('', element.badge, para))\n        else:\n            ul.append(attributetable_item('', para))\n\n    return attributetablecolumn('', title, ul)\n\n\ndef setup(app: Sphinx):\n    app.add_directive('attributetable', PyAttributeTable)\n    app.add_node(attributetable, html=(visit_attributetable_node, depart_attributetable_node))\n    app.add_node(attributetablecolumn, html=(visit_attributetablecolumn_node, depart_attributetablecolumn_node))\n    app.add_node(attributetabletitle, html=(visit_attributetabletitle_node, depart_attributetabletitle_node))\n    app.add_node(attributetablebadge, html=(visit_attributetablebadge_node, depart_attributetablebadge_node))\n    app.add_node(attributetable_item, html=(visit_attributetable_item_node, depart_attributetable_item_node))\n    app.add_node(attributetableplaceholder)\n    app.connect('doctree-resolved', process_attributetable)\n    return {'parallel_read_safe': True}\n"
  },
  {
    "path": "docs/extensions/builder.py",
    "content": "from sphinx.builders.html import StandaloneHTMLBuilder\nfrom sphinx.builders.gettext import MessageCatalogBuilder, I18nBuilder, timestamp, ltz, should_write, GettextRenderer\nfrom sphinx.locale import __\nfrom sphinx.util import status_iterator\nfrom sphinx.util.osutil import ensuredir\nfrom sphinx.environment.adapters.indexentries import IndexEntries\nfrom sphinx.writers.html5 import HTML5Translator\nimport datetime\nimport os\nimport re\n\n\nclass DPYHTML5Translator(HTML5Translator):\n    def visit_section(self, node):\n        self.section_level += 1\n        self.body.append(self.starttag(node, 'section'))\n\n    def depart_section(self, node):\n        self.section_level -= 1\n        self.body.append('</section>\\n')\n\n    def visit_table(self, node):\n        self.body.append('<div class=\"table-wrapper\">')\n        super().visit_table(node)\n\n    def depart_table(self, node):\n        super().depart_table(node)\n        self.body.append('</div>')\n\n\nclass DPYStandaloneHTMLBuilder(StandaloneHTMLBuilder):\n    # This is mostly copy pasted from Sphinx.\n    def write_genindex(self) -> None:\n        # the total count of lines for each index letter, used to distribute\n        # the entries into two columns\n        genindex = IndexEntries(self.env).create_index(self, group_entries=False)\n        indexcounts = []\n        for _k, entries in genindex:\n            indexcounts.append(sum(1 + len(subitems) for _, (_, subitems, _) in entries))\n\n        genindexcontext = {\n            'genindexentries': genindex,\n            'genindexcounts': indexcounts,\n            'split_index': self.config.html_split_index,\n        }\n\n        if self.config.html_split_index:\n            self.handle_page('genindex', genindexcontext, 'genindex-split.html')\n            self.handle_page('genindex-all', genindexcontext, 'genindex.html')\n            for (key, entries), count in zip(genindex, indexcounts):\n                ctx = {'key': key, 'entries': entries, 'count': count, 'genindexentries': genindex}\n                self.handle_page('genindex-' + key, ctx, 'genindex-single.html')\n        else:\n            self.handle_page('genindex', genindexcontext, 'genindex.html')\n\n\nclass DPYMessageCatalogBuilder(MessageCatalogBuilder):\n    _ADMONITION_REGEX = re.compile(r'\\.\\.\\s*[a-zA-Z\\_-]+::')\n\n    def finish(self) -> None:\n        # Bypass MessageCatalogBuilder.finish\n        I18nBuilder.finish(self)\n\n        # This is mostly copy pasted from Sphinx\n        # However, this allows\n        context = {\n            'version': self.config.version,\n            'copyright': self.config.copyright,\n            'project': self.config.project,\n            'last_translator': self.config.gettext_last_translator,\n            'language_team': self.config.gettext_language_team,\n            'ctime': datetime.datetime.fromtimestamp(timestamp, ltz).strftime('%Y-%m-%d %H:%M%z'),\n            'display_location': self.config.gettext_location,\n            'display_uuid': self.config.gettext_uuid,\n        }\n\n        REGEX = self._ADMONITION_REGEX\n        for textdomain, catalog in status_iterator(\n            self.catalogs.items(),\n            __(\"writing message catalogs... \"),\n            \"darkgreen\",\n            len(self.catalogs),\n            self.app.verbosity,\n            lambda textdomain__: textdomain__[0],\n        ):\n            # noop if config.gettext_compact is set\n            ensuredir(os.path.join(self.outdir, os.path.dirname(textdomain)))\n\n            # Due to a bug in Sphinx where messages contain admonitions, this code makes it\n            # so they're suppressed from the output to prevent the output and CI from breaking\n            # This is quite a bandaid fix but it seems to work ok\n            # See https://github.com/sphinx-doc/sphinx/issues/10334\n            context['messages'] = [msg for msg in catalog if REGEX.search(msg.text) is None]\n\n            content = GettextRenderer(template_path='_templates/gettext', outdir=self.outdir).render(\n                'message.pot_t', context\n            )\n\n            pofn = os.path.join(self.outdir, textdomain + '.pot')\n            if should_write(pofn, content):\n                with open(pofn, 'w', encoding='utf-8') as pofile:\n                    pofile.write(content)\n\n\ndef add_custom_jinja2(app):\n    env = app.builder.templates.environment\n    env.tests['prefixedwith'] = str.startswith\n    env.tests['suffixedwith'] = str.endswith\n\n\ndef add_builders(app):\n    \"\"\"This is necessary because RTD injects their own for some reason.\"\"\"\n    app.set_translator('html', DPYHTML5Translator, override=True)\n    app.add_builder(DPYStandaloneHTMLBuilder, override=True)\n    app.add_builder(DPYMessageCatalogBuilder, override=True)\n\n    try:\n        original = app.registry.builders['readthedocs']\n    except KeyError:\n        pass\n    else:\n        injected_mro = tuple(\n            base if base is not StandaloneHTMLBuilder else DPYStandaloneHTMLBuilder for base in original.mro()[1:]\n        )\n        new_builder = type(original.__name__, injected_mro, {'name': 'readthedocs'})\n        app.set_translator('readthedocs', DPYHTML5Translator, override=True)\n        app.add_builder(new_builder, override=True)\n\n\ndef setup(app):\n    add_builders(app)\n    app.connect('builder-inited', add_custom_jinja2)\n    return {'parallel_read_safe': True}\n"
  },
  {
    "path": "docs/extensions/colour_preview.py",
    "content": "from __future__ import annotations\nfrom typing import Dict, Any\n\nfrom sphinx.util.docutils import SphinxDirective\nfrom docutils.parsers.rst import directives\nfrom docutils import nodes\n\nimport sphinx\nfrom sphinx.application import Sphinx\n\n\nclass colour_input(nodes.General, nodes.Element):\n    pass\n\n\ndef visit_colour_node(self, node):\n    self.body.append(\n        self.starttag(\n            node,\n            'input',\n            empty=True,\n            type='color',\n            value=node.rawsource,\n            disabled='',\n            CLASS=node.attributes.get('class', ''),\n        )\n    )\n\n\ndef depart_colour_node(self, node):\n    pass\n\n\nclass ColourDirective(SphinxDirective):\n    required_arguments = 1\n    has_content = False\n\n    option_spec = {\n        'class': directives.class_option,\n    }\n\n    def run(self):\n        node = colour_input(self.arguments[0], **self.options)\n        self.state.nested_parse(self.content, self.content_offset, node)\n        return [node]\n\n\ndef setup(app: Sphinx) -> Dict[str, Any]:\n    app.add_node(colour_input, html=(visit_colour_node, depart_colour_node))\n    app.add_directive('colour', ColourDirective)\n    return {'version': sphinx.__display_version__, 'parallel_read_safe': True}\n"
  },
  {
    "path": "docs/extensions/details.py",
    "content": "from docutils.parsers.rst import Directive\nfrom docutils.parsers.rst import states, directives\nfrom docutils.parsers.rst.roles import set_classes\nfrom docutils import nodes\n\nclass details(nodes.General, nodes.Element):\n    pass\n\nclass summary(nodes.General, nodes.Element):\n    pass\n\ndef visit_details_node(self, node):\n    self.body.append(self.starttag(node, 'details', CLASS=node.attributes.get('class', '')))\n\ndef visit_summary_node(self, node):\n    self.body.append(self.starttag(node, 'summary', CLASS=node.attributes.get('summary-class', '')))\n    self.body.append(node.rawsource)\n\ndef depart_details_node(self, node):\n    self.body.append('</details>\\n')\n\ndef depart_summary_node(self, node):\n    self.body.append('</summary>')\n\nclass DetailsDirective(Directive):\n    final_argument_whitespace = True\n    optional_arguments = 1\n\n    option_spec = {\n        'class': directives.class_option,\n        'summary-class': directives.class_option,\n    }\n\n    has_content = True\n\n    def run(self):\n        set_classes(self.options)\n        self.assert_has_content()\n\n        text = '\\n'.join(self.content)\n        node = details(text, **self.options)\n\n        if self.arguments:\n            summary_node = summary(self.arguments[0], **self.options)\n            summary_node.source, summary_node.line = self.state_machine.get_source_and_line(self.lineno)\n            node += summary_node\n\n        self.state.nested_parse(self.content, self.content_offset, node)\n        return [node]\n\ndef setup(app):\n    app.add_node(details, html=(visit_details_node, depart_details_node))\n    app.add_node(summary, html=(visit_summary_node, depart_summary_node))\n    app.add_directive('details', DetailsDirective)\n    return {'parallel_read_safe': True}\n"
  },
  {
    "path": "docs/extensions/exception_hierarchy.py",
    "content": "from docutils.parsers.rst import Directive\nfrom docutils.parsers.rst import states, directives\nfrom docutils.parsers.rst.roles import set_classes\nfrom docutils import nodes\nfrom sphinx.locale import _\n\nclass exception_hierarchy(nodes.General, nodes.Element):\n    pass\n\ndef visit_exception_hierarchy_node(self, node):\n    self.body.append(self.starttag(node, 'div', CLASS='exception-hierarchy-content'))\n\ndef depart_exception_hierarchy_node(self, node):\n    self.body.append('</div>\\n')\n\nclass ExceptionHierarchyDirective(Directive):\n    has_content = True\n\n    def run(self):\n        self.assert_has_content()\n        node = exception_hierarchy('\\n'.join(self.content))\n        self.state.nested_parse(self.content, self.content_offset, node)\n        return [node]\n\ndef setup(app):\n    app.add_node(exception_hierarchy, html=(visit_exception_hierarchy_node, depart_exception_hierarchy_node))\n    app.add_directive('exception_hierarchy', ExceptionHierarchyDirective)\n    return {'parallel_read_safe': True}\n"
  },
  {
    "path": "docs/extensions/nitpick_file_ignorer.py",
    "content": "import logging\n\nfrom sphinx.application import Sphinx\nfrom sphinx.util import logging as sphinx_logging\n\n\nclass NitpickFileIgnorer(logging.Filter):\n    \n    def __init__(self, app: Sphinx) -> None:\n        self.app = app\n        super().__init__()\n\n    def filter(self, record: sphinx_logging.SphinxLogRecord) -> bool:\n        if getattr(record, 'type', None) == 'ref':\n            return record.location.get('refdoc') not in self.app.config.nitpick_ignore_files\n        return True\n\n\ndef setup(app: Sphinx):\n    app.add_config_value('nitpick_ignore_files', [], '')\n    f = NitpickFileIgnorer(app)\n    sphinx_logging.getLogger('sphinx.transforms.post_transforms').logger.addFilter(f)\n    return {'parallel_read_safe': True}\n"
  },
  {
    "path": "docs/extensions/resourcelinks.py",
    "content": "# Credit to sphinx.ext.extlinks for being a good starter\n# Copyright 2007-2020 by the Sphinx team\n# Licensed under BSD.\n\nfrom typing import Any, Dict, List, Tuple\n\nfrom docutils import nodes, utils\nfrom docutils.nodes import Node, system_message\nfrom docutils.parsers.rst.states import Inliner\n\nimport sphinx\nfrom sphinx.application import Sphinx\nfrom sphinx.util.nodes import split_explicit_title\nfrom sphinx.util.typing import RoleFunction\n\n\ndef make_link_role(resource_links: Dict[str, str]) -> RoleFunction:\n    def role(\n        typ: str,\n        rawtext: str,\n        text: str,\n        lineno: int,\n        inliner: Inliner,\n        options: Dict = {},\n        content: List[str] = []\n    ) -> Tuple[List[Node], List[system_message]]:\n\n        text = utils.unescape(text)\n        has_explicit_title, title, key = split_explicit_title(text)\n        full_url = resource_links[key]\n        if not has_explicit_title:\n            title = full_url\n        pnode = nodes.reference(title, title, internal=False, refuri=full_url)\n        return [pnode], []\n    return role\n\n\ndef add_link_role(app: Sphinx) -> None:\n    app.add_role('resource', make_link_role(app.config.resource_links))\n\ndef setup(app: Sphinx) -> Dict[str, Any]:\n    app.add_config_value('resource_links', {}, 'env')\n    app.connect('builder-inited', add_link_role)\n    return {'version': sphinx.__display_version__, 'parallel_read_safe': True}\n"
  },
  {
    "path": "docs/faq.rst",
    "content": ":orphan:\n\n.. currentmodule:: discord\n.. _faq:\n\nFrequently Asked Questions\n===========================\n\nThis is a list of Frequently Asked Questions regarding using ``discord.py`` and its extension modules. Feel free to suggest a\nnew question or submit one via pull requests.\n\n.. contents:: Questions\n    :local:\n\nCoroutines\n------------\n\nQuestions regarding coroutines and asyncio belong here.\n\nWhat is a coroutine?\n~~~~~~~~~~~~~~~~~~~~~~\n\nA |coroutine_link|_ is a function that must be invoked with ``await`` or ``yield from``. When Python encounters an ``await`` it stops\nthe function's execution at that point and works on other things until it comes back to that point and finishes off its work.\nThis allows for your program to be doing multiple things at the same time without using threads or complicated\nmultiprocessing.\n\n**If you forget to await a coroutine then the coroutine will not run. Never forget to await a coroutine.**\n\nWhere can I use ``await``\\?\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nYou can only use ``await`` inside ``async def`` functions and nowhere else.\n\nWhat does \"blocking\" mean?\n~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nIn asynchronous programming a blocking call is essentially all the parts of the function that are not ``await``. Do not\ndespair however, because not all forms of blocking are bad! Using blocking calls is inevitable, but you must work to make\nsure that you don't excessively block functions. Remember, if you block for too long then your bot will freeze since it has\nnot stopped the function's execution at that point to do other things.\n\nIf logging is enabled, this library will attempt to warn you that blocking is occurring with the message:\n``Heartbeat blocked for more than N seconds.``\nSee :ref:`logging_setup` for details on enabling logging.\n\nA common source of blocking for too long is something like :func:`time.sleep`. Don't do that. Use :func:`asyncio.sleep`\ninstead. Similar to this example: ::\n\n    # bad\n    time.sleep(10)\n\n    # good\n    await asyncio.sleep(10)\n\nAnother common source of blocking for too long is using HTTP requests with the famous module :doc:`req:index`.\nWhile :doc:`req:index` is an amazing module for non-asynchronous programming, it is not a good choice for\n:mod:`asyncio` because certain requests can block the event loop too long. Instead, use the :doc:`aiohttp <aio:index>` library which\nis installed on the side with this library.\n\nConsider the following example: ::\n\n    # bad\n    r = requests.get('http://aws.random.cat/meow')\n    if r.status_code == 200:\n        js = r.json()\n        await channel.send(js['file'])\n\n    # good\n    async with aiohttp.ClientSession() as session:\n        async with session.get('http://aws.random.cat/meow') as r:\n            if r.status == 200:\n                js = await r.json()\n                await channel.send(js['file'])\n\nGeneral\n---------\n\nGeneral questions regarding library usage belong here.\n\nWhere can I find usage examples?\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nExample code can be found in the `examples folder <https://github.com/Rapptz/discord.py/tree/master/examples>`_\nin the repository.\n\nHow do I set the \"Playing\" status?\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nThe ``activity`` keyword argument may be passed in the :class:`Client` constructor or :meth:`Client.change_presence`, given an :class:`Activity` object.\n\nThe constructor may be used for static activities, while :meth:`Client.change_presence` may be used to update the activity at runtime.\n\n.. warning::\n\n    It is highly discouraged to use :meth:`Client.change_presence` or API calls in :func:`on_ready` as this event may be called many times while running, not just once.\n\n    There is a high chance of disconnecting if presences are changed right after connecting.\n\nThe status type (playing, listening, streaming, watching) can be set using the :class:`ActivityType` enum.\nFor memory optimisation purposes, some activities are offered in slimmed-down versions:\n\n- :class:`Game`\n- :class:`Streaming`\n\nPutting both of these pieces of info together, you get the following: ::\n\n    client = discord.Client(activity=discord.Game(name='my game'))\n\n    # or, for watching:\n    activity = discord.Activity(name='my activity', type=discord.ActivityType.watching)\n    client = discord.Client(activity=activity)\n\nHow do I send a message to a specific channel?\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nYou must fetch the channel directly and then call the appropriate method. Example: ::\n\n    channel = client.get_channel(12324234183172)\n    await channel.send('hello')\n\nHow do I send a DM?\n~~~~~~~~~~~~~~~~~~~\n\nGet the :class:`User` or :class:`Member` object and call :meth:`abc.Messageable.send`. For example: ::\n\n    user = client.get_user(381870129706958858)\n    await user.send('👀')\n\nIf you are responding to an event, such as :func:`on_message`, you already have the :class:`User` object via :attr:`Message.author`: ::\n\n    await message.author.send('👋')\n\nHow do I get the ID of a sent message?\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n:meth:`abc.Messageable.send` returns the :class:`Message` that was sent.\nThe ID of a message can be accessed via :attr:`Message.id`: ::\n\n    message = await channel.send('hmm…')\n    message_id = message.id\n\nHow do I upload an image?\n~~~~~~~~~~~~~~~~~~~~~~~~~\n\nTo upload something to Discord you have to use the :class:`File` object.\n\nA :class:`File` accepts two parameters, the file-like object (or file path) and the filename\nto pass to Discord when uploading.\n\nIf you want to upload an image it's as simple as: ::\n\n    await channel.send(file=discord.File('my_file.png'))\n\nIf you have a file-like object you can do as follows: ::\n\n    with open('my_file.png', 'rb') as fp:\n        await channel.send(file=discord.File(fp, 'new_filename.png'))\n\nTo upload multiple files, you can use the ``files`` keyword argument instead of ``file``\\: ::\n\n    my_files = [\n        discord.File('result.zip'),\n        discord.File('teaser_graph.png'),\n    ]\n    await channel.send(files=my_files)\n\nIf you want to upload something from a URL, you will have to use an HTTP request using :doc:`aiohttp <aio:index>`\nand then pass an :class:`io.BytesIO` instance to :class:`File` like so:\n\n.. code-block:: python3\n\n    import io\n    import aiohttp\n\n    async with aiohttp.ClientSession() as session:\n        async with session.get(my_url) as resp:\n            if resp.status != 200:\n                return await channel.send('Could not download file...')\n            data = io.BytesIO(await resp.read())\n            await channel.send(file=discord.File(data, 'cool_image.png'))\n\n\nHow can I add a reaction to a message?\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nYou use the :meth:`Message.add_reaction` method.\n\nIf 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:\n\n- ``'👍'``\n- ``'\\U0001F44D'``\n- ``'\\N{THUMBS UP SIGN}'``\n\nQuick example:\n\n.. code-block:: python3\n\n    emoji = '\\N{THUMBS UP SIGN}'\n    # or '\\U0001f44d' or '👍'\n    await message.add_reaction(emoji)\n\nIn case you want to use emoji that come from a message, you already get their code points in the content without needing\nto do anything special. You **cannot** send ``':thumbsup:'`` style shorthands.\n\nFor custom emoji, you should pass an instance of :class:`Emoji`. You can also pass a ``'<:name:id>'`` string, but if you\ncan use said emoji, you should be able to use :meth:`Client.get_emoji` to get an emoji via ID or use :func:`utils.find`/\n:func:`utils.get` on :attr:`Client.emojis` or :attr:`Guild.emojis` collections.\n\nThe name and ID of a custom emoji can be found with the client by prefixing ``:custom_emoji:`` with a backslash.\nFor example, sending the message ``\\:python3:`` with the client will result in ``<:python3:232720527448342530>``.\n\nQuick example:\n\n.. code-block:: python3\n\n\n    # if you have the ID already\n    emoji = client.get_emoji(310177266011340803)\n    await message.add_reaction(emoji)\n\n    # no ID, do a lookup\n    emoji = discord.utils.get(guild.emojis, name='LUL')\n    if emoji:\n        await message.add_reaction(emoji)\n\n    # if you have the name and ID of a custom emoji:\n    emoji = '<:python3:232720527448342530>'\n    await message.add_reaction(emoji)\n\nHow do I pass a coroutine to the player's \"after\" function?\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nThe library's music player launches on a separate thread, ergo it does not execute inside a coroutine.\nThis does not mean that it is not possible to call a coroutine in the ``after`` parameter. To do so you must pass a callable\nthat wraps up a couple of aspects.\n\nThe first gotcha that you must be aware of is that calling a coroutine is not a thread-safe operation. Since we are\ntechnically in another thread, we must take caution in calling thread-safe operations so things do not bug out. Luckily for\nus, :mod:`asyncio` comes with a :func:`asyncio.run_coroutine_threadsafe` function that allows us to call\na coroutine from another thread.\n\nHowever, this function returns a :class:`~concurrent.futures.Future` and to actually call it we have to fetch its result. Putting all of\nthis together we can do the following:\n\n.. code-block:: python3\n\n    def my_after(error):\n        coro = some_channel.send('Song is done!')\n        fut = asyncio.run_coroutine_threadsafe(coro, client.loop)\n        try:\n            fut.result()\n        except:\n            # an error happened sending the message\n            pass\n\n    voice.play(discord.FFmpegPCMAudio(url), after=my_after)\n\nHow do I run something in the background?\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n`Check the background_task.py example. <https://github.com/Rapptz/discord.py/blob/master/examples/background_task.py>`_\n\nHow do I get a specific model?\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nThere are multiple ways of doing this. If you have a specific model's ID then you can use\none of the following functions:\n\n- :meth:`Client.get_channel`\n- :meth:`Client.get_guild`\n- :meth:`Client.get_user`\n- :meth:`Client.get_emoji`\n- :meth:`Guild.get_member`\n- :meth:`Guild.get_channel`\n- :meth:`Guild.get_role`\n\nThe following use an HTTP request:\n\n- :meth:`abc.Messageable.fetch_message`\n- :meth:`Client.fetch_user`\n- :meth:`Client.fetch_guilds`\n- :meth:`Client.fetch_guild`\n- :meth:`Guild.fetch_emoji`\n- :meth:`Guild.fetch_emojis`\n- :meth:`Guild.fetch_member`\n\n\nIf the functions above do not help you, then use of :func:`utils.find` or :func:`utils.get` would serve some use in finding\nspecific models.\n\nQuick example:\n\n.. code-block:: python3\n\n    # find a guild by name\n    guild = discord.utils.get(client.guilds, name='My Server')\n\n    # make sure to check if it's found\n    if guild is not None:\n        # find a channel by name\n        channel = discord.utils.get(guild.text_channels, name='cool-channel')\n\nHow do I make a web request?\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nTo make a request, you should use a non-blocking library.\nThis library already uses and requires a 3rd party library for making requests, :doc:`aiohttp <aio:index>`.\n\nQuick example:\n\n.. code-block:: python3\n\n    async with aiohttp.ClientSession() as session:\n        async with session.get('http://aws.random.cat/meow') as r:\n            if r.status == 200:\n                js = await r.json()\n\nSee `aiohttp's full documentation <http://aiohttp.readthedocs.io/en/stable/>`_ for more information.\n\n.. _local_image:\n\nHow do I use a local image file for an embed image?\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nDiscord special-cases uploading an image attachment and using it within an embed so that it will not\ndisplay separately, but instead in the embed's thumbnail, image, footer or author icon.\n\nTo do so, upload the image normally with :meth:`abc.Messageable.send`,\nand set the embed's image URL to ``attachment://image.png``,\nwhere ``image.png`` is the filename of the image you will send.\n\n\nQuick example:\n\n.. code-block:: python3\n\n    file = discord.File(\"path/to/my/image.png\", filename=\"image.png\")\n    embed = discord.Embed()\n    embed.set_image(url=\"attachment://image.png\")\n    await channel.send(file=file, embed=embed)\n\nIs there an event for audit log entries being created?\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nThis event is now available in the library and Discord as of version 2.2. It can be found under :func:`on_audit_log_entry_create`.\n\n\nCommands Extension\n-------------------\n\nQuestions regarding ``discord.ext.commands`` belong here.\n\nWhy does ``on_message`` make my commands stop working?\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nOverriding the default provided ``on_message`` forbids any extra commands from running. To fix this, add a\n``bot.process_commands(message)`` line at the end of your ``on_message``. For example: ::\n\n    @bot.event\n    async def on_message(message):\n        # do some extra stuff here\n\n        await bot.process_commands(message)\n\nAlternatively, you can place your ``on_message`` logic into a **listener**. In this setup, you should not\nmanually call ``bot.process_commands()``. This also allows you to do multiple things asynchronously in response\nto a message. Example::\n\n    @bot.listen('on_message')\n    async def whatever_you_want_to_call_it(message):\n        # do stuff here\n        # do not process commands here\n\nWhy do my arguments require quotes?\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nIn a simple command defined as:\n\n.. code-block:: python3\n\n    @bot.command()\n    async def echo(ctx, message: str):\n        await ctx.send(message)\n\nCalling it via ``?echo a b c`` will only fetch the first argument and disregard the rest. To fix this you should either call\nit via ``?echo \"a b c\"`` or change the signature to have \"consume rest\" behaviour. Example:\n\n.. code-block:: python3\n\n    @bot.command()\n    async def echo(ctx, *, message: str):\n        await ctx.send(message)\n\nThis will allow you to use ``?echo a b c`` without needing the quotes.\n\nHow do I get the original ``message``\\?\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nThe :class:`~ext.commands.Context` contains an attribute, :attr:`~.Context.message` to get the original\nmessage.\n\nExample:\n\n.. code-block:: python3\n\n    @bot.command()\n    async def length(ctx):\n        await ctx.send(f'Your message is {len(ctx.message.content)} characters long.')\n\nHow do I make a subcommand?\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nUse the :func:`~ext.commands.group` decorator. This will transform the callback into a :class:`~ext.commands.Group` which will allow you to add commands into\nthe group operating as \"subcommands\". These groups can be arbitrarily nested as well.\n\nExample:\n\n.. code-block:: python3\n\n    @bot.group()\n    async def git(ctx):\n        if ctx.invoked_subcommand is None:\n            await ctx.send('Invalid git command passed...')\n\n    @git.command()\n    async def push(ctx, remote: str, branch: str):\n        await ctx.send(f'Pushing to {remote} {branch}')\n\nThis could then be used as ``?git push origin master``.\n\nViews and Modals\n-----------------\n\nQuestions regarding :class:`discord.ui.View`, :class:`discord.ui.Modal`, and their components such as buttons, select menus, etc.\n\nHow can I disable all items on timeout?\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nThis requires three steps.\n\n1. 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`.\n2. Inside :meth:`~ui.View.on_timeout`, loop over all items inside the view and mark them disabled.\n3. Edit the message we retrieved in step 1 with the newly modified view.\n\nPutting it all together, we can do this in a text command:\n\n.. code-block:: python3\n\n    class MyView(discord.ui.View):\n        async def on_timeout(self) -> None:\n            # Step 2\n            for item in self.children:\n                item.disabled = True\n\n            # Step 3\n            await self.message.edit(view=self)\n\n        @discord.ui.button(label='Example')\n        async def example_button(self, interaction: discord.Interaction, button: discord.ui.Button):\n            await interaction.response.send_message('Hello!', ephemeral=True)\n\n    @bot.command()\n    async def timeout_example(ctx):\n        \"\"\"An example to showcase disabling buttons on timing out\"\"\"\n        view = MyView()\n        # Step 1\n        view.message = await ctx.send('Press me!', view=view)\n\nApplication 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`.\n\nPutting it all together, using the previous view definition:\n\n.. code-block:: python3\n\n    @tree.command()\n    async def more_timeout_example(interaction):\n        \"\"\"Another example to showcase disabling buttons on timing out\"\"\"\n        view = MyView()\n        await interaction.response.send_message('Press me!', view=view)\n\n        # Step 1\n        view.message = await interaction.original_response()\n\n\nApplication Commands\n--------------------\n\nQuestions regarding Discord's new application commands, commonly known as \"slash commands\" or \"context menu commands\".\n\nMy bot's commands are not showing up!\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n1. Did you :meth:`~.CommandTree.sync` your command? Commands need to be synced before they will appear.\n2. Did you invite your bot with the correct permissions? Bots need to be invited with the ``applications.commands``\n   scope in addition to the ``bot`` scope. For example, invite the bot with the following URL:\n   ``https://discord.com/oauth2/authorize?client_id=<client id>&scope=applications.commands+bot``.\n   Alternatively, if you use :func:`utils.oauth_url`, you can call the function as such:\n   ``oauth_url(<other options>, scopes=(\"bot\", \"applications.commands\"))``.\n"
  },
  {
    "path": "docs/index.rst",
    "content": ".. discord.py documentation master file, created by\n   sphinx-quickstart on Fri Aug 21 05:43:30 2015.\n   You can adapt this file completely to your liking, but it should at least\n   contain the root `toctree` directive.\n\nWelcome to discord.py\n===========================\n\n.. image:: /images/snake.svg\n.. image:: /images/snake_dark.svg\n\ndiscord.py is a modern, easy to use, feature-rich, and async ready API wrapper\nfor Discord.\n\n**Features:**\n\n- Modern Pythonic API using ``async``\\/``await`` syntax\n- Sane rate limit handling that prevents 429s\n- Command extension to aid with bot creation\n- Easy to use with an object oriented design\n- Optimised for both speed and memory\n\nGetting started\n-----------------\n\nIs this your first time using the library? This is the place to get started!\n\n- **First steps:** :doc:`intro` | :doc:`quickstart` | :doc:`logging`\n- **Working with Discord:** :doc:`discord` | :doc:`intents`\n- **Examples:** Many examples are available in the :resource:`repository <examples>`.\n\nGetting help\n--------------\n\nIf you're having trouble with something, these resources might help.\n\n- Try the :doc:`faq` first, it's got answers to all common questions.\n- Ask us and hang out with us in our :resource:`Discord <discord>` server.\n- If you're looking for something specific, try the :ref:`index <genindex>` or :ref:`searching <search>`.\n- Report bugs in the :resource:`issue tracker <issues>`.\n- Ask in our :resource:`GitHub discussions page <discussions>`.\n\nExtensions\n------------\n\nThese extensions help you during development when it comes to common tasks.\n\n.. toctree::\n  :maxdepth: 1\n\n  ext/commands/index.rst\n  ext/tasks/index.rst\n\nManuals\n---------\n\nThese pages go into great detail about everything the API can do.\n\n.. toctree::\n  :maxdepth: 1\n\n  api\n  interactions/api\n  discord.ext.commands API Reference <ext/commands/api.rst>\n  discord.ext.tasks API Reference <ext/tasks/index.rst>\n\nMeta\n------\n\nIf you're looking for something related to the project itself, it's here.\n\n.. toctree::\n  :maxdepth: 1\n\n  whats_new\n  version_guarantees\n  migrating\n"
  },
  {
    "path": "docs/intents.rst",
    "content": ":orphan:\n\n.. currentmodule:: discord\n.. versionadded:: 1.5\n.. _intents_primer:\n\nA Primer to Gateway Intents\n=============================\n\nIn 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 to specific buckets of events. The events that correspond to each intent is documented in the individual attribute of the :class:`Intents` documentation.\n\nThese intents are passed to the constructor of :class:`Client` or its subclasses (:class:`AutoShardedClient`, :class:`~.AutoShardedBot`, :class:`~.Bot`) with the ``intents`` argument.\n\nWhat intents are needed?\n--------------------------\n\nThe 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.\n\nFor example, if you want a bot that functions without spammy events like presences or typing then we could do the following:\n\n.. code-block:: python3\n   :emphasize-lines: 7,9,10\n\n    import discord\n    intents = discord.Intents.default()\n    intents.typing = False\n    intents.presences = False\n\n    # Somewhere else:\n    # client = discord.Client(intents=intents)\n    # or\n    # from discord.ext import commands\n    # bot = commands.Bot(command_prefix='!', intents=intents)\n\nNote that this doesn't enable :attr:`Intents.members` since it's a privileged intent.\n\nAnother example showing a bot that only deals with messages and guild information:\n\n.. code-block:: python3\n   :emphasize-lines: 7,9,10\n\n    import discord\n    intents = discord.Intents(messages=True, guilds=True)\n    # If you also want reaction events enable the following:\n    # intents.reactions = True\n\n    # Somewhere else:\n    # client = discord.Client(intents=intents)\n    # or\n    # from discord.ext import commands\n    # bot = commands.Bot(command_prefix='!', intents=intents)\n\n.. _privileged_intents:\n\nPrivileged Intents\n---------------------\n\nWith 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**.\n\nA privileged intent is one that requires you to go to the developer portal and manually enable it. To enable privileged intents do the following:\n\n1. Make sure you're logged on to the `Discord website <https://discord.com>`_.\n2. Navigate to the `application page <https://discord.com/developers/applications>`_.\n3. Click on the bot you want to enable privileged intents for.\n4. Navigate to the bot tab on the left side of the screen.\n\n    .. image:: /images/discord_bot_tab.png\n        :alt: The bot tab in the application page.\n\n5. Scroll down to the \"Privileged Gateway Intents\" section and enable the ones you want.\n\n    .. image:: /images/discord_privileged_intents.png\n        :alt: The privileged gateway intents selector.\n\n.. warning::\n\n    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.\n\n.. note::\n\n    Even if you enable intents through the developer portal, you still have to enable the intents\n    through code as well.\n\nDo I need privileged intents?\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nThis is a quick checklist to see if you need specific privileged intents.\n\n.. _need_presence_intent:\n\nPresence Intent\n+++++++++++++++++\n\n- Whether you use :attr:`Member.status` at all to track member statuses.\n- Whether you use :attr:`Member.activity` or :attr:`Member.activities` to check member's activities.\n\n.. _need_members_intent:\n\nMember Intent\n+++++++++++++++\n\n- Whether you track member joins or member leaves, corresponds to :func:`on_member_join` and :func:`on_member_remove` events.\n- Whether you want to track member updates such as nickname or role changes.\n- Whether you want to track user updates such as usernames, avatars, discriminators, etc.\n- Whether you want to request the guild member list through :meth:`Guild.chunk` or :meth:`Guild.fetch_members`.\n- Whether you want high accuracy member cache under :attr:`Guild.members`.\n\n.. _need_message_content_intent:\n\nMessage Content\n+++++++++++++++++\n\n- Whether you use :attr:`Message.content` to check message content.\n- Whether you use :attr:`Message.attachments` to check message attachments.\n- Whether you use :attr:`Message.embeds` to check message embeds.\n- Whether you use :attr:`Message.components` to check message components.\n- Whether you use :attr:`Message.poll` to check the message polls.\n- Whether you use the commands extension with a non-mentioning prefix.\n\n.. _intents_member_cache:\n\nMember Cache\n-------------\n\nAlong 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.\n\nTo 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.\n\nIt should be noted that certain things do not need a member cache since Discord will provide full member information if possible. For example:\n\n- :func:`on_message` will have :attr:`Message.author` be a member even if cache is disabled.\n- :func:`on_voice_state_update` will have the ``member`` parameter be a member even if cache is disabled.\n- :func:`on_reaction_add` will have the ``user`` parameter be a member when in a guild even if cache is disabled.\n- :func:`on_raw_reaction_add` will have :attr:`RawReactionActionEvent.member` be a member when in a guild even if cache is disabled.\n- The reaction add events do not contain additional information when in direct messages. This is a Discord limitation.\n- The reaction removal events do not have member information. This is a Discord limitation.\n\nOther 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.\n\n.. _retrieving_members:\n\nRetrieving Members\n--------------------\n\nIf the 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:\n\n- :meth:`Guild.query_members`\n    - Used to query members by a prefix matching nickname or username.\n    - This can also be used to query members by their user ID.\n    - This uses the gateway and not the HTTP.\n- :meth:`Guild.chunk`\n    - This can be used to fetch the entire member list through the gateway.\n- :meth:`Guild.fetch_member`\n    - Used to fetch a member by ID through the HTTP API.\n- :meth:`Guild.fetch_members`\n    - used to fetch a large number of members through the HTTP API.\n\nIt should be noted that the gateway has a strict rate limit of 120 requests per 60 seconds.\n\nTroubleshooting\n------------------\n\nSome common issues relating to the mandatory intent change.\n\nWhere'd my members go?\n~~~~~~~~~~~~~~~~~~~~~~~~\n\nDue 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.\n\nFor example:\n\n.. code-block:: python3\n   :emphasize-lines: 3,6,8,9\n\n    import discord\n    intents = discord.Intents.default()\n    intents.members = True\n\n    # Somewhere else:\n    # client = discord.Client(intents=intents)\n    # or\n    # from discord.ext import commands\n    # bot = commands.Bot(command_prefix='!', intents=intents)\n\nWhy does ``on_ready`` take so long to fire?\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nAs 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.\n\nThere are a few solutions to fix this.\n\nThe 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.\n\nThe 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>`.\n\nTo illustrate the slowdown caused by the API change, take a bot who is in 840 guilds and 95 of these guilds are \"large\" (over 250 members).\n\nUnder 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.\n\nUnfortunately due to this change being required from Discord there is nothing that the library can do to mitigate this.\n\nIf you truly dislike the direction Discord is going with their API, you can contact them via `support <https://dis.gd/contact>`_.\n"
  },
  {
    "path": "docs/interactions/api.rst",
    "content": ".. currentmodule:: discord\n\nInteractions API Reference\n============================\n\nThe following section outlines the API of interactions, as implemented by the library.\n\nFor documentation about the rest of the library, check :doc:`/api`.\n\nModels\n--------\n\nSimilar to :ref:`discord_api_models`, these are not meant to be constructed by the user.\n\nInteraction\n~~~~~~~~~~~~\n\n.. attributetable:: Interaction\n\n.. autoclass:: Interaction()\n    :members:\n\nInteractionResponse\n~~~~~~~~~~~~~~~~~~~~\n\n.. attributetable:: InteractionResponse\n\n.. autoclass:: InteractionResponse()\n    :members:\n\nInteractionMessage\n~~~~~~~~~~~~~~~~~~~\n\n.. attributetable:: InteractionMessage\n\n.. autoclass:: InteractionMessage()\n    :members:\n    :inherited-members:\n\nMessageInteraction\n~~~~~~~~~~~~~~~~~~~\n\n.. attributetable:: MessageInteraction\n\n.. autoclass:: MessageInteraction()\n    :members:\n\nMessageInteractionMetadata\n~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n.. attributetable:: MessageInteractionMetadata\n\n.. autoclass:: MessageInteractionMetadata()\n    :members:\n\nComponent\n~~~~~~~~~~\n\n.. attributetable:: Component\n\n.. autoclass:: Component()\n    :members:\n\nActionRow\n~~~~~~~~~~\n\n.. attributetable:: ActionRow\n\n.. autoclass:: ActionRow()\n    :members:\n\nButton\n~~~~~~~\n\n.. attributetable:: Button\n\n.. autoclass:: Button()\n    :members:\n    :inherited-members:\n\nSelectMenu\n~~~~~~~~~~~\n\n.. attributetable:: SelectMenu\n\n.. autoclass:: SelectMenu()\n    :members:\n    :inherited-members:\n\n\nTextInput\n~~~~~~~~~~\n\n.. attributetable:: TextInput\n\n.. autoclass:: TextInput()\n    :members:\n    :inherited-members:\n\nAppCommand\n~~~~~~~~~~~\n\n.. attributetable:: discord.app_commands.AppCommand\n\n.. autoclass:: discord.app_commands.AppCommand()\n    :members:\n\nAppCommandGroup\n~~~~~~~~~~~~~~~~\n\n.. attributetable:: discord.app_commands.AppCommandGroup\n\n.. autoclass:: discord.app_commands.AppCommandGroup()\n    :members:\n\nAppCommandChannel\n~~~~~~~~~~~~~~~~~~\n\n.. attributetable:: discord.app_commands.AppCommandChannel\n\n.. autoclass:: discord.app_commands.AppCommandChannel()\n    :members:\n\nAppCommandThread\n~~~~~~~~~~~~~~~~~\n\n.. attributetable:: discord.app_commands.AppCommandThread\n\n.. autoclass:: discord.app_commands.AppCommandThread()\n    :members:\n\nAppCommandPermissions\n~~~~~~~~~~~~~~~~~~~~~~\n\n.. attributetable:: discord.app_commands.AppCommandPermissions\n\n.. autoclass:: discord.app_commands.AppCommandPermissions()\n    :members:\n\nAppCommandContext\n~~~~~~~~~~~~~~~~~\n\n.. attributetable:: discord.app_commands.AppCommandContext\n\n.. autoclass:: discord.app_commands.AppCommandContext\n    :members:\n\nAppInstallationType\n~~~~~~~~~~~~~~~~~~~~\n\n.. attributetable:: discord.app_commands.AppInstallationType\n\n.. autoclass:: discord.app_commands.AppInstallationType\n    :members:\n\nGuildAppCommandPermissions\n~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n.. attributetable:: discord.app_commands.GuildAppCommandPermissions\n\n.. autoclass:: discord.app_commands.GuildAppCommandPermissions()\n    :members:\n\nArgument\n~~~~~~~~~~\n\n.. attributetable:: discord.app_commands.Argument\n\n.. autoclass:: discord.app_commands.Argument()\n    :members:\n\nAllChannels\n~~~~~~~~~~~~\n\n.. attributetable:: discord.app_commands.AllChannels\n\n.. autoclass:: discord.app_commands.AllChannels()\n    :members:\n\nData Classes\n--------------\n\nSimilar to :ref:`discord_api_data`, these can be received and constructed by users.\n\nSelectOption\n~~~~~~~~~~~~~\n\n.. attributetable:: SelectOption\n\n.. autoclass:: SelectOption\n    :members:\n\nSelectDefaultValue\n~~~~~~~~~~~~~~~~~~~\n\n.. attributetable:: SelectDefaultValue\n\n.. autoclass:: SelectDefaultValue\n    :members:\n\nChoice\n~~~~~~~\n\n.. attributetable:: discord.app_commands.Choice\n\n.. autoclass:: discord.app_commands.Choice\n    :members:\n\n\nEnumerations\n-------------\n\n.. class:: InteractionType\n\n    Specifies the type of :class:`Interaction`.\n\n    .. versionadded:: 2.0\n\n    .. attribute:: ping\n\n        Represents Discord pinging to see if the interaction response server is alive.\n    .. attribute:: application_command\n\n        Represents a slash command interaction.\n    .. attribute:: component\n\n        Represents a component based interaction, i.e. using the Discord Bot UI Kit.\n    .. attribute:: autocomplete\n\n        Represents an auto complete interaction.\n    .. attribute:: modal_submit\n\n        Represents submission of a modal interaction.\n\n.. class:: InteractionResponseType\n\n    Specifies the response type for the interaction.\n\n    .. versionadded:: 2.0\n\n    .. attribute:: pong\n\n        Pongs the interaction when given a ping.\n\n        See also :meth:`InteractionResponse.pong`\n    .. attribute:: channel_message\n\n        Respond to the interaction with a message.\n\n        See also :meth:`InteractionResponse.send_message`\n    .. attribute:: deferred_channel_message\n\n        Responds to the interaction with a message at a later time.\n\n        See also :meth:`InteractionResponse.defer`\n    .. attribute:: deferred_message_update\n\n        Acknowledges the component interaction with a promise that\n        the message will update later (though there is no need to actually update the message).\n\n        See also :meth:`InteractionResponse.defer`\n    .. attribute:: message_update\n\n        Responds to the interaction by editing the message.\n\n        See also :meth:`InteractionResponse.edit_message`\n    .. attribute:: autocomplete_result\n\n        Responds to the autocomplete interaction with suggested choices.\n\n        See also :meth:`InteractionResponse.autocomplete`\n    .. attribute:: modal\n\n        Responds to the interaction with a modal.\n\n        See also :meth:`InteractionResponse.send_modal`\n\n.. class:: ComponentType\n\n    Represents the component type of a component.\n\n    .. versionadded:: 2.0\n\n    .. attribute:: action_row\n\n        Represents the group component which holds different components in a row.\n\n    .. attribute:: button\n\n        Represents a button component.\n\n    .. attribute:: text_input\n\n        Represents a text box component.\n\n    .. attribute:: select\n\n        Represents a select component.\n\n    .. attribute:: string_select\n\n        An alias to :attr:`select`. Represents a default select component.\n\n    .. attribute:: user_select\n\n        Represents a user select component.\n\n    .. attribute:: role_select\n\n        Represents a role select component.\n\n    .. attribute:: mentionable_select\n\n        Represents a select in which both users and roles can be selected.\n\n.. class:: ButtonStyle\n\n    Represents the style of the button component.\n\n    .. versionadded:: 2.0\n\n    .. attribute:: primary\n\n        Represents a blurple button for the primary action.\n    .. attribute:: secondary\n\n        Represents a grey button for the secondary action.\n    .. attribute:: success\n\n        Represents a green button for a successful action.\n    .. attribute:: danger\n\n        Represents a red button for a dangerous action.\n    .. attribute:: link\n\n        Represents a link button.\n    .. attribute:: premium\n\n        Represents a button denoting that buying a SKU is\n        required to perform this action.\n\n        .. versionadded:: 2.4\n    .. attribute:: blurple\n\n        An alias for :attr:`primary`.\n    .. attribute:: grey\n\n        An alias for :attr:`secondary`.\n    .. attribute:: gray\n\n        An alias for :attr:`secondary`.\n    .. attribute:: green\n\n        An alias for :attr:`success`.\n    .. attribute:: red\n\n        An alias for :attr:`danger`.\n    .. attribute:: url\n\n        An alias for :attr:`link`.\n\n.. class:: TextStyle\n\n    Represents the style of the text box component.\n\n    .. versionadded:: 2.0\n\n    .. attribute:: short\n\n        Represents a short text box.\n    .. attribute:: paragraph\n\n        Represents a long form text box.\n    .. attribute:: long\n\n        An alias for :attr:`paragraph`.\n\n.. class:: AppCommandOptionType\n\n    The application command's option type. This is usually the type of parameter an application command takes.\n\n    .. versionadded:: 2.0\n\n    .. attribute:: subcommand\n\n        A subcommand.\n    .. attribute:: subcommand_group\n\n        A subcommand group.\n    .. attribute:: string\n\n        A string parameter.\n    .. attribute:: integer\n\n        A integer parameter.\n    .. attribute:: boolean\n\n        A boolean parameter.\n    .. attribute:: user\n\n        A user parameter.\n    .. attribute:: channel\n\n        A channel parameter.\n    .. attribute:: role\n\n        A role parameter.\n    .. attribute:: mentionable\n\n        A mentionable parameter.\n    .. attribute:: number\n\n        A number parameter.\n    .. attribute:: attachment\n\n        An attachment parameter.\n\n.. class:: AppCommandType\n\n    The type of application command.\n\n    .. versionadded:: 2.0\n\n    .. attribute:: chat_input\n\n        A slash command.\n    .. attribute:: user\n\n        A user context menu command.\n    .. attribute:: message\n\n        A message context menu command.\n\n.. class:: AppCommandPermissionType\n\n    The application command's permission type.\n\n    .. versionadded:: 2.0\n\n    .. attribute:: role\n\n        The permission is for a role.\n    .. attribute:: channel\n\n        The permission is for one or all channels.\n    .. attribute:: user\n\n        The permission is for a user.\n\n.. _discord_ui_kit:\n\nBot UI Kit\n-------------\n\nThe library has helpers to aid in creating component-based UIs. These are all in the ``discord.ui`` package.\n\n\nView\n~~~~~~~\n\n.. attributetable:: discord.ui.View\n\n.. autoclass:: discord.ui.View\n    :members:\n\nModal\n~~~~~~\n\n.. attributetable:: discord.ui.Modal\n\n.. autoclass:: discord.ui.Modal\n    :members:\n    :inherited-members:\n\nItem\n~~~~~~~\n\n.. attributetable:: discord.ui.Item\n\n.. autoclass:: discord.ui.Item\n    :members:\n\nDynamicItem\n~~~~~~~~~~~~\n\n.. attributetable:: discord.ui.DynamicItem\n\n.. autoclass:: discord.ui.DynamicItem\n    :members:\n    :inherited-members:\n\nButton\n~~~~~~~\n\n.. attributetable:: discord.ui.Button\n\n.. autoclass:: discord.ui.Button\n    :members:\n    :inherited-members:\n\n.. autofunction:: discord.ui.button\n    :decorator:\n\nSelect Menus\n~~~~~~~~~~~~~\n\nThe library provides classes to help create the different types of select menus.\n\nSelect\n+++++++\n\n.. attributetable:: discord.ui.Select\n\n.. autoclass:: discord.ui.Select\n    :members:\n    :inherited-members:\n\nChannelSelect\n++++++++++++++\n\n.. attributetable:: discord.ui.ChannelSelect\n\n.. autoclass:: discord.ui.ChannelSelect\n    :members:\n    :inherited-members:\n\nRoleSelect\n++++++++++\n\n.. attributetable:: discord.ui.RoleSelect\n\n.. autoclass:: discord.ui.RoleSelect\n    :members:\n    :inherited-members:\n\nMentionableSelect\n++++++++++++++++++\n\n.. attributetable:: discord.ui.MentionableSelect\n\n.. autoclass:: discord.ui.MentionableSelect\n    :members:\n    :inherited-members:\n\nUserSelect\n+++++++++++\n\n.. attributetable:: discord.ui.UserSelect\n\n.. autoclass:: discord.ui.UserSelect\n    :members:\n    :inherited-members:\n\nselect\n+++++++\n.. autofunction:: discord.ui.select\n    :decorator:\n\n\nTextInput\n~~~~~~~~~~~\n\n.. attributetable:: discord.ui.TextInput\n\n.. autoclass:: discord.ui.TextInput\n    :members:\n    :inherited-members:\n\n.. _discord_app_commands:\n\nApplication Commands\n----------------------\n\nThe library has helpers to aid in creation of application commands. These are all in the ``discord.app_commands`` package.\n\nCommandTree\n~~~~~~~~~~~~\n\n.. attributetable:: discord.app_commands.CommandTree\n\n.. autoclass:: discord.app_commands.CommandTree\n    :members:\n    :exclude-members: error, command, context_menu\n\n    .. automethod:: CommandTree.command(*, name=..., description=..., nsfw=False, guild=..., guilds=..., auto_locale_strings=True, extras=...)\n        :decorator:\n\n    .. automethod:: CommandTree.context_menu(*, name=..., nsfw=False, guild=..., guilds=..., auto_locale_strings=True, extras=...)\n        :decorator:\n\n    .. automethod:: CommandTree.error(coro)\n        :decorator:\n\nCommands\n~~~~~~~~~\n\nCommand\n++++++++\n\n.. attributetable:: discord.app_commands.Command\n\n.. autoclass:: discord.app_commands.Command\n    :members:\n    :exclude-members: error, autocomplete\n\n    .. automethod:: Command.autocomplete(name)\n        :decorator:\n\n    .. automethod:: Command.error(coro)\n        :decorator:\n\nParameter\n++++++++++\n\n.. attributetable:: discord.app_commands.Parameter\n\n.. autoclass:: discord.app_commands.Parameter()\n    :members:\n\nContextMenu\n++++++++++++\n\n.. attributetable:: discord.app_commands.ContextMenu\n\n.. autoclass:: discord.app_commands.ContextMenu\n    :members:\n    :exclude-members: error\n\n    .. automethod:: ContextMenu.error(coro)\n        :decorator:\n\nGroup\n++++++\n\n.. attributetable:: discord.app_commands.Group\n\n.. autoclass:: discord.app_commands.Group\n    :members:\n    :exclude-members: error, command\n\n    .. automethod:: Group.command(*, name=..., description=..., nsfw=False, auto_locale_strings=True, extras=...)\n        :decorator:\n\n    .. automethod:: Group.error(coro)\n        :decorator:\n\nDecorators\n~~~~~~~~~~~\n\n.. autofunction:: discord.app_commands.command\n    :decorator:\n\n.. autofunction:: discord.app_commands.context_menu\n    :decorator:\n\n.. autofunction:: discord.app_commands.describe\n    :decorator:\n\n.. autofunction:: discord.app_commands.rename\n    :decorator:\n\n.. autofunction:: discord.app_commands.choices\n    :decorator:\n\n.. autofunction:: discord.app_commands.autocomplete\n    :decorator:\n\n.. autofunction:: discord.app_commands.guilds\n    :decorator:\n\n.. autofunction:: discord.app_commands.guild_only\n    :decorator:\n\n.. autofunction:: discord.app_commands.dm_only\n    :decorator:\n\n.. autofunction:: discord.app_commands.private_channel_only\n    :decorator:\n\n.. autofunction:: discord.app_commands.allowed_contexts\n    :decorator:\n\n.. autofunction:: discord.app_commands.user_install\n    :decorator:\n\n.. autofunction:: discord.app_commands.guild_install\n    :decorator:\n\n.. autofunction:: discord.app_commands.allowed_installs\n    :decorator:\n\n.. autofunction:: discord.app_commands.default_permissions\n    :decorator:\n\nChecks\n~~~~~~~\n\n.. autofunction:: discord.app_commands.check\n    :decorator:\n\n.. autofunction:: discord.app_commands.checks.has_role\n    :decorator:\n\n.. autofunction:: discord.app_commands.checks.has_any_role\n    :decorator:\n\n.. autofunction:: discord.app_commands.checks.has_permissions\n    :decorator:\n\n.. autofunction:: discord.app_commands.checks.bot_has_permissions\n    :decorator:\n\n.. autofunction:: discord.app_commands.checks.cooldown\n    :decorator:\n\n.. autofunction:: discord.app_commands.checks.dynamic_cooldown\n    :decorator:\n\nCooldown\n~~~~~~~~~\n\n.. attributetable:: discord.app_commands.Cooldown\n\n.. autoclass:: discord.app_commands.Cooldown\n    :members:\n\n\nNamespace\n~~~~~~~~~~\n\n.. attributetable:: discord.app_commands.Namespace\n\n.. autoclass:: discord.app_commands.Namespace()\n    :members:\n\nTransformers\n~~~~~~~~~~~~~\n\nTransformer\n++++++++++++\n\n.. attributetable:: discord.app_commands.Transformer\n\n.. autoclass:: discord.app_commands.Transformer\n    :members:\n\nTransform\n++++++++++\n\n.. attributetable:: discord.app_commands.Transform\n\n.. autoclass:: discord.app_commands.Transform\n    :members:\n\nRange\n++++++\n\n.. attributetable:: discord.app_commands.Range\n\n.. autoclass:: discord.app_commands.Range\n    :members:\n\nTranslations\n~~~~~~~~~~~~~\n\nTranslator\n+++++++++++\n\n.. attributetable:: discord.app_commands.Translator\n\n.. autoclass:: discord.app_commands.Translator\n    :members:\n\nlocale_str\n+++++++++++\n\n.. attributetable:: discord.app_commands.locale_str\n\n.. autoclass:: discord.app_commands.locale_str\n    :members:\n\nTranslationContext\n+++++++++++++++++++\n\n.. attributetable:: discord.app_commands.TranslationContext\n\n.. autoclass:: discord.app_commands.TranslationContext\n    :members:\n\nTranslationContextLocation\n+++++++++++++++++++++++++++\n\n.. class:: TranslationContextLocation\n    :module: discord.app_commands\n\n    An enum representing the location context that the translation occurs in when requested for translation.\n\n    .. versionadded:: 2.0\n\n    .. attribute:: command_name\n\n        The translation involved a command name.\n    .. attribute:: command_description\n\n        The translation involved a command description.\n\n    .. attribute:: group_name\n\n        The translation involved a group name.\n    .. attribute:: group_description\n\n        The translation involved a group description.\n    .. attribute:: parameter_name\n\n        The translation involved a parameter name.\n    .. attribute:: parameter_description\n\n        The translation involved a parameter description.\n    .. attribute:: choice_name\n\n        The translation involved a choice name.\n    .. attribute:: other\n\n        The translation involved something else entirely. This is useful for running\n        :meth:`Translator.translate` for custom usage.\n\nExceptions\n~~~~~~~~~~~\n\n.. autoexception:: discord.app_commands.AppCommandError\n    :members:\n\n.. autoexception:: discord.app_commands.CommandInvokeError\n    :members:\n\n.. autoexception:: discord.app_commands.TransformerError\n    :members:\n\n.. autoexception:: discord.app_commands.TranslationError\n    :members:\n\n.. autoexception:: discord.app_commands.CheckFailure\n    :members:\n\n.. autoexception:: discord.app_commands.NoPrivateMessage\n    :members:\n\n.. autoexception:: discord.app_commands.MissingRole\n    :members:\n\n.. autoexception:: discord.app_commands.MissingAnyRole\n    :members:\n\n.. autoexception:: discord.app_commands.MissingPermissions\n    :members:\n\n.. autoexception:: discord.app_commands.BotMissingPermissions\n    :members:\n\n.. autoexception:: discord.app_commands.CommandOnCooldown\n    :members:\n\n.. autoexception:: discord.app_commands.CommandLimitReached\n    :members:\n\n.. autoexception:: discord.app_commands.CommandAlreadyRegistered\n    :members:\n\n.. autoexception:: discord.app_commands.CommandSignatureMismatch\n    :members:\n\n.. autoexception:: discord.app_commands.CommandNotFound\n    :members:\n\n.. autoexception:: discord.app_commands.MissingApplicationID\n    :members:\n\n.. autoexception:: discord.app_commands.CommandSyncFailure\n    :members:\n\nException Hierarchy\n++++++++++++++++++++\n\n.. exception_hierarchy::\n\n    - :exc:`~discord.DiscordException`\n        - :exc:`~discord.app_commands.AppCommandError`\n            - :exc:`~discord.app_commands.CommandInvokeError`\n            - :exc:`~discord.app_commands.TransformerError`\n            - :exc:`~discord.app_commands.TranslationError`\n            - :exc:`~discord.app_commands.CheckFailure`\n                - :exc:`~discord.app_commands.NoPrivateMessage`\n                - :exc:`~discord.app_commands.MissingRole`\n                - :exc:`~discord.app_commands.MissingAnyRole`\n                - :exc:`~discord.app_commands.MissingPermissions`\n                - :exc:`~discord.app_commands.BotMissingPermissions`\n                - :exc:`~discord.app_commands.CommandOnCooldown`\n            - :exc:`~discord.app_commands.CommandLimitReached`\n            - :exc:`~discord.app_commands.CommandAlreadyRegistered`\n            - :exc:`~discord.app_commands.CommandSignatureMismatch`\n            - :exc:`~discord.app_commands.CommandNotFound`\n            - :exc:`~discord.app_commands.MissingApplicationID`\n            - :exc:`~discord.app_commands.CommandSyncFailure`\n        - :exc:`~discord.HTTPException`\n            - :exc:`~discord.app_commands.CommandSyncFailure`\n"
  },
  {
    "path": "docs/intro.rst",
    "content": ":orphan:\n\n.. currentmodule:: discord\n\n.. _intro:\n\nIntroduction\n==============\n\nThis is the documentation for discord.py, a library for Python to aid\nin creating applications that utilise the Discord API.\n\nPrerequisites\n---------------\n\ndiscord.py works with Python 3.8 or higher. Support for earlier versions of Python\nis not provided. Python 2.7 or lower is not supported. Python 3.7 or lower is not supported.\n\n\n.. _installing:\n\nInstalling\n-----------\n\nYou can get the library directly from PyPI: ::\n\n    python3 -m pip install -U discord.py\n\nIf you are using Windows, then the following should be used instead: ::\n\n    py -3 -m pip install -U discord.py\n\n\nTo get voice support, you should use ``discord.py[voice]`` instead of ``discord.py``, e.g. ::\n\n    python3 -m pip install -U discord.py[voice]\n\nOn Linux environments, installing voice requires getting the following dependencies:\n\n- `libffi <https://github.com/libffi/libffi>`_\n- `libnacl <https://github.com/saltstack/libnacl>`_\n- `python3-dev <https://packages.debian.org/python3-dev>`_\n\nFor a Debian-based system, the following command will get these dependencies:\n\n.. code-block:: shell\n\n    $ apt install libffi-dev libnacl-dev python3-dev\n\nRemember to check your permissions!\n\nVirtual Environments\n~~~~~~~~~~~~~~~~~~~~~\n\nSometimes you want to keep libraries from polluting system installs or use a different version of\nlibraries than the ones installed on the system. You might also not have permissions to install libraries system-wide.\nFor this purpose, the standard library as of Python 3.3 comes with a concept called \"Virtual Environment\"s to\nhelp maintain these separate versions.\n\nA more in-depth tutorial is found on :doc:`py:tutorial/venv`.\n\nHowever, for the quick and dirty:\n\n1. Go to your project's working directory:\n\n    .. code-block:: shell\n\n        $ cd your-bot-source\n        $ python3 -m venv bot-env\n\n2. Activate the virtual environment:\n\n    .. code-block:: shell\n\n        $ source bot-env/bin/activate\n\n    On Windows you activate it with:\n\n    .. code-block:: shell\n\n        $ bot-env\\Scripts\\activate.bat\n\n3. Use pip like usual:\n\n    .. code-block:: shell\n\n        $ pip install -U discord.py\n\nCongratulations. You now have a virtual environment all set up.\n\n.. note::\n\n    Scripts executed with ``py -3`` will ignore any currently active virtual\n    environment, as the ``-3`` specifies a global scope.\n\nBasic Concepts\n---------------\n\ndiscord.py revolves around the concept of :ref:`events <discord-api-events>`.\nAn event is something you listen to and then respond to. For example, when a message\nhappens, you will receive an event about it that you can respond to.\n\nA quick example to showcase how events work:\n\n.. code-block:: python3\n\n    # This example requires the 'message_content' intent.\n\n    import discord\n\n    class MyClient(discord.Client):\n        async def on_ready(self):\n            print(f'Logged on as {self.user}!')\n\n        async def on_message(self, message):\n            print(f'Message from {message.author}: {message.content}')\n\n    intents = discord.Intents.default()\n    intents.message_content = True\n\n    client = MyClient(intents=intents)\n    client.run('my token goes here')\n\n"
  },
  {
    "path": "docs/locale/ja/LC_MESSAGES/api.po",
    "content": "msgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: discordpy\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2024-03-26 03:41+0000\\n\"\n\"PO-Revision-Date: 2024-04-17 02:43\\n\"\n\"Last-Translator: \\n\"\n\"Language-Team: Japanese\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Plural-Forms: nplurals=1; plural=0;\\n\"\n\"X-Crowdin-Project: discordpy\\n\"\n\"X-Crowdin-Project-ID: 362783\\n\"\n\"X-Crowdin-Language: ja\\n\"\n\"X-Crowdin-File: api.pot\\n\"\n\"X-Crowdin-File-ID: 76\\n\"\n\"Language: ja_JP\\n\"\n\n#: ../../api.rst:4\nmsgid \"API Reference\"\nmsgstr \"APIリファレンス\"\n\n#: ../../api.rst:6\nmsgid \"The following section outlines the API of discord.py.\"\nmsgstr \"ここではdiscord.pyのAPIの概要を説明します。\"\n\n#: ../../api.rst:10\nmsgid \"This module uses the Python logging module to log diagnostic and errors in an output independent way.  If the logging module is not configured, these logs will not be output anywhere.  See :ref:`logging_setup` for more information on how to set up and use the logging module with discord.py.\"\nmsgstr \"このモジュールはPythonのloggingモジュールを使用して、出力に依存しない方法でエラーや診断の内容を記録します。loggingモジュールが設定されていない場合、これらのログはどこにも出力されません。discord.pyでloggingモジュールを使用する方法の詳細は :ref:`logging_setup` を参照してください。\"\n\n#: ../../api.rst:17\nmsgid \"Version Related Info\"\nmsgstr \"バージョン関連情報\"\n\n#: ../../api.rst:19\nmsgid \"There are two main ways to query version information about the library. For guarantees, check :ref:`version_guarantees`.\"\nmsgstr \"ライブラリに関するバージョン情報を問い合わせる方法は主に二つあります。保証については :ref:`version_guarantees` を参照してください。\"\n\n#: ../../api.rst:23\nmsgid \"A named tuple that is similar to :obj:`py:sys.version_info`.\"\nmsgstr \":obj:`py:sys.version_info` と同様の名前付きタプル。\"\n\n#: ../../api.rst:25\nmsgid \"Just like :obj:`py:sys.version_info` the valid values for ``releaselevel`` are 'alpha', 'beta', 'candidate' and 'final'.\"\nmsgstr \":obj:`py:sys.version_info` と同じように ``releaselevel`` の有効値は 'alpha'、'beta'、'candidate'、そして 'final' です。\"\n\n#: ../../api.rst:30\nmsgid \"A string representation of the version. e.g. ``'1.0.0rc1'``. This is based off of :pep:`440`.\"\nmsgstr \"``'1.0.0rc1'`` のようなバージョンの文字列表現。これは :pep:`440` に基づいています。\"\n\n#: ../../api.rst:34\nmsgid \"Clients\"\nmsgstr \"クライアント\"\n\n#: ../../api.rst:37\nmsgid \"Client\"\nmsgstr \"Client\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client:1\nmsgid \"Represents a client connection that connects to Discord. This class is used to interact with the Discord WebSocket and API.\"\nmsgstr \"Discordに接続するクライアント接続です。このクラスはDiscordのWebSocket、及びAPIとの対話に使用されます。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client:8\n#: ../../../discord/shard.py:docstring of discord.shard.AutoShardedClient:25\nmsgid \"Asynchronously initialises the client and automatically cleans up.\"\nmsgstr \"非同期的にクライアントを初期化し自動でクリーンアップします。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client:12\nmsgid \"A number of options can be passed to the :class:`Client`.\"\nmsgstr \":class:`Client` には多くのオプションを渡すことが可能です。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client:0\n#: ../../../discord/client.py:docstring of discord.client.Client.before_identify_hook:0\n#: ../../../discord/client.py:docstring of discord.client.Client.login:0\n#: ../../../discord/client.py:docstring of discord.client.Client.connect:0\n#: ../../../discord/client.py:docstring of discord.client.Client.start:0\nmsgid \"Parameters\"\nmsgstr \"パラメータ\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client:14\nmsgid \"The maximum number of messages to store in the internal message cache. This defaults to ``1000``. Passing in ``None`` disables the message cache.\"\nmsgstr \"内部のメッセージキャッシュに保存するメッセージの最大数。デフォルトは ``1000`` です。 ``None`` が渡されるとメッセージキャッシュは無効化されます。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client:17\nmsgid \"Allow disabling the message cache and change the default size to ``1000``.\"\nmsgstr \"メッセージキャッシュの無効化が可能になり、デフォルトのキャッシュサイズが ``1000`` になりました。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client:20\nmsgid \"Proxy URL.\"\nmsgstr \"プロキシのURL。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client:22\nmsgid \"An object that represents proxy HTTP Basic Authorization.\"\nmsgstr \"プロキシのHTTP Basic認証を表すオブジェクト。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client:24\nmsgid \"Integer starting at ``0`` and less than :attr:`.shard_count`.\"\nmsgstr \"``0`` から始まり、 :attr:`.shard_count` より小さい整数。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client:26\nmsgid \"The total number of shards.\"\nmsgstr \"シャードの総数。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client:28\n#: ../../../discord/client.py:docstring of discord.Client.application_id:1\nmsgid \"The client's application ID.\"\nmsgstr \"クライアントのアプリケーションID。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client:30\nmsgid \"The intents that you want to enable for the session. This is a way of disabling and enabling certain gateway events from triggering and being sent.\"\nmsgstr \"セッションで有効にするインテント。これは特定のゲートウェイイベントの発火、またはその送信を無効化できます。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client:35\nmsgid \"Parameter is now required.\"\nmsgstr \"パラメータが必須になりました。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client:38\nmsgid \"Allows for finer control over how the library caches members. If not given, defaults to cache as much as possible with the currently selected intents.\"\nmsgstr \"ライブラリのメンバーのキャッシュ方法をより詳細に制御することができます。指定されていない場合、デフォルトでは現在のインテントに応じて可能な限りキャッシュを行います。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client:44\nmsgid \"Indicates if :func:`.on_ready` should be delayed to chunk all guilds at start-up if necessary. This operation is incredibly slow for large amounts of guilds. The default is ``True`` if :attr:`Intents.members` is ``True``.\"\nmsgstr \"必要に応じて、 :func:`.on_ready` を遅延させ、すべてのギルドをチャンク化するかどうかを設定します。この操作は大量のギルドに参加している場合、非常に低速になります。 :attr:`Intents.members` が ``True`` である場合、これはデフォルトで ``True`` になります。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client:51\nmsgid \"A status to start your presence with upon logging on to Discord.\"\nmsgstr \"Discordにログインした際の、開始時ステータス。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client:53\nmsgid \"An activity to start your presence with upon logging on to Discord.\"\nmsgstr \"Discordにログインした際の、開始時アクティビティ。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client:55\nmsgid \"Control how the client handles mentions by default on every message sent.\"\nmsgstr \"送信されるすべてのメッセージにおいて、クライアントがメンションを処理するかどうかを制御します。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client:59\nmsgid \"The maximum numbers of seconds before timing out and restarting the WebSocket in the case of not receiving a HEARTBEAT_ACK. Useful if processing the initial packets take too long to the point of disconnecting you. The default timeout is 60 seconds.\"\nmsgstr \"HEARTBEAT_ACKを受信できない際に、WebSocketをタイムアウトさせて再起動するまでの最大秒数。最初のパケットの処理に時間がかかり、接続を切断できないというような状況時に便利です。デフォルトでは60秒に設定されています。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client:64\nmsgid \"The maximum number of seconds to wait for the GUILD_CREATE stream to end before preparing the member cache and firing READY. The default timeout is 2 seconds.\"\nmsgstr \"メンバーキャッシュの準備を行い、READYを実行する前にGUILD_CREATEストリームが終了するのを待機する最大秒数。デフォルトは2秒です。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client:69\nmsgid \"Whether to assume the system clock is unsynced. This applies to the ratelimit handling code. If this is set to ``True``, the default, then the library uses the time to reset a rate limit bucket given by Discord. If this is ``False`` then your system clock is used to calculate how long to sleep for. If this is set to ``False`` it is recommended to sync your system clock to Google's NTP server.\"\nmsgstr \"システム時計が同期されていない可能性を考慮するかどうかを設定します。これはレートリミットの処理コードに適用されます。デフォルトでは ``True`` が設定されており、この場合、ライブラリはDiscordから受け取ったレートリミットバケットをリセットするため内部で時間を処理します。 ``False`` に設定されている場合は、システム時計を利用してどれくらいの時間スリープするかを計算します。もし、これを ``False`` に設定するのであれば、システム時計をGoogleのNTPサーバーと同期させることを推奨します。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client:77\nmsgid \"Whether to enable events that are useful only for debugging gateway related information.\"\nmsgstr \"ゲートウェイ関連情報のデバッグにのみ役立つイベントを有効にするかどうかを設定します。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client:79\nmsgid \"Right now this involves :func:`on_socket_raw_receive` and :func:`on_socket_raw_send`. If this is ``False`` then those events will not be dispatched (due to performance considerations). To enable these events, this must be set to ``True``. Defaults to ``False``.\"\nmsgstr \"現在は :func:`on_socket_raw_receive` と :func:`on_socket_raw_send` がそのイベントです。 もし ``False`` にしたのならこれらのイベントは呼ばれません。 (パフォーマンスを考慮したためです) これを有効にする場合は ``True`` にしましょう。 デフォルトは ``False`` です。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client:85\nmsgid \"The trace configuration to use for tracking HTTP requests the library does using ``aiohttp``. This allows you to check requests the library is using. For more information, check the `aiohttp documentation <https://docs.aiohttp.org/en/stable/client_advanced.html#client-tracing>`_.\"\nmsgstr \"ライブラリが ``aiohttp`` を使用して行うHTTPリクエストの追跡に使用する設定。これを使用するとライブラリが行うリクエストを確認できます。詳細は `aiohttp documentation <https://docs.aiohttp.org/en/stable/client_advanced.html#client-tracing>`_ を確認してください。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client:91\nmsgid \"The maximum number of seconds to wait when a non-global rate limit is encountered. If a request requires sleeping for more than the seconds passed in, then :exc:`~discord.RateLimited` will be raised. By default, there is no timeout limit. In order to prevent misuse and unnecessary bans, the minimum value this can be set to is ``30.0`` seconds.\"\nmsgstr \"グローバル以外のレート制限が発生したときに待機する最大秒数。 渡された秒数以上待たないといけない場合、 :exc:`~discord.RateLimited` が発生します。デフォルトではタイムアウト制限はありません。 誤用や不要なBANを防ぐため、最小値は ``30.0`` 秒です。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client:102\nmsgid \"The websocket gateway the client is currently connected to. Could be ``None``.\"\nmsgstr \"クライアントが現在接続しているWebSocketゲートウェイ。 ``None`` でもかまいません。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.event:1\nmsgid \"A decorator that registers an event to listen to.\"\nmsgstr \"受け取るイベントを登録するデコレータ。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.event:3\nmsgid \"You can find more info about the events on the :ref:`documentation below <discord-api-events>`.\"\nmsgstr \"イベントの詳細については :ref:`以下のドキュメント <discord-api-events>` を参照してください。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.event:5\nmsgid \"The events must be a :ref:`coroutine <coroutine>`, if not, :exc:`TypeError` is raised.\"\nmsgstr \"イベントは :ref:`coroutine <coroutine>` でなければいけません。違う場合は :exc:`TypeError` が送出されます。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.event:8\n#: ../../../discord/client.py:docstring of discord.client.Client.change_presence:6\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.edit_role_positions:14\nmsgid \"Example\"\nmsgstr \"例\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.event:17\nmsgid \"``coro`` parameter is now positional-only.\"\nmsgstr \"``coro`` 引数は位置限定引数になりました。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.event:0\n#: ../../../discord/client.py:docstring of discord.client.Client.login:0\n#: ../../../discord/client.py:docstring of discord.client.Client.connect:0\n#: ../../../discord/client.py:docstring of discord.client.Client.start:0\n#: ../../../discord/client.py:docstring of discord.client.Client.wait_for:0\nmsgid \"Raises\"\nmsgstr \"例外\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.event:19\nmsgid \"The coroutine passed is not actually a coroutine.\"\nmsgstr \"渡された関数がコルーチンでない場合。\"\n\n#: ../../../discord/client.py:docstring of discord.Client.latency:1\n#: ../../../discord/shard.py:docstring of discord.AutoShardedClient.latency:1\nmsgid \"Measures latency between a HEARTBEAT and a HEARTBEAT_ACK in seconds.\"\nmsgstr \"HEARTBEATとHEARTBEAT_ACK間の待ち時間を秒単位で測定します。\"\n\n#: ../../../discord/client.py:docstring of discord.Client.latency:3\nmsgid \"This could be referred to as the Discord WebSocket protocol latency.\"\nmsgstr \"これはDiscord WebSocketプロトコルの待ち時間とも言えます。\"\n\n#: ../../../discord/client.py:docstring of discord.Client.latency:0\n#: ../../../discord/client.py:docstring of discord.Client.user:0\n#: ../../../discord/client.py:docstring of discord.Client.guilds:0\n#: ../../../discord/client.py:docstring of discord.Client.emojis:0\n#: ../../../discord/client.py:docstring of discord.Client.stickers:0\nmsgid \"type\"\nmsgstr \"型\"\n\n#: ../../../discord/client.py:docstring of discord.Client.latency:5\n#: ../../../discord/shard.py:docstring of discord.AutoShardedClient.latency:7\n#: ../../../discord/voice_client.py:docstring of discord.VoiceClient.latency:8\n#: ../../../discord/voice_client.py:docstring of discord.VoiceClient.average_latency:5\n#: ../../../discord/guild.py:docstring of discord.Guild.bitrate_limit:3\nmsgid \":class:`float`\"\nmsgstr \":class:`float`\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.is_ws_ratelimited:1\n#: ../../../discord/shard.py:docstring of discord.shard.AutoShardedClient.is_ws_ratelimited:1\n#: ../../../discord/shard.py:docstring of discord.shard.ShardInfo.is_ws_ratelimited:1\nmsgid \":class:`bool`: Whether the websocket is currently rate limited.\"\nmsgstr \":class:`bool`: WebSocketにレート制限が課されているかどうかを指します。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.is_ws_ratelimited:3\n#: ../../../discord/shard.py:docstring of discord.shard.AutoShardedClient.is_ws_ratelimited:3\n#: ../../../discord/shard.py:docstring of discord.shard.ShardInfo.is_ws_ratelimited:3\nmsgid \"This can be useful to know when deciding whether you should query members using HTTP or via the gateway.\"\nmsgstr \"これはメンバーを取得する際、HTTPを利用するか、ゲートウェイを介して行うかを決定するときに知っておくと役立ちます。\"\n\n#: ../../../discord/client.py:docstring of discord.Client.user:1\nmsgid \"Represents the connected client. ``None`` if not logged in.\"\nmsgstr \"接続されたクライアント。ログインしていない場合は ``None`` です。\"\n\n#: ../../../discord/client.py:docstring of discord.Client.user:3\nmsgid \"Optional[:class:`.ClientUser`]\"\nmsgstr \"Optional[:class:`.ClientUser`]\"\n\n#: ../../../discord/client.py:docstring of discord.Client.guilds:1\nmsgid \"The guilds that the connected client is a member of.\"\nmsgstr \"接続したクライアントがメンバーとして参加しているギルド。\"\n\n#: ../../../discord/client.py:docstring of discord.Client.guilds:3\nmsgid \"Sequence[:class:`.Guild`]\"\nmsgstr \"Sequence[:class:`.Guild`]\"\n\n#: ../../../discord/client.py:docstring of discord.Client.emojis:1\nmsgid \"The emojis that the connected client has.\"\nmsgstr \"接続したクライアントが利用できる絵文字。\"\n\n#: ../../../discord/client.py:docstring of discord.Client.emojis:3\nmsgid \"Sequence[:class:`.Emoji`]\"\nmsgstr \"Sequence[:class:`.Emoji`]\"\n\n#: ../../../discord/client.py:docstring of discord.Client.stickers:1\nmsgid \"The stickers that the connected client has.\"\nmsgstr \"接続したクライアントが持つスタンプ。\"\n\n#: ../../../discord/client.py:docstring of discord.Client.stickers:5\nmsgid \"Sequence[:class:`.GuildSticker`]\"\nmsgstr \"Sequence[:class:`.GuildSticker`]\"\n\n#: ../../../discord/client.py:docstring of discord.Client.cached_messages:1\nmsgid \"Read-only list of messages the connected client has cached.\"\nmsgstr \"接続したクライアントがキャッシュしているメッセージの読み取り専用リスト。\"\n\n#: ../../../discord/client.py:docstring of discord.Client.cached_messages:5\nmsgid \"Sequence[:class:`.Message`]\"\nmsgstr \"Sequence[:class:`.Message`]\"\n\n#: ../../../discord/client.py:docstring of discord.Client.private_channels:1\nmsgid \"The private channels that the connected client is participating on.\"\nmsgstr \"接続したクライアントが参加しているプライベートチャンネル。\"\n\n#: ../../../discord/client.py:docstring of discord.Client.private_channels:5\nmsgid \"This returns only up to 128 most recent private channels due to an internal working on how Discord deals with private channels.\"\nmsgstr \"Discordでのプライベートチャンネルの取扱いは内部的に処理されているため、これは最新のプライベートチャンネルから最大128個までしか取得できません。\"\n\n#: ../../../discord/client.py:docstring of discord.Client.private_channels:8\nmsgid \"Sequence[:class:`.abc.PrivateChannel`]\"\nmsgstr \"Sequence[:class:`.abc.PrivateChannel`]\"\n\n#: ../../../discord/client.py:docstring of discord.Client.voice_clients:1\nmsgid \"Represents a list of voice connections.\"\nmsgstr \"ボイス接続のリストを表します。\"\n\n#: ../../../discord/client.py:docstring of discord.Client.voice_clients:3\nmsgid \"These are usually :class:`.VoiceClient` instances.\"\nmsgstr \"通常、 :class:`.VoiceClient` インスタンスです。\"\n\n#: ../../../discord/client.py:docstring of discord.Client.voice_clients:5\nmsgid \"List[:class:`.VoiceProtocol`]\"\nmsgstr \"List[:class:`.VoiceProtocol`]\"\n\n#: ../../../discord/client.py:docstring of discord.Client.application_id:3\nmsgid \"If this is not passed via ``__init__`` then this is retrieved through the gateway when an event contains the data or after a call to :meth:`~discord.Client.login`. Usually after :func:`~discord.on_connect` is called.\"\nmsgstr \"これが ``__init__`` で渡されなかった場合、データを含むイベントが発生した際にゲートウェイを介して、または :meth:`~discord.Client.login` の後に取得されます。通常は :func:`~discord.on_connect` が呼び出された後です。\"\n\n#: ../../../discord/client.py:docstring of discord.Client.application_id:10\n#: ../../../discord/appinfo.py:docstring of discord.appinfo.AppInfo:72\n#: ../../../discord/appinfo.py:docstring of discord.appinfo.AppInfo:82\n#: ../../../discord/team.py:docstring of discord.TeamMember.avatar_decoration_sku_id:7\n#: ../../api.rst:1484\nmsgid \"Optional[:class:`int`]\"\nmsgstr \"Optional[:class:`int`]\"\n\n#: ../../../discord/client.py:docstring of discord.Client.application_flags:1\nmsgid \"The client's application flags.\"\nmsgstr \"クライアントのアプリケーションフラグ。\"\n\n#: ../../../discord/client.py:docstring of discord.Client.application_flags:5\nmsgid \":class:`~discord.ApplicationFlags`\"\nmsgstr \":class:`~discord.ApplicationFlags`\"\n\n#: ../../../discord/client.py:docstring of discord.Client.application:1\nmsgid \"The client's application info.\"\nmsgstr \"クライアントのアプリケーション情報。\"\n\n#: ../../../discord/client.py:docstring of discord.Client.application:3\nmsgid \"This is retrieved on :meth:`~discord.Client.login` and is not updated afterwards. This allows populating the application_id without requiring a gateway connection.\"\nmsgstr \"これは :meth:`~discord.Client.login` で取得され、その後更新されません。これによりゲートウェイ接続を行わずにapplication_idを取得できます。\"\n\n#: ../../../discord/client.py:docstring of discord.Client.application:7\nmsgid \"This is ``None`` if accessed before :meth:`~discord.Client.login` is called.\"\nmsgstr \"もし :meth:`~discord.Client.login` の呼び出し前にアクセスされた場合は ``None`` です。\"\n\n#: ../../../discord/client.py:docstring of discord.Client.application:9\nmsgid \"The :meth:`~discord.Client.application_info` API call\"\nmsgstr \":meth:`~discord.Client.application_info` API呼び出し\"\n\n#: ../../../discord/client.py:docstring of discord.Client.application:13\nmsgid \"Optional[:class:`~discord.AppInfo`]\"\nmsgstr \"Optional[:class:`~discord.AppInfo`]\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.is_ready:1\nmsgid \":class:`bool`: Specifies if the client's internal cache is ready for use.\"\nmsgstr \":class:`bool`: クライアントの内部キャッシュが利用可能となっているか。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.on_error:1\n#: ../../../discord/client.py:docstring of discord.client.Client.before_identify_hook:1\n#: ../../../discord/client.py:docstring of discord.client.Client.setup_hook:1\n#: ../../../discord/client.py:docstring of discord.client.Client.login:1\n#: ../../../discord/client.py:docstring of discord.client.Client.connect:1\nmsgid \"|coro|\"\nmsgstr \"|coro|\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.on_error:3\nmsgid \"The default error handler provided by the client.\"\nmsgstr \"クライアントによって提供されるデフォルトのエラーハンドラ。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.on_error:5\nmsgid \"By default this logs to the library logger however it could be overridden to have a different implementation. Check :func:`~discord.on_error` for more details.\"\nmsgstr \"デフォルトでは、これはライブラリロガーに出力されますが、異なる実装によって上書きされる可能性があります。詳細については :func:`~discord.on_error` を確認してください。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.on_error:11\nmsgid \"``event_method`` parameter is now positional-only and instead of writing to ``sys.stderr`` it logs instead.\"\nmsgstr \"``event_method`` パラメータが位置限定引数になり、 ``sys.stderr`` に出力するのではなくログに記録するようになりました。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.before_identify_hook:3\nmsgid \"A hook that is called before IDENTIFYing a session. This is useful if you wish to have more control over the synchronization of multiple IDENTIFYing clients.\"\nmsgstr \"セッションの識別前に呼び出されるフック。複数の識別クライアントの同期をより細かく制御したい場合に役立ちます。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.before_identify_hook:7\nmsgid \"The default implementation sleeps for 5 seconds.\"\nmsgstr \"デフォルトの実装では5秒間スリープします。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.before_identify_hook:11\nmsgid \"The shard ID that requested being IDENTIFY'd\"\nmsgstr \"IDENTIFYされることを要求したシャードID\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.before_identify_hook:13\nmsgid \"Whether this IDENTIFY is the first initial IDENTIFY.\"\nmsgstr \"この識別が、最初の初期化を伴う識別であるかどうか。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.setup_hook:3\nmsgid \"A coroutine to be called to setup the bot, by default this is blank.\"\nmsgstr \"ボットのセットアップのためのコルーチンです。デフォルトでは空です。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.setup_hook:5\nmsgid \"To perform asynchronous setup after the bot is logged in but before it has connected to the Websocket, overwrite this coroutine.\"\nmsgstr \"ボットがログインした後で、ウェブソケットに接続する前に非同期のセットアップを行いたい場合は、このコルーチンを上書きしてください。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.setup_hook:8\nmsgid \"This is only called once, in :meth:`login`, and will be called before any events are dispatched, making it a better solution than doing such setup in the :func:`~discord.on_ready` event.\"\nmsgstr \"これは :meth:`login` にて一度だけ呼び出され、イベントが呼び出される前に呼び出されるため、 :func:`~discord.on_ready` より優れています。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.setup_hook:14\nmsgid \"Since this is called *before* the websocket connection is made therefore anything that waits for the websocket will deadlock, this includes things like :meth:`wait_for` and :meth:`wait_until_ready`.\"\nmsgstr \"これはWebSocket接続の *前に* 呼ばれるため、WebSocketを待つ関数の呼び出しはデッドロックします。これには :meth:`wait_for` や :meth:`wait_until_ready` が含まれます。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.login:3\nmsgid \"Logs in the client with the specified credentials and calls the :meth:`setup_hook`.\"\nmsgstr \"指定した資格情報を使用してクライアントにログインし、 :meth:`setup_hook` を呼び出します。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.login:7\n#: ../../../discord/client.py:docstring of discord.client.Client.start:5\n#: ../../../discord/client.py:docstring of discord.client.Client.run:19\nmsgid \"The authentication token. Do not prefix this token with anything as the library will do it for you.\"\nmsgstr \"認証用のトークン。このライブラリが処理するため、トークンの頭に何も付けないでください。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.login:11\nmsgid \"The wrong credentials are passed.\"\nmsgstr \"不正な認証情報が渡された場合。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.login:12\nmsgid \"An unknown HTTP related error occurred,     usually when it isn't 200 or the known incorrect credentials     passing status code.\"\nmsgstr \"不明なHTTP関連のエラーが発生した場合。通常、ステータスコードが200でないか、既知の誤った資格情報が渡された場合です。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.connect:3\n#: ../../../discord/shard.py:docstring of discord.shard.AutoShardedClient.connect:3\nmsgid \"Creates a websocket connection and lets the websocket listen to messages from Discord. This is a loop that runs the entire event system and miscellaneous aspects of the library. Control is not resumed until the WebSocket connection is terminated.\"\nmsgstr \"WebSocket接続を作成し、Discordからのメッセージを受け取れるようにします。これはイベントシステム全体とライブラリの様々な機能を実行するループです。WebSocket接続が終了するまで、制御は再開されません。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.connect:8\n#: ../../../discord/client.py:docstring of discord.client.Client.start:8\n#: ../../../discord/client.py:docstring of discord.client.Client.run:22\n#: ../../../discord/shard.py:docstring of discord.shard.AutoShardedClient.connect:8\nmsgid \"If we should attempt reconnecting, either due to internet failure or a specific failure on Discord's part. Certain disconnects that lead to bad state will not be handled (such as invalid sharding payloads or bad tokens).\"\nmsgstr \"インターネットの障害やDiscord側の特定の障害が発生した際に再接続を試みるかどうか。不正な状態による特定の切断 (無効なシャーディングペイロードや不正なトークンなど) は処理されません。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.connect:14\n#: ../../../discord/shard.py:docstring of discord.shard.AutoShardedClient.connect:14\nmsgid \"If the gateway to connect to Discord is not found. Usually if this     is thrown then there is a Discord API outage.\"\nmsgstr \"Discordに接続するためのゲートウェイが見つからない場合。通常、この例外はDiscord APIの停止によって引き起こされます。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.connect:15\n#: ../../../discord/shard.py:docstring of discord.shard.AutoShardedClient.connect:15\nmsgid \"The websocket connection has been terminated.\"\nmsgstr \"WebSocket接続が終了した場合。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.close:3\n#: ../../../discord/shard.py:docstring of discord.shard.AutoShardedClient.close:3\nmsgid \"Closes the connection to Discord.\"\nmsgstr \"Discordとの接続を閉じます。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.clear:1\nmsgid \"Clears the internal state of the bot.\"\nmsgstr \"Botの内部状態をクリアします。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.clear:3\nmsgid \"After this, the bot can be considered \\\"re-opened\\\", i.e. :meth:`is_closed` and :meth:`is_ready` both return ``False`` along with the bot's internal cache cleared.\"\nmsgstr \"これが実行されると、Botは「再オープン」されたとみなされます。そのため、 :meth:`is_closed` や :meth:`is_ready` は ``False`` を返し、内部のキャッシュもクリアされます。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.start:3\nmsgid \"A shorthand coroutine for :meth:`login` + :meth:`connect`.\"\nmsgstr \":meth:`login` + :meth:`connect` を簡略化したコルーチン。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.start:14\nmsgid \"An unexpected keyword argument was received.\"\nmsgstr \"予期しないキーワード引数を受け取った場合。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.run:1\nmsgid \"A blocking call that abstracts away the event loop initialisation from you.\"\nmsgstr \"イベントループの初期化を抽象化するブロッキングコール。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.run:4\nmsgid \"If you want more control over the event loop then this function should not be used. Use :meth:`start` coroutine or :meth:`connect` + :meth:`login`.\"\nmsgstr \"イベントループをより詳細に制御するには、この関数を使用しないでください。 :meth:`start` または :meth:`connect` + :meth:`login` を使用してください。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.run:8\nmsgid \"This function also sets up the logging library to make it easier for beginners to know what is going on with the library. For more advanced users, this can be disabled by passing ``None`` to the ``log_handler`` parameter.\"\nmsgstr \"またこの関数は、初心者がライブラリの仕組みを知ることが簡単にできるよう logging ライブラリを設定します。より高度なユーザーは、 ``log_handler`` に ``None`` を渡してこれを無効化することもできます。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.run:15\nmsgid \"This function must be the last function to call due to the fact that it is blocking. That means that registration of events or anything being called after this function call will not execute until it returns.\"\nmsgstr \"この関数はブロッキングを行うため、必ず最後に呼び出してください。この関数を呼び出した後に呼び出されるイベントや関数は、Botが停止するまで実行されません。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.run:27\nmsgid \"The log handler to use for the library's logger. If this is ``None`` then the library will not set up anything logging related. Logging will still work if ``None`` is passed, though it is your responsibility to set it up.\"\nmsgstr \"ライブラリロガーにて使用すべきログハンドラ。もしこれが ``None`` の場合ライブラリはログ関連のセットアップを一切行いません。 ``None`` を渡してもログは記録されますが、設定は自己責任となります。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.run:32\n#: ../../../discord/utils.py:docstring of discord.utils.setup_logging:14\nmsgid \"The default log handler if not provided is :class:`logging.StreamHandler`.\"\nmsgstr \"渡されない場合のデフォルトは :class:`logging.StreamHandler` です。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.run:36\nmsgid \"The formatter to use with the given log handler. If not provided then it defaults to a colour based logging formatter (if available).\"\nmsgstr \"指定されたログハンドラで使用するフォーマッタ。渡されない場合は、既定で色ベースのログフォーマッタが使用されます (使用可能な場合)。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.run:41\nmsgid \"The default log level for the library's logger. This is only applied if the ``log_handler`` parameter is not ``None``. Defaults to ``logging.INFO``.\"\nmsgstr \"ライブラリロガーの既定のログレベル。これは ``log_handler`` が ``None`` でない場合のみ適用されます。デフォルトは ``logging.INFO`` です。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.run:46\nmsgid \"Whether to set up the root logger rather than the library logger. By default, only the library logger (``'discord'``) is set up. If this is set to ``True`` then the root logger is set up as well.\"\nmsgstr \"ライブラリロガーではなくルートロガーを設定するかどうか。デフォルトではライブラリロガー (``'discord'``) のみが設定されています。 これが ``True`` に設定されている場合、ルートロガーも設定されます。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.run:50\nmsgid \"Defaults to ``False``.\"\nmsgstr \"デフォルトでは ``False`` です。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.is_closed:1\nmsgid \":class:`bool`: Indicates if the websocket connection is closed.\"\nmsgstr \":class:`bool`: WebSocket接続が閉じられているかどうかを示します。\"\n\n#: ../../../discord/client.py:docstring of discord.Client.activity:1\nmsgid \"The activity being used upon logging in.\"\nmsgstr \"ログイン時に使用されるアクティビティ。\"\n\n#: ../../../discord/client.py:docstring of discord.Client.activity:4\nmsgid \"Optional[:class:`.BaseActivity`]\"\nmsgstr \"Optional[:class:`.BaseActivity`]\"\n\n#: ../../../discord/client.py:docstring of discord.Client.status:1\nmsgid \":class:`.Status`: The status being used upon logging on to Discord.\"\nmsgstr \":class:`.Status`: Discordへのログイン時に使用されるステータス。\"\n\n#: ../../../discord/client.py:docstring of discord.Client.allowed_mentions:1\nmsgid \"The allowed mention configuration.\"\nmsgstr \"許可されたメンションの設定。\"\n\n#: ../../../discord/client.py:docstring of discord.Client.allowed_mentions:5\nmsgid \"Optional[:class:`~discord.AllowedMentions`]\"\nmsgstr \"Optional[:class:`~discord.AllowedMentions`]\"\n\n#: ../../../discord/client.py:docstring of discord.Client.intents:1\nmsgid \"The intents configured for this connection.\"\nmsgstr \"この接続用に設定されたインテント。\"\n\n#: ../../../discord/client.py:docstring of discord.Client.intents:5\nmsgid \":class:`~discord.Intents`\"\nmsgstr \":class:`~discord.Intents`\"\n\n#: ../../../discord/client.py:docstring of discord.Client.users:1\nmsgid \"Returns a list of all the users the bot can see.\"\nmsgstr \"Botが参照可能なユーザーのリストを返します。\"\n\n#: ../../../discord/client.py:docstring of discord.Client.users:3\nmsgid \"List[:class:`~discord.User`]\"\nmsgstr \"List[:class:`~discord.User`]\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.get_channel:1\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.get_channel_or_thread:1\nmsgid \"Returns a channel or thread with the given ID.\"\nmsgstr \"与えられたIDに合致するチャンネルまたはスレッドを返します。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.get_channel:5\n#: ../../../discord/client.py:docstring of discord.client.Client.get_guild:5\n#: ../../../discord/client.py:docstring of discord.client.Client.get_user:5\n#: ../../../discord/client.py:docstring of discord.client.Client.get_emoji:5\nmsgid \"``id`` parameter is now positional-only.\"\nmsgstr \"``id`` 引数は位置限定引数になりました。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.get_channel:7\n#: ../../../discord/client.py:docstring of discord.client.Client.get_stage_instance:5\n#: ../../../discord/client.py:docstring of discord.client.Client.get_guild:7\n#: ../../../discord/client.py:docstring of discord.client.Client.get_user:7\n#: ../../../discord/client.py:docstring of discord.client.Client.get_emoji:7\nmsgid \"The ID to search for.\"\nmsgstr \"検索するID。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.get_channel:0\n#: ../../../discord/client.py:docstring of discord.client.Client.get_partial_messageable:0\n#: ../../../discord/client.py:docstring of discord.client.Client.get_stage_instance:0\n#: ../../../discord/client.py:docstring of discord.client.Client.get_guild:0\n#: ../../../discord/client.py:docstring of discord.client.Client.get_user:0\nmsgid \"Returns\"\nmsgstr \"戻り値\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.get_channel:10\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.get_channel:14\nmsgid \"The returned channel or ``None`` if not found.\"\nmsgstr \"チャンネル、または該当するものが見つからない場合 ``None`` が返ります。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.get_channel:0\n#: ../../../discord/client.py:docstring of discord.client.Client.get_partial_messageable:0\n#: ../../../discord/client.py:docstring of discord.client.Client.get_stage_instance:0\n#: ../../../discord/client.py:docstring of discord.client.Client.get_guild:0\n#: ../../../discord/client.py:docstring of discord.client.Client.get_user:0\nmsgid \"Return type\"\nmsgstr \"戻り値の型\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.get_channel:11\nmsgid \"Optional[Union[:class:`.abc.GuildChannel`, :class:`.Thread`, :class:`.abc.PrivateChannel`]]\"\nmsgstr \"Optional[Union[:class:`.abc.GuildChannel`, :class:`.Thread`, :class:`.abc.PrivateChannel`]]\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.get_partial_messageable:1\nmsgid \"Returns a partial messageable with the given channel ID.\"\nmsgstr \"与えられたチャンネルIDのPartialMessageableを返します。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.get_partial_messageable:3\nmsgid \"This is useful if you have a channel_id but don't want to do an API call to send messages to it.\"\nmsgstr \"これはチャンネルIDがあるがメッセージを送信するためにAPI呼び出しをしたくない、という場合に便利です。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.get_partial_messageable:8\nmsgid \"The channel ID to create a partial messageable for.\"\nmsgstr \"PartialMessageableを作成するためのチャンネルID。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.get_partial_messageable:10\nmsgid \"The optional guild ID to create a partial messageable for.  This is not required to actually send messages, but it does allow the :meth:`~discord.PartialMessageable.jump_url` and :attr:`~discord.PartialMessageable.guild` properties to function properly.\"\nmsgstr \"部分的なメッセージ可能チャンネルを作成するためのオプションのギルドID。これはメッセージの送信には必須ではありませんが、 :meth:`~discord.PartialMessageable.jump_url` や :attr:`~discord.PartialMessageable.guild` プロパティが適切に動作するようになります。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.get_partial_messageable:10\nmsgid \"The optional guild ID to create a partial messageable for.\"\nmsgstr \"部分的なメッセージ可能チャンネルを作成するためのオプションのギルドID。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.get_partial_messageable:12\nmsgid \"This is not required to actually send messages, but it does allow the :meth:`~discord.PartialMessageable.jump_url` and :attr:`~discord.PartialMessageable.guild` properties to function properly.\"\nmsgstr \"これはメッセージの送信には必須ではありませんが、 :meth:`~discord.PartialMessageable.jump_url` や :attr:`~discord.PartialMessageable.guild` プロパティが適切に動作するようになります。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.get_partial_messageable:16\nmsgid \"The underlying channel type for the partial messageable.\"\nmsgstr \"PartialMessageableの基礎となるチャンネルタイプ。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.get_partial_messageable:19\nmsgid \"The partial messageable\"\nmsgstr \"PartialMessageable\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.get_partial_messageable:20\nmsgid \":class:`.PartialMessageable`\"\nmsgstr \":class:`.PartialMessageable`\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.get_stage_instance:1\nmsgid \"Returns a stage instance with the given stage channel ID.\"\nmsgstr \"与えられたステージチャンネルのIDを持つステージインスタンスを返します。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.get_stage_instance:8\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.get_stage_instance:8\nmsgid \"The stage instance or ``None`` if not found.\"\nmsgstr \"ステージインスタンス、または該当するものが見つからない場合 ``None`` が返ります。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.get_stage_instance:9\nmsgid \"Optional[:class:`.StageInstance`]\"\nmsgstr \"Optional[:class:`.StageInstance`]\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.get_guild:1\nmsgid \"Returns a guild with the given ID.\"\nmsgstr \"与えられたIDのギルドを返します。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.get_guild:10\nmsgid \"The guild or ``None`` if not found.\"\nmsgstr \"ギルドが返ります。見つからなかった場合は ``None`` が返ります。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.get_guild:11\nmsgid \"Optional[:class:`.Guild`]\"\nmsgstr \"Optional[:class:`.Guild`]\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.get_user:1\nmsgid \"Returns a user with the given ID.\"\nmsgstr \"与えられたIDのユーザーを返します。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.get_user:10\nmsgid \"The user or ``None`` if not found.\"\nmsgstr \"Userが返ります。見つからなかった場合は ``None`` が返ります。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.get_user:11\nmsgid \"Optional[:class:`~discord.User`]\"\nmsgstr \"Optional[:class:`~discord.User`]\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.get_emoji:1\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.get_emoji:1\nmsgid \"Returns an emoji with the given ID.\"\nmsgstr \"与えられたIDの絵文字を返します。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.get_emoji:10\nmsgid \"The custom emoji or ``None`` if not found.\"\nmsgstr \"カスタム絵文字が返されます。見つからなかった場合は、 ``None`` が返ります。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.get_emoji:11\nmsgid \"Optional[:class:`.Emoji`]\"\nmsgstr \"Optional[:class:`.Emoji`]\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.get_sticker:1\nmsgid \"Returns a guild sticker with the given ID.\"\nmsgstr \"与えられたIDに合致するギルドスタンプを返します。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.get_sticker:7\nmsgid \"To retrieve standard stickers, use :meth:`.fetch_sticker`. or :meth:`.fetch_premium_sticker_packs`.\"\nmsgstr \"標準スタンプを取得するには、 :meth:`.fetch_sticker` か :meth:`.fetch_premium_sticker_packs` を使用してください。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.get_sticker:10\nmsgid \"The sticker or ``None`` if not found.\"\nmsgstr \"スタンプが返ります。見つからなかった場合は ``None`` が返ります。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.get_sticker:11\nmsgid \"Optional[:class:`.GuildSticker`]\"\nmsgstr \"Optional[:class:`.GuildSticker`]\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.get_all_channels:1\nmsgid \"A generator that retrieves every :class:`.abc.GuildChannel` the client can 'access'.\"\nmsgstr \"クライアントが「アクセス」できるすべての :class:`.abc.GuildChannel` のジェネレータを取得します。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.get_all_channels:3\n#: ../../../discord/client.py:docstring of discord.client.Client.get_all_members:3\nmsgid \"This is equivalent to: ::\"\nmsgstr \"使用例:\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.get_all_channels:11\nmsgid \"Just because you receive a :class:`.abc.GuildChannel` does not mean that you can communicate in said channel. :meth:`.abc.GuildChannel.permissions_for` should be used for that.\"\nmsgstr \":class:`.abc.GuildChannel` を受け取ったからと言って、そのチャンネルで発言ができるという意味ではありません。発言可能なチャンネルのみを取得したいのなら、 :meth:`.abc.GuildChannel.permissions_for` を使いましょう。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.get_all_channels:0\n#: ../../../discord/client.py:docstring of discord.client.Client.get_all_members:0\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_guilds:0\n#: ../../../discord/client.py:docstring of discord.client.Client.entitlements:0\n#: ../../../discord/abc.py:docstring of discord.abc.Messageable.history:0\nmsgid \"Yields\"\nmsgstr \"Yieldする値\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.get_all_channels:15\nmsgid \":class:`.abc.GuildChannel` -- A channel the client can 'access'.\"\nmsgstr \":class:`.abc.GuildChannel` -- クライアントが「アクセスする」ことができるチャンネル。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.get_all_members:1\nmsgid \"Returns a generator with every :class:`.Member` the client can see.\"\nmsgstr \"クライアントが参照可能なすべての :class:`.Member` のジェネレータを返します。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.get_all_members:9\nmsgid \":class:`.Member` -- A member the client can see.\"\nmsgstr \":class:`.Member` -- クライアントが見ることができるメンバー。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.wait_until_ready:3\nmsgid \"Waits until the client's internal cache is all ready.\"\nmsgstr \"クライアントの内部キャッシュの準備が完了するまで待機します。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.wait_until_ready:7\nmsgid \"Calling this inside :meth:`setup_hook` can lead to a deadlock.\"\nmsgstr \":meth:`setup_hook` 内で呼び出すとデッドロックが起こります。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.wait_for:3\nmsgid \"Waits for a WebSocket event to be dispatched.\"\nmsgstr \"WebSocketイベントがディスパッチされるまで待機します。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.wait_for:5\nmsgid \"This could be used to wait for a user to reply to a message, or to react to a message, or to edit a message in a self-contained way.\"\nmsgstr \"メッセージの送信者が、メッセージに返信したり、リアクションをつけたり、編集したりする、自己完結型の処理に利用できます。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.wait_for:9\nmsgid \"The ``timeout`` parameter is passed onto :func:`asyncio.wait_for`. By default, it does not timeout. Note that this does propagate the :exc:`asyncio.TimeoutError` for you in case of timeout and is provided for ease of use.\"\nmsgstr \"``timeout`` パラメータは :func:`asyncio.wait_for` に渡されます。デフォルトではタイムアウトしません。タイムアウトした際に :exc:`asyncio.TimeoutError` が送出されるのは、使いやすさを考慮したためです。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.wait_for:14\nmsgid \"In case the event returns multiple arguments, a :class:`tuple` containing those arguments is returned instead. Please check the :ref:`documentation <discord-api-events>` for a list of events and their parameters.\"\nmsgstr \"イベントが複数の引数を返す場合は、それらを含む :class:`tuple` が代わりに返ります。イベントとそのパラメーターについては :ref:`ドキュメント <discord-api-events>` を参照してください。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.wait_for:19\nmsgid \"This function returns the **first event that meets the requirements**.\"\nmsgstr \"この関数は **条件を満たす最初のイベント** を返します。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.wait_for:22\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_guilds:14\n#: ../../../discord/client.py:docstring of discord.client.Client.entitlements:6\n#: ../../../discord/player.py:docstring of discord.player.FFmpegOpusAudio.from_probe:7\n#: ../../../discord/utils.py:docstring of discord.utils.get:24\nmsgid \"Examples\"\nmsgstr \"例\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.wait_for:23\nmsgid \"Waiting for a user reply: ::\"\nmsgstr \"ユーザーからの返信を待つ場合: ::\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.wait_for:37\nmsgid \"Waiting for a thumbs up reaction from the message author: ::\"\nmsgstr \"メッセージ送信者がサムズアップリアクションを付けるのを待つ場合: ::\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.wait_for:57\nmsgid \"``event`` parameter is now positional-only.\"\nmsgstr \"``event`` 引数は位置限定引数になりました。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.wait_for:59\nmsgid \"The event name, similar to the :ref:`event reference <discord-api-events>`, but without the ``on_`` prefix, to wait for.\"\nmsgstr \"イベント名は :ref:`イベントリファレンス <discord-api-events>` に似ていますが接頭詞の ``on_`` が必要ありません。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.wait_for:62\nmsgid \"A predicate to check what to wait for. The arguments must meet the parameters of the event being waited for.\"\nmsgstr \"待っているものに該当するかを確認する関数。引数は待機しているイベントのパラメータを満たしている必要があります。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.wait_for:65\nmsgid \"The number of seconds to wait before timing out and raising :exc:`asyncio.TimeoutError`.\"\nmsgstr \"タイムアウトして :exc:`asyncio.TimeoutError` が送出されるまでの秒数。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.wait_for:69\nmsgid \"If a timeout is provided and it was reached.\"\nmsgstr \"タイムアウトが設定されていて、かつその時間が経過した場合。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.wait_for:71\nmsgid \"Returns no arguments, a single argument, or a :class:`tuple` of multiple arguments that mirrors the parameters passed in the :ref:`event reference <discord-api-events>`.\"\nmsgstr \"単一の引数、あるいは :ref:`イベントリファレンス <discord-api-events>` のパラメータを反映した複数の引数の値を含む :class:`tuple` が返ります。返る引数がない場合もあります。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.change_presence:3\n#: ../../../discord/shard.py:docstring of discord.shard.AutoShardedClient.change_presence:3\nmsgid \"Changes the client's presence.\"\nmsgstr \"クライアントのプレゼンスを変更します。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.change_presence:12\n#: ../../../discord/shard.py:docstring of discord.shard.AutoShardedClient.change_presence:10\nmsgid \"Removed the ``afk`` keyword-only parameter.\"\nmsgstr \"キーワード専用引数 ``afk`` を削除しました。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.change_presence:15\n#: ../../../discord/shard.py:docstring of discord.shard.AutoShardedClient.change_presence:13\n#: ../../../discord/webhook/async_.py:docstring of discord.message.PartialMessage.add_reaction:15\n#: ../../../discord/webhook/async_.py:docstring of discord.message.PartialMessage.clear_reaction:11\n#: ../../../discord/webhook/async_.py:docstring of discord.message.PartialMessage.remove_reaction:13\nmsgid \"This function will now raise :exc:`TypeError` instead of ``InvalidArgument``.\"\nmsgstr \"この関数は ``InvalidArgument`` の代わりに :exc:`TypeError` を送出します。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.change_presence:19\n#: ../../../discord/shard.py:docstring of discord.shard.AutoShardedClient.change_presence:17\nmsgid \"The activity being done. ``None`` if no currently active activity is done.\"\nmsgstr \"実行中のアクティビティ。何も実行していない場合は ``None`` です。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.change_presence:21\nmsgid \"Indicates what status to change to. If ``None``, then :attr:`.Status.online` is used.\"\nmsgstr \"変更するステータスを示します。 ``None`` の場合、:attr:`.Status.online` となります。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.change_presence:25\nmsgid \"If the ``activity`` parameter is not the proper type.\"\nmsgstr \"``activity`` パラメータが適切な型でない場合。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_guilds:1\nmsgid \"Retrieves an :term:`asynchronous iterator` that enables receiving your guilds.\"\nmsgstr \"Botが所属するGuildを取得できる、 :term:`asynchronous iterator` を取得します。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_guilds:5\nmsgid \"Using this, you will only receive :attr:`.Guild.owner`, :attr:`.Guild.icon`, :attr:`.Guild.id`, :attr:`.Guild.name`, :attr:`.Guild.approximate_member_count`, and :attr:`.Guild.approximate_presence_count` per :class:`.Guild`.\"\nmsgstr \"これを使用した場合、各 :class:`.Guild` の :attr:`.Guild.owner` 、 :attr:`.Guild.icon` 、 :attr:`.Guild.id` 、 :attr:`.Guild.name` 、 :attr:`.Guild.approximate_member_count` 、および :attr:`.Guild.approximate_presence_count` のみ受け取ります。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_guilds:11\nmsgid \"This method is an API call. For general usage, consider :attr:`guilds` instead.\"\nmsgstr \"これはAPIを呼び出します。通常は :attr:`guilds` を代わりに使用してください。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_guilds:15\n#: ../../../discord/client.py:docstring of discord.client.Client.entitlements:7\n#: ../../../discord/abc.py:docstring of discord.abc.Messageable.history:7\n#: ../../../discord/user.py:docstring of discord.abc.Messageable.history:7\n#: ../../../discord/reaction.py:docstring of discord.reaction.Reaction.users:12\nmsgid \"Usage ::\"\nmsgstr \"使い方 ::\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_guilds:20\n#: ../../../discord/client.py:docstring of discord.client.Client.entitlements:12\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.bans:15\nmsgid \"Flattening into a list ::\"\nmsgstr \"リストへフラット化 ::\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_guilds:25\n#: ../../../discord/client.py:docstring of discord.client.Client.entitlements:17\n#: ../../../discord/abc.py:docstring of discord.abc.Messageable.history:19\n#: ../../../discord/user.py:docstring of discord.abc.Messageable.history:19\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.fetch_members:10\nmsgid \"All parameters are optional.\"\nmsgstr \"すべてのパラメータがオプションです。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_guilds:27\nmsgid \"The number of guilds to retrieve. If ``None``, it retrieves every guild you have access to. Note, however, that this would make it a slow operation. Defaults to ``200``.\"\nmsgstr \"取得するギルドの数。 ``None`` の場合、Botがアクセスできるギルドすべてを取得します。ただし、これには時間が掛かることに注意してください。デフォルトは200です。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_guilds:34\nmsgid \"The default has been changed to 200.\"\nmsgstr \"デフォルトが200に変更されました。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_guilds:36\nmsgid \"Retrieves guilds before this date or object. If a datetime is provided, it is recommended to use a UTC aware datetime. If the datetime is naive, it is assumed to be local time.\"\nmsgstr \"渡された日付、またはギルドより前のギルドを取得します。日付を指定する場合、UTC aware datetimeを利用することを推奨します。naive datetimeである場合、これはローカル時間であるとみなされます。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_guilds:40\nmsgid \"Retrieve guilds after this date or object. If a datetime is provided, it is recommended to use a UTC aware datetime. If the datetime is naive, it is assumed to be local time.\"\nmsgstr \"渡された日付、またはギルドより後のギルドを取得します。日付を指定する場合、UTC aware datetimeを利用することを推奨します。naive datetimeである場合、これはローカル時間であるとみなされます。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_guilds:44\nmsgid \"Whether to include count information in the guilds. This fills the :attr:`.Guild.approximate_member_count` and :attr:`.Guild.approximate_presence_count` attributes without needing any privileged intents. Defaults to ``True``.\"\nmsgstr \"ギルドにカウント情報を含めるかどうか。これを使うことで特権インテントがなくても :attr:`.Guild.approximate_member_count` と :attr:`.Guild.approximate_presence_count` 属性が設定されます。デフォルトは ``True`` です。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_guilds:51\nmsgid \"Getting the guilds failed.\"\nmsgstr \"ギルドの取得に失敗した場合。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_guilds:53\nmsgid \":class:`.Guild` -- The guild with the guild data parsed.\"\nmsgstr \":class:`.Guild` -- データを解析したGuild。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_template:3\nmsgid \"Gets a :class:`.Template` from a discord.new URL or code.\"\nmsgstr \"discord.new URL またはコードから :class:`.Template` を取得します。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_template:5\nmsgid \"The Discord Template Code or URL (must be a discord.new URL).\"\nmsgstr \"DiscordテンプレートコードまたはURL (discord.new URLである必要があります)。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_template:8\nmsgid \"The template is invalid.\"\nmsgstr \"無効なテンプレートである場合。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_template:9\nmsgid \"Getting the template failed.\"\nmsgstr \"テンプレートの取得に失敗した場合。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_template:11\nmsgid \"The template from the URL/code.\"\nmsgstr \"URL/コードからのテンプレート。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_template:12\nmsgid \":class:`.Template`\"\nmsgstr \":class:`.Template`\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_guild:3\nmsgid \"Retrieves a :class:`.Guild` from an ID.\"\nmsgstr \"IDから :class:`.Guild` を取得します。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_guild:7\nmsgid \"Using this, you will **not** receive :attr:`.Guild.channels`, :attr:`.Guild.members`, :attr:`.Member.activity` and :attr:`.Member.voice` per :class:`.Member`.\"\nmsgstr \"これを使用した場合、 :attr:`.Guild.channels` 、 :attr:`.Guild.members` 及び、各 :class:`.Member` の :attr:`.Member.activity` と :attr:`.Member.voice` を取得することは\\\\ **できません**\\\\ 。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_guild:12\nmsgid \"This method is an API call. For general usage, consider :meth:`get_guild` instead.\"\nmsgstr \"このメソッドはAPIを呼び出します。通常は :meth:`get_guild` を代わりとして使用してください。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_guild:16\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_widget:11\nmsgid \"``guild_id`` parameter is now positional-only.\"\nmsgstr \"引数 ``guild_id`` は位置専用引数となりました。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_guild:19\nmsgid \"The guild's ID to fetch from.\"\nmsgstr \"取得したいギルドのID。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_guild:21\nmsgid \"Whether to include count information in the guild. This fills the :attr:`.Guild.approximate_member_count` and :attr:`.Guild.approximate_presence_count` attributes without needing any privileged intents. Defaults to ``True``.\"\nmsgstr \"ギルドにカウント情報を含めるかどうか。これを使うことで特権インテントがなくても :attr:`.Guild.approximate_member_count` と :attr:`.Guild.approximate_presence_count` 属性が設定されます。デフォルトは ``True`` です。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_guild:28\nmsgid \"The guild doesn't exist or you got no access to it.\"\nmsgstr \"\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_guild:29\nmsgid \"Getting the guild failed.\"\nmsgstr \"ギルドの取得に失敗した場合。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_guild:31\nmsgid \"The guild from the ID.\"\nmsgstr \"IDから取得したギルド。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_guild:32\n#: ../../../discord/client.py:docstring of discord.client.Client.create_guild:29\n#: ../../../discord/template.py:docstring of discord.template.Template.create_guild:25\nmsgid \":class:`.Guild`\"\nmsgstr \":class:`.Guild`\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.create_guild:3\nmsgid \"Creates a :class:`.Guild`.\"\nmsgstr \":class:`.Guild` を作成します。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.create_guild:5\n#: ../../../discord/template.py:docstring of discord.template.Template.create_guild:5\nmsgid \"Bot accounts in more than 10 guilds are not allowed to create guilds.\"\nmsgstr \"10以上のギルドに参加しているBotアカウントはギルドの作成ができません。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.create_guild:7\nmsgid \"``name`` and ``icon`` parameters are now keyword-only. The ``region`` parameter has been removed.\"\nmsgstr \"``name`` と ``icon`` パラメータはキーワード限定引数になりました。\\n\"\n\"``region`` パラメータは削除されました。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.create_guild:10\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.from_url:3\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.edit:5\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.send:14\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.edit_message:13\nmsgid \"This function will now raise :exc:`ValueError` instead of ``InvalidArgument``.\"\nmsgstr \"この関数は ``InvalidArgument`` の代わりに :exc:`ValueError` を送出します。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.create_guild:14\n#: ../../../discord/template.py:docstring of discord.template.Template.create_guild:14\nmsgid \"The name of the guild.\"\nmsgstr \"ギルドの名前。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.create_guild:16\n#: ../../../discord/template.py:docstring of discord.template.Template.create_guild:16\nmsgid \"The :term:`py:bytes-like object` representing the icon. See :meth:`.ClientUser.edit` for more details on what is expected.\"\nmsgstr \"アイコンを表す :term:`py:bytes-like object` です。 :meth:`.ClientUser.edit` で、予期されるデータの詳細を確認してください。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.create_guild:19\nmsgid \"The code for a template to create the guild with.\"\nmsgstr \"Guildを作成するためのテンプレートのコード。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.create_guild:24\n#: ../../../discord/template.py:docstring of discord.template.Template.create_guild:20\nmsgid \"Guild creation failed.\"\nmsgstr \"ギルドの作成に失敗した場合。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.create_guild:25\n#: ../../../discord/template.py:docstring of discord.template.Template.create_guild:21\nmsgid \"Invalid icon image format given. Must be PNG or JPG.\"\nmsgstr \"Guildのアイコンの画像形式が無効だった時。画像は、PNGまたはJPGである必要があります。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.create_guild:27\n#: ../../../discord/template.py:docstring of discord.template.Template.create_guild:23\nmsgid \"The guild created. This is not the same guild that is added to cache.\"\nmsgstr \"作成されたギルド。キャッシュに追加されるギルドとは別物です。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_stage_instance:3\nmsgid \"Gets a :class:`.StageInstance` for a stage channel id.\"\nmsgstr \"ステージチャンネルのIDの :class:`.StageInstance` を取得します。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_stage_instance:7\nmsgid \"The stage channel ID.\"\nmsgstr \"ステージチャンネルのID\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_stage_instance:10\n#: ../../../discord/channel.py:docstring of discord.channel.StageChannel.fetch_instance:7\nmsgid \"The stage instance or channel could not be found.\"\nmsgstr \"ステージインスタンスまたはチャンネルが見つからなかった場合\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_stage_instance:11\n#: ../../../discord/channel.py:docstring of discord.channel.StageChannel.fetch_instance:8\nmsgid \"Getting the stage instance failed.\"\nmsgstr \"ステージインスタンスの取得に失敗した場合\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_stage_instance:13\nmsgid \"The stage instance from the stage channel ID.\"\nmsgstr \"ステージチャンネルIDで取得したステージインスタンス\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_stage_instance:14\nmsgid \":class:`.StageInstance`\"\nmsgstr \":class:`.StageInstance`\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_invite:3\nmsgid \"Gets an :class:`.Invite` from a discord.gg URL or ID.\"\nmsgstr \":class:`.Invite` をdiscord.gg URLやIDから取得します。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_invite:7\nmsgid \"If the invite is for a guild you have not joined, the guild and channel attributes of the returned :class:`.Invite` will be :class:`.PartialInviteGuild` and :class:`.PartialInviteChannel` respectively.\"\nmsgstr \"もしBotがInviteのGuildに参加していない場合、 :class:`.Invite` のguildとchannel属性はそれぞれ :class:`.PartialInviteGuild` と :class:`.PartialInviteChannel` になります。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_invite:11\nmsgid \"The Discord invite ID or URL (must be a discord.gg URL).\"\nmsgstr \"Discordの招待ID、またはURL (discord.gg URLである必要があります)。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_invite:13\nmsgid \"Whether to include count information in the invite. This fills the :attr:`.Invite.approximate_member_count` and :attr:`.Invite.approximate_presence_count` fields.\"\nmsgstr \"招待にカウントの情報を含めるかどうか。これにより :attr:`.Invite.approximate_member_count` と :attr:`.Invite.approximate_presence_count` が追加されます。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_invite:17\nmsgid \"Whether to include the expiration date of the invite. This fills the :attr:`.Invite.expires_at` field.\"\nmsgstr \"招待の有効期限を含めるかどうか。有効期限は :attr:`.Invite.expires_at` に代入されます。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_invite:22\nmsgid \"The ID of the scheduled event this invite is for.\"\nmsgstr \"招待に紐づいたスケジュールイベントのID。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_invite:26\nmsgid \"It is not possible to provide a url that contains an ``event_id`` parameter when using this parameter.\"\nmsgstr \"このパラメーターを使用している場合は、 ``event_url`` パラメーターを含むURLを渡すことはできません。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_invite:32\nmsgid \"The url contains an ``event_id``, but ``scheduled_event_id`` has also been provided.\"\nmsgstr \"URLに ``event_id`` が含まれているのに、 ``scheduled_event_id`` も渡された場合。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_invite:33\nmsgid \"The invite has expired or is invalid.\"\nmsgstr \"招待の有効期限が切れたか無効の場合。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_invite:34\nmsgid \"Getting the invite failed.\"\nmsgstr \"招待の取得に失敗した場合。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_invite:36\nmsgid \"The invite from the URL/ID.\"\nmsgstr \"URL/IDから取得した招待。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_invite:37\nmsgid \":class:`.Invite`\"\nmsgstr \":class:`.Invite`\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.delete_invite:3\nmsgid \"Revokes an :class:`.Invite`, URL, or ID to an invite.\"\nmsgstr \":class:`.Invite` や、招待のURL、IDを削除します。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.delete_invite:5\nmsgid \"You must have :attr:`~.Permissions.manage_channels` in the associated guild to do this.\"\nmsgstr \"これを行うには、関連付けられたGuildにて、 :attr:`~.Permissions.manage_channels` が必要です。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.delete_invite:10\nmsgid \"``invite`` parameter is now positional-only.\"\nmsgstr \"``invite`` 引数は位置限定引数になりました。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.delete_invite:12\nmsgid \"The invite to revoke.\"\nmsgstr \"取り消す招待。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.delete_invite:15\n#: ../../../discord/invite.py:docstring of discord.invite.Invite.delete:10\nmsgid \"You do not have permissions to revoke invites.\"\nmsgstr \"削除する権限がない場合。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.delete_invite:16\n#: ../../../discord/invite.py:docstring of discord.invite.Invite.delete:11\nmsgid \"The invite is invalid or expired.\"\nmsgstr \"招待が無効または期限切れの場合。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.delete_invite:17\n#: ../../../discord/invite.py:docstring of discord.invite.Invite.delete:12\nmsgid \"Revoking the invite failed.\"\nmsgstr \"招待の取り消しに失敗した場合。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_widget:3\nmsgid \"Gets a :class:`.Widget` from a guild ID.\"\nmsgstr \"ギルドIDから :class:`.Widget` を取得します。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_widget:7\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.widget:7\nmsgid \"The guild must have the widget enabled to get this information.\"\nmsgstr \"この情報を取得するためには、ギルドのウィジェットを有効化しておく必要があります。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_widget:13\nmsgid \"The ID of the guild.\"\nmsgstr \"ギルドのID。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_widget:16\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.widget:9\nmsgid \"The widget for this guild is disabled.\"\nmsgstr \"Guildのウィジェットが無効になっている場合。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_widget:17\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.widget:10\nmsgid \"Retrieving the widget failed.\"\nmsgstr \"ウィジェットの取得に失敗した場合。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_widget:19\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.widget:12\nmsgid \"The guild's widget.\"\nmsgstr \"ギルドのウィジェット。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_widget:20\nmsgid \":class:`.Widget`\"\nmsgstr \":class:`.Widget`\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.application_info:3\nmsgid \"Retrieves the bot's application information.\"\nmsgstr \"Botのアプリケーション情報を取得します。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.application_info:5\nmsgid \"Retrieving the information failed somehow.\"\nmsgstr \"情報の取得に失敗した場合。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.application_info:7\nmsgid \"The bot's application information.\"\nmsgstr \"Botのアプリケーション情報。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.application_info:8\nmsgid \":class:`.AppInfo`\"\nmsgstr \":class:`.AppInfo`\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_user:3\nmsgid \"Retrieves a :class:`~discord.User` based on their ID. You do not have to share any guilds with the user to get this information, however many operations do require that you do.\"\nmsgstr \"IDをもとに :class:`~discord.User` を取得します。そのユーザーとギルドを共有する必要はありませんが、操作の多くはそれを必要とします。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_user:9\nmsgid \"This method is an API call. If you have :attr:`discord.Intents.members` and member cache enabled, consider :meth:`get_user` instead.\"\nmsgstr \"このメソッドはAPIを呼び出します。 :attr:`discord.Intents.members` とメンバーキャッシュを有効化している場合は、 :meth:`get_user` の使用を検討してください。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_user:13\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.get_member:5\nmsgid \"``user_id`` parameter is now positional-only.\"\nmsgstr \"``user_id`` 引数は位置限定引数になりました。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_user:15\nmsgid \"The user's ID to fetch from.\"\nmsgstr \"取得したいユーザーのID。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_user:18\nmsgid \"A user with this ID does not exist.\"\nmsgstr \"この ID を持つユーザーが存在しない場合。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_user:19\nmsgid \"Fetching the user failed.\"\nmsgstr \"ユーザーの取得に失敗した場合。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_user:21\nmsgid \"The user you requested.\"\nmsgstr \"あなたがリクエストしたユーザー。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_user:22\n#: ../../../discord/abc.py:docstring of discord.abc.User:5\n#: ../../../discord/abc.py:docstring of discord.abc.Messageable:11\nmsgid \":class:`~discord.User`\"\nmsgstr \":class:`~discord.User`\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_channel:3\nmsgid \"Retrieves a :class:`.abc.GuildChannel`, :class:`.abc.PrivateChannel`, or :class:`.Thread` with the specified ID.\"\nmsgstr \"指定されたIDを持つ :class:`.abc.GuildChannel` 、 :class:`.abc.PrivateChannel` 、または :class:`.Thread` を取得します。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_channel:7\nmsgid \"This method is an API call. For general usage, consider :meth:`get_channel` instead.\"\nmsgstr \"このメソッドはAPIを呼び出します。通常は :meth:`get_channel` を代わりとして使用してください。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_channel:13\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.get_channel:9\nmsgid \"``channel_id`` parameter is now positional-only.\"\nmsgstr \"``channel_id`` 引数は位置限定引数になりました。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_channel:15\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.fetch_channels:11\nmsgid \"An unknown channel type was received from Discord.\"\nmsgstr \"まだ定義されていないチャンネルタイプがDiscord Apiから受信された場合。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_channel:16\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.fetch_channel:12\nmsgid \"Retrieving the channel failed.\"\nmsgstr \"チャンネルの取得に失敗した場合。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_channel:17\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.fetch_channel:13\nmsgid \"Invalid Channel ID.\"\nmsgstr \"引数が無効なチャンネル IDである場合。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_channel:18\n#: ../../../discord/webhook/async_.py:docstring of discord.message.PartialMessage.fetch_thread:14\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.fetch_thread:14\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.fetch_channel:14\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.fetch_thread:14\nmsgid \"You do not have permission to fetch this channel.\"\nmsgstr \"このチャンネルからメッセージを取得する権限がない場合。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_channel:20\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.fetch_channel:16\nmsgid \"The channel from the ID.\"\nmsgstr \"IDから取得したチャンネル。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_channel:21\nmsgid \"Union[:class:`.abc.GuildChannel`, :class:`.abc.PrivateChannel`, :class:`.Thread`]\"\nmsgstr \"Union[:class:`.abc.GuildChannel`, :class:`.abc.PrivateChannel`, :class:`.Thread`]\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_webhook:3\nmsgid \"Retrieves a :class:`.Webhook` with the specified ID.\"\nmsgstr \"特定のIDの :class:`.Webhook` を取得します。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_webhook:7\nmsgid \"``webhook_id`` parameter is now positional-only.\"\nmsgstr \"``webhook_id`` 引数は位置限定引数になりました。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_webhook:9\nmsgid \"Retrieving the webhook failed.\"\nmsgstr \"Webhookの取得に失敗した場合。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_webhook:10\nmsgid \"Invalid webhook ID.\"\nmsgstr \"無効なWebhookのIDだった場合。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_webhook:11\nmsgid \"You do not have permission to fetch this webhook.\"\nmsgstr \"Webhookを取得する権限がない場合。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_webhook:13\nmsgid \"The webhook you requested.\"\nmsgstr \"要求したWebhook。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_webhook:14\nmsgid \":class:`.Webhook`\"\nmsgstr \":class:`.Webhook`\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_sticker:3\nmsgid \"Retrieves a :class:`.Sticker` with the specified ID.\"\nmsgstr \"特定のIDの :class:`.Sticker` を取得します。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_sticker:7\n#: ../../../discord/sticker.py:docstring of discord.sticker.StickerItem.fetch:5\nmsgid \"Retrieving the sticker failed.\"\nmsgstr \"スタンプの取得に失敗した場合。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_sticker:8\nmsgid \"Invalid sticker ID.\"\nmsgstr \"スタンプIDが無効な場合。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_sticker:10\nmsgid \"The sticker you requested.\"\nmsgstr \"要求されたスタンプ。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_sticker:11\nmsgid \"Union[:class:`.StandardSticker`, :class:`.GuildSticker`]\"\nmsgstr \"Union[:class:`.StandardSticker`, :class:`.GuildSticker`]\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_skus:3\nmsgid \"Retrieves the bot's available SKUs.\"\nmsgstr \"\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_skus:7\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_entitlement:11\n#: ../../../discord/client.py:docstring of discord.client.Client.entitlements:39\n#: ../../../discord/client.py:docstring of discord.client.Client.create_entitlement:14\n#: ../../../discord/sku.py:docstring of discord.sku.Entitlement.delete:5\nmsgid \"The application ID could not be found.\"\nmsgstr \"\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_skus:8\nmsgid \"Retrieving the SKUs failed.\"\nmsgstr \"\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_skus:10\nmsgid \"The bot's available SKUs.\"\nmsgstr \"\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_skus:11\nmsgid \"List[:class:`.SKU`]\"\nmsgstr \"\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_entitlement:3\nmsgid \"Retrieves a :class:`.Entitlement` with the specified ID.\"\nmsgstr \"\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_entitlement:7\nmsgid \"The entitlement's ID to fetch from.\"\nmsgstr \"\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_entitlement:10\nmsgid \"An entitlement with this ID does not exist.\"\nmsgstr \"\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_entitlement:12\nmsgid \"Fetching the entitlement failed.\"\nmsgstr \"\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_entitlement:14\nmsgid \"The entitlement you requested.\"\nmsgstr \"\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_entitlement:15\nmsgid \":class:`.Entitlement`\"\nmsgstr \"\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.entitlements:1\nmsgid \"Retrieves an :term:`asynchronous iterator` of the :class:`.Entitlement` that applications has.\"\nmsgstr \"\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.entitlements:19\nmsgid \"The number of entitlements to retrieve. If ``None``, it retrieves every entitlement for this application. Note, however, that this would make it a slow operation. Defaults to ``100``.\"\nmsgstr \"\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.entitlements:22\nmsgid \"Retrieve entitlements before this date or entitlement. If a datetime is provided, it is recommended to use a UTC aware datetime. If the datetime is naive, it is assumed to be local time.\"\nmsgstr \"\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.entitlements:26\nmsgid \"Retrieve entitlements after this date or entitlement. If a datetime is provided, it is recommended to use a UTC aware datetime. If the datetime is naive, it is assumed to be local time.\"\nmsgstr \"\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.entitlements:30\nmsgid \"A list of SKUs to filter by.\"\nmsgstr \"\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.entitlements:32\nmsgid \"The user to filter by.\"\nmsgstr \"\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.entitlements:34\nmsgid \"The guild to filter by.\"\nmsgstr \"\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.entitlements:36\nmsgid \"Whether to exclude ended entitlements. Defaults to ``False``.\"\nmsgstr \"\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.entitlements:40\nmsgid \"Fetching the entitlements failed.\"\nmsgstr \"\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.entitlements:41\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.bans:33\nmsgid \"Both ``after`` and ``before`` were provided, as Discord does not     support this type of pagination.\"\nmsgstr \"``after`` と ``before`` の両方が渡された場合。Discordはこのタイプのページネーションをサポートしていません。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.entitlements:43\nmsgid \":class:`.Entitlement` -- The entitlement with the application.\"\nmsgstr \"\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.create_entitlement:3\nmsgid \"Creates a test :class:`.Entitlement` for the application.\"\nmsgstr \"\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.create_entitlement:7\nmsgid \"The SKU to create the entitlement for.\"\nmsgstr \"\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.create_entitlement:9\nmsgid \"The ID of the owner.\"\nmsgstr \"\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.create_entitlement:11\nmsgid \"The type of the owner.\"\nmsgstr \"\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.create_entitlement:15\nmsgid \"The SKU or owner could not be found.\"\nmsgstr \"\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.create_entitlement:16\nmsgid \"Creating the entitlement failed.\"\nmsgstr \"\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_premium_sticker_packs:3\nmsgid \"Retrieves all available premium sticker packs.\"\nmsgstr \"利用可能なプレミアムスタンプパックをすべて取得します。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_premium_sticker_packs:7\nmsgid \"Retrieving the sticker packs failed.\"\nmsgstr \"スタンプパックの取得に失敗した場合。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_premium_sticker_packs:9\nmsgid \"All available premium sticker packs.\"\nmsgstr \"利用可能なプレミアムスタンプパックすべて。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.fetch_premium_sticker_packs:10\nmsgid \"List[:class:`.StickerPack`]\"\nmsgstr \"List[:class:`.StickerPack`]\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.create_dm:3\nmsgid \"Creates a :class:`.DMChannel` with this user.\"\nmsgstr \"このユーザーと :class:`.DMChannel` を作成します。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.create_dm:5\n#: ../../../discord/user.py:docstring of discord.user.User.create_dm:5\n#: ../../../discord/member.py:docstring of discord.member.flatten_user.<locals>.generate_function.<locals>.general:5\nmsgid \"This should be rarely called, as this is done transparently for most people.\"\nmsgstr \"これは、ほとんどの人にとっては自動で行われるため、呼び出す必要はめったにありません。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.create_dm:10\nmsgid \"The user to create a DM with.\"\nmsgstr \"DMを作成するユーザー。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.create_dm:13\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.clone:19\n#: ../../../discord/user.py:docstring of discord.user.User.create_dm:8\n#: ../../../discord/member.py:docstring of discord.member.flatten_user.<locals>.generate_function.<locals>.general:8\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.clone:19\nmsgid \"The channel that was created.\"\nmsgstr \"作成されたチャンネル。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.create_dm:14\n#: ../../../discord/user.py:docstring of discord.user.User.create_dm:9\n#: ../../../discord/member.py:docstring of discord.member.flatten_user.<locals>.generate_function.<locals>.general:9\nmsgid \":class:`.DMChannel`\"\nmsgstr \":class:`.DMChannel`\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.add_dynamic_items:1\nmsgid \"Registers :class:`~discord.ui.DynamicItem` classes for persistent listening.\"\nmsgstr \"\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.add_dynamic_items:3\n#: ../../../discord/client.py:docstring of discord.client.Client.remove_dynamic_items:3\nmsgid \"This method accepts *class types* rather than instances.\"\nmsgstr \"\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.add_dynamic_items:7\nmsgid \"The classes of dynamic items to add.\"\nmsgstr \"\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.add_dynamic_items:10\n#: ../../../discord/client.py:docstring of discord.client.Client.remove_dynamic_items:10\nmsgid \"A class is not a subclass of :class:`~discord.ui.DynamicItem`.\"\nmsgstr \"\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.remove_dynamic_items:1\nmsgid \"Removes :class:`~discord.ui.DynamicItem` classes from persistent listening.\"\nmsgstr \"\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.remove_dynamic_items:7\nmsgid \"The classes of dynamic items to remove.\"\nmsgstr \"\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.add_view:1\nmsgid \"Registers a :class:`~discord.ui.View` for persistent listening.\"\nmsgstr \":class:`~discord.ui.View` を永続的にインタラクションを受け取るために登録します。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.add_view:3\nmsgid \"This method should be used for when a view is comprised of components that last longer than the lifecycle of the program.\"\nmsgstr \"このメソッドは、ビューがプログラムのライフサイクルを超えて存在するコンポーネントで構成されている場合に利用すべきです。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.add_view:8\nmsgid \"The view to register for dispatching.\"\nmsgstr \"ディスパッチするために登録するビュー。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.add_view:10\nmsgid \"The message ID that the view is attached to. This is currently used to refresh the view's state during message update events. If not given then message update events are not propagated for the view.\"\nmsgstr \"ビューが添付されたメッセージID。これは現在、ビューの状態をメッセージ更新のイベント後に更新するのに使用されています。与えられていない場合はメッセージ更新のイベントはビューに伝播されません。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.add_view:15\nmsgid \"A view was not passed.\"\nmsgstr \"ビューが渡されない場合。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.add_view:16\nmsgid \"The view is not persistent or is already finished. A persistent view has no timeout     and all their components have an explicitly provided custom_id.\"\nmsgstr \"ビューが永続しないか、すでに終了している場合。永続するビューにはタイムアウトがなく、すべてのコンポーネントに明示的に渡された custom_id があります。\"\n\n#: ../../../discord/client.py:docstring of discord.Client.persistent_views:1\nmsgid \"A sequence of persistent views added to the client.\"\nmsgstr \"クライアントに追加された永続的なビューのシーケンスです。\"\n\n#: ../../../discord/client.py:docstring of discord.Client.persistent_views:5\nmsgid \"Sequence[:class:`.View`]\"\nmsgstr \"Sequence[:class:`.View`]\"\n\n#: ../../api.rst:49\nmsgid \"AutoShardedClient\"\nmsgstr \"AutoShardedClient\"\n\n#: ../../../discord/shard.py:docstring of discord.shard.AutoShardedClient:1\nmsgid \"A client similar to :class:`Client` except it handles the complications of sharding for the user into a more manageable and transparent single process bot.\"\nmsgstr \"このクライアントは :class:`Client` に似ていますが、複雑なシャーディングの処理をユーザーに変わって処理し、管理しやすく、かつ透過的なシングルプロセスのボットとして動かせるようにするという点が異なります。\"\n\n#: ../../../discord/shard.py:docstring of discord.shard.AutoShardedClient:5\nmsgid \"When using this client, you will be able to use it as-if it was a regular :class:`Client` with a single shard when implementation wise internally it is split up into multiple shards. This allows you to not have to deal with IPC or other complicated infrastructure.\"\nmsgstr \"このクライアントは、実装に関して内部的に複数のシャードに分割されていても、単一のシャードの通常の :class:`Client` のように使用することができます。これにより、IPCやその他の複雑なインフラストラクチャへの対処を行う必要がなくなります。\"\n\n#: ../../../discord/shard.py:docstring of discord.shard.AutoShardedClient:10\nmsgid \"It is recommended to use this client only if you have surpassed at least 1000 guilds.\"\nmsgstr \"少なくとも1000を超えるギルドに参加していいる場合にのみ、このクライアントを使用することを推奨します。\"\n\n#: ../../../discord/shard.py:docstring of discord.shard.AutoShardedClient:13\nmsgid \"If no :attr:`.shard_count` is provided, then the library will use the Bot Gateway endpoint call to figure out how many shards to use.\"\nmsgstr \":attr:`.shard_count` が指定されていない場合、ライブラリはBot Gatewayのエンドポイント呼び出しを使用して使用するシャードの数を見つけ出します。\"\n\n#: ../../../discord/shard.py:docstring of discord.shard.AutoShardedClient:16\nmsgid \"If a ``shard_ids`` parameter is given, then those shard IDs will be used to launch the internal shards. Note that :attr:`.shard_count` must be provided if this is used. By default, when omitted, the client will launch shards from 0 to ``shard_count - 1``.\"\nmsgstr \"``shard_ids`` パラメータが指定されている場合、それらのシャードIDが内部シャードの起動時に使用されます。これを使用する場合 :attr:`.shard_count` の指定が必須です。このパラメータを省略した場合は、クライアントは0から ``shard_count - 1`` までのシャードを起動します。\"\n\n#: ../../../discord/shard.py:docstring of discord.shard.AutoShardedClient:31\nmsgid \"An optional list of shard_ids to launch the shards with.\"\nmsgstr \"シャードの起動時に利用するshard_idsのオプショナルなリスト。\"\n\n#: ../../../discord/shard.py:docstring of discord.shard.AutoShardedClient:33\nmsgid \"Optional[List[:class:`int`]]\"\nmsgstr \"Optional[List[:class:`int`]]\"\n\n#: ../../../discord/shard.py:docstring of discord.shard.AutoShardedClient:37\nmsgid \"The maximum number of seconds to wait before timing out when launching a shard. Defaults to 180 seconds.\"\nmsgstr \"\"\n\n#: ../../../discord/shard.py:docstring of discord.shard.AutoShardedClient:42\n#: ../../../discord/message.py:docstring of discord.message.Attachment:99\nmsgid \"Optional[:class:`float`]\"\nmsgstr \"Optional[:class:`float`]\"\n\n#: ../../../discord/shard.py:docstring of discord.AutoShardedClient.latency:3\nmsgid \"This operates similarly to :meth:`Client.latency` except it uses the average latency of every shard's latency. To get a list of shard latency, check the :attr:`latencies` property. Returns ``nan`` if there are no shards ready.\"\nmsgstr \"これは :meth:`Client.latency` と同様に機能しますが、すべてのシャードの平均待ち時間を使用する点が異なります。シャードの待ち時間のリストを取得するには :attr:`latencies` プロパティを参照してください。準備ができていない場合は ``nan`` を返します。\"\n\n#: ../../../discord/shard.py:docstring of discord.AutoShardedClient.latencies:1\nmsgid \"A list of latencies between a HEARTBEAT and a HEARTBEAT_ACK in seconds.\"\nmsgstr \"HEARTBEATとHEARTBEAT_ACK間の待ち時間を秒単位で測定したもののリストです。\"\n\n#: ../../../discord/shard.py:docstring of discord.AutoShardedClient.latencies:3\nmsgid \"This returns a list of tuples with elements ``(shard_id, latency)``.\"\nmsgstr \"これは、 ``(shard_id, latency)`` の要素を持つタプルのリストを返します。\"\n\n#: ../../../discord/shard.py:docstring of discord.AutoShardedClient.latencies:5\nmsgid \"List[Tuple[:class:`int`, :class:`float`]]\"\nmsgstr \"List[Tuple[:class:`int`, :class:`float`]]\"\n\n#: ../../../discord/shard.py:docstring of discord.shard.AutoShardedClient.get_shard:1\nmsgid \"Gets the shard information at a given shard ID or ``None`` if not found.\"\nmsgstr \"渡されたシャードIDのシャード情報を取得します。見つからない場合は ``None`` が返ります。\"\n\n#: ../../../discord/shard.py:docstring of discord.shard.AutoShardedClient.get_shard:5\nmsgid \"``shard_id`` parameter is now positional-only.\"\nmsgstr \"引数 ``shard_id`` は位置専用引数となりました。\"\n\n#: ../../../discord/shard.py:docstring of discord.shard.AutoShardedClient.get_shard:7\nmsgid \"Information about the shard with given ID. ``None`` if not found.\"\nmsgstr \"渡されたシャードIDのシャード情報。見つからない場合は ``None`` が返ります。\"\n\n#: ../../../discord/shard.py:docstring of discord.shard.AutoShardedClient.get_shard:8\nmsgid \"Optional[:class:`ShardInfo`]\"\nmsgstr \"Optional[:class:`ShardInfo`]\"\n\n#: ../../../discord/shard.py:docstring of discord.AutoShardedClient.shards:1\nmsgid \"Returns a mapping of shard IDs to their respective info object.\"\nmsgstr \"シャードIDとその情報オブジェクトのマッピングを返します。\"\n\n#: ../../../discord/shard.py:docstring of discord.AutoShardedClient.shards:3\nmsgid \"Mapping[int, :class:`ShardInfo`]\"\nmsgstr \"Mapping[int, :class:`ShardInfo`]\"\n\n#: ../../../discord/shard.py:docstring of discord.shard.AutoShardedClient.change_presence:5\nmsgid \"Example: ::\"\nmsgstr \"例: ::\"\n\n#: ../../../discord/shard.py:docstring of discord.shard.AutoShardedClient.change_presence:19\nmsgid \"Indicates what status to change to. If ``None``, then :attr:`Status.online` is used.\"\nmsgstr \"変更するステータスを示します。 ``None`` の場合、 :attr:`Status.online` となります。\"\n\n#: ../../../discord/shard.py:docstring of discord.shard.AutoShardedClient.change_presence:22\nmsgid \"The shard_id to change the presence to. If not specified or ``None``, then it will change the presence of every shard the bot can see.\"\nmsgstr \"プレゼンスを変更したいシャードのshard_id。指定されていない、または ``None`` が渡された場合はBotがアクセスできるすべてのシャードのプレゼンスが変更されます。\"\n\n#: ../../../discord/shard.py:docstring of discord.shard.AutoShardedClient.change_presence:27\nmsgid \"If the ``activity`` parameter is not of proper type.\"\nmsgstr \"``activity`` パラメータが適切な型でない場合。\"\n\n#: ../../../discord/shard.py:docstring of discord.shard.AutoShardedClient.is_ws_ratelimited:6\nmsgid \"This implementation checks if any of the shards are rate limited. For more granular control, consider :meth:`ShardInfo.is_ws_ratelimited`.\"\nmsgstr \"この実装は、シャードのいずれかがレート制限下にあるかどうかを確認します。より細かな制御が行いたい場合は :meth:`ShardInfo.is_ws_ratelimited` の使用を検討してください。\"\n\n#: ../../api.rst:57\nmsgid \"Application Info\"\nmsgstr \"アプリケーション情報\"\n\n#: ../../api.rst:60\nmsgid \"AppInfo\"\nmsgstr \"AppInfo\"\n\n#: ../../../discord/appinfo.py:docstring of discord.appinfo.AppInfo:1\nmsgid \"Represents the application info for the bot provided by Discord.\"\nmsgstr \"Discordが提供するBotのアプリケーション情報。\"\n\n#: ../../../discord/appinfo.py:docstring of discord.appinfo.AppInfo:6\n#: ../../../discord/appinfo.py:docstring of discord.appinfo.PartialAppInfo:7\n#: ../../../discord/message.py:docstring of discord.message.MessageApplication:7\nmsgid \"The application ID.\"\nmsgstr \"アプリケーションID。\"\n\n#: ../../../discord/appinfo.py:docstring of discord.appinfo.AppInfo:8\n#: ../../../discord/appinfo.py:docstring of discord.appinfo.PartialAppInfo:9\n#: ../../../discord/appinfo.py:docstring of discord.appinfo.PartialAppInfo:54\n#: ../../../discord/team.py:docstring of discord.team.Team:7\n#: ../../../discord/team.py:docstring of discord.team.Team:19\nmsgid \":class:`int`\"\nmsgstr \":class:`int`\"\n\n#: ../../../discord/appinfo.py:docstring of discord.appinfo.AppInfo:12\n#: ../../../discord/appinfo.py:docstring of discord.appinfo.PartialAppInfo:13\nmsgid \"The application name.\"\nmsgstr \"アプリケーションの名前。\"\n\n#: ../../../discord/appinfo.py:docstring of discord.appinfo.AppInfo:14\n#: ../../../discord/appinfo.py:docstring of discord.appinfo.AppInfo:34\n#: ../../../discord/appinfo.py:docstring of discord.appinfo.AppInfo:63\n#: ../../../discord/appinfo.py:docstring of discord.appinfo.PartialAppInfo:15\n#: ../../../discord/appinfo.py:docstring of discord.appinfo.PartialAppInfo:21\nmsgid \":class:`str`\"\nmsgstr \":class:`str`\"\n\n#: ../../../discord/appinfo.py:docstring of discord.appinfo.AppInfo:18\nmsgid \"The application owner.\"\nmsgstr \"アプリケーションの所有者。\"\n\n#: ../../../discord/appinfo.py:docstring of discord.appinfo.AppInfo:20\n#: ../../api.rst:4492\n#: ../../../discord/integrations.py:docstring of discord.integrations.Integration:45\n#: ../../../discord/integrations.py:docstring of discord.integrations.BotIntegration:39\n#: ../../../discord/integrations.py:docstring of discord.integrations.StreamIntegration:63\nmsgid \":class:`User`\"\nmsgstr \":class:`User`\"\n\n#: ../../../discord/appinfo.py:docstring of discord.appinfo.AppInfo:24\nmsgid \"The application's team.\"\nmsgstr \"アプリケーションのチーム。\"\n\n#: ../../../discord/appinfo.py:docstring of discord.appinfo.AppInfo:28\nmsgid \"Optional[:class:`Team`]\"\nmsgstr \"Optional[:class:`Team`]\"\n\n#: ../../../discord/appinfo.py:docstring of discord.appinfo.AppInfo:32\n#: ../../../discord/appinfo.py:docstring of discord.appinfo.PartialAppInfo:19\n#: ../../../discord/message.py:docstring of discord.message.MessageApplication:13\nmsgid \"The application description.\"\nmsgstr \"アプリケーションの説明。\"\n\n#: ../../../discord/appinfo.py:docstring of discord.appinfo.AppInfo:38\nmsgid \"Whether the bot can be invited by anyone or if it is locked to the application owner.\"\nmsgstr \"ボットの招待がアプリケーション所有者に限定されているか、誰でも招待が可能であるかどうか。\"\n\n#: ../../../discord/appinfo.py:docstring of discord.appinfo.AppInfo:41\n#: ../../../discord/appinfo.py:docstring of discord.appinfo.AppInfo:48\n#: ../../../discord/team.py:docstring of discord.team.TeamMember:53\n#: ../../../discord/team.py:docstring of discord.user.BaseUser.mentioned_in:7\n#: ../../../discord/opus.py:docstring of discord.opus.is_loaded:7\nmsgid \":class:`bool`\"\nmsgstr \":class:`bool`\"\n\n#: ../../../discord/appinfo.py:docstring of discord.appinfo.AppInfo:45\nmsgid \"Whether the bot requires the completion of the full oauth2 code grant flow to join.\"\nmsgstr \"ボットの参加に完全なOAuth2コードの認可フローが必要であるかどうか。\"\n\n#: ../../../discord/appinfo.py:docstring of discord.appinfo.AppInfo:52\n#: ../../../discord/appinfo.py:docstring of discord.appinfo.PartialAppInfo:25\nmsgid \"A list of RPC origin URLs, if RPC is enabled.\"\nmsgstr \"RPCが有効の場合、RPCオリジンURLのリスト。\"\n\n#: ../../../discord/appinfo.py:docstring of discord.appinfo.AppInfo:54\n#: ../../../discord/appinfo.py:docstring of discord.appinfo.PartialAppInfo:27\nmsgid \"Optional[List[:class:`str`]]\"\nmsgstr \"Optional[List[:class:`str`]]\"\n\n#: ../../../discord/appinfo.py:docstring of discord.appinfo.AppInfo:58\n#: ../../../discord/appinfo.py:docstring of discord.appinfo.PartialAppInfo:31\nmsgid \"The hex encoded key for verification in interactions and the GameSDK's :ddocs:`GetTicket <game-sdk/applications#getticket>`.\"\nmsgstr \"インタラクションとGameSDKの :ddocs:`GetTicket <game-sdk/applications#getticket>` の検証のための16進数エンコードされたキー。\"\n\n#: ../../../discord/appinfo.py:docstring of discord.appinfo.AppInfo:67\nmsgid \"If this application is a game sold on Discord, this field will be the guild to which it has been linked to.\"\nmsgstr \"このアプリケーションがDiscord上で販売されているゲームの場合、この属性は紐づけられたギルドになります。\"\n\n#: ../../../discord/appinfo.py:docstring of discord.appinfo.AppInfo:76\nmsgid \"If this application is a game sold on Discord, this field will be the id of the \\\"Game SKU\\\" that is created, if it exists.\"\nmsgstr \"このアプリケーションがDiscord上で販売されているゲームの場合、この属性は作成された「Game SKU」が存在する場合は、そのIDになります。\"\n\n#: ../../../discord/appinfo.py:docstring of discord.appinfo.AppInfo:86\nmsgid \"If this application is a game sold on Discord, this field will be the URL slug that links to the store page.\"\nmsgstr \"このアプリケーションがDiscord上で販売されているゲームの場合、この属性はストアページにリンクするURLのスラッグになります。\"\n\n#: ../../../discord/appinfo.py:docstring of discord.appinfo.AppInfo:91\n#: ../../../discord/appinfo.py:docstring of discord.appinfo.AppInfo:99\n#: ../../../discord/appinfo.py:docstring of discord.appinfo.AppInfo:107\n#: ../../../discord/appinfo.py:docstring of discord.appinfo.AppInfo:140\n#: ../../../discord/appinfo.py:docstring of discord.appinfo.AppInfo:149\nmsgid \"Optional[:class:`str`]\"\nmsgstr \"Optional[:class:`str`]\"\n\n#: ../../../discord/appinfo.py:docstring of discord.appinfo.AppInfo:95\n#: ../../../discord/appinfo.py:docstring of discord.appinfo.PartialAppInfo:38\nmsgid \"The application's terms of service URL, if set.\"\nmsgstr \"設定されている場合、アプリケーションの利用規約のURL。\"\n\n#: ../../../discord/appinfo.py:docstring of discord.appinfo.AppInfo:103\n#: ../../../discord/appinfo.py:docstring of discord.appinfo.PartialAppInfo:44\nmsgid \"The application's privacy policy URL, if set.\"\nmsgstr \"設定されている場合、アプリケーションのプライバシーポリシーのURL。\"\n\n#: ../../../discord/appinfo.py:docstring of discord.appinfo.AppInfo:111\nmsgid \"The list of tags describing the functionality of the application.\"\nmsgstr \"アプリケーションの機能を説明するタグのリスト。\"\n\n#: ../../../discord/appinfo.py:docstring of discord.appinfo.AppInfo:115\n#: ../../../discord/appinfo.py:docstring of discord.appinfo.AppInfo:123\n#: ../../../discord/appinfo.py:docstring of discord.appinfo.AppInfo:157\n#: ../../../discord/appinfo.py:docstring of discord.appinfo.PartialAppInfo:62\n#: ../../../discord/appinfo.py:docstring of discord.appinfo.AppInstallParams:10\nmsgid \"List[:class:`str`]\"\nmsgstr \"List[:class:`str`]\"\n\n#: ../../../discord/appinfo.py:docstring of discord.appinfo.AppInfo:119\nmsgid \"The custom authorization URL for the application, if enabled.\"\nmsgstr \"有効な場合、アプリケーションのカスタム認可URL。\"\n\n#: ../../../discord/appinfo.py:docstring of discord.appinfo.AppInfo:127\nmsgid \"The settings for custom authorization URL of application, if enabled.\"\nmsgstr \"有効な場合、アプリケーションのカスタム認可URLの設定。\"\n\n#: ../../../discord/appinfo.py:docstring of discord.appinfo.AppInfo:131\nmsgid \"Optional[:class:`AppInstallParams`]\"\nmsgstr \"Optional[:class:`AppInstallParams`]\"\n\n#: ../../../discord/appinfo.py:docstring of discord.appinfo.AppInfo:135\n#: ../../../discord/appinfo.py:docstring of discord.appinfo.PartialAppInfo:75\nmsgid \"The application's connection verification URL which will render the application as a verification method in the guild's role verification configuration.\"\nmsgstr \"アプリケーションをギルドのロール紐づけ設定にて紐づけ方法として扱うようにするための、アプリケーションの接続確認URL。\"\n\n#: ../../../discord/appinfo.py:docstring of discord.appinfo.AppInfo:144\n#: ../../../discord/appinfo.py:docstring of discord.appinfo.PartialAppInfo:66\nmsgid \"The interactions endpoint url of the application to receive interactions over this endpoint rather than over the gateway, if configured.\"\nmsgstr \"設定されている場合、ゲートウェイではなくエンドポイントからインタラクションを受け取るアプリケーションの、インタラクションエンドポイントのURI。\"\n\n#: ../../../discord/appinfo.py:docstring of discord.appinfo.AppInfo:153\n#: ../../../discord/appinfo.py:docstring of discord.appinfo.PartialAppInfo:58\nmsgid \"A list of authentication redirect URIs.\"\nmsgstr \"認証リダイレクトURIのリスト。\"\n\n#: ../../../discord/appinfo.py:docstring of discord.AppInfo.icon:1\n#: ../../../discord/appinfo.py:docstring of discord.PartialAppInfo.icon:1\nmsgid \"Retrieves the application's icon asset, if any.\"\nmsgstr \"存在する場合は、アプリケーションのアイコンアセットを取得します。\"\n\n#: ../../../discord/appinfo.py:docstring of discord.AppInfo.icon:3\n#: ../../../discord/appinfo.py:docstring of discord.AppInfo.cover_image:5\n#: ../../../discord/appinfo.py:docstring of discord.PartialAppInfo.icon:3\n#: ../../../discord/appinfo.py:docstring of discord.PartialAppInfo.cover_image:7\n#: ../../../discord/team.py:docstring of discord.Team.icon:3\nmsgid \"Optional[:class:`.Asset`]\"\nmsgstr \"Optional[:class:`.Asset`]\"\n\n#: ../../../discord/appinfo.py:docstring of discord.AppInfo.cover_image:1\nmsgid \"Retrieves the cover image on a store embed, if any.\"\nmsgstr \"存在する場合は、ストアの埋め込みのカバー画像を取得します。\"\n\n#: ../../../discord/appinfo.py:docstring of discord.AppInfo.cover_image:3\n#: ../../../discord/appinfo.py:docstring of discord.PartialAppInfo.cover_image:3\nmsgid \"This is only available if the application is a game sold on Discord.\"\nmsgstr \"これはアプリケーションがDiscordで販売されているゲームの場合にのみ利用できます。\"\n\n#: ../../../discord/appinfo.py:docstring of discord.AppInfo.guild:1\nmsgid \"If this application is a game sold on Discord, this field will be the guild to which it has been linked\"\nmsgstr \"このアプリケーションがDiscord上で販売されているゲームの場合、この属性は紐づけられたギルドになります。\"\n\n#: ../../../discord/appinfo.py:docstring of discord.AppInfo.guild:6\n#: ../../../discord/webhook/async_.py:docstring of discord.Webhook.guild:5\n#: ../../../discord/webhook/sync.py:docstring of discord.SyncWebhook.guild:5\n#: ../../../discord/message.py:docstring of discord.message.Message:238\n#: ../../../discord/scheduled_event.py:docstring of discord.ScheduledEvent.guild:3\nmsgid \"Optional[:class:`Guild`]\"\nmsgstr \"Optional[:class:`Guild`]\"\n\n#: ../../../discord/appinfo.py:docstring of discord.AppInfo.flags:1\n#: ../../../discord/appinfo.py:docstring of discord.PartialAppInfo.flags:1\nmsgid \"The application's flags.\"\nmsgstr \"アプリケーションのフラグ。\"\n\n#: ../../../discord/appinfo.py:docstring of discord.AppInfo.flags:5\n#: ../../../discord/appinfo.py:docstring of discord.PartialAppInfo.flags:5\nmsgid \":class:`ApplicationFlags`\"\nmsgstr \":class:`ApplicationFlags`\"\n\n#: ../../../discord/appinfo.py:docstring of discord.appinfo.AppInfo.edit:3\nmsgid \"Edits the application info.\"\nmsgstr \"\"\n\n#: ../../../discord/appinfo.py:docstring of discord.appinfo.AppInfo.edit:7\nmsgid \"The new custom authorization URL for the application. Can be ``None`` to remove the URL.\"\nmsgstr \"\"\n\n#: ../../../discord/appinfo.py:docstring of discord.appinfo.AppInfo.edit:9\nmsgid \"The new application description. Can be ``None`` to remove the description.\"\nmsgstr \"\"\n\n#: ../../../discord/appinfo.py:docstring of discord.appinfo.AppInfo.edit:11\nmsgid \"The new application’s connection verification URL which will render the application as a verification method in the guild’s role verification configuration. Can be ``None`` to remove the URL.\"\nmsgstr \"\"\n\n#: ../../../discord/appinfo.py:docstring of discord.appinfo.AppInfo.edit:14\nmsgid \"The new list of :ddocs:`OAuth2 scopes <topics/oauth2#shared-resources-oauth2-scopes>` of the :attr:`~install_params`. Can be ``None`` to remove the scopes.\"\nmsgstr \"\"\n\n#: ../../../discord/appinfo.py:docstring of discord.appinfo.AppInfo.edit:17\nmsgid \"The new permissions of the :attr:`~install_params`. Can be ``None`` to remove the permissions.\"\nmsgstr \"\"\n\n#: ../../../discord/appinfo.py:docstring of discord.appinfo.AppInfo.edit:19\nmsgid \"The new application’s flags. Only limited intent flags (:attr:`~ApplicationFlags.gateway_presence_limited`, :attr:`~ApplicationFlags.gateway_guild_members_limited`, :attr:`~ApplicationFlags.gateway_message_content_limited`) can be edited. Can be ``None`` to remove the flags.\"\nmsgstr \"\"\n\n#: ../../../discord/appinfo.py:docstring of discord.appinfo.AppInfo.edit:25\nmsgid \"Editing the limited intent flags leads to the termination of the bot.\"\nmsgstr \"\"\n\n#: ../../../discord/appinfo.py:docstring of discord.appinfo.AppInfo.edit:27\nmsgid \"The new application’s icon as a :term:`py:bytes-like object`. Can be ``None`` to remove the icon.\"\nmsgstr \"\"\n\n#: ../../../discord/appinfo.py:docstring of discord.appinfo.AppInfo.edit:29\nmsgid \"The new application’s cover image as a :term:`py:bytes-like object` on a store embed. The cover image is only available if the application is a game sold on Discord. Can be ``None`` to remove the image.\"\nmsgstr \"\"\n\n#: ../../../discord/appinfo.py:docstring of discord.appinfo.AppInfo.edit:33\nmsgid \"The new interactions endpoint url of the application to receive interactions over this endpoint rather than over the gateway. Can be ``None`` to remove the URL.\"\nmsgstr \"\"\n\n#: ../../../discord/appinfo.py:docstring of discord.appinfo.AppInfo.edit:36\nmsgid \"The new list of tags describing the functionality of the application. Can be ``None`` to remove the tags.\"\nmsgstr \"\"\n\n#: ../../../discord/appinfo.py:docstring of discord.appinfo.AppInfo.edit:38\nmsgid \"The reason for editing the application. Shows up on the audit log.\"\nmsgstr \"\"\n\n#: ../../../discord/appinfo.py:docstring of discord.appinfo.AppInfo.edit:41\nmsgid \"Editing the application failed\"\nmsgstr \"\"\n\n#: ../../../discord/appinfo.py:docstring of discord.appinfo.AppInfo.edit:42\nmsgid \"The image format passed in to ``icon`` or ``cover_image`` is invalid. This is also raised     when ``install_params_scopes`` and ``install_params_permissions`` are incompatible with each other.\"\nmsgstr \"\"\n\n#: ../../../discord/appinfo.py:docstring of discord.appinfo.AppInfo.edit:44\nmsgid \"The newly updated application info.\"\nmsgstr \"\"\n\n#: ../../../discord/appinfo.py:docstring of discord.appinfo.AppInfo.edit:45\nmsgid \":class:`AppInfo`\"\nmsgstr \"\"\n\n#: ../../api.rst:68\nmsgid \"PartialAppInfo\"\nmsgstr \"PartialAppInfo\"\n\n#: ../../../discord/appinfo.py:docstring of discord.appinfo.PartialAppInfo:1\nmsgid \"Represents a partial AppInfo given by :func:`~discord.abc.GuildChannel.create_invite`\"\nmsgstr \":func:`~discord.abc.GuildChannel.create_invite` により与えられた部分的なAppInfo。\"\n\n#: ../../../discord/appinfo.py:docstring of discord.appinfo.PartialAppInfo:50\nmsgid \"The approximate count of the guilds the bot was added to.\"\nmsgstr \"ボットが追加されたギルドのおおよその数。\"\n\n#: ../../../discord/appinfo.py:docstring of discord.PartialAppInfo.cover_image:1\nmsgid \"Retrieves the cover image of the application's default rich presence.\"\nmsgstr \"存在する場合は、アプリケーションの既定のリッチプレゼンスのカバー画像を取得します。\"\n\n#: ../../api.rst:76\nmsgid \"AppInstallParams\"\nmsgstr \"AppInstallParams\"\n\n#: ../../../discord/appinfo.py:docstring of discord.appinfo.AppInstallParams:1\nmsgid \"Represents the settings for custom authorization URL of an application.\"\nmsgstr \"アプリケーションのカスタム認可URLの設定。\"\n\n#: ../../../discord/appinfo.py:docstring of discord.appinfo.AppInstallParams:7\nmsgid \"The list of :ddocs:`OAuth2 scopes <topics/oauth2#shared-resources-oauth2-scopes>` to add the application to a guild with.\"\nmsgstr \"アプリケーションをギルドに追加するときの :ddocs:`OAuth2 スコープ <topics/oauth2#shared-resources-oauth2-scopes>` のリスト。\"\n\n#: ../../../discord/appinfo.py:docstring of discord.appinfo.AppInstallParams:14\nmsgid \"The permissions to give to application in the guild.\"\nmsgstr \"ギルドに追加するアプリケーションに与える権限。\"\n\n#: ../../../discord/appinfo.py:docstring of discord.appinfo.AppInstallParams:16\n#: ../../api.rst:3868\n#: ../../api.rst:3957\n#: ../../../discord/member.py:docstring of discord.Member.guild_permissions:14\n#: ../../../discord/role.py:docstring of discord.Role.permissions:3\nmsgid \":class:`Permissions`\"\nmsgstr \":class:`Permissions`\"\n\n#: ../../api.rst:84\nmsgid \"Team\"\nmsgstr \"Team\"\n\n#: ../../../discord/team.py:docstring of discord.team.Team:1\nmsgid \"Represents an application team for a bot provided by Discord.\"\nmsgstr \"Discordによって提供されるボットのアプリケーションチーム。\"\n\n#: ../../../discord/team.py:docstring of discord.team.Team:5\nmsgid \"The team ID.\"\nmsgstr \"チームのID。\"\n\n#: ../../../discord/team.py:docstring of discord.team.Team:11\nmsgid \"The team name\"\nmsgstr \"チームの名前。\"\n\n#: ../../../discord/team.py:docstring of discord.team.Team:17\nmsgid \"The team's owner ID.\"\nmsgstr \"チームの所有者のID。\"\n\n#: ../../../discord/team.py:docstring of discord.team.Team:23\nmsgid \"A list of the members in the team\"\nmsgstr \"チームのメンバーのリスト。\"\n\n#: ../../../discord/team.py:docstring of discord.team.Team:27\nmsgid \"List[:class:`TeamMember`]\"\nmsgstr \"List[:class:`TeamMember`]\"\n\n#: ../../../discord/team.py:docstring of discord.Team.icon:1\nmsgid \"Retrieves the team's icon asset, if any.\"\nmsgstr \"存在する場合は、チームアイコンのアセットを取得します。\"\n\n#: ../../../discord/team.py:docstring of discord.Team.owner:1\nmsgid \"The team's owner.\"\nmsgstr \"チームの所有者。\"\n\n#: ../../../discord/team.py:docstring of discord.Team.owner:3\nmsgid \"Optional[:class:`TeamMember`]\"\nmsgstr \"Optional[:class:`TeamMember`]\"\n\n#: ../../api.rst:92\nmsgid \"TeamMember\"\nmsgstr \"TeamMember\"\n\n#: ../../../discord/team.py:docstring of discord.team.TeamMember:1\nmsgid \"Represents a team member in a team.\"\nmsgstr \"チームのメンバー。\"\n\n#: ../../../discord/team.py:docstring of discord.team.TeamMember:7\nmsgid \"Checks if two team members are equal.\"\nmsgstr \"二つのチームメンバーが等しいかを比較します。\"\n\n#: ../../../discord/team.py:docstring of discord.team.TeamMember:11\nmsgid \"Checks if two team members are not equal.\"\nmsgstr \"二つのチームメンバーが等しくないかを比較します。\"\n\n#: ../../../discord/team.py:docstring of discord.team.TeamMember:15\nmsgid \"Return the team member's hash.\"\nmsgstr \"チームメンバーのハッシュ値を返します。\"\n\n#: ../../../discord/team.py:docstring of discord.team.TeamMember:19\nmsgid \"Returns the team member's handle (e.g. ``name`` or ``name#discriminator``).\"\nmsgstr \"チームメンバーのハンドル（例えば ``name`` や ``name#discriminator`` など）を返します。\"\n\n#: ../../../discord/team.py:docstring of discord.team.TeamMember:25\nmsgid \"The team member's username.\"\nmsgstr \"チームメンバーのユーザー名。\"\n\n#: ../../../discord/team.py:docstring of discord.team.TeamMember:31\nmsgid \"The team member's unique ID.\"\nmsgstr \"チームメンバーの一意のID。\"\n\n#: ../../../discord/team.py:docstring of discord.team.TeamMember:37\nmsgid \"The team member's discriminator. This is a legacy concept that is no longer used.\"\nmsgstr \"チームメンバーのタグ。これは、現在は使用されていない、過去の遺物です。\"\n\n#: ../../../discord/team.py:docstring of discord.team.TeamMember:43\nmsgid \"The team member's global nickname, taking precedence over the username in display.\"\nmsgstr \"チームメンバーのグローバルの表示名。ユーザー名より優先して表示されます。\"\n\n#: ../../../discord/team.py:docstring of discord.team.TeamMember:51\n#: ../../../discord/user.py:docstring of discord.user.ClientUser:49\n#: ../../../discord/user.py:docstring of discord.user.User:49\nmsgid \"Specifies if the user is a bot account.\"\nmsgstr \"ユーザーがBotアカウントであるかを表します。\"\n\n#: ../../../discord/team.py:docstring of discord.team.TeamMember:57\nmsgid \"The team that the member is from.\"\nmsgstr \"メンバーの出身チーム。\"\n\n#: ../../../discord/team.py:docstring of discord.team.TeamMember:59\nmsgid \":class:`Team`\"\nmsgstr \":class:`Team`\"\n\n#: ../../../discord/team.py:docstring of discord.team.TeamMember:63\nmsgid \"The membership state of the member (e.g. invited or accepted)\"\nmsgstr \"メンバーの参加状態 (例：招待されたか、承認されたか)\"\n\n#: ../../../discord/team.py:docstring of discord.team.TeamMember:65\nmsgid \":class:`TeamMembershipState`\"\nmsgstr \":class:`TeamMembershipState`\"\n\n#: ../../../discord/team.py:docstring of discord.team.TeamMember:69\nmsgid \"The role of the member within the team.\"\nmsgstr \"\"\n\n#: ../../../discord/team.py:docstring of discord.team.TeamMember:73\nmsgid \":class:`TeamMemberRole`\"\nmsgstr \"\"\n\n#: ../../../discord/team.py:docstring of discord.TeamMember.accent_color:1\n#: ../../../discord/user.py:docstring of discord.ClientUser.accent_color:1\n#: ../../../discord/user.py:docstring of discord.User.accent_color:1\n#: ../../../discord/widget.py:docstring of discord.WidgetMember.accent_color:1\nmsgid \"Returns the user's accent color, if applicable.\"\nmsgstr \"該当する場合、ユーザーのアクセントカラーを返します。\"\n\n#: ../../../discord/team.py:docstring of discord.TeamMember.accent_color:3\n#: ../../../discord/user.py:docstring of discord.ClientUser.accent_color:3\n#: ../../../discord/user.py:docstring of discord.User.accent_color:3\n#: ../../../discord/widget.py:docstring of discord.WidgetMember.accent_color:3\nmsgid \"A user's accent color is only shown if they do not have a banner. This will only be available if the user explicitly sets a color.\"\nmsgstr \"ユーザーのアクセントカラーはバナーがない場合にのみ表示されます。 これは、ユーザーが明示的に色を設定した場合にのみ利用可能です。\"\n\n#: ../../../discord/team.py:docstring of discord.TeamMember.accent_color:6\n#: ../../../discord/user.py:docstring of discord.ClientUser.accent_color:6\n#: ../../../discord/user.py:docstring of discord.User.accent_color:6\n#: ../../../discord/widget.py:docstring of discord.WidgetMember.accent_color:6\nmsgid \"There is an alias for this named :attr:`accent_colour`.\"\nmsgstr \":attr:`accent_colour` という名前のエイリアスが存在します。\"\n\n#: ../../../discord/team.py:docstring of discord.TeamMember.accent_color:12\n#: ../../../discord/team.py:docstring of discord.TeamMember.accent_colour:12\n#: ../../../discord/team.py:docstring of discord.TeamMember.banner:7\n#: ../../../discord/user.py:docstring of discord.ClientUser.accent_color:12\n#: ../../../discord/user.py:docstring of discord.ClientUser.accent_colour:12\nmsgid \"This information is only available via :meth:`Client.fetch_user`.\"\nmsgstr \"この情報は :meth:`Client.fetch_user` 経由でのみ入手できます。\"\n\n#: ../../../discord/team.py:docstring of discord.TeamMember.accent_color:14\n#: ../../../discord/team.py:docstring of discord.TeamMember.accent_colour:14\n#: ../../../discord/user.py:docstring of discord.ClientUser.accent_color:14\n#: ../../../discord/user.py:docstring of discord.ClientUser.accent_colour:14\n#: ../../../discord/user.py:docstring of discord.User.accent_color:14\nmsgid \"Optional[:class:`Colour`]\"\nmsgstr \"Optional[:class:`Colour`]\"\n\n#: ../../../discord/team.py:docstring of discord.TeamMember.accent_colour:1\n#: ../../../discord/user.py:docstring of discord.ClientUser.accent_colour:1\n#: ../../../discord/user.py:docstring of discord.User.accent_colour:1\n#: ../../../discord/widget.py:docstring of discord.WidgetMember.accent_colour:1\nmsgid \"Returns the user's accent colour, if applicable.\"\nmsgstr \"該当する場合、ユーザーのアクセントカラーを返します。\"\n\n#: ../../../discord/team.py:docstring of discord.TeamMember.accent_colour:3\n#: ../../../discord/user.py:docstring of discord.ClientUser.accent_colour:3\n#: ../../../discord/user.py:docstring of discord.User.accent_colour:3\n#: ../../../discord/widget.py:docstring of discord.WidgetMember.accent_colour:3\nmsgid \"A user's accent colour is only shown if they do not have a banner. This will only be available if the user explicitly sets a colour.\"\nmsgstr \"ユーザーのアクセントカラーはバナーがない場合にのみ表示されます。 これは、ユーザーが明示的に色を設定した場合にのみ利用可能です。\"\n\n#: ../../../discord/team.py:docstring of discord.TeamMember.accent_colour:6\n#: ../../../discord/user.py:docstring of discord.ClientUser.accent_colour:6\n#: ../../../discord/user.py:docstring of discord.User.accent_colour:6\n#: ../../../discord/widget.py:docstring of discord.WidgetMember.accent_colour:6\nmsgid \"There is an alias for this named :attr:`accent_color`.\"\nmsgstr \":attr:`accent_color` という名前のエイリアスが存在します。\"\n\n#: ../../../discord/team.py:docstring of discord.TeamMember.avatar:1\n#: ../../../discord/user.py:docstring of discord.ClientUser.avatar:1\n#: ../../../discord/user.py:docstring of discord.User.avatar:1\nmsgid \"Returns an :class:`Asset` for the avatar the user has.\"\nmsgstr \"ユーザーのアバターの :class:`Asset` を返します。\"\n\n#: ../../../discord/team.py:docstring of discord.TeamMember.avatar:3\n#: ../../../discord/user.py:docstring of discord.ClientUser.avatar:3\n#: ../../../discord/user.py:docstring of discord.User.avatar:3\nmsgid \"If the user has not uploaded a global avatar, ``None`` is returned. If you want the avatar that a user has displayed, consider :attr:`display_avatar`.\"\nmsgstr \"ユーザーがグローバルのアバターをアップロードしていない場合は、 ``None`` が返されます。ユーザーが表示しているアバターを取得したい場合は、 :attr:`display_avatar` を検討してください。\"\n\n#: ../../../discord/team.py:docstring of discord.TeamMember.avatar:6\n#: ../../../discord/team.py:docstring of discord.TeamMember.avatar_decoration:7\n#: ../../../discord/team.py:docstring of discord.TeamMember.banner:9\n#: ../../../discord/webhook/async_.py:docstring of discord.Webhook.avatar:6\n#: ../../../discord/webhook/sync.py:docstring of discord.SyncWebhook.avatar:6\nmsgid \"Optional[:class:`Asset`]\"\nmsgstr \"Optional[:class:`Asset`]\"\n\n#: ../../../discord/team.py:docstring of discord.TeamMember.avatar_decoration:1\n#: ../../../discord/user.py:docstring of discord.ClientUser.avatar_decoration:1\n#: ../../../discord/user.py:docstring of discord.User.avatar_decoration:1\n#: ../../../discord/widget.py:docstring of discord.WidgetMember.avatar_decoration:1\nmsgid \"Returns an :class:`Asset` for the avatar decoration the user has.\"\nmsgstr \"\"\n\n#: ../../../discord/team.py:docstring of discord.TeamMember.avatar_decoration:3\n#: ../../../discord/team.py:docstring of discord.TeamMember.avatar_decoration_sku_id:3\n#: ../../../discord/user.py:docstring of discord.ClientUser.avatar_decoration:3\n#: ../../../discord/user.py:docstring of discord.ClientUser.avatar_decoration_sku_id:3\n#: ../../../discord/user.py:docstring of discord.User.avatar_decoration:3\nmsgid \"If the user has not set an avatar decoration, ``None`` is returned.\"\nmsgstr \"\"\n\n#: ../../../discord/team.py:docstring of discord.TeamMember.avatar_decoration_sku_id:1\n#: ../../../discord/user.py:docstring of discord.ClientUser.avatar_decoration_sku_id:1\n#: ../../../discord/user.py:docstring of discord.User.avatar_decoration_sku_id:1\n#: ../../../discord/widget.py:docstring of discord.WidgetMember.avatar_decoration_sku_id:1\nmsgid \"Returns the SKU ID of the avatar decoration the user has.\"\nmsgstr \"\"\n\n#: ../../../discord/team.py:docstring of discord.TeamMember.banner:1\n#: ../../../discord/user.py:docstring of discord.ClientUser.banner:1\n#: ../../../discord/user.py:docstring of discord.User.banner:1\n#: ../../../discord/widget.py:docstring of discord.WidgetMember.banner:1\nmsgid \"Returns the user's banner asset, if available.\"\nmsgstr \"利用できる場合、ユーザーのバナーのアセットを返します。\"\n\n#: ../../../discord/team.py:docstring of discord.TeamMember.color:1\n#: ../../../discord/user.py:docstring of discord.ClientUser.color:1\n#: ../../../discord/user.py:docstring of discord.User.color:1\n#: ../../../discord/widget.py:docstring of discord.WidgetMember.color:1\nmsgid \"A property that returns a color denoting the rendered color for the user. This always returns :meth:`Colour.default`.\"\nmsgstr \"レンダリングされる色を返すプロパティ。これは常に :meth:`Colour.default` を返します。\"\n\n#: ../../../discord/team.py:docstring of discord.TeamMember.color:4\n#: ../../../discord/user.py:docstring of discord.ClientUser.color:4\n#: ../../../discord/user.py:docstring of discord.User.color:4\n#: ../../../discord/member.py:docstring of discord.Member.color:5\n#: ../../../discord/widget.py:docstring of discord.WidgetMember.color:4\nmsgid \"There is an alias for this named :attr:`colour`.\"\nmsgstr \":attr:`colour` という名前のエイリアスが存在します。\"\n\n#: ../../../discord/team.py:docstring of discord.TeamMember.color:6\n#: ../../../discord/team.py:docstring of discord.TeamMember.colour:6\n#: ../../api.rst:3877\n#: ../../../discord/user.py:docstring of discord.ClientUser.color:6\n#: ../../../discord/user.py:docstring of discord.ClientUser.colour:6\nmsgid \":class:`Colour`\"\nmsgstr \":class:`Colour`\"\n\n#: ../../../discord/team.py:docstring of discord.TeamMember.colour:1\n#: ../../../discord/user.py:docstring of discord.ClientUser.colour:1\n#: ../../../discord/user.py:docstring of discord.User.colour:1\n#: ../../../discord/widget.py:docstring of discord.WidgetMember.colour:1\nmsgid \"A property that returns a colour denoting the rendered colour for the user. This always returns :meth:`Colour.default`.\"\nmsgstr \"レンダリングされる色を返すプロパティ。これは常に :meth:`Colour.default` を返します。\"\n\n#: ../../../discord/team.py:docstring of discord.TeamMember.colour:4\n#: ../../../discord/user.py:docstring of discord.ClientUser.colour:4\n#: ../../../discord/user.py:docstring of discord.User.colour:4\n#: ../../../discord/member.py:docstring of discord.Member.colour:5\n#: ../../../discord/widget.py:docstring of discord.WidgetMember.colour:4\nmsgid \"There is an alias for this named :attr:`color`.\"\nmsgstr \":attr:`color` という名前のエイリアスが存在します。\"\n\n#: ../../../discord/team.py:docstring of discord.TeamMember.created_at:1\n#: ../../../discord/user.py:docstring of discord.ClientUser.created_at:1\n#: ../../../discord/user.py:docstring of discord.User.created_at:1\n#: ../../../discord/widget.py:docstring of discord.WidgetMember.created_at:1\nmsgid \"Returns the user's creation time in UTC.\"\nmsgstr \"ユーザーの作成された時間をUTCで返します。\"\n\n#: ../../../discord/team.py:docstring of discord.TeamMember.created_at:3\n#: ../../../discord/user.py:docstring of discord.ClientUser.created_at:3\n#: ../../../discord/user.py:docstring of discord.User.created_at:3\n#: ../../../discord/widget.py:docstring of discord.WidgetMember.created_at:3\nmsgid \"This is when the user's Discord account was created.\"\nmsgstr \"これはユーザーのDiscordアカウントが作成された時間です。\"\n\n#: ../../../discord/team.py:docstring of discord.TeamMember.created_at:5\n#: ../../../discord/utils.py:docstring of discord.utils.snowflake_time:10\n#: ../../../discord/utils.py:docstring of discord.utils.utcnow:9\n#: ../../docstring of discord.AuditLogEntry.created_at:3\n#: ../../../discord/webhook/async_.py:docstring of discord.Webhook.created_at:3\nmsgid \":class:`datetime.datetime`\"\nmsgstr \":class:`datetime.datetime`\"\n\n#: ../../../discord/team.py:docstring of discord.TeamMember.default_avatar:1\n#: ../../../discord/abc.py:docstring of discord.abc.User.default_avatar:1\n#: ../../../discord/user.py:docstring of discord.ClientUser.default_avatar:1\n#: ../../../discord/user.py:docstring of discord.User.default_avatar:1\n#: ../../../discord/widget.py:docstring of discord.WidgetMember.default_avatar:1\nmsgid \"Returns the default avatar for a given user.\"\nmsgstr \"ユーザーの既定のアバターを返します。\"\n\n#: ../../../discord/team.py:docstring of discord.TeamMember.default_avatar:3\n#: ../../../discord/team.py:docstring of discord.TeamMember.display_avatar:7\n#: ../../api.rst:3651\n#: ../../api.rst:3657\n#: ../../api.rst:3663\nmsgid \":class:`Asset`\"\nmsgstr \":class:`Asset`\"\n\n#: ../../../discord/team.py:docstring of discord.TeamMember.display_avatar:1\n#: ../../../discord/abc.py:docstring of discord.abc.User.display_avatar:1\n#: ../../../discord/user.py:docstring of discord.ClientUser.display_avatar:1\n#: ../../../discord/user.py:docstring of discord.User.display_avatar:1\n#: ../../../discord/widget.py:docstring of discord.WidgetMember.display_avatar:1\nmsgid \"Returns the user's display avatar.\"\nmsgstr \"ユーザーの表示されるアバターを返します。\"\n\n#: ../../../discord/team.py:docstring of discord.TeamMember.display_avatar:3\n#: ../../../discord/abc.py:docstring of discord.abc.User.display_avatar:3\n#: ../../../discord/user.py:docstring of discord.ClientUser.display_avatar:3\n#: ../../../discord/user.py:docstring of discord.User.display_avatar:3\n#: ../../../discord/widget.py:docstring of discord.WidgetMember.display_avatar:3\nmsgid \"For regular users this is just their default avatar or uploaded avatar.\"\nmsgstr \"通常のユーザーの場合は、これはデフォルトのアバターか、アップロードされたアバターです。\"\n\n#: ../../../discord/team.py:docstring of discord.TeamMember.display_name:1\n#: ../../../discord/abc.py:docstring of discord.abc.User.display_name:1\n#: ../../../discord/user.py:docstring of discord.ClientUser.display_name:1\n#: ../../../discord/user.py:docstring of discord.User.display_name:1\n#: ../../../discord/member.py:docstring of discord.Member.display_name:1\nmsgid \"Returns the user's display name.\"\nmsgstr \"ユーザーの表示名を返します。\"\n\n#: ../../../discord/team.py:docstring of discord.TeamMember.display_name:3\n#: ../../../discord/user.py:docstring of discord.ClientUser.display_name:3\n#: ../../../discord/user.py:docstring of discord.User.display_name:3\n#: ../../../discord/member.py:docstring of discord.Member.display_name:3\nmsgid \"For regular users this is just their global name or their username, but if they have a guild specific nickname then that is returned instead.\"\nmsgstr \"通常であれば、これはグローバル表示名またはユーザー名がそのまま返りますが、ギルドにてニックネームを設定している場合は、代替としてニックネームが返ります。\"\n\n#: ../../../discord/team.py:docstring of discord.TeamMember.mention:1\n#: ../../../discord/abc.py:docstring of discord.abc.User.mention:1\n#: ../../../discord/user.py:docstring of discord.ClientUser.mention:1\n#: ../../../discord/user.py:docstring of discord.User.mention:1\n#: ../../../discord/widget.py:docstring of discord.WidgetMember.mention:1\nmsgid \"Returns a string that allows you to mention the given user.\"\nmsgstr \"ユーザーをメンションすることのできる文字列を返します。\"\n\n#: ../../../discord/team.py:docstring of discord.user.BaseUser.mentioned_in:1\n#: ../../../discord/abc.py:docstring of discord.abc.User.mentioned_in:1\n#: ../../../discord/user.py:docstring of discord.user.BaseUser.mentioned_in:1\n#: ../../../discord/user.py:docstring of discord.user.BaseUser.mentioned_in:1\n#: ../../../discord/widget.py:docstring of discord.user.BaseUser.mentioned_in:1\nmsgid \"Checks if the user is mentioned in the specified message.\"\nmsgstr \"指定のメッセージにユーザーに対するメンションが含まれているかを確認します。\"\n\n#: ../../../discord/team.py:docstring of discord.user.BaseUser.mentioned_in:3\n#: ../../../discord/abc.py:docstring of discord.abc.User.mentioned_in:3\n#: ../../../discord/user.py:docstring of discord.user.BaseUser.mentioned_in:3\n#: ../../../discord/user.py:docstring of discord.user.BaseUser.mentioned_in:3\n#: ../../../discord/member.py:docstring of discord.member.Member.mentioned_in:3\nmsgid \"The message to check if you're mentioned in.\"\nmsgstr \"メンションが含まれているかを確認するメッセージ。\"\n\n#: ../../../discord/team.py:docstring of discord.user.BaseUser.mentioned_in:6\n#: ../../../discord/abc.py:docstring of discord.abc.User.mentioned_in:6\n#: ../../../discord/user.py:docstring of discord.user.BaseUser.mentioned_in:6\n#: ../../../discord/user.py:docstring of discord.user.BaseUser.mentioned_in:6\n#: ../../../discord/widget.py:docstring of discord.user.BaseUser.mentioned_in:6\nmsgid \"Indicates if the user is mentioned in the message.\"\nmsgstr \"メッセージにユーザーに対するメンションが含まれているかを示します。\"\n\n#: ../../../discord/team.py:docstring of discord.TeamMember.public_flags:1\n#: ../../../discord/user.py:docstring of discord.ClientUser.public_flags:1\n#: ../../../discord/user.py:docstring of discord.User.public_flags:1\n#: ../../../discord/widget.py:docstring of discord.WidgetMember.public_flags:1\nmsgid \"The publicly available flags the user has.\"\nmsgstr \"ユーザーが持っている公開のフラグ。\"\n\n#: ../../../discord/team.py:docstring of discord.TeamMember.public_flags:3\n#: ../../../discord/user.py:docstring of discord.ClientUser.public_flags:3\n#: ../../../discord/user.py:docstring of discord.User.public_flags:3\n#: ../../../discord/widget.py:docstring of discord.WidgetMember.public_flags:3\nmsgid \":class:`PublicUserFlags`\"\nmsgstr \":class:`PublicUserFlags`\"\n\n#: ../../api.rst:101\nmsgid \"Voice Related\"\nmsgstr \"音声関連\"\n\n#: ../../api.rst:104\nmsgid \"VoiceClient\"\nmsgstr \"VoiceClient\"\n\n#: ../../../discord/voice_client.py:docstring of discord.voice_client.VoiceClient:1\nmsgid \"Represents a Discord voice connection.\"\nmsgstr \"Discordのボイス接続。\"\n\n#: ../../../discord/voice_client.py:docstring of discord.voice_client.VoiceClient:3\nmsgid \"You do not create these, you typically get them from e.g. :meth:`VoiceChannel.connect`.\"\nmsgstr \"これは自分で作成できません。通常、 :meth:`VoiceChannel.connect` などを使用した際に、取得できます。\"\n\n#: ../../../discord/voice_client.py:docstring of discord.voice_client.VoiceClient:8\nmsgid \"In order to use PCM based AudioSources, you must have the opus library installed on your system and loaded through :func:`opus.load_opus`. Otherwise, your AudioSources must be opus encoded (e.g. using :class:`FFmpegOpusAudio`) or the library will not be able to transmit audio.\"\nmsgstr \"PCMベースのAudioSourceを使用する場合は、opusライブラリーをシステム上にインストールし、 :func:`opus.load_opus` で読み込まないといけません。そうでない場合、AudioSourceは（ :class:`FFmpegOpusAudio` などを用いて）opusエンコードされてないと、音を送出できません。\"\n\n#: ../../../discord/voice_client.py:docstring of discord.voice_client.VoiceClient:15\nmsgid \"The voice connection session ID.\"\nmsgstr \"ボイス接続のセッションID。\"\n\n#: ../../../discord/voice_client.py:docstring of discord.voice_client.VoiceClient:21\nmsgid \"The voice connection token.\"\nmsgstr \"ボイス接続のトークン.\"\n\n#: ../../../discord/voice_client.py:docstring of discord.voice_client.VoiceClient:27\nmsgid \"The endpoint we are connecting to.\"\nmsgstr \"接続先のエンドポイント。\"\n\n#: ../../../discord/voice_client.py:docstring of discord.voice_client.VoiceClient:33\nmsgid \"The voice channel connected to.\"\nmsgstr \"接続されたボイスチャンネル。\"\n\n#: ../../../discord/voice_client.py:docstring of discord.voice_client.VoiceClient:35\nmsgid \"Union[:class:`VoiceChannel`, :class:`StageChannel`]\"\nmsgstr \"Union[:class:`VoiceChannel`, :class:`StageChannel`]\"\n\n#: ../../../discord/voice_client.py:docstring of discord.VoiceClient.guild:1\nmsgid \"The guild we're connected to.\"\nmsgstr \"接続しているギルド。\"\n\n#: ../../../discord/voice_client.py:docstring of discord.VoiceClient.guild:3\n#: ../../../discord/audit_logs.py:docstring of discord.audit_logs.AuditLogEntry:53\n#: ../../api.rst:3645\n#: ../../../discord/automod.py:docstring of discord.automod.AutoModRule:15\n#: ../../../discord/automod.py:docstring of discord.AutoModAction.guild:3\nmsgid \":class:`Guild`\"\nmsgstr \":class:`Guild`\"\n\n#: ../../../discord/voice_client.py:docstring of discord.VoiceClient.user:1\nmsgid \"The user connected to voice (i.e. ourselves).\"\nmsgstr \"ボイスチャンネルに接続しているユーザー。（つまり、自分自身）\"\n\n#: ../../../discord/voice_client.py:docstring of discord.VoiceClient.user:3\n#: ../../../discord/user.py:docstring of discord.user.ClientUser.edit:37\n#: ../../../discord/channel.py:docstring of discord.channel.DMChannel:33\n#: ../../../discord/channel.py:docstring of discord.channel.GroupChannel:31\nmsgid \":class:`ClientUser`\"\nmsgstr \":class:`ClientUser`\"\n\n#: ../../../discord/voice_client.py:docstring of discord.VoiceClient.latency:1\nmsgid \"Latency between a HEARTBEAT and a HEARTBEAT_ACK in seconds.\"\nmsgstr \"HEARTBEATとHEARTBEAT_ACK間の秒単位の待ち時間。\"\n\n#: ../../../discord/voice_client.py:docstring of discord.VoiceClient.latency:3\nmsgid \"This could be referred to as the Discord Voice WebSocket latency and is an analogue of user's voice latencies as seen in the Discord client.\"\nmsgstr \"これはDiscordのVoice WebSocketのレイテンシーと呼ぶことができ、Discordクライアントで見られるユーザーの音声レイテンシーと似ています。\"\n\n#: ../../../discord/voice_client.py:docstring of discord.VoiceClient.average_latency:1\nmsgid \"Average of most recent 20 HEARTBEAT latencies in seconds.\"\nmsgstr \"最新の20 HEARTBEATの秒単位のレイテンシーの平均。\"\n\n#: ../../../discord/voice_client.py:docstring of discord.voice_client.VoiceClient.disconnect:3\nmsgid \"Disconnects this voice client from voice.\"\nmsgstr \"ボイスクライアントをボイスチャンネルから切断します。\"\n\n#: ../../../discord/voice_client.py:docstring of discord.voice_client.VoiceClient.move_to:3\nmsgid \"Moves you to a different voice channel.\"\nmsgstr \"別のボイスチャンネルへ移動させます。\"\n\n#: ../../../discord/voice_client.py:docstring of discord.voice_client.VoiceClient.move_to:5\nmsgid \"The channel to move to. Must be a voice channel.\"\nmsgstr \"移動先のチャンネル。ボイスチャンネルである必要があります。\"\n\n#: ../../../discord/voice_client.py:docstring of discord.voice_client.VoiceClient.move_to:7\nmsgid \"How long to wait for the move to complete.\"\nmsgstr \"\"\n\n#: ../../../discord/voice_client.py:docstring of discord.voice_client.VoiceClient.move_to:12\nmsgid \"The move did not complete in time, but may still be ongoing.\"\nmsgstr \"\"\n\n#: ../../../discord/voice_client.py:docstring of discord.voice_client.VoiceClient.is_connected:1\nmsgid \"Indicates if the voice client is connected to voice.\"\nmsgstr \"ボイスチャンネルに接続しているかどうか。\"\n\n#: ../../../discord/voice_client.py:docstring of discord.voice_client.VoiceClient.play:1\nmsgid \"Plays an :class:`AudioSource`.\"\nmsgstr \":class:`AudioSource` を再生します。\"\n\n#: ../../../discord/voice_client.py:docstring of discord.voice_client.VoiceClient.play:3\nmsgid \"The finalizer, ``after`` is called after the source has been exhausted or an error occurred.\"\nmsgstr \"ファイナライザーである ``after`` はソースがなくなったか、エラーが発生した後に呼び出されます。\"\n\n#: ../../../discord/voice_client.py:docstring of discord.voice_client.VoiceClient.play:6\nmsgid \"If an error happens while the audio player is running, the exception is caught and the audio player is then stopped.  If no after callback is passed, any caught exception will be logged using the library logger.\"\nmsgstr \"オーディオプレーヤーの実行中にエラーが発生した場合、例外が捕捉され、オーディオプレーヤーが停止します。 コールバックが渡されない場合、捕捉された例外はライブラリロガーを用いて記録されます。\"\n\n#: ../../../discord/voice_client.py:docstring of discord.voice_client.VoiceClient.play:10\nmsgid \"Extra parameters may be passed to the internal opus encoder if a PCM based source is used.  Otherwise, they are ignored.\"\nmsgstr \"\"\n\n#: ../../../discord/voice_client.py:docstring of discord.voice_client.VoiceClient.play:13\nmsgid \"Instead of writing to ``sys.stderr``, the library's logger is used.\"\nmsgstr \"``sys.stderr`` に出力するのではなく、ライブラリロガーが使用されるようになりました。\"\n\n#: ../../../discord/voice_client.py:docstring of discord.voice_client.VoiceClient.play:16\nmsgid \"Added encoder parameters as keyword arguments.\"\nmsgstr \"\"\n\n#: ../../../discord/voice_client.py:docstring of discord.voice_client.VoiceClient.play:19\nmsgid \"The audio source we're reading from.\"\nmsgstr \"読み込むオーディオソース。\"\n\n#: ../../../discord/voice_client.py:docstring of discord.voice_client.VoiceClient.play:21\nmsgid \"The finalizer that is called after the stream is exhausted. This function must have a single parameter, ``error``, that denotes an optional exception that was raised during playing.\"\nmsgstr \"ファイナライザーはストリームが空になると呼び出されます。この関数には再生中に発生したオプションの例外を表す一つのパラメータ ``error`` が必要です。\"\n\n#: ../../../discord/voice_client.py:docstring of discord.voice_client.VoiceClient.play:25\nmsgid \"Configures the encoder's intended application.  Can be one of: ``'audio'``, ``'voip'``, ``'lowdelay'``. Defaults to ``'audio'``.\"\nmsgstr \"\"\n\n#: ../../../discord/voice_client.py:docstring of discord.voice_client.VoiceClient.play:29\nmsgid \"Configures the bitrate in the encoder.  Can be between ``16`` and ``512``. Defaults to ``128``.\"\nmsgstr \"\"\n\n#: ../../../discord/voice_client.py:docstring of discord.voice_client.VoiceClient.play:32\nmsgid \"Configures the encoder's use of inband forward error correction. Defaults to ``True``.\"\nmsgstr \"\"\n\n#: ../../../discord/voice_client.py:docstring of discord.voice_client.VoiceClient.play:35\nmsgid \"Configures the encoder's expected packet loss percentage.  Requires FEC. Defaults to ``0.15``.\"\nmsgstr \"\"\n\n#: ../../../discord/voice_client.py:docstring of discord.voice_client.VoiceClient.play:38\nmsgid \"Configures the encoder's bandpass.  Can be one of: ``'narrow'``, ``'medium'``, ``'wide'``, ``'superwide'``, ``'full'``. Defaults to ``'full'``.\"\nmsgstr \"\"\n\n#: ../../../discord/voice_client.py:docstring of discord.voice_client.VoiceClient.play:42\nmsgid \"Configures the type of signal being encoded.  Can be one of: ``'auto'``, ``'voice'``, ``'music'``. Defaults to ``'auto'``.\"\nmsgstr \"\"\n\n#: ../../../discord/voice_client.py:docstring of discord.voice_client.VoiceClient.play:47\nmsgid \"Already playing audio or not connected.\"\nmsgstr \"既にオーディオを再生しているか、接続されていない場合。\"\n\n#: ../../../discord/voice_client.py:docstring of discord.voice_client.VoiceClient.play:48\nmsgid \"Source is not a :class:`AudioSource` or after is not a callable.\"\nmsgstr \"ソースが :class:`AudioSource` でないか、afterが呼び出し可能でない場合。\"\n\n#: ../../../discord/voice_client.py:docstring of discord.voice_client.VoiceClient.play:49\nmsgid \"Source is not opus encoded and opus is not loaded.\"\nmsgstr \"ソースがopusエンコードされておらず、opusが読み込まれていない場合。\"\n\n#: ../../../discord/voice_client.py:docstring of discord.voice_client.VoiceClient.play:50\nmsgid \"An improper value was passed as an encoder parameter.\"\nmsgstr \"\"\n\n#: ../../../discord/voice_client.py:docstring of discord.voice_client.VoiceClient.is_playing:1\nmsgid \"Indicates if we're currently playing audio.\"\nmsgstr \"現在オーディオを再生しているか。\"\n\n#: ../../../discord/voice_client.py:docstring of discord.voice_client.VoiceClient.is_paused:1\nmsgid \"Indicates if we're playing audio, but if we're paused.\"\nmsgstr \"再生中のオーディオを一時停止しているか。\"\n\n#: ../../../discord/voice_client.py:docstring of discord.voice_client.VoiceClient.stop:1\nmsgid \"Stops playing audio.\"\nmsgstr \"音声の再生を停止します。\"\n\n#: ../../../discord/voice_client.py:docstring of discord.voice_client.VoiceClient.pause:1\nmsgid \"Pauses the audio playing.\"\nmsgstr \"音声の再生を一時的に停止します。\"\n\n#: ../../../discord/voice_client.py:docstring of discord.voice_client.VoiceClient.resume:1\nmsgid \"Resumes the audio playing.\"\nmsgstr \"音声の再生を再開します。\"\n\n#: ../../../discord/voice_client.py:docstring of discord.VoiceClient.source:1\nmsgid \"The audio source being played, if playing.\"\nmsgstr \"再生中の場合は、再生中のオーディオソース。\"\n\n#: ../../../discord/voice_client.py:docstring of discord.VoiceClient.source:3\nmsgid \"This property can also be used to change the audio source currently being played.\"\nmsgstr \"このプロパティは現在再生しているオーディオソースの変更にも使うことが出来ます。\"\n\n#: ../../../discord/voice_client.py:docstring of discord.VoiceClient.source:5\nmsgid \"Optional[:class:`AudioSource`]\"\nmsgstr \"Optional[:class:`AudioSource`]\"\n\n#: ../../../discord/voice_client.py:docstring of discord.voice_client.VoiceClient.send_audio_packet:1\nmsgid \"Sends an audio packet composed of the data.\"\nmsgstr \"データで構成されるオーディオパケットを送信します。\"\n\n#: ../../../discord/voice_client.py:docstring of discord.voice_client.VoiceClient.send_audio_packet:3\nmsgid \"You must be connected to play audio.\"\nmsgstr \"オーディオを再生するには、ボイスチャンネルに接続している必要があります。\"\n\n#: ../../../discord/voice_client.py:docstring of discord.voice_client.VoiceClient.send_audio_packet:5\nmsgid \"The :term:`py:bytes-like object` denoting PCM or Opus voice data.\"\nmsgstr \"PCM、またはOpusボイスデータを表す :term:`py:bytes-like object` 。\"\n\n#: ../../../discord/voice_client.py:docstring of discord.voice_client.VoiceClient.send_audio_packet:7\nmsgid \"Indicates if ``data`` should be encoded into Opus.\"\nmsgstr \"``data`` をOpusにエンコードする必要があるか。\"\n\n#: ../../../discord/voice_client.py:docstring of discord.voice_client.VoiceClient.send_audio_packet:10\nmsgid \"You are not connected.\"\nmsgstr \"接続されていない場合。\"\n\n#: ../../../discord/voice_client.py:docstring of discord.voice_client.VoiceClient.send_audio_packet:11\nmsgid \"Encoding the data failed.\"\nmsgstr \"データのエンコードに失敗した場合。\"\n\n#: ../../api.rst:113\nmsgid \"VoiceProtocol\"\nmsgstr \"VoiceProtocol\"\n\n#: ../../../discord/voice_client.py:docstring of discord.voice_client.VoiceProtocol:1\nmsgid \"A class that represents the Discord voice protocol.\"\nmsgstr \"Discordの音声プロトコルを表すクラス。\"\n\n#: ../../../discord/voice_client.py:docstring of discord.voice_client.VoiceProtocol:3\nmsgid \"This is an abstract class. The library provides a concrete implementation under :class:`VoiceClient`.\"\nmsgstr \"これは抽象クラスです。ライブラリは :class:`VoiceClient` の下で具体的な実装を提供します。\"\n\n#: ../../../discord/voice_client.py:docstring of discord.voice_client.VoiceProtocol:6\nmsgid \"This class allows you to implement a protocol to allow for an external method of sending voice, such as Lavalink_ or a native library implementation.\"\nmsgstr \"このクラスは、Lavalink_ やネイティブライブラリの実装など、外部メソッドで音声を送出するプロトコルの実装を行えるようにします。\"\n\n#: ../../../discord/voice_client.py:docstring of discord.voice_client.VoiceProtocol:9\nmsgid \"These classes are passed to :meth:`abc.Connectable.connect <VoiceChannel.connect>`.\"\nmsgstr \"これらのクラスは :meth:`abc.Connectable.connect <VoiceChannel.connect>` に渡されます。\"\n\n#: ../../../discord/voice_client.py:docstring of discord.voice_client.VoiceProtocol:13\nmsgid \"The client (or its subclasses) that started the connection request.\"\nmsgstr \"接続リクエストを開始したクライアント （か、そのサブクラス）。\"\n\n#: ../../../discord/voice_client.py:docstring of discord.voice_client.VoiceProtocol:15\nmsgid \"The voice channel that is being connected to.\"\nmsgstr \"接続されているボイスチャンネル。\"\n\n#: ../../../discord/voice_client.py:docstring of discord.voice_client.VoiceProtocol.on_voice_state_update:3\nmsgid \"An abstract method that is called when the client's voice state has changed. This corresponds to ``VOICE_STATE_UPDATE``.\"\nmsgstr \"クライアントの音声状態が変更された際に呼び出される抽象メソッドです。これは ``VOICE_STATE_UPDATE`` と対応しています。\"\n\n#: ../../../discord/voice_client.py:docstring of discord.voice_client.VoiceProtocol.on_voice_state_update:8\nmsgid \"This method is not the same as the event. See: :func:`on_voice_state_update`\"\nmsgstr \"\"\n\n#: ../../../discord/voice_client.py:docstring of discord.voice_client.VoiceProtocol.on_voice_state_update:10\nmsgid \"The raw :ddocs:`voice state payload <resources/voice#voice-state-object>`.\"\nmsgstr \"生の :ddocs:`ボイスステートペイロード <resources/voice#voice-state-object>` 。\"\n\n#: ../../../discord/voice_client.py:docstring of discord.voice_client.VoiceProtocol.on_voice_server_update:3\nmsgid \"An abstract method that is called when initially connecting to voice. This corresponds to ``VOICE_SERVER_UPDATE``.\"\nmsgstr \"最初にボイスに接続する際に呼び出される抽象メソッドです。これは ``VOICE_SERVER_UPDATE`` と対応しています。\"\n\n#: ../../../discord/voice_client.py:docstring of discord.voice_client.VoiceProtocol.on_voice_server_update:6\nmsgid \"The raw :ddocs:`voice server update payload <topics/gateway#voice-server-update>`.\"\nmsgstr \"生の :ddocs:`ボイスサーバーアップデートペイロード <topics/gateway#voice-server-update>` 。\"\n\n#: ../../../discord/voice_client.py:docstring of discord.voice_client.VoiceProtocol.connect:3\nmsgid \"An abstract method called when the client initiates the connection request.\"\nmsgstr \"クライアントが接続リクエストを開始したときに呼び出される抽象メソッド。\"\n\n#: ../../../discord/voice_client.py:docstring of discord.voice_client.VoiceProtocol.connect:5\nmsgid \"When a connection is requested initially, the library calls the constructor under ``__init__`` and then calls :meth:`connect`. If :meth:`connect` fails at some point then :meth:`disconnect` is called.\"\nmsgstr \"接続が最初に要求されあ場合、ライブラリはまず ``__init__`` にてコンストラクタを呼び出し、次に :meth:`connect` を呼び出します。 :meth:`connect` が失敗した場合は :meth:`disconnect` が呼び出されます。\"\n\n#: ../../../discord/voice_client.py:docstring of discord.voice_client.VoiceProtocol.connect:9\nmsgid \"Within this method, to start the voice connection flow it is recommended to use :meth:`Guild.change_voice_state` to start the flow. After which, :meth:`on_voice_server_update` and :meth:`on_voice_state_update` will be called. The order that these two are called is unspecified.\"\nmsgstr \"このメソッド内では、ボイス接続フローを開始するには、 :meth:`Guild.change_voice_state` を使用するのが推奨されます。その後、 :meth:`on_voice_server_update` と :meth:`on_voice_state_update` が呼び出されます。この二つの呼び出し順は指定されていません。\"\n\n#: ../../../discord/voice_client.py:docstring of discord.voice_client.VoiceProtocol.connect:14\nmsgid \"The timeout for the connection.\"\nmsgstr \"接続のタイムアウト。\"\n\n#: ../../../discord/voice_client.py:docstring of discord.voice_client.VoiceProtocol.connect:16\nmsgid \"Whether reconnection is expected.\"\nmsgstr \"再接続が期待されているかどうか。\"\n\n#: ../../../discord/voice_client.py:docstring of discord.voice_client.VoiceProtocol.connect:18\n#: ../../../discord/abc.py:docstring of discord.abc.Connectable.connect:17\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.change_voice_state:9\n#: ../../../discord/channel.py:docstring of discord.abc.Connectable.connect:17\n#: ../../../discord/channel.py:docstring of discord.abc.Connectable.connect:17\nmsgid \"Indicates if the client should be self-muted.\"\nmsgstr \"クライアントをセルフミュートすべきか。\"\n\n#: ../../../discord/voice_client.py:docstring of discord.voice_client.VoiceProtocol.connect:22\n#: ../../../discord/abc.py:docstring of discord.abc.Connectable.connect:21\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.change_voice_state:11\n#: ../../../discord/channel.py:docstring of discord.abc.Connectable.connect:21\n#: ../../../discord/channel.py:docstring of discord.abc.Connectable.connect:21\nmsgid \"Indicates if the client should be self-deafened.\"\nmsgstr \"クライアントをセルフスピーカーミュートすべきか。\"\n\n#: ../../../discord/voice_client.py:docstring of discord.voice_client.VoiceProtocol.disconnect:3\nmsgid \"An abstract method called when the client terminates the connection.\"\nmsgstr \"クライアントが接続を切断したときに呼び出される抽象メソッド。\"\n\n#: ../../../discord/voice_client.py:docstring of discord.voice_client.VoiceProtocol.disconnect:5\nmsgid \"See :meth:`cleanup`.\"\nmsgstr \":meth:`cleanup` を参照してください。\"\n\n#: ../../../discord/voice_client.py:docstring of discord.voice_client.VoiceProtocol.disconnect:7\nmsgid \"Whether the disconnection was forced.\"\nmsgstr \"切断が強制されたかどうか。\"\n\n#: ../../../discord/voice_client.py:docstring of discord.voice_client.VoiceProtocol.cleanup:1\nmsgid \"This method *must* be called to ensure proper clean-up during a disconnect.\"\nmsgstr \"切断時に適切なクリーンアップを行うためには、このメソッドを *必ず* 呼び出さなければなりません。\"\n\n#: ../../../discord/voice_client.py:docstring of discord.voice_client.VoiceProtocol.cleanup:3\nmsgid \"It is advisable to call this from within :meth:`disconnect` when you are completely done with the voice protocol instance.\"\nmsgstr \"VoiceProtocolインスタンスの使用が終了したら、 :meth:`disconnect` 内でこれを呼び出すことをおすすめします。\"\n\n#: ../../../discord/voice_client.py:docstring of discord.voice_client.VoiceProtocol.cleanup:6\nmsgid \"This method removes it from the internal state cache that keeps track of currently alive voice clients. Failure to clean-up will cause subsequent connections to report that it's still connected.\"\nmsgstr \"このメソッドは現在生存中のボイスクライアントを追跡する内部の状態キャッシュからクライアントを削除します。クリーンアップを行わない場合はその後接続しようとすると既に接続されていると報告されるようになります。\"\n\n#: ../../api.rst:121\nmsgid \"AudioSource\"\nmsgstr \"AudioSource\"\n\n#: ../../../discord/player.py:docstring of discord.player.AudioSource:1\nmsgid \"Represents an audio stream.\"\nmsgstr \"オーディオストリーム。\"\n\n#: ../../../discord/player.py:docstring of discord.player.AudioSource:3\nmsgid \"The audio stream can be Opus encoded or not, however if the audio stream is not Opus encoded then the audio format must be 16-bit 48KHz stereo PCM.\"\nmsgstr \"オーディオストリームはOpusにエンコードされていなくても構いませんが、エンコードされていない場合、オーディオフォーマットは16ビットの48KHzステレオPCMである必要があります。\"\n\n#: ../../../discord/player.py:docstring of discord.player.AudioSource:8\nmsgid \"The audio source reads are done in a separate thread.\"\nmsgstr \"オーディオソースの読み込みは別スレッドで行われます。\"\n\n#: ../../../discord/player.py:docstring of discord.player.AudioSource.read:1\n#: ../../../discord/player.py:docstring of discord.player.PCMAudio.read:1\n#: ../../../discord/player.py:docstring of discord.player.FFmpegPCMAudio.read:1\n#: ../../../discord/player.py:docstring of discord.player.FFmpegOpusAudio.read:1\n#: ../../../discord/player.py:docstring of discord.player.PCMVolumeTransformer.read:1\nmsgid \"Reads 20ms worth of audio.\"\nmsgstr \"20ms分のオーディオを読み込みます。\"\n\n#: ../../../discord/player.py:docstring of discord.player.AudioSource.read:3\n#: ../../../discord/player.py:docstring of discord.player.PCMAudio.read:3\n#: ../../../discord/player.py:docstring of discord.player.FFmpegPCMAudio.read:3\n#: ../../../discord/player.py:docstring of discord.player.FFmpegOpusAudio.read:3\n#: ../../../discord/player.py:docstring of discord.player.PCMVolumeTransformer.read:3\nmsgid \"Subclasses must implement this.\"\nmsgstr \"サブクラスはこれを実装する必要があります。\"\n\n#: ../../../discord/player.py:docstring of discord.player.AudioSource.read:5\n#: ../../../discord/player.py:docstring of discord.player.PCMAudio.read:5\n#: ../../../discord/player.py:docstring of discord.player.FFmpegPCMAudio.read:5\n#: ../../../discord/player.py:docstring of discord.player.FFmpegOpusAudio.read:5\n#: ../../../discord/player.py:docstring of discord.player.PCMVolumeTransformer.read:5\nmsgid \"If the audio is complete, then returning an empty :term:`py:bytes-like object` to signal this is the way to do so.\"\nmsgstr \"オーディオの読み取りが終了すると、空の :term:`py:bytes-like object` を返してこれを通知します。\"\n\n#: ../../../discord/player.py:docstring of discord.player.AudioSource.read:8\n#: ../../../discord/player.py:docstring of discord.player.PCMAudio.read:8\n#: ../../../discord/player.py:docstring of discord.player.FFmpegPCMAudio.read:8\n#: ../../../discord/player.py:docstring of discord.player.FFmpegOpusAudio.read:8\n#: ../../../discord/player.py:docstring of discord.player.PCMVolumeTransformer.read:8\nmsgid \"If :meth:`~AudioSource.is_opus` method returns ``True``, then it must return 20ms worth of Opus encoded audio. Otherwise, it must be 20ms worth of 16-bit 48KHz stereo PCM, which is about 3,840 bytes per frame (20ms worth of audio).\"\nmsgstr \":meth:`~AudioSource.is_opus` が ``True`` を返す場合、20ms分のOpusにエンコードされたオーディオを返さなければいけません。それ以外の場合は、フレームあたり約3,840バイトの20ms相当の16ビット48KHzステレオPCM（20ms分のオーディオ）が必要です。\"\n\n#: ../../../discord/player.py:docstring of discord.player.AudioSource.read:13\n#: ../../../discord/player.py:docstring of discord.player.PCMAudio.read:13\n#: ../../../discord/player.py:docstring of discord.player.FFmpegPCMAudio.read:13\n#: ../../../discord/player.py:docstring of discord.player.FFmpegOpusAudio.read:13\n#: ../../../discord/player.py:docstring of discord.player.PCMVolumeTransformer.read:13\nmsgid \"A bytes like object that represents the PCM or Opus data.\"\nmsgstr \"PCMまたはOpusデータを表すバイトライクオブジェクト。\"\n\n#: ../../../discord/player.py:docstring of discord.player.AudioSource.read:14\n#: ../../../discord/player.py:docstring of discord.player.PCMAudio.read:14\n#: ../../../discord/player.py:docstring of discord.player.FFmpegPCMAudio.read:14\n#: ../../../discord/player.py:docstring of discord.player.FFmpegOpusAudio.read:14\n#: ../../../discord/player.py:docstring of discord.player.PCMVolumeTransformer.read:14\nmsgid \":class:`bytes`\"\nmsgstr \":class:`bytes`\"\n\n#: ../../../discord/player.py:docstring of discord.player.AudioSource.is_opus:1\n#: ../../../discord/player.py:docstring of discord.player.FFmpegPCMAudio.is_opus:1\n#: ../../../discord/player.py:docstring of discord.player.FFmpegOpusAudio.is_opus:1\nmsgid \"Checks if the audio source is already encoded in Opus.\"\nmsgstr \"オーディオソースがOpusにエンコードされているか。\"\n\n#: ../../../discord/player.py:docstring of discord.player.AudioSource.cleanup:1\n#: ../../../discord/player.py:docstring of discord.player.FFmpegAudio.cleanup:1\n#: ../../../discord/player.py:docstring of discord.player.PCMVolumeTransformer.cleanup:1\nmsgid \"Called when clean-up is needed to be done.\"\nmsgstr \"クリーンアップが必要な時に呼び出されます。\"\n\n#: ../../../discord/player.py:docstring of discord.player.AudioSource.cleanup:3\n#: ../../../discord/player.py:docstring of discord.player.FFmpegAudio.cleanup:3\n#: ../../../discord/player.py:docstring of discord.player.PCMVolumeTransformer.cleanup:3\nmsgid \"Useful for clearing buffer data or processes after it is done playing audio.\"\nmsgstr \"オーディオの再生が終了した後にバッファデータやプロセスをクリアするのに便利です。\"\n\n#: ../../api.rst:129\nmsgid \"PCMAudio\"\nmsgstr \"PCMAudio\"\n\n#: ../../../discord/player.py:docstring of discord.player.PCMAudio:1\nmsgid \"Represents raw 16-bit 48KHz stereo PCM audio source.\"\nmsgstr \"生の16ビット48KHzステレオPCMオーディオソース。\"\n\n#: ../../../discord/player.py:docstring of discord.player.PCMAudio:5\nmsgid \"A file-like object that reads byte data representing raw PCM.\"\nmsgstr \"生のPCMを表したバイトデータを読み取るファイルライクオブジェクト。\"\n\n#: ../../../discord/player.py:docstring of discord.player.PCMAudio:7\nmsgid \":term:`py:file object`\"\nmsgstr \":term:`py:file object`\"\n\n#: ../../api.rst:137\nmsgid \"FFmpegAudio\"\nmsgstr \"FFmpegAudio\"\n\n#: ../../../discord/player.py:docstring of discord.player.FFmpegAudio:1\nmsgid \"Represents an FFmpeg (or AVConv) based AudioSource.\"\nmsgstr \"FFmpeg（またはAVConv）ベースのAudioSource。\"\n\n#: ../../../discord/player.py:docstring of discord.player.FFmpegAudio:3\nmsgid \"User created AudioSources using FFmpeg differently from how :class:`FFmpegPCMAudio` and :class:`FFmpegOpusAudio` work should subclass this.\"\nmsgstr \":class:`FFmpegPCMAudio` や :class:`FFmpegOpusAudio` と異なる動作を行うFFmpegを使用するAudioSourceを作成した場合は、これをサブクラスすべきです。\"\n\n#: ../../api.rst:145\nmsgid \"FFmpegPCMAudio\"\nmsgstr \"FFmpegPCMAudio\"\n\n#: ../../../discord/player.py:docstring of discord.player.FFmpegPCMAudio:1\n#: ../../../discord/player.py:docstring of discord.player.FFmpegOpusAudio:1\nmsgid \"An audio source from FFmpeg (or AVConv).\"\nmsgstr \"FFmpeg (またはAVConv) のオーディオソース。\"\n\n#: ../../../discord/player.py:docstring of discord.player.FFmpegPCMAudio:3\nmsgid \"This launches a sub-process to a specific input file given.\"\nmsgstr \"与えられた特定の入力ファイルに対してサブプロセスを起動します。\"\n\n#: ../../../discord/player.py:docstring of discord.player.FFmpegPCMAudio:7\n#: ../../../discord/player.py:docstring of discord.player.FFmpegOpusAudio:18\nmsgid \"You must have the ffmpeg or avconv executable in your path environment variable in order for this to work.\"\nmsgstr \"環境変数にffmpegまたはavconv実行可能ファイルがなければなりません。\"\n\n#: ../../../discord/player.py:docstring of discord.player.FFmpegPCMAudio:10\nmsgid \"The input that ffmpeg will take and convert to PCM bytes. If ``pipe`` is ``True`` then this is a file-like object that is passed to the stdin of ffmpeg.\"\nmsgstr \"ffmpegが受け取り、PCMバイトへ変換する入力。 ``pipe`` が ``True`` の場合、これはffmpegの標準入力に渡されるファイルライクオブジェクトです。\"\n\n#: ../../../discord/player.py:docstring of discord.player.FFmpegPCMAudio:14\n#: ../../../discord/player.py:docstring of discord.player.FFmpegOpusAudio:39\nmsgid \"The executable name (and path) to use. Defaults to ``ffmpeg``.\"\nmsgstr \"使用する実行可能ファイルの名前 (およびパス)。デフォルトでは ``ffmpeg`` です。\"\n\n#: ../../../discord/player.py:docstring of discord.player.FFmpegPCMAudio:18\n#: ../../../discord/player.py:docstring of discord.player.FFmpegOpusAudio:43\nmsgid \"Since this class spawns a subprocess, care should be taken to not pass in an arbitrary executable name when using this parameter.\"\nmsgstr \"\"\n\n#: ../../../discord/player.py:docstring of discord.player.FFmpegPCMAudio:21\n#: ../../../discord/player.py:docstring of discord.player.FFmpegOpusAudio:46\nmsgid \"If ``True``, denotes that ``source`` parameter will be passed to the stdin of ffmpeg. Defaults to ``False``.\"\nmsgstr \"``True`` の場合、 ``source`` パラメータがffmpegの標準入力に渡されます。デフォルトでは ``False`` です。\"\n\n#: ../../../discord/player.py:docstring of discord.player.FFmpegPCMAudio:24\n#: ../../../discord/player.py:docstring of discord.player.FFmpegOpusAudio:49\nmsgid \"A file-like object to pass to the Popen constructor.\"\nmsgstr \"\"\n\n#: ../../../discord/player.py:docstring of discord.player.FFmpegPCMAudio:26\n#: ../../../discord/player.py:docstring of discord.player.FFmpegOpusAudio:51\nmsgid \"Extra command line arguments to pass to ffmpeg before the ``-i`` flag.\"\nmsgstr \"``-i`` フラグのまえにffmepgに渡す追加のコマンドライン引数。\"\n\n#: ../../../discord/player.py:docstring of discord.player.FFmpegPCMAudio:28\n#: ../../../discord/player.py:docstring of discord.player.FFmpegOpusAudio:53\nmsgid \"Extra command line arguments to pass to ffmpeg after the ``-i`` flag.\"\nmsgstr \"``-i`` フラグのあとにffmepgに渡す追加のコマンドライン引数。\"\n\n#: ../../../discord/player.py:docstring of discord.player.FFmpegPCMAudio:31\n#: ../../../discord/player.py:docstring of discord.player.FFmpegOpusAudio:56\nmsgid \"The subprocess failed to be created.\"\nmsgstr \"サブプロセスを作成できなかった場合。\"\n\n#: ../../api.rst:153\nmsgid \"FFmpegOpusAudio\"\nmsgstr \"FFmpegOpusAudio\"\n\n#: ../../../discord/player.py:docstring of discord.player.FFmpegOpusAudio:3\nmsgid \"This launches a sub-process to a specific input file given.  However, rather than producing PCM packets like :class:`FFmpegPCMAudio` does that need to be encoded to Opus, this class produces Opus packets, skipping the encoding step done by the library.\"\nmsgstr \"指定された入力ファイルをサブプロセスとして起動します。しかし、 :class:`FFmpegPCMAudio` のようにOpusエンコードが必要なPCMパケットを生成するのではなく、このクラスはOpusパケットを生成するため、ライブラリーのエンコードステップをスキップできます。\"\n\n#: ../../../discord/player.py:docstring of discord.player.FFmpegOpusAudio:7\nmsgid \"Alternatively, instead of instantiating this class directly, you can use :meth:`FFmpegOpusAudio.from_probe` to probe for bitrate and codec information.  This can be used to opportunistically skip pointless re-encoding of existing Opus audio data for a boost in performance at the cost of a short initial delay to gather the information. The same can be achieved by passing ``copy`` to the ``codec`` parameter, but only if you know that the input source is Opus encoded beforehand.\"\nmsgstr \"代わりに、このクラスを直接インスタンス化するのではなく、 :meth:`FFmpegOpusAudio.from_probe` を使用してビットレートとコーデック情報を調べることもできます。 これは、情報を収集するための短い初期遅延を犠牲にしてパフォーマンスを向上させるために、既存のOpusオーディオデータの無意味な再エンコードをスキップするために使用することができます。 ``codec`` パラメータに ``copy`` を渡すことでも同じことができますが、入力ソースが事前にOpusエンコードされていることがわかっている場合に限ります。\"\n\n#: ../../../discord/player.py:docstring of discord.player.FFmpegOpusAudio:21\nmsgid \"The input that ffmpeg will take and convert to Opus bytes. If ``pipe`` is ``True`` then this is a file-like object that is passed to the stdin of ffmpeg.\"\nmsgstr \"ffmpegが受け取り、Opusバイトへ変換する入力。 ``pipe`` が ``True`` の場合、これはffmpegの標準入力に渡されるファイルライクオブジェクトです。\"\n\n#: ../../../discord/player.py:docstring of discord.player.FFmpegOpusAudio:25\nmsgid \"The bitrate in kbps to encode the output to.  Defaults to ``128``.\"\nmsgstr \"出力をエンコードするためのkbps単位のビットレート。デフォルトは ``128`` です。\"\n\n#: ../../../discord/player.py:docstring of discord.player.FFmpegOpusAudio:27\nmsgid \"The codec to use to encode the audio data.  Normally this would be just ``libopus``, but is used by :meth:`FFmpegOpusAudio.from_probe` to opportunistically skip pointlessly re-encoding Opus audio data by passing ``copy`` as the codec value.  Any values other than ``copy``, ``opus``, or ``libopus`` will be considered ``libopus``.  Defaults to ``libopus``.\"\nmsgstr \"オーディオデータをエンコードするためのコーデック。これは通常の場合 ``libopus`` ですが、 :meth:`FFmpegOpusAudio.from_probe` により ``copy`` をコーデックとして渡して既存のOpusオーディオデータの無意味な再エンコードをスキップするために使用されます。 ``copy`` 、 ``opus`` 、 ``libopus`` 以外の値は ``libopus`` と推定されます。初期値は ``libopus`` です。\"\n\n#: ../../../discord/player.py:docstring of discord.player.FFmpegOpusAudio:35\nmsgid \"Do not provide this parameter unless you are certain that the audio input is already Opus encoded.  For typical use :meth:`FFmpegOpusAudio.from_probe` should be used to determine the proper value for this parameter.\"\nmsgstr \"オーディオ入力がすでにOpusエンコードされていると確信している場合以外はこのパラメータを渡さないでください。通常の使用では :meth:`FFmpegOpusAudio.from_probe` を使用して適切なパラメータの値を判断すべきです。\"\n\n#: ../../../discord/player.py:docstring of discord.player.FFmpegOpusAudio.from_probe:3\nmsgid \"A factory method that creates a :class:`FFmpegOpusAudio` after probing the input source for audio codec and bitrate information.\"\nmsgstr \"入力からオーディオコーデックとビットレート情報を調べた後、 :class:`FFmpegOpusAudio` を作成するファクトリーメソッド。\"\n\n#: ../../../discord/player.py:docstring of discord.player.FFmpegOpusAudio.from_probe:8\nmsgid \"Use this function to create an :class:`FFmpegOpusAudio` instance instead of the constructor: ::\"\nmsgstr \":class:`FFmpegOpusAudio` インスタンスの作成には、コンストラクタではなく、この関数を使用してください。\"\n\n#: ../../../discord/player.py:docstring of discord.player.FFmpegOpusAudio.from_probe:13\nmsgid \"If you are on Windows and don't have ffprobe installed, use the ``fallback`` method to probe using ffmpeg instead: ::\"\nmsgstr \"Windowsを使用していてffprobeをインストールしていない場合は、 ``fallback`` の方法でffmpegを使用して調査するようにしてください。\"\n\n#: ../../../discord/player.py:docstring of discord.player.FFmpegOpusAudio.from_probe:19\nmsgid \"Using a custom method of determining codec and bitrate: ::\"\nmsgstr \"独自の方法でコーデックとビットレートを判断する: ::\"\n\n#: ../../../discord/player.py:docstring of discord.player.FFmpegOpusAudio.from_probe:28\nmsgid \"Identical to the ``source`` parameter for the constructor.\"\nmsgstr \"コンストラクタの ``source`` パラメータと同じです。\"\n\n#: ../../../discord/player.py:docstring of discord.player.FFmpegOpusAudio.from_probe:29\nmsgid \"The probing method used to determine bitrate and codec information. As a string, valid values are ``native`` to use ffprobe (or avprobe) and ``fallback`` to use ffmpeg (or avconv).  As a callable, it must take two string arguments, ``source`` and ``executable``.  Both parameters are the same values passed to this factory function. ``executable`` will default to ``ffmpeg`` if not provided as a keyword argument.\"\nmsgstr \"ビットレートとコーデック情報を判断するための方法。文字列では、ffprobe（か、avprobe）を使用する ``native`` か、ffmpeg（か、avconv）を使用する ``fallback`` が利用できます。呼び出し可能オブジェクトとしては、 ``source`` と ``executable`` という二つの文字列の引数を取るものでないといけません。パラメータは両方ともこのファクトリー関数に渡されたものと同じです。 ``executable`` は、キーワード引数として渡されていない場合は ``ffmpeg`` となります。\"\n\n#: ../../../discord/player.py:docstring of discord.player.FFmpegOpusAudio.from_probe:35\nmsgid \"The remaining parameters to be passed to the :class:`FFmpegOpusAudio` constructor, excluding ``bitrate`` and ``codec``.\"\nmsgstr \"``bitrate`` と ``codec`` を除いた、 :class:`FFmpegOpusAudio` コンストラクタに渡される残りのパラメータ。\"\n\n#: ../../../discord/player.py:docstring of discord.player.FFmpegOpusAudio.from_probe:38\n#: ../../../discord/player.py:docstring of discord.player.FFmpegOpusAudio.probe:10\nmsgid \"Invalid probe method, must be ``'native'`` or ``'fallback'``.\"\nmsgstr \"プローブメソッドが無効な場合。これは ``'native'`` か ``'fallback'`` でないといけません。\"\n\n#: ../../../discord/player.py:docstring of discord.player.FFmpegOpusAudio.from_probe:39\n#: ../../../discord/player.py:docstring of discord.player.FFmpegOpusAudio.probe:11\nmsgid \"Invalid value for ``probe`` parameter, must be :class:`str` or a callable.\"\nmsgstr \"``probe`` パラメータの値が無効な場合。 :class:`str` または呼び出し可能オブジェクトである必要があります。\"\n\n#: ../../../discord/player.py:docstring of discord.player.FFmpegOpusAudio.from_probe:41\nmsgid \"An instance of this class.\"\nmsgstr \"このクラスのインスタンス。\"\n\n#: ../../../discord/player.py:docstring of discord.player.FFmpegOpusAudio.from_probe:42\nmsgid \":class:`FFmpegOpusAudio`\"\nmsgstr \":class:`FFmpegOpusAudio`\"\n\n#: ../../../discord/player.py:docstring of discord.player.FFmpegOpusAudio.probe:3\nmsgid \"Probes the input source for bitrate and codec information.\"\nmsgstr \"入力から、ビットレートとコーデック情報を調べます。\"\n\n#: ../../../discord/player.py:docstring of discord.player.FFmpegOpusAudio.probe:5\nmsgid \"Identical to the ``source`` parameter for :class:`FFmpegOpusAudio`.\"\nmsgstr \":class:`FFmpegOpusAudio` の ``source`` パラメータと同じです。\"\n\n#: ../../../discord/player.py:docstring of discord.player.FFmpegOpusAudio.probe:6\nmsgid \"Identical to the ``method`` parameter for :meth:`FFmpegOpusAudio.from_probe`.\"\nmsgstr \":meth:`FFmpegOpusAudio.from_probe` の ``method`` パラメータと同じです。\"\n\n#: ../../../discord/player.py:docstring of discord.player.FFmpegOpusAudio.probe:7\nmsgid \"Identical to the ``executable`` parameter for :class:`FFmpegOpusAudio`.\"\nmsgstr \":class:`FFmpegOpusAudio` の ``executable`` パラメータと同じです。\"\n\n#: ../../../discord/player.py:docstring of discord.player.FFmpegOpusAudio.probe:13\nmsgid \"A 2-tuple with the codec and bitrate of the input source.\"\nmsgstr \"入力ソースのコーデックとビットレートの2つの値を含むタプル。\"\n\n#: ../../../discord/player.py:docstring of discord.player.FFmpegOpusAudio.probe:14\nmsgid \"Optional[Tuple[Optional[:class:`str`], :class:`int`]]\"\nmsgstr \"Optional[Tuple[Optional[:class:`str`], :class:`int`]]\"\n\n#: ../../api.rst:161\nmsgid \"PCMVolumeTransformer\"\nmsgstr \"PCMVolumeTransformer\"\n\n#: ../../../discord/player.py:docstring of discord.player.PCMVolumeTransformer:1\nmsgid \"Transforms a previous :class:`AudioSource` to have volume controls.\"\nmsgstr \"前述の :class:`AudioSource` をボリュームコントロールを持つものに変換します。\"\n\n#: ../../../discord/player.py:docstring of discord.player.PCMVolumeTransformer:3\nmsgid \"This does not work on audio sources that have :meth:`AudioSource.is_opus` set to ``True``.\"\nmsgstr \"これは :meth:`AudioSource.is_opus` が ``True`` になっているオーディオソースでは動作しません。\"\n\n#: ../../../discord/player.py:docstring of discord.player.PCMVolumeTransformer:6\nmsgid \"The original AudioSource to transform.\"\nmsgstr \"変換する元のAudioSource。\"\n\n#: ../../../discord/player.py:docstring of discord.player.PCMVolumeTransformer:8\nmsgid \"The initial volume to set it to. See :attr:`volume` for more info.\"\nmsgstr \"設定する初期ボリューム。詳細は :attr:`volume` を参照してください。\"\n\n#: ../../../discord/player.py:docstring of discord.player.PCMVolumeTransformer:12\nmsgid \"Not an audio source.\"\nmsgstr \"オーディオソースでない場合。\"\n\n#: ../../../discord/player.py:docstring of discord.player.PCMVolumeTransformer:13\nmsgid \"The audio source is opus encoded.\"\nmsgstr \"オーディオソースがopusエンコードされている場合。\"\n\n#: ../../../discord/player.py:docstring of discord.PCMVolumeTransformer.volume:1\nmsgid \"Retrieves or sets the volume as a floating point percentage (e.g. ``1.0`` for 100%).\"\nmsgstr \"ボリュームを浮動小数点数パーセンテージ（100％の場合は ``1.0`` ）として取得、または設定します。\"\n\n#: ../../api.rst:169\nmsgid \"Opus Library\"\nmsgstr \"Opusライブラリ\"\n\n#: ../../../discord/opus.py:docstring of discord.opus.load_opus:1\nmsgid \"Loads the libopus shared library for use with voice.\"\nmsgstr \"共有ライブラリである libopus を音声用にロードします。\"\n\n#: ../../../discord/opus.py:docstring of discord.opus.load_opus:3\nmsgid \"If this function is not called then the library uses the function :func:`ctypes.util.find_library` and then loads that one if available.\"\nmsgstr \"この関数が呼び出されない場合、ライブラリは :func:`ctypes.util.find_library` 関数を使用して利用可能であればロードします。\"\n\n#: ../../../discord/opus.py:docstring of discord.opus.load_opus:6\nmsgid \"Not loading a library and attempting to use PCM based AudioSources will lead to voice not working.\"\nmsgstr \"ライブラリーを読み込まずにPCMベースのAudioSourceを使用しようとすると音声が動作しなくなります。\"\n\n#: ../../../discord/opus.py:docstring of discord.opus.load_opus:9\nmsgid \"This function propagates the exceptions thrown.\"\nmsgstr \"この関数は、送出された例外を伝播します。\"\n\n#: ../../../discord/opus.py:docstring of discord.opus.load_opus:13\nmsgid \"The bitness of the library must match the bitness of your python interpreter. If the library is 64-bit then your python interpreter must be 64-bit as well. Usually if there's a mismatch in bitness then the load will throw an exception.\"\nmsgstr \"ライブラリのbit数は、あなたのPythonインタプリタのbit数と一致していなければなりません。ライブラリが64bitの場合は、Pythonインタプリタも64bitである必要があります。bit数が一致しない場合は、ロード時に例外を投げます。\"\n\n#: ../../../discord/opus.py:docstring of discord.opus.load_opus:20\nmsgid \"On Windows, this function should not need to be called as the binaries are automatically loaded.\"\nmsgstr \"Windowsでは、バイナリが自動的に読み込まれるため、この関数を呼び出す必要はありません。\"\n\n#: ../../../discord/opus.py:docstring of discord.opus.load_opus:25\nmsgid \"On Windows, the .dll extension is not necessary. However, on Linux the full extension is required to load the library, e.g. ``libopus.so.1``. On Linux however, :func:`ctypes.util.find_library` will usually find the library automatically without you having to call this.\"\nmsgstr \"Windowsでは .dll拡張は必要ありませんが、Linuxではライブラリをロードするために ``libopus.so.1`` のような完全な拡張ライブラリが必要です。しかしながら、Linux上でも通常の場合は :func:`ctypes.util.find_library` が自動的にライブラリを検出します。\"\n\n#: ../../../discord/opus.py:docstring of discord.opus.load_opus:30\nmsgid \"The filename of the shared library.\"\nmsgstr \"共有ライブラリのファイル名。\"\n\n#: ../../../discord/opus.py:docstring of discord.opus.is_loaded:1\nmsgid \"Function to check if opus lib is successfully loaded either via the :func:`ctypes.util.find_library` call of :func:`load_opus`.\"\nmsgstr \":func:`load_opus` の :func:`ctypes.util.find_library` 呼び出しで、opusライブラリが正常にロードされたかどうかをチェックする関数。\"\n\n#: ../../../discord/opus.py:docstring of discord.opus.is_loaded:4\nmsgid \"This must return ``True`` for voice to work.\"\nmsgstr \"ボイス関連の機能を動かすためには、これが ``True`` を返す必要があります。\"\n\n#: ../../../discord/opus.py:docstring of discord.opus.is_loaded:6\nmsgid \"Indicates if the opus library has been loaded.\"\nmsgstr \"Opusライブラリがロードされているか。\"\n\n#: ../../api.rst:178\nmsgid \"Event Reference\"\nmsgstr \"イベントリファレンス\"\n\n#: ../../api.rst:180\nmsgid \"This section outlines the different types of events listened by :class:`Client`.\"\nmsgstr \"この項目では :class:`Client` が受け取る様々なイベントについて説明します。\"\n\n#: ../../api.rst:182\nmsgid \"There are two ways to register an event, the first way is through the use of :meth:`Client.event`. The second way is through subclassing :class:`Client` and overriding the specific events. For example: ::\"\nmsgstr \"イベントを登録する方法は二通りあります。一つ目は :meth:`Client.event` を使用する方法です。二つ目は :class:`Client` を継承してサブクラスを作り、イベントをオーバーライドする方法です。この方法を用いた場合は以下のようになります:\"\n\n#: ../../api.rst:197\nmsgid \"If an event handler raises an exception, :func:`on_error` will be called to handle it, which defaults to logging the traceback and ignoring the exception.\"\nmsgstr \"イベントハンドラが例外を発生させると、それを処理するために :func:`on_error` が呼び出されます。 デフォルトではトレースバックがログに記録され、例外は無視されます。\"\n\n#: ../../api.rst:202\nmsgid \"All the events must be a |coroutine_link|_. If they aren't, then you might get unexpected errors. In order to turn a function into a coroutine they must be ``async def`` functions.\"\nmsgstr \"すべてのイベントは |coroutine_link|_ である必要があります。 |coroutine_link|_ でない場合、予期せぬエラーが発生する可能性があります。関数をコルーチンにするには、関数定義の際に ``async def`` を使用してください。\"\n\n#: ../../api.rst:207\nmsgid \"App Commands\"\nmsgstr \"アプリケーションコマンド\"\n\n#: ../../api.rst:211\nmsgid \"Called when application command permissions are updated.\"\nmsgstr \"アプリケーションコマンドの権限が更新されたときに呼び出されます。\"\n\n#: ../../api.rst:215\n#: ../../api.rst:370\n#: ../../api.rst:777\n#: ../../api.rst:835\n#: ../../api.rst:1020\nmsgid \"The raw event payload data.\"\nmsgstr \"生のイベントペイロードデータ。\"\n\n#: ../../api.rst:220\nmsgid \"Called when a :class:`app_commands.Command` or :class:`app_commands.ContextMenu` has successfully completed without error.\"\nmsgstr \":class:`app_commands.Command` または :class:`app_commands.ContextMenu` がエラーなく正常に実行したときに呼び出されます。\"\n\n#: ../../api.rst:225\nmsgid \"The interaction of the command.\"\nmsgstr \"コマンドのインタラクション。\"\n\n#: ../../api.rst:227\nmsgid \"The command that completed successfully\"\nmsgstr \"正常に実行されたコマンド。\"\n\n#: ../../api.rst:231\n#: ../../api.rst:4416\nmsgid \"AutoMod\"\nmsgstr \"AutoMod\"\n\n#: ../../api.rst:235\nmsgid \"Called when a :class:`AutoModRule` is created. You must have :attr:`~Permissions.manage_guild` to receive this.\"\nmsgstr \":class:`AutoModRule` が作成されたときに呼び出されます。 受け取るには :attr:`~Permissions.manage_guild` が必要です。\"\n\n#: ../../api.rst:238\n#: ../../api.rst:250\n#: ../../api.rst:262\nmsgid \"This requires :attr:`Intents.auto_moderation_configuration` to be enabled.\"\nmsgstr \":attr:`Intents.auto_moderation_configuration` を有効にする必要があります。\"\n\n#: ../../api.rst:242\nmsgid \"The rule that was created.\"\nmsgstr \"作成されたルール。\"\n\n#: ../../api.rst:247\nmsgid \"Called when a :class:`AutoModRule` is updated. You must have :attr:`~Permissions.manage_guild` to receive this.\"\nmsgstr \":class:`AutoModRule` が更新されたときに呼び出されます。 受け取るには :attr:`~Permissions.manage_guild` が必要です。\"\n\n#: ../../api.rst:254\nmsgid \"The rule that was updated.\"\nmsgstr \"変更されたルール。\"\n\n#: ../../api.rst:259\nmsgid \"Called when a :class:`AutoModRule` is deleted. You must have :attr:`~Permissions.manage_guild` to receive this.\"\nmsgstr \":class:`AutoModRule` が削除されたときに呼び出されます。 受け取るには :attr:`~Permissions.manage_guild` が必要です。\"\n\n#: ../../api.rst:266\nmsgid \"The rule that was deleted.\"\nmsgstr \"削除されたルール。\"\n\n#: ../../api.rst:271\nmsgid \"Called when a :class:`AutoModAction` is created/performed. You must have :attr:`~Permissions.manage_guild` to receive this.\"\nmsgstr \":class:`AutoModAction` が作成/実行されたときに呼び出されます。 受け取るには :attr:`~Permissions.manage_guild` が必要です。\"\n\n#: ../../api.rst:274\nmsgid \"This requires :attr:`Intents.auto_moderation_execution` to be enabled.\"\nmsgstr \":attr:`Intents.auto_moderation_execution` を有効にする必要があります。\"\n\n#: ../../api.rst:278\nmsgid \"The rule execution that was performed.\"\nmsgstr \"行われたルールの実行。\"\n\n#: ../../api.rst:282\nmsgid \"Channels\"\nmsgstr \"Channels\"\n\n#: ../../api.rst:287\nmsgid \"Called whenever a guild channel is deleted or created.\"\nmsgstr \"ギルドのチャンネルが削除・作成されたとき呼び出されます。\"\n\n#: ../../api.rst:289\nmsgid \"Note that you can get the guild from :attr:`~abc.GuildChannel.guild`.\"\nmsgstr \"ギルドは :attr:`~abc.GuildChannel.guild` で取得できます。\"\n\n#: ../../api.rst:291\n#: ../../api.rst:300\n#: ../../api.rst:311\n#: ../../api.rst:587\n#: ../../api.rst:596\nmsgid \"This requires :attr:`Intents.guilds` to be enabled.\"\nmsgstr \":attr:`Intents.guilds` を有効にする必要があります。\"\n\n#: ../../api.rst:293\nmsgid \"The guild channel that got created or deleted.\"\nmsgstr \"作成、または削除されたギルドチャンネル。\"\n\n#: ../../api.rst:298\nmsgid \"Called whenever a guild channel is updated. e.g. changed name, topic, permissions.\"\nmsgstr \"ギルドチャンネルが更新されるたびに呼び出されます。例えば名前、トピック、権限の変更などです。\"\n\n#: ../../api.rst:302\nmsgid \"The updated guild channel's old info.\"\nmsgstr \"更新されたギルドの更新前情報。\"\n\n#: ../../api.rst:304\nmsgid \"The updated guild channel's new info.\"\nmsgstr \"更新されたギルドの更新後情報。\"\n\n#: ../../api.rst:309\nmsgid \"Called whenever a message is pinned or unpinned from a guild channel.\"\nmsgstr \"ギルドチャンネルのメッセージがピン留めされたり、解除されたりしたときに呼び出されます。\"\n\n#: ../../api.rst:313\nmsgid \"The guild channel that had its pins updated.\"\nmsgstr \"ピン留めが更新されたギルドチャンネル。\"\n\n#: ../../api.rst:315\n#: ../../api.rst:335\nmsgid \"The latest message that was pinned as an aware datetime in UTC. Could be ``None``.\"\nmsgstr \"最後にピン留めされたメッセージがピン留めされたUTC aware datetime。 ``None`` の場合もあります。\"\n\n#: ../../api.rst:320\nmsgid \"Called whenever a private group DM is updated. e.g. changed name or topic.\"\nmsgstr \"プライベートグループDMが更新されたとき呼び出されます。 例: 名前やトピックの変更。\"\n\n#: ../../api.rst:322\n#: ../../api.rst:926\n#: ../../api.rst:960\n#: ../../api.rst:977\n#: ../../api.rst:994\nmsgid \"This requires :attr:`Intents.messages` to be enabled.\"\nmsgstr \":attr:`Intents.messages` を有効にする必要があります。\"\n\n#: ../../api.rst:324\nmsgid \"The updated group channel's old info.\"\nmsgstr \"更新されたグループチャンネルの更新前情報。\"\n\n#: ../../api.rst:326\nmsgid \"The updated group channel's new info.\"\nmsgstr \"更新されたグループチャンネルの更新後情報。\"\n\n#: ../../api.rst:331\nmsgid \"Called whenever a message is pinned or unpinned from a private channel.\"\nmsgstr \"プライベートチャンネルのメッセージがピン留めされたりはずされたりしたときに呼ばれます。\"\n\n#: ../../api.rst:333\nmsgid \"The private channel that had its pins updated.\"\nmsgstr \"ピン留めが更新されたプライベートチャンネル。\"\n\n#: ../../api.rst:340\nmsgid \"Called when someone begins typing a message.\"\nmsgstr \"誰かがメッセージを入力し始めたときに呼び出されます。\"\n\n#: ../../api.rst:342\nmsgid \"The ``channel`` parameter can be a :class:`abc.Messageable` instance. Which could either be :class:`TextChannel`, :class:`GroupChannel`, or :class:`DMChannel`.\"\nmsgstr \"``channel`` パラメータは :class:`abc.Messageable` インスタンスにすることができます。 :class:`TextChannel` 、 :class:`GroupChannel` 、または :class:`DMChannel` のいずれかです。\"\n\n#: ../../api.rst:346\nmsgid \"If the ``channel`` is a :class:`TextChannel` then the ``user`` parameter is a :class:`Member`, otherwise it is a :class:`User`.\"\nmsgstr \"``channel`` が :class:`TextChannel` である場合、 ``user`` パラメータは :class:`Member` 、それ以外の場合は :class:`User` です。\"\n\n#: ../../api.rst:349\nmsgid \"If the channel or user could not be found in the internal cache this event will not be called, you may use :func:`on_raw_typing` instead.\"\nmsgstr \"チャンネルまたはユーザーが内部キャッシュで見つからない場合、このイベントは呼び出されません。代わりに :func:`on_raw_typing` を使用してください。\"\n\n#: ../../api.rst:352\n#: ../../api.rst:366\nmsgid \"This requires :attr:`Intents.typing` to be enabled.\"\nmsgstr \":attr:`Intents.typing` を有効にする必要があります。\"\n\n#: ../../api.rst:354\nmsgid \"The location where the typing originated from.\"\nmsgstr \"入力が行われたチャンネル。\"\n\n#: ../../api.rst:356\nmsgid \"The user that started typing.\"\nmsgstr \"入力を始めたユーザー。\"\n\n#: ../../api.rst:358\n#: ../../../discord/raw_models.py:docstring of discord.raw_models.RawTypingEvent:25\nmsgid \"When the typing started as an aware datetime in UTC.\"\nmsgstr \"UTCのaware datetimeでの、タイピングの開始時刻。\"\n\n#: ../../api.rst:363\nmsgid \"Called when someone begins typing a message. Unlike :func:`on_typing` this is called regardless of the channel and user being in the internal cache.\"\nmsgstr \"誰かがメッセージを入力し始めたときに呼び出されます。 :func:`on_typing` とは異なり、これはチャンネルやユーザーが内部キャッシュに存在するかどうかに関係なく呼び出されます。\"\n\n#: ../../api.rst:374\nmsgid \"Connection\"\nmsgstr \"Connection\"\n\n#: ../../api.rst:378\nmsgid \"Called when the client has successfully connected to Discord. This is not the same as the client being fully prepared, see :func:`on_ready` for that.\"\nmsgstr \"クライアントがDiscordに正常に接続できたときに呼び出されます。クライアントの準備が完了していることと同義ではありません。 :func:`on_ready` を参照してください。\"\n\n#: ../../api.rst:381\nmsgid \"The warnings on :func:`on_ready` also apply.\"\nmsgstr \":func:`on_ready` での警告も適用されます。\"\n\n#: ../../api.rst:385\nmsgid \"Called when the client has disconnected from Discord, or a connection attempt to Discord has failed. This could happen either through the internet being disconnected, explicit calls to close, or Discord terminating the connection one way or the other.\"\nmsgstr \"クライアントがDiscordから切断したときと、Discordへの接続の試行が失敗した場合に呼び出されます。これはインターネットが切断された、明示的にcloseメソッドを呼び出した、またはDiscord側から何らかの方法で切断されたというような場合に呼び出される可能性があります。\"\n\n#: ../../api.rst:389\nmsgid \"This function can be called many times without a corresponding :func:`on_connect` call.\"\nmsgstr \"この関数は対応する :func:`on_connect` なしで複数回呼び出されることがあります。\"\n\n#: ../../api.rst:393\nmsgid \"Similar to :func:`on_connect` except used by :class:`AutoShardedClient` to denote when a particular shard ID has connected to Discord.\"\nmsgstr \"特定のシャードIDを持つシャードがDiscordに接続したかどうかを確認するために :class:`AutoShardedClient` で使用されることを除けば :func:`on_connect` とほとんど同じです。\"\n\n#: ../../api.rst:398\nmsgid \"The shard ID that has connected.\"\nmsgstr \"接続したシャードのID。\"\n\n#: ../../api.rst:404\nmsgid \"Similar to :func:`on_disconnect` except used by :class:`AutoShardedClient` to denote when a particular shard ID has disconnected from Discord.\"\nmsgstr \"特定のシャードIDを持つシャードがDiscordから切断したかどうかを確認するために :class:`AutoShardedClient` で使用されることを除けば :func:`on_disconnect` とほとんど同じです。\"\n\n#: ../../api.rst:409\nmsgid \"The shard ID that has disconnected.\"\nmsgstr \"切断したシャードのID。\"\n\n#: ../../api.rst:413\nmsgid \"Debug\"\nmsgstr \"Debug\"\n\n#: ../../api.rst:417\nmsgid \"Usually when an event raises an uncaught exception, a traceback is logged to stderr and the exception is ignored. If you want to change this behaviour and handle the exception for whatever reason yourself, this event can be overridden. Which, when done, will suppress the default action of printing the traceback.\"\nmsgstr \"イベントがキャッチされない例外を発生させた場合、通常はトレースバックがstderrに記録され、その例外は無視されます。何らかの理由でこの動作を変更して、自分自身で例外処理を行いたい場合は、このイベントをオーバーライドすることができます。これを行った場合、トレースバックを出力するというデフォルトの動作は行われません。\"\n\n#: ../../api.rst:423\nmsgid \"The information of the exception raised and the exception itself can be retrieved with a standard call to :func:`sys.exc_info`.\"\nmsgstr \"発生した例外の情報と、例外事態は :func:`sys.exc_info` への標準呼び出しで取得できます。\"\n\n#: ../../api.rst:428\nmsgid \"``on_error`` will only be dispatched to :meth:`Client.event`.\"\nmsgstr \"``on_error`` は :meth:`Client.event` でのみディスパッチされます。\"\n\n#: ../../api.rst:430\nmsgid \"It will not be received by :meth:`Client.wait_for`, or, if used, :ref:`ext_commands_api_bot` listeners such as :meth:`~ext.commands.Bot.listen` or :meth:`~ext.commands.Cog.listener`.\"\nmsgstr \":meth:`Client.wait_for` や、使用している場合は :meth:`~ext.commands.Bot.listen` や :meth:`~ext.commands.Cog.listener` といった :ref:`ext_commands_api_bot` のリスナーでは受信されません。\"\n\n#: ../../api.rst:436\nmsgid \"The traceback is now logged rather than printed.\"\nmsgstr \"トレースバックが出力されず、ログに記録されるようになりました。\"\n\n#: ../../api.rst:438\nmsgid \"The name of the event that raised the exception.\"\nmsgstr \"例外を発生させたイベントの名前。\"\n\n#: ../../api.rst:441\nmsgid \"The positional arguments for the event that raised the exception.\"\nmsgstr \"例外を発生させたイベントの位置引数。\"\n\n#: ../../api.rst:443\nmsgid \"The keyword arguments for the event that raised the exception.\"\nmsgstr \"例外を発生させたイベントのキーワード引数。\"\n\n#: ../../api.rst:448\nmsgid \"Called whenever a websocket event is received from the WebSocket.\"\nmsgstr \"WebSocketからWebSocketイベントが受信されるたびに呼び出されます。\"\n\n#: ../../api.rst:450\nmsgid \"This is mainly useful for logging how many events you are receiving from the Discord gateway.\"\nmsgstr \"これは主にDiscordゲートウェイから受け取るイベントの数を記録するのに便利です。\"\n\n#: ../../api.rst:455\nmsgid \"The event type from Discord that is received, e.g. ``'READY'``.\"\nmsgstr \"Discordから受信されたイベントの種類。例： ``'READY'`` 。\"\n\n#: ../../api.rst:460\nmsgid \"Called whenever a message is completely received from the WebSocket, before it's processed and parsed. This event is always dispatched when a complete message is received and the passed data is not parsed in any way.\"\nmsgstr \"メッセージが処理され、パースされる前、WebSocketからメッセージが完全に受信されるたびに呼び出されます。このイベントは完全なメッセージを受信した場合に呼び出され、渡されたデータは一切パースされていません。\"\n\n#: ../../api.rst:464\n#: ../../api.rst:483\nmsgid \"This is only really useful for grabbing the WebSocket stream and debugging purposes.\"\nmsgstr \"これはWebSocketストリームを取得してデバッグする時のみに役に立ちます。\"\n\n#: ../../api.rst:467\n#: ../../api.rst:486\nmsgid \"This requires setting the ``enable_debug_events`` setting in the :class:`Client`.\"\nmsgstr \"使用する場合は :class:`Client` にて ``enable_debug_events`` を設定しないといけません。\"\n\n#: ../../api.rst:471\nmsgid \"This is only for the messages received from the client WebSocket. The voice WebSocket will not trigger this event.\"\nmsgstr \"これは、クライアントWebSocketから受信したメッセージ専用です。音声WebSocketではこのイベントは実行されません。\"\n\n#: ../../api.rst:474\nmsgid \"The message passed in from the WebSocket library.\"\nmsgstr \"WebSocketライブラリから渡されたメッセージ。\"\n\n#: ../../api.rst:479\nmsgid \"Called whenever a send operation is done on the WebSocket before the message is sent. The passed parameter is the message that is being sent to the WebSocket.\"\nmsgstr \"メッセージが送信される前にWebSocketで送信操作が行われるたびに呼び出されます。渡されるパラメータはWebSocketに送信されているメッセージです。\"\n\n#: ../../api.rst:490\nmsgid \"This is only for the messages sent from the client WebSocket. The voice WebSocket will not trigger this event.\"\nmsgstr \"これはクライアントのWebSocketから受信したメッセージ専用です。音声WebSocketはこのイベントを発火させません。\"\n\n#: ../../api.rst:493\nmsgid \"The message that is about to be passed on to the WebSocket library. It can be :class:`bytes` to denote a binary message or :class:`str` to denote a regular text message.\"\nmsgstr \"WebSocketライブラリから渡されるメッセージ。バイナリメッセージの場合は :class:`bytes` 、通常のメッセージの場合は :class:`str` です。\"\n\n#: ../../api.rst:500\nmsgid \"Entitlements\"\nmsgstr \"\"\n\n#: ../../api.rst:504\nmsgid \"Called when a user subscribes to a SKU.\"\nmsgstr \"\"\n\n#: ../../api.rst:508\nmsgid \"The entitlement that was created.\"\nmsgstr \"\"\n\n#: ../../api.rst:513\nmsgid \"Called when a user updates their subscription to a SKU. This is usually called when the user renews or cancels their subscription.\"\nmsgstr \"\"\n\n#: ../../api.rst:518\nmsgid \"The entitlement that was updated.\"\nmsgstr \"\"\n\n#: ../../api.rst:523\nmsgid \"Called when a users subscription to a SKU is cancelled. This is typically only called when:\"\nmsgstr \"\"\n\n#: ../../api.rst:525\nmsgid \"Discord issues a refund for the subscription.\"\nmsgstr \"\"\n\n#: ../../api.rst:526\nmsgid \"Discord removes an entitlement from a user.\"\nmsgstr \"\"\n\n#: ../../api.rst:530\nmsgid \"This event won't be called if the user cancels their subscription manually, instead :func:`on_entitlement_update` will be called with :attr:`Entitlement.ends_at` set to the end of the current billing period.\"\nmsgstr \"\"\n\n#: ../../api.rst:536\nmsgid \"The entitlement that was deleted.\"\nmsgstr \"\"\n\n#: ../../api.rst:541\nmsgid \"Gateway\"\nmsgstr \"Gateway\"\n\n#: ../../api.rst:545\nmsgid \"Called when the client is done preparing the data received from Discord. Usually after login is successful and the :attr:`Client.guilds` and co. are filled up.\"\nmsgstr \"クライアントがDiscordから受信したデータの準備を完了した際に呼び出されます。通常はログインが成功したあと、 :attr:`Client.guilds` とそれに関連するものの準備が完了したときです。\"\n\n#: ../../api.rst:550\nmsgid \"This function is not guaranteed to be the first event called. Likewise, this function is **not** guaranteed to only be called once. This library implements reconnection logic and thus will end up calling this event whenever a RESUME request fails.\"\nmsgstr \"このイベントは、最初に呼び出されるイベントとは限りません。同時に、このイベントは **一度だけ呼ばれるという保証もできません** 。このライブラリは、再接続ロジックを実装しているためリジューム要求が失敗するたびにこのイベントが呼び出されることになります。\"\n\n#: ../../api.rst:557\nmsgid \"Called when the client has resumed a session.\"\nmsgstr \"クライアントがセッションを再開したときに呼び出されます。\"\n\n#: ../../api.rst:561\nmsgid \"Similar to :func:`on_ready` except used by :class:`AutoShardedClient` to denote when a particular shard ID has become ready.\"\nmsgstr \"特定の Shard IDが準備完了になったかを確認するために :class:`AutoShardedClient` で使用される以外は :func:`on_ready` とほとんど同じです。\"\n\n#: ../../api.rst:564\nmsgid \"The shard ID that is ready.\"\nmsgstr \"準備が完了したShard ID。\"\n\n#: ../../api.rst:570\nmsgid \"Similar to :func:`on_resumed` except used by :class:`AutoShardedClient` to denote when a particular shard ID has resumed a session.\"\nmsgstr \"特定のシャードIDを持つシャードがセッションを再開したかどうかを確認するために :class:`AutoShardedClient` で使用されることを除けば :func:`on_resumed` とほとんど同じです。\"\n\n#: ../../api.rst:575\nmsgid \"The shard ID that has resumed.\"\nmsgstr \"セッションが再開したシャードのID。\"\n\n#: ../../api.rst:579\nmsgid \"Guilds\"\nmsgstr \"Guilds\"\n\n#: ../../api.rst:584\nmsgid \"Called when a guild becomes available or unavailable. The guild must have existed in the :attr:`Client.guilds` cache.\"\nmsgstr \"ギルドが利用可能・不可能になったときに呼び出されます。ギルドは :attr:`Client.guilds` キャッシュに存在していないといけません。\"\n\n#: ../../api.rst:589\nmsgid \"The :class:`Guild` that has changed availability.\"\nmsgstr \"利用状況が変わった :class:`Guild` 。\"\n\n#: ../../api.rst:593\nmsgid \"Called when a :class:`Guild` is either created by the :class:`Client` or when the :class:`Client` joins a guild.\"\nmsgstr \":class:`Client` によって :class:`Guild` が作成された。または :class:`Client` がギルドに参加したときに呼び出されます。\"\n\n#: ../../api.rst:598\nmsgid \"The guild that was joined.\"\nmsgstr \"参加したギルド。\"\n\n#: ../../api.rst:603\nmsgid \"Called when a :class:`Guild` is removed from the :class:`Client`.\"\nmsgstr \":class:`Client` が :class:`Guild` から削除されたときに呼び出されます。\"\n\n#: ../../api.rst:605\nmsgid \"This happens through, but not limited to, these circumstances:\"\nmsgstr \"これは以下の状況時に呼び出されますが、これに限ったものではありません:\"\n\n#: ../../api.rst:607\nmsgid \"The client got banned.\"\nmsgstr \"クライアントがBANされた。\"\n\n#: ../../api.rst:608\nmsgid \"The client got kicked.\"\nmsgstr \"クライアントがキックされた。\"\n\n#: ../../api.rst:609\nmsgid \"The client left the guild.\"\nmsgstr \"クライアントがギルドから脱退した。\"\n\n#: ../../api.rst:610\nmsgid \"The client or the guild owner deleted the guild.\"\nmsgstr \"クライアント、またはギルドオーナーがギルドを削除した。\"\n\n#: ../../api.rst:612\nmsgid \"In order for this event to be invoked then the :class:`Client` must have been part of the guild to begin with. (i.e. it is part of :attr:`Client.guilds`)\"\nmsgstr \"このイベントが呼び出されるためには、 :class:`Client` がギルドに参加している必要があります。(つまり、 :attr:`Client.guilds` にギルドが存在しなければならない)\"\n\n#: ../../api.rst:617\nmsgid \"The guild that got removed.\"\nmsgstr \"削除されたギルド。\"\n\n#: ../../api.rst:622\nmsgid \"Called when a :class:`Guild` updates, for example:\"\nmsgstr \":class:`Guild` が更新されたときに呼び出されます。例えば:\"\n\n#: ../../api.rst:624\nmsgid \"Changed name\"\nmsgstr \"名前が変更された\"\n\n#: ../../api.rst:625\nmsgid \"Changed AFK channel\"\nmsgstr \"AFKチャンネルが変更された\"\n\n#: ../../api.rst:626\nmsgid \"Changed AFK timeout\"\nmsgstr \"AFKのタイムアウト時間が変更された\"\n\n#: ../../api.rst:627\nmsgid \"etc\"\nmsgstr \"その他\"\n\n#: ../../api.rst:631\nmsgid \"The guild prior to being updated.\"\nmsgstr \"更新される前のギルド。\"\n\n#: ../../api.rst:633\nmsgid \"The guild after being updated.\"\nmsgstr \"更新された後のギルド。\"\n\n#: ../../api.rst:638\nmsgid \"Called when a :class:`Guild` adds or removes :class:`Emoji`.\"\nmsgstr \":class:`Guild` に :class:`Emoji` が追加、または削除されたときに呼び出されます。\"\n\n#: ../../api.rst:640\n#: ../../api.rst:653\nmsgid \"This requires :attr:`Intents.emojis_and_stickers` to be enabled.\"\nmsgstr \":attr:`Intents.emojis_and_stickers` を有効にする必要があります。\"\n\n#: ../../api.rst:642\nmsgid \"The guild who got their emojis updated.\"\nmsgstr \"絵文字が更新されたギルド。\"\n\n#: ../../api.rst:644\nmsgid \"A list of emojis before the update.\"\nmsgstr \"更新前の絵文字のリスト。\"\n\n#: ../../api.rst:646\nmsgid \"A list of emojis after the update.\"\nmsgstr \"更新後の絵文字のリスト。\"\n\n#: ../../api.rst:651\nmsgid \"Called when a :class:`Guild` updates its stickers.\"\nmsgstr \":class:`Guild` のスタンプが更新されたときに呼び出されます。\"\n\n#: ../../api.rst:657\nmsgid \"The guild who got their stickers updated.\"\nmsgstr \"スタンプが更新されたギルド。\"\n\n#: ../../api.rst:659\nmsgid \"A list of stickers before the update.\"\nmsgstr \"更新前のスタンプのリスト。\"\n\n#: ../../api.rst:661\nmsgid \"A list of stickers after the update.\"\nmsgstr \"更新後のスタンプのリスト。\"\n\n#: ../../api.rst:666\nmsgid \"Called when a :class:`Guild` gets a new audit log entry. You must have :attr:`~Permissions.view_audit_log` to receive this.\"\nmsgstr \":class:`Guild` に新しい監査ログ項目が追加されたときに呼び出されます。これを受け取るには :attr:`~Permissions.view_audit_log` が必要です。\"\n\n#: ../../api.rst:669\n#: ../../api.rst:881\n#: ../../api.rst:894\nmsgid \"This requires :attr:`Intents.moderation` to be enabled.\"\nmsgstr \":attr:`Intents.moderation` を有効にする必要があります。\"\n\n#: ../../api.rst:675\nmsgid \"Audit log entries received through the gateway are subject to data retrieval from cache rather than REST. This means that some data might not be present when you expect it to be. For example, the :attr:`AuditLogEntry.target` attribute will usually be a :class:`discord.Object` and the :attr:`AuditLogEntry.user` attribute will depend on user and member cache.\"\nmsgstr \"ゲートウェイ経由で取得した監査ログ項目はデータをRESTではなくキャッシュから取得します。このため、一部のデータが不足している場合があります。例えば、 :attr:`AuditLogEntry.target` 属性は多くの場合 :class:`discord.Object` になり、 :attr:`AuditLogEntry.user` 属性はユーザーとメンバーキャッシュに依存します。\"\n\n#: ../../api.rst:681\nmsgid \"To get the user ID of entry, :attr:`AuditLogEntry.user_id` can be used instead.\"\nmsgstr \"項目のユーザーIDを取得するには、代わりに :attr:`AuditLogEntry.user_id` を使用できます。\"\n\n#: ../../api.rst:683\nmsgid \"The audit log entry that was created.\"\nmsgstr \"作成された監査ログの項目。\"\n\n#: ../../api.rst:688\nmsgid \"Called when an :class:`Invite` is created. You must have :attr:`~Permissions.manage_channels` to receive this.\"\nmsgstr \":class:`Invite` が作成されたときに呼び出されます。 受け取るには :attr:`~Permissions.manage_channels` が必要です。\"\n\n#: ../../api.rst:695\n#: ../../api.rst:712\nmsgid \"There is a rare possibility that the :attr:`Invite.guild` and :attr:`Invite.channel` attributes will be of :class:`Object` rather than the respective models.\"\nmsgstr \"まれに :attr:`Invite.guild` と :attr:`Invite.channel` 属性がそれぞれの本来のモデルではなく :class:`Object` になることがあります。\"\n\n#: ../../api.rst:698\n#: ../../api.rst:718\nmsgid \"This requires :attr:`Intents.invites` to be enabled.\"\nmsgstr \":attr:`Intents.invites` を有効にする必要があります。\"\n\n#: ../../api.rst:700\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.create_invite:37\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.create_invite:37\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.create_invite:37\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.create_invite:37\nmsgid \"The invite that was created.\"\nmsgstr \"作成された招待。\"\n\n#: ../../api.rst:705\nmsgid \"Called when an :class:`Invite` is deleted. You must have :attr:`~Permissions.manage_channels` to receive this.\"\nmsgstr \":class:`Invite` が削除されたときに呼び出されます。 受け取るには :attr:`~Permissions.manage_channels` が必要です。\"\n\n#: ../../api.rst:715\nmsgid \"Outside of those two attributes, the only other attribute guaranteed to be filled by the Discord gateway for this event is :attr:`Invite.code`.\"\nmsgstr \"これらの属性以外では、Discordゲートウェイによってこのイベントに与えられているのが保証されている属性は :attr:`Invite.code` のみです。\"\n\n#: ../../api.rst:720\nmsgid \"The invite that was deleted.\"\nmsgstr \"削除された招待。\"\n\n#: ../../api.rst:725\nmsgid \"Integrations\"\nmsgstr \"Integrations\"\n\n#: ../../api.rst:729\nmsgid \"Called when an integration is created.\"\nmsgstr \"連携サービスが作成されたときに呼び出されます。\"\n\n#: ../../api.rst:731\n#: ../../api.rst:742\n#: ../../api.rst:753\n#: ../../api.rst:773\nmsgid \"This requires :attr:`Intents.integrations` to be enabled.\"\nmsgstr \":attr:`Intents.integrations` を有効にする必要があります。\"\n\n#: ../../api.rst:735\nmsgid \"The integration that was created.\"\nmsgstr \"作成された連携サービス。\"\n\n#: ../../api.rst:740\nmsgid \"Called when an integration is updated.\"\nmsgstr \"連携サービスが更新されたときに呼び出されます。\"\n\n#: ../../api.rst:746\nmsgid \"The integration that was updated.\"\nmsgstr \"更新された連携サービス。\"\n\n#: ../../api.rst:751\nmsgid \"Called whenever an integration is created, modified, or removed from a guild.\"\nmsgstr \"ギルドの連携サービスが作成、更新、削除されるたびに呼び出されます。\"\n\n#: ../../api.rst:757\nmsgid \"The guild that had its integrations updated.\"\nmsgstr \"連携サービスが更新されたギルド。\"\n\n#: ../../api.rst:762\nmsgid \"Called whenever a webhook is created, modified, or removed from a guild channel.\"\nmsgstr \"ギルドチャンネルのWebhookが作成、更新、削除されたときに呼び出されます。\"\n\n#: ../../api.rst:764\nmsgid \"This requires :attr:`Intents.webhooks` to be enabled.\"\nmsgstr \":attr:`Intents.webhooks` を有効にする必要があります。\"\n\n#: ../../api.rst:766\nmsgid \"The channel that had its webhooks updated.\"\nmsgstr \"Webhookが更新されたチャンネル。\"\n\n#: ../../api.rst:771\nmsgid \"Called when an integration is deleted.\"\nmsgstr \"連携サービスが削除されたときに呼び出されます。\"\n\n#: ../../api.rst:781\nmsgid \"Interactions\"\nmsgstr \"Interactions\"\n\n#: ../../api.rst:785\nmsgid \"Called when an interaction happened.\"\nmsgstr \"インタラクションが発生したときに呼び出されます。\"\n\n#: ../../api.rst:787\nmsgid \"This currently happens due to slash command invocations or components being used.\"\nmsgstr \"これは、現在はスラッシュコマンドの呼び出しやコンポーネントの使用により起こります。\"\n\n#: ../../api.rst:791\nmsgid \"This is a low level function that is not generally meant to be used. If you are working with components, consider using the callbacks associated with the :class:`~discord.ui.View` instead as it provides a nicer user experience.\"\nmsgstr \"これは、一般的な使用を意図していない低レベル関数です。コンポーネントを使用している場合は、よりよいユーザーエクスペリエンスを提供する :class:`~discord.ui.View` のコールバックの使用を検討してください。\"\n\n#: ../../api.rst:797\nmsgid \"The interaction data.\"\nmsgstr \"インタラクションデータ。\"\n\n#: ../../api.rst:801\nmsgid \"Members\"\nmsgstr \"Members\"\n\n#: ../../api.rst:805\nmsgid \"Called when a :class:`Member` joins a :class:`Guild`.\"\nmsgstr \":class:`Member` が :class:`Guild` に参加したときに呼び出されます。\"\n\n#: ../../api.rst:807\n#: ../../api.rst:819\n#: ../../api.rst:831\n#: ../../api.rst:853\n#: ../../api.rst:870\nmsgid \"This requires :attr:`Intents.members` to be enabled.\"\nmsgstr \":attr:`Intents.members` を有効にする必要があります。\"\n\n#: ../../api.rst:809\nmsgid \"The member who joined.\"\nmsgstr \"参加したメンバー。\"\n\n#: ../../api.rst:814\n#: ../../api.rst:826\nmsgid \"Called when a :class:`Member` leaves a :class:`Guild`.\"\nmsgstr \":class:`Member` が :class:`Guild` から脱退したときに呼び出されます。\"\n\n#: ../../api.rst:816\nmsgid \"If the guild or member could not be found in the internal cache this event will not be called, you may use :func:`on_raw_member_remove` instead.\"\nmsgstr \"ギルドまたはメンバーが内部キャッシュで見つからない場合、このイベントは呼び出されません。代わりに :func:`on_raw_member_remove` を使用してください。\"\n\n#: ../../api.rst:821\nmsgid \"The member who left.\"\nmsgstr \"脱退したメンバー。\"\n\n#: ../../api.rst:828\nmsgid \"Unlike :func:`on_member_remove` this is called regardless of the guild or member being in the internal cache.\"\nmsgstr \":func:`on_member_remove` とは異なり、ギルドやメンバーが内部キャッシュに存在するかどうかに関係なく呼び出されます。\"\n\n#: ../../api.rst:840\nmsgid \"Called when a :class:`Member` updates their profile.\"\nmsgstr \":class:`Member` のプロフィールが更新されたときに呼び出されます。\"\n\n#: ../../api.rst:842\n#: ../../api.rst:864\n#: ../../api.rst:905\nmsgid \"This is called when one or more of the following things change:\"\nmsgstr \"これらのうちひとつ以上が変更されたとき呼び出されます:\"\n\n#: ../../api.rst:844\nmsgid \"nickname\"\nmsgstr \"ニックネーム\"\n\n#: ../../api.rst:845\n#: ../../../discord/member.py:docstring of discord.member.Member.edit:16\nmsgid \"roles\"\nmsgstr \"roles\"\n\n#: ../../api.rst:846\nmsgid \"pending\"\nmsgstr \"ペンディング状態\"\n\n#: ../../api.rst:847\nmsgid \"timeout\"\nmsgstr \"タイムアウト\"\n\n#: ../../api.rst:848\nmsgid \"guild avatar\"\nmsgstr \"ギルドアバター\"\n\n#: ../../api.rst:849\nmsgid \"flags\"\nmsgstr \"flags\"\n\n#: ../../api.rst:851\nmsgid \"Due to a Discord limitation, this event is not dispatched when a member's timeout expires.\"\nmsgstr \"Discordの制限により、このイベントはメンバーのタイムアウト期間が満了した場合には発生しません。\"\n\n#: ../../api.rst:855\n#: ../../api.rst:914\nmsgid \"The updated member's old info.\"\nmsgstr \"更新されたメンバーの更新前情報。\"\n\n#: ../../api.rst:857\n#: ../../api.rst:916\nmsgid \"The updated member's updated info.\"\nmsgstr \"更新されたメンバーの更新後情報。\"\n\n#: ../../api.rst:862\nmsgid \"Called when a :class:`User` updates their profile.\"\nmsgstr \":class:`User` がプロフィールを編集したとき呼び出されます。\"\n\n#: ../../api.rst:866\nmsgid \"avatar\"\nmsgstr \"アバター\"\n\n#: ../../api.rst:867\nmsgid \"username\"\nmsgstr \"ユーザー名\"\n\n#: ../../api.rst:868\nmsgid \"discriminator\"\nmsgstr \"タグ\"\n\n#: ../../api.rst:872\nmsgid \"The updated user's old info.\"\nmsgstr \"更新されたユーザーの更新前情報。\"\n\n#: ../../api.rst:874\nmsgid \"The updated user's updated info.\"\nmsgstr \"更新されたユーザーの更新後情報。\"\n\n#: ../../api.rst:879\nmsgid \"Called when a user gets banned from a :class:`Guild`.\"\nmsgstr \"\"\n\n#: ../../api.rst:883\nmsgid \"The guild the user got banned from.\"\nmsgstr \"ユーザーがBANされたギルド。\"\n\n#: ../../api.rst:885\nmsgid \"The user that got banned. Can be either :class:`User` or :class:`Member` depending if the user was in the guild or not at the time of removal.\"\nmsgstr \"BANされたユーザー。BAN時にユーザーがギルドにいたかによって、 :class:`User` か :class:`Member` になります。\"\n\n#: ../../api.rst:892\nmsgid \"Called when a :class:`User` gets unbanned from a :class:`Guild`.\"\nmsgstr \":class:`User` が :class:`Guild` のBANを解除されたとき呼び出されます。\"\n\n#: ../../api.rst:896\nmsgid \"The guild the user got unbanned from.\"\nmsgstr \"ユーザーのBANが解除されたギルド。\"\n\n#: ../../api.rst:898\nmsgid \"The user that got unbanned.\"\nmsgstr \"Banが解除されたユーザー。\"\n\n#: ../../api.rst:903\nmsgid \"Called when a :class:`Member` updates their presence.\"\nmsgstr \":class:`Member` がプレゼンスを変更したとき呼び出されます。\"\n\n#: ../../api.rst:907\nmsgid \"status\"\nmsgstr \"ステータス\"\n\n#: ../../api.rst:908\nmsgid \"activity\"\nmsgstr \"アクティビティ\"\n\n#: ../../api.rst:910\nmsgid \"This requires :attr:`Intents.presences` and :attr:`Intents.members` to be enabled.\"\nmsgstr \"これを使用するには :attr:`Intents.presences` と :attr:`Intents.members` を有効にしないといけません。\"\n\n#: ../../api.rst:920\nmsgid \"Messages\"\nmsgstr \"Messages\"\n\n#: ../../api.rst:924\nmsgid \"Called when a :class:`Message` is created and sent.\"\nmsgstr \":class:`Message` が作成され送信されたときに呼び出されます。\"\n\n#: ../../api.rst:930\nmsgid \"Your bot's own messages and private messages are sent through this event. This can lead cases of 'recursion' depending on how your bot was programmed. If you want the bot to not reply to itself, consider checking the user IDs. Note that :class:`~ext.commands.Bot` does not have this problem.\"\nmsgstr \"Botのメッセージとプライベートメッセージはこのイベントを通して送信されます。Botのプログラムによっては「再帰呼び出し」を続けることになります。Botが自分自身に返信しないようにするためにはユーザーIDを確認する方法が考えられます。 :class:`~ext.commands.Bot` にはこの問題は存在しません。\"\n\n#: ../../api.rst:936\nmsgid \"The current message.\"\nmsgstr \"現在のメッセージ。\"\n\n#: ../../api.rst:941\nmsgid \"Called when a :class:`Message` receives an update event. If the message is not found in the internal message cache, then these events will not be called. Messages might not be in cache if the message is too old or the client is participating in high traffic guilds.\"\nmsgstr \":class:`Message` が更新イベントを受け取ったときに呼び出されます。メッセージが内部のメッセージキャッシュに見つからない場合、このイベントは呼び出されません。これはメッセージが古すぎるか、クライアントが通信の多いギルドに参加している場合に発生します。\"\n\n#: ../../api.rst:946\nmsgid \"If this occurs increase the :class:`max_messages <Client>` parameter or use the :func:`on_raw_message_edit` event instead.\"\nmsgstr \"発生する場合は :class:`max_messages <Client>` パラメータの値を増加させるか :func:`on_raw_message_edit` イベントを使用してください。\"\n\n#: ../../api.rst:949\nmsgid \"The following non-exhaustive cases trigger this event:\"\nmsgstr \"以下の非網羅的ケースがこのイベントを発生させます:\"\n\n#: ../../api.rst:951\nmsgid \"A message has been pinned or unpinned.\"\nmsgstr \"メッセージをピン留め、または解除した。\"\n\n#: ../../api.rst:952\nmsgid \"The message content has been changed.\"\nmsgstr \"メッセージの内容を変更した。\"\n\n#: ../../api.rst:953\nmsgid \"The message has received an embed.\"\nmsgstr \"メッセージが埋め込みを受け取った。\"\n\n#: ../../api.rst:955\nmsgid \"For performance reasons, the embed server does not do this in a \\\"consistent\\\" manner.\"\nmsgstr \"パフォーマンス上の理由から、埋め込みのサーバーはこれを「一貫した」方法では行いません。\"\n\n#: ../../api.rst:957\nmsgid \"The message's embeds were suppressed or unsuppressed.\"\nmsgstr \"メッセージの埋め込みが削除されたり、復元されたりした。\"\n\n#: ../../api.rst:958\nmsgid \"A call message has received an update to its participants or ending time.\"\nmsgstr \"通話呼び出しメッセージの参加者や終了時刻が変わった。\"\n\n#: ../../api.rst:962\nmsgid \"The previous version of the message.\"\nmsgstr \"更新前のメッセージ。\"\n\n#: ../../api.rst:964\nmsgid \"The current version of the message.\"\nmsgstr \"更新後のメッセージ。\"\n\n#: ../../api.rst:969\nmsgid \"Called when a message is deleted. If the message is not found in the internal message cache, then this event will not be called. Messages might not be in cache if the message is too old or the client is participating in high traffic guilds.\"\nmsgstr \"メッセージが削除された際に呼び出されます。メッセージが内部のメッセージキャッシュに見つからない場合、このイベントは呼び出されません。これはメッセージが古すぎるか、クライアントが通信の多いギルドに参加している場合に発生します。\"\n\n#: ../../api.rst:974\nmsgid \"If this occurs increase the :class:`max_messages <Client>` parameter or use the :func:`on_raw_message_delete` event instead.\"\nmsgstr \"発生する場合は :class:`max_messages <Client>` パラメータの値を増加させるか :func:`on_raw_message_delete` イベントを使用してください。\"\n\n#: ../../api.rst:979\nmsgid \"The deleted message.\"\nmsgstr \"削除されたメッセージ。\"\n\n#: ../../api.rst:984\nmsgid \"Called when messages are bulk deleted. If none of the messages deleted are found in the internal message cache, then this event will not be called. If individual messages were not found in the internal message cache, this event will still be called, but the messages not found will not be included in the messages list. Messages might not be in cache if the message is too old or the client is participating in high traffic guilds.\"\nmsgstr \"メッセージが一括削除されたときに呼び出されます。メッセージが内部のメッセージキャッシュに見つからない場合、このイベントは呼び出されません。個々のメッセージが見つからない場合でも、このイベントは呼び出されますが、見つからなかったメッセージはメッセージのリストに含まれません。これはメッセージが古すぎるか、クライアントが通信の多いギルドに参加している場合に発生します。\"\n\n#: ../../api.rst:991\nmsgid \"If this occurs increase the :class:`max_messages <Client>` parameter or use the :func:`on_raw_bulk_message_delete` event instead.\"\nmsgstr \"発生する場合は :class:`max_messages <Client>` パラメータの値を増加させるか :func:`on_raw_bulk_message_delete` イベントを使用してください。\"\n\n#: ../../api.rst:996\nmsgid \"The messages that have been deleted.\"\nmsgstr \"削除されたメッセージのリスト。\"\n\n#: ../../api.rst:1001\nmsgid \"Called when a message is edited. Unlike :func:`on_message_edit`, this is called regardless of the state of the internal message cache.\"\nmsgstr \"メッセージが編集されたときに呼び出されます。 :func:`on_message_edit` とは異なり、これは内部のメッセージキャッシュの状態に関係なく呼び出されます。\"\n\n#: ../../api.rst:1004\nmsgid \"If the message is found in the message cache, it can be accessed via :attr:`RawMessageUpdateEvent.cached_message`. The cached message represents the message before it has been edited. For example, if the content of a message is modified and triggers the :func:`on_raw_message_edit` coroutine, the :attr:`RawMessageUpdateEvent.cached_message` will return a :class:`Message` object that represents the message before the content was modified.\"\nmsgstr \"メッセージがメッセージキャッシュに存在した場合、 :attr:`RawMessageUpdateEvent.cached_message` を介してそのメッセージにアクセスすることができます。キャッシュされていたメッセージは編集前のメッセージです。たとえば、メッセージの内容が編集され、 :func:`on_raw_message_edit` が発火された場合、 :attr:`RawMessageUpdateEvent.cached_message` は内容が編集される前の情報を持つ :class:`Message` オブジェクトを返します。\"\n\n#: ../../api.rst:1010\nmsgid \"Due to the inherently raw nature of this event, the data parameter coincides with the raw data given by the :ddocs:`gateway <topics/gateway#message-update>`.\"\nmsgstr \"このイベントの性質は、本質的に生表現のため、データのパラメータは :ddocs:`ゲートウェイ <topics/gateway#message-update>` によって与えられた生データと一致します。\"\n\n#: ../../api.rst:1013\nmsgid \"Since the data payload can be partial, care must be taken when accessing stuff in the dictionary. One example of a common case of partial data is when the ``'content'`` key is inaccessible. This denotes an \\\"embed\\\" only edit, which is an edit in which only the embeds are updated by the Discord embed server.\"\nmsgstr \"データのペイロードが部分的であるため、データにアクセスするときは気をつけてください。部分的なデータの主な場合のひとつは、``'content'`` にアクセスできない場合です。Discordの埋め込みサーバーによって、埋め込みが更新される、\\\"埋め込み\\\"しか変わっていない編集がそうです。\"\n\n#: ../../api.rst:1026\nmsgid \"Called when a message is deleted. Unlike :func:`on_message_delete`, this is called regardless of the message being in the internal message cache or not.\"\nmsgstr \"メッセージが削除されたときに呼び出されます。 :func:`on_message_delete` とは異なり、削除されたメッセージが内部キャッシュに存在するか否かにかかわらず呼び出されます。\"\n\n#: ../../api.rst:1029\nmsgid \"If the message is found in the message cache, it can be accessed via :attr:`RawMessageDeleteEvent.cached_message`\"\nmsgstr \"メッセージがメッセージキャッシュ内に見つかった場合、 :attr:`RawMessageDeleteEvent.cached_message` を介してアクセスすることができます。\"\n\n#: ../../api.rst:1039\nmsgid \"Called when a bulk delete is triggered. Unlike :func:`on_bulk_message_delete`, this is called regardless of the messages being in the internal message cache or not.\"\nmsgstr \"メッセージが一括削除されたときに呼び出されます。 :func:`on_bulk_message_delete` とは異なり、削除されたメッセージが内部キャッシュに存在するか否かにかかわらず呼び出されます。\"\n\n#: ../../api.rst:1042\nmsgid \"If the messages are found in the message cache, they can be accessed via :attr:`RawBulkMessageDeleteEvent.cached_messages`\"\nmsgstr \"メッセージがメッセージキャッシュ内に見つかった場合、 :attr:`RawBulkMessageDeleteEvent.cached_messages` を介してアクセスすることができます。\"\n\n#: ../../api.rst:1051\nmsgid \"Reactions\"\nmsgstr \"Reactions\"\n\n#: ../../api.rst:1055\nmsgid \"Called when a message has a reaction added to it. Similar to :func:`on_message_edit`, if the message is not found in the internal message cache, then this event will not be called. Consider using :func:`on_raw_reaction_add` instead.\"\nmsgstr \"メッセージにリアクションが追加されたときに呼び出されます。 :func:`on_message_edit` と同様に内部メッセージキャッシュにメッセージが見つからない場合は、このイベントは呼び出されません。代わりに :func:`on_raw_reaction_add` の利用を検討してください。\"\n\n#: ../../api.rst:1061\nmsgid \"To get the :class:`Message` being reacted, access it via :attr:`Reaction.message`.\"\nmsgstr \"リアクションの付いた :class:`Message` を取得するには、 :attr:`Reaction.message` を使ってください。\"\n\n#: ../../api.rst:1063\n#: ../../api.rst:1118\n#: ../../api.rst:1131\n#: ../../api.rst:1144\n#: ../../api.rst:1154\nmsgid \"This requires :attr:`Intents.reactions` to be enabled.\"\nmsgstr \":attr:`Intents.reactions` を有効にする必要があります。\"\n\n#: ../../api.rst:1067\nmsgid \"This doesn't require :attr:`Intents.members` within a guild context, but due to Discord not providing updated user information in a direct message it's required for direct messages to receive this event. Consider using :func:`on_raw_reaction_add` if you need this and do not otherwise want to enable the members intent.\"\nmsgstr \"ギルド内では :attr:`Intents.members` は有効にしなくてもよいですが、DiscordがDM内では更新されたユーザーの情報を提供しないため、DMではこのインテントが必要です。 このイベントが必要でメンバーインテントを有効化したくない場合は :func:`on_raw_reaction_add` の使用を検討してください。\"\n\n#: ../../api.rst:1075\nmsgid \"This event does not have a way of differentiating whether a reaction is a burst reaction (also known as \\\"super reaction\\\") or not. If you need this, consider using :func:`on_raw_reaction_add` instead.\"\nmsgstr \"\"\n\n#: ../../api.rst:1079\n#: ../../api.rst:1107\nmsgid \"The current state of the reaction.\"\nmsgstr \"リアクションの現在の状態。\"\n\n#: ../../api.rst:1081\nmsgid \"The user who added the reaction.\"\nmsgstr \"リアクションを追加したユーザー。\"\n\n#: ../../api.rst:1086\nmsgid \"Called when a message has a reaction removed from it. Similar to on_message_edit, if the message is not found in the internal message cache, then this event will not be called.\"\nmsgstr \"メッセージのリアクションが取り除かれたときに呼び出されます。on_message_editのように、内部のメッセージキャッシュにメッセージがないときには、このイベントは呼び出されません。\"\n\n#: ../../api.rst:1092\nmsgid \"To get the message being reacted, access it via :attr:`Reaction.message`.\"\nmsgstr \"リアクションの付いたメッセージを取得するには、 :attr:`Reaction.message` を使ってください。\"\n\n#: ../../api.rst:1094\nmsgid \"This requires both :attr:`Intents.reactions` and :attr:`Intents.members` to be enabled.\"\nmsgstr \"これを使用するには :attr:`Intents.reactions` と :attr:`Intents.members` の両方を有効にしないといけません。\"\n\n#: ../../api.rst:1098\nmsgid \"Consider using :func:`on_raw_reaction_remove` if you need this and do not want to enable the members intent.\"\nmsgstr \"このイベントが必要でメンバーインテントを有効化したくない場合は :func:`on_raw_reaction_remove` の使用を検討してください。\"\n\n#: ../../api.rst:1103\nmsgid \"This event does not have a way of differentiating whether a reaction is a burst reaction (also known as \\\"super reaction\\\") or not. If you need this, consider using :func:`on_raw_reaction_remove` instead.\"\nmsgstr \"\"\n\n#: ../../api.rst:1109\nmsgid \"The user whose reaction was removed.\"\nmsgstr \"リアクションが除去されたユーザー。\"\n\n#: ../../api.rst:1114\nmsgid \"Called when a message has all its reactions removed from it. Similar to :func:`on_message_edit`, if the message is not found in the internal message cache, then this event will not be called. Consider using :func:`on_raw_reaction_clear` instead.\"\nmsgstr \"メッセージからすべてのリアクションが削除されたときに呼び出されます。 :func:`on_message_edit` と同様に内部メッセージキャッシュにメッセージが見つからない場合は、このイベントは呼び出されません。代わりに :func:`on_raw_reaction_clear` の利用を検討してください。\"\n\n#: ../../api.rst:1120\nmsgid \"The message that had its reactions cleared.\"\nmsgstr \"リアクションが削除されたメッセージ。\"\n\n#: ../../api.rst:1122\nmsgid \"The reactions that were removed.\"\nmsgstr \"除去されたリアクション。\"\n\n#: ../../api.rst:1127\nmsgid \"Called when a message has a specific reaction removed from it. Similar to :func:`on_message_edit`, if the message is not found in the internal message cache, then this event will not be called. Consider using :func:`on_raw_reaction_clear_emoji` instead.\"\nmsgstr \"メッセージから特定の絵文字のリアクションが除去されたときに呼び出されます。 :func:`on_message_edit` と同様に内部メッセージキャッシュにメッセージが見つからない場合は、このイベントは呼び出されません。代わりに :func:`on_raw_reaction_clear_emoji` の利用を検討してください。\"\n\n#: ../../api.rst:1135\nmsgid \"The reaction that got cleared.\"\nmsgstr \"除去されたリアクション。\"\n\n#: ../../api.rst:1141\nmsgid \"Called when a message has a reaction added. Unlike :func:`on_reaction_add`, this is called regardless of the state of the internal message cache.\"\nmsgstr \"メッセージにリアクションが追加されたときに呼び出されます。 :func:`on_reaction_add` とは異なり、これは内部のメッセージキャッシュの状態に関係なく呼び出されます。\"\n\n#: ../../api.rst:1151\nmsgid \"Called when a message has a reaction removed. Unlike :func:`on_reaction_remove`, this is called regardless of the state of the internal message cache.\"\nmsgstr \"メッセージからリアクションが削除されたときに呼び出されます。 :func:`on_reaction_remove` とは異なり、これは内部メッセージキャッシュの状態に関係なく呼び出されます。\"\n\n#: ../../api.rst:1161\nmsgid \"Called when a message has all its reactions removed. Unlike :func:`on_reaction_clear`, this is called regardless of the state of the internal message cache.\"\nmsgstr \"メッセージからリアクションがすべて削除されたときに呼び出されます。 :func:`on_reaction_clear` とは異なり、これは内部メッセージキャッシュの状態に関係なく呼び出されます。\"\n\n#: ../../api.rst:1171\nmsgid \"Called when a message has a specific reaction removed from it. Unlike :func:`on_reaction_clear_emoji` this is called regardless of the state of the internal message cache.\"\nmsgstr \"メッセージから特定の絵文字のリアクションがすべて除去されたときに呼び出されます。 :func:`on_reaction_clear_emoji` とは異なり、これは内部メッセージキャッシュの状態に関係なく呼び出されます。\"\n\n#: ../../api.rst:1183\nmsgid \"Roles\"\nmsgstr \"Roles\"\n\n#: ../../api.rst:1188\nmsgid \"Called when a :class:`Guild` creates or deletes a new :class:`Role`.\"\nmsgstr \":class:`Guild` で :class:`Role` が新しく作成されたか、削除されたときに呼び出されます。\"\n\n#: ../../api.rst:1190\nmsgid \"To get the guild it belongs to, use :attr:`Role.guild`.\"\nmsgstr \"ギルドを取得するには :attr:`Role.guild` を使用してください。\"\n\n#: ../../api.rst:1194\nmsgid \"The role that was created or deleted.\"\nmsgstr \"作成、または削除されたロール。\"\n\n#: ../../api.rst:1199\nmsgid \"Called when a :class:`Role` is changed guild-wide.\"\nmsgstr \":class:`Role` がギルド全体で変更されたときに呼び出されます。\"\n\n#: ../../api.rst:1203\nmsgid \"The updated role's old info.\"\nmsgstr \"更新されたロールの更新前情報。\"\n\n#: ../../api.rst:1205\nmsgid \"The updated role's updated info.\"\nmsgstr \"更新されたロールの更新後情報。\"\n\n#: ../../api.rst:1210\nmsgid \"Scheduled Events\"\nmsgstr \"Scheduled Events\"\n\n#: ../../api.rst:1215\nmsgid \"Called when a :class:`ScheduledEvent` is created or deleted.\"\nmsgstr \":class:`ScheduledEvent` が作成または削除されたときに呼び出されます。\"\n\n#: ../../api.rst:1217\n#: ../../api.rst:1228\n#: ../../api.rst:1250\nmsgid \"This requires :attr:`Intents.guild_scheduled_events` to be enabled.\"\nmsgstr \":attr:`Intents.guild_scheduled_events` を有効にする必要があります。\"\n\n#: ../../api.rst:1221\nmsgid \"The scheduled event that was created or deleted.\"\nmsgstr \"作成、または削除されたスケジュールイベント。\"\n\n#: ../../api.rst:1226\nmsgid \"Called when a :class:`ScheduledEvent` is updated.\"\nmsgstr \":class:`ScheduledEvent` が変更されたときに呼び出されます。\"\n\n#: ../../api.rst:1230\n#: ../../api.rst:1277\n#: ../../api.rst:1429\nmsgid \"The following, but not limited to, examples illustrate when this event is called:\"\nmsgstr \"これらの場合に限りませんが、例を挙げると、以下の場合に呼び出されます:\"\n\n#: ../../api.rst:1232\nmsgid \"The scheduled start/end times are changed.\"\nmsgstr \"スケジュールされた開始・終了時刻が変更された。\"\n\n#: ../../api.rst:1233\nmsgid \"The channel is changed.\"\nmsgstr \"チャンネルが変更された時。\"\n\n#: ../../api.rst:1234\nmsgid \"The description is changed.\"\nmsgstr \"説明が変更された時。\"\n\n#: ../../api.rst:1235\nmsgid \"The status is changed.\"\nmsgstr \"ステータスが変更された時。\"\n\n#: ../../api.rst:1236\nmsgid \"The image is changed.\"\nmsgstr \"画像が変更された時。\"\n\n#: ../../api.rst:1240\nmsgid \"The scheduled event before the update.\"\nmsgstr \"変更前のスケジュールイベント。\"\n\n#: ../../api.rst:1242\nmsgid \"The scheduled event after the update.\"\nmsgstr \"変更後のスケジュールイベント。\"\n\n#: ../../api.rst:1248\nmsgid \"Called when a user is added or removed from a :class:`ScheduledEvent`.\"\nmsgstr \":class:`ScheduledEvent` からユーザーが追加または削除されたときに呼び出されます。\"\n\n#: ../../api.rst:1254\nmsgid \"The scheduled event that the user was added or removed from.\"\nmsgstr \"ユーザーが追加または削除されたスケジュールイベント。\"\n\n#: ../../api.rst:1256\nmsgid \"The user that was added or removed.\"\nmsgstr \"追加・削除されたユーザー。\"\n\n#: ../../api.rst:1261\nmsgid \"Stages\"\nmsgstr \"Stages\"\n\n#: ../../api.rst:1266\nmsgid \"Called when a :class:`StageInstance` is created or deleted for a :class:`StageChannel`.\"\nmsgstr \":class:`StageChannel` の :class:`StageInstance` が作成または削除されたときに呼び出されます。\"\n\n#: ../../api.rst:1270\nmsgid \"The stage instance that was created or deleted.\"\nmsgstr \"作成、または削除されたステージインスタンス。\"\n\n#: ../../api.rst:1275\nmsgid \"Called when a :class:`StageInstance` is updated.\"\nmsgstr \":class:`StageInstance` が変更されたときに呼び出されます。\"\n\n#: ../../api.rst:1279\nmsgid \"The topic is changed.\"\nmsgstr \"トピックが変更された時。\"\n\n#: ../../api.rst:1280\nmsgid \"The privacy level is changed.\"\nmsgstr \"プライバシーレベルが変更された時。\"\n\n#: ../../api.rst:1284\nmsgid \"The stage instance before the update.\"\nmsgstr \"更新前のステージインスタンス。\"\n\n#: ../../api.rst:1286\nmsgid \"The stage instance after the update.\"\nmsgstr \"更新後のステージインスタンス。\"\n\n#: ../../api.rst:1290\nmsgid \"Threads\"\nmsgstr \"Threads\"\n\n#: ../../api.rst:1294\nmsgid \"Called whenever a thread is created.\"\nmsgstr \"スレッドが作成されたときに発生します。\"\n\n#: ../../api.rst:1296\n#: ../../api.rst:1309\n#: ../../api.rst:1339\n#: ../../api.rst:1363\nmsgid \"Note that you can get the guild from :attr:`Thread.guild`.\"\nmsgstr \"ギルドは :attr:`Thread.guild` から取得できます。\"\n\n#: ../../api.rst:1302\nmsgid \"The thread that was created.\"\nmsgstr \"作成されたスレッド。\"\n\n#: ../../api.rst:1307\nmsgid \"Called whenever a thread is joined.\"\nmsgstr \"スレッドに参加したときに呼び出されます。\"\n\n#: ../../api.rst:1315\nmsgid \"The thread that got joined.\"\nmsgstr \"参加したスレッド。\"\n\n#: ../../api.rst:1320\nmsgid \"Called whenever a thread is updated. If the thread could not be found in the internal cache this event will not be called. Threads will not be in the cache if they are archived.\"\nmsgstr \"スレッドが更新されたときに呼び出されます。スレッドが内部キャッシュに見つからなかった場合、このイベントは呼び出されません。 スレッドがアーカイブされている場合、キャッシュには含まれません。\"\n\n#: ../../api.rst:1324\nmsgid \"If you need this information use :func:`on_raw_thread_update` instead.\"\nmsgstr \"この情報が必要な場合は、代わりに :func:`on_raw_thread_update` を使用してください。\"\n\n#: ../../api.rst:1330\nmsgid \"The updated thread's old info.\"\nmsgstr \"古いスレッドの情報。\"\n\n#: ../../api.rst:1332\nmsgid \"The updated thread's new info.\"\nmsgstr \"新しいスレッドの情報。\"\n\n#: ../../api.rst:1337\nmsgid \"Called whenever a thread is removed. This is different from a thread being deleted.\"\nmsgstr \"スレッドが除去されたときに呼び出されます。これはスレッドの削除とは異なります。\"\n\n#: ../../api.rst:1345\nmsgid \"Due to technical limitations, this event might not be called as soon as one expects. Since the library tracks thread membership locally, the API only sends updated thread membership status upon being synced by joining a thread.\"\nmsgstr \"技術的な制約のためこのイベントは期待通りの早さで呼び出されない場合があります。ライブラリーがスレッドの参加をローカルで追跡するため、APIは更新されたスレッドの参加状態をスレッドの参加時にのみ同期します。\"\n\n#: ../../api.rst:1352\nmsgid \"The thread that got removed.\"\nmsgstr \"削除されたスレッド。\"\n\n#: ../../api.rst:1357\nmsgid \"Called whenever a thread is deleted. If the thread could not be found in the internal cache this event will not be called. Threads will not be in the cache if they are archived.\"\nmsgstr \"スレッドが削除されたときに呼び出されます。スレッドが内部キャッシュに見つからなかった場合、このイベントは呼び出されません。 スレッドがアーカイブされている場合、キャッシュには含まれません。\"\n\n#: ../../api.rst:1361\nmsgid \"If you need this information use :func:`on_raw_thread_delete` instead.\"\nmsgstr \"この情報が必要な場合は、代わりに :func:`on_raw_thread_delete` を使用してください。\"\n\n#: ../../api.rst:1369\nmsgid \"The thread that got deleted.\"\nmsgstr \"削除されたスレッド。\"\n\n#: ../../api.rst:1374\nmsgid \"Called whenever a thread is updated. Unlike :func:`on_thread_update` this is called regardless of the thread being in the internal thread cache or not.\"\nmsgstr \"スレッドが更新されたときに呼び出されます。 :func:`on_thread_update` とは異なり、更新されたスレッドが内部キャッシュに存在するか否かにかかわらず呼び出されます。\"\n\n#: ../../api.rst:1386\nmsgid \"Called whenever a thread is deleted. Unlike :func:`on_thread_delete` this is called regardless of the thread being in the internal thread cache or not.\"\nmsgstr \"スレッドが削除されたときに呼び出されます。 :func:`on_thread_delete` とは異なり、削除されたスレッドが内部キャッシュに存在するか否かにかかわらず呼び出されます。\"\n\n#: ../../api.rst:1399\nmsgid \"Called when a :class:`ThreadMember` leaves or joins a :class:`Thread`.\"\nmsgstr \":class:`ThreadMember` が :class:`Thread` に参加したり退出したりしたときに呼び出されます。\"\n\n#: ../../api.rst:1401\nmsgid \"You can get the thread a member belongs in by accessing :attr:`ThreadMember.thread`.\"\nmsgstr \"メンバーが所属するスレッドは :attr:`ThreadMember.thread` から取得できます。\"\n\n#: ../../api.rst:1407\nmsgid \"The member who joined or left.\"\nmsgstr \"参加、または脱退したメンバー。\"\n\n#: ../../api.rst:1412\nmsgid \"Called when a :class:`ThreadMember` leaves a :class:`Thread`. Unlike :func:`on_thread_member_remove` this is called regardless of the member being in the internal thread's members cache or not.\"\nmsgstr \":class:`ThreadMember` が :class:`Thread` を退出したときに呼び出されます。 :func:`on_thread_member_remove` とは異なり、メンバーが内部スレッドメンバーキャッシュに存在するかどうかに関係なく呼び出されます。\"\n\n#: ../../api.rst:1423\nmsgid \"Voice\"\nmsgstr \"Voice\"\n\n#: ../../api.rst:1427\nmsgid \"Called when a :class:`Member` changes their :class:`VoiceState`.\"\nmsgstr \":class:`Member` が :class:`VoiceState` を変更したとき呼び出されます。\"\n\n#: ../../api.rst:1431\nmsgid \"A member joins a voice or stage channel.\"\nmsgstr \"メンバーがボイスチャンネルやステージチャンネルに参加したとき。\"\n\n#: ../../api.rst:1432\nmsgid \"A member leaves a voice or stage channel.\"\nmsgstr \"メンバーがボイスチャンネルやステージチャンネルから退出したとき。\"\n\n#: ../../api.rst:1433\nmsgid \"A member is muted or deafened by their own accord.\"\nmsgstr \"メンバーが自身でマイクやスピーカーをミュートしたとき。\"\n\n#: ../../api.rst:1434\nmsgid \"A member is muted or deafened by a guild administrator.\"\nmsgstr \"メンバーがギルドの管理者によってマイクやスピーカーをミュートされたとき。\"\n\n#: ../../api.rst:1436\nmsgid \"This requires :attr:`Intents.voice_states` to be enabled.\"\nmsgstr \":attr:`Intents.voice_states` を有効にする必要があります。\"\n\n#: ../../api.rst:1438\nmsgid \"The member whose voice states changed.\"\nmsgstr \"ボイスの状態が変わった `Member` 。\"\n\n#: ../../api.rst:1440\nmsgid \"The voice state prior to the changes.\"\nmsgstr \"更新前のボイス状態。\"\n\n#: ../../api.rst:1442\nmsgid \"The voice state after the changes.\"\nmsgstr \"更新後のボイス状態。\"\n\n#: ../../api.rst:1448\nmsgid \"Utility Functions\"\nmsgstr \"ユーティリティ関数\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.find:1\nmsgid \"A helper to return the first element found in the sequence that meets the predicate. For example: ::\"\nmsgstr \"与えられた関数を満たす最初の要素を返すヘルパー。例: ::\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.find:6\nmsgid \"would find the first :class:`~discord.Member` whose name is 'Mighty' and return it. If an entry is not found, then ``None`` is returned.\"\nmsgstr \"は、名前が'Mighty'である最初に見つかった :class:`~discord.Member` を返します。見つからない場合は ``None`` を返します。\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.find:9\nmsgid \"This is different from :func:`py:filter` due to the fact it stops the moment it finds a valid entry.\"\nmsgstr \"これは、適切な値を見つけると止まる点で、 :func:`py:filter` と異なります。\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.find:14\nmsgid \"Both parameters are now positional-only.\"\nmsgstr \"両方の引数は位置限定引数になりました。\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.find:18\n#: ../../../discord/utils.py:docstring of discord.utils.get:21\nmsgid \"The ``iterable`` parameter supports :term:`asynchronous iterable`\\\\s.\"\nmsgstr \"``iterable`` パラメータが :term:`asynchronous iterable` をサポートするようになりました。\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.find:20\nmsgid \"A function that returns a boolean-like result.\"\nmsgstr \"真偽値を返す関数。\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.find:21\n#: ../../../discord/utils.py:docstring of discord.utils.get:49\nmsgid \"The iterable to search through. Using a :class:`collections.abc.AsyncIterable`, makes this function return a :term:`coroutine`.\"\nmsgstr \"検索する反復可能オブジェクト。 :class:`collections.abc.AsyncIterable` を使用する場合は、この関数は :term:`coroutine` を返します。\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.get:1\nmsgid \"A helper that returns the first element in the iterable that meets all the traits passed in ``attrs``. This is an alternative for :func:`~discord.utils.find`.\"\nmsgstr \"``attrs`` に渡されたすべての条件を満たす最初の要素を返すヘルパー。 :func:`~discord.utils.find` の代替案です。\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.get:5\nmsgid \"When multiple attributes are specified, they are checked using logical AND, not logical OR. Meaning they have to meet every attribute passed in and not one of them.\"\nmsgstr \"複数の条件が指定されている場合、またはではなくかつでチェックされます。つまり、どれかではなく、すべての条件を満たさないといけません。\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.get:9\nmsgid \"To have a nested attribute search (i.e. search by ``x.y``) then pass in ``x__y`` as the keyword argument.\"\nmsgstr \"ネストされている属性で検索するとき (例: ``x.y`` で検索) は、キーワード引数に ``x__y`` を渡してください。\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.get:12\nmsgid \"If nothing is found that matches the attributes passed, then ``None`` is returned.\"\nmsgstr \"与えられた属性にマッチする項目がない場合、 ``None`` を返します。\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.get:17\nmsgid \"The ``iterable`` parameter is now positional-only.\"\nmsgstr \"``iterable`` 引数は位置限定引数になりました。\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.get:25\nmsgid \"Basic usage:\"\nmsgstr \"基本的な使用法:\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.get:31\nmsgid \"Multiple attribute matching:\"\nmsgstr \"複数の属性のマッチ:\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.get:37\nmsgid \"Nested attribute matching:\"\nmsgstr \"ネストされた属性のマッチ:\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.get:43\nmsgid \"Async iterables:\"\nmsgstr \"非同期イテラブル：\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.get:52\nmsgid \"Keyword arguments that denote attributes to search with.\"\nmsgstr \"検索用の属性を表すキーワード引数。\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.setup_logging:1\nmsgid \"A helper function to setup logging.\"\nmsgstr \"logging をセットアップするためのヘルパー関数。\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.setup_logging:3\nmsgid \"This is superficially similar to :func:`logging.basicConfig` but uses different defaults and a colour formatter if the stream can display colour.\"\nmsgstr \"これは見た目は :func:`logging.basicConfig` に似ていますが、異なる既定値と、ストリームが色を表示できる場合は、カラーフォーマッタを使用します。\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.setup_logging:7\nmsgid \"This is used by the :class:`~discord.Client` to set up logging if ``log_handler`` is not ``None``.\"\nmsgstr \"これは :class:`~discord.Client` にて ``log_handler`` が ``None`` でない場合に、logging を設定するため使用されます。\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.setup_logging:12\nmsgid \"The log handler to use for the library's logger.  The default log handler if not provided is :class:`logging.StreamHandler`.\"\nmsgstr \"ライブラリのロガーに使用するログハンドラ。指定されていない場合のデフォルトのログハンドラは :class:`logging.StreamHandler` です。\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.setup_logging:12\nmsgid \"The log handler to use for the library's logger.\"\nmsgstr \"ライブラリのロガーに使用するログハンドラ。\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.setup_logging:16\nmsgid \"The formatter to use with the given log handler. If not provided then it defaults to a colour based logging formatter (if available). If colour is not available then a simple logging formatter is provided.\"\nmsgstr \"指定されたログハンドラで使用するフォーマッタ。指定されていない場合は、既定で色ベースのログフォーマッタが使用されます (使用可能な場合)。 色が使用できない場合は、単純な logging フォーマッタが使用されます。\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.setup_logging:20\nmsgid \"The default log level for the library's logger. Defaults to ``logging.INFO``.\"\nmsgstr \"ライブラリのロガーのデフォルトのログレベル。デフォルトは ``logging.INFO`` です。\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.setup_logging:22\nmsgid \"Whether to set up the root logger rather than the library logger. Unlike the default for :class:`~discord.Client`, this defaults to ``True``.\"\nmsgstr \"ライブラリロガーではなくルートロガーを設定するかどうか。 :class:`~discord.Client` のデフォルトとは異なり、このデフォルトは ``True`` です。\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.maybe_coroutine:3\nmsgid \"A helper function that will await the result of a function if it's a coroutine or return the result if it's not.\"\nmsgstr \"コルーチンの場合は関数の結果を待ち、そうでない場合は結果を返すヘルパー関数。\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.maybe_coroutine:6\nmsgid \"This is useful for functions that may or may not be coroutines.\"\nmsgstr \"これは、コルーチンかもしれない関数と一緒に使用すると役立ちます。\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.maybe_coroutine:10\nmsgid \"The function or coroutine to call.\"\nmsgstr \"呼び出す関数またはコルーチン。\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.maybe_coroutine:12\nmsgid \"The arguments to pass to the function.\"\nmsgstr \"関数に渡す引数。\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.maybe_coroutine:13\nmsgid \"The keyword arguments to pass to the function.\"\nmsgstr \"関数に渡すキーワード引数。\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.maybe_coroutine:15\nmsgid \"The result of the function or coroutine.\"\nmsgstr \"関数またはコルーチンの結果。\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.snowflake_time:1\nmsgid \"Returns the creation time of the given snowflake.\"\nmsgstr \"与えられたスノーフレークの生成時刻を返します。\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.snowflake_time:3\nmsgid \"The ``id`` parameter is now positional-only.\"\nmsgstr \"``id`` 引数は位置限定引数になりました。\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.snowflake_time:6\nmsgid \"The snowflake ID.\"\nmsgstr \"スノーフレークID。\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.snowflake_time:9\nmsgid \"An aware datetime in UTC representing the creation time of the snowflake.\"\nmsgstr \"スノーフレークの作成時間を表すUTC aware datetime。\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.time_snowflake:1\nmsgid \"Returns a numeric snowflake pretending to be created at the given date.\"\nmsgstr \"指定された時刻に作成されるスノーフレークの数値を返します。\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.time_snowflake:3\nmsgid \"When using as the lower end of a range, use ``time_snowflake(dt, high=False) - 1`` to be inclusive, ``high=True`` to be exclusive.\"\nmsgstr \"範囲の下端として使用する場合は、 ``time_snowflake(dt, high=False) - 1`` を使用するとこの時刻を含み、 ``high=True`` を使用した場合は含まなくなります。\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.time_snowflake:6\nmsgid \"When using as the higher end of a range, use ``time_snowflake(dt, high=True) + 1`` to be inclusive, ``high=False`` to be exclusive.\"\nmsgstr \"範囲の上限として使用する場合は、 ``time_snowflake(dt, high=True) + 1`` を使用するとこの時刻を含み、 ``high=False`` を使用した場合は含まなくなります。\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.time_snowflake:9\nmsgid \"The ``high`` parameter is now keyword-only and the ``dt`` parameter is now positional-only.\"\nmsgstr \"``high`` パラメータがキーワード専用引数になり、 ``dt`` パラメータは位置限定引数になりました。\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.time_snowflake:13\nmsgid \"A datetime object to convert to a snowflake. If naive, the timezone is assumed to be local time.\"\nmsgstr \"スノーフレークに変換するdatetimeオブジェクト。日付が「naive」である場合、これは地域時間であるとみなされます。\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.time_snowflake:16\nmsgid \"Whether or not to set the lower 22 bit to high or low.\"\nmsgstr \"下位22ビットをセットするか。\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.time_snowflake:19\nmsgid \"The snowflake representing the time given.\"\nmsgstr \"与えられた時刻を表すスノーフレーク。\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.oauth_url:1\nmsgid \"A helper function that returns the OAuth2 URL for inviting the bot into guilds.\"\nmsgstr \"ボットをギルドに招待するOAuth2 URLを返すヘルパー関数。\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.oauth_url:6\nmsgid \"``permissions``, ``guild``, ``redirect_uri``, ``scopes`` and ``state`` parameters are now keyword-only.\"\nmsgstr \"``permissions`` 、 ``guild`` 、 ``redirect_uri`` 、 ``scopes`` 、 ``state`` 引数はキーワード限定引数になりました。\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.oauth_url:9\nmsgid \"The client ID for your bot.\"\nmsgstr \"ボットのクライアントID。\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.oauth_url:11\nmsgid \"The permissions you're requesting. If not given then you won't be requesting any permissions.\"\nmsgstr \"要求する権限。もし与えられていない場合、権限を要求しません。\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.oauth_url:14\nmsgid \"The guild to pre-select in the authorization screen, if available.\"\nmsgstr \"利用できる場合は、認証画面であらかじめ選択されるギルド。\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.oauth_url:16\nmsgid \"An optional valid redirect URI.\"\nmsgstr \"任意の有効なリダイレクトURI。\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.oauth_url:18\nmsgid \"An optional valid list of scopes. Defaults to ``('bot', 'applications.commands')``.\"\nmsgstr \"省略可能な有効なスコープのリスト。既定値は ``('bot', 'applications.commands')`` 。\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.oauth_url:22\nmsgid \"Whether to disallow the user from changing the guild dropdown.\"\nmsgstr \"ユーザーがギルドのドロップダウンを変更できないようにするか。\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.oauth_url:26\nmsgid \"The state to return after the authorization.\"\nmsgstr \"認可後に返すステート。\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.oauth_url:31\nmsgid \"The OAuth2 URL for inviting the bot into guilds.\"\nmsgstr \"Botをギルドに招待するためのOAuth2 URL。\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.remove_markdown:1\nmsgid \"A helper function that removes markdown characters.\"\nmsgstr \"マークダウン文字を除去するヘルパー関数。\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.remove_markdown:6\nmsgid \"This function is not markdown aware and may remove meaning from the original text. For example, if the input contains ``10 * 5`` then it will be converted into ``10  5``.\"\nmsgstr \"この関数はマークダウンを解釈するものでないため、元のテキストから意味のある文字を除去する場合があります。たとえば、入力に ``10 * 5`` が含まれる場合、 ``10 5`` に変換されます。\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.remove_markdown:9\nmsgid \"The text to remove markdown from.\"\nmsgstr \"マークダウンを除去するテキスト。\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.remove_markdown:11\nmsgid \"Whether to leave links alone when removing markdown. For example, if a URL in the text contains characters such as ``_`` then it will be left alone. Defaults to ``True``.\"\nmsgstr \"マークダウンを除去するときにリンクを残すかどうか。たとえば、テキスト中のURLが ``_`` のような文字を含む場合、これは残されます。デフォルトは ``True`` です。\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.remove_markdown:16\nmsgid \"The text with the markdown special characters removed.\"\nmsgstr \"マークダウンの特殊文字を除去したテキスト。\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.escape_markdown:1\nmsgid \"A helper function that escapes Discord's markdown.\"\nmsgstr \"Discordのマークダウンをエスケープするヘルパー関数。\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.escape_markdown:3\nmsgid \"The text to escape markdown from.\"\nmsgstr \"マークダウンをエスケープするテキスト。\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.escape_markdown:5\nmsgid \"Whether to escape the markdown characters as needed. This means that it does not escape extraneous characters if it's not necessary, e.g. ``**hello**`` is escaped into ``\\\\*\\\\*hello**`` instead of ``\\\\*\\\\*hello\\\\*\\\\*``. Note however that this can open you up to some clever syntax abuse. Defaults to ``False``.\"\nmsgstr \"必要に応じてマークダウンをエスケープするかどうか。必要でなければ無関係な文字をエスケープしません。 ``**hello**`` は ``\\\\*\\\\*hello\\\\*\\\\*`` ではなく ``\\\\*\\\\*hello**`` にエスケープされます。ただし、これによって巧妙な構文の乱用が発生する可能性があります。デフォルトは ``False`` です。\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.escape_markdown:11\nmsgid \"Whether to leave links alone when escaping markdown. For example, if a URL in the text contains characters such as ``_`` then it will be left alone. This option is not supported with ``as_needed``. Defaults to ``True``.\"\nmsgstr \"マークダウンをエスケープするときにリンクを残すかどうか。たとえば、テキスト中のURLが ``_`` のような文字を含む場合、これは残されます。これは ``as_needed`` と併用できません。デフォルトは ``True`` です。\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.escape_markdown:17\nmsgid \"The text with the markdown special characters escaped with a slash.\"\nmsgstr \"マークダウンの特殊文字をスラッシュでエスケープしたテキスト。\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.escape_mentions:1\nmsgid \"A helper function that escapes everyone, here, role, and user mentions.\"\nmsgstr \"everyone、here、ロールとユーザーのメンションをエスケープするヘルパー関数。\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.escape_mentions:5\nmsgid \"This does not include channel mentions.\"\nmsgstr \"チャンネルのメンションはエスケープしません。\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.escape_mentions:9\nmsgid \"For more granular control over what mentions should be escaped within messages, refer to the :class:`~discord.AllowedMentions` class.\"\nmsgstr \"メッセージ内でエスケープされるべきメンションを詳細に制御するには、 :class:`~discord.AllowedMentions` クラスを参照してください。\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.escape_mentions:13\nmsgid \"The text to escape mentions from.\"\nmsgstr \"メンションをエスケープするテキスト。\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.escape_mentions:16\nmsgid \"The text with the mentions removed.\"\nmsgstr \"メンションが削除されたテキスト。\"\n\n#: ../../api.rst:1472\nmsgid \"A data class which represents a resolved invite returned from :func:`discord.utils.resolve_invite`.\"\nmsgstr \":func:`discord.utils.resolve_invite` から返された解決済みの招待を表すデータクラス。\"\n\n#: ../../api.rst:1476\nmsgid \"The invite code.\"\nmsgstr \"招待コード。\"\n\n#: ../../api.rst:1482\nmsgid \"The id of the scheduled event that the invite refers to.\"\nmsgstr \"招待が参照するスケジュールイベントのID。\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.resolve_invite:1\nmsgid \"Resolves an invite from a :class:`~discord.Invite`, URL or code.\"\nmsgstr \":class:`~discord.Invite` やURL、コードから招待を解決します。\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.resolve_invite:3\nmsgid \"Now returns a :class:`.ResolvedInvite` instead of a :class:`str`.\"\nmsgstr \":class:`str` の代わりに :class:`.ResolvedInvite` を返すようになりました。\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.resolve_invite:7\nmsgid \"The invite.\"\nmsgstr \"招待。\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.resolve_invite:10\nmsgid \"A data class containing the invite code and the event ID.\"\nmsgstr \"招待コードとイベントIDを含むデータクラス。\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.resolve_invite:11\nmsgid \":class:`.ResolvedInvite`\"\nmsgstr \":class:`.ResolvedInvite`\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.resolve_template:1\nmsgid \"Resolves a template code from a :class:`~discord.Template`, URL or code.\"\nmsgstr \":class:`~discord.Template` やURL、コードからテンプレートを解決します。\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.resolve_template:5\nmsgid \"The code.\"\nmsgstr \"コード。\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.resolve_template:8\n#: ../../../discord/template.py:docstring of discord.template.Template:7\nmsgid \"The template code.\"\nmsgstr \"テンプレートコード。\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.sleep_until:3\nmsgid \"Sleep until a specified time.\"\nmsgstr \"指定された時間までスリープします。\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.sleep_until:5\nmsgid \"If the time supplied is in the past this function will yield instantly.\"\nmsgstr \"過去の時間が与えられた場合この関数は即座に返します。\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.sleep_until:9\nmsgid \"The timestamp in which to sleep until. If the datetime is naive then it is assumed to be local time.\"\nmsgstr \"スリープを終了するタイムスタンプ。datetimeがnaiveである場合は、ローカル時間であると推定されます。\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.sleep_until:12\nmsgid \"If provided is returned to the caller when the coroutine completes.\"\nmsgstr \"渡された場合、コルーチンが完了した場合に返されます。\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.utcnow:1\nmsgid \"A helper function to return an aware UTC datetime representing the current time.\"\nmsgstr \"現在時刻を表す UTC aware datetime を返すヘルパー関数。\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.utcnow:3\nmsgid \"This should be preferred to :meth:`datetime.datetime.utcnow` since it is an aware datetime, compared to the naive datetime in the standard library.\"\nmsgstr \"これは、naive datetimeを返す標準ライブラリと異なりaware datetimeを返すため、 :meth:`datetime.datetime.utcnow` より推奨されています。\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.utcnow:8\nmsgid \"The current aware datetime in UTC.\"\nmsgstr \"現在のUTC aware datetime。\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.format_dt:1\nmsgid \"A helper function to format a :class:`datetime.datetime` for presentation within Discord.\"\nmsgstr \"Discord内での表示用に :class:`datetime.datetime` をフォーマットするヘルパー関数。\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.format_dt:3\nmsgid \"This allows for a locale-independent way of presenting data using Discord specific Markdown.\"\nmsgstr \"これにより、Discord特有のMarkdownを使用したロケールに依存しないデータの表示が可能になります。\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.format_dt:6\nmsgid \"Style\"\nmsgstr \"スタイル\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.format_dt:6\nmsgid \"Example Output\"\nmsgstr \"出力例\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.format_dt:6\n#: ../../api.rst:3579\n#: ../../api.rst:3599\nmsgid \"Description\"\nmsgstr \"説明\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.format_dt:8\nmsgid \"t\"\nmsgstr \"t\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.format_dt:8\nmsgid \"22:57\"\nmsgstr \"22:57\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.format_dt:8\nmsgid \"Short Time\"\nmsgstr \"短縮された時間\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.format_dt:10\nmsgid \"T\"\nmsgstr \"T\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.format_dt:10\nmsgid \"22:57:58\"\nmsgstr \"22:57:58\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.format_dt:10\nmsgid \"Long Time\"\nmsgstr \"短縮しない時間\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.format_dt:12\nmsgid \"d\"\nmsgstr \"d\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.format_dt:12\nmsgid \"17/05/2016\"\nmsgstr \"17/05/2016\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.format_dt:12\nmsgid \"Short Date\"\nmsgstr \"短縮された日付\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.format_dt:14\nmsgid \"D\"\nmsgstr \"D\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.format_dt:14\nmsgid \"17 May 2016\"\nmsgstr \"17 May 2016\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.format_dt:14\nmsgid \"Long Date\"\nmsgstr \"短縮しない日付\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.format_dt:16\nmsgid \"f (default)\"\nmsgstr \"f (デフォルト)\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.format_dt:16\nmsgid \"17 May 2016 22:57\"\nmsgstr \"17 May 2016 22:57\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.format_dt:16\nmsgid \"Short Date Time\"\nmsgstr \"短縮された日時\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.format_dt:18\nmsgid \"F\"\nmsgstr \"F\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.format_dt:18\nmsgid \"Tuesday, 17 May 2016 22:57\"\nmsgstr \"Tuesday, 17 May 2016 22:57\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.format_dt:18\nmsgid \"Long Date Time\"\nmsgstr \"短縮しない日時\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.format_dt:20\nmsgid \"R\"\nmsgstr \"R\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.format_dt:20\nmsgid \"5 years ago\"\nmsgstr \"5 years ago\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.format_dt:20\nmsgid \"Relative Time\"\nmsgstr \"相対時間\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.format_dt:23\nmsgid \"Note that the exact output depends on the user's locale setting in the client. The example output presented is using the ``en-GB`` locale.\"\nmsgstr \"なお、正確な出力はユーザーのクライアントのローケル設定によります。この例は ``en-GB`` ローケルを使用しています。\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.format_dt:28\nmsgid \"The datetime to format.\"\nmsgstr \"フォーマットするdatetime。\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.format_dt:30\nmsgid \"The style to format the datetime with.\"\nmsgstr \"datetimeをフォーマットするスタイル。\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.format_dt:33\nmsgid \"The formatted string.\"\nmsgstr \"フォーマットされた文字列。\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.as_chunks:1\nmsgid \"A helper function that collects an iterator into chunks of a given size.\"\nmsgstr \"イテレーターを与えられたサイズのチャンクにまとめるヘルパー関数。\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.as_chunks:5\nmsgid \"The iterator to chunk, can be sync or async.\"\nmsgstr \"チャンクするイテレーター。同期でも非同期でもよいです。\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.as_chunks:7\nmsgid \"The maximum chunk size.\"\nmsgstr \"チャンクの最大サイズ。\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.as_chunks:12\nmsgid \"The last chunk collected may not be as large as ``max_size``.\"\nmsgstr \"最後のチャンクのサイズは ``max_size`` 未満の場合があります。\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.as_chunks:14\nmsgid \"A new iterator which yields chunks of a given size.\"\nmsgstr \"指定されたサイズのチャンクを生成する新しいイテレータ。\"\n\n#: ../../../discord/utils.py:docstring of discord.utils.as_chunks:15\nmsgid \"Union[:class:`Iterator`, :class:`AsyncIterator`]\"\nmsgstr \"Union[:class:`Iterator`, :class:`AsyncIterator`]\"\n\n#: ../../api.rst:1501\nmsgid \"A type safe sentinel used in the library to represent something as missing. Used to distinguish from ``None`` values.\"\nmsgstr \"ライブラリで見つからないものを表現するために使用されるタイプセーフなセンチネル型。 ``None`` 値と区別するために使用されます。\"\n\n#: ../../api.rst:1508\nmsgid \"Enumerations\"\nmsgstr \"列挙型\"\n\n#: ../../api.rst:1510\nmsgid \"The API provides some enumerations for certain types of strings to avoid the API from being stringly typed in case the strings change in the future.\"\nmsgstr \"APIは、文字列が将来変わることに備え、文字列を直書きするのを防ぐために、いくらかの文字列の列挙型を提供します。\"\n\n#: ../../api.rst:1513\nmsgid \"All enumerations are subclasses of an internal class which mimics the behaviour of :class:`enum.Enum`.\"\nmsgstr \"列挙型はすべて :class:`enum.Enum` の動作を模倣した内部クラスのサブクラスです。\"\n\n#: ../../api.rst:1518\nmsgid \"Specifies the type of channel.\"\nmsgstr \"特定チャンネルのチャンネルタイプ。\"\n\n#: ../../api.rst:1522\nmsgid \"A text channel.\"\nmsgstr \"テキストチャンネル。\"\n\n#: ../../api.rst:1525\nmsgid \"A voice channel.\"\nmsgstr \"ボイスチャンネル。\"\n\n#: ../../api.rst:1528\nmsgid \"A private text channel. Also called a direct message.\"\nmsgstr \"プライベートのテキストチャンネル。ダイレクトメッセージとも呼ばれています。\"\n\n#: ../../api.rst:1531\nmsgid \"A private group text channel.\"\nmsgstr \"プライベートのグループDM。\"\n\n#: ../../api.rst:1534\nmsgid \"A category channel.\"\nmsgstr \"カテゴリチャンネル。\"\n\n#: ../../api.rst:1537\nmsgid \"A guild news channel.\"\nmsgstr \"ギルドのニュースチャンネル。\"\n\n#: ../../api.rst:1541\nmsgid \"A guild stage voice channel.\"\nmsgstr \"ギルドのステージボイスチャンネル。\"\n\n#: ../../api.rst:1547\nmsgid \"A news thread\"\nmsgstr \"ニューススレッド。\"\n\n#: ../../api.rst:1553\nmsgid \"A public thread\"\nmsgstr \"パブリックスレッド。\"\n\n#: ../../api.rst:1559\nmsgid \"A private thread\"\nmsgstr \"プライベートスレッド。\"\n\n#: ../../api.rst:1565\nmsgid \"A forum channel.\"\nmsgstr \"フォーラムチャンネル。\"\n\n#: ../../api.rst:1571\nmsgid \"A media channel.\"\nmsgstr \"\"\n\n#: ../../api.rst:1577\nmsgid \"Specifies the type of :class:`Message`. This is used to denote if a message is to be interpreted as a system message or a regular message.\"\nmsgstr \":class:`Message` のタイプを指定します。これは、メッセージが通常のものかシステムメッセージかを判断するのに使用できます。\"\n\n#: ../../api.rst:1584\n#: ../../../discord/message.py:docstring of discord.message.Message:7\nmsgid \"Checks if two messages are equal.\"\nmsgstr \"二つのメッセージが等しいかを比較します。\"\n\n#: ../../api.rst:1587\n#: ../../../discord/message.py:docstring of discord.message.Message:11\nmsgid \"Checks if two messages are not equal.\"\nmsgstr \"二つのメッセージが等しくないかを比較します。\"\n\n#: ../../api.rst:1591\nmsgid \"The default message type. This is the same as regular messages.\"\nmsgstr \"デフォルトのメッセージ。これは通常のメッセージと同じです。\"\n\n#: ../../api.rst:1594\nmsgid \"The system message when a user is added to a group private message or a thread.\"\nmsgstr \"ユーザーがグループプライベートメッセージまたはスレッドに追加されたときのシステムメッセージ。\"\n\n#: ../../api.rst:1598\nmsgid \"The system message when a user is removed from a group private message or a thread.\"\nmsgstr \"ユーザーがグループプライベートメッセージまたはスレッドから削除されたときのシステムメッセージ。\"\n\n#: ../../api.rst:1602\nmsgid \"The system message denoting call state, e.g. missed call, started call, etc.\"\nmsgstr \"通話の状態を示すシステムメッセージ。例: 不在着信、通話の開始、その他。\"\n\n#: ../../api.rst:1606\nmsgid \"The system message denoting that a channel's name has been changed.\"\nmsgstr \"チャンネル名の変更を示すシステムメッセージ。\"\n\n#: ../../api.rst:1609\nmsgid \"The system message denoting that a channel's icon has been changed.\"\nmsgstr \"チャンネルのアイコンの変更を示すシステムメッセージ。\"\n\n#: ../../api.rst:1612\nmsgid \"The system message denoting that a pinned message has been added to a channel.\"\nmsgstr \"ピン留めの追加を示すシステムメッセージ。\"\n\n#: ../../api.rst:1615\nmsgid \"The system message denoting that a new member has joined a Guild.\"\nmsgstr \"ギルドの新規メンバーの参加を示すシステムメッセージ。\"\n\n#: ../../api.rst:1619\nmsgid \"The system message denoting that a member has \\\"nitro boosted\\\" a guild.\"\nmsgstr \"メンバーがギルドを「ニトロブースト」したことを表すシステムメッセージ。\"\n\n#: ../../api.rst:1622\nmsgid \"The system message denoting that a member has \\\"nitro boosted\\\" a guild and it achieved level 1.\"\nmsgstr \"メンバーがギルドを「ニトロブースト」し、それによってギルドがレベル1に到達したことを表すシステムメッセージ。\"\n\n#: ../../api.rst:1626\nmsgid \"The system message denoting that a member has \\\"nitro boosted\\\" a guild and it achieved level 2.\"\nmsgstr \"メンバーがギルドを「ニトロブースト」し、それによってギルドがレベル2に到達したことを表すシステムメッセージ。\"\n\n#: ../../api.rst:1630\nmsgid \"The system message denoting that a member has \\\"nitro boosted\\\" a guild and it achieved level 3.\"\nmsgstr \"メンバーがギルドを「ニトロブースト」し、それによってギルドがレベル3に到達したことを表すシステムメッセージ。\"\n\n#: ../../api.rst:1634\nmsgid \"The system message denoting that an announcement channel has been followed.\"\nmsgstr \"アナウンスチャンネルがフォローされたことを表すシステムメッセージ。\"\n\n#: ../../api.rst:1639\nmsgid \"The system message denoting that a member is streaming in the guild.\"\nmsgstr \"メンバーがギルドでストリーミングしていることを表すシステムメッセージ。\"\n\n#: ../../api.rst:1644\nmsgid \"The system message denoting that the guild is no longer eligible for Server Discovery.\"\nmsgstr \"ギルドがサーバー発見の資格を持たなくなったことを示すシステムメッセージ。\"\n\n#: ../../api.rst:1650\nmsgid \"The system message denoting that the guild has become eligible again for Server Discovery.\"\nmsgstr \"ギルドがサーバー発見の資格を再び持ったことを示すシステムメッセージ。\"\n\n#: ../../api.rst:1656\nmsgid \"The system message denoting that the guild has failed to meet the Server Discovery requirements for one week.\"\nmsgstr \"ギルドが1週間サーバー発見の要件を満たすことに失敗したことを示すシステムメッセージ。\"\n\n#: ../../api.rst:1662\nmsgid \"The system message denoting that the guild has failed to meet the Server Discovery requirements for 3 weeks in a row.\"\nmsgstr \"ギルドが連続で3週間サーバー発見の要件を満たすことに失敗したというシステムメッセージ。\"\n\n#: ../../api.rst:1668\nmsgid \"The system message denoting that a thread has been created. This is only sent if the thread has been created from an older message. The period of time required for a message to be considered old cannot be relied upon and is up to Discord.\"\nmsgstr \"スレッドが作成されたことを示すシステムメッセージ。これはスレッドが古いメッセージから作成されたときにのみ送信されます。メッセージが古いものとされる時間の閾値は信頼できずDiscord次第です。\"\n\n#: ../../api.rst:1676\nmsgid \"The system message denoting that the author is replying to a message.\"\nmsgstr \"送信者がメッセージに返信したことを示すシステムメッセージ。\"\n\n#: ../../api.rst:1681\nmsgid \"The system message denoting that a slash command was executed.\"\nmsgstr \"スラッシュコマンドを実行したことを示すシステムメッセージ。\"\n\n#: ../../api.rst:1686\nmsgid \"The system message sent as a reminder to invite people to the guild.\"\nmsgstr \"人々をギルドに招待することのリマインダーとして送信されたシステムメッセージ。\"\n\n#: ../../api.rst:1691\nmsgid \"The system message denoting the message in the thread that is the one that started the thread's conversation topic.\"\nmsgstr \"スレッドの会話を始めたメッセージであるスレッド内のメッセージを示すシステムメッセージ。\"\n\n#: ../../api.rst:1697\nmsgid \"The system message denoting that a context menu command was executed.\"\nmsgstr \"コンテキストメニューコマンドを実行したことを示すシステムメッセージ。\"\n\n#: ../../api.rst:1702\nmsgid \"The system message sent when an AutoMod rule is triggered. This is only sent if the rule is configured to sent an alert when triggered.\"\nmsgstr \"自動管理ルールが発動されたときに送信されるシステムメッセージ。ルールが発動されたときにアラートを送信するように設定されている場合にのみ送信されます。\"\n\n#: ../../api.rst:1708\nmsgid \"The system message sent when a user purchases or renews a role subscription.\"\nmsgstr \"ユーザーがロールサブスクリプションを購入または更新したときに送信されるシステムメッセージ。\"\n\n#: ../../api.rst:1713\nmsgid \"The system message sent when a user is given an advertisement to purchase a premium tier for an application during an interaction.\"\nmsgstr \"ユーザーに対し、インタラクション中にアプリケーションのプレミアム版を購入する広告を表示するときに送信されるシステムメッセージ。\"\n\n#: ../../api.rst:1719\nmsgid \"The system message sent when the stage starts.\"\nmsgstr \"ステージ開始時に送信されるシステムメッセージ。\"\n\n#: ../../api.rst:1724\nmsgid \"The system message sent when the stage ends.\"\nmsgstr \"ステージ終了時に送信されるシステムメッセージ。\"\n\n#: ../../api.rst:1729\nmsgid \"The system message sent when the stage speaker changes.\"\nmsgstr \"ステージの発言者が変わるときに送信されるシステムメッセージ。\"\n\n#: ../../api.rst:1734\nmsgid \"The system message sent when a user is requesting to speak by raising their hands.\"\nmsgstr \"ユーザーが挙手して発言許可を求めているときに送信されるシステムメッセージ。\"\n\n#: ../../api.rst:1739\nmsgid \"The system message sent when the stage topic changes.\"\nmsgstr \"ステージのトピックが変わるときに送信されるシステムメッセージ。\"\n\n#: ../../api.rst:1744\nmsgid \"The system message sent when an application's premium subscription is purchased for the guild.\"\nmsgstr \"アプリケーションのプレミアムサブスクリプションがギルドで購入されたときに送信されるシステムメッセージ。\"\n\n#: ../../api.rst:1750\nmsgid \"The system message sent when security actions is enabled.\"\nmsgstr \"\"\n\n#: ../../api.rst:1756\nmsgid \"The system message sent when security actions is disabled.\"\nmsgstr \"\"\n\n#: ../../api.rst:1762\nmsgid \"The system message sent when a raid is reported.\"\nmsgstr \"\"\n\n#: ../../api.rst:1768\nmsgid \"The system message sent when a false alarm is reported.\"\nmsgstr \"\"\n\n#: ../../api.rst:1774\nmsgid \"Represents Discord User flags.\"\nmsgstr \"Discordユーザーフラグを表します。\"\n\n#: ../../api.rst:1778\nmsgid \"The user is a Discord Employee.\"\nmsgstr \"ユーザーはDiscordの従業員です。\"\n\n#: ../../api.rst:1781\nmsgid \"The user is a Discord Partner.\"\nmsgstr \"ユーザーはDiscordパートナーです。\"\n\n#: ../../api.rst:1784\nmsgid \"The user is a HypeSquad Events member.\"\nmsgstr \"ユーザーはHypeSquad Eventsメンバーです。\"\n\n#: ../../api.rst:1787\nmsgid \"The user is a Bug Hunter.\"\nmsgstr \"ユーザーはバグハンターです。\"\n\n#: ../../api.rst:1790\nmsgid \"The user has SMS recovery for Multi Factor Authentication enabled.\"\nmsgstr \"ユーザーの多要素認証のSMSリカバリーが有効になっています。\"\n\n#: ../../api.rst:1793\nmsgid \"The user has dismissed the Discord Nitro promotion.\"\nmsgstr \"ユーザーはDiscord Nitroプロモーションを無視しました。\"\n\n#: ../../api.rst:1796\nmsgid \"The user is a HypeSquad Bravery member.\"\nmsgstr \"ユーザーはHypeSquad Braveryのメンバーです。\"\n\n#: ../../api.rst:1799\nmsgid \"The user is a HypeSquad Brilliance member.\"\nmsgstr \"ユーザーはHypeSquad Brillianceのメンバーです。\"\n\n#: ../../api.rst:1802\nmsgid \"The user is a HypeSquad Balance member.\"\nmsgstr \"ユーザーはHypeSquad Balanceのメンバーです。\"\n\n#: ../../api.rst:1805\nmsgid \"The user is an Early Supporter.\"\nmsgstr \"ユーザーは早期サポーターです。\"\n\n#: ../../api.rst:1808\nmsgid \"The user is a Team User.\"\nmsgstr \"ユーザーはチームユーザーです。\"\n\n#: ../../api.rst:1811\nmsgid \"The user is a system user (i.e. represents Discord officially).\"\nmsgstr \"ユーザーはシステムユーザーです。(つまり、Discord公式を表しています)\"\n\n#: ../../api.rst:1814\nmsgid \"The user has an unread system message.\"\nmsgstr \"ユーザーに未読のシステムメッセージがあります。\"\n\n#: ../../api.rst:1817\nmsgid \"The user is a Bug Hunter Level 2.\"\nmsgstr \"ユーザーはバグハンターレベル2です。\"\n\n#: ../../api.rst:1820\nmsgid \"The user is a Verified Bot.\"\nmsgstr \"ユーザーは認証済みボットです。\"\n\n#: ../../api.rst:1823\nmsgid \"The user is an Early Verified Bot Developer.\"\nmsgstr \"ユーザーは早期認証Botデベロッパーです。\"\n\n#: ../../api.rst:1826\nmsgid \"The user is a Moderator Programs Alumni.\"\nmsgstr \"ユーザーはモデレータープログラム卒業生です。\"\n\n#: ../../api.rst:1829\nmsgid \"The user is a bot that only uses HTTP interactions and is shown in the online member list.\"\nmsgstr \"ユーザーはHTTPインタラクションのみを使用し、オンラインメンバーのリストに表示されるボットです。\"\n\n#: ../../api.rst:1834\nmsgid \"The user is flagged as a spammer by Discord.\"\nmsgstr \"ユーザーはDiscordよりスパマーとフラグ付けされました。\"\n\n#: ../../api.rst:1840\nmsgid \"The user is an active developer.\"\nmsgstr \"ユーザーはアクティブな開発者です。\"\n\n#: ../../api.rst:1846\nmsgid \"Specifies the type of :class:`Activity`. This is used to check how to interpret the activity itself.\"\nmsgstr \":class:`Activity` のタイプを指定します。これはアクティビティをどう解釈するか確認するために使われます。\"\n\n#: ../../api.rst:1851\nmsgid \"An unknown activity type. This should generally not happen.\"\nmsgstr \"不明なアクティビティタイプ。これは通常起こらないはずです。\"\n\n#: ../../api.rst:1854\nmsgid \"A \\\"Playing\\\" activity type.\"\nmsgstr \"プレイ中のアクティビティタイプ。\"\n\n#: ../../api.rst:1857\nmsgid \"A \\\"Streaming\\\" activity type.\"\nmsgstr \"放送中のアクティビティタイプ。\"\n\n#: ../../api.rst:1860\nmsgid \"A \\\"Listening\\\" activity type.\"\nmsgstr \"再生中のアクティビティタイプ。\"\n\n#: ../../api.rst:1863\nmsgid \"A \\\"Watching\\\" activity type.\"\nmsgstr \"視聴中のアクティビティタイプ。\"\n\n#: ../../api.rst:1866\nmsgid \"A custom activity type.\"\nmsgstr \"カスタムのアクティビティタイプ。\"\n\n#: ../../api.rst:1869\nmsgid \"A competing activity type.\"\nmsgstr \"競争中のアクティビティタイプ。\"\n\n#: ../../api.rst:1875\nmsgid \"Specifies a :class:`Guild`\\\\'s verification level, which is the criteria in which a member must meet before being able to send messages to the guild.\"\nmsgstr \":class:`Guild` の認証レベルを指定します。これは、メンバーがギルドにメッセージを送信できるようになるまでの条件です。\"\n\n#: ../../api.rst:1884\nmsgid \"Checks if two verification levels are equal.\"\nmsgstr \"認証レベルが等しいか確認します。\"\n\n#: ../../api.rst:1887\nmsgid \"Checks if two verification levels are not equal.\"\nmsgstr \"認証レベルが等しくないか確認します。\"\n\n#: ../../api.rst:1890\nmsgid \"Checks if a verification level is higher than another.\"\nmsgstr \"認証レベルがあるレベルより厳しいか確認します。\"\n\n#: ../../api.rst:1893\nmsgid \"Checks if a verification level is lower than another.\"\nmsgstr \"認証レベルがあるレベルより緩いか確認します。\"\n\n#: ../../api.rst:1896\nmsgid \"Checks if a verification level is higher or equal to another.\"\nmsgstr \"認証レベルがあるレベルと同じ、又は厳しいか確認します。\"\n\n#: ../../api.rst:1899\nmsgid \"Checks if a verification level is lower or equal to another.\"\nmsgstr \"認証レベルがあるレベルと同じ、又は緩いか確認します。\"\n\n#: ../../api.rst:1903\nmsgid \"No criteria set.\"\nmsgstr \"無制限。\"\n\n#: ../../api.rst:1906\nmsgid \"Member must have a verified email on their Discord account.\"\nmsgstr \"メンバーはDiscordアカウントのメール認証を済ませないといけません。\"\n\n#: ../../api.rst:1909\nmsgid \"Member must have a verified email and be registered on Discord for more than five minutes.\"\nmsgstr \"メンバーはメール認証をし、かつアカウント登録から5分経過しないといけません。\"\n\n#: ../../api.rst:1913\nmsgid \"Member must have a verified email, be registered on Discord for more than five minutes, and be a member of the guild itself for more than ten minutes.\"\nmsgstr \"メンバーはメール認証をし、Discordのアカウント登録から5分経過し、かつ10分以上ギルドに所属していないといけません。\"\n\n#: ../../api.rst:1918\nmsgid \"Member must have a verified phone on their Discord account.\"\nmsgstr \"メンバーはDiscordアカウントの電話番号認証を済ませないといけません。\"\n\n#: ../../api.rst:1922\nmsgid \"Specifies whether a :class:`Guild` has notifications on for all messages or mentions only by default.\"\nmsgstr \":class:`Guild` の通知対象のデフォルト設定をすべてのメッセージ、またはメンションのみに指定します。\"\n\n#: ../../api.rst:1930\nmsgid \"Checks if two notification levels are equal.\"\nmsgstr \"通知レベルが等しいか確認します。\"\n\n#: ../../api.rst:1933\nmsgid \"Checks if two notification levels are not equal.\"\nmsgstr \"通知レベルが等しくないか確認します。\"\n\n#: ../../api.rst:1936\nmsgid \"Checks if a notification level is higher than another.\"\nmsgstr \"通知レベルがあるレベルより高いか確認します。\"\n\n#: ../../api.rst:1939\nmsgid \"Checks if a notification level is lower than another.\"\nmsgstr \"通知レベルがあるレベルより低いか確認します。\"\n\n#: ../../api.rst:1942\nmsgid \"Checks if a notification level is higher or equal to another.\"\nmsgstr \"通知レベルがあるレベルと同じ、又は高いか確認します。\"\n\n#: ../../api.rst:1945\nmsgid \"Checks if a notification level is lower or equal to another.\"\nmsgstr \"通知レベルがあるレベルと同じ、又は低いか確認します。\"\n\n#: ../../api.rst:1949\nmsgid \"Members receive notifications for every message regardless of them being mentioned.\"\nmsgstr \"メンバーは、メンションされているかどうかに関わらず、すべてのメッセージの通知を受け取ります。\"\n\n#: ../../api.rst:1952\nmsgid \"Members receive notifications for messages they are mentioned in.\"\nmsgstr \"メンバーは自分がメンションされているメッセージの通知のみ受け取ります。\"\n\n#: ../../api.rst:1956\nmsgid \"Specifies a :class:`Guild`\\\\'s explicit content filter, which is the machine learning algorithms that Discord uses to detect if an image contains pornography or otherwise explicit content.\"\nmsgstr \":class:`Guild` の不適切な表現のフィルターを指定します。これはDiscordがポルノ画像や不適切な表現を検出するために使用している機械学習アルゴリズムです。\"\n\n#: ../../api.rst:1966\nmsgid \"Checks if two content filter levels are equal.\"\nmsgstr \"表現のフィルターのレベルが等しいか確認します。\"\n\n#: ../../api.rst:1969\nmsgid \"Checks if two content filter levels are not equal.\"\nmsgstr \"表現のフィルターのレベルが等しくないか確認します。\"\n\n#: ../../api.rst:1972\nmsgid \"Checks if a content filter level is higher than another.\"\nmsgstr \"表現のフィルターのレベルが他のレベルより大きいか確認します。\"\n\n#: ../../api.rst:1975\nmsgid \"Checks if a content filter level is lower than another.\"\nmsgstr \"表現のフィルターのレベルが他のレベルより小さいか確認します。\"\n\n#: ../../api.rst:1978\nmsgid \"Checks if a content filter level is higher or equal to another.\"\nmsgstr \"表現のフィルターのレベルが他のレベルより大きい、または等しいか確認します。\"\n\n#: ../../api.rst:1981\nmsgid \"Checks if a content filter level is lower or equal to another.\"\nmsgstr \"表現のフィルターのレベルが他のレベルより小さい、または等しいか確認します。\"\n\n#: ../../api.rst:1985\nmsgid \"The guild does not have the content filter enabled.\"\nmsgstr \"ギルドで表現のフィルターが有効ではない。\"\n\n#: ../../api.rst:1988\nmsgid \"The guild has the content filter enabled for members without a role.\"\nmsgstr \"ギルドでロールを持たないメンバーに対して表現のフィルターが有効化されている。\"\n\n#: ../../api.rst:1991\nmsgid \"The guild has the content filter enabled for every member.\"\nmsgstr \"ギルドで、すべてのメンバーに対して表現のフィルターが有効化されている。\"\n\n#: ../../api.rst:1995\nmsgid \"Specifies a :class:`Member` 's status.\"\nmsgstr \":class:`Member` のステータスを指定します。\"\n\n#: ../../api.rst:1999\nmsgid \"The member is online.\"\nmsgstr \"メンバーがオンライン。\"\n\n#: ../../api.rst:2002\nmsgid \"The member is offline.\"\nmsgstr \"メンバーがオフライン。\"\n\n#: ../../api.rst:2005\nmsgid \"The member is idle.\"\nmsgstr \"メンバーが退席中。\"\n\n#: ../../api.rst:2008\nmsgid \"The member is \\\"Do Not Disturb\\\".\"\nmsgstr \"メンバーが取り込み中。\"\n\n#: ../../api.rst:2011\nmsgid \"An alias for :attr:`dnd`.\"\nmsgstr \":attr:`dnd` のエイリアス。\"\n\n#: ../../api.rst:2014\nmsgid \"The member is \\\"invisible\\\". In reality, this is only used when sending a presence a la :meth:`Client.change_presence`. When you receive a user's presence this will be :attr:`offline` instead.\"\nmsgstr \"メンバーがオンライン状態を隠す。実際には、これは :meth:`Client.change_presence` でプレゼンスを送信する時のみ使用します。ユーザーのプレゼンスを受け取った場合、これは :attr:`offline` に置き換えられます。\"\n\n#: ../../api.rst:2021\nmsgid \"Represents the type of action being done for a :class:`AuditLogEntry`\\\\, which is retrievable via :meth:`Guild.audit_logs`.\"\nmsgstr \":class:`AuditLogEntry` で行われた動作の種類を取得します。AuditLogEntryは :meth:`Guild.audit_logs` で取得可能です。\"\n\n#: ../../api.rst:2026\nmsgid \"The guild has updated. Things that trigger this include:\"\nmsgstr \"ギルドの更新。このトリガーとなるものは以下のとおりです。\"\n\n#: ../../api.rst:2028\nmsgid \"Changing the guild vanity URL\"\nmsgstr \"ギルドのvanity URLの変更\"\n\n#: ../../api.rst:2029\nmsgid \"Changing the guild invite splash\"\nmsgstr \"ギルドの招待時のスプラッシュ画像の変更\"\n\n#: ../../api.rst:2030\nmsgid \"Changing the guild AFK channel or timeout\"\nmsgstr \"ギルドのAFKチャンネル、またはタイムアウトの変更\"\n\n#: ../../api.rst:2031\nmsgid \"Changing the guild voice server region\"\nmsgstr \"ギルドの音声通話のサーバーリージョンの変更\"\n\n#: ../../api.rst:2032\nmsgid \"Changing the guild icon, banner, or discovery splash\"\nmsgstr \"ギルドのアイコン、バナー、ディスカバリースプラッシュの変更\"\n\n#: ../../api.rst:2033\nmsgid \"Changing the guild moderation settings\"\nmsgstr \"ギルドの管理設定の変更\"\n\n#: ../../api.rst:2034\nmsgid \"Changing things related to the guild widget\"\nmsgstr \"ギルドのウィジェットに関連するものの変更\"\n\n#: ../../api.rst:2036\nmsgid \"When this is the action, the type of :attr:`~AuditLogEntry.target` is the :class:`Guild`.\"\nmsgstr \"これが上記のactionならば、:attr:`~AuditLogEntry.target` の型は :class:`Guild` になります。\"\n\n#: ../../api.rst:2039\n#: ../../api.rst:2075\n#: ../../api.rst:2094\n#: ../../api.rst:2119\n#: ../../api.rst:2141\nmsgid \"Possible attributes for :class:`AuditLogDiff`:\"\nmsgstr \":class:`AuditLogDiff` から、以下の属性を参照できます：\"\n\n#: ../../api.rst:2041\nmsgid \":attr:`~AuditLogDiff.afk_channel`\"\nmsgstr \":attr:`~AuditLogDiff.afk_channel`\"\n\n#: ../../api.rst:2042\nmsgid \":attr:`~AuditLogDiff.system_channel`\"\nmsgstr \":attr:`~AuditLogDiff.system_channel`\"\n\n#: ../../api.rst:2043\nmsgid \":attr:`~AuditLogDiff.afk_timeout`\"\nmsgstr \":attr:`~AuditLogDiff.afk_timeout`\"\n\n#: ../../api.rst:2044\nmsgid \":attr:`~AuditLogDiff.default_notifications`\"\nmsgstr \":attr:`~AuditLogDiff.default_notifications`\"\n\n#: ../../api.rst:2045\nmsgid \":attr:`~AuditLogDiff.explicit_content_filter`\"\nmsgstr \":attr:`~AuditLogDiff.explicit_content_filter`\"\n\n#: ../../api.rst:2046\nmsgid \":attr:`~AuditLogDiff.mfa_level`\"\nmsgstr \":attr:`~AuditLogDiff.mfa_level`\"\n\n#: ../../api.rst:2047\n#: ../../api.rst:2077\n#: ../../api.rst:2096\n#: ../../api.rst:2121\n#: ../../api.rst:2308\nmsgid \":attr:`~AuditLogDiff.name`\"\nmsgstr \":attr:`~AuditLogDiff.name`\"\n\n#: ../../api.rst:2048\nmsgid \":attr:`~AuditLogDiff.owner`\"\nmsgstr \":attr:`~AuditLogDiff.owner`\"\n\n#: ../../api.rst:2049\nmsgid \":attr:`~AuditLogDiff.splash`\"\nmsgstr \":attr:`~AuditLogDiff.splash`\"\n\n#: ../../api.rst:2050\nmsgid \":attr:`~AuditLogDiff.discovery_splash`\"\nmsgstr \":attr:`~AuditLogDiff.discovery_splash`\"\n\n#: ../../api.rst:2051\n#: ../../api.rst:2306\n#: ../../api.rst:2329\nmsgid \":attr:`~AuditLogDiff.icon`\"\nmsgstr \":attr:`~AuditLogDiff.icon`\"\n\n#: ../../api.rst:2052\nmsgid \":attr:`~AuditLogDiff.banner`\"\nmsgstr \":attr:`~AuditLogDiff.banner`\"\n\n#: ../../api.rst:2053\nmsgid \":attr:`~AuditLogDiff.vanity_url_code`\"\nmsgstr \":attr:`~AuditLogDiff.vanity_url_code`\"\n\n#: ../../api.rst:2054\n#: ../../api.rst:2603\n#: ../../api.rst:2622\n#: ../../api.rst:2641\nmsgid \":attr:`~AuditLogDiff.description`\"\nmsgstr \":attr:`~AuditLogDiff.description`\"\n\n#: ../../api.rst:2055\nmsgid \":attr:`~AuditLogDiff.preferred_locale`\"\nmsgstr \":attr:`~AuditLogDiff.preferred_locale`\"\n\n#: ../../api.rst:2056\nmsgid \":attr:`~AuditLogDiff.prune_delete_days`\"\nmsgstr \":attr:`~AuditLogDiff.prune_delete_days`\"\n\n#: ../../api.rst:2057\nmsgid \":attr:`~AuditLogDiff.public_updates_channel`\"\nmsgstr \":attr:`~AuditLogDiff.public_updates_channel`\"\n\n#: ../../api.rst:2058\nmsgid \":attr:`~AuditLogDiff.rules_channel`\"\nmsgstr \":attr:`~AuditLogDiff.rules_channel`\"\n\n#: ../../api.rst:2059\nmsgid \":attr:`~AuditLogDiff.verification_level`\"\nmsgstr \":attr:`~AuditLogDiff.verification_level`\"\n\n#: ../../api.rst:2060\nmsgid \":attr:`~AuditLogDiff.widget_channel`\"\nmsgstr \":attr:`~AuditLogDiff.widget_channel`\"\n\n#: ../../api.rst:2061\nmsgid \":attr:`~AuditLogDiff.widget_enabled`\"\nmsgstr \":attr:`~AuditLogDiff.widget_enabled`\"\n\n#: ../../api.rst:2062\nmsgid \":attr:`~AuditLogDiff.premium_progress_bar_enabled`\"\nmsgstr \":attr:`~AuditLogDiff.premium_progress_bar_enabled`\"\n\n#: ../../api.rst:2063\nmsgid \":attr:`~AuditLogDiff.system_channel_flags`\"\nmsgstr \":attr:`~AuditLogDiff.system_channel_flags`\"\n\n#: ../../api.rst:2067\nmsgid \"A new channel was created.\"\nmsgstr \"チャンネルの作成。\"\n\n#: ../../api.rst:2069\nmsgid \"When this is the action, the type of :attr:`~AuditLogEntry.target` is either a :class:`abc.GuildChannel` or :class:`Object` with an ID.\"\nmsgstr \"これが上記のactionならば、 :attr:`~AuditLogEntry.target` の型は、IDが設定されている :class:`abc.GuildChannel` か、 :class:`Object` のいずれかになります。\"\n\n#: ../../api.rst:2072\nmsgid \"A more filled out object in the :class:`Object` case can be found by using :attr:`~AuditLogEntry.after`.\"\nmsgstr \":class:`Object` の場合、 :attr:`~AuditLogEntry.after` を使用して、より詳細な情報を持つオブジェクトを見つけることができます。\"\n\n#: ../../api.rst:2078\n#: ../../api.rst:2097\n#: ../../api.rst:2122\n#: ../../api.rst:2146\n#: ../../api.rst:2162\nmsgid \":attr:`~AuditLogDiff.type`\"\nmsgstr \":attr:`~AuditLogDiff.type`\"\n\n#: ../../api.rst:2079\n#: ../../api.rst:2099\n#: ../../api.rst:2123\nmsgid \":attr:`~AuditLogDiff.overwrites`\"\nmsgstr \":attr:`~AuditLogDiff.overwrites`\"\n\n#: ../../api.rst:2083\nmsgid \"A channel was updated. Things that trigger this include:\"\nmsgstr \"チャンネルの更新。これのトリガーとなるものは以下の通りです。\"\n\n#: ../../api.rst:2085\nmsgid \"The channel name or topic was changed\"\nmsgstr \"チャンネルのチャンネルトピックの変更、または名前の変更。\"\n\n#: ../../api.rst:2086\nmsgid \"The channel bitrate was changed\"\nmsgstr \"チャンネルのビットレートの変更。\"\n\n#: ../../api.rst:2088\n#: ../../api.rst:2132\nmsgid \"When this is the action, the type of :attr:`~AuditLogEntry.target` is the :class:`abc.GuildChannel` or :class:`Object` with an ID.\"\nmsgstr \"これが上記のactionならば、 :attr:`~AuditLogEntry.target` の型は、IDが設定されている :class:`abc.GuildChannel` か、 :class:`Object` のいずれかになります。\"\n\n#: ../../api.rst:2091\nmsgid \"A more filled out object in the :class:`Object` case can be found by using :attr:`~AuditLogEntry.after` or :attr:`~AuditLogEntry.before`.\"\nmsgstr \":class:`Object` の場合、 :attr:`~AuditLogEntry.after` または :attr:`~AuditLogEntry.before` を使用して、より詳細な情報を持つオブジェクトを見つけることができます。\"\n\n#: ../../api.rst:2098\nmsgid \":attr:`~AuditLogDiff.position`\"\nmsgstr \":attr:`~AuditLogDiff.position`\"\n\n#: ../../api.rst:2100\n#: ../../api.rst:2563\n#: ../../api.rst:2578\nmsgid \":attr:`~AuditLogDiff.topic`\"\nmsgstr \":attr:`~AuditLogDiff.topic`\"\n\n#: ../../api.rst:2101\nmsgid \":attr:`~AuditLogDiff.bitrate`\"\nmsgstr \":attr:`~AuditLogDiff.bitrate`\"\n\n#: ../../api.rst:2102\nmsgid \":attr:`~AuditLogDiff.rtc_region`\"\nmsgstr \":attr:`~AuditLogDiff.rtc_region`\"\n\n#: ../../api.rst:2103\nmsgid \":attr:`~AuditLogDiff.video_quality_mode`\"\nmsgstr \":attr:`~AuditLogDiff.video_quality_mode`\"\n\n#: ../../api.rst:2104\nmsgid \":attr:`~AuditLogDiff.default_auto_archive_duration`\"\nmsgstr \":attr:`~AuditLogDiff.default_auto_archive_duration`\"\n\n#: ../../api.rst:2105\n#: ../../api.rst:2125\nmsgid \":attr:`~AuditLogDiff.nsfw`\"\nmsgstr \":attr:`~AuditLogDiff.nsfw`\"\n\n#: ../../api.rst:2106\n#: ../../api.rst:2126\nmsgid \":attr:`~AuditLogDiff.slowmode_delay`\"\nmsgstr \":attr:`~AuditLogDiff.slowmode_delay`\"\n\n#: ../../api.rst:2107\nmsgid \":attr:`~AuditLogDiff.user_limit`\"\nmsgstr \":attr:`~AuditLogDiff.user_limit`\"\n\n#: ../../api.rst:2111\nmsgid \"A channel was deleted.\"\nmsgstr \"チャンネルの削除。\"\n\n#: ../../api.rst:2113\nmsgid \"When this is the action, the type of :attr:`~AuditLogEntry.target` is an :class:`Object` with an ID.\"\nmsgstr \"これが上記のactionならば、 :attr:`~AuditLogEntry.target` の型は、IDが設定されている :class:`Object` になります。\"\n\n#: ../../api.rst:2116\nmsgid \"A more filled out object can be found by using the :attr:`~AuditLogEntry.before` object.\"\nmsgstr \":attr:`~AuditLogEntry.before` オブジェクトを使用すると、より詳細な情報が見つかります。\"\n\n#: ../../api.rst:2124\nmsgid \":attr:`~AuditLogDiff.flags`\"\nmsgstr \":attr:`~AuditLogDiff.flags`\"\n\n#: ../../api.rst:2130\nmsgid \"A channel permission overwrite was created.\"\nmsgstr \"チャンネルにおける権限の上書き設定の作成。\"\n\n#: ../../api.rst:2135\nmsgid \"When this is the action, the type of :attr:`~AuditLogEntry.extra` is either a :class:`Role` or :class:`Member`. If the object is not found then it is a :class:`Object` with an ID being filled, a name, and a ``type`` attribute set to either ``'role'`` or ``'member'`` to help dictate what type of ID it is.\"\nmsgstr \"この場合には、 :attr:`~AuditLogEntry.extra` は :class:`Role` か :class:`Member` です。もしオブジェクトが見つからない場合はid、name、 ``'role'`` か ``'member'`` である ``type`` 属性がある :class:`Object` です。\"\n\n#: ../../api.rst:2143\n#: ../../api.rst:2159\n#: ../../api.rst:2174\nmsgid \":attr:`~AuditLogDiff.deny`\"\nmsgstr \":attr:`~AuditLogDiff.deny`\"\n\n#: ../../api.rst:2144\n#: ../../api.rst:2160\n#: ../../api.rst:2175\nmsgid \":attr:`~AuditLogDiff.allow`\"\nmsgstr \":attr:`~AuditLogDiff.allow`\"\n\n#: ../../api.rst:2145\n#: ../../api.rst:2161\n#: ../../api.rst:2176\nmsgid \":attr:`~AuditLogDiff.id`\"\nmsgstr \":attr:`~AuditLogDiff.id`\"\n\n#: ../../api.rst:2150\nmsgid \"A channel permission overwrite was changed, this is typically when the permission values change.\"\nmsgstr \"チャンネルの権限の上書きの変更。典型的な例は、権限が変更された場合です。\"\n\n#: ../../api.rst:2153\n#: ../../api.rst:2168\nmsgid \"See :attr:`overwrite_create` for more information on how the :attr:`~AuditLogEntry.target` and :attr:`~AuditLogEntry.extra` fields are set.\"\nmsgstr \":attr:`overwrite_create` に、 :attr:`~AuditLogEntry.target` と :attr:`~AuditLogEntry.extra` についての説明があります。\"\n\n#: ../../api.rst:2166\nmsgid \"A channel permission overwrite was deleted.\"\nmsgstr \"チャンネルにおける権限の上書き設定の削除。\"\n\n#: ../../api.rst:2181\nmsgid \"A member was kicked.\"\nmsgstr \"メンバーのキック。\"\n\n#: ../../api.rst:2183\nmsgid \"When this is the action, the type of :attr:`~AuditLogEntry.target` is the :class:`User` or :class:`Object` who got kicked.\"\nmsgstr \"これが上記のactionならば、 :attr:`~AuditLogEntry.target` の型は、キックされた :class:`User` あるいは :class:`Object` になります。\"\n\n#: ../../api.rst:2186\n#: ../../api.rst:2251\n#: ../../api.rst:2278\n#: ../../api.rst:2486\nmsgid \"When this is the action, the type of :attr:`~AuditLogEntry.extra` is set to an unspecified proxy object with one attribute:\"\nmsgstr \"これが上記のactionならば、 :attr:`~AuditLogEntry.extra` は以下の属性を持つプロキシオブジェクトになります：\"\n\n#: ../../api.rst:2189\n#: ../../api.rst:2254\nmsgid \"``integration_type``: An optional string that denotes the type of integration that did the action.\"\nmsgstr \"\"\n\n#: ../../api.rst:2191\n#: ../../api.rst:2206\n#: ../../api.rst:2215\n#: ../../api.rst:2224\nmsgid \"When this is the action, :attr:`~AuditLogEntry.changes` is empty.\"\nmsgstr \"これが上記のactionなら、:attr:`~AuditLogEntry.changes` は空になります。\"\n\n#: ../../api.rst:2195\nmsgid \"A member prune was triggered.\"\nmsgstr \"非アクティブメンバーの一括キック。\"\n\n#: ../../api.rst:2197\nmsgid \"When this is the action, the type of :attr:`~AuditLogEntry.target` is set to ``None``.\"\nmsgstr \"これが上記のactionならば、:attr:`~AuditLogEntry.target` の型は ``None`` に設定されます。\"\n\n#: ../../api.rst:2200\n#: ../../api.rst:2265\n#: ../../api.rst:2473\n#: ../../api.rst:2500\n#: ../../api.rst:2515\nmsgid \"When this is the action, the type of :attr:`~AuditLogEntry.extra` is set to an unspecified proxy object with two attributes:\"\nmsgstr \"これが上記のactionならば、 :attr:`~AuditLogEntry.extra` は以下の属性を持つプロキシオブジェクトになります：\"\n\n#: ../../api.rst:2203\nmsgid \"``delete_member_days``: An integer specifying how far the prune was.\"\nmsgstr \"``delete_members_days`` ： 一括キック対象の期間を示す整数。\"\n\n#: ../../api.rst:2204\nmsgid \"``members_removed``: An integer specifying how many members were removed.\"\nmsgstr \"``members_removed`` ： 除去されたメンバーの数を示す整数。\"\n\n#: ../../api.rst:2210\nmsgid \"A member was banned.\"\nmsgstr \"メンバーのBAN。\"\n\n#: ../../api.rst:2212\nmsgid \"When this is the action, the type of :attr:`~AuditLogEntry.target` is the :class:`User` or :class:`Object` who got banned.\"\nmsgstr \"これが上記のactionならば、 :attr:`~AuditLogEntry.target` の型は、BANされた :class:`User` あるいは :class:`Object` になります。\"\n\n#: ../../api.rst:2219\nmsgid \"A member was unbanned.\"\nmsgstr \"メンバーのBANの解除。\"\n\n#: ../../api.rst:2221\nmsgid \"When this is the action, the type of :attr:`~AuditLogEntry.target` is the :class:`User` or :class:`Object` who got unbanned.\"\nmsgstr \"これが上記のactionならば、 :attr:`~AuditLogEntry.target` の型は、BAN解除された :class:`User` あるいは :class:`Object` になります。\"\n\n#: ../../api.rst:2228\nmsgid \"A member has updated. This triggers in the following situations:\"\nmsgstr \"メンバーの何らかの更新。これのトリガーとなるのは以下の場合です：\"\n\n#: ../../api.rst:2230\nmsgid \"A nickname was changed\"\nmsgstr \"メンバーのニックネームの変更。\"\n\n#: ../../api.rst:2231\nmsgid \"They were server muted or deafened (or it was undo'd)\"\nmsgstr \"サーバー側でミュートやスピーカーミュートされた（あるいは解除された）場合。\"\n\n#: ../../api.rst:2233\nmsgid \"When this is the action, the type of :attr:`~AuditLogEntry.target` is the :class:`Member`, :class:`User`, or :class:`Object` who got updated.\"\nmsgstr \"これが上記のactionならば、 :attr:`~AuditLogEntry.target` の型は、更新の行われた :class:`Member` 、 :class:`User` 、または :class:`Object` になります。\"\n\n#: ../../api.rst:2238\nmsgid \":attr:`~AuditLogDiff.nick`\"\nmsgstr \":attr:`~AuditLogDiff.nick`\"\n\n#: ../../api.rst:2239\nmsgid \":attr:`~AuditLogDiff.mute`\"\nmsgstr \":attr:`~AuditLogDiff.mute`\"\n\n#: ../../api.rst:2240\nmsgid \":attr:`~AuditLogDiff.deaf`\"\nmsgstr \":attr:`~AuditLogDiff.deaf`\"\n\n#: ../../api.rst:2241\nmsgid \":attr:`~AuditLogDiff.timed_out_until`\"\nmsgstr \":attr:`~AuditLogDiff.timed_out_until`\"\n\n#: ../../api.rst:2245\nmsgid \"A member's role has been updated. This triggers when a member either gains a role or loses a role.\"\nmsgstr \"メンバーのロールの更新。これは、メンバーがロールを得たり、失った場合に発生します。\"\n\n#: ../../api.rst:2248\nmsgid \"When this is the action, the type of :attr:`~AuditLogEntry.target` is the :class:`Member`, :class:`User`, or :class:`Object` who got the role.\"\nmsgstr \"これが上記のactionならば、 :attr:`~AuditLogEntry.target` の型は、ロールの更新が行われた :class:`Member` 、 :class:`User` 、または :class:`Object` になります。\"\n\n#: ../../api.rst:2258\nmsgid \":attr:`~AuditLogDiff.roles`\"\nmsgstr \":attr:`~AuditLogDiff.roles`\"\n\n#: ../../api.rst:2262\nmsgid \"A member's voice channel has been updated. This triggers when a member is moved to a different voice channel.\"\nmsgstr \"メンバーのボイスチャンネルの更新。これは、メンバーが他のボイスチャンネルに移動させられた時に発生します。\"\n\n#: ../../api.rst:2268\nmsgid \"``channel``: A :class:`TextChannel` or :class:`Object` with the channel ID where the members were moved.\"\nmsgstr \"``channel`` ： メンバーの移動先の :class:`TextChannel` か チャンネルIDを持つ :class:`Object` 。\"\n\n#: ../../api.rst:2269\nmsgid \"``count``: An integer specifying how many members were moved.\"\nmsgstr \"``count`` ： 移動されたメンバーの数を示す整数。\"\n\n#: ../../api.rst:2275\nmsgid \"A member's voice state has changed. This triggers when a member is force disconnected from voice.\"\nmsgstr \"メンバーのボイス状態の変更。これはメンバーがボイスから強制的に切断された場合に発生します。\"\n\n#: ../../api.rst:2281\nmsgid \"``count``: An integer specifying how many members were disconnected.\"\nmsgstr \"``count`` ： 切断されたメンバーの数を示す整数。\"\n\n#: ../../api.rst:2287\nmsgid \"A bot was added to the guild.\"\nmsgstr \"ボットのギルドへの追加。\"\n\n#: ../../api.rst:2289\nmsgid \"When this is the action, the type of :attr:`~AuditLogEntry.target` is the :class:`Member`, :class:`User`, or :class:`Object` which was added to the guild.\"\nmsgstr \"これが上記のactionならば、 :attr:`~AuditLogEntry.target` の型は、ギルドに追加された :class:`Member` 、 :class:`User` 、または :class:`Object` になります。\"\n\n#: ../../api.rst:2296\nmsgid \"A new role was created.\"\nmsgstr \"新しいロールの作成。\"\n\n#: ../../api.rst:2298\n#: ../../api.rst:2321\n#: ../../api.rst:2338\nmsgid \"When this is the action, the type of :attr:`~AuditLogEntry.target` is the :class:`Role` or a :class:`Object` with the ID.\"\nmsgstr \"これが上記のactionならば、 :attr:`~AuditLogEntry.target` の型は、IDが設定されている :class:`Role` か、 :class:`Object` のいずれかになります。\"\n\n#: ../../api.rst:2303\n#: ../../api.rst:2326\n#: ../../api.rst:2343\nmsgid \":attr:`~AuditLogDiff.colour`\"\nmsgstr \":attr:`~AuditLogDiff.colour`\"\n\n#: ../../api.rst:2304\n#: ../../api.rst:2327\n#: ../../api.rst:2344\nmsgid \":attr:`~AuditLogDiff.mentionable`\"\nmsgstr \":attr:`~AuditLogDiff.mentionable`\"\n\n#: ../../api.rst:2305\n#: ../../api.rst:2328\n#: ../../api.rst:2345\nmsgid \":attr:`~AuditLogDiff.hoist`\"\nmsgstr \":attr:`~AuditLogDiff.hoist`\"\n\n#: ../../api.rst:2307\n#: ../../api.rst:2330\nmsgid \":attr:`~AuditLogDiff.unicode_emoji`\"\nmsgstr \":attr:`~AuditLogDiff.unicode_emoji`\"\n\n#: ../../api.rst:2309\n#: ../../api.rst:2332\n#: ../../api.rst:2347\nmsgid \":attr:`~AuditLogDiff.permissions`\"\nmsgstr \":attr:`~AuditLogDiff.permissions`\"\n\n#: ../../api.rst:2313\nmsgid \"A role was updated. This triggers in the following situations:\"\nmsgstr \"ロールの何らかの更新。これのトリガーとなるのは以下の場合です：\"\n\n#: ../../api.rst:2315\nmsgid \"The name has changed\"\nmsgstr \"名前の更新。\"\n\n#: ../../api.rst:2316\nmsgid \"The permissions have changed\"\nmsgstr \"権限の更新。\"\n\n#: ../../api.rst:2317\nmsgid \"The colour has changed\"\nmsgstr \"色の更新。\"\n\n#: ../../api.rst:2318\nmsgid \"The role icon (or unicode emoji) has changed\"\nmsgstr \"ロールアイコン （または Unicode 絵文字）の変更。\"\n\n#: ../../api.rst:2319\nmsgid \"Its hoist/mentionable state has changed\"\nmsgstr \"ロールメンバーのオンライン表示、ロールへのメンションの許可の変更。\"\n\n#: ../../api.rst:2336\nmsgid \"A role was deleted.\"\nmsgstr \"ロールの削除。\"\n\n#: ../../api.rst:2351\nmsgid \"An invite was created.\"\nmsgstr \"招待の作成。\"\n\n#: ../../api.rst:2353\nmsgid \"When this is the action, the type of :attr:`~AuditLogEntry.target` is the :class:`Invite` that was created.\"\nmsgstr \"これが上記のactionならば、:attr:`~AuditLogEntry.target` の型は作成された招待に該当する :class:`Invite` になります。\"\n\n#: ../../api.rst:2358\n#: ../../api.rst:2382\nmsgid \":attr:`~AuditLogDiff.max_age`\"\nmsgstr \":attr:`~AuditLogDiff.max_age`\"\n\n#: ../../api.rst:2359\n#: ../../api.rst:2383\nmsgid \":attr:`~AuditLogDiff.code`\"\nmsgstr \":attr:`~AuditLogDiff.code`\"\n\n#: ../../api.rst:2360\n#: ../../api.rst:2384\nmsgid \":attr:`~AuditLogDiff.temporary`\"\nmsgstr \":attr:`~AuditLogDiff.temporary`\"\n\n#: ../../api.rst:2361\n#: ../../api.rst:2385\nmsgid \":attr:`~AuditLogDiff.inviter`\"\nmsgstr \":attr:`~AuditLogDiff.inviter`\"\n\n#: ../../api.rst:2362\n#: ../../api.rst:2386\n#: ../../api.rst:2399\n#: ../../api.rst:2415\n#: ../../api.rst:2428\nmsgid \":attr:`~AuditLogDiff.channel`\"\nmsgstr \":attr:`~AuditLogDiff.channel`\"\n\n#: ../../api.rst:2363\n#: ../../api.rst:2387\nmsgid \":attr:`~AuditLogDiff.uses`\"\nmsgstr \":attr:`~AuditLogDiff.uses`\"\n\n#: ../../api.rst:2364\n#: ../../api.rst:2388\nmsgid \":attr:`~AuditLogDiff.max_uses`\"\nmsgstr \":attr:`~AuditLogDiff.max_uses`\"\n\n#: ../../api.rst:2368\nmsgid \"An invite was updated.\"\nmsgstr \"招待の更新。\"\n\n#: ../../api.rst:2370\nmsgid \"When this is the action, the type of :attr:`~AuditLogEntry.target` is the :class:`Invite` that was updated.\"\nmsgstr \"これが上記のactionならば、:attr:`~AuditLogEntry.target` の型は更新された招待に該当する :class:`Invite` になります。\"\n\n#: ../../api.rst:2375\nmsgid \"An invite was deleted.\"\nmsgstr \"招待の削除。\"\n\n#: ../../api.rst:2377\nmsgid \"When this is the action, the type of :attr:`~AuditLogEntry.target` is the :class:`Invite` that was deleted.\"\nmsgstr \"これが上記のactionならば、:attr:`~AuditLogEntry.target` のタイプは削除された招待に該当する :class:`Invite` になります。\"\n\n#: ../../api.rst:2392\nmsgid \"A webhook was created.\"\nmsgstr \"Webhookの作成。\"\n\n#: ../../api.rst:2394\n#: ../../api.rst:2410\n#: ../../api.rst:2423\nmsgid \"When this is the action, the type of :attr:`~AuditLogEntry.target` is the :class:`Object` with the webhook ID.\"\nmsgstr \"これが上記のactionならば、 :attr:`~AuditLogEntry.target` のタイプは、webhook IDが設定されている :class:`Object` になります。\"\n\n#: ../../api.rst:2401\n#: ../../api.rst:2430\nmsgid \":attr:`~AuditLogDiff.type` (always set to ``1`` if so)\"\nmsgstr \":attr:`~AuditLogDiff.type` (その場合は常に ``1`` です。)\"\n\n#: ../../api.rst:2405\nmsgid \"A webhook was updated. This trigger in the following situations:\"\nmsgstr \"Webhookの更新。これのトリガーとなるのは以下の場合です。\"\n\n#: ../../api.rst:2407\nmsgid \"The webhook name changed\"\nmsgstr \"Webhook名が変更されたとき\"\n\n#: ../../api.rst:2408\nmsgid \"The webhook channel changed\"\nmsgstr \"Webhookチャンネルが変更されたとき\"\n\n#: ../../api.rst:2417\nmsgid \":attr:`~AuditLogDiff.avatar`\"\nmsgstr \":attr:`~AuditLogDiff.avatar`\"\n\n#: ../../api.rst:2421\nmsgid \"A webhook was deleted.\"\nmsgstr \"Webhookの削除。\"\n\n#: ../../api.rst:2434\nmsgid \"An emoji was created.\"\nmsgstr \"絵文字の作成。\"\n\n#: ../../api.rst:2436\n#: ../../api.rst:2447\nmsgid \"When this is the action, the type of :attr:`~AuditLogEntry.target` is the :class:`Emoji` or :class:`Object` with the emoji ID.\"\nmsgstr \"これが上記のactionならば、 :attr:`~AuditLogEntry.target` の型は、 :class:`Emoji` または 絵文字IDが設定された :class:`Object` です。\"\n\n#: ../../api.rst:2445\nmsgid \"An emoji was updated. This triggers when the name has changed.\"\nmsgstr \"絵文字に対する何らかの更新。これは名前が変更されたときに発生します。\"\n\n#: ../../api.rst:2456\nmsgid \"An emoji was deleted.\"\nmsgstr \"絵文字の削除。\"\n\n#: ../../api.rst:2458\nmsgid \"When this is the action, the type of :attr:`~AuditLogEntry.target` is the :class:`Object` with the emoji ID.\"\nmsgstr \"これが上記のactionならば、 :attr:`~AuditLogEntry.target` の型は、絵文字IDが設定されている :class:`Object` になります。\"\n\n#: ../../api.rst:2467\nmsgid \"A message was deleted by a moderator. Note that this only triggers if the message was deleted by someone other than the author.\"\nmsgstr \"管理者によるメッセージの削除。なお、これのトリガーとなるのは、メッセージが投稿者以外によって削除された場合のみです。\"\n\n#: ../../api.rst:2470\nmsgid \"When this is the action, the type of :attr:`~AuditLogEntry.target` is the :class:`Member`, :class:`User`, or :class:`Object` who had their message deleted.\"\nmsgstr \"これが上記のactionならば、 :attr:`~AuditLogEntry.target` の型は、削除されたメッセージの送信者である :class:`Member` 、 :class:`User` 、または :class:`Object` になります。\"\n\n#: ../../api.rst:2476\n#: ../../api.rst:2489\nmsgid \"``count``: An integer specifying how many messages were deleted.\"\nmsgstr \"``count`` ： 削除されたメッセージの数を示す整数。\"\n\n#: ../../api.rst:2477\nmsgid \"``channel``: A :class:`TextChannel` or :class:`Object` with the channel ID where the message got deleted.\"\nmsgstr \"``channel`` ： メッセージが削除された :class:`TextChannel` か チャンネルIDを持つ :class:`Object` 。\"\n\n#: ../../api.rst:2481\nmsgid \"Messages were bulk deleted by a moderator.\"\nmsgstr \"管理者によるメッセージの一括削除。\"\n\n#: ../../api.rst:2483\nmsgid \"When this is the action, the type of :attr:`~AuditLogEntry.target` is the :class:`TextChannel` or :class:`Object` with the ID of the channel that was purged.\"\nmsgstr \"これが上記のactionならば、 :attr:`~AuditLogEntry.target` の型は、 :class:`TextChannel` またはメッセージが一括削除されたチャンネルIDが設定された :class:`Object` です。\"\n\n#: ../../api.rst:2495\nmsgid \"A message was pinned in a channel.\"\nmsgstr \"チャンネルへのメッセージのピン留め。\"\n\n#: ../../api.rst:2497\nmsgid \"When this is the action, the type of :attr:`~AuditLogEntry.target` is the :class:`Member`, :class:`User`, or :class:`Object` who had their message pinned.\"\nmsgstr \"これが上記のactionならば、 :attr:`~AuditLogEntry.target` の型は、ピン留めされたメッセージの送信者である :class:`Member` 、 :class:`User` 、または :class:`Object` になります。\"\n\n#: ../../api.rst:2503\nmsgid \"``channel``: A :class:`TextChannel` or :class:`Object` with the channel ID where the message was pinned.\"\nmsgstr \"``channel`` ： メッセージがピン留めされた :class:`TextChannel` か チャンネルIDを持つ :class:`Object` 。\"\n\n#: ../../api.rst:2504\nmsgid \"``message_id``: the ID of the message which was pinned.\"\nmsgstr \"``message_id`` ： ピン留めされたメッセージのID。\"\n\n#: ../../api.rst:2510\nmsgid \"A message was unpinned in a channel.\"\nmsgstr \"チャンネルからのメッセージのピン留め解除。\"\n\n#: ../../api.rst:2512\nmsgid \"When this is the action, the type of :attr:`~AuditLogEntry.target` is the :class:`Member`, :class:`User`, or :class:`Object` who had their message unpinned.\"\nmsgstr \"これが上記のactionならば、 :attr:`~AuditLogEntry.target` の型は、ピン留めが外されたメッセージの送信者である :class:`Member` 、 :class:`User` 、または :class:`Object` になります。\"\n\n#: ../../api.rst:2518\nmsgid \"``channel``: A :class:`TextChannel` or :class:`Object` with the channel ID where the message was unpinned.\"\nmsgstr \"``channel`` ： メッセージのピン留めが外された :class:`TextChannel` か チャンネルIDを持つ :class:`Object` 。\"\n\n#: ../../api.rst:2519\nmsgid \"``message_id``: the ID of the message which was unpinned.\"\nmsgstr \"``message_id`` ： ピン留めが外されたメッセージのID。\"\n\n#: ../../api.rst:2525\nmsgid \"A guild integration was created.\"\nmsgstr \"ギルドの連携サービスの作成。\"\n\n#: ../../api.rst:2527\nmsgid \"When this is the action, the type of :attr:`~AuditLogEntry.target` is a :class:`PartialIntegration` or :class:`Object` with the integration ID of the integration which was created.\"\nmsgstr \"これが上記のactionならば、 :attr:`~AuditLogEntry.target` の型は、 :class:`PartialIntegration` または作成されたインテグレーションのIDを持つ :class:`Object` になります。\"\n\n#: ../../api.rst:2535\nmsgid \"A guild integration was updated.\"\nmsgstr \"ギルド連携サービスの更新。\"\n\n#: ../../api.rst:2537\nmsgid \"When this is the action, the type of :attr:`~AuditLogEntry.target` is a :class:`PartialIntegration` or :class:`Object` with the integration ID of the integration which was updated.\"\nmsgstr \"これが上記のactionならば、 :attr:`~AuditLogEntry.target` の型は、 :class:`PartialIntegration` または更新されたインテグレーションのIDを持つ :class:`Object` になります。\"\n\n#: ../../api.rst:2545\nmsgid \"A guild integration was deleted.\"\nmsgstr \"ギルド連携サービスの削除。\"\n\n#: ../../api.rst:2547\nmsgid \"When this is the action, the type of :attr:`~AuditLogEntry.target` is a :class:`PartialIntegration` or :class:`Object` with the integration ID of the integration which was deleted.\"\nmsgstr \"これが上記のactionならば、 :attr:`~AuditLogEntry.target` の型は、 :class:`PartialIntegration` または削除されたインテグレーションのIDを持つ :class:`Object` になります。\"\n\n#: ../../api.rst:2555\nmsgid \"A stage instance was started.\"\nmsgstr \"ステージインスタンスの開始。\"\n\n#: ../../api.rst:2557\nmsgid \"When this is the action, the type of :attr:`~AuditLogEntry.target` is the :class:`StageInstance` or :class:`Object` with the ID of the stage instance which was created.\"\nmsgstr \"これが上記のactionならば、 :attr:`~AuditLogEntry.target` の型は、 :class:`StageInstance` または作成されたステージインスタンスのIDが設定された :class:`Object` です。\"\n\n#: ../../api.rst:2564\n#: ../../api.rst:2579\nmsgid \":attr:`~AuditLogDiff.privacy_level`\"\nmsgstr \":attr:`~AuditLogDiff.privacy_level`\"\n\n#: ../../api.rst:2570\nmsgid \"A stage instance was updated.\"\nmsgstr \"ステージインスタンスの更新。\"\n\n#: ../../api.rst:2572\nmsgid \"When this is the action, the type of :attr:`~AuditLogEntry.target` is the :class:`StageInstance` or :class:`Object` with the ID of the stage instance which was updated.\"\nmsgstr \"これが上記のactionならば、 :attr:`~AuditLogEntry.target` の型は、 :class:`StageInstance` または更新されたステージインスタンスのIDが設定された :class:`Object` です。\"\n\n#: ../../api.rst:2585\nmsgid \"A stage instance was ended.\"\nmsgstr \"ステージインスタンスの終了。\"\n\n#: ../../api.rst:2591\nmsgid \"A sticker was created.\"\nmsgstr \"スタンプの作成。\"\n\n#: ../../api.rst:2593\nmsgid \"When this is the action, the type of :attr:`~AuditLogEntry.target` is the :class:`GuildSticker` or :class:`Object` with the ID of the sticker which was created.\"\nmsgstr \"これが上記のactionならば、 :attr:`~AuditLogEntry.target` の型は、 :class:`GuildSticker` または作成されたスタンプのIDが設定された :class:`Object` です。\"\n\n#: ../../api.rst:2600\n#: ../../api.rst:2619\n#: ../../api.rst:2638\nmsgid \":attr:`~AuditLogDiff.emoji`\"\nmsgstr \":attr:`~AuditLogDiff.emoji`\"\n\n#: ../../api.rst:2602\n#: ../../api.rst:2621\n#: ../../api.rst:2640\nmsgid \":attr:`~AuditLogDiff.format_type`\"\nmsgstr \":attr:`~AuditLogDiff.format_type`\"\n\n#: ../../api.rst:2604\n#: ../../api.rst:2623\n#: ../../api.rst:2642\nmsgid \":attr:`~AuditLogDiff.available`\"\nmsgstr \":attr:`~AuditLogDiff.available`\"\n\n#: ../../api.rst:2610\nmsgid \"A sticker was updated.\"\nmsgstr \"スタンプの更新。\"\n\n#: ../../api.rst:2612\n#: ../../api.rst:2631\nmsgid \"When this is the action, the type of :attr:`~AuditLogEntry.target` is the :class:`GuildSticker` or :class:`Object` with the ID of the sticker which was updated.\"\nmsgstr \"これが上記のactionならば、 :attr:`~AuditLogEntry.target` の型は、 :class:`GuildSticker` または更新されたスタンプのIDが設定された :class:`Object` です。\"\n\n#: ../../api.rst:2629\nmsgid \"A sticker was deleted.\"\nmsgstr \"スタンプの削除。\"\n\n#: ../../api.rst:2648\n#: ../../api.rst:2667\n#: ../../api.rst:2686\nmsgid \"A scheduled event was created.\"\nmsgstr \"スケジュールイベントの作成。\"\n\n#: ../../api.rst:2650\nmsgid \"When this is the action, the type of :attr:`~AuditLogEntry.target` is the :class:`ScheduledEvent` or :class:`Object` with the ID of the event which was created.\"\nmsgstr \"これが上記のactionならば、 :attr:`~AuditLogEntry.target` の型は、 :class:`ScheduledEvent` または作成されたスケジュールイベントのIDが設定された :class:`Object` です。\"\n\n#: ../../api.rst:2654\n#: ../../api.rst:2673\n#: ../../api.rst:2692\nmsgid \"Possible attributes for :class:`AuditLogDiff`: - :attr:`~AuditLogDiff.name` - :attr:`~AuditLogDiff.channel` - :attr:`~AuditLogDiff.description` - :attr:`~AuditLogDiff.privacy_level` - :attr:`~AuditLogDiff.status` - :attr:`~AuditLogDiff.entity_type` - :attr:`~AuditLogDiff.cover_image`\"\nmsgstr \":class:`AuditLogDiff` の可能な属性: - :attr:`~AuditLogDiff.name` - :attr:`~AuditLogDiff.channel` - :attr:`~AuditLogDiff.description` - :attr:`~AuditLogDiff.privacy_level` - :attr:`~AuditLogDiff.status` - :attr:`~AuditLogDiff.entity_type` - :attr:`~AuditLogDiff.cover_image`\"\n\n#: ../../api.rst:2669\nmsgid \"When this is the action, the type of :attr:`~AuditLogEntry.target` is the :class:`ScheduledEvent` or :class:`Object` with the ID of the event which was updated.\"\nmsgstr \"これが上記のactionならば、 :attr:`~AuditLogEntry.target` の型は、 :class:`ScheduledEvent` または更新されたスケジュールイベントのIDが設定された :class:`Object` です。\"\n\n#: ../../api.rst:2688\nmsgid \"When this is the action, the type of :attr:`~AuditLogEntry.target` is the :class:`ScheduledEvent` or :class:`Object` with the ID of the event which was deleted.\"\nmsgstr \"これが上記のactionならば、 :attr:`~AuditLogEntry.target` の型は、 :class:`ScheduledEvent` または削除されたスケジュールイベントのIDが設定された :class:`Object` です。\"\n\n#: ../../api.rst:2705\nmsgid \"A thread was created.\"\nmsgstr \"スレッドの作成。\"\n\n#: ../../api.rst:2707\nmsgid \"When this is the action, the type of :attr:`~AuditLogEntry.target` is the :class:`Thread` or :class:`Object` with the ID of the thread which was created.\"\nmsgstr \"これが上記のactionならば、 :attr:`~AuditLogEntry.target` の型は、 :class:`Thread` または作成されたスレッドのIDが設定された :class:`Object` です。\"\n\n#: ../../api.rst:2714\n#: ../../api.rst:2732\n#: ../../api.rst:2750\nmsgid \":attr:`~AuditLogDiff.archived`\"\nmsgstr \":attr:`~AuditLogDiff.archived`\"\n\n#: ../../api.rst:2715\n#: ../../api.rst:2733\n#: ../../api.rst:2751\nmsgid \":attr:`~AuditLogDiff.locked`\"\nmsgstr \":attr:`~AuditLogDiff.locked`\"\n\n#: ../../api.rst:2716\n#: ../../api.rst:2734\n#: ../../api.rst:2752\nmsgid \":attr:`~AuditLogDiff.auto_archive_duration`\"\nmsgstr \":attr:`~AuditLogDiff.auto_archive_duration`\"\n\n#: ../../api.rst:2717\n#: ../../api.rst:2735\n#: ../../api.rst:2753\nmsgid \":attr:`~AuditLogDiff.invitable`\"\nmsgstr \":attr:`~AuditLogDiff.invitable`\"\n\n#: ../../api.rst:2723\nmsgid \"A thread was updated.\"\nmsgstr \"スレッドの更新。\"\n\n#: ../../api.rst:2725\nmsgid \"When this is the action, the type of :attr:`~AuditLogEntry.target` is the :class:`Thread` or :class:`Object` with the ID of the thread which was updated.\"\nmsgstr \"これが上記のactionならば、 :attr:`~AuditLogEntry.target` の型は、 :class:`Thread` または更新されたスレッドのIDが設定された :class:`Object` です。\"\n\n#: ../../api.rst:2741\nmsgid \"A thread was deleted.\"\nmsgstr \"スレッドの削除。\"\n\n#: ../../api.rst:2743\nmsgid \"When this is the action, the type of :attr:`~AuditLogEntry.target` is the :class:`Thread` or :class:`Object` with the ID of the thread which was deleted.\"\nmsgstr \"これが上記のactionならば、 :attr:`~AuditLogEntry.target` の型は、 :class:`Thread` または削除されたスレッドのIDが設定された :class:`Object` です。\"\n\n#: ../../api.rst:2759\nmsgid \"An application command or integrations application command permissions were updated.\"\nmsgstr \"アプリケーションコマンドまたはインテグレーションアプリケーションコマンドの権限の更新。\"\n\n#: ../../api.rst:2762\nmsgid \"When this is the action, the type of :attr:`~AuditLogEntry.target` is a :class:`PartialIntegration` for an integrations general permissions, :class:`~discord.app_commands.AppCommand` for a specific commands permissions, or :class:`Object` with the ID of the command or integration which was updated.\"\nmsgstr \"これが上記のactionならば、 :attr:`~AuditLogEntry.target` の型は、 インテグレーション一般の権限の場合 :class:`PartialIntegration` 、特定のコマンドの権限の場合 :class:`~discord.app_commands.AppCommand` 、あるいは更新されたコマンドまたはインテグレーションのIDが設定された :class:`Object` です。\"\n\n#: ../../api.rst:2768\nmsgid \"When this is the action, the type of :attr:`~AuditLogEntry.extra` is set to an :class:`PartialIntegration` or :class:`Object` with the ID of application that command or integration belongs to.\"\nmsgstr \"これが上記のactionならば、 :attr:`~AuditLogEntry.extra` の型は、 :class:`PartialIntegration` またはコマンドまたはインテグレーションが属するアプリケーションのIDを持つ :class:`Object` になります。\"\n\n#: ../../api.rst:2774\nmsgid \":attr:`~AuditLogDiff.app_command_permissions`\"\nmsgstr \":attr:`~AuditLogDiff.app_command_permissions`\"\n\n#: ../../api.rst:2780\nmsgid \"An automod rule was created.\"\nmsgstr \"自動管理ルールの作成。\"\n\n#: ../../api.rst:2782\n#: ../../api.rst:2803\n#: ../../api.rst:2824\nmsgid \"When this is the action, the type of :attr:`~AuditLogEntry.target` is a :class:`AutoModRule` or :class:`Object` with the ID of the automod rule that was created.\"\nmsgstr \"これが上記のactionならば、 :attr:`~AuditLogEntry.target` のtypeは、 :class:`AutoModRule` または作成された自動管理ルールのIDが設定された :class:`Object` です。\"\n\n#: ../../api.rst:2789\n#: ../../api.rst:2810\n#: ../../api.rst:2831\nmsgid \":attr:`~AuditLogDiff.enabled`\"\nmsgstr \":attr:`~AuditLogDiff.enabled`\"\n\n#: ../../api.rst:2790\n#: ../../api.rst:2811\n#: ../../api.rst:2832\nmsgid \":attr:`~AuditLogDiff.event_type`\"\nmsgstr \":attr:`~AuditLogDiff.event_type`\"\n\n#: ../../api.rst:2791\n#: ../../api.rst:2812\n#: ../../api.rst:2833\nmsgid \":attr:`~AuditLogDiff.trigger_type`\"\nmsgstr \":attr:`~AuditLogDiff.trigger_type`\"\n\n#: ../../api.rst:2792\n#: ../../api.rst:2813\n#: ../../api.rst:2834\nmsgid \":attr:`~AuditLogDiff.trigger`\"\nmsgstr \":attr:`~AuditLogDiff.trigger`\"\n\n#: ../../api.rst:2793\n#: ../../api.rst:2814\n#: ../../api.rst:2835\nmsgid \":attr:`~AuditLogDiff.actions`\"\nmsgstr \":attr:`~AuditLogDiff.actions`\"\n\n#: ../../api.rst:2794\n#: ../../api.rst:2815\n#: ../../api.rst:2836\nmsgid \":attr:`~AuditLogDiff.exempt_roles`\"\nmsgstr \":attr:`~AuditLogDiff.exempt_roles`\"\n\n#: ../../api.rst:2795\n#: ../../api.rst:2816\n#: ../../api.rst:2837\nmsgid \":attr:`~AuditLogDiff.exempt_channels`\"\nmsgstr \":attr:`~AuditLogDiff.exempt_channels`\"\n\n#: ../../api.rst:2801\nmsgid \"An automod rule was updated.\"\nmsgstr \"自動管理ルールの更新。\"\n\n#: ../../api.rst:2822\nmsgid \"An automod rule was deleted.\"\nmsgstr \"自動管理ルールの削除。\"\n\n#: ../../api.rst:2843\nmsgid \"An automod rule blocked a message from being sent.\"\nmsgstr \"自動管理ルールによる送信されたメッセージのブロック。\"\n\n#: ../../api.rst:2845\n#: ../../api.rst:2863\n#: ../../api.rst:2881\nmsgid \"When this is the action, the type of :attr:`~AuditLogEntry.target` is a :class:`Member` with the ID of the person who triggered the automod rule.\"\nmsgstr \"これが上記のactionならば、 :attr:`~AuditLogEntry.target` のtypeは、自動管理ルールを発動させた :class:`Member` になります。\"\n\n#: ../../api.rst:2848\n#: ../../api.rst:2866\n#: ../../api.rst:2884\nmsgid \"When this is the action, the type of :attr:`~AuditLogEntry.extra` is set to an unspecified proxy object with 3 attributes:\"\nmsgstr \"これが上記のactionならば、 :attr:`~AuditLogEntry.extra` は以下の3つの属性を持つプロキシオブジェクトになります：\"\n\n#: ../../api.rst:2851\n#: ../../api.rst:2869\n#: ../../api.rst:2887\nmsgid \"``automod_rule_name``: The name of the automod rule that was triggered.\"\nmsgstr \"``automod_rule_name`` : 発動した自動管理ルールの名前。\"\n\n#: ../../api.rst:2852\n#: ../../api.rst:2870\n#: ../../api.rst:2888\nmsgid \"``automod_rule_trigger_type``: A :class:`AutoModRuleTriggerType` representation of the rule type that was triggered.\"\nmsgstr \"\"\n\n#: ../../api.rst:2853\n#: ../../api.rst:2871\n#: ../../api.rst:2889\nmsgid \"``channel``: The channel in which the automod rule was triggered.\"\nmsgstr \"``channel`` : 自動管理ルールが発動されたチャンネル。\"\n\n#: ../../api.rst:2855\n#: ../../api.rst:2873\n#: ../../api.rst:2891\nmsgid \"When this is the action, :attr:`AuditLogEntry.changes` is empty.\"\nmsgstr \"これが上記のactionなら、 :attr:`~AuditLogEntry.changes` は空になります。\"\n\n#: ../../api.rst:2861\nmsgid \"An automod rule flagged a message.\"\nmsgstr \"自動管理ルールによる送信されたメッセージのフラグ付け。\"\n\n#: ../../api.rst:2879\nmsgid \"An automod rule timed-out a member.\"\nmsgstr \"自動管理ルールによるメンバーのタイムアウト。\"\n\n#: ../../api.rst:2897\nmsgid \"A request to monetize the server was created.\"\nmsgstr \"\"\n\n#: ../../api.rst:2903\nmsgid \"The terms and conditions for creator monetization were accepted.\"\nmsgstr \"\"\n\n#: ../../api.rst:2909\nmsgid \"Represents the category that the :class:`AuditLogAction` belongs to.\"\nmsgstr \":class:`AuditLogAction` が属するカテゴリ。\"\n\n#: ../../api.rst:2911\nmsgid \"This can be retrieved via :attr:`AuditLogEntry.category`.\"\nmsgstr \"これは :attr:`AuditLogEntry.category` で取得できます。\"\n\n#: ../../api.rst:2915\nmsgid \"The action is the creation of something.\"\nmsgstr \"アクションは何かの作成です。\"\n\n#: ../../api.rst:2919\nmsgid \"The action is the deletion of something.\"\nmsgstr \"アクションは何かの削除です。\"\n\n#: ../../api.rst:2923\nmsgid \"The action is the update of something.\"\nmsgstr \"アクションは何かの更新です。\"\n\n#: ../../api.rst:2927\nmsgid \"Represents the membership state of a team member retrieved through :func:`Client.application_info`.\"\nmsgstr \":func:`Client.application_info` で取得したチームメンバーのメンバーシップ状態。\"\n\n#: ../../api.rst:2933\nmsgid \"Represents an invited member.\"\nmsgstr \"招待されたメンバー。\"\n\n#: ../../api.rst:2937\nmsgid \"Represents a member currently in the team.\"\nmsgstr \"現在チームにいるメンバー。\"\n\n#: ../../api.rst:2941\nmsgid \"Represents the type of role of a team member retrieved through :func:`Client.application_info`.\"\nmsgstr \"\"\n\n#: ../../api.rst:2947\nmsgid \"The team member is an admin. This allows them to invite members to the team, access credentials, edit the application, and do most things the owner can do. However they cannot do destructive actions.\"\nmsgstr \"\"\n\n#: ../../api.rst:2952\nmsgid \"The team member is a developer. This allows them to access information, like the client secret or public key. They can also configure interaction endpoints or reset the bot token. Developers cannot invite anyone to the team nor can they do destructive actions.\"\nmsgstr \"\"\n\n#: ../../api.rst:2958\nmsgid \"The team member is a read-only member. This allows them to access information, but not edit anything.\"\nmsgstr \"\"\n\n#: ../../api.rst:2962\nmsgid \"Represents the type of webhook that can be received.\"\nmsgstr \"受け取れるWebhookの種類。\"\n\n#: ../../api.rst:2968\nmsgid \"Represents a webhook that can post messages to channels with a token.\"\nmsgstr \"トークンでチャンネルにメッセージを投稿できるWebhook。\"\n\n#: ../../api.rst:2972\nmsgid \"Represents a webhook that is internally managed by Discord, used for following channels.\"\nmsgstr \"チャンネルのフォローのためDiscord内部で管理されるWebhook。\"\n\n#: ../../api.rst:2976\nmsgid \"Represents a webhook that is used for interactions or applications.\"\nmsgstr \"インタラクションやアプリケーションに用いられるWebhook。\"\n\n#: ../../api.rst:2982\nmsgid \"Represents the behaviour the :class:`Integration` should perform when a user's subscription has finished.\"\nmsgstr \"ユーザーのサブスクリプションが終了した後の :class:`Integration` の動作。\"\n\n#: ../../api.rst:2985\nmsgid \"There is an alias for this called ``ExpireBehavior``.\"\nmsgstr \"``ExpireBehavior`` という名のエイリアスがあります。\"\n\n#: ../../api.rst:2991\nmsgid \"This will remove the :attr:`StreamIntegration.role` from the user when their subscription is finished.\"\nmsgstr \"サブスクリプションが終了したユーザーから :attr:`StreamIntegration.role` を除去します。\"\n\n#: ../../api.rst:2996\nmsgid \"This will kick the user when their subscription is finished.\"\nmsgstr \"サブスクリプションが終了したユーザーをキックします。\"\n\n#: ../../api.rst:3000\nmsgid \"Represents the default avatar of a Discord :class:`User`\"\nmsgstr \"Discord :class:`User` のデフォルトのアバター。\"\n\n#: ../../api.rst:3004\nmsgid \"Represents the default avatar with the colour blurple. See also :attr:`Colour.blurple`\"\nmsgstr \"ブループル色のデフォルトのアバター。 :attr:`Colour.blurple` も参照してください。\"\n\n#: ../../api.rst:3008\nmsgid \"Represents the default avatar with the colour grey. See also :attr:`Colour.greyple`\"\nmsgstr \"灰色のデフォルトのアバター。 :attr:`Colour.greyple` も参照してください。\"\n\n#: ../../api.rst:3012\nmsgid \"An alias for :attr:`grey`.\"\nmsgstr \":attr:`grey` のエイリアス。\"\n\n#: ../../api.rst:3015\nmsgid \"Represents the default avatar with the colour green. See also :attr:`Colour.green`\"\nmsgstr \"緑色のデフォルトのアバター。 :attr:`Colour.green` も参照してください。\"\n\n#: ../../api.rst:3019\nmsgid \"Represents the default avatar with the colour orange. See also :attr:`Colour.orange`\"\nmsgstr \"オレンジ色のデフォルトのアバター。 :attr:`Colour.orange` も参照してください。\"\n\n#: ../../api.rst:3023\nmsgid \"Represents the default avatar with the colour red. See also :attr:`Colour.red`\"\nmsgstr \"赤色のデフォルトのアバター。 :attr:`Colour.red` も参照してください。\"\n\n#: ../../api.rst:3027\nmsgid \"Represents the default avatar with the colour pink. See also :attr:`Colour.pink`\"\nmsgstr \"ピンク色のデフォルトのアバター。 :attr:`Colour.pink` も参照してください。\"\n\n#: ../../api.rst:3034\nmsgid \"Represents the type of sticker.\"\nmsgstr \"スタンプの種類。\"\n\n#: ../../api.rst:3040\nmsgid \"Represents a standard sticker that all Nitro users can use.\"\nmsgstr \"Nitroユーザー全員が使用できる標準スタンプ。\"\n\n#: ../../api.rst:3044\nmsgid \"Represents a custom sticker created in a guild.\"\nmsgstr \"ギルドで作成されたカスタムスタンプ。\"\n\n#: ../../api.rst:3048\nmsgid \"Represents the type of sticker images.\"\nmsgstr \"スタンプ画像の種類。\"\n\n#: ../../api.rst:3054\nmsgid \"Represents a sticker with a png image.\"\nmsgstr \"PNG画像のスタンプ。\"\n\n#: ../../api.rst:3058\nmsgid \"Represents a sticker with an apng image.\"\nmsgstr \"APNG画像のスタンプ。\"\n\n#: ../../api.rst:3062\nmsgid \"Represents a sticker with a lottie image.\"\nmsgstr \"ロッティー画像のスタンプ。\"\n\n#: ../../api.rst:3066\nmsgid \"Represents a sticker with a gif image.\"\nmsgstr \"GIF画像のスタンプ。\"\n\n#: ../../api.rst:3072\nmsgid \"Represents the invite type for voice channel invites.\"\nmsgstr \"ボイスチャンネル招待の招待タイプ。\"\n\n#: ../../api.rst:3078\nmsgid \"The invite doesn't target anyone or anything.\"\nmsgstr \"招待の対象がないもの。\"\n\n#: ../../api.rst:3082\nmsgid \"A stream invite that targets a user.\"\nmsgstr \"ユーザーを対象とするもの。\"\n\n#: ../../api.rst:3086\nmsgid \"A stream invite that targets an embedded application.\"\nmsgstr \"埋め込まれたアプリケーションを対象とするもの。\"\n\n#: ../../api.rst:3090\nmsgid \"Represents the camera video quality mode for voice channel participants.\"\nmsgstr \"ボイスチャンネル参加者のカメラビデオの画質モード。\"\n\n#: ../../api.rst:3096\nmsgid \"Represents auto camera video quality.\"\nmsgstr \"自動のカメラビデオ画質。\"\n\n#: ../../api.rst:3100\nmsgid \"Represents full camera video quality.\"\nmsgstr \"フルのカメラビデオ画質。\"\n\n#: ../../api.rst:3104\nmsgid \"Represents the privacy level of a stage instance or scheduled event.\"\nmsgstr \"ステージインスタンスやスケジュールイベントのプライバシーレベル。\"\n\n#: ../../api.rst:3110\nmsgid \"The stage instance or scheduled event is only accessible within the guild.\"\nmsgstr \"ステージインスタンスやスケジュールイベントはギルド内でのみアクセスできます。\"\n\n#: ../../api.rst:3114\nmsgid \"Represents the NSFW level of a guild.\"\nmsgstr \"ギルドの年齢制限レベル。\"\n\n#: ../../api.rst:3122\nmsgid \"Checks if two NSFW levels are equal.\"\nmsgstr \"二つの年齢制限レベルが等しいかを比較します。\"\n\n#: ../../api.rst:3125\nmsgid \"Checks if two NSFW levels are not equal.\"\nmsgstr \"二つの年齢制限レベルが等しくないかを比較します。\"\n\n#: ../../api.rst:3128\nmsgid \"Checks if a NSFW level is higher than another.\"\nmsgstr \"年齢制限レベルがあるレベルより高いか確認します。\"\n\n#: ../../api.rst:3131\nmsgid \"Checks if a NSFW level is lower than another.\"\nmsgstr \"年齢制限レベルがあるレベルより低いか確認します。\"\n\n#: ../../api.rst:3134\nmsgid \"Checks if a NSFW level is higher or equal to another.\"\nmsgstr \"年齢制限レベルがあるレベルと同じ、又は高いか確認します。\"\n\n#: ../../api.rst:3137\nmsgid \"Checks if a NSFW level is lower or equal to another.\"\nmsgstr \"年齢制限レベルがあるレベルと同じ、又は低いか確認します。\"\n\n#: ../../api.rst:3141\nmsgid \"The guild has not been categorised yet.\"\nmsgstr \"未分類のギルド。\"\n\n#: ../../api.rst:3145\nmsgid \"The guild contains NSFW content.\"\nmsgstr \"年齢制限されたコンテンツを含むギルド。\"\n\n#: ../../api.rst:3149\nmsgid \"The guild does not contain any NSFW content.\"\nmsgstr \"年齢制限されたコンテンツを一切含まないギルド。\"\n\n#: ../../api.rst:3153\nmsgid \"The guild may contain NSFW content.\"\nmsgstr \"年齢制限されたコンテンツを含む可能性のあるギルド。\"\n\n#: ../../api.rst:3157\nmsgid \"Supported locales by Discord. Mainly used for application command localisation.\"\nmsgstr \"Discordでサポートされているロケール。主にアプリケーションコマンドの多言語化に使用されます。\"\n\n#: ../../api.rst:3163\nmsgid \"The ``en-US`` locale.\"\nmsgstr \"``en-US`` ロケール。\"\n\n#: ../../api.rst:3167\nmsgid \"The ``en-GB`` locale.\"\nmsgstr \"``en-GB`` ロケール。\"\n\n#: ../../api.rst:3171\nmsgid \"The ``bg`` locale.\"\nmsgstr \"``bg`` ロケール。\"\n\n#: ../../api.rst:3175\nmsgid \"The ``zh-CN`` locale.\"\nmsgstr \"``zh-CN`` ロケール。\"\n\n#: ../../api.rst:3179\nmsgid \"The ``zh-TW`` locale.\"\nmsgstr \"``zh-TW`` ロケール。\"\n\n#: ../../api.rst:3183\nmsgid \"The ``hr`` locale.\"\nmsgstr \"``hr`` ロケール。\"\n\n#: ../../api.rst:3187\nmsgid \"The ``cs`` locale.\"\nmsgstr \"``cs`` ロケール。\"\n\n#: ../../api.rst:3191\nmsgid \"The ``id`` locale.\"\nmsgstr \"``id`` ロケール。\"\n\n#: ../../api.rst:3197\nmsgid \"The ``da`` locale.\"\nmsgstr \"``da`` ロケール。\"\n\n#: ../../api.rst:3201\nmsgid \"The ``nl`` locale.\"\nmsgstr \"``nl`` ロケール。\"\n\n#: ../../api.rst:3205\nmsgid \"The ``fi`` locale.\"\nmsgstr \"``fi`` ロケール。\"\n\n#: ../../api.rst:3209\nmsgid \"The ``fr`` locale.\"\nmsgstr \"``fr`` ロケール。\"\n\n#: ../../api.rst:3213\nmsgid \"The ``de`` locale.\"\nmsgstr \"``de`` ロケール。\"\n\n#: ../../api.rst:3217\nmsgid \"The ``el`` locale.\"\nmsgstr \"``el`` ロケール。\"\n\n#: ../../api.rst:3221\nmsgid \"The ``hi`` locale.\"\nmsgstr \"``hi`` ロケール。\"\n\n#: ../../api.rst:3225\nmsgid \"The ``hu`` locale.\"\nmsgstr \"``hu`` ロケール。\"\n\n#: ../../api.rst:3229\nmsgid \"The ``it`` locale.\"\nmsgstr \"``it`` ロケール。\"\n\n#: ../../api.rst:3233\nmsgid \"The ``ja`` locale.\"\nmsgstr \"``ja`` ロケール。\"\n\n#: ../../api.rst:3237\nmsgid \"The ``ko`` locale.\"\nmsgstr \"``ko`` ロケール。\"\n\n#: ../../api.rst:3241\nmsgid \"The ``es-419`` locale.\"\nmsgstr \"\"\n\n#: ../../api.rst:3247\nmsgid \"The ``lt`` locale.\"\nmsgstr \"``lt`` ロケール。\"\n\n#: ../../api.rst:3251\nmsgid \"The ``no`` locale.\"\nmsgstr \"``no`` ロケール。\"\n\n#: ../../api.rst:3255\nmsgid \"The ``pl`` locale.\"\nmsgstr \"``pl`` ロケール。\"\n\n#: ../../api.rst:3259\nmsgid \"The ``pt-BR`` locale.\"\nmsgstr \"``pt-BR`` ロケール。\"\n\n#: ../../api.rst:3263\nmsgid \"The ``ro`` locale.\"\nmsgstr \"``ro`` ロケール。\"\n\n#: ../../api.rst:3267\nmsgid \"The ``ru`` locale.\"\nmsgstr \"``ru`` ロケール。\"\n\n#: ../../api.rst:3271\nmsgid \"The ``es-ES`` locale.\"\nmsgstr \"``es-ES`` ロケール。\"\n\n#: ../../api.rst:3275\nmsgid \"The ``sv-SE`` locale.\"\nmsgstr \"``sv-SE`` ロケール。\"\n\n#: ../../api.rst:3279\nmsgid \"The ``th`` locale.\"\nmsgstr \"``th`` ロケール。\"\n\n#: ../../api.rst:3283\nmsgid \"The ``tr`` locale.\"\nmsgstr \"``tr`` ロケール。\"\n\n#: ../../api.rst:3287\nmsgid \"The ``uk`` locale.\"\nmsgstr \"``uk`` ロケール。\"\n\n#: ../../api.rst:3291\nmsgid \"The ``vi`` locale.\"\nmsgstr \"``vi`` ロケール。\"\n\n#: ../../api.rst:3296\nmsgid \"Represents the Multi-Factor Authentication requirement level of a guild.\"\nmsgstr \"ギルドの多要素認証要件レベル。\"\n\n#: ../../api.rst:3304\nmsgid \"Checks if two MFA levels are equal.\"\nmsgstr \"二つのMFAレベルが等しいかを比較します。\"\n\n#: ../../api.rst:3307\nmsgid \"Checks if two MFA levels are not equal.\"\nmsgstr \"二つのMFAレベルが等しくないかを比較します。\"\n\n#: ../../api.rst:3310\nmsgid \"Checks if a MFA level is higher than another.\"\nmsgstr \"多要素認証レベルがあるレベルより厳しいか確認します。\"\n\n#: ../../api.rst:3313\nmsgid \"Checks if a MFA level is lower than another.\"\nmsgstr \"多要素認証レベルがあるレベルより緩いか確認します。\"\n\n#: ../../api.rst:3316\nmsgid \"Checks if a MFA level is higher or equal to another.\"\nmsgstr \"多要素認証レベルがあるレベルと同じ、又は厳しいか確認します。\"\n\n#: ../../api.rst:3319\nmsgid \"Checks if a MFA level is lower or equal to another.\"\nmsgstr \"多要素認証レベルがあるレベルと同じ、又は緩いか確認します。\"\n\n#: ../../api.rst:3323\nmsgid \"The guild has no MFA requirement.\"\nmsgstr \"多要素認証要件がないギルド。\"\n\n#: ../../api.rst:3327\nmsgid \"The guild requires 2 factor authentication.\"\nmsgstr \"二要素認証を必須とするギルド。\"\n\n#: ../../api.rst:3331\nmsgid \"Represents the type of entity that a scheduled event is for.\"\nmsgstr \"スケジュールイベントの開催場所の種類。\"\n\n#: ../../api.rst:3337\nmsgid \"The scheduled event will occur in a stage instance.\"\nmsgstr \"ステージインスタンスで起こるスケジュールイベント。\"\n\n#: ../../api.rst:3341\nmsgid \"The scheduled event will occur in a voice channel.\"\nmsgstr \"ボイスチャンネルで起こるスケジュールイベント。\"\n\n#: ../../api.rst:3345\nmsgid \"The scheduled event will occur externally.\"\nmsgstr \"外部で起こるスケジュールイベント。\"\n\n#: ../../api.rst:3349\nmsgid \"Represents the status of an event.\"\nmsgstr \"イベントの状態。\"\n\n#: ../../api.rst:3355\nmsgid \"The event is scheduled.\"\nmsgstr \"予定されたイベント。\"\n\n#: ../../api.rst:3359\nmsgid \"The event is active.\"\nmsgstr \"開催中のイベント。\"\n\n#: ../../api.rst:3363\nmsgid \"The event has ended.\"\nmsgstr \"終了したイベント。\"\n\n#: ../../api.rst:3367\nmsgid \"The event has been cancelled.\"\nmsgstr \"キャンセルされたイベント。\"\n\n#: ../../api.rst:3371\nmsgid \"An alias for :attr:`cancelled`.\"\nmsgstr \":attr:`cancelled` のエイリアス。\"\n\n#: ../../api.rst:3375\nmsgid \"An alias for :attr:`completed`.\"\nmsgstr \":attr:`completed` のエイリアス。\"\n\n#: ../../api.rst:3379\nmsgid \"Represents the trigger type of an automod rule.\"\nmsgstr \"自動管理ルールの発動条件の種類を表します。\"\n\n#: ../../api.rst:3385\nmsgid \"The rule will trigger when a keyword is mentioned.\"\nmsgstr \"キーワードに言及したときに発動されるルール。\"\n\n#: ../../api.rst:3389\nmsgid \"The rule will trigger when a harmful link is posted.\"\nmsgstr \"有害なリンクを投稿したときに発動されるルール。\"\n\n#: ../../api.rst:3393\nmsgid \"The rule will trigger when a spam message is posted.\"\nmsgstr \"スパムメッセージを投稿したときに発動されるルール。\"\n\n#: ../../api.rst:3397\nmsgid \"The rule will trigger when something triggers based on the set keyword preset types.\"\nmsgstr \"事前に定められたキーワードプリセットに基づき発動したときに発動されるルール。\"\n\n#: ../../api.rst:3401\nmsgid \"The rule will trigger when combined number of role and user mentions is greater than the set limit.\"\nmsgstr \"ロールとユーザーのメンションの合計数が設定された制限よりも多い場合に発動されるルール。\"\n\n#: ../../api.rst:3406\nmsgid \"The rule will trigger when a user's profile contains a keyword.\"\nmsgstr \"\"\n\n#: ../../api.rst:3412\nmsgid \"Represents the event type of an automod rule.\"\nmsgstr \"自動管理ルールのイベントの種類を表します。\"\n\n#: ../../api.rst:3418\nmsgid \"The rule will trigger when a message is sent.\"\nmsgstr \"メッセージを投稿したときにルールが発動します。\"\n\n#: ../../api.rst:3422\nmsgid \"The rule will trigger when a member's profile is updated.\"\nmsgstr \"\"\n\n#: ../../api.rst:3428\nmsgid \"Represents the action type of an automod rule.\"\nmsgstr \"自動管理ルールの対応の種類を表します。\"\n\n#: ../../api.rst:3434\nmsgid \"The rule will block a message from being sent.\"\nmsgstr \"メッセージを送信できないようにします。\"\n\n#: ../../api.rst:3438\nmsgid \"The rule will send an alert message to a predefined channel.\"\nmsgstr \"事前に指定したチャンネルに警告メッセージを送信します。\"\n\n#: ../../api.rst:3442\nmsgid \"The rule will timeout a user.\"\nmsgstr \"ユーザーをタイムアウトします。\"\n\n#: ../../api.rst:3446\nmsgid \"Similar to :attr:`timeout`, except the user will be timed out indefinitely. This will request the user to edit it's profile.\"\nmsgstr \"\"\n\n#: ../../api.rst:3453\nmsgid \"Represents how a forum's posts are layed out in the client.\"\nmsgstr \"フォーラムの投稿がクライアントでどのように配列されるかを表します。\"\n\n#: ../../api.rst:3459\nmsgid \"No default has been set, so it is up to the client to know how to lay it out.\"\nmsgstr \"デフォルトが設定されていないので、配列方法はクライアントによります。\"\n\n#: ../../api.rst:3463\nmsgid \"Displays posts as a list.\"\nmsgstr \"投稿を一覧として表示します。\"\n\n#: ../../api.rst:3467\nmsgid \"Displays posts as a collection of tiles.\"\nmsgstr \"投稿をタイルの集まりとして表示します。\"\n\n#: ../../api.rst:3472\nmsgid \"Represents how a forum's posts are sorted in the client.\"\nmsgstr \"フォーラムの投稿がクライアントでどのように並び替えられるかを表します。\"\n\n#: ../../api.rst:3478\nmsgid \"Sort forum posts by activity.\"\nmsgstr \"最終更新日時順でフォーラム投稿を並び替えます。\"\n\n#: ../../api.rst:3482\nmsgid \"Sort forum posts by creation time (from most recent to oldest).\"\nmsgstr \"作成日時順 (新しいものから古いものの順) でフォーラム投稿を並び替えます。\"\n\n#: ../../api.rst:3486\nmsgid \"Represents the default value of a select menu.\"\nmsgstr \"\"\n\n#: ../../api.rst:3492\nmsgid \"The underlying type of the ID is a user.\"\nmsgstr \"\"\n\n#: ../../api.rst:3496\nmsgid \"The underlying type of the ID is a role.\"\nmsgstr \"\"\n\n#: ../../api.rst:3500\nmsgid \"The underlying type of the ID is a channel or thread.\"\nmsgstr \"\"\n\n#: ../../api.rst:3505\nmsgid \"Represents the type of a SKU.\"\nmsgstr \"\"\n\n#: ../../api.rst:3511\nmsgid \"The SKU is a recurring subscription.\"\nmsgstr \"\"\n\n#: ../../api.rst:3515\nmsgid \"The SKU is a system-generated group which is created for each :attr:`SKUType.subscription`.\"\nmsgstr \"\"\n\n#: ../../api.rst:3520\nmsgid \"Represents the type of an entitlement.\"\nmsgstr \"\"\n\n#: ../../api.rst:3526\nmsgid \"The entitlement was purchased as an app subscription.\"\nmsgstr \"\"\n\n#: ../../api.rst:3531\nmsgid \"Represents the type of an entitlement owner.\"\nmsgstr \"\"\n\n#: ../../api.rst:3537\nmsgid \"The entitlement owner is a guild.\"\nmsgstr \"\"\n\n#: ../../api.rst:3541\nmsgid \"The entitlement owner is a user.\"\nmsgstr \"\"\n\n#: ../../api.rst:3547\nmsgid \"Audit Log Data\"\nmsgstr \"監査ログデータ\"\n\n#: ../../api.rst:3549\nmsgid \"Working with :meth:`Guild.audit_logs` is a complicated process with a lot of machinery involved. The library attempts to make it easy to use and friendly. In order to accomplish this goal, it must make use of a couple of data classes that aid in this goal.\"\nmsgstr \":meth:`Guild.audit_logs` の使用は複雑なプロセスです。このライブラリーはこれを使いやすくフレンドリーにしようと試みています。この目標の達成のためにいくつかのデータクラスを使用しています。\"\n\n#: ../../api.rst:3554\nmsgid \"AuditLogEntry\"\nmsgstr \"AuditLogEntry\"\n\n#: ../../../discord/audit_logs.py:docstring of discord.audit_logs.AuditLogEntry:1\nmsgid \"Represents an Audit Log entry.\"\nmsgstr \"監査ログの項目。\"\n\n#: ../../../discord/audit_logs.py:docstring of discord.audit_logs.AuditLogEntry:3\nmsgid \"You retrieve these via :meth:`Guild.audit_logs`.\"\nmsgstr \"これらは :meth:`Guild.audit_logs` から取得できます。\"\n\n#: ../../../discord/audit_logs.py:docstring of discord.audit_logs.AuditLogEntry:9\nmsgid \"Checks if two entries are equal.\"\nmsgstr \"二つの項目が等しいかを比較します。\"\n\n#: ../../../discord/audit_logs.py:docstring of discord.audit_logs.AuditLogEntry:13\nmsgid \"Checks if two entries are not equal.\"\nmsgstr \"二つの項目が等しくないかを比較します。\"\n\n#: ../../../discord/audit_logs.py:docstring of discord.audit_logs.AuditLogEntry:17\nmsgid \"Returns the entry's hash.\"\nmsgstr \"エントリーのハッシュを返します。\"\n\n#: ../../../discord/audit_logs.py:docstring of discord.audit_logs.AuditLogEntry:19\nmsgid \"Audit log entries are now comparable and hashable.\"\nmsgstr \"監査ログの項目が比較・ハッシュ可能になりました。\"\n\n#: ../../../discord/audit_logs.py:docstring of discord.audit_logs.AuditLogEntry:24\nmsgid \"The action that was done.\"\nmsgstr \"行われたアクション。\"\n\n#: ../../../discord/audit_logs.py:docstring of discord.audit_logs.AuditLogEntry:26\nmsgid \":class:`AuditLogAction`\"\nmsgstr \":class:`AuditLogAction`\"\n\n#: ../../../discord/audit_logs.py:docstring of discord.audit_logs.AuditLogEntry:30\nmsgid \"The user who initiated this action. Usually a :class:`Member`\\\\, unless gone then it's a :class:`User`.\"\nmsgstr \"アクションを開始したユーザー。通常は :class:`Member` ですが、存在しない場合は :class:`User` です。\"\n\n#: ../../../discord/audit_logs.py:docstring of discord.audit_logs.AuditLogEntry:33\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook:85\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook:60\nmsgid \"Optional[:class:`abc.User`]\"\nmsgstr \"Optional[:class:`abc.User`]\"\n\n#: ../../../discord/audit_logs.py:docstring of discord.audit_logs.AuditLogEntry:37\nmsgid \"The user ID who initiated this action.\"\nmsgstr \"このアクションを行ったユーザーのID。\"\n\n#: ../../../discord/audit_logs.py:docstring of discord.audit_logs.AuditLogEntry:45\nmsgid \"The entry ID.\"\nmsgstr \"項目ID。\"\n\n#: ../../../discord/audit_logs.py:docstring of discord.audit_logs.AuditLogEntry:51\nmsgid \"The guild that this entry belongs to.\"\nmsgstr \"項目が属するギルド。\"\n\n#: ../../../discord/audit_logs.py:docstring of discord.audit_logs.AuditLogEntry:57\nmsgid \"The target that got changed. The exact type of this depends on the action being done.\"\nmsgstr \"変更の対象。正確な型は、実行されるアクションによって異なります。\"\n\n#: ../../../discord/audit_logs.py:docstring of discord.audit_logs.AuditLogEntry:60\n#: ../../../discord/audit_logs.py:docstring of discord.audit_logs.AuditLogEntry:75\nmsgid \"Any\"\nmsgstr \"Any\"\n\n#: ../../../discord/audit_logs.py:docstring of discord.audit_logs.AuditLogEntry:64\nmsgid \"The reason this action was done.\"\nmsgstr \"アクションの理由。\"\n\n#: ../../../discord/audit_logs.py:docstring of discord.audit_logs.AuditLogEntry:70\nmsgid \"Extra information that this entry has that might be useful. For most actions, this is ``None``. However in some cases it contains extra information. See :class:`AuditLogAction` for which actions have this field filled out.\"\nmsgstr \"役立つかもしれない項目の追加の情報。ほとんどのアクションでは ``None`` ですが、場合により追加の情報が含まれます。どのアクションが対応しているかは :class:`AuditLogAction` にて確認してください。\"\n\n#: ../../docstring of discord.AuditLogEntry.created_at:1\nmsgid \"Returns the entry's creation time in UTC.\"\nmsgstr \"項目の作成された時間をUTCで返します。\"\n\n#: ../../docstring of discord.AuditLogEntry.category:1\nmsgid \"The category of the action, if applicable.\"\nmsgstr \"該当する場合、アクションのカテゴリ。\"\n\n#: ../../docstring of discord.AuditLogEntry.category:3\nmsgid \"Optional[:class:`AuditLogActionCategory`]\"\nmsgstr \"Optional[:class:`AuditLogActionCategory`]\"\n\n#: ../../docstring of discord.AuditLogEntry.changes:1\nmsgid \"The list of changes this entry has.\"\nmsgstr \"この項目の変更の一覧。\"\n\n#: ../../docstring of discord.AuditLogEntry.changes:3\nmsgid \":class:`AuditLogChanges`\"\nmsgstr \":class:`AuditLogChanges`\"\n\n#: ../../docstring of discord.AuditLogEntry.before:1\nmsgid \"The target's prior state.\"\nmsgstr \"対象の前の状態。\"\n\n#: ../../docstring of discord.AuditLogEntry.before:3\n#: ../../docstring of discord.AuditLogEntry.after:3\nmsgid \":class:`AuditLogDiff`\"\nmsgstr \":class:`AuditLogDiff`\"\n\n#: ../../docstring of discord.AuditLogEntry.after:1\nmsgid \"The target's subsequent state.\"\nmsgstr \"対象の直後の状態。\"\n\n#: ../../api.rst:3562\nmsgid \"AuditLogChanges\"\nmsgstr \"AuditLogChanges\"\n\n#: ../../api.rst:3568\nmsgid \"An audit log change set.\"\nmsgstr \"監査ログの変更のセット。\"\n\n#: ../../api.rst:3572\nmsgid \"The old value. The attribute has the type of :class:`AuditLogDiff`.\"\nmsgstr \"以前の値。この属性は :class:`AuditLogDiff` 型です。\"\n\n#: ../../api.rst:3574\n#: ../../api.rst:3594\nmsgid \"Depending on the :class:`AuditLogActionCategory` retrieved by :attr:`~AuditLogEntry.category`\\\\, the data retrieved by this attribute differs:\"\nmsgstr \":attr:`~AuditLogEntry.category` で取得される :class:`AuditLogActionCategory` によりこの属性の値が異なります：\"\n\n#: ../../api.rst:3579\n#: ../../api.rst:3599\nmsgid \"Category\"\nmsgstr \"カテゴリー\"\n\n#: ../../api.rst:3581\n#: ../../api.rst:3601\nmsgid \":attr:`~AuditLogActionCategory.create`\"\nmsgstr \":attr:`~AuditLogActionCategory.create`\"\n\n#: ../../api.rst:3581\nmsgid \"All attributes are set to ``None``.\"\nmsgstr \"全ての属性は ``None`` です。\"\n\n#: ../../api.rst:3583\n#: ../../api.rst:3603\nmsgid \":attr:`~AuditLogActionCategory.delete`\"\nmsgstr \":attr:`~AuditLogActionCategory.delete`\"\n\n#: ../../api.rst:3583\nmsgid \"All attributes are set the value before deletion.\"\nmsgstr \"全ての属性は削除前の値に設定されています。\"\n\n#: ../../api.rst:3585\n#: ../../api.rst:3605\nmsgid \":attr:`~AuditLogActionCategory.update`\"\nmsgstr \":attr:`~AuditLogActionCategory.update`\"\n\n#: ../../api.rst:3585\nmsgid \"All attributes are set the value before updating.\"\nmsgstr \"全ての属性は更新前の値に設定されています。\"\n\n#: ../../api.rst:3587\n#: ../../api.rst:3607\nmsgid \"``None``\"\nmsgstr \"``None``\"\n\n#: ../../api.rst:3587\n#: ../../api.rst:3607\nmsgid \"No attributes are set.\"\nmsgstr \"属性が設定されていません。\"\n\n#: ../../api.rst:3592\nmsgid \"The new value. The attribute has the type of :class:`AuditLogDiff`.\"\nmsgstr \"新しい値。この属性は :class:`AuditLogDiff` 型です。\"\n\n#: ../../api.rst:3601\nmsgid \"All attributes are set to the created value\"\nmsgstr \"全ての属性は作成時の値に設定されています。\"\n\n#: ../../api.rst:3603\nmsgid \"All attributes are set to ``None``\"\nmsgstr \"全ての属性は ``None`` です。\"\n\n#: ../../api.rst:3605\nmsgid \"All attributes are set the value after updating.\"\nmsgstr \"全ての属性は更新後の値に設定されています。\"\n\n#: ../../api.rst:3611\nmsgid \"AuditLogDiff\"\nmsgstr \"AuditLogDiff\"\n\n#: ../../api.rst:3617\nmsgid \"Represents an audit log \\\"change\\\" object. A change object has dynamic attributes that depend on the type of action being done. Certain actions map to certain attributes being set.\"\nmsgstr \"監査ログの「変更」オブジェクト。変更オブジェクトには、行われたアクションの種類によって異なる属性があります。特定のアクションが行われた場合に特定の属性が設定されます。\"\n\n#: ../../api.rst:3621\nmsgid \"Note that accessing an attribute that does not match the specified action will lead to an attribute error.\"\nmsgstr \"指定されたアクションに一致しない属性にアクセスすると、AttributeErrorが発生することに注意してください。\"\n\n#: ../../api.rst:3624\nmsgid \"To get a list of attributes that have been set, you can iterate over them. To see a list of all possible attributes that could be set based on the action being done, check the documentation for :class:`AuditLogAction`, otherwise check the documentation below for all attributes that are possible.\"\nmsgstr \"設定された属性のリストを取得するには、イテレートすることができます。 行われたアクションに対応した可能な属性の一覧は、 :class:`AuditLogAction` の説明を確認してください。あるいは、可能なすべての属性について、以下の説明を確認してください。\"\n\n#: ../../api.rst:3633\nmsgid \"Returns an iterator over (attribute, value) tuple of this diff.\"\nmsgstr \"差分の（属性、値）タプルのイテレーターを返します。\"\n\n#: ../../api.rst:3637\nmsgid \"A name of something.\"\nmsgstr \"何かの名前。\"\n\n#: ../../api.rst:3643\nmsgid \"The guild of something.\"\nmsgstr \"ギルド属性。\"\n\n#: ../../api.rst:3649\nmsgid \"A guild's or role's icon. See also :attr:`Guild.icon` or :attr:`Role.icon`.\"\nmsgstr \"ギルドまたはロールのアイコン。 :attr:`Guild.icon` と :attr:`Role.icon` も参照してください。\"\n\n#: ../../api.rst:3655\nmsgid \"The guild's invite splash. See also :attr:`Guild.splash`.\"\nmsgstr \"ギルドの招待のスプラッシュ。 :attr:`Guild.splash` も参照してください。\"\n\n#: ../../api.rst:3661\nmsgid \"The guild's discovery splash. See also :attr:`Guild.discovery_splash`.\"\nmsgstr \"ギルドのディスカバリースプラッシュ。 :attr:`Guild.discovery_splash` も参照してください。\"\n\n#: ../../api.rst:3667\nmsgid \"The guild's banner. See also :attr:`Guild.banner`.\"\nmsgstr \"ギルドのバナー。 :attr:`Guild.banner` も参照してください。\"\n\n#: ../../api.rst:3673\nmsgid \"The guild's owner. See also :attr:`Guild.owner`\"\nmsgstr \"ギルドの所有者。 :attr:`Guild.owner` も参照してください。\"\n\n#: ../../api.rst:3675\nmsgid \"Union[:class:`Member`, :class:`User`]\"\nmsgstr \"Union[:class:`Member`, :class:`User`]\"\n\n#: ../../api.rst:3679\nmsgid \"The guild's AFK channel.\"\nmsgstr \"ギルドのAFKチャンネル。\"\n\n#: ../../api.rst:3681\n#: ../../api.rst:3692\nmsgid \"If this could not be found, then it falls back to a :class:`Object` with the ID being set.\"\nmsgstr \"見つからない場合は、IDが設定された :class:`Object` になります。\"\n\n#: ../../api.rst:3684\nmsgid \"See :attr:`Guild.afk_channel`.\"\nmsgstr \":attr:`Guild.afk_channel` を参照してください。\"\n\n#: ../../api.rst:3686\nmsgid \"Union[:class:`VoiceChannel`, :class:`Object`]\"\nmsgstr \"Union[:class:`VoiceChannel`, :class:`Object`]\"\n\n#: ../../api.rst:3690\nmsgid \"The guild's system channel.\"\nmsgstr \"ギルドのシステムチャンネル。\"\n\n#: ../../api.rst:3695\nmsgid \"See :attr:`Guild.system_channel`.\"\nmsgstr \":attr:`Guild.system_channel` を参照してください。\"\n\n#: ../../api.rst:3697\n#: ../../api.rst:3709\n#: ../../api.rst:3721\n#: ../../api.rst:3748\nmsgid \"Union[:class:`TextChannel`, :class:`Object`]\"\nmsgstr \"Union[:class:`TextChannel`, :class:`Object`]\"\n\n#: ../../api.rst:3702\nmsgid \"The guild's rules channel.\"\nmsgstr \"ギルドのルールチャンネル。\"\n\n#: ../../api.rst:3704\n#: ../../api.rst:3716\n#: ../../api.rst:3745\nmsgid \"If this could not be found then it falls back to a :class:`Object` with the ID being set.\"\nmsgstr \"見つからない場合は、IDが設定された :class:`Object` になります。\"\n\n#: ../../api.rst:3707\nmsgid \"See :attr:`Guild.rules_channel`.\"\nmsgstr \":attr:`Guild.rules_channel` を参照してください。\"\n\n#: ../../api.rst:3714\nmsgid \"The guild's public updates channel.\"\nmsgstr \"ギルドのパブリックアップデートチャンネル。\"\n\n#: ../../api.rst:3719\nmsgid \"See :attr:`Guild.public_updates_channel`.\"\nmsgstr \":attr:`Guild.public_updates_channel` を参照してください。\"\n\n#: ../../api.rst:3725\nmsgid \"The guild's AFK timeout. See :attr:`Guild.afk_timeout`.\"\nmsgstr \"ギルドのAFKタイムアウト。 :attr:`Guild.afk_timeout` も参照してください。\"\n\n#: ../../api.rst:3731\nmsgid \"The guild's MFA level. See :attr:`Guild.mfa_level`.\"\nmsgstr \"ギルドの多要素認証レベル。 :attr:`Guild.mfa_level` も参照してください。\"\n\n#: ../../api.rst:3733\n#: ../../../discord/guild.py:docstring of discord.guild.Guild:173\nmsgid \":class:`MFALevel`\"\nmsgstr \":class:`MFALevel`\"\n\n#: ../../api.rst:3737\nmsgid \"The guild's widget has been enabled or disabled.\"\nmsgstr \"ギルドのウィジェットが有効化または無効化された。\"\n\n#: ../../api.rst:3743\nmsgid \"The widget's channel.\"\nmsgstr \"ウィジェットのチャンネル。\"\n\n#: ../../api.rst:3752\n#: ../../../discord/guild.py:docstring of discord.guild.Guild:103\nmsgid \"The guild's verification level.\"\nmsgstr \"ギルドの認証レベル。\"\n\n#: ../../api.rst:3754\nmsgid \"See also :attr:`Guild.verification_level`.\"\nmsgstr \":attr:`Guild.verification_level` も参照してください。\"\n\n#: ../../api.rst:3756\n#: ../../../discord/guild.py:docstring of discord.guild.Guild:105\n#: ../../../discord/invite.py:docstring of discord.invite.PartialInviteGuild:40\nmsgid \":class:`VerificationLevel`\"\nmsgstr \":class:`VerificationLevel`\"\n\n#: ../../api.rst:3760\nmsgid \"The guild's default notification level.\"\nmsgstr \"ギルドのデフォルト通知レベル。\"\n\n#: ../../api.rst:3762\nmsgid \"See also :attr:`Guild.default_notifications`.\"\nmsgstr \":attr:`Guild.default_notifications` も参照してください。\"\n\n#: ../../api.rst:3764\n#: ../../../discord/guild.py:docstring of discord.guild.Guild:125\nmsgid \":class:`NotificationLevel`\"\nmsgstr \":class:`NotificationLevel`\"\n\n#: ../../api.rst:3768\nmsgid \"The guild's content filter.\"\nmsgstr \"ギルドのコンテンツフィルター。\"\n\n#: ../../api.rst:3770\nmsgid \"See also :attr:`Guild.explicit_content_filter`.\"\nmsgstr \":attr:`Guild.explicit_content_filter` も参照してください。\"\n\n#: ../../api.rst:3772\n#: ../../../discord/guild.py:docstring of discord.guild.Guild:119\nmsgid \":class:`ContentFilter`\"\nmsgstr \":class:`ContentFilter`\"\n\n#: ../../api.rst:3776\nmsgid \"The guild's vanity URL.\"\nmsgstr \"ギルドのバニティURL。\"\n\n#: ../../api.rst:3778\nmsgid \"See also :meth:`Guild.vanity_invite` and :meth:`Guild.edit`.\"\nmsgstr \":meth:`Guild.vanity_invite` と :meth:`Guild.edit` も参照してください。\"\n\n#: ../../api.rst:3784\nmsgid \"The position of a :class:`Role` or :class:`abc.GuildChannel`.\"\nmsgstr \":class:`Role` や :class:`abc.GuildChannel` の位置。\"\n\n#: ../../api.rst:3790\nmsgid \"The type of channel, sticker, webhook or integration.\"\nmsgstr \"チャンネル、スタンプ、Webhookまたは連携サービスのタイプ。\"\n\n#: ../../api.rst:3792\nmsgid \"Union[:class:`ChannelType`, :class:`StickerType`, :class:`WebhookType`, :class:`str`]\"\nmsgstr \"Union[:class:`ChannelType`, :class:`StickerType`, :class:`WebhookType`, :class:`str`]\"\n\n#: ../../api.rst:3796\nmsgid \"The topic of a :class:`TextChannel` or :class:`StageChannel`.\"\nmsgstr \":class:`TextChannel` または :class:`StageChannel` のトピック。\"\n\n#: ../../api.rst:3798\nmsgid \"See also :attr:`TextChannel.topic` or :attr:`StageChannel.topic`.\"\nmsgstr \":attr:`TextChannel.topic` または :attr:`StageChannel.topic` も参照してください。\"\n\n#: ../../api.rst:3804\nmsgid \"The bitrate of a :class:`VoiceChannel`.\"\nmsgstr \":class:`VoiceChannel` のビットレート。\"\n\n#: ../../api.rst:3806\nmsgid \"See also :attr:`VoiceChannel.bitrate`.\"\nmsgstr \":attr:`VoiceChannel.bitrate` も参照してください。\"\n\n#: ../../api.rst:3812\nmsgid \"A list of permission overwrite tuples that represents a target and a :class:`PermissionOverwrite` for said target.\"\nmsgstr \"対象とその :class:`PermissionOverwrite` のタプルで示された権限の上書きのリスト。\"\n\n#: ../../api.rst:3815\nmsgid \"The first element is the object being targeted, which can either be a :class:`Member` or :class:`User` or :class:`Role`. If this object is not found then it is a :class:`Object` with an ID being filled and a ``type`` attribute set to either ``'role'`` or ``'member'`` to help decide what type of ID it is.\"\nmsgstr \"最初の要素は対象のオブジェクトで、 :class:`Member` か :class:`User` か :class:`Role` です。このオブジェクトが見つからない場合はこれはIDが設定され、 ``type`` 属性が ``'role'`` か ``'member'`` に設定された :class:`Object` になります。\"\n\n#: ../../api.rst:3821\nmsgid \"List[Tuple[target, :class:`PermissionOverwrite`]]\"\nmsgstr \"List[Tuple[target, :class:`PermissionOverwrite`]]\"\n\n#: ../../api.rst:3825\nmsgid \"The privacy level of the stage instance or scheduled event\"\nmsgstr \"ステージインスタンスやスケジュールイベントのプライバシーレベル。\"\n\n#: ../../api.rst:3827\n#: ../../../discord/scheduled_event.py:docstring of discord.scheduled_event.ScheduledEvent:65\n#: ../../../discord/stage_instance.py:docstring of discord.stage_instance.StageInstance:47\nmsgid \":class:`PrivacyLevel`\"\nmsgstr \":class:`PrivacyLevel`\"\n\n#: ../../api.rst:3831\nmsgid \"A list of roles being added or removed from a member.\"\nmsgstr \"メンバーから追加または削除されたロールのリスト。\"\n\n#: ../../api.rst:3833\nmsgid \"If a role is not found then it is a :class:`Object` with the ID and name being filled in.\"\nmsgstr \"ロールが見つからない場合は、IDとnameが設定された :class:`Object` になります。\"\n\n#: ../../api.rst:3836\n#: ../../api.rst:4183\nmsgid \"List[Union[:class:`Role`, :class:`Object`]]\"\nmsgstr \"List[Union[:class:`Role`, :class:`Object`]]\"\n\n#: ../../api.rst:3840\nmsgid \"The nickname of a member.\"\nmsgstr \"メンバーのニックネーム。\"\n\n#: ../../api.rst:3842\nmsgid \"See also :attr:`Member.nick`\"\nmsgstr \":attr:`Member.nick` も参照してください。\"\n\n#: ../../api.rst:3848\nmsgid \"Whether the member is being server deafened.\"\nmsgstr \"メンバーがサーバーでスピーカーミュートされているかどうか。\"\n\n#: ../../api.rst:3850\nmsgid \"See also :attr:`VoiceState.deaf`.\"\nmsgstr \":attr:`VoiceState.deaf` も参照してください。\"\n\n#: ../../api.rst:3856\nmsgid \"Whether the member is being server muted.\"\nmsgstr \"メンバーがサーバーでミュートされているかどうか。\"\n\n#: ../../api.rst:3858\nmsgid \"See also :attr:`VoiceState.mute`.\"\nmsgstr \":attr:`VoiceState.mute` も参照してください。\"\n\n#: ../../api.rst:3864\nmsgid \"The permissions of a role.\"\nmsgstr \"ロールの権限。\"\n\n#: ../../api.rst:3866\nmsgid \"See also :attr:`Role.permissions`.\"\nmsgstr \":attr:`Role.permissions` も参照してください。\"\n\n#: ../../api.rst:3873\nmsgid \"The colour of a role.\"\nmsgstr \"ロールの色。\"\n\n#: ../../api.rst:3875\nmsgid \"See also :attr:`Role.colour`\"\nmsgstr \":attr:`Role.colour` も参照してください。\"\n\n#: ../../api.rst:3881\nmsgid \"Whether the role is being hoisted or not.\"\nmsgstr \"役割が別に表示されるかどうか。\"\n\n#: ../../api.rst:3883\nmsgid \"See also :attr:`Role.hoist`\"\nmsgstr \":attr:`Role.hoist` も参照してください。\"\n\n#: ../../api.rst:3889\nmsgid \"Whether the role is mentionable or not.\"\nmsgstr \"役割がメンションできるかどうか。\"\n\n#: ../../api.rst:3891\nmsgid \"See also :attr:`Role.mentionable`\"\nmsgstr \":attr:`Role.mentionable` も参照してください。\"\n\n#: ../../api.rst:3897\nmsgid \"The invite's code.\"\nmsgstr \"招待のコード。\"\n\n#: ../../api.rst:3899\nmsgid \"See also :attr:`Invite.code`\"\nmsgstr \":attr:`Invite.code` も参照してください。\"\n\n#: ../../api.rst:3905\nmsgid \"A guild channel.\"\nmsgstr \"ギルドのチャンネル。\"\n\n#: ../../api.rst:3907\nmsgid \"If the channel is not found then it is a :class:`Object` with the ID being set. In some cases the channel name is also set.\"\nmsgstr \"チャンネルが見つからない場合は、IDが設定された :class:`Object` になります。 場合によっては、チャンネル名も設定されています。\"\n\n#: ../../api.rst:3910\nmsgid \"Union[:class:`abc.GuildChannel`, :class:`Object`]\"\nmsgstr \"Union[:class:`abc.GuildChannel`, :class:`Object`]\"\n\n#: ../../api.rst:3914\n#: ../../../discord/invite.py:docstring of discord.invite.Invite:101\nmsgid \"The user who created the invite.\"\nmsgstr \"招待を作成したユーザー。\"\n\n#: ../../api.rst:3916\nmsgid \"See also :attr:`Invite.inviter`.\"\nmsgstr \":attr:`Invite.inviter` も参照してください。\"\n\n#: ../../api.rst:3918\n#: ../../../discord/scheduled_event.py:docstring of discord.scheduled_event.ScheduledEvent:83\n#: ../../../discord/integrations.py:docstring of discord.integrations.IntegrationApplication:39\n#: ../../../discord/emoji.py:docstring of discord.emoji.Emoji:76\n#: ../../../discord/channel.py:docstring of discord.channel.DMChannel:27\nmsgid \"Optional[:class:`User`]\"\nmsgstr \"Optional[:class:`User`]\"\n\n#: ../../api.rst:3922\nmsgid \"The invite's max uses.\"\nmsgstr \"招待の最大使用回数。\"\n\n#: ../../api.rst:3924\nmsgid \"See also :attr:`Invite.max_uses`.\"\nmsgstr \":attr:`Invite.max_uses` も参照してください。\"\n\n#: ../../api.rst:3930\nmsgid \"The invite's current uses.\"\nmsgstr \"招待の現在の使用回数。\"\n\n#: ../../api.rst:3932\nmsgid \"See also :attr:`Invite.uses`.\"\nmsgstr \":attr:`Invite.uses` も参照してください。\"\n\n#: ../../api.rst:3938\nmsgid \"The invite's max age in seconds.\"\nmsgstr \"招待者の最大時間は秒数です。\"\n\n#: ../../api.rst:3940\nmsgid \"See also :attr:`Invite.max_age`.\"\nmsgstr \":attr:`Invite.max_age` も参照してください。\"\n\n#: ../../api.rst:3946\nmsgid \"If the invite is a temporary invite.\"\nmsgstr \"招待が一時的な招待であるか。\"\n\n#: ../../api.rst:3948\nmsgid \"See also :attr:`Invite.temporary`.\"\nmsgstr \":attr:`Invite.temporary` も参照してください。\"\n\n#: ../../api.rst:3955\nmsgid \"The permissions being allowed or denied.\"\nmsgstr \"許可または拒否された権限。\"\n\n#: ../../api.rst:3961\nmsgid \"The ID of the object being changed.\"\nmsgstr \"変更されたオブジェクトのID。\"\n\n#: ../../api.rst:3967\nmsgid \"The avatar of a member.\"\nmsgstr \"メンバーのアバター。\"\n\n#: ../../api.rst:3969\nmsgid \"See also :attr:`User.avatar`.\"\nmsgstr \":attr:`User.avatar` も参照してください。\"\n\n#: ../../api.rst:3975\nmsgid \"The number of seconds members have to wait before sending another message in the channel.\"\nmsgstr \"メンバーが別のメッセージをチャンネルに送信するまでの秒単位の待ち時間。\"\n\n#: ../../api.rst:3978\nmsgid \"See also :attr:`TextChannel.slowmode_delay`.\"\nmsgstr \":attr:`TextChannel.slowmode_delay` も参照してください。\"\n\n#: ../../api.rst:3984\nmsgid \"The region for the voice channel’s voice communication. A value of ``None`` indicates automatic voice region detection.\"\nmsgstr \"ボイスチャンネルの音声通信のためのリージョン。値が ``None`` の場合は自動で検出されます。\"\n\n#: ../../api.rst:3987\nmsgid \"See also :attr:`VoiceChannel.rtc_region`.\"\nmsgstr \":attr:`VoiceChannel.rtc_region` も参照してください。\"\n\n#: ../../api.rst:3993\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_voice_channel:31\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_stage_channel:37\n#: ../../../discord/channel.py:docstring of discord.channel.VoiceChannel:86\n#: ../../../discord/channel.py:docstring of discord.channel.VoiceChannel.edit:49\nmsgid \"The camera video quality for the voice channel's participants.\"\nmsgstr \"ボイスチャンネル参加者のカメラビデオの画質。\"\n\n#: ../../api.rst:3995\nmsgid \"See also :attr:`VoiceChannel.video_quality_mode`.\"\nmsgstr \":attr:`VoiceChannel.video_quality_mode` も参照してください。\"\n\n#: ../../api.rst:3997\n#: ../../../discord/channel.py:docstring of discord.channel.VoiceChannel:90\n#: ../../../discord/channel.py:docstring of discord.channel.StageChannel:93\nmsgid \":class:`VideoQualityMode`\"\nmsgstr \":class:`VideoQualityMode`\"\n\n#: ../../api.rst:4001\nmsgid \"The format type of a sticker being changed.\"\nmsgstr \"変更されたスタンプのフォーマットの種類。\"\n\n#: ../../api.rst:4003\nmsgid \"See also :attr:`GuildSticker.format`\"\nmsgstr \":attr:`GuildSticker.format` も参照してください。\"\n\n#: ../../api.rst:4005\n#: ../../../discord/sticker.py:docstring of discord.sticker.StickerItem:35\n#: ../../../discord/sticker.py:docstring of discord.sticker.Sticker:47\n#: ../../../discord/sticker.py:docstring of discord.sticker.StandardSticker:47\n#: ../../../discord/sticker.py:docstring of discord.sticker.GuildSticker:41\nmsgid \":class:`StickerFormatType`\"\nmsgstr \":class:`StickerFormatType`\"\n\n#: ../../api.rst:4009\nmsgid \"The name of the emoji that represents a sticker being changed.\"\nmsgstr \"変更されたスタンプを示す絵文字の名前。\"\n\n#: ../../api.rst:4011\nmsgid \"See also :attr:`GuildSticker.emoji`.\"\nmsgstr \":attr:`GuildSticker.emoji` も参照してください。\"\n\n#: ../../api.rst:4017\nmsgid \"The unicode emoji that is used as an icon for the role being changed.\"\nmsgstr \"変更されたロールのアイコンとして使用されるUnicode絵文字。\"\n\n#: ../../api.rst:4019\nmsgid \"See also :attr:`Role.unicode_emoji`.\"\nmsgstr \":attr:`Role.unicode_emoji` も参照してください。\"\n\n#: ../../api.rst:4025\nmsgid \"The description of a guild, a sticker, or a scheduled event.\"\nmsgstr \"ギルド、スタンプ、またはスケジュールイベントの説明。\"\n\n#: ../../api.rst:4027\nmsgid \"See also :attr:`Guild.description`, :attr:`GuildSticker.description`, or :attr:`ScheduledEvent.description`.\"\nmsgstr \":attr:`Guild.description` 、 :attr:`GuildSticker.description` 、または :attr:`ScheduledEvent.description` も参照してください。\"\n\n#: ../../api.rst:4034\nmsgid \"The availability of a sticker being changed.\"\nmsgstr \"変更されたスタンプの利用可能かどうかの状態。\"\n\n#: ../../api.rst:4036\nmsgid \"See also :attr:`GuildSticker.available`\"\nmsgstr \":attr:`GuildSticker.available` も参照してください。\"\n\n#: ../../api.rst:4042\nmsgid \"The thread is now archived.\"\nmsgstr \"スレッドがアーカイブされたか。\"\n\n#: ../../api.rst:4048\nmsgid \"The thread is being locked or unlocked.\"\nmsgstr \"スレッドがロックされ、またはロックが解除されたかどうか。\"\n\n#: ../../api.rst:4054\nmsgid \"The thread's auto archive duration being changed.\"\nmsgstr \"変更されたスレッドの自動アーカイブ期間。\"\n\n#: ../../api.rst:4056\nmsgid \"See also :attr:`Thread.auto_archive_duration`\"\nmsgstr \":attr:`Thread.auto_archive_duration` も参照してください。\"\n\n#: ../../api.rst:4062\nmsgid \"The default auto archive duration for newly created threads being changed.\"\nmsgstr \"変更された新規作成されたスレッドの既定の自動アーカイブ期間。\"\n\n#: ../../api.rst:4068\nmsgid \"Whether non-moderators can add users to this private thread.\"\nmsgstr \"モデレータ以外がプライベートスレッドにユーザーを追加できるかどうか。\"\n\n#: ../../api.rst:4074\nmsgid \"Whether the user is timed out, and if so until when.\"\nmsgstr \"ユーザーがタイムアウトされているかどうか、そしてその場合はいつまでか。\"\n\n#: ../../api.rst:4076\n#: ../../../discord/webhook/async_.py:docstring of discord.WebhookMessage.edited_at:3\n#: ../../../discord/message.py:docstring of discord.Message.edited_at:3\n#: ../../../discord/guild.py:docstring of discord.Guild.invites_paused_until:6\n#: ../../../discord/guild.py:docstring of discord.Guild.dms_paused_until:6\nmsgid \"Optional[:class:`datetime.datetime`]\"\nmsgstr \"Optional[:class:`datetime.datetime`]\"\n\n#: ../../api.rst:4080\nmsgid \"Integration emoticons were enabled or disabled.\"\nmsgstr \"連携サービスの絵文字が有効化され、または無効化されたか。\"\n\n#: ../../api.rst:4082\nmsgid \"See also :attr:`StreamIntegration.enable_emoticons`\"\nmsgstr \":attr:`StreamIntegration.enable_emoticons` も参照してください。\"\n\n#: ../../api.rst:4089\nmsgid \"The behaviour of expiring subscribers changed.\"\nmsgstr \"変更された期限切れのサブスクライバーの動作。\"\n\n#: ../../api.rst:4091\nmsgid \"See also :attr:`StreamIntegration.expire_behaviour`\"\nmsgstr \":attr:`StreamIntegration.expire_behaviour` も参照してください。\"\n\n#: ../../api.rst:4093\n#: ../../../discord/integrations.py:docstring of discord.integrations.StreamIntegration:51\n#: ../../../discord/integrations.py:docstring of discord.StreamIntegration.expire_behavior:3\nmsgid \":class:`ExpireBehaviour`\"\nmsgstr \":class:`ExpireBehaviour`\"\n\n#: ../../api.rst:4097\nmsgid \"The grace period before expiring subscribers changed.\"\nmsgstr \"変更された期限切れのサブスクライバーの猶予期間。\"\n\n#: ../../api.rst:4099\nmsgid \"See also :attr:`StreamIntegration.expire_grace_period`\"\nmsgstr \":attr:`StreamIntegration.expire_grace_period` も参照してください。\"\n\n#: ../../api.rst:4105\nmsgid \"The preferred locale for the guild changed.\"\nmsgstr \"変更されたギルドの優先ローケル。\"\n\n#: ../../api.rst:4107\nmsgid \"See also :attr:`Guild.preferred_locale`\"\nmsgstr \":attr:`Guild.preferred_locale` も参照してください。\"\n\n#: ../../api.rst:4109\n#: ../../../discord/guild.py:docstring of discord.guild.Guild:156\nmsgid \":class:`Locale`\"\nmsgstr \":class:`Locale`\"\n\n#: ../../api.rst:4113\nmsgid \"The number of days after which inactive and role-unassigned members are kicked has been changed.\"\nmsgstr \"変更された活動していない、かつロールが割り当てられていないメンバーがキックさえるまでの日数。\"\n\n#: ../../api.rst:4119\n#: ../../../discord/scheduled_event.py:docstring of discord.scheduled_event.ScheduledEvent:69\nmsgid \"The status of the scheduled event.\"\nmsgstr \"スケジュールイベントのステータス。\"\n\n#: ../../api.rst:4121\n#: ../../../discord/scheduled_event.py:docstring of discord.scheduled_event.ScheduledEvent:71\nmsgid \":class:`EventStatus`\"\nmsgstr \":class:`EventStatus`\"\n\n#: ../../api.rst:4125\nmsgid \"The type of entity this scheduled event is for.\"\nmsgstr \"スケジュールイベントの開催場所の種類。\"\n\n#: ../../api.rst:4127\n#: ../../../discord/scheduled_event.py:docstring of discord.scheduled_event.ScheduledEvent:41\nmsgid \":class:`EntityType`\"\nmsgstr \":class:`EntityType`\"\n\n#: ../../api.rst:4131\n#: ../../../discord/scheduled_event.py:docstring of discord.ScheduledEvent.cover_image:1\nmsgid \"The scheduled event's cover image.\"\nmsgstr \"スケジュールイベントのカバー画像。\"\n\n#: ../../api.rst:4133\nmsgid \"See also :attr:`ScheduledEvent.cover_image`.\"\nmsgstr \":attr:`ScheduledEvent.cover_image` も参照してください。\"\n\n#: ../../api.rst:4139\nmsgid \"List of permissions for the app command.\"\nmsgstr \"アプリケーションコマンドの権限のリスト。\"\n\n#: ../../api.rst:4141\n#: ../../../discord/raw_models.py:docstring of discord.raw_models.RawAppCommandPermissionsUpdateEvent:29\nmsgid \"List[:class:`~discord.app_commands.AppCommandPermissions`]\"\nmsgstr \"List[:class:`~discord.app_commands.AppCommandPermissions`]\"\n\n#: ../../api.rst:4145\nmsgid \"Whether the automod rule is active or not.\"\nmsgstr \"自動管理ルールが有効かどうか。\"\n\n#: ../../api.rst:4151\nmsgid \"The event type for triggering the automod rule.\"\nmsgstr \"自動管理ルールを発動させるイベントの種類。\"\n\n#: ../../api.rst:4153\n#: ../../../discord/automod.py:docstring of discord.automod.AutoModRule:57\nmsgid \":class:`AutoModRuleEventType`\"\nmsgstr \":class:`AutoModRuleEventType`\"\n\n#: ../../api.rst:4157\nmsgid \"The trigger type for the automod rule.\"\nmsgstr \"自動管理ルールの発動条件の種類。\"\n\n#: ../../api.rst:4159\n#: ../../../discord/automod.py:docstring of discord.automod.AutoModAction:28\n#: ../../../discord/automod.py:docstring of discord.automod.AutoModTrigger:28\nmsgid \":class:`AutoModRuleTriggerType`\"\nmsgstr \":class:`AutoModRuleTriggerType`\"\n\n#: ../../api.rst:4163\nmsgid \"The trigger for the automod rule.\"\nmsgstr \"自動管理ルールの発動条件。\"\n\n#: ../../api.rst:4167\nmsgid \"The :attr:`~AutoModTrigger.type` of the trigger may be incorrect. Some attributes such as :attr:`~AutoModTrigger.keyword_filter`, :attr:`~AutoModTrigger.regex_patterns`, and :attr:`~AutoModTrigger.allow_list` will only have the added or removed values.\"\nmsgstr \"\"\n\n#: ../../api.rst:4171\n#: ../../../discord/automod.py:docstring of discord.automod.AutoModRule:33\nmsgid \":class:`AutoModTrigger`\"\nmsgstr \":class:`AutoModTrigger`\"\n\n#: ../../api.rst:4175\nmsgid \"The actions to take when an automod rule is triggered.\"\nmsgstr \"自動管理ルールの発動時の対応。\"\n\n#: ../../api.rst:4177\nmsgid \"List[AutoModRuleAction]\"\nmsgstr \"List[AutoModRuleAction]\"\n\n#: ../../api.rst:4181\nmsgid \"The list of roles that are exempt from the automod rule.\"\nmsgstr \"自動管理ルールの除外対象のロールのリスト。\"\n\n#: ../../api.rst:4187\nmsgid \"The list of channels or threads that are exempt from the automod rule.\"\nmsgstr \"自動管理ルールの除外対象のチャンネルまたはスレッドのリスト。\"\n\n#: ../../api.rst:4189\nmsgid \"List[:class:`abc.GuildChannel`, :class:`Thread`, :class:`Object`]\"\nmsgstr \"List[:class:`abc.GuildChannel`, :class:`Thread`, :class:`Object`]\"\n\n#: ../../api.rst:4193\nmsgid \"The guild’s display setting to show boost progress bar.\"\nmsgstr \"ギルドのブーストの進捗バーを表示するかの設定。\"\n\n#: ../../api.rst:4199\nmsgid \"The guild’s system channel settings.\"\nmsgstr \"ギルドのシステムチャンネルの設定。\"\n\n#: ../../api.rst:4201\nmsgid \"See also :attr:`Guild.system_channel_flags`\"\nmsgstr \":attr:`Guild.system_channel_flags` を参照してください。\"\n\n#: ../../api.rst:4203\n#: ../../../discord/guild.py:docstring of discord.Guild.system_channel_flags:3\nmsgid \":class:`SystemChannelFlags`\"\nmsgstr \":class:`SystemChannelFlags`\"\n\n#: ../../api.rst:4207\nmsgid \"Whether the channel is marked as “not safe for work” or “age restricted”.\"\nmsgstr \"チャンネルに年齢制限がかかっているか。\"\n\n#: ../../api.rst:4213\nmsgid \"The channel’s limit for number of members that can be in a voice or stage channel.\"\nmsgstr \"ボイスまたはステージチャンネルに参加できるメンバー数の制限。\"\n\n#: ../../api.rst:4215\nmsgid \"See also :attr:`VoiceChannel.user_limit` and :attr:`StageChannel.user_limit`\"\nmsgstr \":attr:`VoiceChannel.user_limit` と :attr:`StageChannel.user_limit` も参照してください。\"\n\n#: ../../api.rst:4221\nmsgid \"The channel flags associated with this thread or forum post.\"\nmsgstr \"このスレッドやフォーラム投稿に関連付けられたチャンネルフラグ。\"\n\n#: ../../api.rst:4223\nmsgid \"See also :attr:`ForumChannel.flags` and :attr:`Thread.flags`\"\nmsgstr \":attr:`ForumChannel.flags` と :attr:`Thread.flags` も参照してください。\"\n\n#: ../../api.rst:4225\n#: ../../../discord/channel.py:docstring of discord.ForumChannel.flags:5\n#: ../../../discord/threads.py:docstring of discord.Thread.flags:3\nmsgid \":class:`ChannelFlags`\"\nmsgstr \":class:`ChannelFlags`\"\n\n#: ../../api.rst:4229\nmsgid \"The default slowmode delay for threads created in this text channel or forum.\"\nmsgstr \"このテキストチャンネルやフォーラムで作成されたスレッドのデフォルトの低速モードのレート制限。\"\n\n#: ../../api.rst:4231\nmsgid \"See also :attr:`TextChannel.default_thread_slowmode_delay` and :attr:`ForumChannel.default_thread_slowmode_delay`\"\nmsgstr \":attr:`TextChannel.default_thread_slowmode_delay` と :attr:`ForumChannel.default_thread_slowmode_delay` も参照してください。\"\n\n#: ../../api.rst:4237\nmsgid \"The applied tags of a forum post.\"\nmsgstr \"フォーラム投稿に適用されたタグ。\"\n\n#: ../../api.rst:4239\nmsgid \"See also :attr:`Thread.applied_tags`\"\nmsgstr \":attr:`Thread.applied_tags` も参照してください。\"\n\n#: ../../api.rst:4241\nmsgid \"List[Union[:class:`ForumTag`, :class:`Object`]]\"\nmsgstr \"List[Union[:class:`ForumTag`, :class:`Object`]]\"\n\n#: ../../api.rst:4245\nmsgid \"The available tags of a forum.\"\nmsgstr \"フォーラムにて利用可能なタグ。\"\n\n#: ../../api.rst:4247\nmsgid \"See also :attr:`ForumChannel.available_tags`\"\nmsgstr \":attr:`ForumChannel.available_tags` も参照してください。\"\n\n#: ../../api.rst:4249\n#: ../../../discord/channel.py:docstring of discord.ForumChannel.available_tags:5\nmsgid \"Sequence[:class:`ForumTag`]\"\nmsgstr \"Sequence[:class:`ForumTag`]\"\n\n#: ../../api.rst:4253\nmsgid \"The default_reaction_emoji for forum posts.\"\nmsgstr \"フォーラム投稿の default_reaction_emoji。\"\n\n#: ../../api.rst:4255\nmsgid \"See also :attr:`ForumChannel.default_reaction_emoji`\"\nmsgstr \":attr:`ForumChannel.default_reaction_emoji` も参照してください。\"\n\n#: ../../api.rst:4257\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel:105\n#: ../../../discord/activity.py:docstring of discord.activity.Activity:100\n#: ../../../discord/activity.py:docstring of discord.activity.CustomActivity:33\n#: ../../../discord/channel.py:docstring of discord.channel.ForumTag:48\nmsgid \"Optional[:class:`PartialEmoji`]\"\nmsgstr \"Optional[:class:`PartialEmoji`]\"\n\n#: ../../api.rst:4263\nmsgid \"Webhook Support\"\nmsgstr \"Webhookサポート\"\n\n#: ../../api.rst:4265\nmsgid \"discord.py offers support for creating, editing, and executing webhooks through the :class:`Webhook` class.\"\nmsgstr \"discord.pyは、 :class:`Webhook` クラスからWebhookの作成、編集、実行をサポートします。\"\n\n#: ../../api.rst:4268\nmsgid \"Webhook\"\nmsgstr \"Webhook\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook:1\nmsgid \"Represents an asynchronous Discord webhook.\"\nmsgstr \"非同期のDiscord Webhook。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook:3\nmsgid \"Webhooks are a form to send messages to channels in Discord without a bot user or authentication.\"\nmsgstr \"Webhookはボットユーザーや認証なしでDiscordチャンネルにメッセージを送信する方法です。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook:6\nmsgid \"There are two main ways to use Webhooks. The first is through the ones received by the library such as :meth:`.Guild.webhooks`, :meth:`.TextChannel.webhooks`, :meth:`.VoiceChannel.webhooks` and :meth:`.ForumChannel.webhooks`. The ones received by the library will automatically be bound using the library's internal HTTP session.\"\nmsgstr \"Webhookの使用法は主に二つあります。一つ目は :meth:`.Guild.webhooks` や :meth:`.TextChannel.webhooks` 、 :meth:`.VoiceChannel.webhooks` 、 :meth:`.ForumChannel.webhooks` といったライブラリーのメソッドから受け取るものです。これらは自動的にライブラリー内部のHTTPセッションを使用します。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook:13\nmsgid \"The second form involves creating a webhook object manually using the :meth:`~.Webhook.from_url` or :meth:`~.Webhook.partial` classmethods.\"\nmsgstr \"二つ目は、 :meth:`~.Webhook.from_url` や :meth:`~.Webhook.partial` クラスメソッドでWebhookオブジェクトを手動で作成する方法です。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook:16\nmsgid \"For example, creating a webhook from a URL and using :doc:`aiohttp <aio:index>`:\"\nmsgstr \"例えば、URLからWebhookを作成し、 :doc:`aiohttp <aio:index>` を使用する場合は：\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook:28\nmsgid \"For a synchronous counterpart, see :class:`SyncWebhook`.\"\nmsgstr \"同期バージョンは、 :class:`SyncWebhook` を参照してください。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook:34\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook:9\nmsgid \"Checks if two webhooks are equal.\"\nmsgstr \"二つのWebhookが等しいか比較します。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook:38\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook:13\nmsgid \"Checks if two webhooks are not equal.\"\nmsgstr \"二つのWebhookが等しいものでないか比較します。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook:42\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook:17\nmsgid \"Returns the webhooks's hash.\"\nmsgstr \"Webhookのハッシュを返します。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook:44\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook:19\nmsgid \"Webhooks are now comparable and hashable.\"\nmsgstr \"Webhookが比較・ハッシュ可能になりました。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook:49\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook:24\nmsgid \"The webhook's ID\"\nmsgstr \"WebhookのID\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook:55\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook:30\nmsgid \"The type of the webhook.\"\nmsgstr \"Webhookのタイプ。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook:59\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook:34\nmsgid \":class:`WebhookType`\"\nmsgstr \":class:`WebhookType`\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook:63\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook:38\nmsgid \"The authentication token of the webhook. If this is ``None`` then the webhook cannot be used to make requests.\"\nmsgstr \"Webhookの認証トークン。 ``None`` の場合、Webhookは呼び出しできません。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook:70\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook:45\nmsgid \"The guild ID this webhook is for.\"\nmsgstr \"WebhookのギルドID。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook:76\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook:51\nmsgid \"The channel ID this webhook is for.\"\nmsgstr \"WebhookのチャンネルID。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook:82\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook:57\nmsgid \"The user this webhook was created by. If the webhook was received without authentication then this will be ``None``.\"\nmsgstr \"Webhookを作成したユーザー。このWebhookを認証なしで受け取った場合は ``None`` になります。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook:89\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook:64\nmsgid \"The default name of the webhook.\"\nmsgstr \"Webhookの既定の名前。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook:95\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook:70\nmsgid \"The guild of the channel that this webhook is following. Only given if :attr:`type` is :attr:`WebhookType.channel_follower`.\"\nmsgstr \"Webhookがフォローしているチャンネルのギルド。 :attr:`type` が :attr:`WebhookType.channel_follower` のときのみ与えられます。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook:100\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook:75\nmsgid \"Optional[:class:`PartialWebhookGuild`]\"\nmsgstr \"Optional[:class:`PartialWebhookGuild`]\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook:104\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook:79\nmsgid \"The channel that this webhook is following. Only given if :attr:`type` is :attr:`WebhookType.channel_follower`.\"\nmsgstr \"Webhookがフォローしているチャンネル。 :attr:`type` が :attr:`WebhookType.channel_follower` のときのみ与えられます。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook:109\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook:84\nmsgid \"Optional[:class:`PartialWebhookChannel`]\"\nmsgstr \"Optional[:class:`PartialWebhookChannel`]\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.Webhook.url:1\n#: ../../../discord/webhook/sync.py:docstring of discord.SyncWebhook.url:1\nmsgid \"Returns the webhook's url.\"\nmsgstr \"WebhookのURLを返します。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.partial:1\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook.partial:1\nmsgid \"Creates a partial :class:`Webhook`.\"\nmsgstr \"部分的な :class:`Webhook` を作成します。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.partial:3\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook.partial:3\nmsgid \"The ID of the webhook.\"\nmsgstr \"WebhookのID。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.partial:5\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook.partial:5\nmsgid \"The authentication token of the webhook.\"\nmsgstr \"Webhookの認証トークン。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.partial:7\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.from_url:9\nmsgid \"The session to use to send requests with. Note that the library does not manage the session and will not close it.\"\nmsgstr \"リクエストを送信するために使用するセッション。ライブラリはセッションを管理しておらず、閉じないことに注意してください。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.partial:13\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.from_url:15\nmsgid \"The client to initialise this webhook with. This allows it to attach the client's internal state. If ``session`` is not given while this is given then the client's internal session will be used.\"\nmsgstr \"このWebhookを初期化するためのクライアント。これによりクライアントの内部状態を付属できます。このとき、 ``session`` が指定されていない場合は、クライアントの内部セッションが使用されます。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.partial:19\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.from_url:21\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook.partial:12\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook.from_url:10\nmsgid \"The bot authentication token for authenticated requests involving the webhook.\"\nmsgstr \"Webhook関連の認証が必要なリクエストに使用するボットの認証トークン。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.partial:25\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.from_url:28\nmsgid \"Neither ``session`` nor ``client`` were given.\"\nmsgstr \"``session`` と ``client`` のどちらも指定されていない場合。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.partial:27\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.from_url:30\nmsgid \"A partial :class:`Webhook`. A partial webhook is just a webhook object with an ID and a token.\"\nmsgstr \"部分的な :class:`Webhook` 。部分的なWebhookはただのIDとトークンのみを持つWebhookオブジェクトです。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.partial:29\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.from_url:32\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.fetch:24\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.create_webhook:22\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.follow:31\nmsgid \":class:`Webhook`\"\nmsgstr \":class:`Webhook`\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.from_url:1\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook.from_url:1\nmsgid \"Creates a partial :class:`Webhook` from a webhook URL.\"\nmsgstr \"WebhookのURLから部分的な :class:`Webhook` を作成します。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.from_url:7\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook.from_url:3\nmsgid \"The URL of the webhook.\"\nmsgstr \"WebhookのURL。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.from_url:27\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook.from_url:14\nmsgid \"The URL is invalid.\"\nmsgstr \"URLが無効な場合。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.fetch:3\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook.fetch:1\nmsgid \"Fetches the current webhook.\"\nmsgstr \"現在のWebhookを取得します。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.fetch:5\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook.fetch:3\nmsgid \"This could be used to get a full webhook from a partial webhook.\"\nmsgstr \"これは部分的なWebhookから完全なWebhookを取得するのに利用できます。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.fetch:11\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook.fetch:7\nmsgid \"When fetching with an unauthenticated webhook, i.e. :meth:`is_authenticated` returns ``False``, then the returned webhook does not contain any user information.\"\nmsgstr \"認証されていないWebhook、つまり :meth:`is_authenticated` が ``False`` を返すものでは、返されたWebhookにはユーザー情報が含まれません。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.fetch:15\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.delete:9\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.edit:21\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook.fetch:11\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook.delete:7\nmsgid \"Whether to use the bot token over the webhook token if available. Defaults to ``True``.\"\nmsgstr \"利用可能な場合にWebhookトークンではなくボットトークンを使用するか。既定では ``True`` 。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.fetch:19\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook.fetch:15\nmsgid \"Could not fetch the webhook\"\nmsgstr \"Webhookを取得できなかった場合。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.fetch:20\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook.fetch:16\nmsgid \"Could not find the webhook by this ID\"\nmsgstr \"このIDを持つWebhookが見つからない場合。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.fetch:21\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.delete:18\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.delete_message:27\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook.fetch:17\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook.delete:14\nmsgid \"This webhook does not have a token associated with it.\"\nmsgstr \"Webhookに紐づいたトークンが存在しない場合。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.fetch:23\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook.fetch:19\nmsgid \"The fetched webhook.\"\nmsgstr \"フェッチしたWebhook。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.delete:3\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook.delete:1\nmsgid \"Deletes this Webhook.\"\nmsgstr \"この Webhook を削除します。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.delete:5\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook.delete:3\nmsgid \"The reason for deleting this webhook. Shows up on the audit log.\"\nmsgstr \"Webhookを削除する理由。監査ログに表示されます。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.delete:15\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook.delete:11\nmsgid \"Deleting the webhook failed.\"\nmsgstr \"Webhookの削除に失敗した場合。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.delete:16\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.edit:28\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook.delete:12\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook.edit:18\nmsgid \"This webhook does not exist.\"\nmsgstr \"Webhookが存在しない場合。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.delete:17\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook.delete:13\nmsgid \"You do not have permissions to delete this webhook.\"\nmsgstr \"Webhookを削除する権限がない場合。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.edit:3\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook.edit:1\nmsgid \"Edits this Webhook.\"\nmsgstr \"このWebhookを編集します。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.edit:9\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook.edit:3\nmsgid \"The webhook's new default name.\"\nmsgstr \"Webhookの新しい既定の名前。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.edit:11\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook.edit:5\nmsgid \"A :term:`py:bytes-like object` representing the webhook's new default avatar.\"\nmsgstr \"Webhookの新しい既定のアバターを示す :term:`py:bytes-like object` 。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.edit:13\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook.edit:7\nmsgid \"The webhook's new channel. This requires an authenticated webhook.\"\nmsgstr \"Webhookの新しいチャンネル。設定するには認証済みWebhookが必要です。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.edit:17\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook.edit:9\nmsgid \"The reason for editing this webhook. Shows up on the audit log.\"\nmsgstr \"Webhookを編集する理由。監査ログに表示されます。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.edit:27\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook.edit:17\nmsgid \"Editing the webhook failed.\"\nmsgstr \"Webhookの編集に失敗した場合。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.edit:29\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook.edit:19\nmsgid \"This webhook does not have a token associated with it     or it tried editing a channel without authentication.\"\nmsgstr \"Webhookに紐づいたトークンがない場合や、認証せずにチャンネルを編集しようとした場合。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.Webhook.avatar:1\n#: ../../../discord/webhook/sync.py:docstring of discord.SyncWebhook.avatar:1\nmsgid \"Returns an :class:`Asset` for the avatar the webhook has.\"\nmsgstr \"Webhookのアバターの :class:`Asset` を返します。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.Webhook.avatar:3\n#: ../../../discord/webhook/sync.py:docstring of discord.SyncWebhook.avatar:3\nmsgid \"If the webhook does not have a traditional avatar, ``None`` is returned. If you want the avatar that a webhook has displayed, consider :attr:`display_avatar`.\"\nmsgstr \"Webhookが従来のアバターを設定していない場合は、 ``None`` が返されます。Webhookが表示しているアバターを取得したい場合は、 :attr:`display_avatar` を検討してください。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.Webhook.channel:1\n#: ../../../discord/webhook/sync.py:docstring of discord.SyncWebhook.channel:1\nmsgid \"The channel this webhook belongs to.\"\nmsgstr \"このWebhookが属するチャンネル。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.Webhook.channel:3\n#: ../../../discord/webhook/async_.py:docstring of discord.Webhook.guild:3\n#: ../../../discord/webhook/sync.py:docstring of discord.SyncWebhook.channel:3\n#: ../../../discord/webhook/sync.py:docstring of discord.SyncWebhook.guild:3\nmsgid \"If this is a partial webhook, then this will always return ``None``.\"\nmsgstr \"これが部分的なWebhookの場合は常に ``None`` を返します。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.Webhook.channel:5\n#: ../../../discord/webhook/sync.py:docstring of discord.SyncWebhook.channel:5\nmsgid \"Optional[Union[:class:`ForumChannel`, :class:`VoiceChannel`, :class:`TextChannel`]]\"\nmsgstr \"Optional[Union[:class:`ForumChannel`, :class:`VoiceChannel`, :class:`TextChannel`]]\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.Webhook.created_at:1\n#: ../../../discord/webhook/sync.py:docstring of discord.SyncWebhook.created_at:1\nmsgid \"Returns the webhook's creation time in UTC.\"\nmsgstr \"Webhookの作成時刻をUTCで返します。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.Webhook.default_avatar:1\n#: ../../../discord/webhook/sync.py:docstring of discord.SyncWebhook.default_avatar:1\nmsgid \"Returns the default avatar. This is always the blurple avatar.\"\nmsgstr \"デフォルトのアバターを返します。これは常にブループルのアバターです。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.Webhook.display_avatar:1\n#: ../../../discord/webhook/sync.py:docstring of discord.SyncWebhook.display_avatar:1\nmsgid \"Returns the webhook's display avatar.\"\nmsgstr \"Webhookの表示されるアバターを返します。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.Webhook.display_avatar:3\n#: ../../../discord/webhook/sync.py:docstring of discord.SyncWebhook.display_avatar:3\nmsgid \"This is either webhook's default avatar or uploaded avatar.\"\nmsgstr \"これはWebhookのデフォルトアバターまたはアップロードされたアバターです。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.Webhook.guild:1\n#: ../../../discord/webhook/sync.py:docstring of discord.SyncWebhook.guild:1\nmsgid \"The guild this webhook belongs to.\"\nmsgstr \"Webhookが属するギルド。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.BaseWebhook.is_authenticated:1\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.async_.BaseWebhook.is_authenticated:1\nmsgid \":class:`bool`: Whether the webhook is authenticated with a bot token.\"\nmsgstr \":class:`bool`: WebhookがBotトークンで認証されているかどうか。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.BaseWebhook.is_partial:1\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.async_.BaseWebhook.is_partial:1\nmsgid \":class:`bool`: Whether the webhook is a \\\"partial\\\" webhook.\"\nmsgstr \":class:`bool`: Webhookが「部分的な」ものか。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.send:3\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook.send:1\nmsgid \"Sends a message using the webhook.\"\nmsgstr \"Webhookを使用してメッセージを送信します。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.send:5\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook.send:3\nmsgid \"The content must be a type that can convert to a string through ``str(content)``.\"\nmsgstr \"contentは ``str(content)`` で文字列に変換できるものでなければなりません。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.send:7\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook.send:5\nmsgid \"To upload a single file, the ``file`` parameter should be used with a single :class:`File` object.\"\nmsgstr \"ファイルを一つだけアップロードするには、 ``file`` パラメータに :class:`File` オブジェクトを渡します。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.send:10\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook.send:8\nmsgid \"If the ``embed`` parameter is provided, it must be of type :class:`Embed` and it must be a rich embed type. You cannot mix the ``embed`` parameter with the ``embeds`` parameter, which must be a :class:`list` of :class:`Embed` objects to send.\"\nmsgstr \"``embed`` パラメータが渡された場合は、型が :class:`Embed` であり、その種類はrichでないといけません。 ``embed`` パラメータは、送信する :class:`Embed` の :class:`list` である ``embeds`` パラメータと同時に使用できません。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.send:18\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook.send:12\n#: ../../../discord/abc.py:docstring of discord.abc.Messageable.send:23\n#: ../../../discord/user.py:docstring of discord.abc.Messageable.send:23\n#: ../../../discord/member.py:docstring of discord.abc.Messageable.send:23\nmsgid \"The content of the message to send.\"\nmsgstr \"送信するメッセージの内容。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.send:20\nmsgid \"Whether the server should wait before sending a response. This essentially means that the return type of this function changes from ``None`` to a :class:`WebhookMessage` if set to ``True``. If the type of webhook is :attr:`WebhookType.application` then this is always set to ``True``.\"\nmsgstr \"サーバーが応答を送信するまで待つべきかどうか。これは、 ``True`` に設定された場合にこの関数の返り値が ``None`` から :class:`WebhookMessage` に変わることを意味します。もしこのWebhookの種類が :attr:`WebhookType.application` の場合はこれは常に ``True`` に設定されます。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.send:25\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook.send:18\nmsgid \"The username to send with this message. If no username is provided then the default username for the webhook is used.\"\nmsgstr \"このメッセージを送信するユーザー名。ユーザー名が指定されていない場合、Webhookのデフォルトのユーザー名が使用されます。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.send:28\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook.send:21\nmsgid \"The avatar URL to send with this message. If no avatar URL is provided then the default avatar for the webhook is used. If this is not a string then it is explicitly cast using ``str``.\"\nmsgstr \"このメッセージと共に送信するアバターのURL。アバターURLが指定されていない場合、Webhookのデフォルトアバターが使用されます。 これが文字列でない場合は、 ``str`` を使って明示的にキャストされます。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.send:32\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook.send:25\n#: ../../../discord/abc.py:docstring of discord.abc.Messageable.send:25\n#: ../../../discord/user.py:docstring of discord.abc.Messageable.send:25\n#: ../../../discord/member.py:docstring of discord.abc.Messageable.send:25\nmsgid \"Indicates if the message should be sent using text-to-speech.\"\nmsgstr \"メッセージが音声合成で送信されるべきかどうかを示します。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.send:34\nmsgid \"Indicates if the message should only be visible to the user. This is only available to :attr:`WebhookType.application` webhooks. If a view is sent with an ephemeral message and it has no timeout set then the timeout is set to 15 minutes.\"\nmsgstr \"メッセージがユーザーにのみ表示されるべきかを示します。これは :attr:`WebhookType.application` Webhookでのみ利用できます。もしビューが一時的なメッセージとともに送信されタイムアウトが設定されていない場合、タイムアウトは15分に設定されます。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.send:41\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook.send:27\nmsgid \"The file to upload. This cannot be mixed with ``files`` parameter.\"\nmsgstr \"アップロードするファイル。 ``files`` パラメータと同時に使用できません。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.send:43\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook.send:29\nmsgid \"A list of files to send with the content. This cannot be mixed with the ``file`` parameter.\"\nmsgstr \"コンテンツといっしょに送信するファイルのリスト。 ``file`` パラメータと同時に使用できません。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.send:46\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook.send:32\nmsgid \"The rich embed for the content to send. This cannot be mixed with ``embeds`` parameter.\"\nmsgstr \"送信するリッチな埋め込み。 ``embeds`` パラメータと同時に使用できません。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.send:49\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook.send:35\nmsgid \"A list of embeds to send with the content. Maximum of 10. This cannot be mixed with the ``embed`` parameter.\"\nmsgstr \"送信するリッチな埋め込みのリスト。最大10個です。 ``embed`` パラメータと同時に使用できません。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.send:52\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook.send:38\nmsgid \"Controls the mentions being processed in this message.\"\nmsgstr \"メッセージ内で処理されるべきメンションを制御します。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.send:56\nmsgid \"The view to send with the message. You can only send a view if this webhook is not partial and has state attached. A webhook has state attached if the webhook is managed by the library.\"\nmsgstr \"メッセージとともに送信するビュー。Webhookが部分的でなく、ステートが付属している場合にのみビューを送信できます。Webhookがライブラリーにて管理されている場合にステートが付属しています。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.send:63\nmsgid \"The thread to send this webhook to.\"\nmsgstr \"このWebhookを送信するスレッド。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.send:67\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook.send:46\nmsgid \"The thread name to create with this webhook if the webhook belongs to a :class:`~discord.ForumChannel`. Note that this is mutually exclusive with the ``thread`` parameter, as this will create a new thread with the given name.\"\nmsgstr \"Webhookが :class:`~discord.ForumChannel` に属する場合、このWebhookで作成するスレッドの名前。なお、これは与えられた名前の新しいスレッドを作成するため、 ``thread`` パラメータと同時に使用できません。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.send:74\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook.send:53\n#: ../../../discord/abc.py:docstring of discord.abc.Messageable.send:72\n#: ../../../discord/user.py:docstring of discord.abc.Messageable.send:72\n#: ../../../discord/member.py:docstring of discord.abc.Messageable.send:72\nmsgid \"Whether to suppress embeds for the message. This sends the message without any embeds if set to ``True``.\"\nmsgstr \"メッセージの埋め込みを抑制するかどうか。これが ``True`` に設定されている場合、埋め込みなしでメッセージを送信します。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.send:78\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook.send:57\n#: ../../../discord/abc.py:docstring of discord.abc.Messageable.send:76\n#: ../../../discord/user.py:docstring of discord.abc.Messageable.send:76\n#: ../../../discord/member.py:docstring of discord.abc.Messageable.send:76\nmsgid \"Whether to suppress push and desktop notifications for the message. This will increment the mention counter in the UI, but will not actually send a notification.\"\nmsgstr \"メッセージのプッシュ通知とデスクトップ通知を抑制するかどうか。 抑制した場合、UIのメンションカウンターを増やしますが、実際に通知を送信することはありません。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.send:83\nmsgid \"Tags to apply to the thread if the webhook belongs to a :class:`~discord.ForumChannel`.\"\nmsgstr \"\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.send:88\n#: ../../../discord/webhook/async_.py:docstring of discord.message.PartialMessage.reply:12\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook.send:63\n#: ../../../discord/abc.py:docstring of discord.abc.Messageable.send:82\n#: ../../../discord/user.py:docstring of discord.abc.Messageable.send:82\nmsgid \"Sending the message failed.\"\nmsgstr \"メッセージの送信に失敗した場合。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.send:89\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook.send:64\nmsgid \"This webhook was not found.\"\nmsgstr \"Webhookが見つからなかった場合。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.send:90\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook.send:65\nmsgid \"The authorization token for the webhook is incorrect.\"\nmsgstr \"Webhookの認証トークンが正しくない場合。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.send:91\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook.send:66\nmsgid \"You specified both ``embed`` and ``embeds`` or ``file`` and ``files``     or ``thread`` and ``thread_name``.\"\nmsgstr \"``embed`` と ``embeds`` または ``file`` と ``files`` または ``thread`` と ``thread_name`` の両方を指定した場合。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.send:92\nmsgid \"The length of ``embeds`` was invalid, there was no token     associated with this webhook or ``ephemeral`` was passed     with the improper webhook type or there was no state     attached with this webhook when giving it a view.\"\nmsgstr \"``embeds`` の長さが不正な場合、Webhookにトークンが紐づいていない場合、 ``ephemeral`` が適切でない種類のWebhookに渡された場合、またはステートが付属していないWebhookにビューを渡した場合。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.send:94\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook.send:69\nmsgid \"If ``wait`` is ``True`` then the message that was sent, otherwise ``None``.\"\nmsgstr \"``wait`` が ``True`` のとき、送信されたメッセージ、それ以外の場合は ``None`` 。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.send:95\nmsgid \"Optional[:class:`WebhookMessage`]\"\nmsgstr \"Optional[:class:`WebhookMessage`]\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.fetch_message:3\nmsgid \"Retrieves a single :class:`~discord.WebhookMessage` owned by this webhook.\"\nmsgstr \"このWebhookが送信した :class:`~discord.WebhookMessage` をひとつ取得します。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.fetch_message:7\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook.fetch_message:5\n#: ../../../discord/abc.py:docstring of discord.abc.Messageable.fetch_message:5\n#: ../../../discord/user.py:docstring of discord.abc.Messageable.fetch_message:5\n#: ../../../discord/member.py:docstring of discord.abc.Messageable.fetch_message:5\nmsgid \"The message ID to look for.\"\nmsgstr \"探すメッセージのID。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.fetch_message:9\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook.fetch_message:7\nmsgid \"The thread to look in.\"\nmsgstr \"確認するスレッド。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.fetch_message:12\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook.fetch_message:10\n#: ../../../discord/abc.py:docstring of discord.abc.Messageable.fetch_message:8\n#: ../../../discord/user.py:docstring of discord.abc.Messageable.fetch_message:8\n#: ../../../discord/member.py:docstring of discord.abc.Messageable.fetch_message:8\nmsgid \"The specified message was not found.\"\nmsgstr \"指定されたメッセージが見つからなかった場合。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.fetch_message:13\n#: ../../../discord/webhook/async_.py:docstring of discord.message.PartialMessage.fetch:6\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook.fetch_message:11\n#: ../../../discord/abc.py:docstring of discord.abc.Messageable.fetch_message:9\n#: ../../../discord/user.py:docstring of discord.abc.Messageable.fetch_message:9\nmsgid \"You do not have the permissions required to get a message.\"\nmsgstr \"メッセージの取得に必要な権限がない場合。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.fetch_message:14\n#: ../../../discord/webhook/async_.py:docstring of discord.message.PartialMessage.fetch:7\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook.fetch_message:12\n#: ../../../discord/abc.py:docstring of discord.abc.Messageable.fetch_message:10\n#: ../../../discord/user.py:docstring of discord.abc.Messageable.fetch_message:10\nmsgid \"Retrieving the message failed.\"\nmsgstr \"メッセージの取得に失敗した場合。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.fetch_message:15\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook.fetch_message:13\nmsgid \"There was no token associated with this webhook.\"\nmsgstr \"Webhookに紐づいたトークンが存在しない場合。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.fetch_message:17\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook.fetch_message:15\n#: ../../../discord/abc.py:docstring of discord.abc.Messageable.fetch_message:12\n#: ../../../discord/user.py:docstring of discord.abc.Messageable.fetch_message:12\n#: ../../../discord/member.py:docstring of discord.abc.Messageable.fetch_message:12\nmsgid \"The message asked for.\"\nmsgstr \"要求されたメッセージ。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.fetch_message:18\nmsgid \":class:`~discord.WebhookMessage`\"\nmsgstr \":class:`~discord.WebhookMessage`\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.edit_message:3\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook.edit_message:1\nmsgid \"Edits a message owned by this webhook.\"\nmsgstr \"このWebhookが所有するメッセージを編集します。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.edit_message:5\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook.edit_message:3\nmsgid \"This is a lower level interface to :meth:`WebhookMessage.edit` in case you only have an ID.\"\nmsgstr \"これは、IDしか持っていない場合のための、 :meth:`WebhookMessage.edit` より低レベルなインターフェースです。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.edit_message:10\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.WebhookMessage.edit:7\nmsgid \"The edit is no longer in-place, instead the newly edited message is returned.\"\nmsgstr \"編集はメッセージを置き換えず、編集された新しいメッセージが返されるようになりました。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.edit_message:17\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook.edit_message:8\nmsgid \"The message ID to edit.\"\nmsgstr \"編集するメッセージ ID。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.edit_message:19\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.WebhookMessage.edit:14\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook.edit_message:10\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhookMessage.edit:7\nmsgid \"The content to edit the message with or ``None`` to clear it.\"\nmsgstr \"メッセージの内容を編集する場合はそのメッセージを、内容を削除する際は、``None`` を指定します。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.edit_message:21\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.WebhookMessage.edit:16\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook.edit_message:12\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhookMessage.edit:9\nmsgid \"A list of embeds to edit the message with.\"\nmsgstr \"メッセージを編集するための埋め込みのリスト。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.edit_message:23\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.WebhookMessage.edit:18\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook.edit_message:14\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhookMessage.edit:11\nmsgid \"The embed to edit the message with. ``None`` suppresses the embeds. This should not be mixed with the ``embeds`` parameter.\"\nmsgstr \"メッセージを編集するための埋め込み。 ``None`` を渡すと埋め込みが除去されます。 ``embeds`` パラメータと同時に使用できません。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.edit_message:26\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.WebhookMessage.edit:21\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook.edit_message:17\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhookMessage.edit:14\n#: ../../../discord/message.py:docstring of discord.message.Message.edit:28\nmsgid \"A list of attachments to keep in the message as well as new files to upload. If ``[]`` is passed then all attachments are removed.\"\nmsgstr \"メッセージ内で残す添付ファイルと、新規にアップロードする添付ファイルのリスト。 ``[]`` が渡された場合すべての添付ファイルが除去されます。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.edit_message:31\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.WebhookMessage.edit:30\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook.edit_message:22\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhookMessage.edit:23\nmsgid \"Controls the mentions being processed in this message. See :meth:`.abc.Messageable.send` for more information.\"\nmsgstr \"このメッセージで処理されるメンションを制御します。詳細は :meth:`.abc.Messageable.send` を参照してください。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.edit_message:34\nmsgid \"The updated view to update this message with. If ``None`` is passed then the view is removed. The webhook must have state attached, similar to :meth:`send`.\"\nmsgstr \"メッセージを編集するための更新されたビュー。 ``None`` を渡すとビューが除去されます。 :meth:`send` と同様にWebhookにはステートが付属していないといけません。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.edit_message:40\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.delete_message:20\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook.edit_message:25\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook.delete_message:10\nmsgid \"The thread the webhook message belongs to.\"\nmsgstr \"Webhookメッセージが属するスレッド。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.edit_message:45\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.WebhookMessage.edit:39\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.WebhookMessage.add_files:10\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.WebhookMessage.remove_attachments:10\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook.edit_message:30\nmsgid \"Editing the message failed.\"\nmsgstr \"メッセージの編集に失敗した場合。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.edit_message:46\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.WebhookMessage.edit:40\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook.edit_message:31\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhookMessage.edit:28\nmsgid \"Edited a message that is not yours.\"\nmsgstr \"自分以外のメッセージを編集しようとした場合。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.edit_message:47\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.WebhookMessage.edit:41\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook.edit_message:32\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhookMessage.edit:29\n#: ../../../discord/message.py:docstring of discord.message.Message.edit:61\nmsgid \"You specified both ``embed`` and ``embeds``\"\nmsgstr \"``embed`` と ``embeds`` の両方を指定した場合。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.edit_message:48\nmsgid \"The length of ``embeds`` was invalid,     there was no token associated with this webhook or the webhook had     no state.\"\nmsgstr \"``embeds`` の長さが不正な場合、Webhookに紐づいたトークンが存在しない場合、またはWebhookにステートが付属していない場合。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.edit_message:50\nmsgid \"The newly edited webhook message.\"\nmsgstr \"編集された新しいWebhookメッセージ。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.edit_message:51\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.WebhookMessage.edit:45\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.WebhookMessage.add_files:14\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.WebhookMessage.remove_attachments:14\nmsgid \":class:`WebhookMessage`\"\nmsgstr \":class:`WebhookMessage`\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.delete_message:3\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook.delete_message:1\nmsgid \"Deletes a message owned by this webhook.\"\nmsgstr \"このWebhookが所有するメッセージを削除します。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.delete_message:5\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook.delete_message:3\nmsgid \"This is a lower level interface to :meth:`WebhookMessage.delete` in case you only have an ID.\"\nmsgstr \"これは、IDしか持っていない場合のための、 :meth:`WebhookMessage.delete` より低レベルなインターフェースです。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.delete_message:12\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.get_partial_message:10\n#: ../../../discord/channel.py:docstring of discord.channel.DMChannel.get_partial_message:10\nmsgid \"``message_id`` parameter is now positional-only.\"\nmsgstr \"引数 ``message_id`` は位置専用引数となりました。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.delete_message:18\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook.delete_message:8\nmsgid \"The message ID to delete.\"\nmsgstr \"削除するメッセージ ID。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.delete_message:25\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.WebhookMessage.delete:11\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook.delete_message:15\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhookMessage.delete:9\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.delete:17\nmsgid \"Deleting the message failed.\"\nmsgstr \"メッセージの削除に失敗した場合。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.Webhook.delete_message:26\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook.delete_message:16\nmsgid \"Deleted a message that is not yours.\"\nmsgstr \"自分以外のメッセージを削除しようとした場合。\"\n\n#: ../../api.rst:4277\nmsgid \"WebhookMessage\"\nmsgstr \"WebhookMessage\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.WebhookMessage:1\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhookMessage:1\nmsgid \"Represents a message sent from your webhook.\"\nmsgstr \"Webhookから送信されたメッセージです。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.WebhookMessage:3\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhookMessage:3\nmsgid \"This allows you to edit or delete a message sent by your webhook.\"\nmsgstr \"これにより、webhookから送信されたメッセージを編集、または削除できます。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.WebhookMessage:6\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhookMessage:6\nmsgid \"This inherits from :class:`discord.Message` with changes to :meth:`edit` and :meth:`delete` to work.\"\nmsgstr \"これは :meth:`edit` と :meth:`delete` が機能するように変更された上で :class:`discord.Message` を継承しています。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.WebhookMessage.edit:3\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhookMessage.edit:1\n#: ../../../discord/message.py:docstring of discord.message.Message.edit:3\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.edit:3\nmsgid \"Edits the message.\"\nmsgstr \"メッセージを編集します。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.WebhookMessage.edit:26\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhookMessage.edit:19\n#: ../../../discord/message.py:docstring of discord.message.Message.edit:33\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.edit:30\nmsgid \"New files will always appear after current attachments.\"\nmsgstr \"新しいファイルは常に現在の添付ファイルのあとに表示されます。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.WebhookMessage.edit:33\n#: ../../../discord/message.py:docstring of discord.message.Message.edit:55\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.edit:47\nmsgid \"The updated view to update this message with. If ``None`` is passed then the view is removed.\"\nmsgstr \"このメッセージを更新するために更新されたビュー。 ``None`` が渡された場合、ビューは削除されます。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.WebhookMessage.edit:42\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook.send:67\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook.edit_message:33\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhookMessage.edit:30\nmsgid \"The length of ``embeds`` was invalid or     there was no token associated with this webhook.\"\nmsgstr \"``embeds`` の長さが不正な場合、もしくはこのwebhookに紐付けられたトークンがない場合。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.WebhookMessage.edit:44\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.WebhookMessage.add_files:13\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.WebhookMessage.remove_attachments:13\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhookMessage.edit:32\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhookMessage.add_files:11\nmsgid \"The newly edited message.\"\nmsgstr \"編集された新しいメッセージ。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.WebhookMessage.add_files:3\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhookMessage.add_files:1\n#: ../../../discord/message.py:docstring of discord.message.Message.add_files:3\nmsgid \"Adds new files to the end of the message attachments.\"\nmsgstr \"メッセージの添付ファイルの末尾に新しいファイルを追加します。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.WebhookMessage.add_files:7\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhookMessage.add_files:5\n#: ../../../discord/message.py:docstring of discord.message.Message.add_files:7\nmsgid \"New files to add to the message.\"\nmsgstr \"メッセージに追加する新しいファイル。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.WebhookMessage.add_files:11\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.WebhookMessage.remove_attachments:11\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhookMessage.add_files:9\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhookMessage.remove_attachments:9\n#: ../../../discord/message.py:docstring of discord.message.Message.add_files:11\nmsgid \"Tried to edit a message that isn't yours.\"\nmsgstr \"自分以外のメッセージを編集しようとした場合。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.WebhookMessage.remove_attachments:3\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhookMessage.remove_attachments:1\n#: ../../../discord/message.py:docstring of discord.message.Message.remove_attachments:3\nmsgid \"Removes attachments from the message.\"\nmsgstr \"メッセージの添付ファイルを削除します。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.WebhookMessage.remove_attachments:7\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhookMessage.remove_attachments:5\n#: ../../../discord/message.py:docstring of discord.message.Message.remove_attachments:7\nmsgid \"Attachments to remove from the message.\"\nmsgstr \"メッセージから削除する添付ファイル。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.WebhookMessage.delete:3\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhookMessage.delete:1\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.delete:3\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.delete:3\nmsgid \"Deletes the message.\"\nmsgstr \"メッセージを削除します。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.WebhookMessage.delete:5\nmsgid \"If provided, the number of seconds to wait before deleting the message. The waiting is done in the background and deletion failures are ignored.\"\nmsgstr \"指定された場合、メッセージを削除するまでの待機秒数。待機はバックグラウンドで行われ、削除の失敗は無視されます。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.WebhookMessage.delete:9\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhookMessage.delete:7\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.delete:15\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.delete:15\nmsgid \"You do not have proper permissions to delete the message.\"\nmsgstr \"メッセージを削除するための適切な権限がない場合。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.WebhookMessage.delete:10\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhookMessage.delete:8\nmsgid \"The message was deleted already.\"\nmsgstr \"メッセージがすでに削除されている場合。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.message.PartialMessage.add_reaction:3\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.add_reaction:3\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.add_reaction:3\nmsgid \"Adds a reaction to the message.\"\nmsgstr \"メッセージにリアクションを追加します。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.message.PartialMessage.add_reaction:5\n#: ../../../discord/webhook/async_.py:docstring of discord.message.PartialMessage.clear_reaction:5\n#: ../../../discord/webhook/async_.py:docstring of discord.message.PartialMessage.remove_reaction:5\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.add_reaction:5\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.clear_reaction:5\nmsgid \"The emoji may be a unicode emoji or a custom guild :class:`Emoji`.\"\nmsgstr \"絵文字はユニコード絵文字かカスタムギルド絵文字の :class:`Emoji` でないといけません。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.message.PartialMessage.add_reaction:7\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.add_reaction:7\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.add_reaction:7\nmsgid \"You must have :attr:`~Permissions.read_message_history` to do this. If nobody else has reacted to the message using this emoji, :attr:`~Permissions.add_reactions` is required.\"\nmsgstr \"これを行うためには、そのチャンネルにて :attr:`~Permissions.read_message_history` が必要です。 もし、他の人がその絵文字でリアクションしていない場合、さらに :attr:`~Permissions.add_reactions` が必要です。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.message.PartialMessage.add_reaction:13\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.add_reaction:13\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.delete_emoji:9\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.add_reaction:13\nmsgid \"``emoji`` parameter is now positional-only.\"\nmsgstr \"``emoji`` 引数は位置限定引数になりました。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.message.PartialMessage.add_reaction:19\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.add_reaction:19\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.add_reaction:19\nmsgid \"The emoji to react with.\"\nmsgstr \"リアクションとして追加する絵文字。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.message.PartialMessage.add_reaction:22\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.add_reaction:22\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.add_reaction:22\nmsgid \"Adding the reaction failed.\"\nmsgstr \"リアクションの追加に失敗した場合。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.message.PartialMessage.add_reaction:23\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.add_reaction:23\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.add_reaction:23\nmsgid \"You do not have the proper permissions to react to the message.\"\nmsgstr \"メッセージにリアクションを付けるのに必要な権限がない場合。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.message.PartialMessage.add_reaction:24\n#: ../../../discord/webhook/async_.py:docstring of discord.message.PartialMessage.clear_reaction:20\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.add_reaction:24\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.clear_reaction:20\n#: ../../../discord/reaction.py:docstring of discord.reaction.Reaction.clear:15\nmsgid \"The emoji you specified was not found.\"\nmsgstr \"指定された絵文字が見つからなかった場合。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.message.PartialMessage.add_reaction:25\n#: ../../../discord/webhook/async_.py:docstring of discord.message.PartialMessage.clear_reaction:21\n#: ../../../discord/webhook/async_.py:docstring of discord.message.PartialMessage.remove_reaction:25\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.add_reaction:25\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.clear_reaction:21\nmsgid \"The emoji parameter is invalid.\"\nmsgstr \"emojiパラメータが無効の場合。\"\n\n#: ../../docstring of discord.WebhookMessage.clean_content:1\n#: ../../docstring of discord.Message.clean_content:1\nmsgid \"A property that returns the content in a \\\"cleaned up\\\" manner. This basically means that mentions are transformed into the way the client shows it. e.g. ``<#id>`` will transform into ``#name``.\"\nmsgstr \"クリーンアップされたメッセージ内容を返すプロパティ。基本的に、これはメンションをクライアントが表示するようなものに変換にする、という意味です。例えば、 ``<#id>`` は ``#name`` に変換されます。\"\n\n#: ../../docstring of discord.WebhookMessage.clean_content:6\n#: ../../docstring of discord.Message.clean_content:6\nmsgid \"This will also transform @everyone and @here mentions into non-mentions.\"\nmsgstr \"また、これは @everyone メンション や @here メンションを、メンション機能の無いメッセージに変換します。\"\n\n#: ../../docstring of discord.WebhookMessage.clean_content:11\n#: ../../docstring of discord.Message.clean_content:11\nmsgid \"This *does not* affect markdown. If you want to escape or remove markdown then use :func:`utils.escape_markdown` or :func:`utils.remove_markdown` respectively, along with this function.\"\nmsgstr \"これはマークダウンには影響 *しません* 。マークダウンをエスケープまたは削除したい場合は、この関数とともに :func:`utils.escape_markdown` か :func:`utils.remove_markdown` を使用してください。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.message.PartialMessage.clear_reaction:3\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.clear_reaction:3\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.clear_reaction:3\nmsgid \"Clears a specific reaction from the message.\"\nmsgstr \"メッセージから特定のリアクションを除去します。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.message.PartialMessage.clear_reaction:7\n#: ../../../discord/webhook/async_.py:docstring of discord.message.PartialMessage.clear_reactions:5\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.clear_reaction:7\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.clear_reactions:5\n#: ../../../discord/reaction.py:docstring of discord.reaction.Reaction.clear:5\nmsgid \"You must have :attr:`~Permissions.manage_messages` to do this.\"\nmsgstr \"これを行うには、 :attr:`~Permissions.manage_messages` が必要です。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.message.PartialMessage.clear_reaction:15\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.clear_reaction:15\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.clear_reaction:15\nmsgid \"The emoji to clear.\"\nmsgstr \"除去する絵文字。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.message.PartialMessage.clear_reaction:18\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.clear_reaction:18\n#: ../../../discord/reaction.py:docstring of discord.reaction.Reaction.clear:13\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.clear_reaction:18\nmsgid \"Clearing the reaction failed.\"\nmsgstr \"リアクションの除去に失敗した場合。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.message.PartialMessage.clear_reaction:19\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.clear_reaction:19\n#: ../../../discord/reaction.py:docstring of discord.reaction.Reaction.clear:14\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.clear_reaction:19\nmsgid \"You do not have the proper permissions to clear the reaction.\"\nmsgstr \"リアクションを除去するのに必要な権限がない場合。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.message.PartialMessage.clear_reactions:3\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.clear_reactions:3\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.clear_reactions:3\nmsgid \"Removes all the reactions from the message.\"\nmsgstr \"メッセージからリアクションをすべて除去します。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.message.PartialMessage.clear_reactions:7\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.clear_reactions:7\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.clear_reactions:7\nmsgid \"Removing the reactions failed.\"\nmsgstr \"リアクションの除去に失敗した場合。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.message.PartialMessage.clear_reactions:8\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.clear_reactions:8\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.clear_reactions:8\nmsgid \"You do not have the proper permissions to remove all the reactions.\"\nmsgstr \"リアクションの除去に必要な権限を持っていない場合。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.message.PartialMessage.create_thread:3\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.create_thread:3\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.create_thread:3\nmsgid \"Creates a public thread from this message.\"\nmsgstr \"メッセージからパブリックスレッドを作成します。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.message.PartialMessage.create_thread:5\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.create_thread:5\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.create_thread:5\nmsgid \"You must have :attr:`~discord.Permissions.create_public_threads` in order to create a public thread from a message.\"\nmsgstr \"メッセージからパブリックスレッドを作成するには、 :attr:`~discord.Permissions.create_public_threads` 権限が必要です。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.message.PartialMessage.create_thread:8\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.create_thread:8\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.create_thread:8\nmsgid \"The channel this message belongs in must be a :class:`TextChannel`.\"\nmsgstr \"このメッセージが属するチャンネルは、 :class:`TextChannel` でなければなりません。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.message.PartialMessage.create_thread:12\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.create_thread:12\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.create_thread:10\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.create_thread:11\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.create_thread:12\nmsgid \"The name of the thread.\"\nmsgstr \"スレッドの名前。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.message.PartialMessage.create_thread:14\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.create_thread:14\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.create_thread:16\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.create_thread:13\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.create_thread:14\nmsgid \"The duration in minutes before a thread is automatically hidden from the channel list. If not provided, the channel's default auto archive duration is used.  Must be one of ``60``, ``1440``, ``4320``, or ``10080``, if provided.\"\nmsgstr \"スレッドがチャンネルリストから自動的に非表示になるまでの分単位の時間。 指定されていない場合、チャンネルのデフォルトの自動アーカイブ期間が使用されます。指定された場合は、 ``60`` 、 ``1440`` 、 ``4320`` 、または ``10080`` のいずれかでないといけません。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.message.PartialMessage.create_thread:14\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.create_thread:14\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.create_thread:16\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.create_thread:13\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.create_thread:14\nmsgid \"The duration in minutes before a thread is automatically hidden from the channel list. If not provided, the channel's default auto archive duration is used.\"\nmsgstr \"スレッドがチャンネルリストから自動的に非表示になるまでの分単位の時間。 指定されていない場合、チャンネルのデフォルトの自動アーカイブ期間が使用されます。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.message.PartialMessage.create_thread:17\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.create_thread:17\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.create_thread:19\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.create_thread:16\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.create_thread:17\nmsgid \"Must be one of ``60``, ``1440``, ``4320``, or ``10080``, if provided.\"\nmsgstr \"指定された場合は、 ``60`` 、 ``1440`` 、 ``4320`` 、または ``10080`` のいずれかでないといけません。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.message.PartialMessage.create_thread:19\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.create_thread:19\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.create_thread:30\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.create_thread:18\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.create_thread:19\nmsgid \"Specifies the slowmode rate limit for user in this channel, in seconds. The maximum value possible is ``21600``. By default no slowmode rate limit if this is ``None``.\"\nmsgstr \"このチャンネルの秒単位での低速モードレート制限。 最大値は ``21600`` です。デフォルトは ``None`` でこの場合は低速モードレート制限が無しとなります。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.message.PartialMessage.create_thread:23\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.create_thread:23\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.create_thread:25\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.create_thread:51\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.create_thread:23\nmsgid \"The reason for creating a new thread. Shows up on the audit log.\"\nmsgstr \"スレッドを作成する理由。監査ログに表示されます。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.message.PartialMessage.create_thread:26\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.create_thread:26\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.create_thread:35\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.create_thread:54\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.create_thread:26\nmsgid \"You do not have permissions to create a thread.\"\nmsgstr \"スレッドを作成する権限を持っていない場合。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.message.PartialMessage.create_thread:27\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.create_thread:27\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.create_thread:27\nmsgid \"Creating the thread failed.\"\nmsgstr \"スレッドの作成に失敗した場合。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.message.PartialMessage.create_thread:28\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.create_thread:28\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.create_thread:28\nmsgid \"This message does not have guild info attached.\"\nmsgstr \"メッセージがギルド情報を持っていない場合。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.message.PartialMessage.create_thread:30\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.create_thread:30\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.create_thread:30\nmsgid \"The created thread.\"\nmsgstr \"作成されたスレッド。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.message.PartialMessage.create_thread:31\n#: ../../../discord/webhook/async_.py:docstring of discord.message.PartialMessage.fetch_thread:17\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.create_thread:31\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.fetch_thread:17\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.create_thread:31\nmsgid \":class:`.Thread`\"\nmsgstr \":class:`.Thread`\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.WebhookMessage.created_at:1\n#: ../../../discord/message.py:docstring of discord.Message.created_at:1\nmsgid \"The message's creation time in UTC.\"\nmsgstr \"UTCの、メッセージが作成された時刻。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.WebhookMessage.edited_at:1\n#: ../../../discord/message.py:docstring of discord.Message.edited_at:1\nmsgid \"An aware UTC datetime object containing the edited time of the message.\"\nmsgstr \"メッセージの編集時間を含んだ、awareなUTCのdatetimeオブジェクト。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.message.PartialMessage.fetch:3\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.fetch:3\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.fetch:3\nmsgid \"Fetches the partial message to a full :class:`Message`.\"\nmsgstr \"部分的なメッセージを完全な :class:`Message` に変換します。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.message.PartialMessage.fetch:5\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.fetch:5\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.fetch:5\nmsgid \"The message was not found.\"\nmsgstr \"メッセージが見つからなかった場合。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.message.PartialMessage.fetch:9\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.fetch:9\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.fetch:9\nmsgid \"The full message.\"\nmsgstr \"完全なメッセージ。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.message.PartialMessage.fetch:10\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.fetch:10\n#: ../../../discord/message.py:docstring of discord.message.Message.edit:64\n#: ../../../discord/message.py:docstring of discord.message.Message.add_files:14\n#: ../../../discord/message.py:docstring of discord.message.Message.remove_attachments:14\nmsgid \":class:`Message`\"\nmsgstr \":class:`Message`\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.message.PartialMessage.fetch_thread:3\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.fetch_thread:3\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.fetch_thread:3\nmsgid \"Retrieves the public thread attached to this message.\"\nmsgstr \"\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.message.PartialMessage.fetch_thread:7\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.fetch_thread:7\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.fetch_thread:7\nmsgid \"This method is an API call. For general usage, consider :attr:`thread` instead.\"\nmsgstr \"\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.message.PartialMessage.fetch_thread:11\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.fetch_thread:11\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.fetch_thread:11\nmsgid \"An unknown channel type was received from Discord     or the guild the thread belongs to is not the same     as the one in this object points to.\"\nmsgstr \"\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.message.PartialMessage.fetch_thread:12\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.fetch_thread:12\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.fetch_thread:12\nmsgid \"Retrieving the thread failed.\"\nmsgstr \"\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.message.PartialMessage.fetch_thread:13\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.fetch_thread:13\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.fetch_thread:13\nmsgid \"There is no thread attached to this message.\"\nmsgstr \"\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.message.PartialMessage.fetch_thread:16\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.fetch_thread:16\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.fetch_thread:16\nmsgid \"The public thread attached to this message.\"\nmsgstr \"\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.message.Message.is_system:1\n#: ../../../discord/message.py:docstring of discord.message.Message.is_system:1\nmsgid \":class:`bool`: Whether the message is a system message.\"\nmsgstr \":class:`bool`: メッセージがシステムメッセージかどうか。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.message.Message.is_system:3\n#: ../../../discord/message.py:docstring of discord.message.Message.is_system:3\nmsgid \"A system message is a message that is constructed entirely by the Discord API in response to something.\"\nmsgstr \"システムメッセージは、何かの応答としてDiscord APIによって構築されるメッセージです。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.WebhookMessage.jump_url:1\n#: ../../../discord/message.py:docstring of discord.Message.jump_url:1\n#: ../../../discord/message.py:docstring of discord.PartialMessage.jump_url:1\nmsgid \"Returns a URL that allows the client to jump to this message.\"\nmsgstr \"クライアントがこのメッセージにジャンプすることのできるURLを返します。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.message.PartialMessage.pin:3\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.pin:3\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.pin:3\nmsgid \"Pins the message.\"\nmsgstr \"メッセージをピン留めします。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.message.PartialMessage.pin:5\n#: ../../../discord/webhook/async_.py:docstring of discord.message.PartialMessage.unpin:5\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.pin:5\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.unpin:5\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.pin:5\nmsgid \"You must have :attr:`~Permissions.manage_messages` to do this in a non-private channel context.\"\nmsgstr \"プライベートチャンネルでない通常のチャンネルで行うには、 :attr:`~Permissions.manage_messages` が必要です。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.message.PartialMessage.pin:8\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.pin:8\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.pin:8\nmsgid \"The reason for pinning the message. Shows up on the audit log.\"\nmsgstr \"メッセージをピン留めする理由。監査ログに表示されます。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.message.PartialMessage.pin:13\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.pin:13\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.pin:13\nmsgid \"You do not have permissions to pin the message.\"\nmsgstr \"このメッセージをピン留めする権限を持っていない場合。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.message.PartialMessage.pin:14\n#: ../../../discord/webhook/async_.py:docstring of discord.message.PartialMessage.unpin:14\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.pin:14\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.unpin:14\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.pin:14\nmsgid \"The message or channel was not found or deleted.\"\nmsgstr \"ピン留めするメッセージやチャンネルが見つからなかったか、既に削除されている場合。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.message.PartialMessage.pin:15\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.pin:15\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.pin:15\nmsgid \"Pinning the message failed, probably due to the channel     having more than 50 pinned messages.\"\nmsgstr \"チャンネルにすでに50個ピン留めされたメッセージがあるなどの理由で、メッセージのピン留めに失敗した場合。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.message.PartialMessage.publish:3\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.publish:3\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.publish:3\nmsgid \"Publishes this message to the channel's followers.\"\nmsgstr \"このメッセージをチャンネルのフォロワーに公開します。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.message.PartialMessage.publish:5\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.publish:5\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.publish:5\nmsgid \"The message must have been sent in a news channel. You must have :attr:`~Permissions.send_messages` to do this.\"\nmsgstr \"メッセージはニュースチャンネルで送信されている必要があります。これを行うには、 :attr:`~Permissions.send_messages` が必要です。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.message.PartialMessage.publish:8\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.publish:8\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.publish:8\nmsgid \"If the message is not your own then :attr:`~Permissions.manage_messages` is also needed.\"\nmsgstr \"自身のメッセージ以外の場合は :attr:`~Permissions.manage_messages` も必要です。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.message.PartialMessage.publish:11\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.publish:11\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.publish:11\nmsgid \"You do not have the proper permissions to publish this message     or the channel is not a news channel.\"\nmsgstr \"このメッセージを公開するための適切な権限がないか、チャンネルがニュースチャンネルでない場合。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.message.PartialMessage.publish:12\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.publish:12\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.publish:12\nmsgid \"Publishing the message failed.\"\nmsgstr \"メッセージの公開に失敗した場合。\"\n\n#: ../../docstring of discord.WebhookMessage.raw_channel_mentions:1\n#: ../../docstring of discord.Message.raw_channel_mentions:1\nmsgid \"A property that returns an array of channel IDs matched with the syntax of ``<#channel_id>`` in the message content.\"\nmsgstr \"メッセージ内容から、 ``<@channel_id>`` の構文に一致したもののchannel_idのリストを返すプロパティです。\"\n\n#: ../../docstring of discord.WebhookMessage.raw_channel_mentions:4\n#: ../../docstring of discord.WebhookMessage.raw_mentions:7\n#: ../../docstring of discord.WebhookMessage.raw_role_mentions:4\n#: ../../docstring of discord.Message.raw_mentions:7\n#: ../../docstring of discord.Message.raw_channel_mentions:4\nmsgid \"List[:class:`int`]\"\nmsgstr \"List[:class:`int`]\"\n\n#: ../../docstring of discord.WebhookMessage.raw_mentions:1\n#: ../../docstring of discord.Message.raw_mentions:1\nmsgid \"A property that returns an array of user IDs matched with the syntax of ``<@user_id>`` in the message content.\"\nmsgstr \"メッセージ内容から、 ``<@user_id>`` の構文に一致したもののuser_idのリストを返すプロパティです。\"\n\n#: ../../docstring of discord.WebhookMessage.raw_mentions:4\n#: ../../docstring of discord.Message.raw_mentions:4\nmsgid \"This allows you to receive the user IDs of mentioned users even in a private message context.\"\nmsgstr \"これによって、メッセージがプライベートチャンネル内のものであってもメンションされたユーザーのIDを受け取ることができます。\"\n\n#: ../../docstring of discord.WebhookMessage.raw_role_mentions:1\n#: ../../docstring of discord.Message.raw_role_mentions:1\nmsgid \"A property that returns an array of role IDs matched with the syntax of ``<@&role_id>`` in the message content.\"\nmsgstr \"メッセージ内容から、 ``<@&role_id>`` の構文に一致したもののrole_idのリストを返すプロパティです。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.message.PartialMessage.remove_reaction:3\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.remove_reaction:3\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.remove_reaction:3\nmsgid \"Remove a reaction by the member from the message.\"\nmsgstr \"メッセージからあるメンバーによるリアクションをすべて除去します。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.message.PartialMessage.remove_reaction:7\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.remove_reaction:7\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.remove_reaction:7\nmsgid \"If the reaction is not your own (i.e. ``member`` parameter is not you) then :attr:`~Permissions.manage_messages` is needed.\"\nmsgstr \"もしリアクションがあなたのものではなければ(つまり、 ``member`` パラメーターがあなたでないなら)、 :attr:`~Permissions.manage_messages` も必要になります。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.message.PartialMessage.remove_reaction:10\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.remove_reaction:10\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.remove_reaction:10\nmsgid \"The ``member`` parameter must represent a member and meet the :class:`abc.Snowflake` abc.\"\nmsgstr \"``member`` パラメータはメンバーを示し :class:`abc.Snowflake` 抽象基底クラスを満たす必要があります。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.message.PartialMessage.remove_reaction:17\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.remove_reaction:17\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.remove_reaction:17\nmsgid \"The emoji to remove.\"\nmsgstr \"除去する絵文字。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.message.PartialMessage.remove_reaction:19\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.remove_reaction:19\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.remove_reaction:19\nmsgid \"The member for which to remove the reaction.\"\nmsgstr \"リアクションを除去すべきメンバー。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.message.PartialMessage.remove_reaction:22\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.remove_reaction:22\n#: ../../../discord/reaction.py:docstring of discord.reaction.Reaction.remove:14\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.remove_reaction:22\nmsgid \"Removing the reaction failed.\"\nmsgstr \"リアクションの除去に失敗した場合。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.message.PartialMessage.remove_reaction:23\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.remove_reaction:23\n#: ../../../discord/reaction.py:docstring of discord.reaction.Reaction.remove:15\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.remove_reaction:23\nmsgid \"You do not have the proper permissions to remove the reaction.\"\nmsgstr \"リアクションの除去に必要な権限を持っていない場合。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.message.PartialMessage.remove_reaction:24\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.remove_reaction:24\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.remove_reaction:24\nmsgid \"The member or emoji you specified was not found.\"\nmsgstr \"指定されたメンバーや絵文字が見つからなかった場合。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.message.PartialMessage.reply:3\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.reply:3\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.reply:3\nmsgid \"A shortcut method to :meth:`.abc.Messageable.send` to reply to the :class:`.Message`.\"\nmsgstr \":class:`.Message` に返信するための :meth:`.abc.Messageable.send` のショートカットメソッド。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.message.PartialMessage.reply:8\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhookMessage.edit:3\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.move:16\n#: ../../../discord/abc.py:docstring of discord.abc.Messageable.send:19\n#: ../../../discord/user.py:docstring of discord.abc.Messageable.send:19\nmsgid \"This function will now raise :exc:`TypeError` or :exc:`ValueError` instead of ``InvalidArgument``.\"\nmsgstr \"この関数は ``InvalidArgument`` の代わりに :exc:`TypeError` や :exc:`ValueError` を送出します。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.message.PartialMessage.reply:13\n#: ../../../discord/abc.py:docstring of discord.abc.Messageable.send:83\n#: ../../../discord/user.py:docstring of discord.abc.Messageable.send:83\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.reply:13\n#: ../../../discord/member.py:docstring of discord.abc.Messageable.send:83\nmsgid \"You do not have the proper permissions to send the message.\"\nmsgstr \"メッセージを送信する適切な権限がない場合。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.message.PartialMessage.reply:14\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.reply:14\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.reply:14\nmsgid \"The ``files`` list is not of the appropriate size\"\nmsgstr \"``files`` リストの大きさが適切でない場合。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.message.PartialMessage.reply:15\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.reply:15\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.reply:15\nmsgid \"You specified both ``file`` and ``files``.\"\nmsgstr \"``file`` と ``filess`` の両方を指定した場合。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.message.PartialMessage.reply:17\n#: ../../../discord/abc.py:docstring of discord.abc.Messageable.send:87\n#: ../../../discord/user.py:docstring of discord.abc.Messageable.send:87\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.reply:17\n#: ../../../discord/member.py:docstring of discord.abc.Messageable.send:87\nmsgid \"The message that was sent.\"\nmsgstr \"送信されたメッセージ。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.message.PartialMessage.reply:18\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.reply:18\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.reply:18\nmsgid \":class:`.Message`\"\nmsgstr \":class:`.Message`\"\n\n#: ../../docstring of discord.WebhookMessage.system_content:1\n#: ../../docstring of discord.Message.system_content:1\nmsgid \"A property that returns the content that is rendered regardless of the :attr:`Message.type`.\"\nmsgstr \":attr:`Message.type` に関わらず、レンダリングされた際のメッセージ内容を返すプロパティ。\"\n\n#: ../../docstring of discord.WebhookMessage.system_content:4\n#: ../../docstring of discord.Message.system_content:4\nmsgid \"In the case of :attr:`MessageType.default` and :attr:`MessageType.reply`\\\\, this just returns the regular :attr:`Message.content`. Otherwise this returns an English message denoting the contents of the system message.\"\nmsgstr \":attr:`MessageType.default` と :attr:`MessageType.reply` の場合、これは :attr:`Message.content` と同じものを返すだけです。しかしそれ以外の場合は、システムメッセージの英語版を返します。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.WebhookMessage.thread:1\n#: ../../../discord/message.py:docstring of discord.Message.thread:1\n#: ../../../discord/message.py:docstring of discord.PartialMessage.thread:1\nmsgid \"The public thread created from this message, if it exists.\"\nmsgstr \"\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.WebhookMessage.thread:5\n#: ../../../discord/message.py:docstring of discord.Message.thread:5\nmsgid \"For messages received via the gateway this does not retrieve archived threads, as they are not retained in the internal cache. Use :meth:`fetch_thread` instead.\"\nmsgstr \"\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.WebhookMessage.thread:10\n#: ../../../discord/message.py:docstring of discord.Message.thread:10\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.get_thread:14\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.get_thread:14\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.get_thread:14\nmsgid \"Optional[:class:`Thread`]\"\nmsgstr \"Optional[:class:`Thread`]\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.message.PartialMessage.to_reference:1\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.to_reference:1\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.to_reference:1\nmsgid \"Creates a :class:`~discord.MessageReference` from the current message.\"\nmsgstr \"現在のメッセージから :class:`~discord.MessageReference` を作成します。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.message.PartialMessage.to_reference:5\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.to_reference:5\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.to_reference:5\nmsgid \"Whether replying using the message reference should raise :class:`HTTPException` if the message no longer exists or Discord could not fetch the message.\"\nmsgstr \"メッセージ参照を使用して返信するとき、メッセージが存在しなくなった場合、またはDiscordがメッセージを取得できなかった場合、 :class:`HTTPException` を送出させるかどうか。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.message.PartialMessage.to_reference:11\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.to_reference:11\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.to_reference:11\nmsgid \"The reference to this message.\"\nmsgstr \"メッセージへの参照。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.message.PartialMessage.to_reference:12\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.to_reference:12\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.to_reference:12\nmsgid \":class:`~discord.MessageReference`\"\nmsgstr \":class:`~discord.MessageReference`\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.message.PartialMessage.unpin:3\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.unpin:3\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.unpin:3\nmsgid \"Unpins the message.\"\nmsgstr \"メッセージのピン留めを外します。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.message.PartialMessage.unpin:8\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.unpin:8\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.unpin:8\nmsgid \"The reason for unpinning the message. Shows up on the audit log.\"\nmsgstr \"メッセージのピン留めを解除した理由。監査ログに表示されます。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.message.PartialMessage.unpin:13\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.unpin:13\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.unpin:13\nmsgid \"You do not have permissions to unpin the message.\"\nmsgstr \"このメッセージのピン留めを外す権限を持っていない場合。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.message.PartialMessage.unpin:15\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.unpin:15\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.unpin:15\nmsgid \"Unpinning the message failed.\"\nmsgstr \"メッセージのピン留め解除に失敗した場合。\"\n\n#: ../../api.rst:4286\nmsgid \"SyncWebhook\"\nmsgstr \"SyncWebhook\"\n\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook:1\nmsgid \"Represents a synchronous Discord webhook.\"\nmsgstr \"同期的なDiscord webhookです。\"\n\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook:3\nmsgid \"For an asynchronous counterpart, see :class:`Webhook`.\"\nmsgstr \"非同期対応については、 :class:`Webhook` を参照してください。\"\n\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook.partial:7\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook.from_url:5\nmsgid \"The session to use to send requests with. Note that the library does not manage the session and will not close it. If not given, the ``requests`` auto session creation functions are used instead.\"\nmsgstr \"リクエストを送信するために使うセッション。ライブラリはセッションを管理しておらず、セッションを閉じないことに注意してください。指定されていない場合は、代わりに ``requests`` の自動セッション作成関数が使用されます。\"\n\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook.partial:16\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook.from_url:16\nmsgid \"A partial :class:`SyncWebhook`. A partial :class:`SyncWebhook` is just a :class:`SyncWebhook` object with an ID and a token.\"\nmsgstr \"部分的な :class:`SyncWebhook` 。部分的な :class:`SyncWebhook` はただのIDとトークンのみを持つ :class:`SyncWebhook` オブジェクトです。\"\n\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook.partial:18\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook.from_url:18\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook.fetch:20\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook.edit:22\nmsgid \":class:`SyncWebhook`\"\nmsgstr \":class:`SyncWebhook`\"\n\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook.edit:21\nmsgid \"The newly edited webhook.\"\nmsgstr \"編集された新しいWebhook。\"\n\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook.send:14\nmsgid \"Whether the server should wait before sending a response. This essentially means that the return type of this function changes from ``None`` to a :class:`WebhookMessage` if set to ``True``.\"\nmsgstr \"サーバーが応答を送信するまで待機するかどうか。``True`` が指定された場合、これは基本的にこの関数の戻り値の型が ``None`` から :class:`WebhookMessage` に変更されることを意味します。\"\n\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook.send:42\nmsgid \"The thread to send this message to.\"\nmsgstr \"このメッセージを送信するスレッド。\"\n\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook.send:70\nmsgid \"Optional[:class:`SyncWebhookMessage`]\"\nmsgstr \"Optional[:class:`SyncWebhookMessage`]\"\n\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook.fetch_message:1\nmsgid \"Retrieves a single :class:`~discord.SyncWebhookMessage` owned by this webhook.\"\nmsgstr \"このwebhookが送信した :class:`~discord.SyncWebhookMessage` を1つ取得します。\"\n\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhook.fetch_message:16\nmsgid \":class:`~discord.SyncWebhookMessage`\"\nmsgstr \":class:`~discord.SyncWebhookMessage`\"\n\n#: ../../api.rst:4295\nmsgid \"SyncWebhookMessage\"\nmsgstr \"SyncWebhookMessage\"\n\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhookMessage.edit:33\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhookMessage.add_files:12\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhookMessage.remove_attachments:12\nmsgid \":class:`SyncWebhookMessage`\"\nmsgstr \":class:`SyncWebhookMessage`\"\n\n#: ../../../discord/webhook/sync.py:docstring of discord.webhook.sync.SyncWebhookMessage.delete:3\nmsgid \"If provided, the number of seconds to wait before deleting the message. This blocks the thread.\"\nmsgstr \"指定された場合、メッセージを削除するまでの待機秒数。これはスレッドをブロックします。\"\n\n#: ../../api.rst:4305\nmsgid \"Abstract Base Classes\"\nmsgstr \"抽象基底クラス\"\n\n#: ../../api.rst:4307\nmsgid \"An :term:`abstract base class` (also known as an ``abc``) is a class that models can inherit to get their behaviour. **Abstract base classes should not be instantiated**. They are mainly there for usage with :func:`isinstance` and :func:`issubclass`\\\\.\"\nmsgstr \":term:`abstract base class` （ ``abc`` という名称でも知られています）はモデルが振る舞いを得るために継承するクラスです。 **抽象基底クラスはインスタンス化されるべきではありません。** これらは主に :func:`isinstance` や :func:`issubclass` で使用するために存在します。\"\n\n#: ../../api.rst:4311\nmsgid \"This library has a module related to abstract base classes, in which all the ABCs are subclasses of :class:`typing.Protocol`.\"\nmsgstr \"このライブラリには抽象基底クラスに関連するモジュールがあり、その中の抽象基底クラスは全て :class:`typing.Protocol` のサブクラスです。\"\n\n#: ../../api.rst:4315\nmsgid \"Snowflake\"\nmsgstr \"Snowflake\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.Snowflake:1\nmsgid \"An ABC that details the common operations on a Discord model.\"\nmsgstr \"Discordモデルに共通する処理を説明するABC。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.Snowflake:3\nmsgid \"Almost all :ref:`Discord models <discord_api_models>` meet this abstract base class.\"\nmsgstr \"ほぼすべての :ref:`Discord models <discord_api_models>` がこの抽象基底クラスを満たしています。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.Snowflake:6\nmsgid \"If you want to create a snowflake on your own, consider using :class:`.Object`.\"\nmsgstr \"スノーフレークを自分で作成したい場合は、 :class:`.Object` を使用することを検討してください。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.Snowflake:11\nmsgid \"The model's unique ID.\"\nmsgstr \"モデルのユニークなID。\"\n\n#: ../../api.rst:4323\n#: ../../api.rst:4403\nmsgid \"User\"\nmsgstr \"User\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.User:1\nmsgid \"An ABC that details the common operations on a Discord user.\"\nmsgstr \"Discordユーザーに共通する処理を説明するABC。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.User:3\n#: ../../../discord/abc.py:docstring of discord.abc.PrivateChannel:3\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel:3\n#: ../../../discord/abc.py:docstring of discord.abc.Connectable:4\nmsgid \"The following implement this ABC:\"\nmsgstr \"以下のクラスがこのABCを実装しています：\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.User:6\n#: ../../../discord/abc.py:docstring of discord.abc.PrivateChannel:14\nmsgid \":class:`~discord.ClientUser`\"\nmsgstr \":class:`~discord.ClientUser`\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.User:7\n#: ../../../discord/abc.py:docstring of discord.abc.Messageable:12\nmsgid \":class:`~discord.Member`\"\nmsgstr \":class:`~discord.Member`\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.User:9\n#: ../../../discord/abc.py:docstring of discord.abc.PrivateChannel:8\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel:11\nmsgid \"This ABC must also implement :class:`~discord.abc.Snowflake`.\"\nmsgstr \"この抽象基底クラスは :class:`~discord.abc.Snowflake` も実装しなければなりません。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.User:13\n#: ../../../discord/user.py:docstring of discord.user.ClientUser:23\n#: ../../../discord/user.py:docstring of discord.user.User:23\nmsgid \"The user's username.\"\nmsgstr \"ユーザー名。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.User:19\n#: ../../../discord/user.py:docstring of discord.user.ClientUser:35\n#: ../../../discord/user.py:docstring of discord.user.User:35\nmsgid \"The user's discriminator. This is a legacy concept that is no longer used.\"\nmsgstr \"ユーザーのタグ。これは、現在は使用されていない、過去の遺物です。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.User:25\nmsgid \"The user's global nickname.\"\nmsgstr \"ユーザーのグローバルの表示名。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.User:31\nmsgid \"If the user is a bot account.\"\nmsgstr \"ユーザーがBotであるかどうか。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.User:37\nmsgid \"If the user is a system account.\"\nmsgstr \"ユーザーがシステムアカウントであるかどうか。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.User.avatar:1\nmsgid \"Returns an Asset that represents the user's avatar, if present.\"\nmsgstr \"ユーザーのアバターが存在する場合は、それを表すアセットを返します。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.User.avatar:3\n#: ../../../discord/abc.py:docstring of discord.abc.User.avatar_decoration:5\nmsgid \"Optional[:class:`~discord.Asset`]\"\nmsgstr \"Optional[:class:`~discord.Asset`]\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.User.avatar_decoration:1\nmsgid \"Returns an Asset that represents the user's avatar decoration, if present.\"\nmsgstr \"\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.User.avatar_decoration_sku_id:1\nmsgid \"Returns an integer that represents the user's avatar decoration SKU ID, if present.\"\nmsgstr \"\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.User.default_avatar:3\n#: ../../../discord/abc.py:docstring of discord.abc.User.display_avatar:7\nmsgid \":class:`~discord.Asset`\"\nmsgstr \":class:`~discord.Asset`\"\n\n#: ../../api.rst:4331\nmsgid \"PrivateChannel\"\nmsgstr \"PrivateChannel\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.PrivateChannel:1\nmsgid \"An ABC that details the common operations on a private Discord channel.\"\nmsgstr \"Discordのプライベートチャンネルの一般的な操作を説明するABC。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.PrivateChannel:5\n#: ../../../discord/abc.py:docstring of discord.abc.Messageable:8\nmsgid \":class:`~discord.DMChannel`\"\nmsgstr \":class:`~discord.DMChannel`\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.PrivateChannel:6\n#: ../../../discord/abc.py:docstring of discord.abc.Messageable:9\nmsgid \":class:`~discord.GroupChannel`\"\nmsgstr \":class:`~discord.GroupChannel`\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.PrivateChannel:12\n#: ../../../discord/channel.py:docstring of discord.channel.DMChannel:31\n#: ../../../discord/channel.py:docstring of discord.channel.GroupChannel:29\nmsgid \"The user presenting yourself.\"\nmsgstr \"あなた自身を示すユーザー。\"\n\n#: ../../api.rst:4339\nmsgid \"GuildChannel\"\nmsgstr \"GuildChannel\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel:1\nmsgid \"An ABC that details the common operations on a Discord guild channel.\"\nmsgstr \"Discordのギルドチャンネルに共通する処理を説明するABC。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel:5\n#: ../../../discord/abc.py:docstring of discord.abc.Messageable:5\nmsgid \":class:`~discord.TextChannel`\"\nmsgstr \":class:`~discord.TextChannel`\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel:6\n#: ../../../discord/abc.py:docstring of discord.abc.Messageable:6\n#: ../../../discord/abc.py:docstring of discord.abc.Connectable:6\nmsgid \":class:`~discord.VoiceChannel`\"\nmsgstr \":class:`~discord.VoiceChannel`\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel:7\nmsgid \":class:`~discord.CategoryChannel`\"\nmsgstr \":class:`~discord.CategoryChannel`\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel:8\n#: ../../../discord/abc.py:docstring of discord.abc.Messageable:7\n#: ../../../discord/abc.py:docstring of discord.abc.Connectable:7\nmsgid \":class:`~discord.StageChannel`\"\nmsgstr \":class:`~discord.StageChannel`\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel:9\nmsgid \":class:`~discord.ForumChannel`\"\nmsgstr \":class:`~discord.ForumChannel`\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel:15\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel:23\n#: ../../../discord/channel.py:docstring of discord.channel.VoiceChannel:23\n#: ../../../discord/channel.py:docstring of discord.channel.StageChannel:25\nmsgid \"The channel name.\"\nmsgstr \"チャンネル名。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel:21\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel:29\n#: ../../../discord/channel.py:docstring of discord.channel.VoiceChannel:29\n#: ../../../discord/channel.py:docstring of discord.channel.StageChannel:31\nmsgid \"The guild the channel belongs to.\"\nmsgstr \"チャンネルが属するギルド。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel:23\n#: ../../../discord/raw_models.py:docstring of discord.raw_models.RawAppCommandPermissionsUpdateEvent:23\nmsgid \":class:`~discord.Guild`\"\nmsgstr \":class:`~discord.Guild`\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel:27\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_text_channel:51\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_voice_channel:19\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_stage_channel:21\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_forum:24\nmsgid \"The position in the channel list. This is a number that starts at 0. e.g. the top channel is position 0.\"\nmsgstr \"チャンネルリストにおける位置。これは0から始まる番号で、最も上のチャンネルの位置は0です。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.changed_roles:1\n#: ../../../discord/channel.py:docstring of discord.TextChannel.changed_roles:1\n#: ../../../discord/channel.py:docstring of discord.ForumChannel.changed_roles:1\n#: ../../../discord/channel.py:docstring of discord.VoiceChannel.changed_roles:1\n#: ../../../discord/channel.py:docstring of discord.StageChannel.changed_roles:1\nmsgid \"Returns a list of roles that have been overridden from their default values in the :attr:`~discord.Guild.roles` attribute.\"\nmsgstr \":attr:`~discord.Guild.roles` 属性にて指定されたデフォルト値から上書きされたロールのリストを返します。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.changed_roles:4\n#: ../../../discord/channel.py:docstring of discord.TextChannel.changed_roles:4\n#: ../../../discord/channel.py:docstring of discord.ForumChannel.changed_roles:4\n#: ../../../discord/channel.py:docstring of discord.VoiceChannel.changed_roles:4\n#: ../../../discord/channel.py:docstring of discord.StageChannel.changed_roles:4\nmsgid \"List[:class:`~discord.Role`]\"\nmsgstr \"List[:class:`~discord.Role`]\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.mention:1\n#: ../../../discord/channel.py:docstring of discord.TextChannel.mention:1\n#: ../../../discord/channel.py:docstring of discord.ForumChannel.mention:1\n#: ../../../discord/channel.py:docstring of discord.VoiceChannel.mention:1\n#: ../../../discord/channel.py:docstring of discord.StageChannel.mention:1\nmsgid \"The string that allows you to mention the channel.\"\nmsgstr \"チャンネルにメンションするための文字列。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.jump_url:1\n#: ../../../discord/channel.py:docstring of discord.PartialMessageable.jump_url:1\n#: ../../../discord/channel.py:docstring of discord.TextChannel.jump_url:1\n#: ../../../discord/channel.py:docstring of discord.ForumChannel.jump_url:1\n#: ../../../discord/channel.py:docstring of discord.VoiceChannel.jump_url:1\nmsgid \"Returns a URL that allows the client to jump to the channel.\"\nmsgstr \"クライアントがこのチャンネルにジャンプすることのできるURLを返します。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.created_at:1\n#: ../../../discord/channel.py:docstring of discord.PartialMessageable.created_at:1\n#: ../../../discord/channel.py:docstring of discord.TextChannel.created_at:1\n#: ../../../discord/channel.py:docstring of discord.ForumChannel.created_at:1\n#: ../../../discord/channel.py:docstring of discord.VoiceChannel.created_at:1\nmsgid \"Returns the channel's creation time in UTC.\"\nmsgstr \"チャンネルの作成された時間をUTCで返します。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.overwrites_for:1\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.overwrites_for:1\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.overwrites_for:1\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.overwrites_for:1\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.overwrites_for:1\nmsgid \"Returns the channel-specific overwrites for a member or a role.\"\nmsgstr \"メンバーまたはロール固有の上書きされたリストを返します\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.overwrites_for:3\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.overwrites_for:3\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.overwrites_for:3\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.overwrites_for:3\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.overwrites_for:3\nmsgid \"The role or user denoting whose overwrite to get.\"\nmsgstr \"上書きの対象となるロールやユーザー。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.overwrites_for:6\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.overwrites_for:6\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.overwrites_for:6\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.overwrites_for:6\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.overwrites_for:6\nmsgid \"The permission overwrites for this object.\"\nmsgstr \"そのオブジェクトの権限の上書き。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.overwrites_for:7\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.overwrites_for:7\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.overwrites_for:7\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.overwrites_for:7\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.overwrites_for:7\nmsgid \":class:`~discord.PermissionOverwrite`\"\nmsgstr \":class:`~discord.PermissionOverwrite`\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.overwrites:1\n#: ../../../discord/channel.py:docstring of discord.TextChannel.overwrites:1\n#: ../../../discord/channel.py:docstring of discord.ForumChannel.overwrites:1\n#: ../../../discord/channel.py:docstring of discord.VoiceChannel.overwrites:1\n#: ../../../discord/channel.py:docstring of discord.StageChannel.overwrites:1\nmsgid \"Returns all of the channel's overwrites.\"\nmsgstr \"チャンネルの上書きをすべて返します。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.overwrites:3\n#: ../../../discord/channel.py:docstring of discord.TextChannel.overwrites:3\n#: ../../../discord/channel.py:docstring of discord.ForumChannel.overwrites:3\n#: ../../../discord/channel.py:docstring of discord.VoiceChannel.overwrites:3\n#: ../../../discord/channel.py:docstring of discord.StageChannel.overwrites:3\nmsgid \"This is returned as a dictionary where the key contains the target which can be either a :class:`~discord.Role` or a :class:`~discord.Member` and the value is the overwrite as a :class:`~discord.PermissionOverwrite`.\"\nmsgstr \"これは、 :class:`~discord.Role` か :class:`~discord.Member` のターゲットをキーとし、 :class:`~discord.PermissionOverwrite` を値とする辞書型として返されます。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.overwrites:7\n#: ../../../discord/channel.py:docstring of discord.TextChannel.overwrites:7\n#: ../../../discord/channel.py:docstring of discord.ForumChannel.overwrites:7\n#: ../../../discord/channel.py:docstring of discord.VoiceChannel.overwrites:7\n#: ../../../discord/channel.py:docstring of discord.StageChannel.overwrites:7\nmsgid \"Overwrites can now be type-aware :class:`~discord.Object` in case of cache lookup failure\"\nmsgstr \"キャッシュ取得に失敗した場合、上書きが型付きの :class:`~discord.Object` になるようになりました。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.overwrites:10\n#: ../../../discord/channel.py:docstring of discord.TextChannel.overwrites:10\n#: ../../../discord/channel.py:docstring of discord.ForumChannel.overwrites:10\n#: ../../../discord/channel.py:docstring of discord.VoiceChannel.overwrites:10\n#: ../../../discord/channel.py:docstring of discord.StageChannel.overwrites:10\nmsgid \"The channel's permission overwrites.\"\nmsgstr \"チャンネルの権限の上書き。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.overwrites:11\n#: ../../../discord/channel.py:docstring of discord.TextChannel.overwrites:11\n#: ../../../discord/channel.py:docstring of discord.ForumChannel.overwrites:11\n#: ../../../discord/channel.py:docstring of discord.VoiceChannel.overwrites:11\n#: ../../../discord/channel.py:docstring of discord.StageChannel.overwrites:11\nmsgid \"Dict[Union[:class:`~discord.Role`, :class:`~discord.Member`, :class:`~discord.Object`], :class:`~discord.PermissionOverwrite`]\"\nmsgstr \"Dict[Union[:class:`~discord.Role`, :class:`~discord.Member`, :class:`~discord.Object`], :class:`~discord.PermissionOverwrite`]\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.category:1\n#: ../../../discord/channel.py:docstring of discord.TextChannel.category:1\n#: ../../../discord/channel.py:docstring of discord.ForumChannel.category:1\n#: ../../../discord/channel.py:docstring of discord.VoiceChannel.category:1\n#: ../../../discord/channel.py:docstring of discord.StageChannel.category:1\nmsgid \"The category this channel belongs to.\"\nmsgstr \"チャンネルが属するカテゴリ。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.category:3\n#: ../../../discord/channel.py:docstring of discord.TextChannel.category:3\n#: ../../../discord/channel.py:docstring of discord.ForumChannel.category:3\n#: ../../../discord/channel.py:docstring of discord.VoiceChannel.category:3\n#: ../../../discord/channel.py:docstring of discord.StageChannel.category:3\nmsgid \"If there is no category then this is ``None``.\"\nmsgstr \"カテゴリがない場合は ``None`` になります。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.category:5\n#: ../../../discord/channel.py:docstring of discord.TextChannel.category:5\n#: ../../../discord/channel.py:docstring of discord.ForumChannel.category:5\n#: ../../../discord/channel.py:docstring of discord.VoiceChannel.category:5\n#: ../../../discord/channel.py:docstring of discord.StageChannel.category:5\nmsgid \"Optional[:class:`~discord.CategoryChannel`]\"\nmsgstr \"Optional[:class:`~discord.CategoryChannel`]\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.permissions_synced:1\n#: ../../../discord/channel.py:docstring of discord.TextChannel.permissions_synced:1\n#: ../../../discord/channel.py:docstring of discord.ForumChannel.permissions_synced:1\n#: ../../../discord/channel.py:docstring of discord.VoiceChannel.permissions_synced:1\n#: ../../../discord/channel.py:docstring of discord.StageChannel.permissions_synced:1\nmsgid \"Whether or not the permissions for this channel are synced with the category it belongs to.\"\nmsgstr \"チャンネルの権限が属するカテゴリと同期されているかどうか。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.permissions_synced:4\n#: ../../../discord/channel.py:docstring of discord.TextChannel.permissions_synced:4\n#: ../../../discord/channel.py:docstring of discord.ForumChannel.permissions_synced:4\n#: ../../../discord/channel.py:docstring of discord.VoiceChannel.permissions_synced:4\n#: ../../../discord/channel.py:docstring of discord.StageChannel.permissions_synced:4\nmsgid \"If there is no category then this is ``False``.\"\nmsgstr \"カテゴリがない場合は ``False`` になります。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.permissions_for:1\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.permissions_for:1\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.permissions_for:1\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.permissions_for:1\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.permissions_for:1\nmsgid \"Handles permission resolution for the :class:`~discord.Member` or :class:`~discord.Role`.\"\nmsgstr \":class:`~discord.Member` や :class:`~discord.Role` の権限を解決します。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.permissions_for:4\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.permissions_for:4\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.permissions_for:4\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.permissions_for:4\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.permissions_for:4\nmsgid \"This function takes into consideration the following cases:\"\nmsgstr \"これは以下を考慮します：\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.permissions_for:6\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.permissions_for:6\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.permissions_for:6\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.permissions_for:6\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.permissions_for:6\nmsgid \"Guild owner\"\nmsgstr \"サーバーの所有者\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.permissions_for:7\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.permissions_for:7\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.permissions_for:7\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.permissions_for:7\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.permissions_for:7\nmsgid \"Guild roles\"\nmsgstr \"サーバーにあるロール\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.permissions_for:8\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.permissions_for:8\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.permissions_for:8\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.permissions_for:8\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.permissions_for:8\nmsgid \"Channel overrides\"\nmsgstr \"チャンネルの上書き\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.permissions_for:9\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.permissions_for:9\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.permissions_for:9\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.permissions_for:9\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.permissions_for:9\nmsgid \"Member overrides\"\nmsgstr \"メンバーの上書き\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.permissions_for:10\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.permissions_for:10\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.permissions_for:10\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.permissions_for:10\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.permissions_for:10\nmsgid \"Implicit permissions\"\nmsgstr \"自動で処理される権限\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.permissions_for:11\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.permissions_for:11\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.permissions_for:11\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.permissions_for:11\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.permissions_for:11\nmsgid \"Member timeout\"\nmsgstr \"メンバーのタイムアウト\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.permissions_for:13\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.permissions_for:13\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.permissions_for:13\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.permissions_for:13\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.permissions_for:13\nmsgid \"If a :class:`~discord.Role` is passed, then it checks the permissions someone with that role would have, which is essentially:\"\nmsgstr \":class:`~discord.Role` が渡された場合、そのロールを持つ人が持つべき権限を確認します。つまり：\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.permissions_for:16\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.permissions_for:16\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.permissions_for:16\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.permissions_for:16\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.permissions_for:16\nmsgid \"The default role permissions\"\nmsgstr \"デフォルトのロールの権限\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.permissions_for:17\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.permissions_for:17\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.permissions_for:17\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.permissions_for:17\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.permissions_for:17\nmsgid \"The permissions of the role used as a parameter\"\nmsgstr \"パラメータとして使用されるロールの権限\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.permissions_for:18\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.permissions_for:18\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.permissions_for:18\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.permissions_for:18\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.permissions_for:18\nmsgid \"The default role permission overwrites\"\nmsgstr \"デフォルトのロールの権限の上書き\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.permissions_for:19\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.permissions_for:19\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.permissions_for:19\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.permissions_for:19\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.permissions_for:19\nmsgid \"The permission overwrites of the role used as a parameter\"\nmsgstr \"パラメータとして使用されるロールの権限の上書き\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.permissions_for:21\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.permissions_for:21\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.permissions_for:21\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.permissions_for:21\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.permissions_for:21\nmsgid \"The object passed in can now be a role object.\"\nmsgstr \"ロールを渡すことができるようになりました。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.permissions_for:24\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.permissions_for:24\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.permissions_for:24\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.permissions_for:24\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.permissions_for:24\nmsgid \"``obj`` parameter is now positional-only.\"\nmsgstr \"``obj`` 引数は位置限定引数になりました。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.permissions_for:27\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.permissions_for:27\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.permissions_for:27\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.permissions_for:8\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.permissions_for:27\nmsgid \"The object to resolve permissions for. This could be either a member or a role. If it's a role then member overwrites are not computed.\"\nmsgstr \"権限を解決すべきオブジェクト。これはメンバーかロールです。ロールの場合メンバーの上書きは判断しません。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.permissions_for:32\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.permissions_for:32\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.permissions_for:32\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.permissions_for:15\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.permissions_for:32\nmsgid \"The resolved permissions for the member or role.\"\nmsgstr \"メンバーまたはロールの解決された権限。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.permissions_for:33\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.permissions_for:33\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.permissions_for:33\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.permissions_for:16\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.permissions_for:33\nmsgid \":class:`~discord.Permissions`\"\nmsgstr \":class:`~discord.Permissions`\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.delete:3\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.delete:3\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.delete:3\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.delete:3\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.delete:3\nmsgid \"Deletes the channel.\"\nmsgstr \"チャンネルを削除します。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.delete:5\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.clone:6\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.move:7\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.clone:6\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.delete:5\nmsgid \"You must have :attr:`~discord.Permissions.manage_channels` to do this.\"\nmsgstr \"これを行うには :attr:`~discord.Permissions.manage_channels` が必要です。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.delete:7\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.delete:7\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.delete:7\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.delete:7\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.delete:7\nmsgid \"The reason for deleting this channel. Shows up on the audit log.\"\nmsgstr \"チャンネルを削除する理由。監査ログに表示されます。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.delete:11\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.delete:11\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.delete:11\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.delete:11\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.delete:11\nmsgid \"You do not have proper permissions to delete the channel.\"\nmsgstr \"チャンネルを削除するのに必要な権限がない場合。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.delete:12\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.delete:12\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.delete:12\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.delete:12\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.delete:12\nmsgid \"The channel was not found or was already deleted.\"\nmsgstr \"チャンネルが見つからないか、すでに削除されていた場合。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.delete:13\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.delete:13\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.delete:13\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.delete:13\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.delete:13\nmsgid \"Deleting the channel failed.\"\nmsgstr \"チャンネルの削除に失敗した場合。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.set_permissions:3\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.set_permissions:3\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.set_permissions:3\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.set_permissions:3\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.set_permissions:3\nmsgid \"Sets the channel specific permission overwrites for a target in the channel.\"\nmsgstr \"ある対象に対して特定のチャンネルでの権限の上書きを設定します。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.set_permissions:6\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.set_permissions:6\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.set_permissions:6\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.set_permissions:6\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.set_permissions:6\nmsgid \"The ``target`` parameter should either be a :class:`~discord.Member` or a :class:`~discord.Role` that belongs to guild.\"\nmsgstr \"``target`` パラメータは当該ギルドに属する :class:`~discord.Member` か :class:`~discord.Role` であるべきです。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.set_permissions:9\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.set_permissions:9\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.set_permissions:9\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.set_permissions:9\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.set_permissions:9\nmsgid \"The ``overwrite`` parameter, if given, must either be ``None`` or :class:`~discord.PermissionOverwrite`. For convenience, you can pass in keyword arguments denoting :class:`~discord.Permissions` attributes. If this is done, then you cannot mix the keyword arguments with the ``overwrite`` parameter.\"\nmsgstr \"``overwrite`` パラメータを渡す場合は、それは ``None`` か、 :class:`~discord.PermissionOverwrite` でないといけません。利便性のため、 :class:`~discord.Permissions` の属性を示すキーワード引数を渡すこともできます。これと ``overwrite`` パラメータは同時に使用できません。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.set_permissions:15\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.set_permissions:15\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.set_permissions:15\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.set_permissions:15\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.set_permissions:15\nmsgid \"If the ``overwrite`` parameter is ``None``, then the permission overwrites are deleted.\"\nmsgstr \"``overwrite`` パラメータが ``None`` の場合は権限の上書きは削除されます。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.set_permissions:18\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.set_permissions:18\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.set_permissions:18\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.set_permissions:18\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.set_permissions:18\nmsgid \"You must have :attr:`~discord.Permissions.manage_roles` to do this.\"\nmsgstr \"これを行うには :attr:`~discord.Permissions.manage_roles` が必要です。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.set_permissions:22\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.set_permissions:22\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.set_permissions:22\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.set_permissions:22\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.set_permissions:22\nmsgid \"This method *replaces* the old overwrites with the ones given.\"\nmsgstr \"これは、以前の上書きを与えられたもので *置き換えます* 。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.set_permissions:26\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.set_permissions:26\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.set_permissions:26\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.set_permissions:26\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.set_permissions:26\nmsgid \"Setting allow and deny: ::\"\nmsgstr \"許可と拒否の設定： ::\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.set_permissions:31\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.set_permissions:31\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.set_permissions:31\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.set_permissions:31\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.set_permissions:31\nmsgid \"Deleting overwrites ::\"\nmsgstr \"上書きの削除 ::\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.set_permissions:35\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.set_permissions:35\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.set_permissions:35\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.set_permissions:35\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.set_permissions:35\nmsgid \"Using :class:`~discord.PermissionOverwrite` ::\"\nmsgstr \":class:`~discord.PermissionOverwrite` を使用します\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.set_permissions:46\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.set_permissions:46\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.set_permissions:46\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.set_permissions:46\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.set_permissions:46\nmsgid \"The member or role to overwrite permissions for.\"\nmsgstr \"権限を上書きするメンバーかロール。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.set_permissions:48\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.set_permissions:48\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.set_permissions:48\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.set_permissions:48\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.set_permissions:48\nmsgid \"The permissions to allow and deny to the target, or ``None`` to delete the overwrite.\"\nmsgstr \"対象に対して許可し、または拒否する権限。 ``None`` を渡すと上書きを削除できます。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.set_permissions:51\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.set_permissions:51\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.set_permissions:51\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.set_permissions:51\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.set_permissions:51\nmsgid \"A keyword argument list of permissions to set for ease of use. Cannot be mixed with ``overwrite``.\"\nmsgstr \"設定すべき権限のキーワード引数リスト。これは ``overwrite`` と同時に使用できません。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.set_permissions:53\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.prune_members:24\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.unban:11\n#: ../../../discord/member.py:docstring of discord.member.Member.move_to:15\n#: ../../../discord/member.py:docstring of discord.member.Member.timeout:15\nmsgid \"The reason for doing this action. Shows up on the audit log.\"\nmsgstr \"アクションを実行する理由。監査ログに表示されます。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.set_permissions:56\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.set_permissions:56\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.set_permissions:56\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.set_permissions:56\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.set_permissions:56\nmsgid \"You do not have permissions to edit channel specific permissions.\"\nmsgstr \"チャンネルの権限を編集するための権限がない場合。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.set_permissions:57\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.set_permissions:57\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.set_permissions:57\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.set_permissions:57\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.set_permissions:57\nmsgid \"Editing channel specific permissions failed.\"\nmsgstr \"チャンネルの権限を編集するのに失敗した場合。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.set_permissions:58\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.set_permissions:58\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.set_permissions:58\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.set_permissions:58\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.set_permissions:58\nmsgid \"The role or member being edited is not part of the guild.\"\nmsgstr \"編集中のロールやメンバーがギルドに属さない場合。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.set_permissions:59\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.set_permissions:59\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.set_permissions:59\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.set_permissions:59\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.set_permissions:59\nmsgid \"The ``overwrite`` parameter was invalid or the target type was not     :class:`~discord.Role` or :class:`~discord.Member`.\"\nmsgstr \"``overwrite`` パラメータが無効か、対象が :class:`~discord.Role` や :class:`~discord.Member` でなかった場合。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.set_permissions:60\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.set_permissions:60\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.set_permissions:60\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.set_permissions:60\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.set_permissions:60\nmsgid \"The ``overwrite`` parameter and ``positions`` parameters were both     unset.\"\nmsgstr \"``overwrite`` パラメータと ``positions`` パラメータの両方とも指定されていなかった場合。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.clone:3\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.clone:3\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.clone:3\n#: ../../../discord/channel.py:docstring of discord.channel.VoiceChannel.clone:3\n#: ../../../discord/channel.py:docstring of discord.channel.StageChannel.clone:3\nmsgid \"Clones this channel. This creates a channel with the same properties as this channel.\"\nmsgstr \"チャンネルをクローンします。これはそのチャンネルと同じ属性を持つチャンネルを作成します。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.clone:10\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.clone:10\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.clone:10\n#: ../../../discord/channel.py:docstring of discord.channel.VoiceChannel.clone:10\n#: ../../../discord/channel.py:docstring of discord.channel.StageChannel.clone:10\nmsgid \"The name of the new channel. If not provided, defaults to this channel name.\"\nmsgstr \"新しいチャンネルの名前。渡されない場合はこのチャンネルの名前が使用されます。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.clone:13\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.clone:13\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.clone:13\n#: ../../../discord/channel.py:docstring of discord.channel.VoiceChannel.clone:13\n#: ../../../discord/channel.py:docstring of discord.channel.StageChannel.clone:13\nmsgid \"The reason for cloning this channel. Shows up on the audit log.\"\nmsgstr \"チャンネルを複製する理由。監査ログに表示されます。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.clone:16\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_text_channel:77\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_voice_channel:38\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_stage_channel:44\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_category:14\nmsgid \"You do not have the proper permissions to create this channel.\"\nmsgstr \"チャンネルを作成するのに必要な権限がない場合。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.clone:17\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_text_channel:78\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_voice_channel:39\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_stage_channel:45\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_category:15\nmsgid \"Creating the channel failed.\"\nmsgstr \"チャンネルの作成に失敗した場合。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.clone:20\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.clone:20\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.clone:20\n#: ../../../discord/channel.py:docstring of discord.channel.VoiceChannel.clone:20\n#: ../../../discord/channel.py:docstring of discord.channel.StageChannel.clone:20\nmsgid \":class:`.abc.GuildChannel`\"\nmsgstr \":class:`.abc.GuildChannel`\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.move:3\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.move:3\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.move:3\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.move:3\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.move:3\nmsgid \"A rich interface to help move a channel relative to other channels.\"\nmsgstr \"チャンネルを他のチャンネルと相対的に移動させるのに役立つインターフェイスです。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.move:5\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.move:5\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.move:5\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.move:5\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.move:5\nmsgid \"If exact position movement is required, ``edit`` should be used instead.\"\nmsgstr \"正確に位置を移動させる場合は、代わりに ``edit`` を使用する必要があります。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.move:11\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.move:11\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.move:11\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.move:11\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.move:11\nmsgid \"Voice channels will always be sorted below text channels. This is a Discord limitation.\"\nmsgstr \"ボイスチャンネルは常にテキストチャンネルの下にソートされます。これはDiscordの制限です。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.move:20\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.move:20\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.move:20\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.move:20\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.move:20\nmsgid \"Whether to move the channel to the beginning of the channel list (or category if given). This is mutually exclusive with ``end``, ``before``, and ``after``.\"\nmsgstr \"チャンネルをチャンネルリスト (または指定された場合はカテゴリ) の先頭に移動させるかどうかを指定します。これは、 ``end``, ``before``, ``after`` とは互いに排他的です。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.move:24\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.move:24\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.move:24\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.move:24\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.move:24\nmsgid \"Whether to move the channel to the end of the channel list (or category if given). This is mutually exclusive with ``beginning``, ``before``, and ``after``.\"\nmsgstr \"チャンネルをチャンネルリスト (または指定された場合はカテゴリ) の末尾に移動するかどうかを指定します。これは ``beginning``, ``before``, ``after`` とは互いに排他的です。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.move:28\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.move:28\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.move:28\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.move:28\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.move:28\nmsgid \"The channel that should be before our current channel. This is mutually exclusive with ``beginning``, ``end``, and ``after``.\"\nmsgstr \"このチャンネルの前にあるべきチャンネル。これと ``beginning`` 、 ``end`` 、 ``after`` は同時に使用できません。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.move:31\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.move:31\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.move:31\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.move:31\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.move:31\nmsgid \"The channel that should be after our current channel. This is mutually exclusive with ``beginning``, ``end``, and ``before``.\"\nmsgstr \"このチャンネルの後にあるべきチャンネル。これと ``beginning`` 、 ``end`` 、 ``before`` は同時に使用できません。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.move:34\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.move:34\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.move:34\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.move:34\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.move:34\nmsgid \"The number of channels to offset the move by. For example, an offset of ``2`` with ``beginning=True`` would move it 2 after the beginning. A positive number moves it below while a negative number moves it above. Note that this number is relative and computed after the ``beginning``, ``end``, ``before``, and ``after`` parameters.\"\nmsgstr \"移動のオフセット。たとえば、 ``beginning=True`` の場合にてオフセットが ``2`` ならば、チャンネルは始めから2つ分の場所に動きます。正の整数を渡すと下に、負の整数を渡すと上に動きます。この数は相対的で ``beginning`` 、 ``end`` 、 ``before`` 、 ``after`` パラメータの後に計算されます。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.move:41\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.move:41\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.move:41\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.move:41\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.move:41\nmsgid \"The category to move this channel under. If ``None`` is given then it moves it out of the category. This parameter is ignored if moving a category channel.\"\nmsgstr \"チャンネルの移動先のカテゴリ。 ``None`` を渡した場合はチャンネルはカテゴリに属さなくなります。このパラメータはカテゴリチャンネルの場合は無視されます。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.move:45\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.move:45\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.move:45\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.move:45\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.move:45\nmsgid \"Whether to sync the permissions with the category (if given).\"\nmsgstr \"（カテゴリが指定されている場合に）権限を同期すべきか。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.move:47\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.move:47\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.move:47\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.move:47\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.move:47\nmsgid \"The reason for the move.\"\nmsgstr \"移動の理由。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.move:50\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.move:50\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.move:50\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.move:50\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.move:50\nmsgid \"An invalid position was given.\"\nmsgstr \"位置が無効な場合。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.move:51\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.move:51\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.move:51\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.move:51\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.move:51\nmsgid \"A bad mix of arguments were passed.\"\nmsgstr \"同時に指定できない引数らが同時に指定された場合。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.move:52\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.move:52\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.move:52\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.move:52\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.move:52\nmsgid \"You do not have permissions to move the channel.\"\nmsgstr \"チャンネルを移動する権限がない場合。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.move:53\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.move:53\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.move:53\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.move:53\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.move:53\nmsgid \"Moving the channel failed.\"\nmsgstr \"チャンネルの移動に失敗した場合。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.create_invite:3\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.create_invite:3\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.create_invite:3\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.create_invite:3\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.create_invite:3\nmsgid \"Creates an instant invite from a text or voice channel.\"\nmsgstr \"テキストやボイスチャンネルから招待を作成します。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.create_invite:5\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.create_invite:5\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.create_invite:5\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.create_invite:5\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.create_invite:5\nmsgid \"You must have :attr:`~discord.Permissions.create_instant_invite` to do this.\"\nmsgstr \"これを行うには、 :attr:`~discord.Permissions.create_instant_invite` が必要です。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.create_invite:7\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.create_invite:7\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.create_invite:7\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.create_invite:7\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.create_invite:7\nmsgid \"How long the invite should last in seconds. If it's 0 then the invite doesn't expire. Defaults to ``0``.\"\nmsgstr \"招待の有効期限の秒単位の長さ。0の場合、招待は期限切れにはなりません。これはデフォルトでは ``0`` になります。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.create_invite:10\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.create_invite:10\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.create_invite:10\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.create_invite:10\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.create_invite:10\nmsgid \"How many uses the invite could be used for. If it's 0 then there are unlimited uses. Defaults to ``0``.\"\nmsgstr \"招待の使用回数の制限。もしこれが0なら、招待を無制限に使用することができます。デフォルトではこれは ``0`` になります。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.create_invite:13\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.create_invite:13\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.create_invite:13\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.create_invite:13\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.create_invite:13\nmsgid \"Denotes that the invite grants temporary membership (i.e. they get kicked after they disconnect). Defaults to ``False``.\"\nmsgstr \"一時的なメンバーとして招待するかを示しています。（つまり、招待されたメンバーは、特定のロールを付与されない限り、Discordを切断するときキックされます。）デフォルトは ``False`` です。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.create_invite:16\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.create_invite:16\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.create_invite:16\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.create_invite:16\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.create_invite:16\nmsgid \"Indicates if a unique invite URL should be created. Defaults to True. If this is set to ``False`` then it will return a previously created invite.\"\nmsgstr \"新しい招待URLを作成すべきか示します。既定ではTrueです。これが ``False`` に指定された場合は、前に作成された招待を返します。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.create_invite:20\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.create_invite:20\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.create_invite:20\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.create_invite:20\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.create_invite:20\nmsgid \"The reason for creating this invite. Shows up on the audit log.\"\nmsgstr \"招待を作成する理由。監査ログに表示されます。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.create_invite:22\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.create_invite:22\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.create_invite:22\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.create_invite:22\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.create_invite:22\nmsgid \"The type of target for the voice channel invite, if any.\"\nmsgstr \"ボイスチャンネル招待の対象の種類。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.create_invite:26\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.create_invite:26\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.create_invite:26\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.create_invite:26\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.create_invite:26\nmsgid \"The user whose stream to display for this invite, required if ``target_type`` is :attr:`.InviteTarget.stream`. The user must be streaming in the channel.\"\nmsgstr \"この招待に表示すべきストリームのユーザー。 ``target_type`` が :attr:`.InviteTarget.stream` の場合必須です。このユーザーはチャンネル内でストリームしていないといけません。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.create_invite:30\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.create_invite:30\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.create_invite:30\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.create_invite:30\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.create_invite:30\nmsgid \"Optional[:class:`int`]: The id of the embedded application for the invite, required if ``target_type`` is :attr:`.InviteTarget.embedded_application`.\"\nmsgstr \"Optional[:class:`int`]: 招待に紐づいた埋め込みアプリケーションのID。 ``target_type`` が :attr:`.InviteTarget.embedded_application` の場合必須です。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.create_invite:34\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.create_invite:34\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.create_invite:34\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.create_invite:34\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.create_invite:34\nmsgid \"Invite creation failed.\"\nmsgstr \"招待の作成に失敗した場合。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.create_invite:35\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.create_invite:35\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.create_invite:35\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.create_invite:35\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.create_invite:35\nmsgid \"The channel that was passed is a category or an invalid channel.\"\nmsgstr \"カテゴリや不正なチャンネルが渡された場合。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.create_invite:38\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.create_invite:38\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.create_invite:38\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.create_invite:38\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.create_invite:38\nmsgid \":class:`~discord.Invite`\"\nmsgstr \":class:`~discord.Invite`\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.invites:3\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.invites:3\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.invites:3\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.invites:3\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.invites:3\nmsgid \"Returns a list of all active instant invites from this channel.\"\nmsgstr \"このチャンネルから作成された全てのアクティブなインスタント招待のリストを返します。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.invites:5\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.invites:5\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.invites:5\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.invites:5\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.invites:5\nmsgid \"You must have :attr:`~discord.Permissions.manage_channels` to get this information.\"\nmsgstr \"この情報を取得するためには、 :attr:`~discord.Permissions.manage_channels` 権限を持っている必要があります。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.invites:7\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.fetch_ban:10\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.bans:31\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.invites:7\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.invites:7\nmsgid \"You do not have proper permissions to get the information.\"\nmsgstr \"適切な権限を有していない場合。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.invites:8\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.fetch_ban:12\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.bans:32\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.invites:8\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.invites:8\nmsgid \"An error occurred while fetching the information.\"\nmsgstr \"情報取得中にエラーが発生した場合。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.invites:10\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.invites:10\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.invites:10\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.invites:10\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.invites:10\nmsgid \"The list of invites that are currently active.\"\nmsgstr \"現時点でアクティブな招待のリスト。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.GuildChannel.invites:11\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.invites:11\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.invites:11\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.invites:11\n#: ../../../discord/channel.py:docstring of discord.abc.GuildChannel.invites:11\nmsgid \"List[:class:`~discord.Invite`]\"\nmsgstr \"List[:class:`~discord.Invite`]\"\n\n#: ../../api.rst:4347\nmsgid \"Messageable\"\nmsgstr \"Messageable\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.Messageable:1\nmsgid \"An ABC that details the common operations on a model that can send messages.\"\nmsgstr \"メッセージを送信できるモデルに共通する操作を説明するABC。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.Messageable:3\nmsgid \"The following classes implement this ABC:\"\nmsgstr \"以下のクラスがこのABCを実装しています：\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.Messageable:10\nmsgid \":class:`~discord.PartialMessageable`\"\nmsgstr \":class:`~discord.PartialMessageable`\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.Messageable:13\nmsgid \":class:`~discord.ext.commands.Context`\"\nmsgstr \":class:`~discord.ext.commands.Context`\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.Messageable:14\nmsgid \":class:`~discord.Thread`\"\nmsgstr \":class:`~discord.Thread`\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.Messageable.typing:1\n#: ../../../discord/abc.py:docstring of discord.abc.Messageable.typing:1\n#: ../../../discord/abc.py:docstring of discord.abc.Messageable.typing:1\n#: ../../../discord/channel.py:docstring of discord.abc.Messageable.typing:1\n#: ../../../discord/abc.py:docstring of discord.abc.Messageable.typing:1\nmsgid \"Returns an asynchronous context manager that allows you to send a typing indicator to the destination for an indefinite period of time, or 10 seconds if the context manager is called using ``await``.\"\nmsgstr \"入力インジケーターを宛先に無期限で、または ``await`` で呼び出された場合10秒間表示できるようにする非同期コンテキストマネージャーを返します。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.Messageable.typing:5\n#: ../../../discord/abc.py:docstring of discord.abc.Messageable.typing:13\n#: ../../../discord/abc.py:docstring of discord.abc.Messageable.typing:5\n#: ../../../discord/abc.py:docstring of discord.abc.Messageable.typing:13\n#: ../../../discord/abc.py:docstring of discord.abc.Messageable.typing:5\nmsgid \"Example Usage: ::\"\nmsgstr \"使用例： ::\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.Messageable.typing:19\n#: ../../../discord/abc.py:docstring of discord.abc.Messageable.typing:19\n#: ../../../discord/abc.py:docstring of discord.abc.Messageable.typing:19\n#: ../../../discord/channel.py:docstring of discord.abc.Messageable.typing:19\n#: ../../../discord/abc.py:docstring of discord.abc.Messageable.typing:19\nmsgid \"This no longer works with the ``with`` syntax, ``async with`` must be used instead.\"\nmsgstr \"これは ``with`` 構文で動作せず、代わりに ``async with`` を使用しないといけないように変更されました。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.Messageable.typing:22\n#: ../../../discord/abc.py:docstring of discord.abc.Messageable.typing:22\n#: ../../../discord/abc.py:docstring of discord.abc.Messageable.typing:22\n#: ../../../discord/channel.py:docstring of discord.abc.Messageable.typing:22\n#: ../../../discord/abc.py:docstring of discord.abc.Messageable.typing:22\nmsgid \"Added functionality to ``await`` the context manager to send a typing indicator for 10 seconds.\"\nmsgstr \"コンテキストマネージャーを ``await`` して入力インジケーターを10秒間送信する機能を追加しました。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.Messageable.send:3\n#: ../../../discord/user.py:docstring of discord.abc.Messageable.send:3\n#: ../../../discord/member.py:docstring of discord.abc.Messageable.send:3\n#: ../../../discord/channel.py:docstring of discord.abc.Messageable.send:3\n#: ../../../discord/channel.py:docstring of discord.abc.Messageable.send:3\nmsgid \"Sends a message to the destination with the content given.\"\nmsgstr \"指定された内容のメッセージを宛先に送信します。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.Messageable.send:5\n#: ../../../discord/user.py:docstring of discord.abc.Messageable.send:5\n#: ../../../discord/member.py:docstring of discord.abc.Messageable.send:5\n#: ../../../discord/channel.py:docstring of discord.abc.Messageable.send:5\n#: ../../../discord/channel.py:docstring of discord.abc.Messageable.send:5\nmsgid \"The content must be a type that can convert to a string through ``str(content)``. If the content is set to ``None`` (the default), then the ``embed`` parameter must be provided.\"\nmsgstr \"contentは、 ``str(content)`` によって文字列に変換が可能である必要があります。もしcontentに ``None`` (デフォルト) を指定するなら、 ``embed`` パラメータを設定する必要があります。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.Messageable.send:9\n#: ../../../discord/user.py:docstring of discord.abc.Messageable.send:9\n#: ../../../discord/member.py:docstring of discord.abc.Messageable.send:9\n#: ../../../discord/channel.py:docstring of discord.abc.Messageable.send:9\n#: ../../../discord/channel.py:docstring of discord.abc.Messageable.send:9\nmsgid \"To upload a single file, the ``file`` parameter should be used with a single :class:`~discord.File` object. To upload multiple files, the ``files`` parameter should be used with a :class:`list` of :class:`~discord.File` objects. **Specifying both parameters will lead to an exception**.\"\nmsgstr \"単一のファイルをアップロードするには、 ``file`` パラメータに :class:`~discord.File` オブジェクトを指定する必要があります。複数のファイルをアップロードするには、 ``files`` パラメータに :class:`~discord.File` オブジェクトの :class:`list` を指定する必要があります。なお、 **両方のパラメータを指定した場合には例外が発生します** 。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.Messageable.send:14\n#: ../../../discord/user.py:docstring of discord.abc.Messageable.send:14\n#: ../../../discord/member.py:docstring of discord.abc.Messageable.send:14\n#: ../../../discord/channel.py:docstring of discord.abc.Messageable.send:14\n#: ../../../discord/channel.py:docstring of discord.abc.Messageable.send:14\nmsgid \"To upload a single embed, the ``embed`` parameter should be used with a single :class:`~discord.Embed` object. To upload multiple embeds, the ``embeds`` parameter should be used with a :class:`list` of :class:`~discord.Embed` objects. **Specifying both parameters will lead to an exception**.\"\nmsgstr \"単一の埋め込みを送信するには、 ``embed`` パラメータに :class:`~discord.Embed` オブジェクトを指定する必要があります。複数の埋め込みを送信するには、 ``embeds`` パラメータに :class:`~discord.Embed` オブジェクトの :class:`list` を指定する必要があります。なお、 **両方のパラメータを指定した場合には例外が発生します** 。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.Messageable.send:27\n#: ../../../discord/user.py:docstring of discord.abc.Messageable.send:27\n#: ../../../discord/member.py:docstring of discord.abc.Messageable.send:27\n#: ../../../discord/channel.py:docstring of discord.abc.Messageable.send:27\n#: ../../../discord/channel.py:docstring of discord.abc.Messageable.send:27\nmsgid \"The rich embed for the content.\"\nmsgstr \"内容に埋め込む、typeが ``rich`` な埋め込み。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.Messageable.send:29\n#: ../../../discord/user.py:docstring of discord.abc.Messageable.send:29\n#: ../../../discord/member.py:docstring of discord.abc.Messageable.send:29\n#: ../../../discord/channel.py:docstring of discord.abc.Messageable.send:29\n#: ../../../discord/channel.py:docstring of discord.abc.Messageable.send:29\nmsgid \"A list of embeds to upload. Must be a maximum of 10.\"\nmsgstr \"送信する埋め込みのリスト。最大10個まで送信できます。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.Messageable.send:33\n#: ../../../discord/user.py:docstring of discord.abc.Messageable.send:33\n#: ../../../discord/member.py:docstring of discord.abc.Messageable.send:33\n#: ../../../discord/channel.py:docstring of discord.abc.Messageable.send:33\n#: ../../../discord/channel.py:docstring of discord.abc.Messageable.send:33\nmsgid \"The file to upload.\"\nmsgstr \"アップロードするファイル。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.Messageable.send:35\n#: ../../../discord/user.py:docstring of discord.abc.Messageable.send:35\n#: ../../../discord/member.py:docstring of discord.abc.Messageable.send:35\n#: ../../../discord/channel.py:docstring of discord.abc.Messageable.send:35\n#: ../../../discord/channel.py:docstring of discord.abc.Messageable.send:35\nmsgid \"A list of files to upload. Must be a maximum of 10.\"\nmsgstr \"アップロードするファイルのリスト。ファイル数は最大で10個まででなくてはいけません。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.Messageable.send:37\n#: ../../../discord/user.py:docstring of discord.abc.Messageable.send:37\n#: ../../../discord/member.py:docstring of discord.abc.Messageable.send:37\n#: ../../../discord/channel.py:docstring of discord.abc.Messageable.send:37\n#: ../../../discord/channel.py:docstring of discord.abc.Messageable.send:37\nmsgid \"The nonce to use for sending this message. If the message was successfully sent, then the message will have a nonce with this value.\"\nmsgstr \"メッセージの送信時に使用するナンス値。メッセージが正常に送信された場合、このメッセージには指定されたナンス値が含まれます。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.Messageable.send:40\n#: ../../../discord/user.py:docstring of discord.abc.Messageable.send:40\n#: ../../../discord/member.py:docstring of discord.abc.Messageable.send:40\n#: ../../../discord/channel.py:docstring of discord.abc.Messageable.send:40\n#: ../../../discord/channel.py:docstring of discord.abc.Messageable.send:40\nmsgid \"If provided, the number of seconds to wait in the background before deleting the message we just sent. If the deletion fails, then it is silently ignored.\"\nmsgstr \"指定したなら、これはメッセージを送信したあと待機し、すぐ削除する秒数となります。もし削除が失敗しても、それは静かに無視されます。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.Messageable.send:44\n#: ../../../discord/user.py:docstring of discord.abc.Messageable.send:44\n#: ../../../discord/message.py:docstring of discord.message.Message.edit:46\n#: ../../../discord/member.py:docstring of discord.abc.Messageable.send:44\n#: ../../../discord/channel.py:docstring of discord.abc.Messageable.send:44\nmsgid \"Controls the mentions being processed in this message. If this is passed, then the object is merged with :attr:`~discord.Client.allowed_mentions`. The merging behaviour only overrides attributes that have been explicitly passed to the object, otherwise it uses the attributes set in :attr:`~discord.Client.allowed_mentions`. If no object is passed at all then the defaults given by :attr:`~discord.Client.allowed_mentions` are used instead.\"\nmsgstr \"処理すべきメッセージ内のメンションを制御します。これが渡された場合、オブジェクトは :attr:`~discord.Client.allowed_mentions` とマージされます。これは、オブジェクトに明示的に渡された属性のみを上書きするもので、それ以外は :attr:`~discord.Client.allowed_mentions` で設定された属性が使用されます。もしオブジェクトが渡されていない場合は :attr:`~discord.Client.allowed_mentions` が既定値として利用されます。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.Messageable.send:53\n#: ../../../discord/user.py:docstring of discord.abc.Messageable.send:53\n#: ../../../discord/member.py:docstring of discord.abc.Messageable.send:53\n#: ../../../discord/channel.py:docstring of discord.abc.Messageable.send:53\n#: ../../../discord/channel.py:docstring of discord.abc.Messageable.send:53\nmsgid \"A reference to the :class:`~discord.Message` to which you are replying, this can be created using :meth:`~discord.Message.to_reference` or passed directly as a :class:`~discord.Message`. You can control whether this mentions the author of the referenced message using the :attr:`~discord.AllowedMentions.replied_user` attribute of ``allowed_mentions`` or by setting ``mention_author``.\"\nmsgstr \"返信する :class:`~discord.Message` への参照。これは、 :meth:`~discord.Message.to_reference` を使用して作成することができ、また :class:`~discord.Message` を直接渡すこともできます。これが返信元のメッセージの投稿者をメンションすべきかは、 ``allowed_mentions`` の :attr:`~discord.AllowedMentions.replied_user` 属性や、 ``mention_author`` パラメータで制御できます。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.Messageable.send:60\n#: ../../../discord/user.py:docstring of discord.abc.Messageable.send:60\n#: ../../../discord/member.py:docstring of discord.abc.Messageable.send:60\n#: ../../../discord/channel.py:docstring of discord.abc.Messageable.send:60\n#: ../../../discord/channel.py:docstring of discord.abc.Messageable.send:60\nmsgid \"If set, overrides the :attr:`~discord.AllowedMentions.replied_user` attribute of ``allowed_mentions``.\"\nmsgstr \"設定された場合、 ``allowed_mentions`` の :attr:`~discord.AllowedMentions.replied_user` 属性を上書きします。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.Messageable.send:64\n#: ../../../discord/user.py:docstring of discord.abc.Messageable.send:64\n#: ../../../discord/member.py:docstring of discord.abc.Messageable.send:64\n#: ../../../discord/channel.py:docstring of discord.abc.Messageable.send:64\n#: ../../../discord/channel.py:docstring of discord.abc.Messageable.send:64\nmsgid \"A Discord UI View to add to the message.\"\nmsgstr \"メッセージに追加するDiscord UI ビュー。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.Messageable.send:68\n#: ../../../discord/user.py:docstring of discord.abc.Messageable.send:68\n#: ../../../discord/member.py:docstring of discord.abc.Messageable.send:68\n#: ../../../discord/channel.py:docstring of discord.abc.Messageable.send:68\n#: ../../../discord/channel.py:docstring of discord.abc.Messageable.send:68\nmsgid \"A list of stickers to upload. Must be a maximum of 3.\"\nmsgstr \"送信するスタンプのリスト。最大3個まで送信できます。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.Messageable.send:84\n#: ../../../discord/user.py:docstring of discord.abc.Messageable.send:84\n#: ../../../discord/member.py:docstring of discord.abc.Messageable.send:84\n#: ../../../discord/channel.py:docstring of discord.abc.Messageable.send:84\n#: ../../../discord/channel.py:docstring of discord.abc.Messageable.send:84\nmsgid \"The ``files`` or ``embeds`` list is not of the appropriate size.\"\nmsgstr \"``files`` または ``embeds`` リストの大きさが適切でない場合。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.Messageable.send:85\n#: ../../../discord/user.py:docstring of discord.abc.Messageable.send:85\n#: ../../../discord/member.py:docstring of discord.abc.Messageable.send:85\n#: ../../../discord/channel.py:docstring of discord.abc.Messageable.send:85\n#: ../../../discord/channel.py:docstring of discord.abc.Messageable.send:85\nmsgid \"You specified both ``file`` and ``files``,     or you specified both ``embed`` and ``embeds``,     or the ``reference`` object is not a :class:`~discord.Message`,     :class:`~discord.MessageReference` or :class:`~discord.PartialMessage`.\"\nmsgstr \"``file`` と ``files`` の両方が指定された場合、 ``embed`` と ``embeds`` の両方が指定された場合、または ``reference`` が :class:`~discord.Message` 、 :class:`~discord.MessageReference` 、 :class:`~discord.PartialMessage` でない場合。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.Messageable.send:88\n#: ../../../discord/abc.py:docstring of discord.abc.Messageable.fetch_message:13\n#: ../../../discord/user.py:docstring of discord.abc.Messageable.fetch_message:13\n#: ../../../discord/user.py:docstring of discord.abc.Messageable.send:88\n#: ../../../discord/member.py:docstring of discord.abc.Messageable.fetch_message:13\nmsgid \":class:`~discord.Message`\"\nmsgstr \":class:`~discord.Message`\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.Messageable.fetch_message:3\n#: ../../../discord/user.py:docstring of discord.abc.Messageable.fetch_message:3\n#: ../../../discord/member.py:docstring of discord.abc.Messageable.fetch_message:3\n#: ../../../discord/channel.py:docstring of discord.abc.Messageable.fetch_message:3\n#: ../../../discord/channel.py:docstring of discord.abc.Messageable.fetch_message:3\nmsgid \"Retrieves a single :class:`~discord.Message` from the destination.\"\nmsgstr \"宛先から、単一の :class:`~discord.Message` を取得します。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.Messageable.pins:3\n#: ../../../discord/user.py:docstring of discord.abc.Messageable.pins:3\n#: ../../../discord/member.py:docstring of discord.abc.Messageable.pins:3\n#: ../../../discord/channel.py:docstring of discord.abc.Messageable.pins:3\n#: ../../../discord/channel.py:docstring of discord.abc.Messageable.pins:3\nmsgid \"Retrieves all messages that are currently pinned in the channel.\"\nmsgstr \"現時点でチャンネルにピン留めされている全てのメッセージを取得します。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.Messageable.pins:7\n#: ../../../discord/user.py:docstring of discord.abc.Messageable.pins:7\n#: ../../../discord/member.py:docstring of discord.abc.Messageable.pins:7\n#: ../../../discord/channel.py:docstring of discord.abc.Messageable.pins:7\n#: ../../../discord/channel.py:docstring of discord.abc.Messageable.pins:7\nmsgid \"Due to a limitation with the Discord API, the :class:`.Message` objects returned by this method do not contain complete :attr:`.Message.reactions` data.\"\nmsgstr \"Discord APIの制限により、このメソッドの返した :class:`.Message` オブジェクトには、完全な :attr:`Message.reactions` のデータが含まれていません。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.Messageable.pins:11\n#: ../../../discord/user.py:docstring of discord.abc.Messageable.pins:11\n#: ../../../discord/member.py:docstring of discord.abc.Messageable.pins:11\n#: ../../../discord/channel.py:docstring of discord.abc.Messageable.pins:11\n#: ../../../discord/channel.py:docstring of discord.abc.Messageable.pins:11\nmsgid \"You do not have the permission to retrieve pinned messages.\"\nmsgstr \"ピン留めされたメッセージの取得に必要な権限がない場合。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.Messageable.pins:12\n#: ../../../discord/user.py:docstring of discord.abc.Messageable.pins:12\n#: ../../../discord/member.py:docstring of discord.abc.Messageable.pins:12\n#: ../../../discord/channel.py:docstring of discord.abc.Messageable.pins:12\n#: ../../../discord/channel.py:docstring of discord.abc.Messageable.pins:12\nmsgid \"Retrieving the pinned messages failed.\"\nmsgstr \"ピン留めされたメッセージの取得に失敗した場合。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.Messageable.pins:14\n#: ../../../discord/user.py:docstring of discord.abc.Messageable.pins:14\n#: ../../../discord/member.py:docstring of discord.abc.Messageable.pins:14\n#: ../../../discord/channel.py:docstring of discord.abc.Messageable.pins:14\n#: ../../../discord/channel.py:docstring of discord.abc.Messageable.pins:14\nmsgid \"The messages that are currently pinned.\"\nmsgstr \"現時点でピン留めされているメッセージ。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.Messageable.pins:15\n#: ../../../discord/user.py:docstring of discord.abc.Messageable.pins:15\n#: ../../../discord/member.py:docstring of discord.abc.Messageable.pins:15\n#: ../../../discord/channel.py:docstring of discord.abc.Messageable.pins:15\n#: ../../../discord/channel.py:docstring of discord.abc.Messageable.pins:15\nmsgid \"List[:class:`~discord.Message`]\"\nmsgstr \"List[:class:`~discord.Message`]\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.Messageable.history:1\n#: ../../../discord/user.py:docstring of discord.abc.Messageable.history:1\n#: ../../../discord/member.py:docstring of discord.abc.Messageable.history:1\n#: ../../../discord/channel.py:docstring of discord.abc.Messageable.history:1\n#: ../../../discord/channel.py:docstring of discord.abc.Messageable.history:1\nmsgid \"Returns an :term:`asynchronous iterator` that enables receiving the destination's message history.\"\nmsgstr \"チャンネルのメッセージ履歴を取得する :term:`asynchronous iterator` を返します。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.Messageable.history:3\n#: ../../../discord/user.py:docstring of discord.abc.Messageable.history:3\n#: ../../../discord/member.py:docstring of discord.abc.Messageable.history:3\n#: ../../../discord/channel.py:docstring of discord.abc.Messageable.history:3\n#: ../../../discord/channel.py:docstring of discord.abc.Messageable.history:3\nmsgid \"You must have :attr:`~discord.Permissions.read_message_history` to do this.\"\nmsgstr \"これを行うためには、 :attr:`~discord.Permissions.read_message_history` が必要です。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.Messageable.history:14\n#: ../../../discord/user.py:docstring of discord.abc.Messageable.history:14\n#: ../../../discord/reaction.py:docstring of discord.reaction.Reaction.users:18\n#: ../../../discord/member.py:docstring of discord.abc.Messageable.history:14\n#: ../../../discord/channel.py:docstring of discord.abc.Messageable.history:14\nmsgid \"Flattening into a list: ::\"\nmsgstr \"リストにフラット化： ::\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.Messageable.history:21\n#: ../../../discord/user.py:docstring of discord.abc.Messageable.history:21\n#: ../../../discord/member.py:docstring of discord.abc.Messageable.history:21\n#: ../../../discord/channel.py:docstring of discord.abc.Messageable.history:21\n#: ../../../discord/channel.py:docstring of discord.abc.Messageable.history:21\nmsgid \"The number of messages to retrieve. If ``None``, retrieves every message in the channel. Note, however, that this would make it a slow operation.\"\nmsgstr \"取得するメッセージの数。 ``None`` の場合、チャンネル内のメッセージすべてを取得します。ただし、これには時間がかかります。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.Messageable.history:25\n#: ../../../discord/user.py:docstring of discord.abc.Messageable.history:25\n#: ../../../discord/member.py:docstring of discord.abc.Messageable.history:25\n#: ../../../discord/channel.py:docstring of discord.abc.Messageable.history:25\n#: ../../../discord/channel.py:docstring of discord.abc.Messageable.history:25\nmsgid \"Retrieve messages before this date or message. If a datetime is provided, it is recommended to use a UTC aware datetime. If the datetime is naive, it is assumed to be local time.\"\nmsgstr \"渡された日付、またはメッセージより前のメッセージを取得します。日付を指定する場合、UTC aware datetimeを利用することを推奨します。naive datetimeである場合、これはローカル時間であるとみなされます。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.Messageable.history:29\n#: ../../../discord/user.py:docstring of discord.abc.Messageable.history:29\n#: ../../../discord/member.py:docstring of discord.abc.Messageable.history:29\n#: ../../../discord/channel.py:docstring of discord.abc.Messageable.history:29\n#: ../../../discord/channel.py:docstring of discord.abc.Messageable.history:29\nmsgid \"Retrieve messages after this date or message. If a datetime is provided, it is recommended to use a UTC aware datetime. If the datetime is naive, it is assumed to be local time.\"\nmsgstr \"渡された日付、またはメッセージより後のメッセージを取得します。日付を指定する場合、UTC aware datetimeを利用することを推奨します。naive datetimeである場合、これはローカル時間であるとみなされます。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.Messageable.history:33\n#: ../../../discord/user.py:docstring of discord.abc.Messageable.history:33\n#: ../../../discord/member.py:docstring of discord.abc.Messageable.history:33\n#: ../../../discord/channel.py:docstring of discord.abc.Messageable.history:33\n#: ../../../discord/channel.py:docstring of discord.abc.Messageable.history:33\nmsgid \"Retrieve messages around this date or message. If a datetime is provided, it is recommended to use a UTC aware datetime. If the datetime is naive, it is assumed to be local time. When using this argument, the maximum limit is 101. Note that if the limit is an even number then this will return at most limit + 1 messages.\"\nmsgstr \"渡された日付、またはメッセージあたりのメッセージを取得します。日付を指定する場合、UTC aware datetimeを利用することを推奨します。naive datetimeである場合、これはローカル時間であるとみなされます。この引数を使用するときは、取得できる最大のメッセージ数は101個です。もし制限が偶数の場合は最大でそれに1を加えた分だけ返します。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.Messageable.history:39\n#: ../../../discord/user.py:docstring of discord.abc.Messageable.history:39\n#: ../../../discord/member.py:docstring of discord.abc.Messageable.history:39\n#: ../../../discord/channel.py:docstring of discord.abc.Messageable.history:39\n#: ../../../discord/channel.py:docstring of discord.abc.Messageable.history:39\nmsgid \"If set to ``True``, return messages in oldest->newest order. Defaults to ``True`` if ``after`` is specified, otherwise ``False``.\"\nmsgstr \"``True`` の場合、古いものから新しいものの順でメッセージを返します。既定値は ``after`` が指定された場合には ``True`` で、それ以外の場合は ``False`` です。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.Messageable.history:43\n#: ../../../discord/user.py:docstring of discord.abc.Messageable.history:43\n#: ../../../discord/member.py:docstring of discord.abc.Messageable.history:43\n#: ../../../discord/channel.py:docstring of discord.abc.Messageable.history:43\n#: ../../../discord/channel.py:docstring of discord.abc.Messageable.history:43\nmsgid \"You do not have permissions to get channel message history.\"\nmsgstr \"メッセージ履歴を読む権限が無い場合。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.Messageable.history:44\n#: ../../../discord/user.py:docstring of discord.abc.Messageable.history:44\n#: ../../../discord/member.py:docstring of discord.abc.Messageable.history:44\n#: ../../../discord/channel.py:docstring of discord.abc.Messageable.history:44\n#: ../../../discord/channel.py:docstring of discord.abc.Messageable.history:44\nmsgid \"The request to get message history failed.\"\nmsgstr \"メッセージ履歴の取得に失敗した場合。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.Messageable.history:46\n#: ../../../discord/user.py:docstring of discord.abc.Messageable.history:46\n#: ../../../discord/member.py:docstring of discord.abc.Messageable.history:46\n#: ../../../discord/channel.py:docstring of discord.abc.Messageable.history:46\n#: ../../../discord/channel.py:docstring of discord.abc.Messageable.history:46\nmsgid \":class:`~discord.Message` -- The message with the message data parsed.\"\nmsgstr \":class:`~discord.Message` -- メッセージデータをパースしたメッセージ。\"\n\n#: ../../api.rst:4359\nmsgid \"Connectable\"\nmsgstr \"Connectable\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.Connectable:1\nmsgid \"An ABC that details the common operations on a channel that can connect to a voice server.\"\nmsgstr \"ボイスサーバーに接続できるチャンネルに共通する操作を説明するABC。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.Connectable.connect:3\n#: ../../../discord/channel.py:docstring of discord.abc.Connectable.connect:3\n#: ../../../discord/channel.py:docstring of discord.abc.Connectable.connect:3\nmsgid \"Connects to voice and creates a :class:`~discord.VoiceClient` to establish your connection to the voice server.\"\nmsgstr \"ボイスに接続し :class:`~discord.VoiceClient` を作成してボイスサーバーへの接続を確立します。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.Connectable.connect:6\n#: ../../../discord/channel.py:docstring of discord.abc.Connectable.connect:6\n#: ../../../discord/channel.py:docstring of discord.abc.Connectable.connect:6\nmsgid \"This requires :attr:`~discord.Intents.voice_states`.\"\nmsgstr \":attr:`~discord.Intents.voice_states` が必要です。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.Connectable.connect:8\n#: ../../../discord/channel.py:docstring of discord.abc.Connectable.connect:8\n#: ../../../discord/channel.py:docstring of discord.abc.Connectable.connect:8\nmsgid \"The timeout in seconds to wait the connection to complete.\"\nmsgstr \"\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.Connectable.connect:10\n#: ../../../discord/channel.py:docstring of discord.abc.Connectable.connect:10\n#: ../../../discord/channel.py:docstring of discord.abc.Connectable.connect:10\nmsgid \"Whether the bot should automatically attempt a reconnect if a part of the handshake fails or the gateway goes down.\"\nmsgstr \"ハンドシェイクの一部が失敗し、またはゲートウェイが使用できない場合に、ボットが自動で再接続を試みるべきか。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.Connectable.connect:14\n#: ../../../discord/channel.py:docstring of discord.abc.Connectable.connect:14\n#: ../../../discord/channel.py:docstring of discord.abc.Connectable.connect:14\nmsgid \"A type that subclasses :class:`~discord.VoiceProtocol` to connect with. Defaults to :class:`~discord.VoiceClient`.\"\nmsgstr \":class:`~discord.VoiceProtocol` をサブクラスする型。既定値は :class:`~discord.VoiceClient` 。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.Connectable.connect:26\n#: ../../../discord/channel.py:docstring of discord.abc.Connectable.connect:26\n#: ../../../discord/channel.py:docstring of discord.abc.Connectable.connect:26\nmsgid \"Could not connect to the voice channel in time.\"\nmsgstr \"時間内にボイスチャンネルに接続できなかった場合。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.Connectable.connect:27\n#: ../../../discord/channel.py:docstring of discord.abc.Connectable.connect:27\n#: ../../../discord/channel.py:docstring of discord.abc.Connectable.connect:27\nmsgid \"You are already connected to a voice channel.\"\nmsgstr \"すでにボイスチャンネルに接続している場合。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.Connectable.connect:28\n#: ../../../discord/channel.py:docstring of discord.abc.Connectable.connect:28\n#: ../../../discord/channel.py:docstring of discord.abc.Connectable.connect:28\nmsgid \"The opus library has not been loaded.\"\nmsgstr \"opusライブラリが読み込まれていない場合。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.Connectable.connect:30\n#: ../../../discord/channel.py:docstring of discord.abc.Connectable.connect:30\n#: ../../../discord/channel.py:docstring of discord.abc.Connectable.connect:30\nmsgid \"A voice client that is fully connected to the voice server.\"\nmsgstr \"ボイスサーバーに完全に接続されたボイスクライアント。\"\n\n#: ../../../discord/abc.py:docstring of discord.abc.Connectable.connect:31\n#: ../../../discord/channel.py:docstring of discord.abc.Connectable.connect:31\n#: ../../../discord/channel.py:docstring of discord.abc.Connectable.connect:31\nmsgid \":class:`~discord.VoiceProtocol`\"\nmsgstr \":class:`~discord.VoiceProtocol`\"\n\n#: ../../api.rst:4369\nmsgid \"Discord Models\"\nmsgstr \"Discordモデル\"\n\n#: ../../api.rst:4371\nmsgid \"Models are classes that are received from Discord and are not meant to be created by the user of the library.\"\nmsgstr \"モデルはDiscordから受け取るクラスであり、ユーザーによって作成されることを想定していません。\"\n\n#: ../../api.rst:4376\nmsgid \"The classes listed below are **not intended to be created by users** and are also **read-only**.\"\nmsgstr \"下記のクラスは、 **ユーザーによって作成されることを想定しておらず** 、中には **読み取り専用** のものもあります。\"\n\n#: ../../api.rst:4379\nmsgid \"For example, this means that you should not make your own :class:`User` instances nor should you modify the :class:`User` instance yourself.\"\nmsgstr \"つまり、独自の :class:`User` を作成したりするべきではなく、また、 :class:`User` インスタンスの値の変更もするべきではありません。\"\n\n#: ../../api.rst:4382\nmsgid \"If you want to get one of these model classes instances they'd have to be through the cache, and a common way of doing so is through the :func:`utils.find` function or attributes of model classes that you receive from the events specified in the :ref:`discord-api-events`.\"\nmsgstr \"このようなモデルクラスのインスタンスを取得したい場合は、 キャッシュを経由して取得する必要があります。一般的な方法としては :func:`utils.find` 関数を用いるか、 :ref:`discord-api-events` の特定のイベントから受け取る方法が挙げられます。\"\n\n#: ../../api.rst:4389\n#: ../../api.rst:5000\nmsgid \"Nearly all classes here have :ref:`py:slots` defined which means that it is impossible to have dynamic attributes to the data classes.\"\nmsgstr \"ほぼすべてのクラスに :ref:`py:slots` が定義されています。つまり、データクラスに動的に変数を追加することは不可能です。\"\n\n#: ../../api.rst:4394\nmsgid \"ClientUser\"\nmsgstr \"ClientUser\"\n\n#: ../../../discord/user.py:docstring of discord.user.ClientUser:1\nmsgid \"Represents your Discord user.\"\nmsgstr \"あなたのDiscordユーザー。\"\n\n#: ../../../discord/user.py:docstring of discord.user.ClientUser:7\n#: ../../../discord/user.py:docstring of discord.user.User:7\nmsgid \"Checks if two users are equal.\"\nmsgstr \"二つのユーザーが等しいかを比較します。\"\n\n#: ../../../discord/user.py:docstring of discord.user.ClientUser:11\n#: ../../../discord/user.py:docstring of discord.user.User:11\nmsgid \"Checks if two users are not equal.\"\nmsgstr \"二つのユーザーが等しいものではないか比較します。\"\n\n#: ../../../discord/user.py:docstring of discord.user.ClientUser:15\n#: ../../../discord/user.py:docstring of discord.user.User:15\nmsgid \"Return the user's hash.\"\nmsgstr \"ユーザーのハッシュ値を返します。\"\n\n#: ../../../discord/user.py:docstring of discord.user.ClientUser:19\n#: ../../../discord/user.py:docstring of discord.user.User:19\nmsgid \"Returns the user's handle (e.g. ``name`` or ``name#discriminator``).\"\nmsgstr \"ユーザーのハンドル（例えば ``name`` や ``name#discriminator`` など）を返します。\"\n\n#: ../../../discord/user.py:docstring of discord.user.ClientUser:29\n#: ../../../discord/user.py:docstring of discord.user.User:29\nmsgid \"The user's unique ID.\"\nmsgstr \"ユーザーのユニークなID。\"\n\n#: ../../../discord/user.py:docstring of discord.user.ClientUser:41\n#: ../../../discord/user.py:docstring of discord.user.User:41\nmsgid \"The user's global nickname, taking precedence over the username in display.\"\nmsgstr \"ユーザーのグローバルの表示名。ユーザー名より優先して表示されます。\"\n\n#: ../../../discord/user.py:docstring of discord.user.ClientUser:55\n#: ../../../discord/user.py:docstring of discord.user.User:55\nmsgid \"Specifies if the user is a system user (i.e. represents Discord officially).\"\nmsgstr \"ユーザーがシステムユーザーかどうかを示します。(つまり、Discord公式を表しているかどうか。)\"\n\n#: ../../../discord/user.py:docstring of discord.user.ClientUser:63\nmsgid \"Specifies if the user's email is verified.\"\nmsgstr \"ユーザーのメールアドレスが確認されているかどうかを示します。\"\n\n#: ../../../discord/user.py:docstring of discord.user.ClientUser:69\nmsgid \"The IETF language tag used to identify the language the user is using.\"\nmsgstr \"ユーザーが使用している言語を識別するためのIETF言語タグ。\"\n\n#: ../../../discord/user.py:docstring of discord.user.ClientUser:75\nmsgid \"Specifies if the user has MFA turned on and working.\"\nmsgstr \"ユーザーが多段階認証を使用しているかを示します。\"\n\n#: ../../../discord/user.py:docstring of discord.user.ClientUser.edit:3\nmsgid \"Edits the current profile of the client.\"\nmsgstr \"現在のクライアントのプロフィールを編集します。\"\n\n#: ../../../discord/user.py:docstring of discord.user.ClientUser.edit:7\nmsgid \"To upload an avatar, a :term:`py:bytes-like object` must be passed in that represents the image being uploaded. If this is done through a file then the file must be opened via ``open('some_filename', 'rb')`` and the :term:`py:bytes-like object` is given through the use of ``fp.read()``.\"\nmsgstr \"アバターをアップロードする際には、アップロードする画像を表す :term:`py:bytes-like object` を渡す必要があります。これをファイルを介して行う場合、ファイルを ``open('some_filename', 'rb')`` で開き、 :term:`py:bytes-like object` は ``fp.read()`` で取得できます。\"\n\n#: ../../../discord/user.py:docstring of discord.user.ClientUser.edit:13\nmsgid \"The edit is no longer in-place, instead the newly edited client user is returned.\"\nmsgstr \"編集はクライアントユーザーを置き換えず、編集された新しいクライアントユーザーが返されるようになりました。\"\n\n#: ../../../discord/user.py:docstring of discord.user.ClientUser.edit:20\nmsgid \"The new username you wish to change to.\"\nmsgstr \"変更する際の新しいユーザー名。\"\n\n#: ../../../discord/user.py:docstring of discord.user.ClientUser.edit:22\nmsgid \"A :term:`py:bytes-like object` representing the image to upload. Could be ``None`` to denote no avatar. Only image formats supported for uploading are JPEG, PNG, GIF, and WEBP.\"\nmsgstr \"\"\n\n#: ../../../discord/user.py:docstring of discord.user.ClientUser.edit:26\nmsgid \"A :term:`py:bytes-like object` representing the image to upload. Could be ``None`` to denote no banner. Only image formats supported for uploading are JPEG, PNG, GIF and WEBP.\"\nmsgstr \"\"\n\n#: ../../../discord/user.py:docstring of discord.user.ClientUser.edit:33\nmsgid \"Editing your profile failed.\"\nmsgstr \"プロフィールの編集に失敗した場合。\"\n\n#: ../../../discord/user.py:docstring of discord.user.ClientUser.edit:34\nmsgid \"Wrong image format passed for ``avatar``.\"\nmsgstr \"``avatar`` に渡された画像のフォーマットが間違っている場合。\"\n\n#: ../../../discord/user.py:docstring of discord.user.ClientUser.edit:36\nmsgid \"The newly edited client user.\"\nmsgstr \"新しく編集されたクライアントユーザー。\"\n\n#: ../../../discord/user.py:docstring of discord.ClientUser.mutual_guilds:1\n#: ../../../discord/user.py:docstring of discord.User.mutual_guilds:1\nmsgid \"The guilds that the user shares with the client.\"\nmsgstr \"ユーザーがクライアントと共有するギルド。\"\n\n#: ../../../discord/user.py:docstring of discord.ClientUser.mutual_guilds:5\n#: ../../../discord/user.py:docstring of discord.User.mutual_guilds:5\nmsgid \"This will only return mutual guilds within the client's internal cache.\"\nmsgstr \"クライアントの内部キャッシュ内に存在する共通のサーバーのみが返されます。\"\n\n#: ../../../discord/user.py:docstring of discord.ClientUser.mutual_guilds:9\n#: ../../../discord/user.py:docstring of discord.User.mutual_guilds:9\nmsgid \"List[:class:`Guild`]\"\nmsgstr \"List[:class:`Guild`]\"\n\n#: ../../../discord/user.py:docstring of discord.user.User:1\nmsgid \"Represents a Discord user.\"\nmsgstr \"Discordユーザー。\"\n\n#: ../../../discord/user.py:docstring of discord.User.dm_channel:1\nmsgid \"Returns the channel associated with this user if it exists.\"\nmsgstr \"存在する場合は、そのユーザーに関連付けられたチャンネルを返します。\"\n\n#: ../../../discord/user.py:docstring of discord.User.dm_channel:3\nmsgid \"If this returns ``None``, you can create a DM channel by calling the :meth:`create_dm` coroutine function.\"\nmsgstr \"これが ``None`` を返すなら、あなたは :meth:`create_dm` コルーチン関数を使って、DMチャンネルを作ることができます。\"\n\n#: ../../../discord/user.py:docstring of discord.User.dm_channel:6\nmsgid \"Optional[:class:`DMChannel`]\"\nmsgstr \"Optional[:class:`DMChannel`]\"\n\n#: ../../../discord/user.py:docstring of discord.user.User.create_dm:3\n#: ../../../discord/member.py:docstring of discord.member.flatten_user.<locals>.generate_function.<locals>.general:3\nmsgid \"Creates a :class:`DMChannel` with this user.\"\nmsgstr \"このユーザーと :class:`DMChannel` を作ります。\"\n\n#: ../../../discord/automod.py:docstring of discord.automod.AutoModRule:1\nmsgid \"Represents an auto moderation rule.\"\nmsgstr \"自動管理ルールを表します。\"\n\n#: ../../../discord/automod.py:docstring of discord.automod.AutoModRule:7\nmsgid \"The ID of the rule.\"\nmsgstr \"ルールのID。\"\n\n#: ../../../discord/automod.py:docstring of discord.automod.AutoModRule:13\nmsgid \"The guild the rule is for.\"\nmsgstr \"ルールが属するギルド。\"\n\n#: ../../../discord/automod.py:docstring of discord.automod.AutoModRule:19\nmsgid \"The name of the rule.\"\nmsgstr \"ルールの名前。\"\n\n#: ../../../discord/automod.py:docstring of discord.automod.AutoModRule:25\nmsgid \"The ID of the user that created the rule.\"\nmsgstr \"ルールを作成したユーザーのID。\"\n\n#: ../../../discord/automod.py:docstring of discord.automod.AutoModRule:31\nmsgid \"The rule's trigger.\"\nmsgstr \"ルールの発動条件。\"\n\n#: ../../../discord/automod.py:docstring of discord.automod.AutoModRule:37\nmsgid \"Whether the rule is enabled.\"\nmsgstr \"ルールが有効かどうか。\"\n\n#: ../../../discord/automod.py:docstring of discord.automod.AutoModRule:43\nmsgid \"The IDs of the roles that are exempt from the rule.\"\nmsgstr \"このルールの除外対象のロールのID。\"\n\n#: ../../../discord/automod.py:docstring of discord.automod.AutoModRule:45\n#: ../../../discord/automod.py:docstring of discord.automod.AutoModRule:51\n#: ../../../discord/raw_models.py:docstring of discord.raw_models.RawBulkMessageDeleteEvent:7\nmsgid \"Set[:class:`int`]\"\nmsgstr \"Set[:class:`int`]\"\n\n#: ../../../discord/automod.py:docstring of discord.automod.AutoModRule:49\nmsgid \"The IDs of the channels that are exempt from the rule.\"\nmsgstr \"このルールの除外対象のチャンネルのID。\"\n\n#: ../../../discord/automod.py:docstring of discord.automod.AutoModRule:55\nmsgid \"The type of event that will trigger the the rule.\"\nmsgstr \"\"\n\n#: ../../../discord/automod.py:docstring of discord.AutoModRule.creator:1\nmsgid \"The member that created this rule.\"\nmsgstr \"このルールを作成したメンバー。\"\n\n#: ../../../discord/automod.py:docstring of discord.AutoModRule.creator:3\n#: ../../../discord/automod.py:docstring of discord.AutoModAction.member:3\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.get_member:11\n#: ../../../discord/guild.py:docstring of discord.Guild.owner:3\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.get_member_named:26\nmsgid \"Optional[:class:`Member`]\"\nmsgstr \"Optional[:class:`Member`]\"\n\n#: ../../docstring of discord.AutoModRule.exempt_roles:1\nmsgid \"The roles that are exempt from this rule.\"\nmsgstr \"このルールの除外対象のロール。\"\n\n#: ../../docstring of discord.AutoModRule.exempt_roles:3\n#: ../../../discord/message.py:docstring of discord.message.Message:117\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.fetch_roles:14\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.edit_role_positions:35\n#: ../../../discord/member.py:docstring of discord.Member.roles:7\nmsgid \"List[:class:`Role`]\"\nmsgstr \"List[:class:`Role`]\"\n\n#: ../../docstring of discord.AutoModRule.exempt_channels:1\nmsgid \"The channels that are exempt from this rule.\"\nmsgstr \"このルールの除外対象のチャンネル。\"\n\n#: ../../docstring of discord.AutoModRule.exempt_channels:3\n#: ../../../discord/message.py:docstring of discord.message.Message:110\nmsgid \"List[Union[:class:`abc.GuildChannel`, :class:`Thread`]]\"\nmsgstr \"List[Union[:class:`abc.GuildChannel`, :class:`Thread`]]\"\n\n#: ../../docstring of discord.AutoModRule.actions:1\nmsgid \"The actions that are taken when this rule is triggered.\"\nmsgstr \"このルールの発動時の対応。\"\n\n#: ../../docstring of discord.AutoModRule.actions:3\nmsgid \"List[:class:`AutoModRuleAction`]\"\nmsgstr \"List[:class:`AutoModRuleAction`]\"\n\n#: ../../../discord/automod.py:docstring of discord.automod.AutoModRule.is_exempt:1\nmsgid \"Check if an object is exempt from the automod rule.\"\nmsgstr \"オブジェクトが自動管理ルールから除外されているかどうかを確認します。\"\n\n#: ../../../discord/automod.py:docstring of discord.automod.AutoModRule.is_exempt:3\nmsgid \"The role, channel, or thread to check.\"\nmsgstr \"チェックするロール、チャンネル、またはスレッド。\"\n\n#: ../../../discord/automod.py:docstring of discord.automod.AutoModRule.is_exempt:6\nmsgid \"Whether the object is exempt from the automod rule.\"\nmsgstr \"オブジェクトが自動管理ルールから除外されているかどうか。\"\n\n#: ../../../discord/automod.py:docstring of discord.automod.AutoModRule.edit:3\nmsgid \"Edits this auto moderation rule.\"\nmsgstr \"この自動管理ルールを編集します。\"\n\n#: ../../../discord/automod.py:docstring of discord.automod.AutoModRule.edit:5\nmsgid \"You must have :attr:`Permissions.manage_guild` to edit rules.\"\nmsgstr \"ルールを編集するには、 :attr:`Permissions.manage_guild` 権限が必要です。\"\n\n#: ../../../discord/automod.py:docstring of discord.automod.AutoModRule.edit:7\nmsgid \"The new name to change to.\"\nmsgstr \"新しい名前。\"\n\n#: ../../../discord/automod.py:docstring of discord.automod.AutoModRule.edit:9\nmsgid \"The new event type to change to.\"\nmsgstr \"新しいイベントの種類。\"\n\n#: ../../../discord/automod.py:docstring of discord.automod.AutoModRule.edit:11\nmsgid \"The new rule actions to update.\"\nmsgstr \"新しいルールの対応。\"\n\n#: ../../../discord/automod.py:docstring of discord.automod.AutoModRule.edit:13\nmsgid \"The new trigger to update. You can only change the trigger metadata, not the type.\"\nmsgstr \"新しい発動条件。種類は変更できず、メタデータのみ変更できます。\"\n\n#: ../../../discord/automod.py:docstring of discord.automod.AutoModRule.edit:16\nmsgid \"Whether the rule should be enabled or not.\"\nmsgstr \"ルールを有効化するか。\"\n\n#: ../../../discord/automod.py:docstring of discord.automod.AutoModRule.edit:18\nmsgid \"The new roles to exempt from the rule.\"\nmsgstr \"ルールの除外対象とする新しいロール。\"\n\n#: ../../../discord/automod.py:docstring of discord.automod.AutoModRule.edit:20\nmsgid \"The new channels to exempt from the rule.\"\nmsgstr \"ルールの除外対象とする新しいチャンネル。\"\n\n#: ../../../discord/automod.py:docstring of discord.automod.AutoModRule.edit:22\nmsgid \"The reason for updating this rule. Shows up on the audit log.\"\nmsgstr \"ルールを編集する理由。監査ログに表示されます。\"\n\n#: ../../../discord/automod.py:docstring of discord.automod.AutoModRule.edit:25\nmsgid \"You do not have permission to edit this rule.\"\nmsgstr \"ルールを編集する権限がない場合。\"\n\n#: ../../../discord/automod.py:docstring of discord.automod.AutoModRule.edit:26\nmsgid \"Editing the rule failed.\"\nmsgstr \"ルールの編集に失敗した場合。\"\n\n#: ../../../discord/automod.py:docstring of discord.automod.AutoModRule.edit:28\nmsgid \"The updated auto moderation rule.\"\nmsgstr \"更新された自動管理ルール。\"\n\n#: ../../../discord/automod.py:docstring of discord.automod.AutoModRule.edit:29\n#: ../../../discord/automod.py:docstring of discord.automod.AutoModAction.fetch_rule:11\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.fetch_automod_rule:15\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_automod_rule:31\nmsgid \":class:`AutoModRule`\"\nmsgstr \":class:`AutoModRule`\"\n\n#: ../../../discord/automod.py:docstring of discord.automod.AutoModRule.delete:3\nmsgid \"Deletes the auto moderation rule.\"\nmsgstr \"自動管理ルールを削除します。\"\n\n#: ../../../discord/automod.py:docstring of discord.automod.AutoModRule.delete:5\nmsgid \"You must have :attr:`Permissions.manage_guild` to delete rules.\"\nmsgstr \"ルールを削除するには、 :attr:`Permissions.manage_guild` 権限が必要です。\"\n\n#: ../../../discord/automod.py:docstring of discord.automod.AutoModRule.delete:7\nmsgid \"The reason for deleting this rule. Shows up on the audit log.\"\nmsgstr \"ルールを削除する理由。監査ログに表示されます。\"\n\n#: ../../../discord/automod.py:docstring of discord.automod.AutoModRule.delete:10\nmsgid \"You do not have permissions to delete the rule.\"\nmsgstr \"ルールを削除する権限がない場合。\"\n\n#: ../../../discord/automod.py:docstring of discord.automod.AutoModRule.delete:11\nmsgid \"Deleting the rule failed.\"\nmsgstr \"ルールの削除に失敗した場合。\"\n\n#: ../../../discord/automod.py:docstring of discord.automod.AutoModAction:1\nmsgid \"Represents an action that was taken as the result of a moderation rule.\"\nmsgstr \"自動管理ルールの結果として取られた対応を表します。\"\n\n#: ../../../discord/automod.py:docstring of discord.automod.AutoModAction:7\nmsgid \"The action that was taken.\"\nmsgstr \"行われた対応。\"\n\n#: ../../../discord/automod.py:docstring of discord.automod.AutoModAction:9\nmsgid \":class:`AutoModRuleAction`\"\nmsgstr \":class:`AutoModRuleAction`\"\n\n#: ../../../discord/automod.py:docstring of discord.automod.AutoModAction:13\nmsgid \"The message ID that triggered the action. This is only available if the action is done on an edited message.\"\nmsgstr \"この対応がとられたメッセージのID。これは、対応が編集されたメッセージに対し行われた場合のみ利用可能です。\"\n\n#: ../../../discord/automod.py:docstring of discord.automod.AutoModAction:20\nmsgid \"The ID of the rule that was triggered.\"\nmsgstr \"発動されたルールのID。\"\n\n#: ../../../discord/automod.py:docstring of discord.automod.AutoModAction:26\nmsgid \"The trigger type of the rule that was triggered.\"\nmsgstr \"発動されたルールの発動条件の種類。\"\n\n#: ../../../discord/automod.py:docstring of discord.automod.AutoModAction:32\nmsgid \"The ID of the guild where the rule was triggered.\"\nmsgstr \"ルールが発動されたギルドのID。\"\n\n#: ../../../discord/automod.py:docstring of discord.automod.AutoModAction:38\nmsgid \"The ID of the user that triggered the rule.\"\nmsgstr \"ルールを発動させたユーザーのID。\"\n\n#: ../../../discord/automod.py:docstring of discord.automod.AutoModAction:44\nmsgid \"The ID of the channel where the rule was triggered.\"\nmsgstr \"ルールが発動されたチャンネルのID。\"\n\n#: ../../../discord/automod.py:docstring of discord.automod.AutoModAction:50\nmsgid \"The ID of the system message that was sent to the predefined alert channel.\"\nmsgstr \"事前に指定されたアラートチャンネルに送信されたシステムメッセージのID。\"\n\n#: ../../../discord/automod.py:docstring of discord.automod.AutoModAction:56\nmsgid \"The content of the message that triggered the rule. Requires the :attr:`Intents.message_content` or it will always return an empty string.\"\nmsgstr \"ルールを発動させたメッセージの内容。 :attr:`Intents.message_content` が必要で、ない場合は空文字列を返します。\"\n\n#: ../../../discord/automod.py:docstring of discord.automod.AutoModAction:63\nmsgid \"The matched keyword from the triggering message.\"\nmsgstr \"発動させたメッセージ内のマッチしたキーワード。\"\n\n#: ../../../discord/automod.py:docstring of discord.automod.AutoModAction:69\nmsgid \"The matched content from the triggering message. Requires the :attr:`Intents.message_content` or it will always return ``None``.\"\nmsgstr \"ルールを発動させたメッセージのマッチした内容。 :attr:`Intents.message_content` が必要で、ない場合は ``None`` を返します。\"\n\n#: ../../../discord/automod.py:docstring of discord.AutoModAction.guild:1\nmsgid \"The guild this action was taken in.\"\nmsgstr \"この対応がとられたギルド。\"\n\n#: ../../../discord/automod.py:docstring of discord.AutoModAction.channel:1\nmsgid \"The channel this action was taken in.\"\nmsgstr \"この対応がとられたチャンネル。\"\n\n#: ../../../discord/automod.py:docstring of discord.AutoModAction.channel:3\nmsgid \"Optional[Union[:class:`abc.GuildChannel`, :class:`Thread`]]\"\nmsgstr \"Optional[Union[:class:`abc.GuildChannel`, :class:`Thread`]]\"\n\n#: ../../../discord/automod.py:docstring of discord.AutoModAction.member:1\nmsgid \"The member this action was taken against /who triggered this rule.\"\nmsgstr \"対応が行われた/ルールを発動させたメンバー。\"\n\n#: ../../../discord/automod.py:docstring of discord.automod.AutoModAction.fetch_rule:3\nmsgid \"Fetch the rule whose action was taken.\"\nmsgstr \"対応がとられたルールを取得します。\"\n\n#: ../../../discord/automod.py:docstring of discord.automod.AutoModAction.fetch_rule:5\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.fetch_automod_rule:5\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.fetch_automod_rules:5\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_automod_rule:5\nmsgid \"You must have :attr:`Permissions.manage_guild` to do this.\"\nmsgstr \"これを行うには、 :attr:`Permissions.manage_guild` が必要です。\"\n\n#: ../../../discord/automod.py:docstring of discord.automod.AutoModAction.fetch_rule:7\nmsgid \"You do not have permissions to view the rule.\"\nmsgstr \"ルールを取得する権限がない場合。\"\n\n#: ../../../discord/automod.py:docstring of discord.automod.AutoModAction.fetch_rule:8\nmsgid \"Fetching the rule failed.\"\nmsgstr \"ルールの取得に失敗した場合。\"\n\n#: ../../../discord/automod.py:docstring of discord.automod.AutoModAction.fetch_rule:10\nmsgid \"The rule that was executed.\"\nmsgstr \"発動されたルール。\"\n\n#: ../../api.rst:4429\nmsgid \"Attachment\"\nmsgstr \"Attachment\"\n\n#: ../../../discord/message.py:docstring of discord.message.Attachment:1\nmsgid \"Represents an attachment from Discord.\"\nmsgstr \"Discordの添付ファイル。\"\n\n#: ../../../discord/message.py:docstring of discord.message.Attachment:7\nmsgid \"Returns the URL of the attachment.\"\nmsgstr \"添付ファイルの URL を返します。\"\n\n#: ../../../discord/message.py:docstring of discord.message.Attachment:11\nmsgid \"Checks if the attachment is equal to another attachment.\"\nmsgstr \"添付ファイルが別の添付ファイルと等しいか確認します。\"\n\n#: ../../../discord/message.py:docstring of discord.message.Attachment:15\nmsgid \"Checks if the attachment is not equal to another attachment.\"\nmsgstr \"添付ファイルが別の添付ファイルと等しくないか確認します。\"\n\n#: ../../../discord/message.py:docstring of discord.message.Attachment:19\nmsgid \"Returns the hash of the attachment.\"\nmsgstr \"添付ファイルの ハッシュ を返します。\"\n\n#: ../../../discord/message.py:docstring of discord.message.Attachment:21\nmsgid \"Attachment can now be casted to :class:`str` and is hashable.\"\nmsgstr \"添付ファイルが :class:`str` にキャスト可能になり、ハッシュ可能になりました。\"\n\n#: ../../../discord/message.py:docstring of discord.message.Attachment:26\nmsgid \"The attachment ID.\"\nmsgstr \"添付ファイルのID。\"\n\n#: ../../../discord/message.py:docstring of discord.message.Attachment:32\nmsgid \"The attachment size in bytes.\"\nmsgstr \"添付ファイルのサイズを、バイトで返します。\"\n\n#: ../../../discord/message.py:docstring of discord.message.Attachment:38\nmsgid \"The attachment's height, in pixels. Only applicable to images and videos.\"\nmsgstr \"添付ファイルの縦幅をピクセル単位で返します。これは画像と動画にのみ適用されます。\"\n\n#: ../../../discord/message.py:docstring of discord.message.Attachment:44\nmsgid \"The attachment's width, in pixels. Only applicable to images and videos.\"\nmsgstr \"添付ファイルの横幅をピクセル単位で返します。これは画像と動画にのみ適用されます。\"\n\n#: ../../../discord/message.py:docstring of discord.message.Attachment:50\nmsgid \"The attachment's filename.\"\nmsgstr \"添付ファイルのファイル名。\"\n\n#: ../../../discord/message.py:docstring of discord.message.Attachment:56\nmsgid \"The attachment URL. If the message this attachment was attached to is deleted, then this will 404.\"\nmsgstr \"添付ファイルのURL。この添付ファイルが添付されたメッセージが削除された場合、これは404になります。\"\n\n#: ../../../discord/message.py:docstring of discord.message.Attachment:63\nmsgid \"The proxy URL. This is a cached version of the :attr:`~Attachment.url` in the case of images. When the message is deleted, this URL might be valid for a few minutes or not valid at all.\"\nmsgstr \"プロキシURL。これは画像の場合は :attr:`~Attachment.url` のキャッシュ版です。メッセージが削除された場合、このURLは数分間は利用できるかもしれませんし、利用できないかもしれません。\"\n\n#: ../../../discord/message.py:docstring of discord.message.Attachment:71\nmsgid \"The attachment's `media type <https://en.wikipedia.org/wiki/Media_type>`_\"\nmsgstr \"添付ファイルの `メディアタイプ <https://en.wikipedia.org/wiki/Media_type>`_ 。\"\n\n#: ../../../discord/message.py:docstring of discord.message.Attachment:79\nmsgid \"The attachment's description. Only applicable to images.\"\nmsgstr \"添付ファイルの説明。画像にのみ適用されます。\"\n\n#: ../../../discord/message.py:docstring of discord.message.Attachment:87\nmsgid \"Whether the attachment is ephemeral.\"\nmsgstr \"添付ファイルが一時的であるかどうか。\"\n\n#: ../../../discord/message.py:docstring of discord.message.Attachment:95\nmsgid \"The duration of the audio file in seconds. Returns ``None`` if it's not a voice message.\"\nmsgstr \"音声ファイルの秒単位の長さ。ボイスメッセージでない場合 ``None`` を返します。\"\n\n#: ../../../discord/message.py:docstring of discord.message.Attachment:103\nmsgid \"The waveform (amplitudes) of the audio in bytes. Returns ``None`` if it's not a voice message.\"\nmsgstr \"音声の波形（振幅）をバイト単位で返します。ボイスメッセージでない場合は ``None`` を返します。\"\n\n#: ../../../discord/message.py:docstring of discord.message.Attachment:107\nmsgid \"Optional[:class:`bytes`]\"\nmsgstr \"Optional[:class:`bytes`]\"\n\n#: ../../../discord/message.py:docstring of discord.Attachment.flags:1\nmsgid \"The attachment's flags.\"\nmsgstr \"\"\n\n#: ../../../discord/message.py:docstring of discord.Attachment.flags:3\nmsgid \":class:`AttachmentFlags`\"\nmsgstr \"\"\n\n#: ../../../discord/message.py:docstring of discord.message.Attachment.is_spoiler:1\nmsgid \":class:`bool`: Whether this attachment contains a spoiler.\"\nmsgstr \":class:`bool`: この添付ファイルにスポイラーが含まれているかどうか。\"\n\n#: ../../../discord/message.py:docstring of discord.message.Attachment.is_voice_message:1\nmsgid \":class:`bool`: Whether this attachment is a voice message.\"\nmsgstr \":class:`bool`: 添付ファイルがボイスメッセージであるかどうか。\"\n\n#: ../../../discord/message.py:docstring of discord.message.Attachment.save:3\nmsgid \"Saves this attachment into a file-like object.\"\nmsgstr \"この添付ファイルをファイルライクオブジェクトに保存します。\"\n\n#: ../../../discord/message.py:docstring of discord.message.Attachment.save:5\nmsgid \"The file-like object to save this attachment to or the filename to use. If a filename is passed then a file is created with that filename and used instead.\"\nmsgstr \"この添付ファイルを保存するファイルライクオブジェクト、または使用するファイル名。 ファイル名が渡された場合、そのファイル名でファイルが作成され、代わりに使用されます。\"\n\n#: ../../../discord/message.py:docstring of discord.message.Attachment.save:9\n#: ../../../discord/asset.py:docstring of discord.asset.AssetMixin.save:9\n#: ../../../discord/emoji.py:docstring of discord.asset.AssetMixin.save:9\n#: ../../../discord/partial_emoji.py:docstring of discord.asset.AssetMixin.save:9\nmsgid \"Whether to seek to the beginning of the file after saving is successfully done.\"\nmsgstr \"正常に保存した後にファイルの先頭にシークすべきか。\"\n\n#: ../../../discord/message.py:docstring of discord.message.Attachment.save:12\n#: ../../../discord/message.py:docstring of discord.message.Attachment.read:7\n#: ../../../discord/message.py:docstring of discord.message.Attachment.to_file:18\nmsgid \"Whether to use :attr:`proxy_url` rather than :attr:`url` when downloading the attachment. This will allow attachments to be saved after deletion more often, compared to the regular URL which is generally deleted right after the message is deleted. Note that this can still fail to download deleted attachments if too much time has passed and it does not work on some types of attachments.\"\nmsgstr \"添付ファイルのダウンロード時に :attr:`url` の代わりに :attr:`proxy_url` を使用すべきか。これを使うと、一般的にメッセージの削除直後に削除される通常のURLと比較して、削除後の添付ファイルの保存がより頻繁にできるようになります。なお、時間がたつと削除された添付ファイルのダウンロードに失敗することがあり、添付ファイルの種類によっては動かないことがあります。\"\n\n#: ../../../discord/message.py:docstring of discord.message.Attachment.save:20\nmsgid \"Saving the attachment failed.\"\nmsgstr \"添付ファイルの保存に失敗した場合。\"\n\n#: ../../../discord/message.py:docstring of discord.message.Attachment.save:21\n#: ../../../discord/message.py:docstring of discord.message.Attachment.read:17\n#: ../../../discord/message.py:docstring of discord.message.Attachment.to_file:34\nmsgid \"The attachment was deleted.\"\nmsgstr \"添付ファイルが削除された場合。\"\n\n#: ../../../discord/message.py:docstring of discord.message.Attachment.save:23\n#: ../../../discord/asset.py:docstring of discord.asset.AssetMixin.save:17\n#: ../../../discord/emoji.py:docstring of discord.asset.AssetMixin.save:17\n#: ../../../discord/partial_emoji.py:docstring of discord.asset.AssetMixin.save:17\nmsgid \"The number of bytes written.\"\nmsgstr \"書き込まれたバイト数。\"\n\n#: ../../../discord/message.py:docstring of discord.message.Attachment.read:3\nmsgid \"Retrieves the content of this attachment as a :class:`bytes` object.\"\nmsgstr \"この添付ファイルの内容を :class:`bytes` オブジェクトとして取得します。\"\n\n#: ../../../discord/message.py:docstring of discord.message.Attachment.read:15\n#: ../../../discord/message.py:docstring of discord.message.Attachment.to_file:32\nmsgid \"Downloading the attachment failed.\"\nmsgstr \"添付ファイルのダウンロードに失敗した場合。\"\n\n#: ../../../discord/message.py:docstring of discord.message.Attachment.read:16\n#: ../../../discord/message.py:docstring of discord.message.Attachment.to_file:33\nmsgid \"You do not have permissions to access this attachment\"\nmsgstr \"この添付ファイルにアクセスする権限がない場合。\"\n\n#: ../../../discord/message.py:docstring of discord.message.Attachment.read:19\nmsgid \"The contents of the attachment.\"\nmsgstr \"添付ファイルの内容。\"\n\n#: ../../../discord/message.py:docstring of discord.message.Attachment.to_file:3\nmsgid \"Converts the attachment into a :class:`File` suitable for sending via :meth:`abc.Messageable.send`.\"\nmsgstr \"この添付ファイルを :meth:`abc.Messageable.send` で送信できる :class:`File` に変換します。\"\n\n#: ../../../discord/message.py:docstring of discord.message.Attachment.to_file:8\nmsgid \"The filename to use for the file. If not specified then the filename of the attachment is used instead.\"\nmsgstr \"ファイルに使用するファイル名。指定しない場合は、添付ファイルのファイル名が代わりに使用されます。\"\n\n#: ../../../discord/message.py:docstring of discord.message.Attachment.to_file:13\nmsgid \"The description to use for the file. If not specified then the description of the attachment is used instead.\"\nmsgstr \"ファイルに使用する説明。指定しない場合は、添付ファイルの説明が代わりに使用されます。\"\n\n#: ../../../discord/message.py:docstring of discord.message.Attachment.to_file:27\n#: ../../../discord/asset.py:docstring of discord.asset.AssetMixin.to_file:13\n#: ../../../discord/emoji.py:docstring of discord.asset.AssetMixin.to_file:13\n#: ../../../discord/partial_emoji.py:docstring of discord.asset.AssetMixin.to_file:13\nmsgid \"Whether the file is a spoiler.\"\nmsgstr \"このファイルがスポイラーを含むか。\"\n\n#: ../../../discord/message.py:docstring of discord.message.Attachment.to_file:36\nmsgid \"The attachment as a file suitable for sending.\"\nmsgstr \"送信に適したファイルに変換された添付ファイル。\"\n\n#: ../../../discord/message.py:docstring of discord.message.Attachment.to_file:37\n#: ../../../discord/asset.py:docstring of discord.asset.AssetMixin.to_file:23\n#: ../../../discord/emoji.py:docstring of discord.asset.AssetMixin.to_file:23\n#: ../../../discord/partial_emoji.py:docstring of discord.asset.AssetMixin.to_file:23\nmsgid \":class:`File`\"\nmsgstr \":class:`File`\"\n\n#: ../../api.rst:4437\nmsgid \"Asset\"\nmsgstr \"Asset\"\n\n#: ../../../discord/asset.py:docstring of discord.asset.Asset:1\nmsgid \"Represents a CDN asset on Discord.\"\nmsgstr \"DiscordのCDNアセット。\"\n\n#: ../../../discord/asset.py:docstring of discord.asset.Asset:7\nmsgid \"Returns the URL of the CDN asset.\"\nmsgstr \"CDNアセットのURLを返します。\"\n\n#: ../../../discord/asset.py:docstring of discord.asset.Asset:11\nmsgid \"Returns the length of the CDN asset's URL.\"\nmsgstr \"CDNアセットのURLの長さを返します。\"\n\n#: ../../../discord/asset.py:docstring of discord.asset.Asset:15\nmsgid \"Checks if the asset is equal to another asset.\"\nmsgstr \"アセットが別のアセットと等しいか確認します。\"\n\n#: ../../../discord/asset.py:docstring of discord.asset.Asset:19\nmsgid \"Checks if the asset is not equal to another asset.\"\nmsgstr \"アセットが別のアセットと等しくないか確認します。\"\n\n#: ../../../discord/asset.py:docstring of discord.asset.Asset:23\nmsgid \"Returns the hash of the asset.\"\nmsgstr \"アセットの ハッシュ を返します。\"\n\n#: ../../../discord/asset.py:docstring of discord.Asset.url:1\nmsgid \"Returns the underlying URL of the asset.\"\nmsgstr \"アセットのURLを返します。\"\n\n#: ../../../discord/asset.py:docstring of discord.Asset.key:1\nmsgid \"Returns the identifying key of the asset.\"\nmsgstr \"アセットの識別キーを返します。\"\n\n#: ../../../discord/asset.py:docstring of discord.asset.Asset.is_animated:1\nmsgid \":class:`bool`: Returns whether the asset is animated.\"\nmsgstr \":class:`bool`: アセットがアニメーションされているかどうかを返します。\"\n\n#: ../../../discord/asset.py:docstring of discord.asset.Asset.replace:1\nmsgid \"Returns a new asset with the passed components replaced.\"\nmsgstr \"渡された部分を置き換えた新しいアセットを返します。\"\n\n#: ../../../discord/asset.py:docstring of discord.asset.Asset.replace:4\nmsgid \"``static_format`` is now preferred over ``format`` if both are present and the asset is not animated.\"\nmsgstr \"``static_format`` と ``format`` が両方存在してアセットがアニメーション付きでない場合に前者が優先されるようになりました。\"\n\n#: ../../../discord/asset.py:docstring of discord.asset.Asset.replace:12\n#: ../../../discord/asset.py:docstring of discord.asset.Asset.with_size:7\nmsgid \"The new size of the asset.\"\nmsgstr \"アセットの新しいサイズ。\"\n\n#: ../../../discord/asset.py:docstring of discord.asset.Asset.replace:14\nmsgid \"The new format to change it to. Must be either 'webp', 'jpeg', 'jpg', 'png', or 'gif' if it's animated.\"\nmsgstr \"変更後のフォーマット。'webp' 、 'jpeg' 、 'jpg' 、 'png' 、またはアニメーション付きの場合には 'gif' のいずれかである必要があります。\"\n\n#: ../../../discord/asset.py:docstring of discord.asset.Asset.replace:17\nmsgid \"The new format to change it to if the asset isn't animated. Must be either 'webp', 'jpeg', 'jpg', or 'png'.\"\nmsgstr \"アセットがアニメーションされていない場合の変更後のフォーマット。'webp'、'jpeg'、'jpg'、'png'のいずれかである必要があります。\"\n\n#: ../../../discord/asset.py:docstring of discord.asset.Asset.replace:21\nmsgid \"An invalid size or format was passed.\"\nmsgstr \"不正な大きさまたはフォーマットが渡された場合。\"\n\n#: ../../../discord/asset.py:docstring of discord.asset.Asset.replace:23\nmsgid \"The newly updated asset.\"\nmsgstr \"新しく更新されたアセット。\"\n\n#: ../../../discord/asset.py:docstring of discord.asset.Asset.with_size:1\nmsgid \"Returns a new asset with the specified size.\"\nmsgstr \"指定されたサイズの新しいアセットを返します。\"\n\n#: ../../../discord/asset.py:docstring of discord.asset.Asset.with_size:10\nmsgid \"The asset had an invalid size.\"\nmsgstr \"アセットのサイズが無効な場合。\"\n\n#: ../../../discord/asset.py:docstring of discord.asset.Asset.with_size:12\n#: ../../../discord/asset.py:docstring of discord.asset.Asset.with_format:12\n#: ../../../discord/asset.py:docstring of discord.asset.Asset.with_static_format:15\nmsgid \"The new updated asset.\"\nmsgstr \"新しく更新されたアセット。\"\n\n#: ../../../discord/asset.py:docstring of discord.asset.Asset.with_format:1\nmsgid \"Returns a new asset with the specified format.\"\nmsgstr \"指定されたフォーマットの新しいアセットを返します。\"\n\n#: ../../../discord/asset.py:docstring of discord.asset.Asset.with_format:7\nmsgid \"The new format of the asset.\"\nmsgstr \"アセットの新しいフォーマット。\"\n\n#: ../../../discord/asset.py:docstring of discord.asset.Asset.with_format:10\n#: ../../../discord/asset.py:docstring of discord.asset.Asset.with_static_format:13\nmsgid \"The asset had an invalid format.\"\nmsgstr \"アセットのフォーマットが無効な場合。\"\n\n#: ../../../discord/asset.py:docstring of discord.asset.Asset.with_static_format:1\nmsgid \"Returns a new asset with the specified static format.\"\nmsgstr \"指定された静的フォーマットの新しいアセットを返します。\"\n\n#: ../../../discord/asset.py:docstring of discord.asset.Asset.with_static_format:3\nmsgid \"This only changes the format if the underlying asset is not animated. Otherwise, the asset is not changed.\"\nmsgstr \"これは、アセットがアニメーションを含まない場合のみフォーマットを変更します。それ以外の場合はアセットは変更されません。\"\n\n#: ../../../discord/asset.py:docstring of discord.asset.Asset.with_static_format:10\nmsgid \"The new static format of the asset.\"\nmsgstr \"アセットの新しい静的フォーマット。\"\n\n#: ../../../discord/asset.py:docstring of discord.asset.AssetMixin.read:3\n#: ../../../discord/emoji.py:docstring of discord.asset.AssetMixin.read:3\n#: ../../../discord/partial_emoji.py:docstring of discord.partial_emoji.PartialEmoji.read:3\nmsgid \"Retrieves the content of this asset as a :class:`bytes` object.\"\nmsgstr \"このアセットの内容を :class:`bytes` オブジェクトとして取得します。\"\n\n#: ../../../discord/asset.py:docstring of discord.asset.AssetMixin.read:5\n#: ../../../discord/asset.py:docstring of discord.asset.AssetMixin.save:13\n#: ../../../discord/emoji.py:docstring of discord.asset.AssetMixin.read:5\n#: ../../../discord/emoji.py:docstring of discord.asset.AssetMixin.save:13\n#: ../../../discord/partial_emoji.py:docstring of discord.partial_emoji.PartialEmoji.read:5\nmsgid \"There was no internal connection state.\"\nmsgstr \"内部の接続ステートが存在しない場合。\"\n\n#: ../../../discord/asset.py:docstring of discord.asset.AssetMixin.read:6\n#: ../../../discord/asset.py:docstring of discord.asset.AssetMixin.save:14\n#: ../../../discord/asset.py:docstring of discord.asset.AssetMixin.to_file:19\n#: ../../../discord/emoji.py:docstring of discord.asset.AssetMixin.read:6\n#: ../../../discord/emoji.py:docstring of discord.asset.AssetMixin.save:14\nmsgid \"Downloading the asset failed.\"\nmsgstr \"アセットのダウンロードに失敗した場合。\"\n\n#: ../../../discord/asset.py:docstring of discord.asset.AssetMixin.read:7\n#: ../../../discord/asset.py:docstring of discord.asset.AssetMixin.save:15\n#: ../../../discord/asset.py:docstring of discord.asset.AssetMixin.to_file:20\n#: ../../../discord/emoji.py:docstring of discord.asset.AssetMixin.read:7\n#: ../../../discord/emoji.py:docstring of discord.asset.AssetMixin.save:15\nmsgid \"The asset was deleted.\"\nmsgstr \"アセットが削除された場合。\"\n\n#: ../../../discord/asset.py:docstring of discord.asset.AssetMixin.read:9\n#: ../../../discord/emoji.py:docstring of discord.asset.AssetMixin.read:9\n#: ../../../discord/partial_emoji.py:docstring of discord.partial_emoji.PartialEmoji.read:10\nmsgid \"The content of the asset.\"\nmsgstr \"アセットの内容。\"\n\n#: ../../../discord/asset.py:docstring of discord.asset.AssetMixin.save:3\n#: ../../../discord/emoji.py:docstring of discord.asset.AssetMixin.save:3\n#: ../../../discord/partial_emoji.py:docstring of discord.asset.AssetMixin.save:3\nmsgid \"Saves this asset into a file-like object.\"\nmsgstr \"このアセットをファイルライクオブジェクトに保存します。\"\n\n#: ../../../discord/asset.py:docstring of discord.asset.AssetMixin.save:5\n#: ../../../discord/emoji.py:docstring of discord.asset.AssetMixin.save:5\n#: ../../../discord/partial_emoji.py:docstring of discord.asset.AssetMixin.save:5\nmsgid \"The file-like object to save this asset to or the filename to use. If a filename is passed then a file is created with that filename and used instead.\"\nmsgstr \"このアセットの保存先となるファイルのようなオブジェクト、または使用するファイル名。ファイル名を指定すると、そのファイル名でファイルが作成され、代わりに使用されます。\"\n\n#: ../../../discord/asset.py:docstring of discord.asset.AssetMixin.to_file:3\n#: ../../../discord/emoji.py:docstring of discord.asset.AssetMixin.to_file:3\n#: ../../../discord/partial_emoji.py:docstring of discord.asset.AssetMixin.to_file:3\nmsgid \"Converts the asset into a :class:`File` suitable for sending via :meth:`abc.Messageable.send`.\"\nmsgstr \"アセットを :meth:`abc.Messageable.send` を介して送信するのに適した :class:`File` に変換します。\"\n\n#: ../../../discord/asset.py:docstring of discord.asset.AssetMixin.to_file:8\n#: ../../../discord/emoji.py:docstring of discord.asset.AssetMixin.to_file:8\n#: ../../../discord/partial_emoji.py:docstring of discord.asset.AssetMixin.to_file:8\nmsgid \"The filename of the file. If not provided, then the filename from the asset's URL is used.\"\nmsgstr \"ファイルのファイル名。指定されていない場合は、アセットのURL由来のファイル名が使用されます。\"\n\n#: ../../../discord/asset.py:docstring of discord.asset.AssetMixin.to_file:11\n#: ../../../discord/emoji.py:docstring of discord.asset.AssetMixin.to_file:11\n#: ../../../discord/partial_emoji.py:docstring of discord.asset.AssetMixin.to_file:11\nmsgid \"The description for the file.\"\nmsgstr \"ファイルの説明。\"\n\n#: ../../../discord/asset.py:docstring of discord.asset.AssetMixin.to_file:16\n#: ../../../discord/emoji.py:docstring of discord.asset.AssetMixin.to_file:16\n#: ../../../discord/partial_emoji.py:docstring of discord.asset.AssetMixin.to_file:16\nmsgid \"The asset does not have an associated state.\"\nmsgstr \"アセットにステートが付属していない場合。\"\n\n#: ../../../discord/asset.py:docstring of discord.asset.AssetMixin.to_file:17\n#: ../../../discord/emoji.py:docstring of discord.asset.AssetMixin.to_file:17\n#: ../../../discord/partial_emoji.py:docstring of discord.asset.AssetMixin.to_file:17\nmsgid \"The asset is a unicode emoji.\"\nmsgstr \"アセットがユニコード絵文字である場合。\"\n\n#: ../../../discord/asset.py:docstring of discord.asset.AssetMixin.to_file:18\n#: ../../../discord/emoji.py:docstring of discord.asset.AssetMixin.to_file:18\n#: ../../../discord/partial_emoji.py:docstring of discord.asset.AssetMixin.to_file:18\nmsgid \"The asset is a sticker with lottie type.\"\nmsgstr \"アセットがロッティータイプのスタンプであった場合。\"\n\n#: ../../../discord/asset.py:docstring of discord.asset.AssetMixin.to_file:22\n#: ../../../discord/emoji.py:docstring of discord.asset.AssetMixin.to_file:22\n#: ../../../discord/partial_emoji.py:docstring of discord.asset.AssetMixin.to_file:22\nmsgid \"The asset as a file suitable for sending.\"\nmsgstr \"送信に適したファイルとしてのアセット。\"\n\n#: ../../api.rst:4446\nmsgid \"Message\"\nmsgstr \"Message\"\n\n#: ../../../discord/message.py:docstring of discord.message.Message:1\nmsgid \"Represents a message from Discord.\"\nmsgstr \"Discordのメッセージ。\"\n\n#: ../../../discord/message.py:docstring of discord.message.Message:15\nmsgid \"Returns the message's hash.\"\nmsgstr \"メッセージのハッシュ値を返します。\"\n\n#: ../../../discord/message.py:docstring of discord.message.Message:19\nmsgid \"Specifies if the message was done with text-to-speech. This can only be accurately received in :func:`on_message` due to a discord limitation.\"\nmsgstr \"メッセージが音声合成で行われたかどうかを指定します。これはDiscordの制約上 :func:`on_message` でのみ正確に受信できます。\"\n\n#: ../../../discord/message.py:docstring of discord.message.Message:27\nmsgid \"The type of message. In most cases this should not be checked, but it is helpful in cases where it might be a system message for :attr:`system_content`.\"\nmsgstr \"メッセージの種類。ほとんどの場合これを確認する必要はありませんが、システムメッセージの場合に :attr:`system_content` を確認するのに便利です。\"\n\n#: ../../../discord/message.py:docstring of discord.message.Message:30\nmsgid \":class:`MessageType`\"\nmsgstr \":class:`MessageType`\"\n\n#: ../../../discord/message.py:docstring of discord.message.Message:34\nmsgid \"A :class:`Member` that sent the message. If :attr:`channel` is a private channel or the user has the left the guild, then it is a :class:`User` instead.\"\nmsgstr \"メッセージを送信した :class:`Member` 。もし :attr:`channel` がプライベートチャンネルだったり、ユーザーがギルドを脱退した場合は、これは代わりに :class:`User` になります。\"\n\n#: ../../../discord/message.py:docstring of discord.message.Message:37\nmsgid \"Union[:class:`Member`, :class:`abc.User`]\"\nmsgstr \"Union[:class:`Member`, :class:`abc.User`]\"\n\n#: ../../../discord/message.py:docstring of discord.message.Message:41\nmsgid \"The actual contents of the message. If :attr:`Intents.message_content` is not enabled this will always be an empty string unless the bot is mentioned or the message is a direct message.\"\nmsgstr \"メッセージの実際の内容。 :attr:`Intents.message_content` が有効化されていない場合は、ボットがメンションされている場合とDMである場合を除き、これは常に空文字列となります。\"\n\n#: ../../../discord/message.py:docstring of discord.message.Message:49\nmsgid \"The value used by the discord guild and the client to verify that the message is successfully sent. This is not stored long term within Discord's servers and is only used ephemerally.\"\nmsgstr \"Discordのギルドとクライアントがメッセージが正常に送信されたことを検証するのに使用する値。これはDiscordサーバーに長期間保管されるものではなく、一時的に使用されるだけです。\"\n\n#: ../../../discord/message.py:docstring of discord.message.Message:52\nmsgid \"Optional[Union[:class:`str`, :class:`int`]]\"\nmsgstr \"Optional[Union[:class:`str`, :class:`int`]]\"\n\n#: ../../../discord/message.py:docstring of discord.message.Message:56\nmsgid \"A list of embeds the message has. If :attr:`Intents.message_content` is not enabled this will always be an empty list unless the bot is mentioned or the message is a direct message.\"\nmsgstr \"メッセージの埋め込みのリスト。 :attr:`Intents.message_content` が有効化されていない場合は、ボットがメンションされている場合とDMである場合を除き、これは常に空文字列となります。\"\n\n#: ../../../discord/message.py:docstring of discord.message.Message:60\nmsgid \"List[:class:`Embed`]\"\nmsgstr \"List[:class:`Embed`]\"\n\n#: ../../../discord/message.py:docstring of discord.message.Message:64\nmsgid \"The :class:`TextChannel` or :class:`Thread` that the message was sent from. Could be a :class:`DMChannel` or :class:`GroupChannel` if it's a private message.\"\nmsgstr \"メッセージの送信された :class:`TextChannel` や :class:`Thread` 。もしメッセージがプライベートチャンネルで送信されたなら、これは :class:`DMChannel` か :class:`GroupChannel` になります。\"\n\n#: ../../../discord/message.py:docstring of discord.message.Message:67\nmsgid \"Union[:class:`TextChannel`, :class:`StageChannel`, :class:`VoiceChannel`, :class:`Thread`, :class:`DMChannel`, :class:`GroupChannel`, :class:`PartialMessageable`]\"\nmsgstr \"Union[:class:`TextChannel`, :class:`StageChannel`, :class:`VoiceChannel`, :class:`Thread`, :class:`DMChannel`, :class:`GroupChannel`, :class:`PartialMessageable`]\"\n\n#: ../../../discord/message.py:docstring of discord.message.Message:71\nmsgid \"The message that this message references. This is only applicable to messages of type :attr:`MessageType.pins_add`, crossposted messages created by a followed channel integration, or message replies.\"\nmsgstr \"このメッセージが参照するメッセージ。これは、種類が :attr:`MessageType.pins_add` のメッセージ、チャンネルのフォローによってクロスポストされたメッセージ、または返信のメッセージのみに適用されます。\"\n\n#: ../../../discord/message.py:docstring of discord.message.Message:77\nmsgid \"Optional[:class:`~discord.MessageReference`]\"\nmsgstr \"Optional[:class:`~discord.MessageReference`]\"\n\n#: ../../../discord/message.py:docstring of discord.message.Message:81\nmsgid \"Specifies if the message mentions everyone.\"\nmsgstr \"メッセージに、全員に対するメンションが含まれているかどうか。\"\n\n#: ../../../discord/message.py:docstring of discord.message.Message:85\nmsgid \"This does not check if the ``@everyone`` or the ``@here`` text is in the message itself. Rather this boolean indicates if either the ``@everyone`` or the ``@here`` text is in the message **and** it did end up mentioning.\"\nmsgstr \"これは、メッセージ内に ``@everyone`` や ``@here`` テキストが含まれているどうかをチェックするわけではありません。このブール値は、メッセージに ``@everyone`` や ``@here`` が含まれていて、それが最終的に全員に対するメンションになったかを示しています。\"\n\n#: ../../../discord/message.py:docstring of discord.message.Message:93\nmsgid \"A list of :class:`Member` that were mentioned. If the message is in a private message then the list will be of :class:`User` instead. For messages that are not of type :attr:`MessageType.default`\\\\, this array can be used to aid in system messages. For more information, see :attr:`system_content`.\"\nmsgstr \"メンションされた :class:`Member` のリスト。もしメッセージがプライベートチャンネル内のメッセージなら、このリストは代わりに :class:`User` のリストになります。もしメッセージのtypeが :attr:`MessageType.default` でないなら、このリストはシステムメッセージを支援するために使えます。詳しい情報は、:attr:`system_content` を参照してください。\"\n\n#: ../../../discord/message.py:docstring of discord.message.Message:100\nmsgid \"The order of the mentions list is not in any particular order so you should not rely on it. This is a Discord limitation, not one with the library.\"\nmsgstr \"メンションのリストにおける順序は特定の順序ではないので、順序には依存しないでください。これはライブラリによる制限ではなく、Discord側による制限です。\"\n\n#: ../../../discord/message.py:docstring of discord.message.Message:103\nmsgid \"List[:class:`abc.User`]\"\nmsgstr \"List[:class:`abc.User`]\"\n\n#: ../../../discord/message.py:docstring of discord.message.Message:107\nmsgid \"A list of :class:`abc.GuildChannel` or :class:`Thread` that were mentioned. If the message is in a private message then the list is always empty.\"\nmsgstr \"メンションされた :class:`abc.GuildChannel` と :class:`Thread` のリスト。もしメッセージがプライベートチャンネル内のものなら、このリストは常に空になります。\"\n\n#: ../../../discord/message.py:docstring of discord.message.Message:114\nmsgid \"A list of :class:`Role` that were mentioned. If the message is in a private message then the list is always empty.\"\nmsgstr \"メンションされた :class:`Role` のリスト。もしメッセージがプライベートチャンネル内のものなら、このリストは常に空になります。\"\n\n#: ../../../discord/message.py:docstring of discord.message.Message:121\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage:39\nmsgid \"The message ID.\"\nmsgstr \"メッセージのID。\"\n\n#: ../../../discord/message.py:docstring of discord.message.Message:127\nmsgid \"If this message was sent by a webhook, then this is the webhook ID's that sent this message.\"\nmsgstr \"もしメッセージがWebhookによって送信されたなら、これはメッセージを送信したWebhookのIDです。\"\n\n#: ../../../discord/message.py:docstring of discord.message.Message:134\nmsgid \"A list of attachments given to a message. If :attr:`Intents.message_content` is not enabled this will always be an empty list unless the bot is mentioned or the message is a direct message.\"\nmsgstr \"メッセージの添付ファイルのリスト。 :attr:`Intents.message_content` が有効化されていない場合は、ボットがメンションされている場合とDMである場合を除き、これは常に空文字列となります。\"\n\n#: ../../../discord/message.py:docstring of discord.message.Message:138\nmsgid \"List[:class:`Attachment`]\"\nmsgstr \"List[:class:`Attachment`]\"\n\n#: ../../../discord/message.py:docstring of discord.message.Message:142\nmsgid \"Specifies if the message is currently pinned.\"\nmsgstr \"メッセージが現時点でピン留めされているか。\"\n\n#: ../../../discord/message.py:docstring of discord.message.Message:148\nmsgid \"Extra features of the message.\"\nmsgstr \"メッセージの追加機能。\"\n\n#: ../../../discord/message.py:docstring of discord.message.Message:152\nmsgid \":class:`MessageFlags`\"\nmsgstr \":class:`MessageFlags`\"\n\n#: ../../../discord/message.py:docstring of discord.message.Message:156\nmsgid \"Reactions to a message. Reactions can be either custom emoji or standard unicode emoji.\"\nmsgstr \"メッセージに付けられたリアクション。リアクションはギルドのカスタム絵文字か、標準のユニコード絵文字かのどちらかです。\"\n\n#: ../../../discord/message.py:docstring of discord.message.Message:158\nmsgid \"List[:class:`Reaction`]\"\nmsgstr \"List[:class:`Reaction`]\"\n\n#: ../../../discord/message.py:docstring of discord.message.Message:162\nmsgid \"The activity associated with this message. Sent with Rich-Presence related messages that for example, request joining, spectating, or listening to or with another member.\"\nmsgstr \"このメッセージに関連付けられたアクティビティ。リッチプレゼンスに関連するメッセージとともに送信されます。たとえば、参加リクエスト、観戦、音楽へのリスニングや他のメンバーとのリスニングなどです。\"\n\n#: ../../../discord/message.py:docstring of discord.message.Message:165\nmsgid \"It is a dictionary with the following optional keys:\"\nmsgstr \"以下のオプションのキーを含む辞書です。\"\n\n#: ../../../discord/message.py:docstring of discord.message.Message:167\nmsgid \"``type``: An integer denoting the type of message activity being requested.\"\nmsgstr \"``type``: リクエストされたメッセージのアクティビティの種類を示す整数。\"\n\n#: ../../../discord/message.py:docstring of discord.message.Message:168\nmsgid \"``party_id``: The party ID associated with the party.\"\nmsgstr \"``party_id``: パーティーに関連付けられたパーティーID。\"\n\n#: ../../../discord/message.py:docstring of discord.message.Message:170\nmsgid \"Optional[:class:`dict`]\"\nmsgstr \"Optional[:class:`dict`]\"\n\n#: ../../../discord/message.py:docstring of discord.message.Message:174\nmsgid \"The rich presence enabled application associated with this message.\"\nmsgstr \"メッセージに関連付けられたリッチプレゼンスが有効化されたアプリケーション。\"\n\n#: ../../../discord/message.py:docstring of discord.message.Message:176\nmsgid \"Type is now :class:`MessageApplication` instead of :class:`dict`.\"\nmsgstr \"型が :class:`dict` から :class:`MessageApplication` に変更されました。\"\n\n#: ../../../discord/message.py:docstring of discord.message.Message:179\nmsgid \"Optional[:class:`~discord.MessageApplication`]\"\nmsgstr \"Optional[:class:`~discord.MessageApplication`]\"\n\n#: ../../../discord/message.py:docstring of discord.message.Message:183\nmsgid \"A list of sticker items given to the message.\"\nmsgstr \"メッセージのスタンプアイテムのリスト。\"\n\n#: ../../../discord/message.py:docstring of discord.message.Message:187\nmsgid \"List[:class:`StickerItem`]\"\nmsgstr \"List[:class:`StickerItem`]\"\n\n#: ../../../discord/message.py:docstring of discord.message.Message:191\nmsgid \"A list of components in the message. If :attr:`Intents.message_content` is not enabled this will always be an empty list unless the bot is mentioned or the message is a direct message.\"\nmsgstr \"メッセージ内のコンポーネントのリスト。 :attr:`Intents.message_content` が有効化されていない場合は、ボットがメンションされている場合とDMである場合を除き、これは常に空文字列となります。\"\n\n#: ../../../discord/message.py:docstring of discord.message.Message:197\nmsgid \"List[Union[:class:`ActionRow`, :class:`Button`, :class:`SelectMenu`]]\"\nmsgstr \"List[Union[:class:`ActionRow`, :class:`Button`, :class:`SelectMenu`]]\"\n\n#: ../../../discord/message.py:docstring of discord.message.Message:201\nmsgid \"The interaction that this message is a response to.\"\nmsgstr \"このメッセージの応答先のインタラクション。\"\n\n#: ../../../discord/message.py:docstring of discord.message.Message:205\nmsgid \"Optional[:class:`MessageInteraction`]\"\nmsgstr \"Optional[:class:`MessageInteraction`]\"\n\n#: ../../../discord/message.py:docstring of discord.message.Message:209\nmsgid \"The data of the role subscription purchase or renewal that prompted this :attr:`MessageType.role_subscription_purchase` message.\"\nmsgstr \":attr:`MessageType.role_subscription_purchase` メッセージを促すきっかけとなったロールサブスクリプションの購入または更新のデータ。\"\n\n#: ../../../discord/message.py:docstring of discord.message.Message:214\nmsgid \"Optional[:class:`RoleSubscriptionInfo`]\"\nmsgstr \"Optional[:class:`RoleSubscriptionInfo`]\"\n\n#: ../../../discord/message.py:docstring of discord.message.Message:218\nmsgid \"The application ID of the application that created this message if this message was sent by an application-owned webhook or an interaction.\"\nmsgstr \"このメッセージがアプリケーション所有のWebhookまたはインタラクションによって送信された場合、そのアプリケーションのID。\"\n\n#: ../../../discord/message.py:docstring of discord.message.Message:227\nmsgid \"A generally increasing integer with potentially gaps or duplicates that represents the approximate position of the message in a thread.\"\nmsgstr \"スレッド内のメッセージのおおよその位置を示す、ほとんどの場合に順に増加し、時々間や重複のある整数値。\"\n\n#: ../../../discord/message.py:docstring of discord.message.Message:236\nmsgid \"The guild that the message belongs to, if applicable.\"\nmsgstr \"もしメッセージがギルドに属しているなら、これはメッセージの属しているギルドです。\"\n\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.delete:5\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.delete:5\nmsgid \"Your own messages could be deleted without any proper permissions. However to delete other people's messages, you must have :attr:`~Permissions.manage_messages`.\"\nmsgstr \"自身が送信したメッセージは適切な権限が無くとも削除できます。しかし、他人の送信したメッセージを削除する場合には、:attr:`~Permissions.manage_messages` が必要です。\"\n\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.delete:8\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.delete:8\nmsgid \"Added the new ``delay`` keyword-only parameter.\"\nmsgstr \"``delay`` キーワード引数が追加されました。\"\n\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.delete:11\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.delete:11\nmsgid \"If provided, the number of seconds to wait in the background before deleting the message. If the deletion fails then it is silently ignored.\"\nmsgstr \"指定したなら、これはメッセージを削除前に待機する秒数となります。もし削除が失敗しても、それは静かに無視されます。\"\n\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.delete:16\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.delete:16\nmsgid \"The message was deleted already\"\nmsgstr \"メッセージがすでに削除されている場合。\"\n\n#: ../../../discord/message.py:docstring of discord.message.Message.edit:5\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.edit:5\nmsgid \"The content must be able to be transformed into a string via ``str(content)``.\"\nmsgstr \"内容は ``str(content)`` によって文字列に変換できる必要があります。\"\n\n#: ../../../discord/message.py:docstring of discord.message.Message.edit:7\nmsgid \"The ``suppress`` keyword-only parameter was added.\"\nmsgstr \"``suppress`` キーワード引数が追加されました。\"\n\n#: ../../../discord/message.py:docstring of discord.message.Message.edit:10\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.edit:7\nmsgid \"Edits are no longer in-place, the newly edited message is returned instead.\"\nmsgstr \"編集はメッセージを置き換えず、編集された新しいメッセージが返されるようになりました。\"\n\n#: ../../../discord/message.py:docstring of discord.message.Message.edit:17\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.edit:14\nmsgid \"The new content to replace the message with. Could be ``None`` to remove the content.\"\nmsgstr \"現在のメッセージと置き換える新しい内容。内容を削除するために ``None`` を指定することもできます。\"\n\n#: ../../../discord/message.py:docstring of discord.message.Message.edit:20\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.edit:17\nmsgid \"The new embed to replace the original with. Could be ``None`` to remove the embed.\"\nmsgstr \"オリジナルのメッセージと置き換える新しい埋め込み。埋め込みを削除するために ``None`` を指定することもできます。\"\n\n#: ../../../discord/message.py:docstring of discord.message.Message.edit:23\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.edit:20\nmsgid \"The new embeds to replace the original with. Must be a maximum of 10. To remove all embeds ``[]`` should be passed.\"\nmsgstr \"オリジナルのメッセージと置き換える新しい埋め込み。最大で10個まで指定できます。埋め込みをすべて削除するためには ``[]`` を指定してください。\"\n\n#: ../../../discord/message.py:docstring of discord.message.Message.edit:37\nmsgid \"Whether to suppress embeds for the message. This removes all the embeds if set to ``True``. If set to ``False`` this brings the embeds back if they were suppressed. Using this parameter requires :attr:`~.Permissions.manage_messages`.\"\nmsgstr \"メッセージの埋め込みを除去すべきか。 ``True`` に設定するとすべての埋め込みが除去されます。 ``False`` に設定すると除去された埋め込みが元に戻ります。このパラメータの使用には :attr:`~.Permissions.manage_messages` 権限が必要です。\"\n\n#: ../../../discord/message.py:docstring of discord.message.Message.edit:42\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.edit:34\nmsgid \"If provided, the number of seconds to wait in the background before deleting the message we just edited. If the deletion fails, then it is silently ignored.\"\nmsgstr \"もし指定したなら、これはメッセージを編集したあと待機し削除するまでの秒数です。もし削除が失敗しても、それは静かに無視されます。\"\n\n#: ../../../discord/message.py:docstring of discord.message.Message.edit:60\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage.edit:52\nmsgid \"Tried to suppress a message without permissions or     edited a message's content or embed that isn't yours.\"\nmsgstr \"権限なしに埋め込みを除去しようとした場合や、他人のメッセージの内容や埋め込みを編集しようとした場合。\"\n\n#: ../../api.rst:4455\nmsgid \"DeletedReferencedMessage\"\nmsgstr \"DeletedReferencedMessage\"\n\n#: ../../../discord/message.py:docstring of discord.message.DeletedReferencedMessage:1\nmsgid \"A special sentinel type given when the resolved message reference points to a deleted message.\"\nmsgstr \"解決されたメッセージ参照が削除されたメッセージを指し示すときに与えられる特別なセンチネルタイプ。\"\n\n#: ../../../discord/message.py:docstring of discord.message.DeletedReferencedMessage:4\nmsgid \"The purpose of this class is to separate referenced messages that could not be fetched and those that were previously fetched but have since been deleted.\"\nmsgstr \"このクラスの目的は、取得できなかった参照されたメッセージと、以前に取得されその後削除されたメッセージを区別することです。\"\n\n#: ../../../discord/message.py:docstring of discord.DeletedReferencedMessage.id:1\nmsgid \"The message ID of the deleted referenced message.\"\nmsgstr \"削除された参照されたメッセージのID。\"\n\n#: ../../../discord/message.py:docstring of discord.DeletedReferencedMessage.channel_id:1\nmsgid \"The channel ID of the deleted referenced message.\"\nmsgstr \"削除された参照されたメッセージが属していたチャンネルのID。\"\n\n#: ../../../discord/message.py:docstring of discord.DeletedReferencedMessage.guild_id:1\nmsgid \"The guild ID of the deleted referenced message.\"\nmsgstr \"削除された参照されたメッセージが属していたギルドのID。\"\n\n#: ../../api.rst:4464\nmsgid \"Reaction\"\nmsgstr \"Reaction\"\n\n#: ../../../discord/reaction.py:docstring of discord.reaction.Reaction:1\nmsgid \"Represents a reaction to a message.\"\nmsgstr \"メッセージのリアクション。\"\n\n#: ../../../discord/reaction.py:docstring of discord.reaction.Reaction:3\n#: ../../../discord/emoji.py:docstring of discord.emoji.Emoji:3\n#: ../../../discord/invite.py:docstring of discord.invite.Invite:3\nmsgid \"Depending on the way this object was created, some of the attributes can have a value of ``None``.\"\nmsgstr \"このオブジェクトの作成方法によって、属性の一部が ``None`` の値になることがあります。\"\n\n#: ../../../discord/reaction.py:docstring of discord.reaction.Reaction:10\nmsgid \"Checks if two reactions are equal. This works by checking if the emoji is the same. So two messages with the same reaction will be considered \\\"equal\\\".\"\nmsgstr \"二つのリアクションが等しいかを比較します。これは絵文字が同一か確認しているため、二つのメッセージの同じリアクションは同一とされます。\"\n\n#: ../../../discord/reaction.py:docstring of discord.reaction.Reaction:16\nmsgid \"Checks if two reactions are not equal.\"\nmsgstr \"二つのリアクションが等しくないかを比較します。\"\n\n#: ../../../discord/reaction.py:docstring of discord.reaction.Reaction:20\nmsgid \"Returns the reaction's hash.\"\nmsgstr \"リアクションのハッシュ値を返します。\"\n\n#: ../../../discord/reaction.py:docstring of discord.reaction.Reaction:24\nmsgid \"Returns the string form of the reaction's emoji.\"\nmsgstr \"リアクションの絵文字を表す文字列を返します。\"\n\n#: ../../../discord/reaction.py:docstring of discord.reaction.Reaction:28\nmsgid \"The reaction emoji. May be a custom emoji, or a unicode emoji.\"\nmsgstr \"リアクションの絵文字。カスタム絵文字か、ユニコード絵文字です。\"\n\n#: ../../../discord/reaction.py:docstring of discord.reaction.Reaction:30\nmsgid \"Union[:class:`Emoji`, :class:`PartialEmoji`, :class:`str`]\"\nmsgstr \"Union[:class:`Emoji`, :class:`PartialEmoji`, :class:`str`]\"\n\n#: ../../../discord/reaction.py:docstring of discord.reaction.Reaction:34\nmsgid \"Number of times this reaction was made. This is a sum of :attr:`normal_count` and :attr:`burst_count`.\"\nmsgstr \"\"\n\n#: ../../../discord/reaction.py:docstring of discord.reaction.Reaction:40\nmsgid \"If the user sent this reaction.\"\nmsgstr \"ボットがこのリアクションを付けたか。\"\n\n#: ../../../discord/reaction.py:docstring of discord.reaction.Reaction:46\nmsgid \"Message this reaction is for.\"\nmsgstr \"このリアクションのメッセージ。\"\n\n#: ../../../discord/reaction.py:docstring of discord.reaction.Reaction:52\nmsgid \"If the user sent this super reaction.\"\nmsgstr \"\"\n\n#: ../../../discord/reaction.py:docstring of discord.reaction.Reaction:60\nmsgid \"The number of times this reaction was made using normal reactions. This is not available in the gateway events such as :func:`on_reaction_add` or :func:`on_reaction_remove`.\"\nmsgstr \"\"\n\n#: ../../../discord/reaction.py:docstring of discord.reaction.Reaction:70\nmsgid \"The number of times this reaction was made using super reactions. This is not available in the gateway events such as :func:`on_reaction_add` or :func:`on_reaction_remove`.\"\nmsgstr \"\"\n\n#: ../../../discord/reaction.py:docstring of discord.reaction.Reaction.is_custom_emoji:1\nmsgid \":class:`bool`: If this is a custom emoji.\"\nmsgstr \":class:`bool`: カスタム絵文字が使用されているかどうか。\"\n\n#: ../../../discord/reaction.py:docstring of discord.reaction.Reaction.remove:3\nmsgid \"Remove the reaction by the provided :class:`User` from the message.\"\nmsgstr \"指定された :class:`User` からのリアクションをメッセージから除去します。\"\n\n#: ../../../discord/reaction.py:docstring of discord.reaction.Reaction.remove:5\nmsgid \"If the reaction is not your own (i.e. ``user`` parameter is not you) then :attr:`~Permissions.manage_messages` is needed.\"\nmsgstr \"もしリアクションがあなたのものではなければ(つまり、 ``user`` パラメーターがあなたでないなら)、 :attr:`~Permissions.manage_messages` も必要になります。\"\n\n#: ../../../discord/reaction.py:docstring of discord.reaction.Reaction.remove:8\nmsgid \"The ``user`` parameter must represent a user or member and meet the :class:`abc.Snowflake` abc.\"\nmsgstr \"``user`` パラメータはユーザーを示し :class:`abc.Snowflake` 抽象基底クラスを満たす必要があります。\"\n\n#: ../../../discord/reaction.py:docstring of discord.reaction.Reaction.remove:11\nmsgid \"The user or member from which to remove the reaction.\"\nmsgstr \"リアクションを除去すべきユーザーやメンバー。\"\n\n#: ../../../discord/reaction.py:docstring of discord.reaction.Reaction.remove:16\nmsgid \"The user you specified, or the reaction's message was not found.\"\nmsgstr \"指定したユーザーかリアクションのメッセージが見つからなかった場合。\"\n\n#: ../../../discord/reaction.py:docstring of discord.reaction.Reaction.clear:3\nmsgid \"Clears this reaction from the message.\"\nmsgstr \"メッセージからこのリアクションを除去します。\"\n\n#: ../../../discord/reaction.py:docstring of discord.reaction.Reaction.users:1\nmsgid \"Returns an :term:`asynchronous iterator` representing the users that have reacted to the message.\"\nmsgstr \"メッセージにリアクションを付けたユーザーを示す :term:`asynchronous iterator` を返します。\"\n\n#: ../../../discord/reaction.py:docstring of discord.reaction.Reaction.users:3\nmsgid \"The ``after`` parameter must represent a member and meet the :class:`abc.Snowflake` abc.\"\nmsgstr \"``after`` パラメータはメンバーを示し :class:`abc.Snowflake` 抽象基底クラスを満たす必要があります。\"\n\n#: ../../../discord/reaction.py:docstring of discord.reaction.Reaction.users:8\nmsgid \"``limit`` and ``after`` parameters are now keyword-only.\"\nmsgstr \"``limit`` と ``after`` パラメータがキーワード専用引数になりました。\"\n\n#: ../../../discord/reaction.py:docstring of discord.reaction.Reaction.users:25\nmsgid \"The maximum number of results to return. If not provided, returns all the users who reacted to the message.\"\nmsgstr \"返す結果の最大数。与えられていない場合は、リアクションを付けたユーザー全員を返します。\"\n\n#: ../../../discord/reaction.py:docstring of discord.reaction.Reaction.users:29\nmsgid \"For pagination, reactions are sorted by member.\"\nmsgstr \"リアクションはメンバーごとにソートされます。\"\n\n#: ../../../discord/reaction.py:docstring of discord.reaction.Reaction.users:32\nmsgid \"Getting the users for the reaction failed.\"\nmsgstr \"リアクションを付けたユーザーの取得に失敗した場合。\"\n\n#: ../../../discord/reaction.py:docstring of discord.reaction.Reaction.users:34\nmsgid \"Union[:class:`User`, :class:`Member`] -- The member (if retrievable) or the user that has reacted to this message. The case where it can be a :class:`Member` is in a guild message context. Sometimes it can be a :class:`User` if the member has left the guild.\"\nmsgstr \"Union[:class:`User`, :class:`Member`] -- リアクションを付けたメンバー（取得できる場合）かユーザー。ギルド内では :class:`Member` となります。メンバーがギルドを脱退した場合は :class:`User` になります。\"\n\n#: ../../api.rst:4472\nmsgid \"Guild\"\nmsgstr \"Guild\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild:1\nmsgid \"Represents a Discord guild.\"\nmsgstr \"Discordのギルド。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild:3\nmsgid \"This is referred to as a \\\"server\\\" in the official Discord UI.\"\nmsgstr \"これはDiscordの公式UIでは「サーバー」と呼ばれています。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild:9\nmsgid \"Checks if two guilds are equal.\"\nmsgstr \"二つのギルドが等しいかを比較します。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild:13\nmsgid \"Checks if two guilds are not equal.\"\nmsgstr \"二つのギルドが等しくないか比較します。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild:17\nmsgid \"Returns the guild's hash.\"\nmsgstr \"ギルドのハッシュ値を返します。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild:21\nmsgid \"Returns the guild's name.\"\nmsgstr \"ギルドの名前を返します。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild:25\nmsgid \"The guild name.\"\nmsgstr \"ギルドの名前。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild:31\nmsgid \"All emojis that the guild owns.\"\nmsgstr \"ギルドに追加されている全ての絵文字。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild:33\nmsgid \"Tuple[:class:`Emoji`, ...]\"\nmsgstr \"Tuple[:class:`Emoji`, ...]\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild:37\nmsgid \"All stickers that the guild owns.\"\nmsgstr \"ギルドに追加されている全てのスタンプ。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild:41\nmsgid \"Tuple[:class:`GuildSticker`, ...]\"\nmsgstr \"Tuple[:class:`GuildSticker`, ...]\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild:45\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.edit:49\nmsgid \"The number of seconds until someone is moved to the AFK channel.\"\nmsgstr \"メンバーをAFKチャンネルに移動させるまでの秒数。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild:51\n#: ../../../discord/widget.py:docstring of discord.widget.Widget:19\nmsgid \"The guild's ID.\"\nmsgstr \"ギルドのID。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild:57\nmsgid \"The guild owner's ID. Use :attr:`Guild.owner` instead.\"\nmsgstr \"ギルドのオーナーのID。代わりに :attr:`Guild.owner` を使用してください。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild:63\nmsgid \"Indicates if the guild is unavailable. If this is ``True`` then the reliability of other attributes outside of :attr:`Guild.id` is slim and they might all be ``None``. It is best to not do anything with the guild if it is unavailable.\"\nmsgstr \"ギルドが利用できないかどうか。これが ``True`` の場合 :attr:`Guild.id` 以外の属性の信頼度は低く ``None`` の場合もあります。利用不可能なギルドに対しては何も行わないことをおすすめします。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild:67\nmsgid \"Check the :func:`on_guild_unavailable` and :func:`on_guild_available` events.\"\nmsgstr \":func:`on_guild_unavailable` と :func:`on_guild_available` イベントも確認してください。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild:73\nmsgid \"The maximum amount of presences for the guild.\"\nmsgstr \"ギルドのオンラインメンバーの最大数。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild:79\nmsgid \"The maximum amount of members for the guild.\"\nmsgstr \"ギルドのメンバーの最大数。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild:83\nmsgid \"This attribute is only available via :meth:`.Client.fetch_guild`.\"\nmsgstr \"この情報は :meth:`Client.fetch_guild` 経由でのみ入手できます。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild:89\nmsgid \"The maximum amount of users in a video channel.\"\nmsgstr \"ビデオチャンネルのユーザーの最大数。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild:97\nmsgid \"The guild's description.\"\nmsgstr \"ギルドの説明。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild:109\nmsgid \"The guild's vanity url code, if any\"\nmsgstr \"存在する場合は、ギルドのバニティURLコード。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild:117\nmsgid \"The guild's explicit content filter.\"\nmsgstr \"メディアコンテンツフィルターのレベル。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild:123\nmsgid \"The guild's notification settings.\"\nmsgstr \"ギルドの標準の通知設定。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild:129\nmsgid \"A list of features that the guild has. The features that a guild can have are subject to arbitrary change by Discord. A list of guild features can be found in :ddocs:`the Discord documentation <resources/guild#guild-object-guild-features>`.\"\nmsgstr \"ギルドの機能のリスト。ギルドの機能の種類はDiscordによって変更されることがあります。 ギルドの機能の一覧は :ddocs:`the Discord documentation <resources/guild#guild-object-guild-features>` にあります。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild:137\nmsgid \"The premium tier for this guild. Corresponds to \\\"Nitro Server\\\" in the official UI. The number goes from 0 to 3 inclusive.\"\nmsgstr \"ギルドのプレミアム階級。これは公式UIの「ニトロサーバー」に対応します。これは0以上3以下です。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild:144\nmsgid \"The number of \\\"boosts\\\" this guild currently has.\"\nmsgstr \"ギルドの現在の「ブースト」数。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild:150\nmsgid \"The preferred locale for the guild. Used when filtering Server Discovery results to a specific language.\"\nmsgstr \"ギルドの優先ローケル。これはサーバー発見画面の結果を特定の言語で絞り込むときに利用されます。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild:153\nmsgid \"This field is now an enum instead of a :class:`str`.\"\nmsgstr \"このフィールドが :class:`str` から列挙型に変更されました。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild:160\nmsgid \"The guild's NSFW level.\"\nmsgstr \"ギルドの年齢制限レベル。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild:164\n#: ../../../discord/invite.py:docstring of discord.invite.PartialInviteGuild:60\nmsgid \":class:`NSFWLevel`\"\nmsgstr \":class:`NSFWLevel`\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild:168\nmsgid \"The guild's Multi-Factor Authentication requirement level.\"\nmsgstr \"ギルドの多要素認証要件レベル。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild:170\nmsgid \"This field is now an enum instead of an :class:`int`.\"\nmsgstr \"このフィールドが :class:`int` から列挙型に変更されました。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild:177\nmsgid \"The approximate number of members in the guild. This is ``None`` unless the guild is obtained using :meth:`Client.fetch_guild` or :meth:`Client.fetch_guilds` with ``with_counts=True``.\"\nmsgstr \"ギルドのおおよそのメンバーの数を示します。 :meth:`Client.fetch_guild` や :meth:`Client.fetch_guilds` にて ``with_counts=True`` を指定してギルドを取得しない限り、 ``None`` を返します。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild:186\nmsgid \"The approximate number of members currently active in the guild. Offline members are excluded. This is ``None`` unless the guild is obtained using :meth:`Client.fetch_guild` or :meth:`Client.fetch_guilds` with ``with_counts=True``.\"\nmsgstr \"ギルドで現在アクティブなメンバーのおおよその数を示します。オフラインのメンバーは除外された値となります。 :meth:`Client.fetch_guild` や :meth:`Client.fetch_guilds` にて ``with_counts=True`` を指定してギルドを取得しない限り、 ``None`` を返します。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild:196\nmsgid \"Indicates if the guild has premium AKA server boost level progress bar enabled.\"\nmsgstr \"ギルドがプレミアム、すなわちサーバーブーストレベルの進捗バーを有効化しているか。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild:204\nmsgid \"Indicates if the guild has widget enabled.\"\nmsgstr \"ギルドにてウィジェットが有効になっているかどうかを示します。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild:212\nmsgid \"The maximum amount of users in a stage video channel.\"\nmsgstr \"ステージビデオチャンネルのユーザーの最大数。\"\n\n#: ../../../discord/guild.py:docstring of discord.Guild.channels:1\nmsgid \"A list of channels that belongs to this guild.\"\nmsgstr \"このギルド内に存在するチャンネルのリスト。\"\n\n#: ../../../discord/guild.py:docstring of discord.Guild.channels:3\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.fetch_channels:15\nmsgid \"Sequence[:class:`abc.GuildChannel`]\"\nmsgstr \"Sequence[:class:`abc.GuildChannel`]\"\n\n#: ../../../discord/guild.py:docstring of discord.Guild.threads:1\nmsgid \"A list of threads that you have permission to view.\"\nmsgstr \"表示する権限があるスレッドのリスト。\"\n\n#: ../../../discord/guild.py:docstring of discord.Guild.threads:5\nmsgid \"Sequence[:class:`Thread`]\"\nmsgstr \"Sequence[:class:`Thread`]\"\n\n#: ../../../discord/guild.py:docstring of discord.Guild.large:1\nmsgid \"Indicates if the guild is a 'large' guild.\"\nmsgstr \"ギルドが「ラージ」かどうかを示します。\"\n\n#: ../../../discord/guild.py:docstring of discord.Guild.large:3\nmsgid \"A large guild is defined as having more than ``large_threshold`` count members, which for this library is set to the maximum of 250.\"\nmsgstr \"ギルドが「ラージ」かはメンバー数が ``large_threshold`` を超えているかによって判断されます。このライブラリでは、これは最大の250に設定されています。\"\n\n#: ../../../discord/guild.py:docstring of discord.Guild.voice_channels:1\nmsgid \"A list of voice channels that belongs to this guild.\"\nmsgstr \"このギルド内に存在するボイスチャンネルのリスト。\"\n\n#: ../../../discord/guild.py:docstring of discord.Guild.voice_channels:3\n#: ../../../discord/guild.py:docstring of discord.Guild.stage_channels:5\n#: ../../../discord/guild.py:docstring of discord.Guild.text_channels:3\n#: ../../../discord/guild.py:docstring of discord.Guild.categories:3\n#: ../../../discord/guild.py:docstring of discord.Guild.forums:3\nmsgid \"This is sorted by the position and are in UI order from top to bottom.\"\nmsgstr \"これはUIにおける順位と同様に、上から下へとソートされています。\"\n\n#: ../../../discord/guild.py:docstring of discord.Guild.voice_channels:5\n#: ../../../discord/channel.py:docstring of discord.CategoryChannel.voice_channels:3\nmsgid \"List[:class:`VoiceChannel`]\"\nmsgstr \"List[:class:`VoiceChannel`]\"\n\n#: ../../../discord/guild.py:docstring of discord.Guild.stage_channels:1\nmsgid \"A list of stage channels that belongs to this guild.\"\nmsgstr \"このギルド内に存在するステージチャンネルのリスト。\"\n\n#: ../../../discord/guild.py:docstring of discord.Guild.stage_channels:7\n#: ../../../discord/channel.py:docstring of discord.CategoryChannel.stage_channels:5\nmsgid \"List[:class:`StageChannel`]\"\nmsgstr \"List[:class:`StageChannel`]\"\n\n#: ../../../discord/guild.py:docstring of discord.Guild.me:1\nmsgid \"Similar to :attr:`Client.user` except an instance of :class:`Member`. This is essentially used to get the member version of yourself.\"\nmsgstr \"これは :class:`Member` のインスタンスであることを除いて、 :attr:`Client.user` と似ています。これはギルドにおけるボット自身のメンバーインスタンスを取得するために使用されます。\"\n\n#: ../../../discord/guild.py:docstring of discord.Guild.me:4\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.fetch_member:21\nmsgid \":class:`Member`\"\nmsgstr \":class:`Member`\"\n\n#: ../../../discord/guild.py:docstring of discord.Guild.voice_client:1\nmsgid \"Returns the :class:`VoiceProtocol` associated with this guild, if any.\"\nmsgstr \"ギルドに紐づいた :class:`VoiceProtocol` が存在していれば、それを返します。\"\n\n#: ../../../discord/guild.py:docstring of discord.Guild.voice_client:3\nmsgid \"Optional[:class:`VoiceProtocol`]\"\nmsgstr \"Optional[:class:`VoiceProtocol`]\"\n\n#: ../../../discord/guild.py:docstring of discord.Guild.text_channels:1\nmsgid \"A list of text channels that belongs to this guild.\"\nmsgstr \"このギルド内に存在するテキストチャンネルのリスト。\"\n\n#: ../../../discord/guild.py:docstring of discord.Guild.text_channels:5\n#: ../../../discord/channel.py:docstring of discord.CategoryChannel.text_channels:3\nmsgid \"List[:class:`TextChannel`]\"\nmsgstr \"List[:class:`TextChannel`]\"\n\n#: ../../../discord/guild.py:docstring of discord.Guild.categories:1\nmsgid \"A list of categories that belongs to this guild.\"\nmsgstr \"このギルド内に存在するカテゴリのリスト。\"\n\n#: ../../../discord/guild.py:docstring of discord.Guild.categories:5\nmsgid \"List[:class:`CategoryChannel`]\"\nmsgstr \"List[:class:`CategoryChannel`]\"\n\n#: ../../../discord/guild.py:docstring of discord.Guild.forums:1\nmsgid \"A list of forum channels that belongs to this guild.\"\nmsgstr \"このギルド内に存在するフォーラムチャンネルのリスト。\"\n\n#: ../../../discord/guild.py:docstring of discord.Guild.forums:5\n#: ../../../discord/channel.py:docstring of discord.CategoryChannel.forums:5\nmsgid \"List[:class:`ForumChannel`]\"\nmsgstr \"List[:class:`ForumChannel`]\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.by_category:1\nmsgid \"Returns every :class:`CategoryChannel` and their associated channels.\"\nmsgstr \"すべての :class:`CategoryChannel` とそれに属するチャンネルを返します。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.by_category:3\nmsgid \"These channels and categories are sorted in the official Discord UI order.\"\nmsgstr \"チャンネルとカテゴリは、公式のDiscord UIと同様の順序によってソートされています。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.by_category:5\nmsgid \"If the channels do not have a category, then the first element of the tuple is ``None``.\"\nmsgstr \"もしチャンネルがカテゴリに属さないなら、そのタプルの最初の要素は ``None`` になります。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.by_category:8\nmsgid \"The categories and their associated channels.\"\nmsgstr \"ギルドに存在するカテゴリと、それに属するチャンネル。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.by_category:9\nmsgid \"List[Tuple[Optional[:class:`CategoryChannel`], List[:class:`abc.GuildChannel`]]]\"\nmsgstr \"List[Tuple[Optional[:class:`CategoryChannel`], List[:class:`abc.GuildChannel`]]]\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.get_channel_or_thread:8\nmsgid \"The returned channel or thread or ``None`` if not found.\"\nmsgstr \"チャンネルかスレッド、または該当するものが見つからない場合 ``None`` が返ります。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.get_channel_or_thread:9\nmsgid \"Optional[Union[:class:`Thread`, :class:`.abc.GuildChannel`]]\"\nmsgstr \"Optional[Union[:class:`Thread`, :class:`.abc.GuildChannel`]]\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.get_channel:1\nmsgid \"Returns a channel with the given ID.\"\nmsgstr \"与えられたIDのチャンネルを返します。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.get_channel:5\nmsgid \"This does *not* search for threads.\"\nmsgstr \"これはスレッドは確認 *しません* 。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.get_channel:15\nmsgid \"Optional[:class:`.abc.GuildChannel`]\"\nmsgstr \"Optional[:class:`.abc.GuildChannel`]\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.get_thread:1\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.get_thread:1\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.get_thread:1\nmsgid \"Returns a thread with the given ID.\"\nmsgstr \"与えられたIDに合致するスレッドを返します。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.get_thread:5\nmsgid \"This does not always retrieve archived threads, as they are not retained in the internal cache. Use :func:`fetch_channel` instead.\"\nmsgstr \"内部キャッシュに保持されていないため、アーカイブされたスレッドを取得できないことがあります。代わりに :func:`fetch_channel` を使用してください。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.get_thread:13\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.get_thread:13\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.get_thread:13\nmsgid \"The returned thread or ``None`` if not found.\"\nmsgstr \"スレッド、または該当するものが見つからない場合 ``None`` が返ります。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.get_emoji:8\nmsgid \"The returned Emoji or ``None`` if not found.\"\nmsgstr \"絵文字、または該当するものが見つからない場合 ``None`` が返ります。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.get_emoji:9\nmsgid \"Optional[:class:`Emoji`]\"\nmsgstr \"Optional[:class:`Emoji`]\"\n\n#: ../../../discord/guild.py:docstring of discord.Guild.afk_channel:1\nmsgid \"The channel that denotes the AFK channel.\"\nmsgstr \"AFKチャンネルを示すチャンネル。\"\n\n#: ../../../discord/guild.py:docstring of discord.Guild.afk_channel:3\n#: ../../../discord/guild.py:docstring of discord.Guild.system_channel:3\n#: ../../../discord/guild.py:docstring of discord.Guild.rules_channel:4\n#: ../../../discord/guild.py:docstring of discord.Guild.public_updates_channel:5\n#: ../../../discord/guild.py:docstring of discord.Guild.widget_channel:4\nmsgid \"If no channel is set, then this returns ``None``.\"\nmsgstr \"チャンネルが設定されていない場合はこれは ``None`` になります。\"\n\n#: ../../../discord/guild.py:docstring of discord.Guild.afk_channel:5\n#: ../../../discord/scheduled_event.py:docstring of discord.ScheduledEvent.channel:3\n#: ../../../discord/member.py:docstring of discord.member.VoiceState:74\nmsgid \"Optional[Union[:class:`VoiceChannel`, :class:`StageChannel`]]\"\nmsgstr \"Optional[Union[:class:`VoiceChannel`, :class:`StageChannel`]]\"\n\n#: ../../../discord/guild.py:docstring of discord.Guild.system_channel:1\nmsgid \"Returns the guild's channel used for system messages.\"\nmsgstr \"ギルドの「システムのメッセージチャンネル」として設定されているチャンネルを返します。\"\n\n#: ../../../discord/guild.py:docstring of discord.Guild.system_channel:5\n#: ../../../discord/guild.py:docstring of discord.Guild.rules_channel:8\n#: ../../../discord/guild.py:docstring of discord.Guild.public_updates_channel:9\n#: ../../../discord/guild.py:docstring of discord.Guild.safety_alerts_channel:7\nmsgid \"Optional[:class:`TextChannel`]\"\nmsgstr \"Optional[:class:`TextChannel`]\"\n\n#: ../../../discord/guild.py:docstring of discord.Guild.system_channel_flags:1\nmsgid \"Returns the guild's system channel settings.\"\nmsgstr \"ギルドのシステムチャンネルの設定を返します。\"\n\n#: ../../../discord/guild.py:docstring of discord.Guild.rules_channel:1\nmsgid \"Return's the guild's channel used for the rules. The guild must be a Community guild.\"\nmsgstr \"ルールに使用されるギルドのチャンネルを返します。ギルドはコミュニティギルドでなければなりません。\"\n\n#: ../../../discord/guild.py:docstring of discord.Guild.public_updates_channel:1\nmsgid \"Return's the guild's channel where admins and moderators of the guilds receive notices from Discord. The guild must be a Community guild.\"\nmsgstr \"ギルドの管理者とモデレータがDiscordからの通知を受け取るギルドのチャンネルを返します。ギルドはコミュニティギルドでなければなりません。\"\n\n#: ../../../discord/guild.py:docstring of discord.Guild.safety_alerts_channel:1\nmsgid \"Return's the guild's channel used for safety alerts, if set.\"\nmsgstr \"存在する場合、ギルドの「セーフティ通知チャンネル」として設定されているチャンネルを返します。\"\n\n#: ../../../discord/guild.py:docstring of discord.Guild.safety_alerts_channel:3\nmsgid \"For example, this is used for the raid protection setting. The guild must have the ``COMMUNITY`` feature.\"\nmsgstr \"例えば、これはレイドプロテクションの設定に使用されます。ギルドには ``COMMUNITY`` 機能が必要です。\"\n\n#: ../../../discord/guild.py:docstring of discord.Guild.widget_channel:1\nmsgid \"Returns the widget channel of the guild.\"\nmsgstr \"ギルドのウィジェットチャンネルを返します。\"\n\n#: ../../../discord/guild.py:docstring of discord.Guild.widget_channel:8\nmsgid \"Optional[Union[:class:`TextChannel`, :class:`ForumChannel`, :class:`VoiceChannel`, :class:`StageChannel`]]\"\nmsgstr \"Optional[Union[:class:`TextChannel`, :class:`ForumChannel`, :class:`VoiceChannel`, :class:`StageChannel`]]\"\n\n#: ../../../discord/guild.py:docstring of discord.Guild.emoji_limit:1\nmsgid \"The maximum number of emoji slots this guild has.\"\nmsgstr \"ギルドに追加できるカスタム絵文字のスロットの最大数。\"\n\n#: ../../../discord/guild.py:docstring of discord.Guild.sticker_limit:1\nmsgid \"The maximum number of sticker slots this guild has.\"\nmsgstr \"ギルドに追加できるカスタムスタンプのスロットの最大数。\"\n\n#: ../../../discord/guild.py:docstring of discord.Guild.bitrate_limit:1\nmsgid \"The maximum bitrate for voice channels this guild can have.\"\nmsgstr \"ギルドに設定できるボイスチャンネルのビットレートの最大値。\"\n\n#: ../../../discord/guild.py:docstring of discord.Guild.filesize_limit:1\nmsgid \"The maximum number of bytes files can have when uploaded to this guild.\"\nmsgstr \"ギルドにアップロード可能なファイルの、バイト数の最大値。\"\n\n#: ../../../discord/guild.py:docstring of discord.Guild.members:1\nmsgid \"A list of members that belong to this guild.\"\nmsgstr \"このギルド内に参加しているメンバーのリスト。\"\n\n#: ../../../discord/guild.py:docstring of discord.Guild.members:3\nmsgid \"Sequence[:class:`Member`]\"\nmsgstr \"Sequence[:class:`Member`]\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.get_member:1\nmsgid \"Returns a member with the given ID.\"\nmsgstr \"与えられたIDのメンバーを返します。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.get_member:10\nmsgid \"The member or ``None`` if not found.\"\nmsgstr \"Memberが返されます。見つからなかった場合は、 ``None`` が返ります。\"\n\n#: ../../../discord/guild.py:docstring of discord.Guild.premium_subscribers:1\nmsgid \"A list of members who have \\\"boosted\\\" this guild.\"\nmsgstr \"このギルドに対してサーバーブーストを行ったメンバーのリスト。\"\n\n#: ../../../discord/guild.py:docstring of discord.Guild.premium_subscribers:3\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.chunk:16\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.query_members:31\n#: ../../../discord/role.py:docstring of discord.Role.members:3\n#: ../../../discord/channel.py:docstring of discord.TextChannel.members:3\nmsgid \"List[:class:`Member`]\"\nmsgstr \"List[:class:`Member`]\"\n\n#: ../../../discord/guild.py:docstring of discord.Guild.roles:1\nmsgid \"Returns a sequence of the guild's roles in hierarchy order.\"\nmsgstr \"設定された順序で並んだギルドのロールのシーケンスを返します。\"\n\n#: ../../../discord/guild.py:docstring of discord.Guild.roles:3\nmsgid \"The first element of this sequence will be the lowest role in the hierarchy.\"\nmsgstr \"最初の要素は、ギルド内の全てのロールにおいて、最も順位の低いものになります。\"\n\n#: ../../../discord/guild.py:docstring of discord.Guild.roles:6\nmsgid \"Sequence[:class:`Role`]\"\nmsgstr \"Sequence[:class:`Role`]\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.get_role:1\nmsgid \"Returns a role with the given ID.\"\nmsgstr \"与えられたIDのロールを返します。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.get_role:5\nmsgid \"``role_id`` parameter is now positional-only.\"\nmsgstr \"引数 ``role_id`` は位置専用引数となりました。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.get_role:10\nmsgid \"The role or ``None`` if not found.\"\nmsgstr \"ロールが返ります。見つからなかった場合は ``None`` が返ります。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.get_role:11\n#: ../../../discord/guild.py:docstring of discord.Guild.premium_subscriber_role:5\n#: ../../../discord/guild.py:docstring of discord.Guild.self_role:5\n#: ../../../discord/member.py:docstring of discord.member.Member.get_role:9\nmsgid \"Optional[:class:`Role`]\"\nmsgstr \"Optional[:class:`Role`]\"\n\n#: ../../../discord/guild.py:docstring of discord.Guild.default_role:1\nmsgid \"Gets the @everyone role that all members have by default.\"\nmsgstr \"全てのメンバーにデフォルトで付与されるロールである @everyone ロールを取得します。\"\n\n#: ../../../discord/guild.py:docstring of discord.Guild.default_role:3\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_role:45\n#: ../../../discord/member.py:docstring of discord.Member.top_role:6\n#: ../../../discord/role.py:docstring of discord.role.Role.edit:49\nmsgid \":class:`Role`\"\nmsgstr \":class:`Role`\"\n\n#: ../../../discord/guild.py:docstring of discord.Guild.premium_subscriber_role:1\nmsgid \"Gets the premium subscriber role, AKA \\\"boost\\\" role, in this guild.\"\nmsgstr \"ギルドのプレミアムサブスクライバーロール、つまり「ブースト」ロールを取得します。\"\n\n#: ../../../discord/guild.py:docstring of discord.Guild.self_role:1\nmsgid \"Gets the role associated with this client's user, if any.\"\nmsgstr \"このクライアントのユーザーに関連付けられたロールが存在する場合、それを取得します。\"\n\n#: ../../../discord/guild.py:docstring of discord.Guild.stage_instances:1\nmsgid \"Returns a sequence of the guild's stage instances that are currently running.\"\nmsgstr \"現在開催中のギルドのステージインスタンスのシーケンスを返します。\"\n\n#: ../../../discord/guild.py:docstring of discord.Guild.stage_instances:6\nmsgid \"Sequence[:class:`StageInstance`]\"\nmsgstr \"Sequence[:class:`StageInstance`]\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.get_stage_instance:1\nmsgid \"Returns a stage instance with the given ID.\"\nmsgstr \"与えられたIDを持つステージインスタンスを返します。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.get_stage_instance:9\n#: ../../../discord/channel.py:docstring of discord.StageChannel.instance:5\nmsgid \"Optional[:class:`StageInstance`]\"\nmsgstr \"Optional[:class:`StageInstance`]\"\n\n#: ../../../discord/guild.py:docstring of discord.Guild.scheduled_events:1\nmsgid \"Returns a sequence of the guild's scheduled events.\"\nmsgstr \"ギルドのスケジュールイベントのシーケンスを返します。\"\n\n#: ../../../discord/guild.py:docstring of discord.Guild.scheduled_events:5\nmsgid \"Sequence[:class:`ScheduledEvent`]\"\nmsgstr \"Sequence[:class:`ScheduledEvent`]\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.get_scheduled_event:1\nmsgid \"Returns a scheduled event with the given ID.\"\nmsgstr \"与えられたIDのスケジュールイベントを返します。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.get_scheduled_event:8\nmsgid \"The scheduled event or ``None`` if not found.\"\nmsgstr \"スケジュールイベント、または該当するものが見つからない場合 ``None`` が返ります。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.get_scheduled_event:9\n#: ../../docstring of discord.StageInstance.scheduled_event:3\n#: ../../../discord/invite.py:docstring of discord.invite.Invite:163\nmsgid \"Optional[:class:`ScheduledEvent`]\"\nmsgstr \"Optional[:class:`ScheduledEvent`]\"\n\n#: ../../../discord/guild.py:docstring of discord.Guild.owner:1\nmsgid \"The member that owns the guild.\"\nmsgstr \"ギルドを所有しているメンバー。\"\n\n#: ../../../discord/guild.py:docstring of discord.Guild.icon:1\n#: ../../../discord/invite.py:docstring of discord.PartialInviteGuild.icon:1\n#: ../../../discord/webhook/async_.py:docstring of discord.PartialWebhookGuild.icon:1\nmsgid \"Returns the guild's icon asset, if available.\"\nmsgstr \"利用できる場合、ギルドのアイコンのアセットを返します。\"\n\n#: ../../../discord/guild.py:docstring of discord.Guild.banner:1\n#: ../../../discord/invite.py:docstring of discord.PartialInviteGuild.banner:1\nmsgid \"Returns the guild's banner asset, if available.\"\nmsgstr \"利用できる場合、ギルドのバナーのアセットを返します。\"\n\n#: ../../../discord/guild.py:docstring of discord.Guild.splash:1\n#: ../../../discord/invite.py:docstring of discord.PartialInviteGuild.splash:1\nmsgid \"Returns the guild's invite splash asset, if available.\"\nmsgstr \"利用できる場合、ギルドの招待の背景のアセットを返します。\"\n\n#: ../../../discord/guild.py:docstring of discord.Guild.discovery_splash:1\nmsgid \"Returns the guild's discovery splash asset, if available.\"\nmsgstr \"利用できる場合、ギルドの発見のスプライトのアセットを返します。\"\n\n#: ../../../discord/guild.py:docstring of discord.Guild.member_count:1\nmsgid \"Returns the member count if available.\"\nmsgstr \"利用可能な場合、メンバー数を返します。\"\n\n#: ../../../discord/guild.py:docstring of discord.Guild.member_count:5\nmsgid \"Due to a Discord limitation, in order for this attribute to remain up-to-date and accurate, it requires :attr:`Intents.members` to be specified.\"\nmsgstr \"Discordの制限により、この属性を最新かつ正確に維持するには、 :attr:`Intents.members` を有効化しないといけません。\"\n\n#: ../../../discord/guild.py:docstring of discord.Guild.member_count:10\nmsgid \"Now returns an ``Optional[int]``.\"\nmsgstr \"``Optional[int]`` を返すように変更されました。\"\n\n#: ../../../discord/guild.py:docstring of discord.Guild.chunked:1\nmsgid \"Returns a boolean indicating if the guild is \\\"chunked\\\".\"\nmsgstr \"ギルドが「チャンクされたか」を返すブール値を返します。\"\n\n#: ../../../discord/guild.py:docstring of discord.Guild.chunked:3\nmsgid \"A chunked guild means that :attr:`member_count` is equal to the number of members stored in the internal :attr:`members` cache.\"\nmsgstr \":attr:`member_count` が内部の :attr:`members` に存在するメンバーの数と同じ場合にギルドはチャンクされています。\"\n\n#: ../../../discord/guild.py:docstring of discord.Guild.chunked:6\nmsgid \"If this value returns ``False``, then you should request for offline members.\"\nmsgstr \"これが ``False`` の場合、オフラインのメンバーをリクエストすべきです。\"\n\n#: ../../../discord/guild.py:docstring of discord.Guild.shard_id:1\nmsgid \"Returns the shard ID for this guild if applicable.\"\nmsgstr \"該当する場合、このギルドのシャードIDを返します。\"\n\n#: ../../../discord/guild.py:docstring of discord.Guild.created_at:1\n#: ../../../discord/invite.py:docstring of discord.PartialInviteGuild.created_at:1\nmsgid \"Returns the guild's creation time in UTC.\"\nmsgstr \"ギルドの作成時刻をUTCで返します。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.get_member_named:1\nmsgid \"Returns the first member found that matches the name provided.\"\nmsgstr \"指定された名前に一致する最初のメンバーを返します。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.get_member_named:3\nmsgid \"The name is looked up in the following order:\"\nmsgstr \"名前は以下の順番で検索されます:\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.get_member_named:5\nmsgid \"Username#Discriminator (deprecated)\"\nmsgstr \"ユーザー名#タグ (非推奨)\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.get_member_named:6\nmsgid \"Username#0 (deprecated, only gets users that migrated from their discriminator)\"\nmsgstr \"ユーザー名#0 (非推奨、タグから移行したユーザーのみ取得)\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.get_member_named:7\nmsgid \"Nickname\"\nmsgstr \"ニックネーム\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.get_member_named:8\nmsgid \"Global name\"\nmsgstr \"グローバルの表示名\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.get_member_named:9\nmsgid \"Username\"\nmsgstr \"ユーザー名\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.get_member_named:11\nmsgid \"If no member is found, ``None`` is returned.\"\nmsgstr \"メンバーが見つからない場合は ``None`` が返されます。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.get_member_named:15\nmsgid \"``name`` parameter is now positional-only.\"\nmsgstr \"``name`` 引数は位置限定引数になりました。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.get_member_named:19\nmsgid \"Looking up users via discriminator due to Discord API change.\"\nmsgstr \"Discord APIの変更のため、ユーザーのタグによる検索。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.get_member_named:21\nmsgid \"The name of the member to lookup.\"\nmsgstr \"検索するメンバーの名前。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.get_member_named:24\nmsgid \"The member in this guild with the associated name. If not found then ``None`` is returned.\"\nmsgstr \"渡された名前のメンバー。見つからなかった場合は ``None`` が返ります。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_text_channel:3\nmsgid \"Creates a :class:`TextChannel` for the guild.\"\nmsgstr \"ギルドに :class:`TextChannel` を作成します。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_text_channel:5\nmsgid \"Note that you must have :attr:`~Permissions.manage_channels` to create the channel.\"\nmsgstr \"チャンネルを作成するには、:attr:`~Permissions.manage_channels` が必要です。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_text_channel:7\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_forum:5\nmsgid \"The ``overwrites`` parameter can be used to create a 'secret' channel upon creation. This parameter expects a :class:`dict` of overwrites with the target (either a :class:`Member` or a :class:`Role`) as the key and a :class:`PermissionOverwrite` as the value.\"\nmsgstr \"``overwrites`` パラメータを使用すると秘密のチャンネルを作成できます。このパラメータは対象（ :class:`Member` か :class:`Role` ）をキーとし :class:`PermissionOverwrite` を値とする :class:`dict` を取ります。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_text_channel:14\nmsgid \"Creating a channel of a specified position will not update the position of other channels to follow suit. A follow-up call to :meth:`~TextChannel.edit` will be required to update the position of the channel in the channel list.\"\nmsgstr \"指定された位置のチャンネルを作成しても、それに続く他のチャンネルの位置は更新されません。 チャンネルリスト内のチャンネルの位置を更新するには、呼び出し後に :meth:`~TextChannel.edit` を呼び出さないといけません。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_text_channel:24\nmsgid \"Creating a basic channel:\"\nmsgstr \"基本的なチャンネルの作成例：\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_text_channel:30\nmsgid \"Creating a \\\"secret\\\" channel:\"\nmsgstr \"秘密のチャンネルの作成例：\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_text_channel:41\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_voice_channel:9\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_stage_channel:11\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_forum:12\n#: ../../../discord/widget.py:docstring of discord.widget.WidgetChannel:29\nmsgid \"The channel's name.\"\nmsgstr \"チャンネルの名前。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_text_channel:43\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_voice_channel:11\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_stage_channel:13\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_forum:14\nmsgid \"A :class:`dict` of target (either a role or a member) to :class:`PermissionOverwrite` to apply upon creation of a channel. Useful for creating secret channels.\"\nmsgstr \"チャンネル作成時に適用すべき、対象（ロールまたはメンバー）をキーとし :class:`PermissionOverwrite` を値とする :class:`dict` 。秘密のチャンネルの作成に便利です。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_text_channel:47\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_voice_channel:15\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_stage_channel:17\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_forum:20\nmsgid \"The category to place the newly created channel under. The permissions will be automatically synced to category if no overwrites are provided.\"\nmsgstr \"新しく作成されたチャンネルを配置するカテゴリ。上書きがない場合、権限は自動的にカテゴリと同期されます。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_text_channel:54\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.edit:22\nmsgid \"The new channel's topic.\"\nmsgstr \"新しいチャンネルのトピック。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_text_channel:56\nmsgid \"Specifies the slowmode rate limit for user in this channel, in seconds. The maximum value possible is ``21600``.\"\nmsgstr \"チャンネル内の低速モードの時間を秒単位で指定します。最大値は ``21600`` です。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_text_channel:59\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_forum:27\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.edit:26\n#: ../../../discord/channel.py:docstring of discord.channel.VoiceChannel.edit:24\n#: ../../../discord/channel.py:docstring of discord.channel.StageChannel.edit:24\nmsgid \"To mark the channel as NSFW or not.\"\nmsgstr \"チャンネルに年齢制限をかけるかどうか。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_text_channel:61\nmsgid \"Whether to create the text channel as a news channel.\"\nmsgstr \"ニュースチャンネルとしてテキストチャンネルを作成するかどうか。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_text_channel:65\nmsgid \"The default auto archive duration for threads created in the text channel (in minutes). Must be one of ``60``, ``1440``, ``4320``, or ``10080``.\"\nmsgstr \"このテキストチャンネルで作成されたスレッドの分単位のデフォルトの自動アーカイブ期間。これは ``60`` 、 ``1440`` 、 ``4320`` 、または ``10080`` でないといけません。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_text_channel:70\nmsgid \"The default slowmode delay in seconds for threads created in the text channel.\"\nmsgstr \"このテキストチャンネルで作成されたスレッドの、デフォルトの秒単位の低速モードレート制限。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_text_channel:74\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_voice_channel:35\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_stage_channel:41\nmsgid \"The reason for creating this channel. Shows up on the audit log.\"\nmsgstr \"チャンネルを作成する理由。監査ログに表示されます。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_text_channel:79\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_voice_channel:40\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_stage_channel:46\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_category:16\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_category:16\nmsgid \"The permission overwrite information is not in proper form.\"\nmsgstr \"権限の上書きの情報が適切なものでない場合。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_text_channel:81\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_voice_channel:42\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_stage_channel:48\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_category:18\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_category:18\nmsgid \"The channel that was just created.\"\nmsgstr \"作成されたチャンネル。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_text_channel:82\n#: ../../../discord/channel.py:docstring of discord.channel.CategoryChannel.create_text_channel:6\nmsgid \":class:`TextChannel`\"\nmsgstr \":class:`TextChannel`\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_voice_channel:3\nmsgid \"This is similar to :meth:`create_text_channel` except makes a :class:`VoiceChannel` instead.\"\nmsgstr \"これは :class:`VoiceChannel` を作る点以外では :meth:`create_text_channel` と似ています。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_voice_channel:22\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_stage_channel:24\n#: ../../../discord/channel.py:docstring of discord.channel.VoiceChannel:62\n#: ../../../discord/channel.py:docstring of discord.channel.StageChannel:70\nmsgid \"The channel's preferred audio bitrate in bits per second.\"\nmsgstr \"チャンネルのビット毎秒単位の推奨オーディオビットレート設定。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_voice_channel:24\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_stage_channel:28\n#: ../../../discord/channel.py:docstring of discord.channel.VoiceChannel:68\nmsgid \"The channel's limit for number of members that can be in a voice channel.\"\nmsgstr \"ボイスチャンネルに参加できるメンバー数の制限。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_voice_channel:26\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_stage_channel:32\n#: ../../../discord/channel.py:docstring of discord.channel.VoiceChannel:74\nmsgid \"The region for the voice channel's voice communication. A value of ``None`` indicates automatic voice region detection.\"\nmsgstr \"ボイスチャンネルの音声通信のためのリージョン。値が ``None`` の場合は自動で検出されます。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_voice_channel:43\n#: ../../../discord/channel.py:docstring of discord.channel.CategoryChannel.create_voice_channel:6\nmsgid \":class:`VoiceChannel`\"\nmsgstr \":class:`VoiceChannel`\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_stage_channel:3\nmsgid \"This is similar to :meth:`create_text_channel` except makes a :class:`StageChannel` instead.\"\nmsgstr \"これは :class:`StageChannel` を作る点以外では :meth:`create_text_channel` と似ています。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_stage_channel:49\n#: ../../../discord/channel.py:docstring of discord.channel.CategoryChannel.create_stage_channel:8\nmsgid \":class:`StageChannel`\"\nmsgstr \":class:`StageChannel`\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_category:3\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_category:3\nmsgid \"Same as :meth:`create_text_channel` except makes a :class:`CategoryChannel` instead.\"\nmsgstr \"これは :class:`CategoryChannel` を作る点以外では :meth:`create_text_channel` と似ています。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_category:7\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_category:7\nmsgid \"The ``category`` parameter is not supported in this function since categories cannot have categories.\"\nmsgstr \"カテゴリを重ねることはできないため、この関数は ``category`` パラメータをサポートしません。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_category:19\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_category:19\nmsgid \":class:`CategoryChannel`\"\nmsgstr \":class:`CategoryChannel`\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_forum:3\nmsgid \"Similar to :meth:`create_text_channel` except makes a :class:`ForumChannel` instead.\"\nmsgstr \"これは :class:`ForumChannel` を作る点以外では :meth:`create_text_channel` と似ています。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_forum:18\nmsgid \"The channel's topic.\"\nmsgstr \"チャンネルのトピック。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_forum:29\nmsgid \"Specifies the slowmode rate limit for users in this channel, in seconds. The maximum possible value is ``21600``.\"\nmsgstr \"チャンネル内の低速モードの時間を秒単位で指定します。最大値は ``21600`` です。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_forum:32\nmsgid \"The reason for creating this channel. Shows up in the audit log.\"\nmsgstr \"チャンネルを作成する理由。監査ログに表示されます。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_forum:34\nmsgid \"The default auto archive duration for threads created in the forum channel (in minutes). Must be one of ``60``, ``1440``, ``4320``, or ``10080``.\"\nmsgstr \"このフォーラムチャンネルで作成されたスレッドの分単位のデフォルトの自動アーカイブ期間。これは ``60`` 、 ``1440`` 、 ``4320`` 、または ``10080`` でないといけません。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_forum:37\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel:92\nmsgid \"The default slowmode delay in seconds for threads created in this forum.\"\nmsgstr \"このフォーラムで作成されたスレッドの、デフォルトの秒単位の低速モードレート制限。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_forum:41\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel:118\nmsgid \"The default sort order for posts in this forum channel.\"\nmsgstr \"このフォーラムチャネルの投稿の並び替え順。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_forum:45\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel:100\nmsgid \"The default reaction emoji for threads created in this forum to show in the add reaction button.\"\nmsgstr \"このフォーラムで作成されたスレッドで、デフォルトでリアクション追加ボタンに表示するリアクション絵文字。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_forum:50\nmsgid \"The default layout for posts in this forum.\"\nmsgstr \"このフォーラムの投稿のデフォルトの表示レイアウト。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_forum:54\nmsgid \"The available tags for this forum channel.\"\nmsgstr \"このフォーラムチャンネルで利用可能なタグ。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_forum:64\n#: ../../../discord/channel.py:docstring of discord.channel.CategoryChannel.create_forum:8\nmsgid \":class:`ForumChannel`\"\nmsgstr \":class:`ForumChannel`\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.leave:3\nmsgid \"Leaves the guild.\"\nmsgstr \"ギルドから脱退します。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.leave:7\nmsgid \"You cannot leave the guild that you own, you must delete it instead via :meth:`delete`.\"\nmsgstr \"自分のギルドから脱退することはできません。代わりに :meth:`delete` で削除する必要があります。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.leave:10\nmsgid \"Leaving the guild failed.\"\nmsgstr \"ギルドの脱退に失敗した場合。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.delete:3\nmsgid \"Deletes the guild. You must be the guild owner to delete the guild.\"\nmsgstr \"ギルドを削除します。ただし、あなたが削除するギルドの所有者である必要があります。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.delete:6\nmsgid \"Deleting the guild failed.\"\nmsgstr \"ギルドの削除に失敗した場合。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.delete:7\nmsgid \"You do not have permissions to delete the guild.\"\nmsgstr \"ギルドを削除する権限がない場合。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.edit:3\nmsgid \"Edits the guild.\"\nmsgstr \"ギルドを編集します。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.edit:5\nmsgid \"You must have :attr:`~Permissions.manage_guild` to edit the guild.\"\nmsgstr \"ルールを編集するには、 :attr:`~Permissions.manage_guild` が必要です。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.edit:7\nmsgid \"The newly updated guild is returned.\"\nmsgstr \"新しく更新されたギルドが返されるようになりました。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.edit:10\nmsgid \"The ``region`` keyword parameter has been removed.\"\nmsgstr \"``region`` キーワード引数が削除されました。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.edit:17\nmsgid \"The new name of the guild.\"\nmsgstr \"ギルドの新しい名前。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.edit:19\nmsgid \"The new description of the guild. Could be ``None`` for no description. This is only available to guilds that contain ``COMMUNITY`` in :attr:`Guild.features`.\"\nmsgstr \"ギルドの新しい説明。説明がない場合 ``None`` を指定することができます。ただし、これは :attr:`Guild.features` に ``COMMUNITY`` があるギルドでのみ使用できます。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.edit:22\nmsgid \"A :term:`py:bytes-like object` representing the icon. Only PNG/JPEG is supported. GIF is only available to guilds that contain ``ANIMATED_ICON`` in :attr:`Guild.features`. Could be ``None`` to denote removal of the icon.\"\nmsgstr \"アイコンを示す :term:`py:bytes-like object` 。PNGとJPEGのみ使用できます。 :attr:`Guild.features` に ``ANIMATED_ICON`` を含むギルドではGIFも使用できます。アイコンを削除する場合には ``None`` を指定できます。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.edit:26\nmsgid \"A :term:`py:bytes-like object` representing the banner. Could be ``None`` to denote removal of the banner. This is only available to guilds that contain ``BANNER`` in :attr:`Guild.features`.\"\nmsgstr \"バナーを示す :term:`py:bytes-like object` 。バナーを削除する場合には ``None`` を指定できます。 :attr:`Guild.features` に ``BANNER`` を含むギルドでのみ利用可能です。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.edit:30\nmsgid \"A :term:`py:bytes-like object` representing the invite splash. Only PNG/JPEG supported. Could be ``None`` to denote removing the splash. This is only available to guilds that contain ``INVITE_SPLASH`` in :attr:`Guild.features`.\"\nmsgstr \"招待スプラッシュを示す :term:`py:bytes-like object` 。PNGとJPEGのみ使用できます。スプラッシュを削除する場合には ``None`` を指定できます。 :attr:`Guild.features` に ``INVITE_SPLASH`` を含むギルドでのみ利用可能です。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.edit:35\nmsgid \"A :term:`py:bytes-like object` representing the discovery splash. Only PNG/JPEG supported. Could be ``None`` to denote removing the splash. This is only available to guilds that contain ``DISCOVERABLE`` in :attr:`Guild.features`.\"\nmsgstr \"発見画面のスプラッシュを示す :term:`py:bytes-like object` 。PNGとJPEGのみ使用できます。スプラッシュを削除する場合には ``None`` を指定できます。 :attr:`Guild.features` に ``DISCOVERABLE`` を含むギルドでのみ利用可能です。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.edit:42\nmsgid \"Whether the guild should be a Community guild. If set to ``True``\\\\, both ``rules_channel`` and ``public_updates_channel`` parameters are required.\"\nmsgstr \"ギルドをコミュニティギルドにするかどうか。``True`` に設定した場合、``rules_channel`` と ``public_updates_channel`` の両方のパラメータが必要です。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.edit:47\nmsgid \"The new channel that is the AFK channel. Could be ``None`` for no AFK channel.\"\nmsgstr \"AFKチャンネルに設定する新しいチャンネル。AFKチャンネルを設定しない場合には ``None`` を指定することができます。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.edit:51\nmsgid \"The new owner of the guild to transfer ownership to. Note that you must be owner of the guild to do this.\"\nmsgstr \"ギルドの新しい所有者。ただし、これを設定する場合には、ギルドの所有者である必要があります。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.edit:54\nmsgid \"The new verification level for the guild.\"\nmsgstr \"ギルドの新しい認証レベル。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.edit:56\nmsgid \"The new default notification level for the guild.\"\nmsgstr \"ギルドの新しい標準の通知レベル。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.edit:58\nmsgid \"The new explicit content filter for the guild.\"\nmsgstr \"ギルドの新しい、不適切な表現のフィルター設定。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.edit:60\nmsgid \"The new vanity code for the guild.\"\nmsgstr \"ギルドの新しいバニティコード。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.edit:62\nmsgid \"The new channel that is used for the system channel. Could be ``None`` for no system channel.\"\nmsgstr \"システムチャンネルに設定する新しいチャンネル。システムチャンネルを設定しない場合には ``None`` を指定することができます。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.edit:64\nmsgid \"The new system channel settings to use with the new system channel.\"\nmsgstr \"新しいシステムチャンネルの使用設定。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.edit:66\nmsgid \"The new preferred locale for the guild. Used as the primary language in the guild.\"\nmsgstr \"ギルドの新しい優先ロケール。ギルドの主要言語として使用されます。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.edit:70\nmsgid \"Now accepts an enum instead of :class:`str`.\"\nmsgstr \":class:`str` の代わりに列挙型を受け付けます。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.edit:72\nmsgid \"The new channel that is used for rules. This is only available to guilds that contain ``COMMUNITY`` in :attr:`Guild.features`. Could be ``None`` for no rules channel.\"\nmsgstr \"ルールに使用される新しいチャンネル。これは :attr:`Guild.features` に ``COMMUNITY`` を含むギルドでのみ利用できます。ルールチャネルがない場合は ``None`` を指定できます。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.edit:78\nmsgid \"The new channel that is used for public updates from Discord. This is only available to guilds that contain ``COMMUNITY`` in :attr:`Guild.features`. Could be ``None`` for no public updates channel.\"\nmsgstr \"Discordからのコミュニティーアップデートに使用される新しいチャンネル。これは :attr:`Guild.features` に ``COMMUNITY`` を含むギルドでのみ利用できます。コミュニティーアップデートチャネルがない場合は ``None`` を指定できます。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.edit:84\nmsgid \"Whether the premium AKA server boost level progress bar should be enabled for the guild.\"\nmsgstr \"ギルドのプレミアム、すなわちサーバーブーストレベルの進捗バーを有効化すべきか。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.edit:88\nmsgid \"Whether server discovery is enabled for this guild.\"\nmsgstr \"このギルドでサーバー発見を有効にするかどうか。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.edit:92\nmsgid \"Whether joining via invites should be disabled for the guild.\"\nmsgstr \"招待でのギルドへの参加を無効にするかどうか。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.edit:96\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.edit_widget:9\nmsgid \"Whether to enable the widget for the guild.\"\nmsgstr \"ギルドのウィジェットを有効にするかどうか。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.edit:100\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.edit_widget:11\nmsgid \"The new widget channel. ``None`` removes the widget channel.\"\nmsgstr \"新しいウィジェットチャンネル。``None`` を指定するとウィジェットチャンネルを除去できます。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.edit:104\nmsgid \"The new guild's Multi-Factor Authentication requirement level. Note that you must be owner of the guild to do this.\"\nmsgstr \"新しいギルドの二要素認証要件レベル。これを行うにはギルドの所有者でないといけません。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.edit:109\nmsgid \"The reason for editing this guild. Shows up on the audit log.\"\nmsgstr \"ギルドを編集する理由。監査ログに表示されます。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.edit:111\nmsgid \"Whether the alerts for raid protection should be disabled for the guild.\"\nmsgstr \"レイドプロテクションのアラートをギルドで無効にするかどうか。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.edit:115\nmsgid \"The new channel that is used for safety alerts. This is only available to guilds that contain ``COMMUNITY`` in :attr:`Guild.features`. Could be ``None`` for no safety alerts channel.\"\nmsgstr \"安全アラートに使用される新しいチャンネル。これは :attr:`Guild.features` に ``COMMUNITY`` を含むギルドでのみ利用できます。安全アラートチャネルがない場合は ``None`` を指定できます。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.edit:121\nmsgid \"The time when invites should be enabled again, or ``None`` to disable the action. This must be a timezone-aware datetime object. Consider using :func:`utils.utcnow`.\"\nmsgstr \"\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.edit:126\nmsgid \"The time when direct messages should be allowed again, or ``None`` to disable the action. This must be a timezone-aware datetime object. Consider using :func:`utils.utcnow`.\"\nmsgstr \"\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.edit:132\nmsgid \"You do not have permissions to edit the guild.\"\nmsgstr \"ギルドを編集する権限がない場合。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.edit:133\n#: ../../../discord/integrations.py:docstring of discord.integrations.StreamIntegration.edit:19\nmsgid \"Editing the guild failed.\"\nmsgstr \"ギルドの編集に失敗した場合。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.edit:134\nmsgid \"The image format passed in to ``icon`` is invalid. It must be     PNG or JPG. This is also raised if you are not the owner of the     guild and request an ownership transfer.\"\nmsgstr \"``icon`` に渡された画像形式が無効な場合。これはPNGかJPGでなくてはいけません。また、あなたがギルドの所有者でないのに、ギルドの所有権の移動を行おうとした場合にも発生します。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.edit:135\nmsgid \"The type passed to the ``default_notifications``, ``rules_channel``, ``public_updates_channel``,     ``safety_alerts_channel`` ``verification_level``, ``explicit_content_filter``,     ``system_channel_flags``, or ``mfa_level`` parameter was of the incorrect type.\"\nmsgstr \"``default_notifications`` 、 ``rules_channel`` 、 ``public_updates_channel`` 、 ``safety_alerts_channel`` 、 ``verification_level`` 、 ``explicit_content_filter`` 、 ``system_channel_flags`` 、 ``mfa_level`` に間違った型の値が渡されたとき。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.edit:137\nmsgid \"The newly updated guild. Note that this has the same limitations as mentioned in :meth:`Client.fetch_guild` and may not have full data.\"\nmsgstr \"新しく更新されたギルド。これは :meth:`Client.fetch_guild` に記載されているものと同じ制限があり、完全なデータを持っていない可能性があることに注意してください。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.fetch_channels:3\nmsgid \"Retrieves all :class:`abc.GuildChannel` that the guild has.\"\nmsgstr \"ギルドの :class:`abc.GuildChannel` をすべて取得します。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.fetch_channels:7\nmsgid \"This method is an API call. For general usage, consider :attr:`channels` instead.\"\nmsgstr \"このメソッドはAPIを呼び出します。通常は :attr:`channels` を代わりとして使用してください。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.fetch_channels:12\nmsgid \"Retrieving the channels failed.\"\nmsgstr \"チャンネルの取得に失敗した場合。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.fetch_channels:14\nmsgid \"All channels in the guild.\"\nmsgstr \"ギルド内のすべてのチャンネル。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.active_threads:3\nmsgid \"Returns a list of active :class:`Thread` that the client can access.\"\nmsgstr \"クライアントがアクセスできるアクティブな :class:`Thread` のリストを返します。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.active_threads:5\nmsgid \"This includes both private and public threads.\"\nmsgstr \"これにはプライベートスレッドとパブリックスレッドの両方が含まれます。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.active_threads:9\nmsgid \"The request to get the active threads failed.\"\nmsgstr \"アクティブなスレッドの取得に失敗した場合。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.active_threads:11\nmsgid \"The active threads\"\nmsgstr \"アクティブなスレッド\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.active_threads:12\n#: ../../../discord/channel.py:docstring of discord.TextChannel.threads:5\n#: ../../../discord/channel.py:docstring of discord.ForumChannel.threads:3\nmsgid \"List[:class:`Thread`]\"\nmsgstr \"List[:class:`Thread`]\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.fetch_members:1\nmsgid \"Retrieves an :term:`asynchronous iterator` that enables receiving the guild's members. In order to use this, :meth:`Intents.members` must be enabled.\"\nmsgstr \"ギルドのメンバーを取得できる :term:`asynchronous iterator` を取得します。これを使用するには :meth:`Intents.members` が必要です。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.fetch_members:6\nmsgid \"This method is an API call. For general usage, consider :attr:`members` instead.\"\nmsgstr \"このメソッドはAPIを呼び出します。通常は :attr:`members` を代わりとして使用してください。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.fetch_members:12\nmsgid \"The number of members to retrieve. Defaults to 1000. Pass ``None`` to fetch all members. Note that this is potentially slow.\"\nmsgstr \"取得するメンバーの数。デフォルトは1000です。すべてのメンバーを取得するには ``None`` を渡します。これは取得に時間がかかる可能性があります。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.fetch_members:15\nmsgid \"Retrieve members after this date or object. If a datetime is provided, it is recommended to use a UTC aware datetime. If the datetime is naive, it is assumed to be local time.\"\nmsgstr \"渡された日付、またはオブジェクトより後のメンバーを取得します。日付を指定する場合、UTC対応の「aware」を利用することを推奨します。日付が「naive」である場合、これは地域時間であるとみなされます。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.fetch_members:20\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.chunk:13\nmsgid \"The members intent is not enabled.\"\nmsgstr \"メンバーインテントが有効でない場合。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.fetch_members:21\nmsgid \"Getting the members failed.\"\nmsgstr \"メンバーの取得に失敗した場合。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.fetch_members:23\nmsgid \":class:`.Member` -- The member with the member data parsed.\"\nmsgstr \":class:`.Member` -- メンバーデータが解析されたメンバー。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.fetch_member:3\nmsgid \"Retrieves a :class:`Member` from a guild ID, and a member ID.\"\nmsgstr \"ギルドIDとメンバーIDから :class:`Member` を取得します。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.fetch_member:7\nmsgid \"This method is an API call. If you have :attr:`Intents.members` and member cache enabled, consider :meth:`get_member` instead.\"\nmsgstr \"このメソッドはAPIを呼び出します。 :attr:`Intents.members` とメンバーキャッシュを有効にしている場合は、代わりに :meth:`get_member` を検討してください。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.fetch_member:11\nmsgid \"``member_id`` parameter is now positional-only.\"\nmsgstr \"``member_id`` 引数は位置専用引数となりました。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.fetch_member:13\nmsgid \"The member's ID to fetch from.\"\nmsgstr \"取得したいメンバーのID。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.fetch_member:16\nmsgid \"You do not have access to the guild.\"\nmsgstr \"ギルドにアクセスする権限がない場合。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.fetch_member:17\nmsgid \"Fetching the member failed.\"\nmsgstr \"メンバーの取得に失敗した場合。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.fetch_member:18\nmsgid \"The member could not be found.\"\nmsgstr \"メンバーが見つからなかった場合。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.fetch_member:20\nmsgid \"The member from the member ID.\"\nmsgstr \"メンバーIDで指定されたメンバー。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.fetch_ban:3\nmsgid \"Retrieves the :class:`BanEntry` for a user.\"\nmsgstr \"ユーザーの :class:`BanEntry` を返します。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.fetch_ban:5\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.bans:3\nmsgid \"You must have :attr:`~Permissions.ban_members` to get this information.\"\nmsgstr \"この情報を取得するためには、:attr:`~Permissions.ban_members` が必要です。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.fetch_ban:7\nmsgid \"The user to get ban information from.\"\nmsgstr \"BAN情報を取得するユーザー。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.fetch_ban:11\nmsgid \"This user is not banned.\"\nmsgstr \"指定されたユーザーがBANされていない場合。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.fetch_ban:14\nmsgid \"The :class:`BanEntry` object for the specified user.\"\nmsgstr \"指定されたユーザーの :class:`BanEntry` オブジェクト。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.fetch_ban:15\nmsgid \":class:`BanEntry`\"\nmsgstr \":class:`BanEntry`\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.fetch_channel:3\nmsgid \"Retrieves a :class:`.abc.GuildChannel` or :class:`.Thread` with the specified ID.\"\nmsgstr \"指定されたIDを持つ :class:`.abc.GuildChannel` または :class:`.Thread` を取得します。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.fetch_channel:7\nmsgid \"This method is an API call. For general usage, consider :meth:`get_channel_or_thread` instead.\"\nmsgstr \"このメソッドはAPIを呼び出します。通常は :meth:`get_channel_or_thread` を代わりとして使用してください。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.fetch_channel:11\nmsgid \"An unknown channel type was received from Discord     or the guild the channel belongs to is not the same     as the one in this object points to.\"\nmsgstr \"不明なチャンネルタイプをDiscordから受け取ったか、チャンネルが属するギルドがこのオブジェクトが示すものと異なる場合。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.fetch_channel:17\nmsgid \"Union[:class:`.abc.GuildChannel`, :class:`.Thread`]\"\nmsgstr \"Union[:class:`.abc.GuildChannel`, :class:`.Thread`]\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.bans:1\nmsgid \"Retrieves an :term:`asynchronous iterator` of the users that are banned from the guild as a :class:`BanEntry`.\"\nmsgstr \"ギルドからBANされたユーザの :term:`asynchronous iterator` を :class:`BanEntry` として取得します。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.bans:5\nmsgid \"Due to a breaking change in Discord's API, this now returns a paginated iterator instead of a list.\"\nmsgstr \"DiscordのAPIの変更により、リストの代わりにページ化されたイテレータが返されるようになりました。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.bans:22\nmsgid \"The number of bans to retrieve. If ``None``, it retrieves every ban in the guild. Note, however, that this would make it a slow operation. Defaults to ``1000``.\"\nmsgstr \"取得するBANの数。 ``None`` の場合、BotがアクセスできるBANすべてを取得します。ただし、これには時間が掛かることに注意してください。デフォルトは ``1000`` です。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.bans:26\nmsgid \"Retrieves bans before this user.\"\nmsgstr \"このユーザ以前のBANを取得します。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.bans:28\nmsgid \"Retrieve bans after this user.\"\nmsgstr \"このユーザ以降のBANを取得します。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.bans:35\nmsgid \":class:`BanEntry` -- The ban entry of the banned user.\"\nmsgstr \":class:`BanEntry` -- BANされたユーザーのBANエントリー。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.prune_members:3\nmsgid \"Prunes the guild from its inactive members.\"\nmsgstr \"ギルドからアクティブでないメンバーをキックします。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.prune_members:5\nmsgid \"The inactive members are denoted if they have not logged on in ``days`` number of days and they have no roles.\"\nmsgstr \"``days`` 日間ログインせずロールを持たないメンバーが非アクティブとされます。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.prune_members:8\nmsgid \"You must have both :attr:`~Permissions.kick_members` and :attr:`~Permissions.manage_guild` to do this.\"\nmsgstr \"\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.prune_members:10\nmsgid \"To check how many members you would prune without actually pruning, see the :meth:`estimate_pruned_members` function.\"\nmsgstr \"実際にキックせずにキックされるメンバー数を確認するには :meth:`estimate_pruned_members` 関数を確認してください。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.prune_members:13\nmsgid \"To prune members that have specific roles see the ``roles`` parameter.\"\nmsgstr \"特定のロールを持つメンバーもキックするには、 ``roles`` パラメータを参照してください。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.prune_members:15\nmsgid \"The ``roles`` keyword-only parameter was added.\"\nmsgstr \"``roles`` キーワード引数が追加されました。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.prune_members:22\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.estimate_pruned_members:14\nmsgid \"The number of days before counting as inactive.\"\nmsgstr \"非アクティブとしてカウントするまでの日数。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.prune_members:26\nmsgid \"Whether to compute the prune count. This defaults to ``True`` which makes it prone to timeouts in very large guilds. In order to prevent timeouts, you must set this to ``False``. If this is set to ``False``\\\\, then this function will always return ``None``.\"\nmsgstr \"キックされるユーザー数を計算するか。これはデフォルトが ``True`` なので、非常に大きいギルドではタイムアウトが発生する場合があります。これを防ぐには、 ``False`` に設定してください。これが ``False`` の場合この関数は常に ``None`` を返します。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.prune_members:31\nmsgid \"A list of :class:`abc.Snowflake` that represent roles to include in the pruning process. If a member has a role that is not specified, they'll be excluded.\"\nmsgstr \"キックすべきロールである :class:`abc.Snowflake` のリスト。このリストに含まれないロールに属するメンバーは除外されます。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.prune_members:35\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.estimate_pruned_members:22\nmsgid \"You do not have permissions to prune members.\"\nmsgstr \"メンバーをキックする権限がない場合。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.prune_members:36\nmsgid \"An error occurred while pruning members.\"\nmsgstr \"メンバーのキック中にエラーが発生した場合。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.prune_members:37\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.estimate_pruned_members:24\nmsgid \"An integer was not passed for ``days``.\"\nmsgstr \"``days`` が整数でない場合。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.prune_members:39\nmsgid \"The number of members pruned. If ``compute_prune_count`` is ``False`` then this returns ``None``.\"\nmsgstr \"キックされたメンバー数。もし ``compute_prune_count`` が ``False`` の場合これは ``None`` を返します。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.templates:3\nmsgid \"Gets the list of templates from this guild.\"\nmsgstr \"ギルド内のテンプレートのリストを取得します。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.templates:5\nmsgid \"You must have :attr:`~.Permissions.manage_guild` to do this.\"\nmsgstr \"これを行うには、 :attr:`~.Permissions.manage_guild` が必要です。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.templates:9\nmsgid \"You don't have permissions to get the templates.\"\nmsgstr \"テンプレートを取得する権限がない場合。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.templates:11\nmsgid \"The templates for this guild.\"\nmsgstr \"ギルド内のテンプレート。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.templates:12\nmsgid \"List[:class:`Template`]\"\nmsgstr \"List[:class:`Template`]\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.webhooks:3\nmsgid \"Gets the list of webhooks from this guild.\"\nmsgstr \"ギルド内のWebhookのリストを取得します。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.webhooks:5\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.webhooks:5\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.create_webhook:5\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.webhooks:5\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.create_webhook:5\nmsgid \"You must have :attr:`~.Permissions.manage_webhooks` to do this.\"\nmsgstr \"これを行うには、 :attr:`~.Permissions.manage_webhooks` が必要です。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.webhooks:7\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.webhooks:7\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.webhooks:7\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.webhooks:9\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.webhooks:9\nmsgid \"You don't have permissions to get the webhooks.\"\nmsgstr \"Webhookを取得する権限がない場合。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.webhooks:9\nmsgid \"The webhooks for this guild.\"\nmsgstr \"ギルド内のWebhook。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.webhooks:10\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.webhooks:10\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.webhooks:10\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.webhooks:12\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.webhooks:12\nmsgid \"List[:class:`Webhook`]\"\nmsgstr \"List[:class:`Webhook`]\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.estimate_pruned_members:3\nmsgid \"Similar to :meth:`prune_members` except instead of actually pruning members, it returns how many members it would prune from the guild had it been called.\"\nmsgstr \":meth:`prune_members` と似ていますが、実際にキックせず、何人キックされるであろうかを返します。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.estimate_pruned_members:7\nmsgid \"The returned value can be ``None``.\"\nmsgstr \"返される値は ``None`` になることがあります。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.estimate_pruned_members:16\nmsgid \"A list of :class:`abc.Snowflake` that represent roles to include in the estimate. If a member has a role that is not specified, they'll be excluded.\"\nmsgstr \"算入すべきロールである :class:`abc.Snowflake` のリスト。このリストに含まれないロールに属するメンバーは除外されます。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.estimate_pruned_members:23\nmsgid \"An error occurred while fetching the prune members estimate.\"\nmsgstr \"メンバー数の概算を取得中にエラーが発生した場合。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.estimate_pruned_members:26\nmsgid \"The number of members estimated to be pruned.\"\nmsgstr \"キックされると推定されるメンバーの数。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.invites:3\nmsgid \"Returns a list of all active instant invites from the guild.\"\nmsgstr \"このギルドの全てのアクティブなインスタント招待のリストを返します。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.invites:5\nmsgid \"You must have :attr:`~Permissions.manage_guild` to get this information.\"\nmsgstr \"この情報を取得するためには、:attr:`~Permissions.manage_guild` が必要です。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.invites:11\nmsgid \"List[:class:`Invite`]\"\nmsgstr \"List[:class:`Invite`]\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_template:3\nmsgid \"Creates a template for the guild.\"\nmsgstr \"サーバーのテンプレートを作成します。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_template:5\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_integration:5\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.integrations:5\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.edit_widget:5\n#: ../../../discord/integrations.py:docstring of discord.integrations.Integration.delete:5\nmsgid \"You must have :attr:`~Permissions.manage_guild` to do this.\"\nmsgstr \"これを行うには、 :attr:`~Permissions.manage_guild` が必要です。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_template:9\n#: ../../../discord/template.py:docstring of discord.template.Template:19\nmsgid \"The name of the template.\"\nmsgstr \"テンプレートの名前。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_template:11\n#: ../../../discord/template.py:docstring of discord.template.Template:25\nmsgid \"The description of the template.\"\nmsgstr \"テンプレートの説明。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_integration:3\nmsgid \"Attaches an integration to the guild.\"\nmsgstr \"ギルドに連携サービスを付属させます。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_integration:9\nmsgid \"The integration type (e.g. Twitch).\"\nmsgstr \"連携サービスタイプ （例： Twitch）。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_integration:11\n#: ../../../discord/integrations.py:docstring of discord.integrations.Integration:7\n#: ../../../discord/integrations.py:docstring of discord.integrations.BotIntegration:7\n#: ../../../discord/integrations.py:docstring of discord.integrations.StreamIntegration:7\n#: ../../../discord/integrations.py:docstring of discord.integrations.PartialIntegration:7\nmsgid \"The integration ID.\"\nmsgstr \"連携サービスID。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_integration:14\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.integrations:9\nmsgid \"You do not have permission to create the integration.\"\nmsgstr \"連携サービスを作成する権限がない場合。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_integration:15\nmsgid \"The account could not be found.\"\nmsgstr \"アカウントが見つからなかった場合。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.integrations:3\nmsgid \"Returns a list of all integrations attached to the guild.\"\nmsgstr \"サーバーに追加されたすべての連携サービスのリストを返します。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.integrations:10\nmsgid \"Fetching the integrations failed.\"\nmsgstr \"連携サービスの取得に失敗した場合。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.integrations:12\nmsgid \"The list of integrations that are attached to the guild.\"\nmsgstr \"サーバーの連携サービスのリスト。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.integrations:13\nmsgid \"List[:class:`Integration`]\"\nmsgstr \"List[:class:`Integration`]\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.fetch_stickers:3\nmsgid \"Retrieves a list of all :class:`Sticker`\\\\s for the guild.\"\nmsgstr \"ギルドの :class:`Sticker` のリストを取得します。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.fetch_stickers:9\nmsgid \"This method is an API call. For general usage, consider :attr:`stickers` instead.\"\nmsgstr \"このメソッドはAPIを呼び出します。通常は :attr:`stickers` を代わりとして使用してください。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.fetch_stickers:11\nmsgid \"An error occurred fetching the stickers.\"\nmsgstr \"スタンプの取得中にエラーが発生した場合。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.fetch_stickers:13\nmsgid \"The retrieved stickers.\"\nmsgstr \"取得したスタンプ。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.fetch_stickers:14\nmsgid \"List[:class:`GuildSticker`]\"\nmsgstr \"List[:class:`GuildSticker`]\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.fetch_sticker:3\nmsgid \"Retrieves a custom :class:`Sticker` from the guild.\"\nmsgstr \"ギルドのカスタム :class:`Sticker` を取得します。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.fetch_sticker:9\nmsgid \"This method is an API call. For general usage, consider iterating over :attr:`stickers` instead.\"\nmsgstr \"このメソッドはAPIを呼び出します。通常は :attr:`stickers` をイテレートして使用してください。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.fetch_sticker:12\nmsgid \"The sticker's ID.\"\nmsgstr \"スタンプのID。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.fetch_sticker:15\nmsgid \"The sticker requested could not be found.\"\nmsgstr \"要求されたスタンプが見つからなかった場合。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.fetch_sticker:16\nmsgid \"An error occurred fetching the sticker.\"\nmsgstr \"スタンプの取得中にエラーが発生した場合。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.fetch_sticker:18\n#: ../../../discord/sticker.py:docstring of discord.sticker.StickerItem.fetch:7\nmsgid \"The retrieved sticker.\"\nmsgstr \"取得したスタンプ。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.fetch_sticker:19\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_sticker:24\n#: ../../../discord/sticker.py:docstring of discord.sticker.GuildSticker.edit:18\n#: ../../docstring of discord.Intents.emojis_and_stickers:13\nmsgid \":class:`GuildSticker`\"\nmsgstr \":class:`GuildSticker`\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_sticker:3\nmsgid \"Creates a :class:`Sticker` for the guild.\"\nmsgstr \"ギルドに :class:`Sticker` を作成します。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_sticker:5\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.delete_sticker:5\n#: ../../../discord/sticker.py:docstring of discord.sticker.GuildSticker.delete:5\nmsgid \"You must have :attr:`~Permissions.manage_emojis_and_stickers` to do this.\"\nmsgstr \"これを行うには、 :attr:`~Permissions.manage_emojis_and_stickers` が必要です。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_sticker:9\nmsgid \"The sticker name. Must be at least 2 characters.\"\nmsgstr \"スタンプ名。2文字以上でなければなりません。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_sticker:11\nmsgid \"The sticker's description.\"\nmsgstr \"スタンプの説明。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_sticker:13\n#: ../../../discord/sticker.py:docstring of discord.sticker.GuildSticker.edit:9\nmsgid \"The name of a unicode emoji that represents the sticker's expression.\"\nmsgstr \"スタンプの表現を示すユニコード絵文字の名前。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_sticker:15\nmsgid \"The file of the sticker to upload.\"\nmsgstr \"アップロードするスタンプのファイル。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_sticker:17\nmsgid \"The reason for creating this sticker. Shows up on the audit log.\"\nmsgstr \"スタンプを作成する理由。監査ログに表示されます。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_sticker:20\nmsgid \"You are not allowed to create stickers.\"\nmsgstr \"スタンプを作成する権限がない場合。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_sticker:21\nmsgid \"An error occurred creating a sticker.\"\nmsgstr \"スタンプ作成中にエラーが発生した場合。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_sticker:23\nmsgid \"The created sticker.\"\nmsgstr \"作成したスタンプ。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.delete_sticker:3\n#: ../../../discord/sticker.py:docstring of discord.sticker.GuildSticker.delete:3\nmsgid \"Deletes the custom :class:`Sticker` from the guild.\"\nmsgstr \"ギルドのカスタム :class:`Sticker` を削除します。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.delete_sticker:9\nmsgid \"The sticker you are deleting.\"\nmsgstr \"削除するスタンプ。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.delete_sticker:11\n#: ../../../discord/sticker.py:docstring of discord.sticker.GuildSticker.delete:7\nmsgid \"The reason for deleting this sticker. Shows up on the audit log.\"\nmsgstr \"スタンプを削除する理由。監査ログに表示されます。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.delete_sticker:14\n#: ../../../discord/sticker.py:docstring of discord.sticker.GuildSticker.delete:10\nmsgid \"You are not allowed to delete stickers.\"\nmsgstr \"スタンプを削除する権限がない場合。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.delete_sticker:15\n#: ../../../discord/sticker.py:docstring of discord.sticker.GuildSticker.delete:11\nmsgid \"An error occurred deleting the sticker.\"\nmsgstr \"スタンプの削除中にエラーが発生した場合。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.fetch_scheduled_events:3\nmsgid \"Retrieves a list of all scheduled events for the guild.\"\nmsgstr \"ギルドのスケジュールイベントのリストを取得します。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.fetch_scheduled_events:7\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.fetch_scheduled_event:9\nmsgid \"Whether to include the number of users that are subscribed to the event. Defaults to ``True``.\"\nmsgstr \"イベントに購読しているユーザー数を含めるかどうか。デフォルトは ``True`` です。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.fetch_scheduled_events:11\nmsgid \"Retrieving the scheduled events failed.\"\nmsgstr \"スケジュールイベントの取得に失敗した場合。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.fetch_scheduled_events:13\nmsgid \"The scheduled events.\"\nmsgstr \"スケジュールイベント。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.fetch_scheduled_events:14\n#: ../../../discord/channel.py:docstring of discord.VoiceChannel.scheduled_events:5\n#: ../../../discord/channel.py:docstring of discord.StageChannel.scheduled_events:5\nmsgid \"List[:class:`ScheduledEvent`]\"\nmsgstr \"List[:class:`ScheduledEvent`]\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.fetch_scheduled_event:3\nmsgid \"Retrieves a scheduled event from the guild.\"\nmsgstr \"ギルドのスケジュールイベントを取得します。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.fetch_scheduled_event:7\nmsgid \"The scheduled event ID.\"\nmsgstr \"スケジュールイベントID。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.fetch_scheduled_event:13\nmsgid \"The scheduled event was not found.\"\nmsgstr \"スケジュールイベントが見つからなかった場合。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.fetch_scheduled_event:14\nmsgid \"Retrieving the scheduled event failed.\"\nmsgstr \"スケジュールイベントの取得に失敗した場合。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.fetch_scheduled_event:16\nmsgid \"The scheduled event.\"\nmsgstr \"スケジュールイベント。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.fetch_scheduled_event:17\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_scheduled_event:51\n#: ../../../discord/scheduled_event.py:docstring of discord.scheduled_event.ScheduledEvent.start:19\n#: ../../../discord/scheduled_event.py:docstring of discord.scheduled_event.ScheduledEvent.end:19\n#: ../../../discord/scheduled_event.py:docstring of discord.scheduled_event.ScheduledEvent.cancel:19\nmsgid \":class:`ScheduledEvent`\"\nmsgstr \":class:`ScheduledEvent`\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_scheduled_event:3\nmsgid \"Creates a scheduled event for the guild.\"\nmsgstr \"ギルドのスケジュールイベントを作成します。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_scheduled_event:5\n#: ../../../discord/scheduled_event.py:docstring of discord.scheduled_event.ScheduledEvent.edit:5\n#: ../../../discord/scheduled_event.py:docstring of discord.scheduled_event.ScheduledEvent.delete:5\nmsgid \"You must have :attr:`~Permissions.manage_events` to do this.\"\nmsgstr \"これを行うには、 :attr:`~Permissions.manage_events` が必要です。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_scheduled_event:9\n#: ../../../discord/scheduled_event.py:docstring of discord.scheduled_event.ScheduledEvent:27\n#: ../../../discord/scheduled_event.py:docstring of discord.scheduled_event.ScheduledEvent.edit:7\nmsgid \"The name of the scheduled event.\"\nmsgstr \"スケジュールイベントの名前。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_scheduled_event:11\n#: ../../../discord/scheduled_event.py:docstring of discord.scheduled_event.ScheduledEvent:33\n#: ../../../discord/scheduled_event.py:docstring of discord.scheduled_event.ScheduledEvent.edit:9\nmsgid \"The description of the scheduled event.\"\nmsgstr \"スケジュールイベントの説明。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_scheduled_event:13\nmsgid \"The channel to send the scheduled event to. If the channel is a :class:`StageInstance` or :class:`VoiceChannel` then it automatically sets the entity type.  Required if ``entity_type`` is either :attr:`EntityType.voice` or :attr:`EntityType.stage_instance`.\"\nmsgstr \"スケジュールイベントの送信先チャンネル。もしチャンネルが :class:`StageInstance` または :class:`VoiceChannel` ならば、開催場所の種類が自動で設定されます。 ``entity_type`` が :attr:`EntityType.voice` または :attr:`EntityType.stage_instance` の場合必須です。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_scheduled_event:13\nmsgid \"The channel to send the scheduled event to. If the channel is a :class:`StageInstance` or :class:`VoiceChannel` then it automatically sets the entity type.\"\nmsgstr \"スケジュールイベントの送信先チャンネル。もしチャンネルが :class:`StageInstance` または :class:`VoiceChannel` ならば、開催場所の種類が自動で設定されます。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_scheduled_event:17\nmsgid \"Required if ``entity_type`` is either :attr:`EntityType.voice` or :attr:`EntityType.stage_instance`.\"\nmsgstr \"``entity_type`` が :attr:`EntityType.voice` か :attr:`EntityType.stage_instance` の場合必須です。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_scheduled_event:20\nmsgid \"The scheduled start time of the scheduled event. This must be a timezone-aware datetime object. Consider using :func:`utils.utcnow`.\"\nmsgstr \"スケジュールイベントの開始予定時刻。これはtimezone awareなdatetimeオブジェクトでないといけません。 :func:`utils.utcnow` を使用してみてください。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_scheduled_event:23\nmsgid \"The scheduled end time of the scheduled event. This must be a timezone-aware datetime object. Consider using :func:`utils.utcnow`.  Required if the entity type is :attr:`EntityType.external`.\"\nmsgstr \"スケジュールイベントの終了予定時刻。これはtimezone awareなdatetimeオブジェクトでないといけません。 :func:`utils.utcnow` を使用してみてください。 :attr:`EntityType.external` の場合必須です。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_scheduled_event:23\nmsgid \"The scheduled end time of the scheduled event. This must be a timezone-aware datetime object. Consider using :func:`utils.utcnow`.\"\nmsgstr \"スケジュールイベントの終了予定時刻。これはtimezone awareなdatetimeオブジェクトでないといけません。 :func:`utils.utcnow` を使用してみてください。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_scheduled_event:26\n#: ../../../discord/scheduled_event.py:docstring of discord.scheduled_event.ScheduledEvent.edit:28\n#: ../../../discord/scheduled_event.py:docstring of discord.scheduled_event.ScheduledEvent.edit:42\nmsgid \"Required if the entity type is :attr:`EntityType.external`.\"\nmsgstr \":attr:`EntityType.external` の場合必須です。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_scheduled_event:28\n#: ../../../discord/scheduled_event.py:docstring of discord.scheduled_event.ScheduledEvent:63\n#: ../../../discord/scheduled_event.py:docstring of discord.scheduled_event.ScheduledEvent.edit:30\nmsgid \"The privacy level of the scheduled event.\"\nmsgstr \"スケジュールイベントのプライバシーレベル。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_scheduled_event:30\nmsgid \"The entity type of the scheduled event. If the channel is a :class:`StageInstance` or :class:`VoiceChannel` then this is automatically set to the appropriate entity type. If no channel is passed then the entity type is assumed to be :attr:`EntityType.external`\"\nmsgstr \"スケジュールイベントの開催場所の種類。もしチャンネルが :class:`StageInstance` または :class:`VoiceChannel` の場合これは適切な種類に自動で設定されます。もしチャンネルが渡されなかった場合は :attr:`EntityType.external` とみなされます。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_scheduled_event:36\nmsgid \"The image of the scheduled event.\"\nmsgstr \"スケジュールイベントの画像。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_scheduled_event:38\nmsgid \"The location of the scheduled event.  Required if the ``entity_type`` is :attr:`EntityType.external`.\"\nmsgstr \"スケジュールイベントの場所。 ``entity_type`` が :attr:`EntityType.external` の場合必須です。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_scheduled_event:38\n#: ../../../discord/scheduled_event.py:docstring of discord.scheduled_event.ScheduledEvent:95\nmsgid \"The location of the scheduled event.\"\nmsgstr \"スケジュールイベントの場所。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_scheduled_event:40\nmsgid \"Required if the ``entity_type`` is :attr:`EntityType.external`.\"\nmsgstr \"``entity_type`` が :attr:`EntityType.external` の場合必須です。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_scheduled_event:42\nmsgid \"The reason for creating this scheduled event. Shows up on the audit log.\"\nmsgstr \"スケジュールイベントを作成する理由。監査ログに表示されます。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_scheduled_event:45\nmsgid \"``image`` was not a :term:`py:bytes-like object`, or ``privacy_level``     was not a :class:`PrivacyLevel`, or ``entity_type`` was not an     :class:`EntityType`, ``status`` was not an :class:`EventStatus`,     or an argument was provided that was incompatible with the provided     ``entity_type``.\"\nmsgstr \"``image`` が :term:`py:bytes-like object` でない場合、 ``privacy_level`` が :class:`PrivacyLevel` でない場合、 ``entity_type`` が :class:`EntityType` でない場合、 ``status`` が :class:`EventStatus` でない場合、または引数が渡された ``entity_type`` と互換性のない場合。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_scheduled_event:46\n#: ../../../discord/scheduled_event.py:docstring of discord.scheduled_event.ScheduledEvent.edit:48\nmsgid \"``start_time`` or ``end_time`` was not a timezone-aware datetime object.\"\nmsgstr \"``start_time`` や ``end_time`` がtimezone awareなdatetimeオブジェクトでない場合。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_scheduled_event:47\nmsgid \"You are not allowed to create scheduled events.\"\nmsgstr \"スケジュールイベントを作成する権限がない場合。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_scheduled_event:48\nmsgid \"Creating the scheduled event failed.\"\nmsgstr \"スケジュールイベントの作成に失敗した場合。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_scheduled_event:50\nmsgid \"The created scheduled event.\"\nmsgstr \"作成されたスケジュールイベント。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.fetch_emojis:3\nmsgid \"Retrieves all custom :class:`Emoji`\\\\s from the guild.\"\nmsgstr \"ギルドのカスタム :class:`Emoji` をすべて取得します。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.fetch_emojis:7\nmsgid \"This method is an API call. For general usage, consider :attr:`emojis` instead.\"\nmsgstr \"これはAPIを呼び出します。通常は :attr:`emojis` を代わりに使用してください。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.fetch_emojis:9\nmsgid \"An error occurred fetching the emojis.\"\nmsgstr \"絵文字の取得中にエラーが発生した場合。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.fetch_emojis:11\nmsgid \"The retrieved emojis.\"\nmsgstr \"取得した絵文字。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.fetch_emojis:12\nmsgid \"List[:class:`Emoji`]\"\nmsgstr \"List[:class:`Emoji`]\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.fetch_emoji:3\nmsgid \"Retrieves a custom :class:`Emoji` from the guild.\"\nmsgstr \"ギルドのカスタム :class:`Emoji` を取得します。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.fetch_emoji:7\nmsgid \"This method is an API call. For general usage, consider iterating over :attr:`emojis` instead.\"\nmsgstr \"このメソッドはAPIを呼び出します。通常は :attr:`emojis` をイテレートして使用してください。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.fetch_emoji:12\nmsgid \"``emoji_id`` parameter is now positional-only.\"\nmsgstr \"``emoji_id`` 引数は位置限定引数になりました。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.fetch_emoji:14\n#: ../../../discord/emoji.py:docstring of discord.emoji.Emoji:37\nmsgid \"The emoji's ID.\"\nmsgstr \"絵文字のID。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.fetch_emoji:17\nmsgid \"The emoji requested could not be found.\"\nmsgstr \"絵文字が見つからなかった場合。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.fetch_emoji:18\nmsgid \"An error occurred fetching the emoji.\"\nmsgstr \"絵文字の取得中にエラーが発生した場合。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.fetch_emoji:20\nmsgid \"The retrieved emoji.\"\nmsgstr \"取得した絵文字。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.fetch_emoji:21\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_custom_emoji:24\n#: ../../../discord/emoji.py:docstring of discord.emoji.Emoji.edit:21\n#: ../../docstring of discord.Intents.emojis_and_stickers:12\nmsgid \":class:`Emoji`\"\nmsgstr \":class:`Emoji`\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_custom_emoji:3\nmsgid \"Creates a custom :class:`Emoji` for the guild.\"\nmsgstr \"カスタム :class:`Emoji` をギルド内に作成します。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_custom_emoji:5\nmsgid \"There is currently a limit of 50 static and animated emojis respectively per guild, unless the guild has the ``MORE_EMOJI`` feature which extends the limit to 200.\"\nmsgstr \"現在ギルドには静的絵文字・アニメーション付き絵文字それぞれ50個ごとの制限があります。ただし、 ``MORE_EMOJI`` 機能が有効化されたギルドでは、これは200個になります。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_custom_emoji:8\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.delete_emoji:5\n#: ../../../discord/emoji.py:docstring of discord.emoji.Emoji.delete:5\n#: ../../../discord/emoji.py:docstring of discord.emoji.Emoji.edit:5\nmsgid \"You must have :attr:`~Permissions.manage_emojis` to do this.\"\nmsgstr \"これを行うには、 :attr:`~Permissions.manage_emojis` が必要です。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_custom_emoji:10\nmsgid \"The emoji name. Must be at least 2 characters.\"\nmsgstr \"絵文字名。2文字以上でなければなりません。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_custom_emoji:12\nmsgid \"The :term:`py:bytes-like object` representing the image data to use. Only JPG, PNG and GIF images are supported.\"\nmsgstr \"使用する画像データを表す :term:`py:bytes-like object` 。JPG、PNG、GIF 画像のみがサポートされています。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_custom_emoji:15\nmsgid \"A :class:`list` of :class:`Role`\\\\s that can use this emoji. Leave empty to make it available to everyone.\"\nmsgstr \"この絵文字を使用できる :class:`Role` の :class:`list` 。空のリストを渡すと、誰でも使えるようになります。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_custom_emoji:17\nmsgid \"The reason for creating this emoji. Shows up on the audit log.\"\nmsgstr \"絵文字を作成する理由。監査ログに表示されます。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_custom_emoji:20\nmsgid \"You are not allowed to create emojis.\"\nmsgstr \"絵文字を作成する権限がない場合。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_custom_emoji:21\nmsgid \"An error occurred creating an emoji.\"\nmsgstr \"絵文字の作成中にエラーが発生した場合。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_custom_emoji:23\nmsgid \"The created emoji.\"\nmsgstr \"作成された絵文字。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.delete_emoji:3\nmsgid \"Deletes the custom :class:`Emoji` from the guild.\"\nmsgstr \"ギルドのカスタム :class:`Emoji` を削除します。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.delete_emoji:11\nmsgid \"The emoji you are deleting.\"\nmsgstr \"削除する絵文字。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.delete_emoji:13\n#: ../../../discord/emoji.py:docstring of discord.emoji.Emoji.delete:7\nmsgid \"The reason for deleting this emoji. Shows up on the audit log.\"\nmsgstr \"絵文字を削除する理由。監査ログに表示されます。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.delete_emoji:16\n#: ../../../discord/emoji.py:docstring of discord.emoji.Emoji.delete:10\nmsgid \"You are not allowed to delete emojis.\"\nmsgstr \"絵文字を削除する権限がない場合。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.delete_emoji:17\n#: ../../../discord/emoji.py:docstring of discord.emoji.Emoji.delete:11\nmsgid \"An error occurred deleting the emoji.\"\nmsgstr \"絵文字の削除中にエラーが発生した場合。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.fetch_roles:3\nmsgid \"Retrieves all :class:`Role` that the guild has.\"\nmsgstr \"ギルドの :class:`Role` をすべて取得します。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.fetch_roles:7\nmsgid \"This method is an API call. For general usage, consider :attr:`roles` instead.\"\nmsgstr \"これはAPIを呼び出します。通常は :attr:`roles` を代わりに使用してください。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.fetch_roles:11\nmsgid \"Retrieving the roles failed.\"\nmsgstr \"ロールの取得に失敗した場合。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.fetch_roles:13\nmsgid \"All roles in the guild.\"\nmsgstr \"サーバー内の全てのロール。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_role:3\nmsgid \"Creates a :class:`Role` for the guild.\"\nmsgstr \"サーバーに :class:`Role` を作成します。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_role:5\n#: ../../../discord/role.py:docstring of discord.role.Role.edit:7\nmsgid \"All fields are optional.\"\nmsgstr \"すべてのフィールドはオプションです。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_role:7\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.edit_role_positions:5\n#: ../../../discord/role.py:docstring of discord.role.Role.edit:5\n#: ../../../discord/role.py:docstring of discord.role.Role.delete:5\nmsgid \"You must have :attr:`~Permissions.manage_roles` to do this.\"\nmsgstr \"これを行うには、 :attr:`~Permissions.manage_roles` が必要です。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_role:9\n#: ../../../discord/role.py:docstring of discord.role.Role.edit:9\nmsgid \"Can now pass ``int`` to ``colour`` keyword-only parameter.\"\nmsgstr \"``int`` を ``colour`` キーワード引数に渡せるようになりました。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_role:12\n#: ../../../discord/role.py:docstring of discord.role.Role.edit:15\nmsgid \"The ``display_icon`` keyword-only parameter was added.\"\nmsgstr \"``display_icon`` キーワード引数が追加されました。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_role:19\nmsgid \"The role name. Defaults to 'new role'.\"\nmsgstr \"ロール名。デフォルトは 'new role' です。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_role:21\nmsgid \"The permissions to have. Defaults to no permissions.\"\nmsgstr \"持っている権限。デフォルトは権限がありません。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_role:23\nmsgid \"The colour for the role. Defaults to :meth:`Colour.default`. This is aliased to ``color`` as well.\"\nmsgstr \"ロールの色。デフォルトは :meth:`Colour.default` です。 ``color`` というエイリアスが存在します。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_role:26\nmsgid \"Indicates if the role should be shown separately in the member list. Defaults to ``False``.\"\nmsgstr \"メンバーリストにロールを他と分けて表示するかどうかを示します。デフォルトは ``False`` です。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_role:29\nmsgid \"A :term:`py:bytes-like object` representing the icon or :class:`str` representing unicode emoji that should be used as a role icon. Only PNG/JPEG is supported. This is only available to guilds that contain ``ROLE_ICONS`` in :attr:`features`.\"\nmsgstr \"ロールのアイコンを表す :term:`py:bytes-like object` か、ロールのアイコンとして使用すべきユニコード絵文字である :class:`str` 。PNGとJPEGのみサポートされています。これは :attr:`features` に ``ROLE_ICONS`` を含むギルドでのみ利用できます。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_role:34\nmsgid \"Indicates if the role should be mentionable by others. Defaults to ``False``.\"\nmsgstr \"ロールをメンションできるかどうか。デフォルトは ``False`` です。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_role:37\nmsgid \"The reason for creating this role. Shows up on the audit log.\"\nmsgstr \"ロールを作成する理由。監査ログに表示されます。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_role:40\nmsgid \"You do not have permissions to create the role.\"\nmsgstr \"ロールを作成する権限がない場合。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_role:41\nmsgid \"Creating the role failed.\"\nmsgstr \"ロールの作成に失敗した場合。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_role:42\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.edit_role_positions:32\nmsgid \"An invalid keyword argument was given.\"\nmsgstr \"不正なキーワード引数を受け取った場合。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_role:44\nmsgid \"The newly created role.\"\nmsgstr \"新しく作成されたロール。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.edit_role_positions:3\nmsgid \"Bulk edits a list of :class:`Role` in the guild.\"\nmsgstr \"サーバーの :class:`Role` のリストを一括編集します。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.edit_role_positions:25\nmsgid \"A :class:`dict` of :class:`Role` to :class:`int` to change the positions of each given role.\"\nmsgstr \"与えられたロールの位置を変更するための、 :class:`Role` をキーとし :class:`int` を値とする :class:`dict` 。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.edit_role_positions:27\nmsgid \"The reason for editing the role positions. Shows up on the audit log.\"\nmsgstr \"ロールの位置を編集する理由。監査ログに表示されます。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.edit_role_positions:30\nmsgid \"You do not have permissions to move the roles.\"\nmsgstr \"ロールを移動する権限がない場合。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.edit_role_positions:31\nmsgid \"Moving the roles failed.\"\nmsgstr \"ロールの移動に失敗した場合。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.edit_role_positions:34\nmsgid \"A list of all the roles in the guild.\"\nmsgstr \"サーバー内のすべてのロールのリスト。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.welcome_screen:3\nmsgid \"Returns the guild's welcome screen.\"\nmsgstr \"ギルドのようこそ画面を返します。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.welcome_screen:5\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.edit_welcome_screen:6\nmsgid \"The guild must have ``COMMUNITY`` in :attr:`~Guild.features`.\"\nmsgstr \":attr:`~Guild.features` に ``COMMUNITY`` が含まれている必要があります。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.welcome_screen:7\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.vanity_invite:7\nmsgid \"You must have :attr:`~Permissions.manage_guild` to do this.as well.\"\nmsgstr \"これを行うには、 :attr:`~Permissions.manage_guild` も必要です。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.welcome_screen:11\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.vanity_invite:9\nmsgid \"You do not have the proper permissions to get this.\"\nmsgstr \"取得するのに適切な権限がない場合。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.welcome_screen:12\nmsgid \"Retrieving the welcome screen failed.\"\nmsgstr \"ようこそ画面の取得に失敗した場合。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.welcome_screen:14\nmsgid \"The welcome screen.\"\nmsgstr \"ようこそ画面。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.welcome_screen:15\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.edit_welcome_screen:13\nmsgid \":class:`WelcomeScreen`\"\nmsgstr \":class:`WelcomeScreen`\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.edit_welcome_screen:3\nmsgid \"A shorthand method of :attr:`WelcomeScreen.edit` without needing to fetch the welcome screen beforehand.\"\nmsgstr \"ようこそ画面を事前に取得せずに :attr:`WelcomeScreen.edit` を呼び出すことのできるメソッド。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.edit_welcome_screen:8\nmsgid \"You must have :attr:`~Permissions.manage_guild` to do this as well.\"\nmsgstr \"\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.edit_welcome_screen:12\nmsgid \"The edited welcome screen.\"\nmsgstr \"編集した後のようこそ画面。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.kick:3\nmsgid \"Kicks a user from the guild.\"\nmsgstr \"サーバーからユーザーをキックします。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.kick:5\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.ban:5\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.unban:5\nmsgid \"The user must meet the :class:`abc.Snowflake` abc.\"\nmsgstr \"ユーザーは :class:`abc.Snowflake` 抽象基底クラスのサブクラスである必要があります。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.kick:7\nmsgid \"You must have :attr:`~Permissions.kick_members` to do this.\"\nmsgstr \"これを行うには、 :attr:`~Permissions.kick_members` が必要です。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.kick:9\nmsgid \"The user to kick from their guild.\"\nmsgstr \"ギルドからキックするユーザー。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.kick:11\nmsgid \"The reason the user got kicked.\"\nmsgstr \"ユーザーをキックする理由。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.kick:14\nmsgid \"You do not have the proper permissions to kick.\"\nmsgstr \"キックするのに適切な権限がない場合。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.kick:15\nmsgid \"Kicking failed.\"\nmsgstr \"キックに失敗した場合。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.ban:3\nmsgid \"Bans a user from the guild.\"\nmsgstr \"ギルドからユーザーをBANします。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.ban:7\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.unban:7\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.bulk_ban:7\nmsgid \"You must have :attr:`~Permissions.ban_members` to do this.\"\nmsgstr \"これを行うには、 :attr:`~Permissions.ban_members` が必要です。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.ban:9\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.bulk_ban:11\nmsgid \"The user to ban from their guild.\"\nmsgstr \"ギルドからBANするユーザー。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.ban:11\nmsgid \"The number of days worth of messages to delete from the user in the guild. The minimum is 0 and the maximum is 7. Defaults to 1 day if neither ``delete_message_days`` nor ``delete_message_seconds`` are passed.\"\nmsgstr \"このユーザーの何日分のメッセージをギルドから削除するか。最小は 0日 で、最大は 7日 です。 ``delete_message_days`` と ``delete_message_seconds`` のどちらも渡されない場合、デフォルトは 1 日に指定されます。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.ban:18\nmsgid \"The number of seconds worth of messages to delete from the user in the guild. The minimum is 0 and the maximum is 604800 (7 days). Defaults to 1 day if neither ``delete_message_days`` nor ``delete_message_seconds`` are passed.\"\nmsgstr \"このユーザーの何秒分のメッセージをギルドから削除するか。最小は 0秒 で、最大は 604800秒 (7日) です。 ``delete_message_days`` と ``delete_message_seconds`` のどちらも渡されない場合、デフォルトは 1 日に指定されます。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.ban:25\nmsgid \"The reason the user got banned.\"\nmsgstr \"ユーザーをBANする理由。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.ban:28\nmsgid \"The requested user was not found.\"\nmsgstr \"ユーザーが見つからなかった場合。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.ban:29\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.bulk_ban:20\nmsgid \"You do not have the proper permissions to ban.\"\nmsgstr \"BANするのに適切な権限がない場合。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.ban:30\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.bulk_ban:21\nmsgid \"Banning failed.\"\nmsgstr \"BANに失敗した場合。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.ban:31\nmsgid \"You specified both ``delete_message_days`` and ``delete_message_seconds``.\"\nmsgstr \"``delete_message_days`` と ``delete_message_seconds`` の両方を指定した場合。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.unban:3\nmsgid \"Unbans a user from the guild.\"\nmsgstr \"ギルドにおける、ユーザーのBANを解除します。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.unban:9\nmsgid \"The user to unban.\"\nmsgstr \"BANを解除したいユーザー。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.unban:14\nmsgid \"The requested unban was not found.\"\nmsgstr \"BAN解除対象が見つからなかった場合。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.unban:15\nmsgid \"You do not have the proper permissions to unban.\"\nmsgstr \"BANを解除するのに適切な権限がない場合。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.unban:16\nmsgid \"Unbanning failed.\"\nmsgstr \"BAN解除に失敗した場合。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.bulk_ban:3\nmsgid \"Bans multiple users from the guild.\"\nmsgstr \"\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.bulk_ban:5\nmsgid \"The users must meet the :class:`abc.Snowflake` abc.\"\nmsgstr \"\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.bulk_ban:13\nmsgid \"The number of seconds worth of messages to delete from the user in the guild. The minimum is 0 and the maximum is 604800 (7 days). Defaults to 1 day.\"\nmsgstr \"\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.bulk_ban:17\nmsgid \"The reason the users got banned.\"\nmsgstr \"\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.bulk_ban:23\nmsgid \"The result of the bulk ban operation.\"\nmsgstr \"\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.bulk_ban:24\nmsgid \":class:`BulkBanResult`\"\nmsgstr \"\"\n\n#: ../../../discord/guild.py:docstring of discord.Guild.vanity_url:1\nmsgid \"The Discord vanity invite URL for this guild, if available.\"\nmsgstr \"存在する場合、ギルドのDiscord バニティURLを返します。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.vanity_invite:3\nmsgid \"Returns the guild's special vanity invite.\"\nmsgstr \"ギルドの特別なバニティ招待を返します。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.vanity_invite:5\nmsgid \"The guild must have ``VANITY_URL`` in :attr:`~Guild.features`.\"\nmsgstr \":attr:`~Guild.features` に `VANITY_URL` が含まれている必要があります。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.vanity_invite:10\nmsgid \"Retrieving the vanity invite failed.\"\nmsgstr \"バニティ招待の取得に失敗した場合。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.vanity_invite:12\nmsgid \"The special vanity invite. If ``None`` then the guild does not have a vanity invite set.\"\nmsgstr \"特別なバニティ招待。これが ``None`` の場合ギルドにはバニティ招待がありません。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.vanity_invite:14\n#: ../../../discord/widget.py:docstring of discord.widget.Widget.fetch_invite:13\nmsgid \"Optional[:class:`Invite`]\"\nmsgstr \"Optional[:class:`Invite`]\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.audit_logs:1\nmsgid \"Returns an :term:`asynchronous iterator` that enables receiving the guild's audit logs.\"\nmsgstr \"ギルドの監査ログを取得する :term:`asynchronous iterator` を返します。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.audit_logs:3\nmsgid \"You must have :attr:`~Permissions.view_audit_log` to do this.\"\nmsgstr \"これを行うには、 :attr:`~Permissions.view_audit_log` が必要です。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.audit_logs:7\nmsgid \"Getting the first 100 entries: ::\"\nmsgstr \"最初の100項目を取得する: ::\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.audit_logs:12\nmsgid \"Getting entries for a specific action: ::\"\nmsgstr \"特定のアクションのエントリを取得する: ::\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.audit_logs:17\nmsgid \"Getting entries made by a specific user: ::\"\nmsgstr \"特定のユーザーによる項目の取得: ::\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.audit_logs:22\nmsgid \"The number of entries to retrieve. If ``None`` retrieve all entries.\"\nmsgstr \"取得する項目数。``None`` の場合すべての項目を取得します。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.audit_logs:24\nmsgid \"Retrieve entries before this date or entry. If a datetime is provided, it is recommended to use a UTC aware datetime. If the datetime is naive, it is assumed to be local time.\"\nmsgstr \"渡された日付、または項目より前の項目を取得します。日付を指定する場合、UTC aware datetimeを利用することを推奨します。naive datetimeである場合、これはローカル時間であるとみなされます。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.audit_logs:28\nmsgid \"Retrieve entries after this date or entry. If a datetime is provided, it is recommended to use a UTC aware datetime. If the datetime is naive, it is assumed to be local time.\"\nmsgstr \"渡された日付、または項目より後の項目を取得します。日付を指定する場合、UTC aware datetimeを利用することを推奨します。naive datetimeである場合、これはローカル時間であるとみなされます。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.audit_logs:32\nmsgid \"If set to ``True``, return entries in oldest->newest order. Defaults to ``True`` if ``after`` is specified, otherwise ``False``.\"\nmsgstr \"``True`` の場合、古いものから新しいものの順で項目を返します。既定値は ``after`` が指定された場合には ``True`` で、それ以外の場合は ``False`` です。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.audit_logs:35\nmsgid \"The moderator to filter entries from.\"\nmsgstr \"項目をフィルターするためのモデレーター。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.audit_logs:37\nmsgid \"The action to filter with.\"\nmsgstr \"フィルターするアクション。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.audit_logs:40\nmsgid \"You are not allowed to fetch audit logs\"\nmsgstr \"監査ログを取得する権限がない場合。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.audit_logs:41\nmsgid \"An error occurred while fetching the audit logs.\"\nmsgstr \"監査ログ取得中にエラーが発生した場合。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.audit_logs:43\nmsgid \":class:`AuditLogEntry` -- The audit log entry.\"\nmsgstr \":class:`AuditLogEntry` -- 監査ログの項目。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.widget:3\nmsgid \"Returns the widget of the guild.\"\nmsgstr \"ギルドのウィジェットを返します。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.widget:13\nmsgid \":class:`Widget`\"\nmsgstr \":class:`Widget`\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.edit_widget:3\nmsgid \"Edits the widget of the guild. This can also be done with :attr:`~Guild.edit`.\"\nmsgstr \"ギルドのウィジェットを編集します。これは :attr:`~Guild.edit` でも行えます。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.edit_widget:13\nmsgid \"The reason for editing this widget. Shows up on the audit log.\"\nmsgstr \"ウィジェットを編集する理由。監査ログに表示されます。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.edit_widget:16\nmsgid \"You do not have permission to edit the widget.\"\nmsgstr \"ウィジェットを編集する権限がない場合。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.edit_widget:17\nmsgid \"Editing the widget failed.\"\nmsgstr \"ウィジェットの編集に失敗した場合。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.chunk:3\nmsgid \"Requests all members that belong to this guild. In order to use this, :meth:`Intents.members` must be enabled.\"\nmsgstr \"このギルドに所属するすべてのメンバーをリクエストします。これを使用するには、 :meth:`Intents.members` を有効にする必要があります。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.chunk:6\nmsgid \"This is a websocket operation and can be slow.\"\nmsgstr \"これはウェブソケットを使用していて、遅くなる可能性があります。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.chunk:10\nmsgid \"Whether to cache the members as well.\"\nmsgstr \"メンバーをキャッシュするかどうか。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.chunk:15\nmsgid \"The list of members in the guild.\"\nmsgstr \"ギルドのメンバーのリスト。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.query_members:3\nmsgid \"Request members of this guild whose username or nickname starts with the given query. This is a websocket operation.\"\nmsgstr \"ユーザー名またはニックネームが指定されたクエリで始まるギルドのメンバーをリクエストします。これはWebSocket操作です。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.query_members:8\nmsgid \"The string that the username or nickname should start with.\"\nmsgstr \"ユーザー名またはニックネームの先頭の文字列。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.query_members:10\nmsgid \"The maximum number of members to send back. This must be a number between 5 and 100.\"\nmsgstr \"取得するメンバーの最大数。5から100までの数にする必要があります。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.query_members:13\nmsgid \"Whether to request for presences to be provided. This defaults to ``False``.\"\nmsgstr \"プレゼンスを取得するかどうか。デフォルトは ``False`` です。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.query_members:18\nmsgid \"Whether to cache the members internally. This makes operations such as :meth:`get_member` work for those that matched.\"\nmsgstr \"メンバーを内部でキャッシュするか。これを行うとマッチされたユーザーが :meth:`get_member` などで取得できるようになります。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.query_members:21\nmsgid \"List of user IDs to search for. If the user ID is not in the guild then it won't be returned.\"\nmsgstr \"検索するユーザーIDの一覧。ユーザーIDがギルドに属さない場合は返されません。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.query_members:26\nmsgid \"The query timed out waiting for the members.\"\nmsgstr \"メンバーを待っている間にクエリがタイムアウトした場合。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.query_members:27\nmsgid \"Invalid parameters were passed to the function\"\nmsgstr \"無効なパラメータが関数に渡された場合。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.query_members:28\nmsgid \"The presences intent is not enabled.\"\nmsgstr \"プレゼンスインテントが有効でない場合。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.query_members:30\nmsgid \"The list of members that have matched the query.\"\nmsgstr \"クエリに一致するメンバーのリスト。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.change_voice_state:3\nmsgid \"Changes client's voice state in the guild.\"\nmsgstr \"ギルド内のクライアントのボイス状態を変更します。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.change_voice_state:7\nmsgid \"Channel the client wants to join. Use ``None`` to disconnect.\"\nmsgstr \"クライアントが接続するチャンネル。切断するには ``None`` を渡してください。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.fetch_automod_rule:3\nmsgid \"Fetches an active automod rule from the guild.\"\nmsgstr \"ギルドの有効な自動管理ルールを取得します。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.fetch_automod_rule:9\nmsgid \"The ID of the automod rule to fetch.\"\nmsgstr \"取得する自動管理ルールのID。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.fetch_automod_rule:12\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.fetch_automod_rules:9\nmsgid \"You do not have permission to view the automod rule.\"\nmsgstr \"自動管理ルールを取得する権限がない場合。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.fetch_automod_rule:14\nmsgid \"The automod rule that was fetched.\"\nmsgstr \"取得した自動管理ルール。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.fetch_automod_rules:3\nmsgid \"Fetches all automod rules from the guild.\"\nmsgstr \"ギルドの自動管理ルールをすべて取得します。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.fetch_automod_rules:10\nmsgid \"There are no automod rules within this guild.\"\nmsgstr \"ギルド内に自動管理ルールが存在しない場合。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.fetch_automod_rules:12\nmsgid \"The automod rules that were fetched.\"\nmsgstr \"取得した自動管理ルール。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.fetch_automod_rules:13\nmsgid \"List[:class:`AutoModRule`]\"\nmsgstr \"List[:class:`AutoModRule`]\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_automod_rule:3\nmsgid \"Create an automod rule.\"\nmsgstr \"自動管理ルールを作成します。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_automod_rule:9\nmsgid \"The name of the automod rule.\"\nmsgstr \"自動管理ルールの名前。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_automod_rule:11\nmsgid \"The type of event that the automod rule will trigger on.\"\nmsgstr \"自動管理ルールが発動するイベントの種類。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_automod_rule:13\nmsgid \"The trigger that will trigger the automod rule.\"\nmsgstr \"自動管理ルールの発動条件。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_automod_rule:15\nmsgid \"The actions that will be taken when the automod rule is triggered.\"\nmsgstr \"自動管理ルールが発動したときの対応。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_automod_rule:17\nmsgid \"Whether the automod rule is enabled. Defaults to ``False``.\"\nmsgstr \"自動管理ルールを有効にするか。デフォルトは ``False`` です。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_automod_rule:20\nmsgid \"A list of roles that will be exempt from the automod rule.\"\nmsgstr \"自動管理ルールの除外対象のロールのリスト。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_automod_rule:22\nmsgid \"A list of channels that will be exempt from the automod rule.\"\nmsgstr \"自動管理ルールの除外対象のチャンネルのリスト。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_automod_rule:24\nmsgid \"The reason for creating this automod rule. Shows up on the audit log.\"\nmsgstr \"自動管理ルールを作成する理由。監査ログに表示されます。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_automod_rule:27\nmsgid \"You do not have permissions to create an automod rule.\"\nmsgstr \"自動管理ルールを作成する権限がない場合。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_automod_rule:28\nmsgid \"Creating the automod rule failed.\"\nmsgstr \"自動管理ルールの作成に失敗した場合。\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.create_automod_rule:30\nmsgid \"The automod rule that was created.\"\nmsgstr \"作成された自動管理ルール。\"\n\n#: ../../../discord/guild.py:docstring of discord.Guild.invites_paused_until:1\nmsgid \"If invites are paused, returns when invites will get enabled in UTC, otherwise returns None.\"\nmsgstr \"\"\n\n#: ../../../discord/guild.py:docstring of discord.Guild.dms_paused_until:1\nmsgid \"If DMs are paused, returns when DMs will get enabled in UTC, otherwise returns None.\"\nmsgstr \"\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.invites_paused:1\nmsgid \":class:`bool`: Whether invites are paused in the guild.\"\nmsgstr \"\"\n\n#: ../../../discord/guild.py:docstring of discord.guild.Guild.dms_paused:1\nmsgid \":class:`bool`: Whether DMs are paused in the guild.\"\nmsgstr \"\"\n\n#: ../../api.rst:4481\nmsgid \"A namedtuple which represents a ban returned from :meth:`~Guild.bans`.\"\nmsgstr \":meth:`~Guild.bans` から返されたBANを表すnamedtuple。\"\n\n#: ../../api.rst:4485\nmsgid \"The reason this user was banned.\"\nmsgstr \"ユーザーがBANされた理由。\"\n\n#: ../../api.rst:4490\nmsgid \"The :class:`User` that was banned.\"\nmsgstr \"BANされた :class:`User` 。\"\n\n#: ../../api.rst:4496\nmsgid \"A namedtuple which represents the result returned from :meth:`~Guild.bulk_ban`.\"\nmsgstr \"\"\n\n#: ../../api.rst:4502\nmsgid \"The list of users that were banned. The inner :class:`Object` of the list has the :attr:`Object.type` set to :class:`User`.\"\nmsgstr \"\"\n\n#: ../../api.rst:4505\n#: ../../api.rst:4511\nmsgid \"List[:class:`Object`]\"\nmsgstr \"\"\n\n#: ../../api.rst:4508\nmsgid \"The list of users that could not be banned. The inner :class:`Object` of the list has the :attr:`Object.type` set to :class:`User`.\"\nmsgstr \"\"\n\n#: ../../api.rst:4515\nmsgid \"ScheduledEvent\"\nmsgstr \"ScheduledEvent\"\n\n#: ../../../discord/scheduled_event.py:docstring of discord.scheduled_event.ScheduledEvent:1\nmsgid \"Represents a scheduled event in a guild.\"\nmsgstr \"ギルドのスケジュールイベント。\"\n\n#: ../../../discord/scheduled_event.py:docstring of discord.scheduled_event.ScheduledEvent:9\nmsgid \"Checks if two scheduled events are equal.\"\nmsgstr \"二つのスケジュールイベントが等しいかを比較します。\"\n\n#: ../../../discord/scheduled_event.py:docstring of discord.scheduled_event.ScheduledEvent:13\nmsgid \"Checks if two scheduled events are not equal.\"\nmsgstr \"二つのスケジュールイベントが等しくないかを比較します。\"\n\n#: ../../../discord/scheduled_event.py:docstring of discord.scheduled_event.ScheduledEvent:17\nmsgid \"Returns the scheduled event's hash.\"\nmsgstr \"スケジュールイベントのハッシュ値を返します。\"\n\n#: ../../../discord/scheduled_event.py:docstring of discord.scheduled_event.ScheduledEvent:21\nmsgid \"The scheduled event's ID.\"\nmsgstr \"スケジュールイベントのID。\"\n\n#: ../../../discord/scheduled_event.py:docstring of discord.scheduled_event.ScheduledEvent:39\nmsgid \"The type of entity this event is for.\"\nmsgstr \"イベントの開催場所の種類。\"\n\n#: ../../../discord/scheduled_event.py:docstring of discord.scheduled_event.ScheduledEvent:45\nmsgid \"The ID of the entity this event is for if available.\"\nmsgstr \"利用可能な場合、イベントのエンティティID。\"\n\n#: ../../../discord/scheduled_event.py:docstring of discord.scheduled_event.ScheduledEvent:51\nmsgid \"The time that the scheduled event will start in UTC.\"\nmsgstr \"スケジュールイベントのUTCの開始予定時間。\"\n\n#: ../../../discord/scheduled_event.py:docstring of discord.scheduled_event.ScheduledEvent:57\nmsgid \"The time that the scheduled event will end in UTC.\"\nmsgstr \"スケジュールイベントのUTCの終了予定時間。\"\n\n#: ../../../discord/scheduled_event.py:docstring of discord.scheduled_event.ScheduledEvent:75\nmsgid \"The number of users subscribed to the scheduled event.\"\nmsgstr \"スケジュールイベントに購読しているユーザー数。\"\n\n#: ../../../discord/scheduled_event.py:docstring of discord.scheduled_event.ScheduledEvent:81\nmsgid \"The user that created the scheduled event.\"\nmsgstr \"スケジュールイベントを作成したユーザー。\"\n\n#: ../../../discord/scheduled_event.py:docstring of discord.scheduled_event.ScheduledEvent:87\nmsgid \"The ID of the user that created the scheduled event.\"\nmsgstr \"スケジュールイベントを作成したユーザーのID。\"\n\n#: ../../../discord/scheduled_event.py:docstring of discord.ScheduledEvent.guild:1\nmsgid \"The guild this scheduled event is in.\"\nmsgstr \"スケジュールイベントの属するギルド。\"\n\n#: ../../../discord/scheduled_event.py:docstring of discord.ScheduledEvent.channel:1\nmsgid \"The channel this scheduled event is in.\"\nmsgstr \"スケジュールイベントの属するチャンネル。\"\n\n#: ../../../discord/scheduled_event.py:docstring of discord.ScheduledEvent.url:1\nmsgid \"The url for the scheduled event.\"\nmsgstr \"スケジュールイベントのURL。\"\n\n#: ../../../discord/scheduled_event.py:docstring of discord.scheduled_event.ScheduledEvent.start:3\nmsgid \"Starts the scheduled event.\"\nmsgstr \"スケジュールイベントを開始します。\"\n\n#: ../../../discord/scheduled_event.py:docstring of discord.scheduled_event.ScheduledEvent.start:5\n#: ../../../discord/scheduled_event.py:docstring of discord.scheduled_event.ScheduledEvent.end:5\n#: ../../../discord/scheduled_event.py:docstring of discord.scheduled_event.ScheduledEvent.cancel:5\nmsgid \"Shorthand for:\"\nmsgstr \"以下の短縮形です:\"\n\n#: ../../../discord/scheduled_event.py:docstring of discord.scheduled_event.ScheduledEvent.start:11\nmsgid \"The reason for starting the scheduled event.\"\nmsgstr \"スケジュールイベントの開始理由。\"\n\n#: ../../../discord/scheduled_event.py:docstring of discord.scheduled_event.ScheduledEvent.start:14\nmsgid \"The scheduled event has already started or has ended.\"\nmsgstr \"スケジュールイベントが既に開始し、または終了している場合。\"\n\n#: ../../../discord/scheduled_event.py:docstring of discord.scheduled_event.ScheduledEvent.start:15\nmsgid \"You do not have the proper permissions to start the scheduled event.\"\nmsgstr \"スケジュールイベントを開始するのに必要な権限がない場合。\"\n\n#: ../../../discord/scheduled_event.py:docstring of discord.scheduled_event.ScheduledEvent.start:16\nmsgid \"The scheduled event could not be started.\"\nmsgstr \"スケジュールイベントを開始できなかった場合。\"\n\n#: ../../../discord/scheduled_event.py:docstring of discord.scheduled_event.ScheduledEvent.start:18\nmsgid \"The scheduled event that was started.\"\nmsgstr \"開始されたスケジュールイベント。\"\n\n#: ../../../discord/scheduled_event.py:docstring of discord.scheduled_event.ScheduledEvent.end:3\nmsgid \"Ends the scheduled event.\"\nmsgstr \"スケジュールイベントを終了します。\"\n\n#: ../../../discord/scheduled_event.py:docstring of discord.scheduled_event.ScheduledEvent.end:11\nmsgid \"The reason for ending the scheduled event.\"\nmsgstr \"スケジュールイベントの終了理由。\"\n\n#: ../../../discord/scheduled_event.py:docstring of discord.scheduled_event.ScheduledEvent.end:14\nmsgid \"The scheduled event is not active or has already ended.\"\nmsgstr \"スケジュールイベントがアクティブでないか、既に終了している場合。\"\n\n#: ../../../discord/scheduled_event.py:docstring of discord.scheduled_event.ScheduledEvent.end:15\nmsgid \"You do not have the proper permissions to end the scheduled event.\"\nmsgstr \"スケジュールイベントを終了するのに必要な権限がない場合。\"\n\n#: ../../../discord/scheduled_event.py:docstring of discord.scheduled_event.ScheduledEvent.end:16\nmsgid \"The scheduled event could not be ended.\"\nmsgstr \"スケジュールイベントを終了できなかった場合。\"\n\n#: ../../../discord/scheduled_event.py:docstring of discord.scheduled_event.ScheduledEvent.end:18\nmsgid \"The scheduled event that was ended.\"\nmsgstr \"終了されたスケジュールイベント。\"\n\n#: ../../../discord/scheduled_event.py:docstring of discord.scheduled_event.ScheduledEvent.cancel:3\nmsgid \"Cancels the scheduled event.\"\nmsgstr \"スケジュールイベントをキャンセルします。\"\n\n#: ../../../discord/scheduled_event.py:docstring of discord.scheduled_event.ScheduledEvent.cancel:11\nmsgid \"The reason for cancelling the scheduled event.\"\nmsgstr \"スケジュールイベントのキャンセル理由。\"\n\n#: ../../../discord/scheduled_event.py:docstring of discord.scheduled_event.ScheduledEvent.cancel:14\nmsgid \"The scheduled event is already running.\"\nmsgstr \"スケジュールイベントが既に開始している場合。\"\n\n#: ../../../discord/scheduled_event.py:docstring of discord.scheduled_event.ScheduledEvent.cancel:15\nmsgid \"You do not have the proper permissions to cancel the scheduled event.\"\nmsgstr \"スケジュールイベントをキャンセルするのに必要な権限がない場合。\"\n\n#: ../../../discord/scheduled_event.py:docstring of discord.scheduled_event.ScheduledEvent.cancel:16\nmsgid \"The scheduled event could not be cancelled.\"\nmsgstr \"スケジュールイベントをキャンセルできなかった場合。\"\n\n#: ../../../discord/scheduled_event.py:docstring of discord.scheduled_event.ScheduledEvent.cancel:18\nmsgid \"The scheduled event that was cancelled.\"\nmsgstr \"キャンセルされたスケジュールイベント。\"\n\n#: ../../../discord/scheduled_event.py:docstring of discord.scheduled_event.ScheduledEvent.edit:3\nmsgid \"Edits the scheduled event.\"\nmsgstr \"スケジュールイベントを編集します。\"\n\n#: ../../../discord/scheduled_event.py:docstring of discord.scheduled_event.ScheduledEvent.edit:11\nmsgid \"The channel to put the scheduled event in. If the channel is a :class:`StageInstance` or :class:`VoiceChannel` then it automatically sets the entity type.  Required if the entity type is either :attr:`EntityType.voice` or :attr:`EntityType.stage_instance`.\"\nmsgstr \"スケジュールイベントを開催するチャンネル。もしチャンネルが :class:`StageInstance` または :class:`VoiceChannel` ならば、開催場所の種類が自動で設定されます。 開催場所の種類が :attr:`EntityType.voice` または :attr:`EntityType.stage_instance` の場合必須です。\"\n\n#: ../../../discord/scheduled_event.py:docstring of discord.scheduled_event.ScheduledEvent.edit:11\nmsgid \"The channel to put the scheduled event in. If the channel is a :class:`StageInstance` or :class:`VoiceChannel` then it automatically sets the entity type.\"\nmsgstr \"スケジュールイベントを開催するチャンネル。もしチャンネルが :class:`StageInstance` または :class:`VoiceChannel` ならば、開催場所の種類が自動で設定されます。\"\n\n#: ../../../discord/scheduled_event.py:docstring of discord.scheduled_event.ScheduledEvent.edit:15\nmsgid \"Required if the entity type is either :attr:`EntityType.voice` or :attr:`EntityType.stage_instance`.\"\nmsgstr \"``entity_type`` が :attr:`EntityType.voice` か :attr:`EntityType.stage_instance` の場合必須です。\"\n\n#: ../../../discord/scheduled_event.py:docstring of discord.scheduled_event.ScheduledEvent.edit:18\nmsgid \"The time that the scheduled event will start. This must be a timezone-aware datetime object. Consider using :func:`utils.utcnow`.\"\nmsgstr \"スケジュールイベントの開始予定時刻。これはtimezone awareなdatetimeオブジェクトでないといけません。 :func:`utils.utcnow` を使用してみてください。\"\n\n#: ../../../discord/scheduled_event.py:docstring of discord.scheduled_event.ScheduledEvent.edit:21\nmsgid \"The time that the scheduled event will end. This must be a timezone-aware datetime object. Consider using :func:`utils.utcnow`.  If the entity type is either :attr:`EntityType.voice` or :attr:`EntityType.stage_instance`, the end_time can be cleared by passing ``None``.  Required if the entity type is :attr:`EntityType.external`.\"\nmsgstr \"スケジュールイベントの終了予定時刻。これはtimezone awareなdatetimeオブジェクトでないといけません。 :func:`utils.utcnow` を使用してみてください。もし開催場所が :attr:`EntityType.voice` や :attr:`EntityType.stage_instance` の場合はこれは ``None`` を渡して除去することができます。 ``entity_type`` が :attr:`EntityType.external` の場合必須です。\"\n\n#: ../../../discord/scheduled_event.py:docstring of discord.scheduled_event.ScheduledEvent.edit:21\nmsgid \"The time that the scheduled event will end. This must be a timezone-aware datetime object. Consider using :func:`utils.utcnow`.\"\nmsgstr \"スケジュールイベントの終了予定時刻。これはtimezone awareなdatetimeオブジェクトでないといけません。 :func:`utils.utcnow` を使用してみてください。\"\n\n#: ../../../discord/scheduled_event.py:docstring of discord.scheduled_event.ScheduledEvent.edit:24\nmsgid \"If the entity type is either :attr:`EntityType.voice` or :attr:`EntityType.stage_instance`, the end_time can be cleared by passing ``None``.\"\nmsgstr \"もし開催場所が :attr:`EntityType.voice` や :attr:`EntityType.stage_instance` の場合はこれは ``None`` を渡して除去することができます。\"\n\n#: ../../../discord/scheduled_event.py:docstring of discord.scheduled_event.ScheduledEvent.edit:32\nmsgid \"The new entity type. If the channel is a :class:`StageInstance` or :class:`VoiceChannel` then this is automatically set to the appropriate entity type.\"\nmsgstr \"新しいスケジュールイベントの開催場所の種類。もしチャンネルが :class:`StageInstance` または :class:`VoiceChannel` の場合これは適切な種類に自動で設定されます。\"\n\n#: ../../../discord/scheduled_event.py:docstring of discord.scheduled_event.ScheduledEvent.edit:36\nmsgid \"The new status of the scheduled event.\"\nmsgstr \"スケジュールイベントの新しいステータス。\"\n\n#: ../../../discord/scheduled_event.py:docstring of discord.scheduled_event.ScheduledEvent.edit:38\nmsgid \"The new image of the scheduled event or ``None`` to remove the image.\"\nmsgstr \"スケジュールイベントの新しい画像。 ``None`` を渡すと画像を削除できます。\"\n\n#: ../../../discord/scheduled_event.py:docstring of discord.scheduled_event.ScheduledEvent.edit:40\nmsgid \"The new location of the scheduled event.  Required if the entity type is :attr:`EntityType.external`.\"\nmsgstr \"新しいスケジュールイベントの場所。開催場所の種類が :attr:`EntityType.external` の場合必須です。\"\n\n#: ../../../discord/scheduled_event.py:docstring of discord.scheduled_event.ScheduledEvent.edit:40\nmsgid \"The new location of the scheduled event.\"\nmsgstr \"新しいスケジュールイベントの場所。\"\n\n#: ../../../discord/scheduled_event.py:docstring of discord.scheduled_event.ScheduledEvent.edit:44\nmsgid \"The reason for editing the scheduled event. Shows up on the audit log.\"\nmsgstr \"スケジュールイベントを編集する理由。監査ログに表示されます。\"\n\n#: ../../../discord/scheduled_event.py:docstring of discord.scheduled_event.ScheduledEvent.edit:47\nmsgid \"``image`` was not a :term:`py:bytes-like object`, or ``privacy_level``     was not a :class:`PrivacyLevel`, or ``entity_type`` was not an     :class:`EntityType`, ``status`` was not an :class:`EventStatus`, or     an argument was provided that was incompatible with the scheduled event's     entity type.\"\nmsgstr \"``image`` が :term:`py:bytes-like object` でない場合、 ``privacy_level`` が :class:`PrivacyLevel` でない場合、 ``entity_type`` が :class:`EntityType` でない場合、 ``status`` が :class:`EventStatus` でない場合、または引数がスケジュールイベントの開催場所の種類と互換性のない場合。\"\n\n#: ../../../discord/scheduled_event.py:docstring of discord.scheduled_event.ScheduledEvent.edit:49\nmsgid \"You do not have permissions to edit the scheduled event.\"\nmsgstr \"スケジュールイベントを編集するのに必要な権限がない場合。\"\n\n#: ../../../discord/scheduled_event.py:docstring of discord.scheduled_event.ScheduledEvent.edit:50\nmsgid \"Editing the scheduled event failed.\"\nmsgstr \"スケジュールイベントの編集に失敗した場合。\"\n\n#: ../../../discord/scheduled_event.py:docstring of discord.scheduled_event.ScheduledEvent.edit:52\nmsgid \"The edited scheduled event.\"\nmsgstr \"編集されたスケジュールイベント。\"\n\n#: ../../../discord/scheduled_event.py:docstring of discord.scheduled_event.ScheduledEvent.delete:3\nmsgid \"Deletes the scheduled event.\"\nmsgstr \"スケジュールイベントを削除します。\"\n\n#: ../../../discord/scheduled_event.py:docstring of discord.scheduled_event.ScheduledEvent.delete:7\nmsgid \"The reason for deleting the scheduled event. Shows up on the audit log.\"\nmsgstr \"スケジュールイベントを削除する理由。監査ログに表示されます。\"\n\n#: ../../../discord/scheduled_event.py:docstring of discord.scheduled_event.ScheduledEvent.delete:10\nmsgid \"You do not have permissions to delete the scheduled event.\"\nmsgstr \"スケジュールイベントを削除する権限がない場合。\"\n\n#: ../../../discord/scheduled_event.py:docstring of discord.scheduled_event.ScheduledEvent.delete:11\nmsgid \"Deleting the scheduled event failed.\"\nmsgstr \"スケジュールイベントの削除に失敗した場合。\"\n\n#: ../../../discord/scheduled_event.py:docstring of discord.scheduled_event.ScheduledEvent.users:3\nmsgid \"Retrieves all :class:`User` that are subscribed to this event.\"\nmsgstr \"このイベントを購読しているすべての :class:`User` を取得します。\"\n\n#: ../../../discord/scheduled_event.py:docstring of discord.scheduled_event.ScheduledEvent.users:5\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.fetch_members:5\nmsgid \"This requires :attr:`Intents.members` to get information about members other than yourself.\"\nmsgstr \"あなた自身以外のメンバーに関する情報を取得するには、 :attr:`Intents.members` が必要です。\"\n\n#: ../../../discord/scheduled_event.py:docstring of discord.scheduled_event.ScheduledEvent.users:8\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.fetch_members:8\nmsgid \"Retrieving the members failed.\"\nmsgstr \"メンバーの取得に失敗した場合。\"\n\n#: ../../../discord/scheduled_event.py:docstring of discord.scheduled_event.ScheduledEvent.users:10\nmsgid \"All subscribed users of this event.\"\nmsgstr \"このイベントに購読済みのユーザー。\"\n\n#: ../../../discord/scheduled_event.py:docstring of discord.scheduled_event.ScheduledEvent.users:11\n#: ../../../discord/channel.py:docstring of discord.channel.GroupChannel:25\nmsgid \"List[:class:`User`]\"\nmsgstr \"List[:class:`User`]\"\n\n#: ../../api.rst:4524\nmsgid \"Integration\"\nmsgstr \"Integration\"\n\n#: ../../../discord/integrations.py:docstring of discord.integrations.Integration:1\nmsgid \"Represents a guild integration.\"\nmsgstr \"ギルドの連携サービス。\"\n\n#: ../../../discord/integrations.py:docstring of discord.integrations.Integration:13\n#: ../../../discord/integrations.py:docstring of discord.integrations.BotIntegration:13\n#: ../../../discord/integrations.py:docstring of discord.integrations.StreamIntegration:13\n#: ../../../discord/integrations.py:docstring of discord.integrations.PartialIntegration:13\nmsgid \"The integration name.\"\nmsgstr \"連携サービス名。\"\n\n#: ../../../discord/integrations.py:docstring of discord.integrations.Integration:19\n#: ../../../discord/integrations.py:docstring of discord.integrations.BotIntegration:19\n#: ../../../discord/integrations.py:docstring of discord.integrations.StreamIntegration:19\n#: ../../../discord/integrations.py:docstring of discord.integrations.PartialIntegration:19\nmsgid \"The guild of the integration.\"\nmsgstr \"連携サービスが属するギルド。\"\n\n#: ../../../discord/integrations.py:docstring of discord.integrations.Integration:25\n#: ../../../discord/integrations.py:docstring of discord.integrations.BotIntegration:25\n#: ../../../discord/integrations.py:docstring of discord.integrations.StreamIntegration:25\n#: ../../../discord/integrations.py:docstring of discord.integrations.PartialIntegration:25\nmsgid \"The integration type (i.e. Twitch).\"\nmsgstr \"連携サービスタイプ （例： Twitch）。\"\n\n#: ../../../discord/integrations.py:docstring of discord.integrations.Integration:31\n#: ../../../discord/integrations.py:docstring of discord.integrations.BotIntegration:31\n#: ../../../discord/integrations.py:docstring of discord.integrations.StreamIntegration:31\nmsgid \"Whether the integration is currently enabled.\"\nmsgstr \"連携サービスが現在有効化されているか。\"\n\n#: ../../../discord/integrations.py:docstring of discord.integrations.Integration:37\n#: ../../../discord/integrations.py:docstring of discord.integrations.PartialIntegration:31\nmsgid \"The account linked to this integration.\"\nmsgstr \"この連携サービスにリンクされたアカウント。\"\n\n#: ../../../discord/integrations.py:docstring of discord.integrations.Integration:39\n#: ../../../discord/integrations.py:docstring of discord.integrations.BotIntegration:45\n#: ../../../discord/integrations.py:docstring of discord.integrations.StreamIntegration:69\n#: ../../../discord/integrations.py:docstring of discord.integrations.PartialIntegration:33\nmsgid \":class:`IntegrationAccount`\"\nmsgstr \":class:`IntegrationAccount`\"\n\n#: ../../../discord/integrations.py:docstring of discord.integrations.Integration:43\n#: ../../../discord/integrations.py:docstring of discord.integrations.BotIntegration:37\nmsgid \"The user that added this integration.\"\nmsgstr \"連携サービスを追加したユーザー。\"\n\n#: ../../../discord/integrations.py:docstring of discord.integrations.Integration.delete:3\nmsgid \"Deletes the integration.\"\nmsgstr \"この連携サービスを削除します。\"\n\n#: ../../../discord/integrations.py:docstring of discord.integrations.Integration.delete:7\nmsgid \"The reason the integration was deleted. Shows up on the audit log.\"\nmsgstr \"連携サービスを削除する理由。監査ログに表示されます。\"\n\n#: ../../../discord/integrations.py:docstring of discord.integrations.Integration.delete:12\nmsgid \"You do not have permission to delete the integration.\"\nmsgstr \"連携サービスを削除する権限がない場合。\"\n\n#: ../../../discord/integrations.py:docstring of discord.integrations.Integration.delete:13\nmsgid \"Deleting the integration failed.\"\nmsgstr \"連携サービスの削除に失敗した場合。\"\n\n#: ../../../discord/integrations.py:docstring of discord.integrations.IntegrationAccount:1\nmsgid \"Represents an integration account.\"\nmsgstr \"連携サービスのアカウント。\"\n\n#: ../../../discord/integrations.py:docstring of discord.integrations.IntegrationAccount:7\nmsgid \"The account ID.\"\nmsgstr \"アカウントID。\"\n\n#: ../../../discord/integrations.py:docstring of discord.integrations.IntegrationAccount:13\nmsgid \"The account name.\"\nmsgstr \"アカウント名。\"\n\n#: ../../../discord/integrations.py:docstring of discord.integrations.BotIntegration:1\nmsgid \"Represents a bot integration on discord.\"\nmsgstr \"Discordのボット連携サービス。\"\n\n#: ../../../discord/integrations.py:docstring of discord.integrations.BotIntegration:43\n#: ../../../discord/integrations.py:docstring of discord.integrations.StreamIntegration:67\nmsgid \"The integration account information.\"\nmsgstr \"連携サービスのアカウント情報。\"\n\n#: ../../../discord/integrations.py:docstring of discord.integrations.BotIntegration:49\nmsgid \"The application tied to this integration.\"\nmsgstr \"この連携サービスにリンクされたアプリケーション。\"\n\n#: ../../../discord/integrations.py:docstring of discord.integrations.BotIntegration:51\nmsgid \":class:`IntegrationApplication`\"\nmsgstr \":class:`IntegrationApplication`\"\n\n#: ../../../discord/integrations.py:docstring of discord.integrations.IntegrationApplication:1\nmsgid \"Represents an application for a bot integration.\"\nmsgstr \"ボット連携サービスのアプリケーション。\"\n\n#: ../../../discord/integrations.py:docstring of discord.integrations.IntegrationApplication:7\nmsgid \"The ID for this application.\"\nmsgstr \"アプリケーションのID。\"\n\n#: ../../../discord/integrations.py:docstring of discord.integrations.IntegrationApplication:13\n#: ../../../discord/message.py:docstring of discord.message.MessageApplication:19\nmsgid \"The application's name.\"\nmsgstr \"アプリケーションの名前。\"\n\n#: ../../../discord/integrations.py:docstring of discord.integrations.IntegrationApplication:19\nmsgid \"The application's icon hash.\"\nmsgstr \"アプリケーションのアイコンハッシュ。\"\n\n#: ../../../discord/integrations.py:docstring of discord.integrations.IntegrationApplication:25\nmsgid \"The application's description. Can be an empty string.\"\nmsgstr \"アプリケーションの説明。空の文字列である場合があります。\"\n\n#: ../../../discord/integrations.py:docstring of discord.integrations.IntegrationApplication:31\nmsgid \"The summary of the application. Can be an empty string.\"\nmsgstr \"アプリケーションの概要。空の文字列である場合があります。\"\n\n#: ../../../discord/integrations.py:docstring of discord.integrations.IntegrationApplication:37\nmsgid \"The bot user on this application.\"\nmsgstr \"アプリケーションのボットユーザー。\"\n\n#: ../../../discord/integrations.py:docstring of discord.integrations.StreamIntegration:1\nmsgid \"Represents a stream integration for Twitch or YouTube.\"\nmsgstr \"TwitchやYouTubeのストリーム連携サービス。\"\n\n#: ../../../discord/integrations.py:docstring of discord.integrations.StreamIntegration:37\nmsgid \"Where the integration is currently syncing.\"\nmsgstr \"連携サービスが現在同期されているか。\"\n\n#: ../../../discord/integrations.py:docstring of discord.integrations.StreamIntegration:43\nmsgid \"Whether emoticons should be synced for this integration (currently twitch only).\"\nmsgstr \"この連携サービスで絵文字を同期するか（現在Twitch専用）。\"\n\n#: ../../../discord/integrations.py:docstring of discord.integrations.StreamIntegration:45\n#: ../../../discord/invite.py:docstring of discord.invite.Invite:71\n#: ../../../discord/invite.py:docstring of discord.invite.Invite:84\n#: ../../../discord/template.py:docstring of discord.template.Template:60\n#: ../../../discord/widget.py:docstring of discord.widget.WidgetMember:81\nmsgid \"Optional[:class:`bool`]\"\nmsgstr \"Optional[:class:`bool`]\"\n\n#: ../../../discord/integrations.py:docstring of discord.integrations.StreamIntegration:49\nmsgid \"The behaviour of expiring subscribers. Aliased to ``expire_behavior`` as well.\"\nmsgstr \"期限切れのサブスクライバーの動作。 ``expire_behavior`` というエイリアスが存在します。\"\n\n#: ../../../discord/integrations.py:docstring of discord.integrations.StreamIntegration:55\nmsgid \"The grace period (in days) for expiring subscribers.\"\nmsgstr \"期限切れのサブスクライバーの猶予期間（日数）。\"\n\n#: ../../../discord/integrations.py:docstring of discord.integrations.StreamIntegration:61\nmsgid \"The user for the integration.\"\nmsgstr \"連携サービスのユーザー。\"\n\n#: ../../../discord/integrations.py:docstring of discord.integrations.StreamIntegration:73\nmsgid \"An aware UTC datetime representing when the integration was last synced.\"\nmsgstr \"連携サービスが最後に同期された日時を示すaware UTC datetime。\"\n\n#: ../../../discord/integrations.py:docstring of discord.StreamIntegration.expire_behavior:1\nmsgid \"An alias for :attr:`expire_behaviour`.\"\nmsgstr \":attr:`expire_behaviour` のエイリアス\"\n\n#: ../../../discord/integrations.py:docstring of discord.StreamIntegration.role:1\nmsgid \"Optional[:class:`Role`] The role which the integration uses for subscribers.\"\nmsgstr \"Optional[:class:`Role`] 連携サービスがサブスクライバーに付与するロール。\"\n\n#: ../../../discord/integrations.py:docstring of discord.integrations.StreamIntegration.edit:3\nmsgid \"Edits the integration.\"\nmsgstr \"連携サービスを編集します。\"\n\n#: ../../../discord/integrations.py:docstring of discord.integrations.StreamIntegration.edit:11\nmsgid \"The behaviour when an integration subscription lapses. Aliased to ``expire_behavior`` as well.\"\nmsgstr \"期限切れのサブスクライバーの動作。 ``expire_behavior`` というエイリアスが存在します。\"\n\n#: ../../../discord/integrations.py:docstring of discord.integrations.StreamIntegration.edit:13\nmsgid \"The period (in days) where the integration will ignore lapsed subscriptions.\"\nmsgstr \"連携サービスがサブスクリプションが終了したユーザーに与える猶予期間（日数）。\"\n\n#: ../../../discord/integrations.py:docstring of discord.integrations.StreamIntegration.edit:15\nmsgid \"Where emoticons should be synced for this integration (currently twitch only).\"\nmsgstr \"この連携サービスで絵文字を同期するか（現在Twitch専用）。\"\n\n#: ../../../discord/integrations.py:docstring of discord.integrations.StreamIntegration.edit:18\nmsgid \"You do not have permission to edit the integration.\"\nmsgstr \"連携サービスを編集する権限がない場合。\"\n\n#: ../../../discord/integrations.py:docstring of discord.integrations.StreamIntegration.edit:20\nmsgid \"``expire_behaviour`` did not receive a :class:`ExpireBehaviour`.\"\nmsgstr \"``expire_behaviour`` が :class:`ExpireBehaviour` でない場合。\"\n\n#: ../../../discord/integrations.py:docstring of discord.integrations.StreamIntegration.sync:3\nmsgid \"Syncs the integration.\"\nmsgstr \"連携サービスを同期します。\"\n\n#: ../../../discord/integrations.py:docstring of discord.integrations.StreamIntegration.sync:7\nmsgid \"You do not have permission to sync the integration.\"\nmsgstr \"連携サービスを同期する権限がない場合。\"\n\n#: ../../../discord/integrations.py:docstring of discord.integrations.StreamIntegration.sync:8\nmsgid \"Syncing the integration failed.\"\nmsgstr \"連携サービスの同期に失敗した場合。\"\n\n#: ../../../discord/integrations.py:docstring of discord.integrations.PartialIntegration:1\nmsgid \"Represents a partial guild integration.\"\nmsgstr \"不完全なギルドの連携サービス。\"\n\n#: ../../../discord/integrations.py:docstring of discord.integrations.PartialIntegration:37\nmsgid \"The id of the application this integration belongs to.\"\nmsgstr \"このインテグレーションが属するアプリケーションのID。\"\n\n#: ../../api.rst:4557\nmsgid \"Member\"\nmsgstr \"Member\"\n\n#: ../../../discord/member.py:docstring of discord.member.Member:1\nmsgid \"Represents a Discord member to a :class:`Guild`.\"\nmsgstr \":class:`Guild` 内のDiscordのメンバー。\"\n\n#: ../../../discord/member.py:docstring of discord.member.Member:3\nmsgid \"This implements a lot of the functionality of :class:`User`.\"\nmsgstr \":class:`User` にある多くの機能が、これにも実装されています。\"\n\n#: ../../../discord/member.py:docstring of discord.member.Member:9\nmsgid \"Checks if two members are equal. Note that this works with :class:`User` instances too.\"\nmsgstr \"2人のメンバーが等しいかを比較します。これは :class:`User` インスタンスにおいても同様に動作することに注意してください。\"\n\n#: ../../../discord/member.py:docstring of discord.member.Member:14\nmsgid \"Checks if two members are not equal. Note that this works with :class:`User` instances too.\"\nmsgstr \"2人のメンバーが等しくないかを比較します。これは :class:`User` インスタンスにおいても同様に動作することに注意してください。\"\n\n#: ../../../discord/member.py:docstring of discord.member.Member:19\nmsgid \"Returns the member's hash.\"\nmsgstr \"メンバーのハッシュ値を返します。\"\n\n#: ../../../discord/member.py:docstring of discord.member.Member:23\nmsgid \"Returns the member's handle (e.g. ``name`` or ``name#discriminator``).\"\nmsgstr \"メンバーのハンドル（例えば ``name`` や ``name#discriminator`` など）を返します。\"\n\n#: ../../../discord/member.py:docstring of discord.member.Member:27\nmsgid \"An aware datetime object that specifies the date and time in UTC that the member joined the guild. If the member left and rejoined the guild, this will be the latest date. In certain cases, this can be ``None``.\"\nmsgstr \"メンバーがギルドに参加した日時をUTCで示すaware datetimeオブジェクト。もしメンバーが脱退し再参加した場合、これは直近のものを反映します。場合によってこれは ``None`` になりえます。\"\n\n#: ../../../discord/member.py:docstring of discord.member.Member:34\nmsgid \"The activities that the user is currently doing.\"\nmsgstr \"ユーザーが現在行っているアクティビティ。\"\n\n#: ../../../discord/member.py:docstring of discord.member.Member:38\nmsgid \"Due to a Discord API limitation, a user's Spotify activity may not appear if they are listening to a song with a title longer than 128 characters. See :issue:`1738` for more information.\"\nmsgstr \"Discord APIの制限により、題名が128文字を超える音楽を聴いているユーザーのSpotifyアクティビティは現れない場合があります。詳細は :issue:`1738` を確認してください。\"\n\n#: ../../../discord/member.py:docstring of discord.member.Member:42\nmsgid \"Tuple[Union[:class:`BaseActivity`, :class:`Spotify`]]\"\nmsgstr \"Tuple[Union[:class:`BaseActivity`, :class:`Spotify`]]\"\n\n#: ../../../discord/member.py:docstring of discord.member.Member:46\nmsgid \"The guild that the member belongs to.\"\nmsgstr \"メンバーが属するギルド。\"\n\n#: ../../../discord/member.py:docstring of discord.member.Member:52\nmsgid \"The guild specific nickname of the user. Takes precedence over the global name.\"\nmsgstr \"ユーザーのギルド内専用のニックネーム。グローバルの表示名よりも優先されます。\"\n\n#: ../../../discord/member.py:docstring of discord.member.Member:58\nmsgid \"Whether the member is pending member verification.\"\nmsgstr \"メンバーがメンバー認証待ちであるかどうか。\"\n\n#: ../../../discord/member.py:docstring of discord.member.Member:66\nmsgid \"An aware datetime object that specifies the date and time in UTC when the member used their \\\"Nitro boost\\\" on the guild, if available. This could be ``None``.\"\nmsgstr \"利用可能な場合、メンバーがギルドで「Nitroブースト」を使用したUTCでの日時を示すaware datetimeオブジェクト。これは ``None`` の場合があります。\"\n\n#: ../../../discord/member.py:docstring of discord.member.Member:73\nmsgid \"An aware datetime object that specifies the date and time in UTC that the member's time out will expire. This will be set to ``None`` if the user is not timed out.\"\nmsgstr \"利用可能な場合、メンバーのギルド内のタイムアウトが満了するUTCでの日時を示すaware datetimeオブジェクト。これは ``None`` の場合があります。\"\n\n#: ../../../discord/member.py:docstring of discord.Member.name:1\nmsgid \"Equivalent to :attr:`User.name`\"\nmsgstr \":attr:`User.name` と同じです。\"\n\n#: ../../../discord/member.py:docstring of discord.Member.id:1\nmsgid \"Equivalent to :attr:`User.id`\"\nmsgstr \":attr:`User.id` と同じです。\"\n\n#: ../../../discord/member.py:docstring of discord.Member.discriminator:1\nmsgid \"Equivalent to :attr:`User.discriminator`\"\nmsgstr \":attr:`User.discriminator` と同じです。\"\n\n#: ../../../discord/member.py:docstring of discord.Member.global_name:1\nmsgid \"Equivalent to :attr:`User.global_name`\"\nmsgstr \":attr:`User.global_name` と同じです。\"\n\n#: ../../../discord/member.py:docstring of discord.Member.bot:1\nmsgid \"Equivalent to :attr:`User.bot`\"\nmsgstr \":attr:`User.bot` と同じです。\"\n\n#: ../../../discord/member.py:docstring of discord.Member.system:1\nmsgid \"Equivalent to :attr:`User.system`\"\nmsgstr \":attr:`User.system` と同じです。\"\n\n#: ../../../discord/member.py:docstring of discord.Member.created_at:1\nmsgid \"Equivalent to :attr:`User.created_at`\"\nmsgstr \":attr:`User.created_at` と同じです。\"\n\n#: ../../../discord/member.py:docstring of discord.Member.default_avatar:1\nmsgid \"Equivalent to :attr:`User.default_avatar`\"\nmsgstr \":attr:`User.default_avatar` と同じです。\"\n\n#: ../../../discord/member.py:docstring of discord.Member.avatar:1\nmsgid \"Equivalent to :attr:`User.avatar`\"\nmsgstr \":attr:`User.avatar` と同じです。\"\n\n#: ../../../discord/member.py:docstring of discord.Member.dm_channel:1\nmsgid \"Equivalent to :attr:`User.dm_channel`\"\nmsgstr \":attr:`User.dm_channel` と同じです。\"\n\n#: ../../../discord/member.py:docstring of discord.Member.mutual_guilds:1\nmsgid \"Equivalent to :attr:`User.mutual_guilds`\"\nmsgstr \":attr:`User.mutual_guilds` と同じです。\"\n\n#: ../../../discord/member.py:docstring of discord.Member.public_flags:1\nmsgid \"Equivalent to :attr:`User.public_flags`\"\nmsgstr \":attr:`User.public_flags` と同じです。\"\n\n#: ../../../discord/member.py:docstring of discord.Member.banner:1\nmsgid \"Equivalent to :attr:`User.banner`\"\nmsgstr \":attr:`User.banner` と同じです。\"\n\n#: ../../../discord/member.py:docstring of discord.Member.accent_color:1\nmsgid \"Equivalent to :attr:`User.accent_color`\"\nmsgstr \":attr:`User.accent_color` と同じです。\"\n\n#: ../../../discord/member.py:docstring of discord.Member.accent_colour:1\nmsgid \"Equivalent to :attr:`User.accent_colour`\"\nmsgstr \":attr:`User.accent_colour` と同じです。\"\n\n#: ../../../discord/member.py:docstring of discord.Member.avatar_decoration:1\nmsgid \"Equivalent to :attr:`User.avatar_decoration`\"\nmsgstr \"\"\n\n#: ../../../discord/member.py:docstring of discord.Member.avatar_decoration_sku_id:1\nmsgid \"Equivalent to :attr:`User.avatar_decoration_sku_id`\"\nmsgstr \"\"\n\n#: ../../../discord/member.py:docstring of discord.Member.raw_status:1\nmsgid \"The member's overall status as a string value.\"\nmsgstr \"メンバーのステータスを文字列として返します。\"\n\n#: ../../../discord/member.py:docstring of discord.Member.status:1\nmsgid \"The member's overall status. If the value is unknown, then it will be a :class:`str` instead.\"\nmsgstr \"メンバーのステータス。値が不明なものである場合これは :class:`str` になります。\"\n\n#: ../../../discord/member.py:docstring of discord.Member.status:3\n#: ../../../discord/member.py:docstring of discord.Member.mobile_status:3\n#: ../../../discord/member.py:docstring of discord.Member.desktop_status:3\n#: ../../../discord/member.py:docstring of discord.Member.web_status:3\n#: ../../../discord/widget.py:docstring of discord.widget.WidgetMember:57\nmsgid \":class:`Status`\"\nmsgstr \":class:`Status`\"\n\n#: ../../../discord/member.py:docstring of discord.Member.mobile_status:1\nmsgid \"The member's status on a mobile device, if applicable.\"\nmsgstr \"該当する場合は、モバイルデバイス上のメンバーのステータスです。\"\n\n#: ../../../discord/member.py:docstring of discord.Member.desktop_status:1\nmsgid \"The member's status on the desktop client, if applicable.\"\nmsgstr \"該当する場合は、デスクトップクライアント上のメンバーのステータスです。\"\n\n#: ../../../discord/member.py:docstring of discord.Member.web_status:1\nmsgid \"The member's status on the web client, if applicable.\"\nmsgstr \"該当する場合は、ウェブクライアント上のメンバーのステータスです。\"\n\n#: ../../../discord/member.py:docstring of discord.member.Member.is_on_mobile:1\nmsgid \":class:`bool`: A helper function that determines if a member is active on a mobile device.\"\nmsgstr \":class:`bool`: メンバーがモバイルデバイス上でアクティブかどうかを判断するヘルパー関数。\"\n\n#: ../../../discord/member.py:docstring of discord.Member.colour:1\nmsgid \"A property that returns a colour denoting the rendered colour for the member. If the default colour is the one rendered then an instance of :meth:`Colour.default` is returned.\"\nmsgstr \"メンバーのレンダリングされた色を返すプロパティ。 デフォルトの色がレンダリングされている場合、 :meth:`Colour.default` が返されます。\"\n\n#: ../../../discord/member.py:docstring of discord.Member.color:1\nmsgid \"A property that returns a color denoting the rendered color for the member. If the default color is the one rendered then an instance of :meth:`Colour.default` is returned.\"\nmsgstr \"メンバーのレンダリングされた色を返すプロパティ。 デフォルトの色がレンダリングされている場合、 :meth:`Colour.default` が返されます。\"\n\n#: ../../../discord/member.py:docstring of discord.Member.roles:1\nmsgid \"A :class:`list` of :class:`Role` that the member belongs to. Note that the first element of this list is always the default '@everyone' role.\"\nmsgstr \"メンバーが属する :class:`Role` の :class:`list` 。このリストの最初の要素は必ずデフォルトの @everyone ロールです。\"\n\n#: ../../../discord/member.py:docstring of discord.Member.roles:5\nmsgid \"These roles are sorted by their position in the role hierarchy.\"\nmsgstr \"ロールはロールの階層順によってソートされています。\"\n\n#: ../../../discord/member.py:docstring of discord.Member.display_icon:1\nmsgid \"A property that returns the role icon that is rendered for this member. If no icon is shown then ``None`` is returned.\"\nmsgstr \"このメンバーに対してレンダリングされるロールアイコンを返すプロパティ。アイコンが表示されない場合は ``None`` が返されます。\"\n\n#: ../../../discord/member.py:docstring of discord.Member.display_icon:6\nmsgid \"Optional[Union[:class:`str`, :class:`Asset`]]\"\nmsgstr \"Optional[Union[:class:`str`, :class:`Asset`]]\"\n\n#: ../../../discord/member.py:docstring of discord.Member.mention:1\nmsgid \"Returns a string that allows you to mention the member.\"\nmsgstr \"メンバーをメンションすることのできる文字列を返します。\"\n\n#: ../../../discord/member.py:docstring of discord.Member.display_avatar:1\nmsgid \"Returns the member's display avatar.\"\nmsgstr \"メンバーの表示されるアバターを返します。\"\n\n#: ../../../discord/member.py:docstring of discord.Member.display_avatar:3\nmsgid \"For regular members this is just their avatar, but if they have a guild specific avatar then that is returned instead.\"\nmsgstr \"通常であれば、これはアバターがそのまま返りますが、ギルド固有アバターを設定している場合は、代替としてそれが返ります。\"\n\n#: ../../../discord/member.py:docstring of discord.Member.guild_avatar:1\nmsgid \"Returns an :class:`Asset` for the guild avatar the member has. If unavailable, ``None`` is returned.\"\nmsgstr \"メンバーが持つギルドアバターの :class:`Asset` を返します。利用できない場合は ``None`` を返します。\"\n\n#: ../../../discord/member.py:docstring of discord.Member.activity:1\nmsgid \"Returns the primary activity the user is currently doing. Could be ``None`` if no activity is being done.\"\nmsgstr \"ユーザーが現在行っている主なアクティビティを返します。何も行われていない場合は ``None`` の場合があります。\"\n\n#: ../../../discord/member.py:docstring of discord.Member.activity:6\nmsgid \"Due to a Discord API limitation, this may be ``None`` if the user is listening to a song on Spotify with a title longer than 128 characters. See :issue:`1738` for more information.\"\nmsgstr \"Discord APIの制限により、ユーザーが題名が128文字を超える音楽をSpotifyで聴いている場合はこれが ``None`` になるかもしれません。詳細は :issue:`1738` を確認してください。\"\n\n#: ../../../discord/member.py:docstring of discord.Member.activity:12\nmsgid \"A user may have multiple activities, these can be accessed under :attr:`activities`.\"\nmsgstr \"ユーザーは複数のアクティビティを行っていることがあります。これらは :attr:`activities` でアクセスできます。\"\n\n#: ../../../discord/member.py:docstring of discord.Member.activity:14\n#: ../../../discord/widget.py:docstring of discord.widget.WidgetMember:75\nmsgid \"Optional[Union[:class:`BaseActivity`, :class:`Spotify`]]\"\nmsgstr \"Optional[Union[:class:`BaseActivity`, :class:`Spotify`]]\"\n\n#: ../../../discord/member.py:docstring of discord.member.Member.mentioned_in:1\nmsgid \"Checks if the member is mentioned in the specified message.\"\nmsgstr \"指定のメッセージにメンバーに対するメンションが含まれているかを確認します。\"\n\n#: ../../../discord/member.py:docstring of discord.member.Member.mentioned_in:6\nmsgid \"Indicates if the member is mentioned in the message.\"\nmsgstr \"メッセージにメンバーに対するメンションが含まれているかを示します。\"\n\n#: ../../../discord/member.py:docstring of discord.Member.top_role:1\nmsgid \"Returns the member's highest role.\"\nmsgstr \"メンバーの最高のロールを返します。\"\n\n#: ../../../discord/member.py:docstring of discord.Member.top_role:3\nmsgid \"This is useful for figuring where a member stands in the role hierarchy chain.\"\nmsgstr \"これは、メンバーがロール階層のどの位置に属するかを調べるのに便利です。\"\n\n#: ../../../discord/member.py:docstring of discord.Member.guild_permissions:1\nmsgid \"Returns the member's guild permissions.\"\nmsgstr \"メンバーのギルド権限を返します。\"\n\n#: ../../../discord/member.py:docstring of discord.Member.guild_permissions:3\nmsgid \"This only takes into consideration the guild permissions and not most of the implied permissions or any of the channel permission overwrites. For 100% accurate permission calculation, please use :meth:`abc.GuildChannel.permissions_for`.\"\nmsgstr \"これは、ギルドの権限のみ考慮し、暗示された権限やチャンネルの権限上書きは考慮しません。100%正確な権限計算を行う場合は :meth:`abc.GuildChannel.permissions_for` を使用してください。\"\n\n#: ../../../discord/member.py:docstring of discord.Member.guild_permissions:8\nmsgid \"This does take into consideration guild ownership, the administrator implication, and whether the member is timed out.\"\nmsgstr \"これはギルドの所有権、管理者権限、メンバーがタイムアウトされているかどうかを考慮します。\"\n\n#: ../../../discord/member.py:docstring of discord.Member.guild_permissions:11\nmsgid \"Member timeouts are taken into consideration.\"\nmsgstr \"メンバータイムアウトを考慮するようになりました。\"\n\n#: ../../../discord/member.py:docstring of discord.Member.resolved_permissions:1\nmsgid \"Returns the member's resolved permissions from an interaction.\"\nmsgstr \"インタラクションにより与えられたメンバーの解決済み権限を返します。\"\n\n#: ../../../discord/member.py:docstring of discord.Member.resolved_permissions:4\nmsgid \"This is only available in interaction contexts and represents the resolved permissions of the member in the channel the interaction was executed in. This is more or less equivalent to calling :meth:`abc.GuildChannel.permissions_for` but stored and returned as an attribute by the Discord API rather than computed.\"\nmsgstr \"これはインタラクション内でのみ利用できインタラクションが実行されたチャンネルでのメンバーの権限を示します。これは :meth:`abc.GuildChannel.permissions_for` と同様ですが、算出されたものではなく、Discord APIによって保管され、渡されたものです。\"\n\n#: ../../../discord/member.py:docstring of discord.Member.resolved_permissions:11\nmsgid \"Optional[:class:`Permissions`]\"\nmsgstr \"Optional[:class:`Permissions`]\"\n\n#: ../../../discord/member.py:docstring of discord.Member.voice:1\nmsgid \"Returns the member's current voice state.\"\nmsgstr \"メンバーの現在のボイス状態を返します。\"\n\n#: ../../../discord/member.py:docstring of discord.Member.voice:3\nmsgid \"Optional[:class:`VoiceState`]\"\nmsgstr \"Optional[:class:`VoiceState`]\"\n\n#: ../../../discord/member.py:docstring of discord.Member.flags:1\nmsgid \"Returns the member's flags.\"\nmsgstr \"メンバーのフラグを返します。\"\n\n#: ../../../discord/member.py:docstring of discord.Member.flags:5\nmsgid \":class:`MemberFlags`\"\nmsgstr \":class:`MemberFlags`\"\n\n#: ../../../discord/member.py:docstring of discord.member.Member.ban:3\nmsgid \"Bans this member. Equivalent to :meth:`Guild.ban`.\"\nmsgstr \"このメンバーをBANします。 :meth:`Guild.ban` と同等です。\"\n\n#: ../../../discord/member.py:docstring of discord.member.Member.unban:3\nmsgid \"Unbans this member. Equivalent to :meth:`Guild.unban`.\"\nmsgstr \"このメンバーのBANを解除します。 :meth:`Guild.unban` と同等です。\"\n\n#: ../../../discord/member.py:docstring of discord.member.Member.kick:3\nmsgid \"Kicks this member. Equivalent to :meth:`Guild.kick`.\"\nmsgstr \"このメンバーを追放します。 :meth:`Guild.kick` と同等です。\"\n\n#: ../../../discord/member.py:docstring of discord.member.Member.edit:3\nmsgid \"Edits the member's data.\"\nmsgstr \"メンバーデータを編集します。\"\n\n#: ../../../discord/member.py:docstring of discord.member.Member.edit:5\nmsgid \"Depending on the parameter passed, this requires different permissions listed below:\"\nmsgstr \"渡されたパラメータに応じて、以下のような権限が必要です:\"\n\n#: ../../../discord/member.py:docstring of discord.member.Member.edit:8\nmsgid \"Parameter\"\nmsgstr \"パラメータ\"\n\n#: ../../../discord/member.py:docstring of discord.member.Member.edit:8\nmsgid \"Permission\"\nmsgstr \"権限\"\n\n#: ../../../discord/member.py:docstring of discord.member.Member.edit:10\nmsgid \"nick\"\nmsgstr \"nick\"\n\n#: ../../../discord/member.py:docstring of discord.member.Member.edit:10\nmsgid \":attr:`Permissions.manage_nicknames`\"\nmsgstr \":attr:`Permissions.manage_nicknames`\"\n\n#: ../../../discord/member.py:docstring of discord.member.Member.edit:12\nmsgid \"mute\"\nmsgstr \"mute\"\n\n#: ../../../discord/member.py:docstring of discord.member.Member.edit:12\nmsgid \":attr:`Permissions.mute_members`\"\nmsgstr \":attr:`Permissions.mute_members`\"\n\n#: ../../../discord/member.py:docstring of discord.member.Member.edit:14\nmsgid \"deafen\"\nmsgstr \"deafen\"\n\n#: ../../../discord/member.py:docstring of discord.member.Member.edit:14\nmsgid \":attr:`Permissions.deafen_members`\"\nmsgstr \":attr:`Permissions.deafen_members`\"\n\n#: ../../../discord/member.py:docstring of discord.member.Member.edit:16\nmsgid \":attr:`Permissions.manage_roles`\"\nmsgstr \":attr:`Permissions.manage_roles`\"\n\n#: ../../../discord/member.py:docstring of discord.member.Member.edit:18\nmsgid \"voice_channel\"\nmsgstr \"voice_channel\"\n\n#: ../../../discord/member.py:docstring of discord.member.Member.edit:18\nmsgid \":attr:`Permissions.move_members`\"\nmsgstr \":attr:`Permissions.move_members`\"\n\n#: ../../../discord/member.py:docstring of discord.member.Member.edit:20\nmsgid \"timed_out_until\"\nmsgstr \"timed_out_until\"\n\n#: ../../../discord/member.py:docstring of discord.member.Member.edit:20\n#: ../../../discord/member.py:docstring of discord.member.Member.edit:22\nmsgid \":attr:`Permissions.moderate_members`\"\nmsgstr \":attr:`Permissions.moderate_members`\"\n\n#: ../../../discord/member.py:docstring of discord.member.Member.edit:22\nmsgid \"bypass_verification\"\nmsgstr \"bypass_verification\"\n\n#: ../../../discord/member.py:docstring of discord.member.Member.edit:27\nmsgid \"Can now pass ``None`` to ``voice_channel`` to kick a member from voice.\"\nmsgstr \"``None`` を ``voice_channel`` に渡してボイスからメンバーを追放できるようになりました。\"\n\n#: ../../../discord/member.py:docstring of discord.member.Member.edit:30\nmsgid \"The newly updated member is now optionally returned, if applicable.\"\nmsgstr \"可能な場合、新しく更新されたメンバーが返されるようになりました。\"\n\n#: ../../../discord/member.py:docstring of discord.member.Member.edit:33\nmsgid \"The member's new nickname. Use ``None`` to remove the nickname.\"\nmsgstr \"メンバーの新しいニックネーム。ニックネームを除去する場合は ``None`` を渡してください。\"\n\n#: ../../../discord/member.py:docstring of discord.member.Member.edit:35\nmsgid \"Indicates if the member should be guild muted or un-muted.\"\nmsgstr \"メンバーがギルドミュートまたはミュート解除されるべきかどうかを示します。\"\n\n#: ../../../discord/member.py:docstring of discord.member.Member.edit:37\nmsgid \"Indicates if the member should be guild deafened or un-deafened.\"\nmsgstr \"メンバーがギルドスピーカーミュートまたはスピーカーミュート解除されるべきかどうかを示します。\"\n\n#: ../../../discord/member.py:docstring of discord.member.Member.edit:39\nmsgid \"Indicates if the member should be suppressed in stage channels.\"\nmsgstr \"ステージチャンネルでメンバーを抑制するかどうかを示します。\"\n\n#: ../../../discord/member.py:docstring of discord.member.Member.edit:43\nmsgid \"The member's new list of roles. This *replaces* the roles.\"\nmsgstr \"メンバーの新しいロールのリスト。これは以前のものを *置き換えます* 。\"\n\n#: ../../../discord/member.py:docstring of discord.member.Member.edit:45\nmsgid \"The voice channel to move the member to. Pass ``None`` to kick them from voice.\"\nmsgstr \"メンバーの移動先のボイスチャンネル。 ``None`` を渡すとボイスから退出させることができます。\"\n\n#: ../../../discord/member.py:docstring of discord.member.Member.edit:48\nmsgid \"The date the member's timeout should expire, or ``None`` to remove the timeout. This must be a timezone-aware datetime object. Consider using :func:`utils.utcnow`.\"\nmsgstr \"メンバーのタイムアウトの満了日時。 ``None`` を渡すとタイムアウトを除去できます。これはtimezone awareなdatetimeオブジェクトでないといけません。 :func:`utils.utcnow` の使用を検討してください。\"\n\n#: ../../../discord/member.py:docstring of discord.member.Member.edit:53\nmsgid \"Indicates if the member should be allowed to bypass the guild verification requirements.\"\nmsgstr \"メンバーがギルドの認証要件をバイパスできるかどうかを示します。\"\n\n#: ../../../discord/member.py:docstring of discord.member.Member.edit:57\nmsgid \"The reason for editing this member. Shows up on the audit log.\"\nmsgstr \"メンバーを編集する理由。監査ログに表示されます。\"\n\n#: ../../../discord/member.py:docstring of discord.member.Member.edit:60\n#: ../../../discord/member.py:docstring of discord.member.Member.request_to_speak:15\nmsgid \"You do not have the proper permissions to do the action requested.\"\nmsgstr \"\"\n\n#: ../../../discord/member.py:docstring of discord.member.Member.edit:61\n#: ../../../discord/member.py:docstring of discord.member.Member.request_to_speak:16\nmsgid \"The operation failed.\"\nmsgstr \"操作に失敗した場合。\"\n\n#: ../../../discord/member.py:docstring of discord.member.Member.edit:62\nmsgid \"The datetime object passed to ``timed_out_until`` was not timezone-aware.\"\nmsgstr \"``timed_out_until`` に渡されたdatetimeオブジェクトがtimezone awareでない場合。\"\n\n#: ../../../discord/member.py:docstring of discord.member.Member.edit:64\nmsgid \"The newly updated member, if applicable. This is not returned if certain fields are passed, such as ``suppress``.\"\nmsgstr \"該当する場合、新しく更新されたメンバー。 ``suppress`` などの一部の項目が更新された場合は返されません。\"\n\n#: ../../../discord/member.py:docstring of discord.member.Member.edit:66\nmsgid \"Optional[:class:`.Member`]\"\nmsgstr \"Optional[:class:`.Member`]\"\n\n#: ../../../discord/member.py:docstring of discord.member.Member.request_to_speak:3\nmsgid \"Request to speak in the connected channel.\"\nmsgstr \"接続されたチャンネルで話すことを要求します。\"\n\n#: ../../../discord/member.py:docstring of discord.member.Member.request_to_speak:5\n#: ../../../discord/member.py:docstring of discord.member.VoiceState:45\nmsgid \"Only applies to stage channels.\"\nmsgstr \"ステージチャンネルにのみ適用されます。\"\n\n#: ../../../discord/member.py:docstring of discord.member.Member.request_to_speak:9\nmsgid \"Requesting members that are not the client is equivalent to :attr:`.edit` providing ``suppress`` as ``False``.\"\nmsgstr \"クライアントでないメンバーをリクエストした場合は、 :attr:`.edit` を、 ``suppress`` パラメータを ``False`` にして呼び出すのと同等です。\"\n\n#: ../../../discord/member.py:docstring of discord.member.Member.request_to_speak:14\nmsgid \"You are not connected to a voice channel.\"\nmsgstr \"ボイスチャンネルに接続していない場合。\"\n\n#: ../../../discord/member.py:docstring of discord.member.Member.move_to:3\nmsgid \"Moves a member to a new voice channel (they must be connected first).\"\nmsgstr \"メンバーを別のボイスチャンネルに移動します。（メンバーは既に接続されていないといけません。）\"\n\n#: ../../../discord/member.py:docstring of discord.member.Member.move_to:5\nmsgid \"You must have :attr:`~Permissions.move_members` to do this.\"\nmsgstr \"これを行うには、 :attr:`~Permissions.move_members` が必要です。\"\n\n#: ../../../discord/member.py:docstring of discord.member.Member.move_to:7\n#: ../../../discord/member.py:docstring of discord.member.Member.timeout:8\nmsgid \"This raises the same exceptions as :meth:`edit`.\"\nmsgstr \":meth:`edit` と同じ例外を送出します。\"\n\n#: ../../../discord/member.py:docstring of discord.member.Member.move_to:9\nmsgid \"Can now pass ``None`` to kick a member from voice.\"\nmsgstr \"``None`` を渡してボイスからメンバーを追放できるようになりました。\"\n\n#: ../../../discord/member.py:docstring of discord.member.Member.move_to:12\nmsgid \"The new voice channel to move the member to. Pass ``None`` to kick them from voice.\"\nmsgstr \"メンバーの移動先のボイスチャンネル。 ``None`` を渡すとボイスから退出させることができます。\"\n\n#: ../../../discord/member.py:docstring of discord.member.Member.timeout:3\nmsgid \"Applies a time out to a member until the specified date time or for the given :class:`datetime.timedelta`.\"\nmsgstr \"指定された日時まで、または与えられた :class:`datetime.timedelta` の間、メンバーをタイムアウトさせます。\"\n\n#: ../../../discord/member.py:docstring of discord.member.Member.timeout:6\nmsgid \"You must have :attr:`~Permissions.moderate_members` to do this.\"\nmsgstr \"これを行うには、 :attr:`~Permissions.moderate_members` が必要です。\"\n\n#: ../../../discord/member.py:docstring of discord.member.Member.timeout:10\nmsgid \"If this is a :class:`datetime.timedelta` then it represents the amount of time the member should be timed out for. If this is a :class:`datetime.datetime` then it's when the member's timeout should expire. If ``None`` is passed then the timeout is removed. Note that the API only allows for timeouts up to 28 days.\"\nmsgstr \"もしこれが :class:`datetime.timedelta` の場合はこれはメンバーがタイムアウトされるべき期間を表します。もしこれが :class:`datetime.datetime` の場合はこれはメンバーのタイムアウトが満了すべき日時です。 ``None`` を渡すとタイムアウトが除去されます。なお、APIがタイムアウトの最大日数を28日に制限していることに注意してください。\"\n\n#: ../../../discord/member.py:docstring of discord.member.Member.timeout:18\nmsgid \"The ``until`` parameter was the wrong type or the datetime was not timezone-aware.\"\nmsgstr \"``until`` パラメータの型が間違っていたか、timezone-awareでない場合。\"\n\n#: ../../../discord/member.py:docstring of discord.member.Member.add_roles:3\nmsgid \"Gives the member a number of :class:`Role`\\\\s.\"\nmsgstr \"メンバーに :class:`Role` を付与します。\"\n\n#: ../../../discord/member.py:docstring of discord.member.Member.add_roles:5\nmsgid \"You must have :attr:`~Permissions.manage_roles` to use this, and the added :class:`Role`\\\\s must appear lower in the list of roles than the highest role of the member.\"\nmsgstr \"これを行うには :attr:`~Permissions.manage_roles` が必要で、また付与された :class:`Role` はメンバーの最高のロールより下の階層にないといけません。\"\n\n#: ../../../discord/member.py:docstring of discord.member.Member.add_roles:9\nmsgid \"An argument list of :class:`abc.Snowflake` representing a :class:`Role` to give to the member.\"\nmsgstr \"メンバーに付与する :class:`Role` である :class:`abc.Snowflake` の引数リスト。\"\n\n#: ../../../discord/member.py:docstring of discord.member.Member.add_roles:12\nmsgid \"The reason for adding these roles. Shows up on the audit log.\"\nmsgstr \"ロールを付与する理由。監査ログに表示されます。\"\n\n#: ../../../discord/member.py:docstring of discord.member.Member.add_roles:14\nmsgid \"Whether to atomically add roles. This will ensure that multiple operations will always be applied regardless of the current state of the cache.\"\nmsgstr \"ロールをアトミックに付与するか。これは現在のキャッシュの状態にかかわらず複数の操作が適用されることを保証します。\"\n\n#: ../../../discord/member.py:docstring of discord.member.Member.add_roles:19\nmsgid \"You do not have permissions to add these roles.\"\nmsgstr \"ロールを付与する権限がない場合。\"\n\n#: ../../../discord/member.py:docstring of discord.member.Member.add_roles:20\nmsgid \"Adding roles failed.\"\nmsgstr \"ロールの付与に失敗した場合。\"\n\n#: ../../../discord/member.py:docstring of discord.member.Member.remove_roles:3\nmsgid \"Removes :class:`Role`\\\\s from this member.\"\nmsgstr \"このメンバーから :class:`Role` を除去します。\"\n\n#: ../../../discord/member.py:docstring of discord.member.Member.remove_roles:5\nmsgid \"You must have :attr:`~Permissions.manage_roles` to use this, and the removed :class:`Role`\\\\s must appear lower in the list of roles than the highest role of the member.\"\nmsgstr \"これを行うには :attr:`~Permissions.manage_roles` が必要で、また除去された :class:`Role` はメンバーの最高のロールより下の階層にないといけません。\"\n\n#: ../../../discord/member.py:docstring of discord.member.Member.remove_roles:9\nmsgid \"An argument list of :class:`abc.Snowflake` representing a :class:`Role` to remove from the member.\"\nmsgstr \"メンバーから除去する :class:`Role` である :class:`abc.Snowflake` の引数リスト。\"\n\n#: ../../../discord/member.py:docstring of discord.member.Member.remove_roles:12\nmsgid \"The reason for removing these roles. Shows up on the audit log.\"\nmsgstr \"ロールを除去する理由。監査ログに表示されます。\"\n\n#: ../../../discord/member.py:docstring of discord.member.Member.remove_roles:14\nmsgid \"Whether to atomically remove roles. This will ensure that multiple operations will always be applied regardless of the current state of the cache.\"\nmsgstr \"ロールをアトミックに除去するか。これは現在のキャッシュの状態にかかわらず複数の操作が適用されることを保証します。\"\n\n#: ../../../discord/member.py:docstring of discord.member.Member.remove_roles:19\nmsgid \"You do not have permissions to remove these roles.\"\nmsgstr \"ロールを除去する権限がない場合。\"\n\n#: ../../../discord/member.py:docstring of discord.member.Member.remove_roles:20\nmsgid \"Removing the roles failed.\"\nmsgstr \"ロールの除去に失敗した場合。\"\n\n#: ../../../discord/member.py:docstring of discord.member.Member.get_role:1\nmsgid \"Returns a role with the given ID from roles which the member has.\"\nmsgstr \"メンバーの持つロールのうち、与えられたIDを持つものを返します。\"\n\n#: ../../../discord/member.py:docstring of discord.member.Member.get_role:8\nmsgid \"The role or ``None`` if not found in the member's roles.\"\nmsgstr \"ロール、またはメンバーのロール内に見つからない場合は ``None`` 。\"\n\n#: ../../../discord/member.py:docstring of discord.member.Member.is_timed_out:1\nmsgid \"Returns whether this member is timed out.\"\nmsgstr \"このメンバーがタイムアウトされているかどうかを返します。\"\n\n#: ../../../discord/member.py:docstring of discord.member.Member.is_timed_out:5\nmsgid \"``True`` if the member is timed out. ``False`` otherwise.\"\nmsgstr \"メンバーがタイムアウトした場合は ``True`` 。そうでなければ、 ``False`` 。\"\n\n#: ../../api.rst:4570\nmsgid \"Spotify\"\nmsgstr \"Spotify\"\n\n#: ../../../discord/activity.py:docstring of discord.activity.Spotify:1\nmsgid \"Represents a Spotify listening activity from Discord. This is a special case of :class:`Activity` that makes it easier to work with the Spotify integration.\"\nmsgstr \"DiscordのSpotifyリスニングアクティビティ。これはSpotify連携サービスの取り扱いを簡単にするようにした :class:`Activity` の特殊なケースです。\"\n\n#: ../../../discord/activity.py:docstring of discord.activity.Spotify:8\n#: ../../../discord/activity.py:docstring of discord.activity.CustomActivity:7\nmsgid \"Checks if two activities are equal.\"\nmsgstr \"2つのアクティビティーが同一か比較します。\"\n\n#: ../../../discord/activity.py:docstring of discord.activity.Spotify:12\n#: ../../../discord/activity.py:docstring of discord.activity.CustomActivity:11\nmsgid \"Checks if two activities are not equal.\"\nmsgstr \"2つのアクティビティーが同一でないか比較します。\"\n\n#: ../../../discord/activity.py:docstring of discord.activity.Spotify:16\n#: ../../../discord/activity.py:docstring of discord.activity.CustomActivity:15\nmsgid \"Returns the activity's hash.\"\nmsgstr \"アクティビティのハッシュ値を返します。\"\n\n#: ../../../discord/activity.py:docstring of discord.activity.Spotify:20\nmsgid \"Returns the string 'Spotify'.\"\nmsgstr \"文字列 'Spotify' を返します。\"\n\n#: ../../../discord/activity.py:docstring of discord.Spotify.type:1\n#: ../../../discord/activity.py:docstring of discord.CustomActivity.type:1\nmsgid \"Returns the activity's type. This is for compatibility with :class:`Activity`.\"\nmsgstr \"アクティビティのタイプを返します。これは :class:`Activity` との互換性のためです。\"\n\n#: ../../../discord/activity.py:docstring of discord.Spotify.type:3\nmsgid \"It always returns :attr:`ActivityType.listening`.\"\nmsgstr \"これは常に :attr:`ActivityType.listening` を返します。\"\n\n#: ../../../discord/activity.py:docstring of discord.Spotify.type:5\n#: ../../../discord/activity.py:docstring of discord.activity.Activity:34\n#: ../../../discord/activity.py:docstring of discord.Game.type:5\n#: ../../../discord/activity.py:docstring of discord.Streaming.type:5\n#: ../../../discord/activity.py:docstring of discord.CustomActivity.type:5\nmsgid \":class:`ActivityType`\"\nmsgstr \":class:`ActivityType`\"\n\n#: ../../../discord/activity.py:docstring of discord.Spotify.created_at:1\nmsgid \"When the user started listening in UTC.\"\nmsgstr \"ユーザーがリスニングを開始したときのUTC時刻。\"\n\n#: ../../../discord/activity.py:docstring of discord.Spotify.colour:1\n#: ../../../discord/activity.py:docstring of discord.Spotify.color:1\nmsgid \"Returns the Spotify integration colour, as a :class:`Colour`.\"\nmsgstr \"Spotifyの連携サービスの色を :class:`Colour` として返します。\"\n\n#: ../../../discord/activity.py:docstring of discord.Spotify.colour:3\nmsgid \"There is an alias for this named :attr:`color`\"\nmsgstr \":attr:`color` という名前のエイリアスが存在します。\"\n\n#: ../../../discord/activity.py:docstring of discord.Spotify.color:3\nmsgid \"There is an alias for this named :attr:`colour`\"\nmsgstr \":attr:`colour` という名前のエイリアスが存在します。\"\n\n#: ../../../discord/activity.py:docstring of discord.Spotify.name:1\nmsgid \"The activity's name. This will always return \\\"Spotify\\\".\"\nmsgstr \"アクティビティの名前。常に「Spotify」が返されます。\"\n\n#: ../../../discord/activity.py:docstring of discord.Spotify.title:1\nmsgid \"The title of the song being played.\"\nmsgstr \"再生中の音楽の題名。\"\n\n#: ../../../discord/activity.py:docstring of discord.Spotify.artists:1\nmsgid \"The artists of the song being played.\"\nmsgstr \"再生中の音楽の演奏者。\"\n\n#: ../../../discord/activity.py:docstring of discord.Spotify.artist:1\nmsgid \"The artist of the song being played.\"\nmsgstr \"再生中の音楽の演奏者。\"\n\n#: ../../../discord/activity.py:docstring of discord.Spotify.artist:3\nmsgid \"This does not attempt to split the artist information into multiple artists. Useful if there's only a single artist.\"\nmsgstr \"これはアーティスト情報を分割しようとしないため、一人しかいない場合に便利です。\"\n\n#: ../../../discord/activity.py:docstring of discord.Spotify.album:1\nmsgid \"The album that the song being played belongs to.\"\nmsgstr \"再生中の音楽が属するアルバム。\"\n\n#: ../../../discord/activity.py:docstring of discord.Spotify.album_cover_url:1\nmsgid \"The album cover image URL from Spotify's CDN.\"\nmsgstr \"Spotify CDNのアルバムカバー画像URL。\"\n\n#: ../../../discord/activity.py:docstring of discord.Spotify.track_id:1\nmsgid \"The track ID used by Spotify to identify this song.\"\nmsgstr \"Spotifyがこの音楽を識別するのに使用するトラックID。\"\n\n#: ../../../discord/activity.py:docstring of discord.Spotify.track_url:1\nmsgid \"The track URL to listen on Spotify.\"\nmsgstr \"Spotify上のトラックURL。\"\n\n#: ../../../discord/activity.py:docstring of discord.Spotify.start:1\nmsgid \"When the user started playing this song in UTC.\"\nmsgstr \"ユーザーが再生を開始したときのUTC時刻。\"\n\n#: ../../../discord/activity.py:docstring of discord.Spotify.end:1\nmsgid \"When the user will stop playing this song in UTC.\"\nmsgstr \"ユーザーが再生を終了する予定のUTC時刻。\"\n\n#: ../../../discord/activity.py:docstring of discord.Spotify.duration:1\nmsgid \"The duration of the song being played.\"\nmsgstr \"再生中の音楽の長さ。\"\n\n#: ../../../discord/activity.py:docstring of discord.Spotify.duration:3\nmsgid \":class:`datetime.timedelta`\"\nmsgstr \":class:`datetime.timedelta`\"\n\n#: ../../../discord/activity.py:docstring of discord.Spotify.party_id:1\nmsgid \"The party ID of the listening party.\"\nmsgstr \"リスニングパーティーのパーティーID。\"\n\n#: ../../api.rst:4578\nmsgid \"VoiceState\"\nmsgstr \"VoiceState\"\n\n#: ../../../discord/member.py:docstring of discord.member.VoiceState:1\nmsgid \"Represents a Discord user's voice state.\"\nmsgstr \"Discordユーザーのボイス状態を表します。\"\n\n#: ../../../discord/member.py:docstring of discord.member.VoiceState:5\nmsgid \"Indicates if the user is currently deafened by the guild.\"\nmsgstr \"ユーザーがギルドによってスピーカーミュートされているかを示します。\"\n\n#: ../../../discord/member.py:docstring of discord.member.VoiceState:11\nmsgid \"Indicates if the user is currently muted by the guild.\"\nmsgstr \"ユーザーがギルドによってミュートされているかを示します。\"\n\n#: ../../../discord/member.py:docstring of discord.member.VoiceState:17\nmsgid \"Indicates if the user is currently muted by their own accord.\"\nmsgstr \"ユーザーが自分の意思によりミュートしているかを示します。\"\n\n#: ../../../discord/member.py:docstring of discord.member.VoiceState:23\nmsgid \"Indicates if the user is currently deafened by their own accord.\"\nmsgstr \"ユーザーが自分の意思によりスピーカーミュートしているかを示します。\"\n\n#: ../../../discord/member.py:docstring of discord.member.VoiceState:29\nmsgid \"Indicates if the user is currently streaming via 'Go Live' feature.\"\nmsgstr \"ユーザーが現在Go Live機能でストリーム中かを示します。\"\n\n#: ../../../discord/member.py:docstring of discord.member.VoiceState:37\nmsgid \"Indicates if the user is currently broadcasting video.\"\nmsgstr \"ユーザーが動画配信中かを示します。\"\n\n#: ../../../discord/member.py:docstring of discord.member.VoiceState:43\nmsgid \"Indicates if the user is suppressed from speaking.\"\nmsgstr \"ユーザーの会話が抑制されているかを示します。\"\n\n#: ../../../discord/member.py:docstring of discord.member.VoiceState:53\nmsgid \"An aware datetime object that specifies the date and time in UTC that the member requested to speak. It will be ``None`` if they are not requesting to speak anymore or have been accepted to speak.\"\nmsgstr \"メンバーが話すことを要求したUTCでの日時を示すaware datetimeオブジェクト。話すことを要求していない場合や要求が承認された場合は ``None`` になります。\"\n\n#: ../../../discord/member.py:docstring of discord.member.VoiceState:57\nmsgid \"Only applicable to stage channels.\"\nmsgstr \"ステージチャンネルにのみ適用されます。\"\n\n#: ../../../discord/member.py:docstring of discord.member.VoiceState:65\nmsgid \"Indicates if the user is currently in the AFK channel in the guild.\"\nmsgstr \"ユーザーがギルドのAFKチャンネルにいるかどうかを示します。\"\n\n#: ../../../discord/member.py:docstring of discord.member.VoiceState:71\nmsgid \"The voice channel that the user is currently connected to. ``None`` if the user is not currently in a voice channel.\"\nmsgstr \"ユーザーが現在接続しているボイスチャンネル。ユーザーがボイスチャンネルに接続していない場合は ``None`` 。\"\n\n#: ../../api.rst:4586\nmsgid \"Emoji\"\nmsgstr \"Emoji\"\n\n#: ../../../discord/emoji.py:docstring of discord.emoji.Emoji:1\nmsgid \"Represents a custom emoji.\"\nmsgstr \"カスタム絵文字を表します。\"\n\n#: ../../../discord/emoji.py:docstring of discord.emoji.Emoji:10\n#: ../../../discord/partial_emoji.py:docstring of discord.partial_emoji.PartialEmoji:12\nmsgid \"Checks if two emoji are the same.\"\nmsgstr \"2つの絵文字が等しいものか比較します。\"\n\n#: ../../../discord/emoji.py:docstring of discord.emoji.Emoji:14\n#: ../../../discord/partial_emoji.py:docstring of discord.partial_emoji.PartialEmoji:16\nmsgid \"Checks if two emoji are not the same.\"\nmsgstr \"2つの絵文字が等しいものではないか比較します。\"\n\n#: ../../../discord/emoji.py:docstring of discord.emoji.Emoji:18\n#: ../../../discord/partial_emoji.py:docstring of discord.partial_emoji.PartialEmoji:20\nmsgid \"Return the emoji's hash.\"\nmsgstr \"絵文字のハッシュ値を返します。\"\n\n#: ../../../discord/emoji.py:docstring of discord.emoji.Emoji:22\nmsgid \"Returns an iterator of ``(field, value)`` pairs. This allows this class to be used as an iterable in list/dict/etc constructions.\"\nmsgstr \"``(field, value)`` ペアのイテレータを返します。これにより、このクラスを list/dictなどの作成時にイテラブルとして使用できます。\"\n\n#: ../../../discord/emoji.py:docstring of discord.emoji.Emoji:27\n#: ../../../discord/partial_emoji.py:docstring of discord.partial_emoji.PartialEmoji:24\nmsgid \"Returns the emoji rendered for discord.\"\nmsgstr \"Discordでレンダリングされる絵文字を返します。\"\n\n#: ../../../discord/emoji.py:docstring of discord.emoji.Emoji:31\nmsgid \"The name of the emoji.\"\nmsgstr \"この絵文字の名前。\"\n\n#: ../../../discord/emoji.py:docstring of discord.emoji.Emoji:43\nmsgid \"If colons are required to use this emoji in the client (:PJSalt: vs PJSalt).\"\nmsgstr \"この絵文字をクライアントで使用する場合にコロンが必要であるかどうか (:PJSalt: vs PJSalt)。\"\n\n#: ../../../discord/emoji.py:docstring of discord.emoji.Emoji:49\nmsgid \"Whether an emoji is animated or not.\"\nmsgstr \"絵文字がアニメーション付きかどうか。\"\n\n#: ../../../discord/emoji.py:docstring of discord.emoji.Emoji:55\nmsgid \"If this emoji is managed by a Twitch integration.\"\nmsgstr \"この絵文字がTwitch連携によって管理されているかどうか。\"\n\n#: ../../../discord/emoji.py:docstring of discord.emoji.Emoji:61\nmsgid \"The guild ID the emoji belongs to.\"\nmsgstr \"絵文字が属するギルドのID。\"\n\n#: ../../../discord/emoji.py:docstring of discord.emoji.Emoji:67\nmsgid \"Whether the emoji is available for use.\"\nmsgstr \"絵文字を使用できるかどうか。\"\n\n#: ../../../discord/emoji.py:docstring of discord.emoji.Emoji:73\nmsgid \"The user that created the emoji. This can only be retrieved using :meth:`Guild.fetch_emoji` and having :attr:`~Permissions.manage_emojis`.\"\nmsgstr \"絵文字を作成したユーザー。これは :meth:`Guild.fetch_emoji` 経由で、かつ :attr:`~Permissions.manage_emojis` を持つユーザーによってのみ取得できます。\"\n\n#: ../../../discord/emoji.py:docstring of discord.Emoji.created_at:1\nmsgid \"Returns the emoji's creation time in UTC.\"\nmsgstr \"絵文字の作成された時間をUTCで返します。\"\n\n#: ../../../discord/emoji.py:docstring of discord.Emoji.url:1\nmsgid \"Returns the URL of the emoji.\"\nmsgstr \"絵文字の URL を返します。\"\n\n#: ../../../discord/emoji.py:docstring of discord.Emoji.roles:1\nmsgid \"A :class:`list` of roles that is allowed to use this emoji.\"\nmsgstr \"この絵文字を使用することが許可されているロールの :class:`list` 。\"\n\n#: ../../../discord/emoji.py:docstring of discord.Emoji.roles:3\nmsgid \"If roles is empty, the emoji is unrestricted.\"\nmsgstr \"これが空の場合、制限はありません。\"\n\n#: ../../../discord/emoji.py:docstring of discord.Emoji.guild:1\nmsgid \"The guild this emoji belongs to.\"\nmsgstr \"絵文字が属するギルド。\"\n\n#: ../../../discord/emoji.py:docstring of discord.emoji.Emoji.is_usable:1\nmsgid \":class:`bool`: Whether the bot can use this emoji.\"\nmsgstr \":class:`bool`: ボットがこの絵文字を使用できるかどうか。\"\n\n#: ../../../discord/emoji.py:docstring of discord.emoji.Emoji.delete:3\nmsgid \"Deletes the custom emoji.\"\nmsgstr \"カスタム絵文字を削除します。\"\n\n#: ../../../discord/emoji.py:docstring of discord.emoji.Emoji.edit:3\nmsgid \"Edits the custom emoji.\"\nmsgstr \"カスタム絵文字を編集します。\"\n\n#: ../../../discord/emoji.py:docstring of discord.emoji.Emoji.edit:7\nmsgid \"The newly updated emoji is returned.\"\nmsgstr \"新しく更新された絵文字が返されるようになりました。\"\n\n#: ../../../discord/emoji.py:docstring of discord.emoji.Emoji.edit:10\nmsgid \"The new emoji name.\"\nmsgstr \"新しい絵文字の名前。\"\n\n#: ../../../discord/emoji.py:docstring of discord.emoji.Emoji.edit:12\nmsgid \"A list of roles that can use this emoji. An empty list can be passed to make it available to everyone.\"\nmsgstr \"この絵文字を使用できるロールのリスト。空のリストを渡すと、誰でも使えるようになります。\"\n\n#: ../../../discord/emoji.py:docstring of discord.emoji.Emoji.edit:14\nmsgid \"The reason for editing this emoji. Shows up on the audit log.\"\nmsgstr \"絵文字を編集する理由。監査ログに表示されます。\"\n\n#: ../../../discord/emoji.py:docstring of discord.emoji.Emoji.edit:17\nmsgid \"You are not allowed to edit emojis.\"\nmsgstr \"絵文字を編集する権限がない場合。\"\n\n#: ../../../discord/emoji.py:docstring of discord.emoji.Emoji.edit:18\nmsgid \"An error occurred editing the emoji.\"\nmsgstr \"絵文字の編集中にエラーが発生した場合。\"\n\n#: ../../../discord/emoji.py:docstring of discord.emoji.Emoji.edit:20\nmsgid \"The newly updated emoji.\"\nmsgstr \"新しく更新された絵文字。\"\n\n#: ../../api.rst:4595\nmsgid \"PartialEmoji\"\nmsgstr \"PartialEmoji\"\n\n#: ../../../discord/partial_emoji.py:docstring of discord.partial_emoji.PartialEmoji:1\nmsgid \"Represents a \\\"partial\\\" emoji.\"\nmsgstr \"「部分的な」絵文字を表します。\"\n\n#: ../../../discord/partial_emoji.py:docstring of discord.partial_emoji.PartialEmoji:3\nmsgid \"This model will be given in two scenarios:\"\nmsgstr \"これは以下の2つの場合に提供されます：\"\n\n#: ../../../discord/partial_emoji.py:docstring of discord.partial_emoji.PartialEmoji:5\nmsgid \"\\\"Raw\\\" data events such as :func:`on_raw_reaction_add`\"\nmsgstr \":func:`on_raw_reaction_add` といった「生の」データイベント\"\n\n#: ../../../discord/partial_emoji.py:docstring of discord.partial_emoji.PartialEmoji:6\nmsgid \"Custom emoji that the bot cannot see from e.g. :attr:`Message.reactions`\"\nmsgstr \":attr:`Message.reactions` などから取得した、ボットが見ることのできないカスタム絵文字\"\n\n#: ../../../discord/partial_emoji.py:docstring of discord.partial_emoji.PartialEmoji:28\nmsgid \"The custom emoji name, if applicable, or the unicode codepoint of the non-custom emoji. This can be ``None`` if the emoji got deleted (e.g. removing a reaction with a deleted emoji).\"\nmsgstr \"カスタム絵文字の名前か、カスタム絵文字でない絵文字のユニコードコードポイント。これは絵文字が削除されていた場合（例：削除された絵文字のリアクションを除去する場合） ``None`` になります。\"\n\n#: ../../../discord/partial_emoji.py:docstring of discord.partial_emoji.PartialEmoji:36\nmsgid \"Whether the emoji is animated or not.\"\nmsgstr \"絵文字がアニメーション付きかどうか。\"\n\n#: ../../../discord/partial_emoji.py:docstring of discord.partial_emoji.PartialEmoji:42\nmsgid \"The ID of the custom emoji, if applicable.\"\nmsgstr \"該当する場合、カスタム絵文字のID。\"\n\n#: ../../../discord/partial_emoji.py:docstring of discord.partial_emoji.PartialEmoji.from_str:1\nmsgid \"Converts a Discord string representation of an emoji to a :class:`PartialEmoji`.\"\nmsgstr \"Discordの文字列形式で表現された絵文字を :class:`PartialEmoji` に変換します。\"\n\n#: ../../../discord/partial_emoji.py:docstring of discord.partial_emoji.PartialEmoji.from_str:3\nmsgid \"The formats accepted are:\"\nmsgstr \"以下の形式が利用できます：\"\n\n#: ../../../discord/partial_emoji.py:docstring of discord.partial_emoji.PartialEmoji.from_str:5\nmsgid \"``a:name:id``\"\nmsgstr \"``a:name:id``\"\n\n#: ../../../discord/partial_emoji.py:docstring of discord.partial_emoji.PartialEmoji.from_str:6\nmsgid \"``<a:name:id>``\"\nmsgstr \"``<a:name:id>``\"\n\n#: ../../../discord/partial_emoji.py:docstring of discord.partial_emoji.PartialEmoji.from_str:7\nmsgid \"``name:id``\"\nmsgstr \"``name:id``\"\n\n#: ../../../discord/partial_emoji.py:docstring of discord.partial_emoji.PartialEmoji.from_str:8\nmsgid \"``<:name:id>``\"\nmsgstr \"``<:name:id>``\"\n\n#: ../../../discord/partial_emoji.py:docstring of discord.partial_emoji.PartialEmoji.from_str:10\nmsgid \"If the format does not match then it is assumed to be a unicode emoji.\"\nmsgstr \"これらの形式に当てはまらない場合はユニコード絵文字とみなされます。\"\n\n#: ../../../discord/partial_emoji.py:docstring of discord.partial_emoji.PartialEmoji.from_str:14\nmsgid \"The string representation of an emoji.\"\nmsgstr \"絵文字の文字列表現。\"\n\n#: ../../../discord/partial_emoji.py:docstring of discord.partial_emoji.PartialEmoji.from_str:17\nmsgid \"The partial emoji from this string.\"\nmsgstr \"この文字列に含まれる部分的な絵文字。\"\n\n#: ../../../discord/partial_emoji.py:docstring of discord.partial_emoji.PartialEmoji.from_str:18\n#: ../../../discord/raw_models.py:docstring of discord.raw_models.RawReactionActionEvent:32\n#: ../../../discord/raw_models.py:docstring of discord.raw_models.RawReactionClearEmojiEvent:27\nmsgid \":class:`PartialEmoji`\"\nmsgstr \":class:`PartialEmoji`\"\n\n#: ../../../discord/partial_emoji.py:docstring of discord.partial_emoji.PartialEmoji.is_custom_emoji:1\nmsgid \":class:`bool`: Checks if this is a custom non-Unicode emoji.\"\nmsgstr \":class:`bool`: その絵文字がユニコード絵文字ではなく、カスタム絵文字であるかを確認します。\"\n\n#: ../../../discord/partial_emoji.py:docstring of discord.partial_emoji.PartialEmoji.is_unicode_emoji:1\nmsgid \":class:`bool`: Checks if this is a Unicode emoji.\"\nmsgstr \":class:`bool`: その絵文字がユニコード絵文字であるかを確認します。\"\n\n#: ../../../discord/partial_emoji.py:docstring of discord.PartialEmoji.created_at:1\nmsgid \"Returns the emoji's creation time in UTC, or None if Unicode emoji.\"\nmsgstr \"UTCで絵文字の作成時刻を返します。ユニコード絵文字の場合は None を返します。\"\n\n#: ../../../discord/partial_emoji.py:docstring of discord.PartialEmoji.url:1\nmsgid \"Returns the URL of the emoji, if it is custom.\"\nmsgstr \"もし絵文字がカスタム絵文字なら、その絵文字のURLを返します。\"\n\n#: ../../../discord/partial_emoji.py:docstring of discord.PartialEmoji.url:3\nmsgid \"If this isn't a custom emoji then an empty string is returned\"\nmsgstr \"これがカスタム絵文字でない場合は、空の文字列が返されます。\"\n\n#: ../../../discord/partial_emoji.py:docstring of discord.partial_emoji.PartialEmoji.read:8\nmsgid \"The PartialEmoji is not a custom emoji.\"\nmsgstr \"PartialEmojiがカスタム絵文字でない場合。\"\n\n#: ../../api.rst:4604\nmsgid \"Role\"\nmsgstr \"Role\"\n\n#: ../../../discord/role.py:docstring of discord.role.Role:1\nmsgid \"Represents a Discord role in a :class:`Guild`.\"\nmsgstr \":class:`Guild` のDiscordのロール。\"\n\n#: ../../../discord/role.py:docstring of discord.role.Role:7\nmsgid \"Checks if two roles are equal.\"\nmsgstr \"二つのロールが等しいかを比較します。\"\n\n#: ../../../discord/role.py:docstring of discord.role.Role:11\nmsgid \"Checks if two roles are not equal.\"\nmsgstr \"二つのロールが等しいものではないか比較します。\"\n\n#: ../../../discord/role.py:docstring of discord.role.Role:15\nmsgid \"Checks if a role is higher than another in the hierarchy.\"\nmsgstr \"そのロールがもう1つのロールと比べて、階層において順位が上かを比較します。\"\n\n#: ../../../discord/role.py:docstring of discord.role.Role:19\nmsgid \"Checks if a role is lower than another in the hierarchy.\"\nmsgstr \"そのロールがもう1つのロールと比べて、階層において順位が下かを比較します。\"\n\n#: ../../../discord/role.py:docstring of discord.role.Role:23\nmsgid \"Checks if a role is higher or equal to another in the hierarchy.\"\nmsgstr \"そのロールがもう1つのロールと比べて、階層において順位が同じ、または上かを比較します。\"\n\n#: ../../../discord/role.py:docstring of discord.role.Role:27\nmsgid \"Checks if a role is lower or equal to another in the hierarchy.\"\nmsgstr \"そのロールがもう1つのロールと比べて、階層において順位が同じ、または下かを比較します。\"\n\n#: ../../../discord/role.py:docstring of discord.role.Role:31\nmsgid \"Return the role's hash.\"\nmsgstr \"ロールのハッシュを返します。\"\n\n#: ../../../discord/role.py:docstring of discord.role.Role:35\nmsgid \"Returns the role's name.\"\nmsgstr \"ロールの名前を返します。\"\n\n#: ../../../discord/role.py:docstring of discord.role.Role:39\nmsgid \"The ID for the role.\"\nmsgstr \"ロールのID。\"\n\n#: ../../../discord/role.py:docstring of discord.role.Role:45\nmsgid \"The name of the role.\"\nmsgstr \"ロールの名前。\"\n\n#: ../../../discord/role.py:docstring of discord.role.Role:51\nmsgid \"The guild the role belongs to.\"\nmsgstr \"ロールが属するギルド。\"\n\n#: ../../../discord/role.py:docstring of discord.role.Role:57\nmsgid \"Indicates if the role will be displayed separately from other members.\"\nmsgstr \"ロールが他のメンバーとは別に表示されるかどうかを示します。\"\n\n#: ../../../discord/role.py:docstring of discord.role.Role:63\nmsgid \"The position of the role. This number is usually positive. The bottom role has a position of 0.\"\nmsgstr \"ロールの位置。この数値は通常正です。一番下のロールの位置は 0 です。\"\n\n#: ../../../discord/role.py:docstring of discord.role.Role:68\nmsgid \"Multiple roles can have the same position number. As a consequence of this, comparing via role position is prone to subtle bugs if checking for role hierarchy. The recommended and correct way to compare for roles in the hierarchy is using the comparison operators on the role objects themselves.\"\nmsgstr \"複数のロールが同じ位置番号を持つことがあります。このため、ロールの位置の比較はロール階層の確認時にバグの原因となります。ロール階層を比較するときの推奨され、正しい方法はロールオブジェクトそのものへの比較演算子の使用です。\"\n\n#: ../../../discord/role.py:docstring of discord.role.Role:78\nmsgid \"The role's unicode emoji, if available.\"\nmsgstr \"存在する場合、ロールのユニコード絵文字。\"\n\n#: ../../../discord/role.py:docstring of discord.role.Role:82\nmsgid \"If :attr:`icon` is not ``None``, it is displayed as role icon instead of the unicode emoji under this attribute.\"\nmsgstr \"もし :attr:`icon` が ``None`` でない場合、このユニコード絵文字ではなくそのアイコンがロールアイコンとして表示されます。\"\n\n#: ../../../discord/role.py:docstring of discord.role.Role:85\n#: ../../../discord/role.py:docstring of discord.Role.icon:7\nmsgid \"If you want the icon that a role has displayed, consider using :attr:`display_icon`.\"\nmsgstr \"ロールに表示されるアイコンを取得したい場合は、 :attr:`display_icon` を使用してみてください。\"\n\n#: ../../../discord/role.py:docstring of discord.role.Role:93\nmsgid \"Indicates if the role is managed by the guild through some form of integrations such as Twitch.\"\nmsgstr \"このロールが、Twitchのような連携サービスを通じてギルドによって管理されているかどうかを示します。\"\n\n#: ../../../discord/role.py:docstring of discord.role.Role:100\nmsgid \"Indicates if the role can be mentioned by users.\"\nmsgstr \"ロールがユーザーによってメンションできるかどうかを示します。\"\n\n#: ../../../discord/role.py:docstring of discord.role.Role:106\nmsgid \"The role tags associated with this role.\"\nmsgstr \"このロールに関連付けられているロールタグ。\"\n\n#: ../../../discord/role.py:docstring of discord.role.Role:108\nmsgid \"Optional[:class:`RoleTags`]\"\nmsgstr \"Optional[:class:`RoleTags`]\"\n\n#: ../../../discord/role.py:docstring of discord.role.Role.is_default:1\nmsgid \":class:`bool`: Checks if the role is the default role.\"\nmsgstr \":class:`bool`: ロールがデフォルトのロールであるかどうかをチェックします。\"\n\n#: ../../../discord/role.py:docstring of discord.role.Role.is_bot_managed:1\n#: ../../../discord/role.py:docstring of discord.role.RoleTags.is_bot_managed:1\nmsgid \":class:`bool`: Whether the role is associated with a bot.\"\nmsgstr \":class:`bool`: ロールがボットに関連付けられているかどうか。\"\n\n#: ../../../discord/role.py:docstring of discord.role.Role.is_premium_subscriber:1\n#: ../../../discord/role.py:docstring of discord.role.RoleTags.is_premium_subscriber:1\nmsgid \":class:`bool`: Whether the role is the premium subscriber, AKA \\\"boost\\\", role for the guild.\"\nmsgstr \":class:`bool`: ロールがギルドのプレミアムサブスクライバー、すなわち「ブースト」のロールかどうか。\"\n\n#: ../../../discord/role.py:docstring of discord.role.Role.is_integration:1\n#: ../../../discord/role.py:docstring of discord.role.RoleTags.is_integration:1\nmsgid \":class:`bool`: Whether the role is managed by an integration.\"\nmsgstr \":class:`bool`: ロールが連携サービスによって管理されているかどうか。\"\n\n#: ../../../discord/role.py:docstring of discord.role.Role.is_assignable:1\nmsgid \":class:`bool`: Whether the role is able to be assigned or removed by the bot.\"\nmsgstr \":class:`bool`: ロールがボットによって割り当て・削除できるかどうか。\"\n\n#: ../../../discord/role.py:docstring of discord.Role.permissions:1\nmsgid \"Returns the role's permissions.\"\nmsgstr \"ロールの権限を返します。\"\n\n#: ../../../discord/role.py:docstring of discord.Role.colour:1\nmsgid \"Returns the role colour. An alias exists under ``color``.\"\nmsgstr \"ロールの色を返します。これのエイリアスとして、 ``colour`` が存在します。\"\n\n#: ../../../discord/role.py:docstring of discord.Role.color:1\nmsgid \"Returns the role color. An alias exists under ``colour``.\"\nmsgstr \"ロールの色を返します。これのエイリアスとして、``colour`` が存在します。\"\n\n#: ../../../discord/role.py:docstring of discord.Role.icon:1\nmsgid \"Returns the role's icon asset, if available.\"\nmsgstr \"利用できる場合、ロールのアイコンのアセットを返します。\"\n\n#: ../../../discord/role.py:docstring of discord.Role.icon:4\nmsgid \"If this is ``None``, the role might instead have unicode emoji as its icon if :attr:`unicode_emoji` is not ``None``.\"\nmsgstr \"これが ``None`` のときで、 :attr:`unicode_emoji` が ``None`` でない場合、ロールは ユニコード絵文字をアイコンとして使用しているかもしれません。\"\n\n#: ../../../discord/role.py:docstring of discord.Role.display_icon:1\nmsgid \"Returns the role's display icon, if available.\"\nmsgstr \"利用できる場合、ロールに表示されるアイコンを返します。\"\n\n#: ../../../discord/role.py:docstring of discord.Role.display_icon:5\nmsgid \"Optional[Union[:class:`.Asset`, :class:`str`]]\"\nmsgstr \"Optional[Union[:class:`.Asset`, :class:`str`]]\"\n\n#: ../../../discord/role.py:docstring of discord.Role.created_at:1\nmsgid \"Returns the role's creation time in UTC.\"\nmsgstr \"ロールの作成時刻をUTCで返します。\"\n\n#: ../../../discord/role.py:docstring of discord.Role.mention:1\nmsgid \"Returns a string that allows you to mention a role.\"\nmsgstr \"ロールをメンションすることのできる文字列を返します。\"\n\n#: ../../../discord/role.py:docstring of discord.Role.members:1\nmsgid \"Returns all the members with this role.\"\nmsgstr \"このロールを持つすべてのメンバーを返します。\"\n\n#: ../../../discord/role.py:docstring of discord.Role.flags:1\nmsgid \"Returns the role's flags.\"\nmsgstr \"\"\n\n#: ../../../discord/role.py:docstring of discord.Role.flags:5\nmsgid \":class:`RoleFlags`\"\nmsgstr \"\"\n\n#: ../../../discord/role.py:docstring of discord.role.Role.edit:3\nmsgid \"Edits the role.\"\nmsgstr \"ロールを編集します。\"\n\n#: ../../../discord/role.py:docstring of discord.role.Role.edit:12\nmsgid \"Edits are no longer in-place, the newly edited role is returned instead.\"\nmsgstr \"編集はロールを置き換えず、編集された新しいロールが返されるようになりました。\"\n\n#: ../../../discord/role.py:docstring of discord.role.Role.edit:22\nmsgid \"The new role name to change to.\"\nmsgstr \"変更する新しいロール名。\"\n\n#: ../../../discord/role.py:docstring of discord.role.Role.edit:24\nmsgid \"The new permissions to change to.\"\nmsgstr \"変更する新しい権限。\"\n\n#: ../../../discord/role.py:docstring of discord.role.Role.edit:26\nmsgid \"The new colour to change to. (aliased to color as well)\"\nmsgstr \"変更後の色。（colorというエイリアスも存在します。）\"\n\n#: ../../../discord/role.py:docstring of discord.role.Role.edit:28\nmsgid \"Indicates if the role should be shown separately in the member list.\"\nmsgstr \"メンバーリストにロールを他と分けて表示するかどうかを示します。\"\n\n#: ../../../discord/role.py:docstring of discord.role.Role.edit:30\nmsgid \"A :term:`py:bytes-like object` representing the icon or :class:`str` representing unicode emoji that should be used as a role icon. Could be ``None`` to denote removal of the icon. Only PNG/JPEG is supported. This is only available to guilds that contain ``ROLE_ICONS`` in :attr:`Guild.features`.\"\nmsgstr \"ロールのアイコンとして使用すべきアイコンを表す :term:`py:bytes-like object` またはユニコード絵文字を表す :class:`str` 。アイコンを除去する場合 ``None`` を渡せます。PNGとJPEGのみサポートしています。これは :attr:`Guild.features` に ``ROLE_ICONS`` を含むギルドでのみ利用可能です。\"\n\n#: ../../../discord/role.py:docstring of discord.role.Role.edit:36\nmsgid \"Indicates if the role should be mentionable by others.\"\nmsgstr \"ロールがユーザーによってメンションできるかどうかを示します。\"\n\n#: ../../../discord/role.py:docstring of discord.role.Role.edit:38\nmsgid \"The new role's position. This must be below your top role's position or it will fail.\"\nmsgstr \"新しいロールの位置。これはあなたの最高位のロールより下位でないといけません。\"\n\n#: ../../../discord/role.py:docstring of discord.role.Role.edit:41\nmsgid \"The reason for editing this role. Shows up on the audit log.\"\nmsgstr \"ロールを編集する理由。監査ログに表示されます。\"\n\n#: ../../../discord/role.py:docstring of discord.role.Role.edit:44\nmsgid \"You do not have permissions to change the role.\"\nmsgstr \"ロールを変更する権限がない場合。\"\n\n#: ../../../discord/role.py:docstring of discord.role.Role.edit:45\nmsgid \"Editing the role failed.\"\nmsgstr \"ロールの編集に失敗した場合。\"\n\n#: ../../../discord/role.py:docstring of discord.role.Role.edit:46\nmsgid \"An invalid position was given or the default     role was asked to be moved.\"\nmsgstr \"無効なポジションが与えられたか、デフォルトのロールを移動するように求めた場合。\"\n\n#: ../../../discord/role.py:docstring of discord.role.Role.edit:48\nmsgid \"The newly edited role.\"\nmsgstr \"新しく編集されたロール。\"\n\n#: ../../../discord/role.py:docstring of discord.role.Role.delete:3\nmsgid \"Deletes the role.\"\nmsgstr \"ロールを削除します。\"\n\n#: ../../../discord/role.py:docstring of discord.role.Role.delete:7\nmsgid \"The reason for deleting this role. Shows up on the audit log.\"\nmsgstr \"ロールを削除する理由。監査ログに表示されます。\"\n\n#: ../../../discord/role.py:docstring of discord.role.Role.delete:10\nmsgid \"You do not have permissions to delete the role.\"\nmsgstr \"ロールを削除する権限がない場合。\"\n\n#: ../../../discord/role.py:docstring of discord.role.Role.delete:11\nmsgid \"Deleting the role failed.\"\nmsgstr \"ロールの削除に失敗した場合。\"\n\n#: ../../api.rst:4612\nmsgid \"RoleTags\"\nmsgstr \"RoleTags\"\n\n#: ../../../discord/role.py:docstring of discord.role.RoleTags:1\nmsgid \"Represents tags on a role.\"\nmsgstr \"ロールのタグ。\"\n\n#: ../../../discord/role.py:docstring of discord.role.RoleTags:3\nmsgid \"A role tag is a piece of extra information attached to a managed role that gives it context for the reason the role is managed.\"\nmsgstr \"ロールタグは、管理されたロールに付属のロールが管理されている理由に関する追加情報です。\"\n\n#: ../../../discord/role.py:docstring of discord.role.RoleTags:6\nmsgid \"While this can be accessed, a useful interface is also provided in the :class:`Role` and :class:`Guild` classes as well.\"\nmsgstr \"これにアクセスすることもできますが、 :class:`Role` と :class:`Guild` クラスにも便利なインターフェイスがあります。\"\n\n#: ../../../discord/role.py:docstring of discord.role.RoleTags:13\nmsgid \"The bot's user ID that manages this role.\"\nmsgstr \"ロールを管理するボットのユーザーID。\"\n\n#: ../../../discord/role.py:docstring of discord.role.RoleTags:19\nmsgid \"The integration ID that manages the role.\"\nmsgstr \"ロールを管理する連携サービスID。\"\n\n#: ../../../discord/role.py:docstring of discord.role.RoleTags:25\nmsgid \"The ID of this role's subscription SKU and listing.\"\nmsgstr \"このロールのサブスクリプションSKUとリスティングのID。\"\n\n#: ../../../discord/role.py:docstring of discord.role.RoleTags.is_available_for_purchase:1\nmsgid \":class:`bool`: Whether the role is available for purchase.\"\nmsgstr \":class:`bool`: ロールが購入可能かどうか。\"\n\n#: ../../../discord/role.py:docstring of discord.role.RoleTags.is_guild_connection:1\nmsgid \":class:`bool`: Whether the role is a guild's linked role.\"\nmsgstr \":class:`bool`: ロールがギルドの関連付けられたロールかどうか。\"\n\n#: ../../api.rst:4620\nmsgid \"PartialMessageable\"\nmsgstr \"PartialMessageable\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.PartialMessageable:1\nmsgid \"Represents a partial messageable to aid with working messageable channels when only a channel ID is present.\"\nmsgstr \"チャンネルIDのみ存在する場合にメッセージ可能なチャンネルとの作業を簡単にする部分的なメッセージ可能チャンネル。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.PartialMessageable:4\nmsgid \"The only way to construct this class is through :meth:`Client.get_partial_messageable`.\"\nmsgstr \"これは :meth:`Client.get_partial_messageable` によってのみ作成できます。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.PartialMessageable:6\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage:13\nmsgid \"Note that this class is trimmed down and has no rich attributes.\"\nmsgstr \"これは機能が削られていてリッチな属性を持ちません。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.PartialMessageable:14\nmsgid \"Checks if two partial messageables are equal.\"\nmsgstr \"二つの部分的なメッセージ可能チャンネルが等しいかを比較します。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.PartialMessageable:18\nmsgid \"Checks if two partial messageables are not equal.\"\nmsgstr \"二つの部分的なメッセージ可能チャンネルが等しくないかを比較します。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.PartialMessageable:22\nmsgid \"Returns the partial messageable's hash.\"\nmsgstr \"部分的なメッセージ可能チャンネルのハッシュ値を返します。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.PartialMessageable:26\nmsgid \"The channel ID associated with this partial messageable.\"\nmsgstr \"この部分的なメッセージ可能チャンネルのID。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.PartialMessageable:32\nmsgid \"The guild ID associated with this partial messageable.\"\nmsgstr \"この部分的なメッセージ可能チャンネルに関連付けられたギルドID。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.PartialMessageable:38\nmsgid \"The channel type associated with this partial messageable, if given.\"\nmsgstr \"与えられた場合、この部分的なメッセージ可能チャンネルのチャンネルタイプ。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.PartialMessageable:40\nmsgid \"Optional[:class:`ChannelType`]\"\nmsgstr \"Optional[:class:`ChannelType`]\"\n\n#: ../../../discord/channel.py:docstring of discord.PartialMessageable.guild:1\nmsgid \"The guild this partial messageable is in.\"\nmsgstr \"この部分的なメッセージ可能チャンネルが属するギルド。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.PartialMessageable.permissions_for:1\n#: ../../../discord/channel.py:docstring of discord.channel.DMChannel.permissions_for:1\n#: ../../../discord/channel.py:docstring of discord.channel.GroupChannel.permissions_for:1\nmsgid \"Handles permission resolution for a :class:`User`.\"\nmsgstr \":class:`User` の権限を解決します。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.PartialMessageable.permissions_for:3\n#: ../../../discord/channel.py:docstring of discord.channel.DMChannel.permissions_for:3\n#: ../../../discord/channel.py:docstring of discord.channel.GroupChannel.permissions_for:3\nmsgid \"This function is there for compatibility with other channel types.\"\nmsgstr \"この機能は他のチャンネルタイプとの互換性のためにあります。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.PartialMessageable.permissions_for:5\nmsgid \"Since partial messageables cannot reasonably have the concept of permissions, this will always return :meth:`Permissions.none`.\"\nmsgstr \"部分的なメッセージ可能チャンネルには権限の概念がないため、これは常に :meth:`Permissions.none` を返します。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.PartialMessageable.permissions_for:8\n#: ../../../discord/channel.py:docstring of discord.channel.DMChannel.permissions_for:24\nmsgid \"The user to check permissions for. This parameter is ignored but kept for compatibility with other ``permissions_for`` methods.\"\nmsgstr \"権限を確認するユーザー。このパラメータは他の ``permissions_for`` メソッドとの互換性のためにあり、無視されます。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.PartialMessageable.permissions_for:12\n#: ../../../discord/channel.py:docstring of discord.channel.DMChannel.permissions_for:28\nmsgid \"The resolved permissions.\"\nmsgstr \"解決された権限。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.PartialMessageable.get_partial_message:1\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.get_partial_message:1\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.get_partial_message:1\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.get_partial_message:1\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.get_partial_message:1\nmsgid \"Creates a :class:`PartialMessage` from the message ID.\"\nmsgstr \"メッセージIDから :class:`PartialMessage` を作成します。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.PartialMessageable.get_partial_message:3\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.get_partial_message:3\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.get_partial_message:3\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.get_partial_message:3\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.get_partial_message:3\nmsgid \"This is useful if you want to work with a message and only have its ID without doing an unnecessary API call.\"\nmsgstr \"これは、IDしかない場合に不必要なAPI呼び出しなくメッセージに関する作業をする時に便利です。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.PartialMessageable.get_partial_message:6\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.get_partial_message:12\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.get_partial_message:8\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.get_partial_message:8\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.get_partial_message:8\nmsgid \"The message ID to create a partial message for.\"\nmsgstr \"部分的なメッセージのID。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.PartialMessageable.get_partial_message:9\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.get_partial_message:15\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.get_partial_message:11\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.get_partial_message:11\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.get_partial_message:11\nmsgid \"The partial message.\"\nmsgstr \"部分的なメッセージ。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.PartialMessageable.get_partial_message:10\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.get_partial_message:16\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.get_partial_message:12\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.get_partial_message:12\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.get_partial_message:12\nmsgid \":class:`PartialMessage`\"\nmsgstr \":class:`PartialMessage`\"\n\n#: ../../api.rst:4629\nmsgid \"TextChannel\"\nmsgstr \"TextChannel\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel:1\nmsgid \"Represents a Discord guild text channel.\"\nmsgstr \"Discordギルドのテキストチャンネル。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel:7\n#: ../../../discord/channel.py:docstring of discord.channel.VoiceChannel:7\n#: ../../../discord/channel.py:docstring of discord.channel.StageChannel:9\n#: ../../../discord/channel.py:docstring of discord.channel.CategoryChannel:9\n#: ../../../discord/channel.py:docstring of discord.channel.DMChannel:7\nmsgid \"Checks if two channels are equal.\"\nmsgstr \"二つのチャンネルが等しいかを比較します。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel:11\n#: ../../../discord/channel.py:docstring of discord.channel.VoiceChannel:11\n#: ../../../discord/channel.py:docstring of discord.channel.StageChannel:13\n#: ../../../discord/channel.py:docstring of discord.channel.CategoryChannel:13\n#: ../../../discord/channel.py:docstring of discord.channel.DMChannel:11\nmsgid \"Checks if two channels are not equal.\"\nmsgstr \"二つのチャンネルが等しいものではないか比較します。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel:15\n#: ../../../discord/channel.py:docstring of discord.channel.VoiceChannel:15\n#: ../../../discord/channel.py:docstring of discord.channel.StageChannel:17\n#: ../../../discord/channel.py:docstring of discord.channel.DMChannel:15\n#: ../../../discord/channel.py:docstring of discord.channel.GroupChannel:15\nmsgid \"Returns the channel's hash.\"\nmsgstr \"チャンネルのハッシュ値を返します。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel:19\n#: ../../../discord/channel.py:docstring of discord.channel.VoiceChannel:19\n#: ../../../discord/channel.py:docstring of discord.channel.StageChannel:21\nmsgid \"Returns the channel's name.\"\nmsgstr \"チャンネルの名前を返します。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel:35\n#: ../../../discord/channel.py:docstring of discord.channel.VoiceChannel:35\n#: ../../../discord/channel.py:docstring of discord.channel.StageChannel:37\nmsgid \"The channel ID.\"\nmsgstr \"チャンネルのID。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel:41\n#: ../../../discord/channel.py:docstring of discord.channel.VoiceChannel:49\n#: ../../../discord/channel.py:docstring of discord.channel.StageChannel:57\nmsgid \"The category channel ID this channel belongs to, if applicable.\"\nmsgstr \"該当する場合、このチャンネルが属するカテゴリチャンネルのID。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel:47\nmsgid \"The channel's topic. ``None`` if it doesn't exist.\"\nmsgstr \"チャンネルのトピック。存在しない場合は ``None`` になります。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel:60\n#: ../../../discord/channel.py:docstring of discord.channel.VoiceChannel:94\n#: ../../../discord/channel.py:docstring of discord.channel.StageChannel:97\nmsgid \"The last message ID of the message sent to this channel. It may *not* point to an existing or valid message.\"\nmsgstr \"このチャンネルに送信された最後のメッセージのID。既存または有効なメッセージを指して *いない* 場合があります。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel:67\n#: ../../../discord/channel.py:docstring of discord.channel.VoiceChannel:103\n#: ../../../discord/channel.py:docstring of discord.channel.StageChannel:106\nmsgid \"The number of seconds a member must wait between sending messages in this channel. A value of ``0`` denotes that it is disabled. Bots and users with :attr:`~Permissions.manage_channels` or :attr:`~Permissions.manage_messages` bypass slowmode.\"\nmsgstr \"このチャンネルにメッセージを送信する間にメンバーが待たなければいけない時間。値が ``0`` の場合これは無効です。ボットやユーザーが :attr:`~Permissions.manage_channels` か :attr:`~Permissions.manage_messages` 権限を有する場合低速モードを回避できます。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel:76\n#: ../../../discord/channel.py:docstring of discord.channel.VoiceChannel:41\n#: ../../../discord/channel.py:docstring of discord.channel.StageChannel:43\nmsgid \"If the channel is marked as \\\"not safe for work\\\" or \\\"age restricted\\\".\"\nmsgstr \"チャンネルに年齢制限がかかっているか。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel:82\nmsgid \"The default auto archive duration in minutes for threads created in this channel.\"\nmsgstr \"このチャンネルで作成されたスレッドのデフォルトの分単位の自動アーカイブ期間。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel:90\nmsgid \"The default slowmode delay in seconds for threads created in this channel.\"\nmsgstr \"このチャンネルで作成されたスレッドの、デフォルトの秒単位の低速モードレート制限。\"\n\n#: ../../../discord/channel.py:docstring of discord.TextChannel.type:1\n#: ../../../discord/channel.py:docstring of discord.ForumChannel.type:1\n#: ../../../discord/threads.py:docstring of discord.Thread.type:1\n#: ../../../discord/channel.py:docstring of discord.VoiceChannel.type:1\n#: ../../../discord/channel.py:docstring of discord.StageChannel.type:1\nmsgid \"The channel's Discord type.\"\nmsgstr \"チャンネルのDiscordタイプ。\"\n\n#: ../../../discord/channel.py:docstring of discord.TextChannel.type:3\n#: ../../../discord/channel.py:docstring of discord.ForumChannel.type:3\n#: ../../../discord/threads.py:docstring of discord.Thread.type:3\n#: ../../../discord/channel.py:docstring of discord.VoiceChannel.type:3\n#: ../../../discord/channel.py:docstring of discord.StageChannel.type:3\nmsgid \":class:`ChannelType`\"\nmsgstr \":class:`ChannelType`\"\n\n#: ../../../discord/channel.py:docstring of discord.TextChannel.members:1\nmsgid \"Returns all members that can see this channel.\"\nmsgstr \"このチャンネルを閲覧できるすべてのメンバーを返します。\"\n\n#: ../../../discord/channel.py:docstring of discord.TextChannel.threads:1\n#: ../../../discord/channel.py:docstring of discord.ForumChannel.threads:1\nmsgid \"Returns all the threads that you can see.\"\nmsgstr \"表示できるすべてのスレッドを返します。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.is_nsfw:1\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.is_nsfw:1\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.is_nsfw:1\nmsgid \":class:`bool`: Checks if the channel is NSFW.\"\nmsgstr \":class:`bool`: チャンネルに年齢制限があるかどうかをチェックします。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.is_news:1\nmsgid \":class:`bool`: Checks if the channel is a news channel.\"\nmsgstr \":class:`bool`: チャンネルがニュースチャンネルかをチェックします。\"\n\n#: ../../../discord/channel.py:docstring of discord.TextChannel.last_message:1\n#: ../../../discord/channel.py:docstring of discord.VoiceChannel.last_message:1\n#: ../../../discord/channel.py:docstring of discord.StageChannel.last_message:1\nmsgid \"Retrieves the last message from this channel in cache.\"\nmsgstr \"キャッシュからこのチャンネルに最後に送信されたメッセージを取得します。\"\n\n#: ../../../discord/channel.py:docstring of discord.TextChannel.last_message:3\n#: ../../../discord/threads.py:docstring of discord.Thread.last_message:3\n#: ../../../discord/channel.py:docstring of discord.VoiceChannel.last_message:3\n#: ../../../discord/channel.py:docstring of discord.StageChannel.last_message:3\nmsgid \"The message might not be valid or point to an existing message.\"\nmsgstr \"このメッセージは有効でなかったり、存在するものでない場合があります。\"\n\n#: ../../../discord/channel.py:docstring of discord.TextChannel.last_message:5\n#: ../../../discord/threads.py:docstring of discord.Thread.last_message:5\n#: ../../../discord/channel.py:docstring of discord.VoiceChannel.last_message:7\n#: ../../../discord/channel.py:docstring of discord.StageChannel.last_message:7\nmsgid \"Reliable Fetching\"\nmsgstr \"信頼性の高い取得方法\"\n\n#: ../../../discord/channel.py:docstring of discord.TextChannel.last_message:8\n#: ../../../discord/threads.py:docstring of discord.Thread.last_message:8\n#: ../../../discord/channel.py:docstring of discord.VoiceChannel.last_message:10\n#: ../../../discord/channel.py:docstring of discord.StageChannel.last_message:10\nmsgid \"For a slightly more reliable method of fetching the last message, consider using either :meth:`history` or :meth:`fetch_message` with the :attr:`last_message_id` attribute.\"\nmsgstr \"より信頼性のある最後のメッセージの取得方法として、 :meth:`history` や :attr:`last_message_id` と :meth:`fetch_message` の組み合わせがあります。\"\n\n#: ../../../discord/channel.py:docstring of discord.TextChannel.last_message:13\n#: ../../../discord/threads.py:docstring of discord.Thread.last_message:13\n#: ../../../discord/channel.py:docstring of discord.VoiceChannel.last_message:15\n#: ../../../discord/channel.py:docstring of discord.StageChannel.last_message:15\nmsgid \"The last message in this channel or ``None`` if not found.\"\nmsgstr \"このチャンネルの最後のメッセージ。見つからない場合は ``None`` です。\"\n\n#: ../../../discord/channel.py:docstring of discord.TextChannel.last_message:14\n#: ../../../discord/threads.py:docstring of discord.Thread.starter_message:8\n#: ../../../discord/threads.py:docstring of discord.Thread.last_message:14\n#: ../../../discord/channel.py:docstring of discord.VoiceChannel.last_message:16\n#: ../../../discord/channel.py:docstring of discord.StageChannel.last_message:16\nmsgid \"Optional[:class:`Message`]\"\nmsgstr \"Optional[:class:`Message`]\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.edit:3\n#: ../../../discord/channel.py:docstring of discord.channel.VoiceChannel.edit:3\n#: ../../../discord/channel.py:docstring of discord.channel.StageChannel.edit:3\n#: ../../../discord/channel.py:docstring of discord.channel.CategoryChannel.edit:3\nmsgid \"Edits the channel.\"\nmsgstr \"チャンネルを編集します。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.edit:5\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.edit:5\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.create_tag:5\n#: ../../../discord/channel.py:docstring of discord.channel.VoiceChannel.edit:5\n#: ../../../discord/channel.py:docstring of discord.channel.StageChannel.create_instance:5\nmsgid \"You must have :attr:`~Permissions.manage_channels` to do this.\"\nmsgstr \"これを行うには、 :attr:`~Permissions.manage_channels` が必要です。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.edit:7\n#: ../../../discord/channel.py:docstring of discord.channel.VoiceChannel.edit:7\n#: ../../../discord/channel.py:docstring of discord.channel.CategoryChannel.edit:7\nmsgid \"The ``overwrites`` keyword-only parameter was added.\"\nmsgstr \"``overwrites`` キーワード引数が追加されました。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.edit:10\nmsgid \"The ``type`` keyword-only parameter was added.\"\nmsgstr \"``type`` キーワード引数が追加されました。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.edit:13\n#: ../../../discord/channel.py:docstring of discord.channel.VoiceChannel.edit:10\n#: ../../../discord/channel.py:docstring of discord.channel.StageChannel.edit:10\n#: ../../../discord/channel.py:docstring of discord.channel.CategoryChannel.edit:10\nmsgid \"Edits are no longer in-place, the newly edited channel is returned instead.\"\nmsgstr \"編集はチャンネルを置き換えず、編集された新しいチャンネルが返されるようになりました。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.edit:20\nmsgid \"The new channel name.\"\nmsgstr \"チャンネルの名前。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.edit:24\n#: ../../../discord/channel.py:docstring of discord.channel.VoiceChannel.edit:28\n#: ../../../discord/channel.py:docstring of discord.channel.StageChannel.edit:22\nmsgid \"The new channel's position.\"\nmsgstr \"チャンネルの位置。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.edit:28\n#: ../../../discord/channel.py:docstring of discord.channel.VoiceChannel.edit:30\n#: ../../../discord/channel.py:docstring of discord.channel.StageChannel.edit:28\nmsgid \"Whether to sync permissions with the channel's new or pre-existing category. Defaults to ``False``.\"\nmsgstr \"チャンネルの新しい、又は既存のカテゴリと権限を同期するか。デフォルトは ``False`` です。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.edit:31\n#: ../../../discord/channel.py:docstring of discord.channel.VoiceChannel.edit:33\n#: ../../../discord/channel.py:docstring of discord.channel.StageChannel.edit:31\nmsgid \"The new category for this channel. Can be ``None`` to remove the category.\"\nmsgstr \"チャンネルの新しいカテゴリ。カテゴリを削除するには ``None`` を指定できます。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.edit:34\n#: ../../../discord/channel.py:docstring of discord.channel.VoiceChannel.edit:36\n#: ../../../discord/channel.py:docstring of discord.channel.StageChannel.edit:34\nmsgid \"Specifies the slowmode rate limit for user in this channel, in seconds. A value of ``0`` disables slowmode. The maximum value possible is ``21600``.\"\nmsgstr \"秒単位でこのチャンネルのユーザーの低速モードの値を指定します。 ``0`` を渡すと低速モードを無効にできます。可能な最大の値は ``21600`` です。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.edit:37\nmsgid \"Change the type of this text channel. Currently, only conversion between :attr:`ChannelType.text` and :attr:`ChannelType.news` is supported. This is only available to guilds that contain ``NEWS`` in :attr:`Guild.features`.\"\nmsgstr \"このテキストチャンネルのタイプを変更します。現時点では :attr:`ChannelType.text` と :attr:`ChannelType.news` 間での変更のみできます。これは :attr:`Guild.features` に ``NEWS`` を含むギルドでのみ利用できます。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.edit:41\n#: ../../../discord/channel.py:docstring of discord.channel.VoiceChannel.edit:39\n#: ../../../discord/channel.py:docstring of discord.channel.StageChannel.edit:37\nmsgid \"The reason for editing this channel. Shows up on the audit log.\"\nmsgstr \"チャンネルを編集する理由。監査ログに表示されます。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.edit:43\n#: ../../../discord/channel.py:docstring of discord.channel.VoiceChannel.edit:41\n#: ../../../discord/channel.py:docstring of discord.channel.StageChannel.edit:39\n#: ../../../discord/channel.py:docstring of discord.channel.CategoryChannel.edit:25\nmsgid \"A :class:`Mapping` of target (either a role or a member) to :class:`PermissionOverwrite` to apply to the channel.\"\nmsgstr \"ターゲット（ロール又はメンバー）をキーとし適用される :class:`PermissionOverwrite` を値とする :class:`Mapping` 。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.edit:46\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.edit:33\nmsgid \"The new default auto archive duration in minutes for threads created in this channel. Must be one of ``60``, ``1440``, ``4320``, or ``10080``.\"\nmsgstr \"このチャンネルで作成されたスレッドの分単位のデフォルトの自動アーカイブ期間。これは ``60`` 、 ``1440`` 、 ``4320`` 、または ``10080`` でないといけません。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.edit:51\nmsgid \"The new default slowmode delay in seconds for threads created in this channel.\"\nmsgstr \"このチャンネルで作成されたスレッドの、新しいデフォルトの秒単位の低速モードレート制限。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.edit:56\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.edit:61\nmsgid \"The new ``position`` is less than 0 or greater than the number of channels.\"\nmsgstr \"新しい ``position`` が0より小さいか、カテゴリの数より大きい場合。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.edit:58\n#: ../../../discord/channel.py:docstring of discord.channel.VoiceChannel.edit:60\n#: ../../../discord/channel.py:docstring of discord.channel.StageChannel.edit:51\nmsgid \"You do not have permissions to edit the channel.\"\nmsgstr \"チャンネルを編集する権限がない場合。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.edit:59\n#: ../../../discord/channel.py:docstring of discord.channel.VoiceChannel.edit:61\n#: ../../../discord/channel.py:docstring of discord.channel.StageChannel.edit:52\nmsgid \"Editing the channel failed.\"\nmsgstr \"チャンネルの編集に失敗した場合。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.edit:61\nmsgid \"The newly edited text channel. If the edit was only positional then ``None`` is returned instead.\"\nmsgstr \"新しく編集されたテキストチャンネル。編集が位置のみだった場合は代わりに ``None`` が返されます。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.edit:63\nmsgid \"Optional[:class:`.TextChannel`]\"\nmsgstr \"Optional[:class:`.TextChannel`]\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.delete_messages:3\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.delete_messages:3\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.delete_messages:3\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.delete_messages:3\nmsgid \"Deletes a list of messages. This is similar to :meth:`Message.delete` except it bulk deletes multiple messages.\"\nmsgstr \"メッセージのリストを削除します。複数のメッセージを一括削除する点を除き、これは :meth:`Message.delete` に似ています。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.delete_messages:6\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.delete_messages:6\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.delete_messages:6\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.delete_messages:6\nmsgid \"As a special case, if the number of messages is 0, then nothing is done. If the number of messages is 1 then single message delete is done. If it's more than two, then bulk delete is used.\"\nmsgstr \"スペシャルケースとして、もしメッセージ数が0の場合は何もせず、メッセージ数が1の場合は単独のメッセージ削除が行われます。これが2以上の場合一括削除が行われます。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.delete_messages:10\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.delete_messages:10\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.delete_messages:10\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.delete_messages:10\nmsgid \"You cannot bulk delete more than 100 messages or messages that are older than 14 days old.\"\nmsgstr \"14日以上前のメッセージや100件以上のメッセージを一括削除することはできません。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.delete_messages:17\nmsgid \"``messages`` parameter is now positional-only.\"\nmsgstr \"引数 ``messages`` は位置専用引数となりました。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.delete_messages:19\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.purge:14\nmsgid \"The ``reason`` keyword-only parameter was added.\"\nmsgstr \"``reason`` キーワード引数が追加されました。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.delete_messages:21\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.delete_messages:15\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.delete_messages:17\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.delete_messages:17\nmsgid \"An iterable of messages denoting which ones to bulk delete.\"\nmsgstr \"一括削除するものを示すメッセージのiterableオブジェクト。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.delete_messages:23\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.delete_messages:17\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.delete_messages:19\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.delete_messages:19\nmsgid \"The reason for deleting the messages. Shows up on the audit log.\"\nmsgstr \"メッセージを一括削除する理由。監査ログに表示されます。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.delete_messages:26\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.delete_messages:20\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.delete_messages:22\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.delete_messages:22\nmsgid \"The number of messages to delete was more than 100.\"\nmsgstr \"削除するメッセージの数が100以上の場合。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.delete_messages:27\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.delete_messages:23\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.delete_messages:23\nmsgid \"You do not have proper permissions to delete the messages.\"\nmsgstr \"メッセージを一括削除するための適切な権限がない場合。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.delete_messages:28\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.delete_messages:22\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.delete_messages:24\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.delete_messages:24\nmsgid \"If single delete, then the message was already deleted.\"\nmsgstr \"1メッセージのみ削除する時、メッセージが既に削除されていた場合。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.delete_messages:29\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.delete_messages:23\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.delete_messages:25\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.delete_messages:25\nmsgid \"Deleting the messages failed.\"\nmsgstr \"メッセージの削除に失敗した場合。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.purge:3\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.purge:3\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.purge:3\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.purge:3\nmsgid \"Purges a list of messages that meet the criteria given by the predicate ``check``. If a ``check`` is not provided then all messages are deleted without discrimination.\"\nmsgstr \"``check`` 関数の要件を満たすメッセージを一括削除します。 ``check`` が渡されない場合はすべてのメッセージが削除されます。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.purge:7\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.purge:7\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.purge:7\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.purge:7\nmsgid \"You must have :attr:`~Permissions.manage_messages` to delete messages even if they are your own. Having :attr:`~Permissions.read_message_history` is also needed to retrieve message history.\"\nmsgstr \"メッセージを削除するときに、それが自分のものであったとしても、削除するには :attr:`~Permissions.manage_messages` が必要です。メッセージの履歴を取得するために :attr:`~Permissions.read_message_history` も必要になります。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.purge:18\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.purge:14\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.purge:16\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.purge:16\nmsgid \"Deleting bot's messages ::\"\nmsgstr \"Botによるメッセージを削除する ::\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.purge:26\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.purge:22\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.purge:24\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.purge:24\nmsgid \"The number of messages to search through. This is not the number of messages that will be deleted, though it can be.\"\nmsgstr \"検索するメッセージ数。これは削除するメッセージ数になるとは必ずしも限りません。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.purge:29\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.purge:25\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.purge:27\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.purge:27\nmsgid \"The function used to check if a message should be deleted. It must take a :class:`Message` as its sole parameter.\"\nmsgstr \"メッセージが削除されるかどうかを確認するために使用される関数。 :class:`Message` を唯一のパラメータとして受け取る必要があります。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.purge:32\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.purge:28\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.purge:30\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.purge:30\nmsgid \"Same as ``before`` in :meth:`history`.\"\nmsgstr \":meth:`history` での ``before`` と同じです。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.purge:34\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.purge:30\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.purge:32\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.purge:32\nmsgid \"Same as ``after`` in :meth:`history`.\"\nmsgstr \":meth:`history` での ``after`` と同じです。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.purge:36\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.purge:32\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.purge:34\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.purge:34\nmsgid \"Same as ``around`` in :meth:`history`.\"\nmsgstr \":meth:`history` での ``around`` と同じです。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.purge:38\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.purge:34\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.purge:36\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.purge:36\nmsgid \"Same as ``oldest_first`` in :meth:`history`.\"\nmsgstr \":meth:`history` での ``oldest_first`` と同じです。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.purge:40\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.purge:36\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.purge:38\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.purge:38\nmsgid \"If ``True``, use bulk delete. Setting this to ``False`` is useful for mass-deleting a bot's own messages without :attr:`Permissions.manage_messages`. When ``True``, will fall back to single delete if messages are older than two weeks.\"\nmsgstr \"``True`` の場合、一括削除を使用します。これを ``False`` に設定すると、 :attr:`Permissions.manage_messages` なしでボット自身のメッセージを一括削除することができます。 ``True`` の場合でも、2週間以上前のメッセージは個別に削除されます。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.purge:44\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.purge:40\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.purge:42\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.purge:42\nmsgid \"The reason for purging the messages. Shows up on the audit log.\"\nmsgstr \"メッセージを一括削除する理由。監査ログに表示されます。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.purge:47\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.purge:43\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.purge:45\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.purge:45\nmsgid \"You do not have proper permissions to do the actions required.\"\nmsgstr \"必要なアクションをするための適切な権限がない場合。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.purge:48\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.purge:44\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.purge:46\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.purge:46\nmsgid \"Purging the messages failed.\"\nmsgstr \"メッセージの一括削除に失敗した場合。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.purge:50\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.purge:46\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.purge:48\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.purge:48\nmsgid \"The list of messages that were deleted.\"\nmsgstr \"削除されたメッセージのlist。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.purge:51\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.purge:47\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.purge:49\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.purge:49\nmsgid \"List[:class:`.Message`]\"\nmsgstr \"List[:class:`.Message`]\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.webhooks:3\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.webhooks:3\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.webhooks:3\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.webhooks:3\nmsgid \"Gets the list of webhooks from this channel.\"\nmsgstr \"チャンネル内のWebhookのリストを取得します。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.webhooks:9\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.webhooks:9\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.webhooks:11\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.webhooks:11\nmsgid \"The webhooks for this channel.\"\nmsgstr \"チャンネル内のWebhook。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.create_webhook:3\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.create_webhook:3\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.create_webhook:3\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.create_webhook:3\nmsgid \"Creates a webhook for this channel.\"\nmsgstr \"チャンネルに新しいWebhookを作ります。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.create_webhook:7\nmsgid \"Added the ``reason`` keyword-only parameter.\"\nmsgstr \"``reason`` キーワード引数が追加されました。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.create_webhook:10\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.create_webhook:7\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.create_webhook:9\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.create_webhook:9\nmsgid \"The webhook's name.\"\nmsgstr \"Webhookの名前。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.create_webhook:12\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.create_webhook:9\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.create_webhook:11\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.create_webhook:11\nmsgid \"A :term:`py:bytes-like object` representing the webhook's default avatar. This operates similarly to :meth:`~ClientUser.edit`.\"\nmsgstr \"Webhookのデフォルトアバターを表す :term:`py:bytes-like object` 。 :meth:`~ClientUser.edit` と同様に動作します。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.create_webhook:15\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.create_webhook:12\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.create_webhook:14\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.create_webhook:14\nmsgid \"The reason for creating this webhook. Shows up in the audit logs.\"\nmsgstr \"Webhookを作成する理由。監査ログに表示されます。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.create_webhook:18\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.create_webhook:15\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.create_webhook:17\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.create_webhook:17\nmsgid \"Creating the webhook failed.\"\nmsgstr \"Webhookの作成に失敗した場合。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.create_webhook:19\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.create_webhook:16\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.create_webhook:18\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.create_webhook:18\nmsgid \"You do not have permissions to create a webhook.\"\nmsgstr \"Webhookを作成する権限を持っていない場合。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.create_webhook:21\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.follow:30\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.create_webhook:18\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.create_webhook:20\n#: ../../../discord/channel.py:docstring of discord.channel.VocalGuildChannel.create_webhook:20\nmsgid \"The created webhook.\"\nmsgstr \"作成されたwebhook。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.follow:3\nmsgid \"Follows a channel using a webhook.\"\nmsgstr \"Webhookを使用してチャンネルをフォローします。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.follow:5\nmsgid \"Only news channels can be followed.\"\nmsgstr \"フォローできるのはニュースチャンネルのみです。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.follow:9\nmsgid \"The webhook returned will not provide a token to do webhook actions, as Discord does not provide it.\"\nmsgstr \"返されたWebhookは、Discordが提供していないため、Webhook アクションを実行するためのトークンを提供しません。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.follow:18\nmsgid \"The channel you would like to follow from.\"\nmsgstr \"フォローしたいチャンネル。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.follow:20\nmsgid \"The reason for following the channel. Shows up on the destination guild's audit log.\"\nmsgstr \"チャンネルをフォローする理由。宛先のギルドの監査ログに表示されます。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.follow:25\nmsgid \"Following the channel failed.\"\nmsgstr \"チャンネルのフォローに失敗した場合。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.follow:26\nmsgid \"You do not have the permissions to create a webhook.\"\nmsgstr \"Webhookを作成する権限を持っていない場合。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.follow:27\nmsgid \"The channel is not a news channel.\"\nmsgstr \"チャンネルがニュースチャンネルでない場合。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.follow:28\nmsgid \"The destination channel is not a text channel.\"\nmsgstr \"宛先チャンネルがテキストチャンネルでない場合。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.get_thread:5\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.get_thread:5\nmsgid \"This does not always retrieve archived threads, as they are not retained in the internal cache. Use :func:`Guild.fetch_channel` instead.\"\nmsgstr \"内部キャッシュに保持されていないため、アーカイブされたスレッドを取得できないことがあります。代わりに :func:`Guild.fetch_channel` を使用してください。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.create_thread:3\nmsgid \"Creates a thread in this text channel.\"\nmsgstr \"このテキストチャンネルでスレッドを作成します。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.create_thread:5\nmsgid \"To create a public thread, you must have :attr:`~discord.Permissions.create_public_threads`. For a private thread, :attr:`~discord.Permissions.create_private_threads` is needed instead.\"\nmsgstr \"パブリックスレッドを作成するには、 :attr:`~discord.Permissions.create_public_threads` が必要です。プライベートスレッドの場合は、代わりに :attr:`~discord.Permissions.create_private_threads` が必要です。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.create_thread:12\nmsgid \"A snowflake representing the message to create the thread with. If ``None`` is passed then a private thread is created. Defaults to ``None``.\"\nmsgstr \"スレッドを開始するメッセージを表すスノーフレーク。``None`` が渡された場合、プライベートスレッドが作成されます。デフォルトは ``None`` です。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.create_thread:21\nmsgid \"The type of thread to create. If a ``message`` is passed then this parameter is ignored, as a thread created with a message is always a public thread. By default this creates a private thread if this is ``None``.\"\nmsgstr \"作成するスレッドの種類。 ``message`` が渡された場合、メッセージで作成されたスレッドは常に公開スレッドであるためこのパラメータは無視されます。 デフォルトでは、これが ``None`` の場合、プライベートスレッドが作成されます。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.create_thread:27\nmsgid \"Whether non-moderators can add users to the thread. Only applicable to private threads. Defaults to ``True``.\"\nmsgstr \"モデレータ以外がスレッドにユーザーを追加できるかどうか。プライベートスレッドにのみ適用されます。デフォルトは ``True`` です。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.create_thread:36\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.create_thread:55\nmsgid \"Starting the thread failed.\"\nmsgstr \"スレッドの作成に失敗した場合。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.create_thread:38\nmsgid \"The created thread\"\nmsgstr \"作成されたスレッド。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.create_thread:39\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.edit:40\n#: ../../../discord/threads.py:docstring of discord.ThreadMember.thread:3\nmsgid \":class:`Thread`\"\nmsgstr \":class:`Thread`\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.archived_threads:1\nmsgid \"Returns an :term:`asynchronous iterator` that iterates over all archived threads in this text channel, in order of decreasing ID for joined threads, and decreasing :attr:`Thread.archive_timestamp` otherwise.\"\nmsgstr \"このテキストチャンネルのアーカイブされたスレッドをイテレートする :term:`asynchronous iterator` を返します。これは参加したスレッドではIDの降順、それ以外では :attr:`Thread.archive_timestamp` の降順です。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.archived_threads:4\nmsgid \"You must have :attr:`~Permissions.read_message_history` to do this. If iterating over private threads then :attr:`~Permissions.manage_threads` is also required.\"\nmsgstr \"これを行うには、 :attr:`~Permissions.read_message_history` が必要です。プライベートスレッドをイテレートする場合は、 :attr:`~Permissions.manage_threads` も必要です。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.archived_threads:9\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.archived_threads:8\nmsgid \"The number of threads to retrieve. If ``None``, retrieves every archived thread in the channel. Note, however, that this would make it a slow operation.\"\nmsgstr \"取得するスレッドの数。 ``None`` の場合、チャンネル内のアーカイブされたスレッドすべてを取得します。ただし、これには時間がかかります。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.archived_threads:13\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.archived_threads:12\nmsgid \"Retrieve archived channels before the given date or ID.\"\nmsgstr \"指定された日付またはIDより前のアーカイブされたチャンネルを取得します。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.archived_threads:15\nmsgid \"Whether to retrieve private archived threads.\"\nmsgstr \"プライベートのアーカイブされたスレッドを取得するかどうか。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.archived_threads:17\nmsgid \"Whether to retrieve private archived threads that you've joined. You cannot set ``joined`` to ``True`` and ``private`` to ``False``.\"\nmsgstr \"参加したプライベートアーカイブスレッドを取得するかどうか。``joined`` に ``True`` を設定した場合は ``private`` に ``False`` を設定することはできません。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.archived_threads:21\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.archived_threads:15\nmsgid \"You do not have permissions to get archived threads.\"\nmsgstr \"アーカイブしたスレッドを取得する権限を持っていない場合。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.archived_threads:22\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.archived_threads:16\nmsgid \"The request to get the archived threads failed.\"\nmsgstr \"アーカイブなスレッドの取得に失敗した場合。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.archived_threads:23\nmsgid \"``joined`` was set to ``True`` and ``private`` was set to ``False``. You cannot retrieve public archived     threads that you have joined.\"\nmsgstr \"``joined`` が ``True`` に設定され、``private`` が ``False`` に設定された場合。参加したパブリックのアーカイブされたスレッドは取得できません。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.TextChannel.archived_threads:25\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.archived_threads:18\nmsgid \":class:`Thread` -- The archived threads.\"\nmsgstr \":class:`Thread` -- アーカイブされたスレッド。\"\n\n#: ../../api.rst:4642\nmsgid \"ForumChannel\"\nmsgstr \"ForumChannel\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel:1\nmsgid \"Represents a Discord guild forum channel.\"\nmsgstr \"Discordサーバーのフォーラムチャンネルを表します。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel:9\nmsgid \"Checks if two forums are equal.\"\nmsgstr \"二つのフォーラムが等しいかを比較します。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel:13\nmsgid \"Checks if two forums are not equal.\"\nmsgstr \"二つのフォーラムが等しいものではないか比較します。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel:17\nmsgid \"Returns the forum's hash.\"\nmsgstr \"フォーラムのハッシュ値を返します。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel:21\nmsgid \"Returns the forum's name.\"\nmsgstr \"フォーラムの名前を返します。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel:25\nmsgid \"The forum name.\"\nmsgstr \"フォーラムの名前。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel:31\nmsgid \"The guild the forum belongs to.\"\nmsgstr \"フォーラムが属するギルド。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel:37\nmsgid \"The forum ID.\"\nmsgstr \"フォーラムID。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel:43\nmsgid \"The category channel ID this forum belongs to, if applicable.\"\nmsgstr \"該当する場合、このフォーラムが属するカテゴリチャンネルのID。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel:49\nmsgid \"The forum's topic. ``None`` if it doesn't exist. Called \\\"Guidelines\\\" in the UI. Can be up to 4096 characters long.\"\nmsgstr \"フォーラムのトピック。存在しない場合は ``None`` です。UIでは「ガイドライン」と呼ばれています。最大4096文字です。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel:63\nmsgid \"The last thread ID that was created on this forum. This technically also coincides with the message ID that started the thread that was created. It may *not* point to an existing or valid thread or message.\"\nmsgstr \"このフォーラムで最後に作成されたスレッドのID。これは作成されたスレッドを開始するメッセージのIDと技術的には一致します。存または有効なスレッドやメッセージを指して *いない* 場合があります。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel:71\nmsgid \"The number of seconds a member must wait between creating threads in this forum. A value of ``0`` denotes that it is disabled. Bots and users with :attr:`~Permissions.manage_channels` or :attr:`~Permissions.manage_messages` bypass slowmode.\"\nmsgstr \"このフォーラムでスレッドを作成する間にメンバーが待たなければいけない時間。値が ``0`` の場合これは無効です。ボットやユーザーが :attr:`~Permissions.manage_channels` か :attr:`~Permissions.manage_messages` 権限を有する場合低速モードを回避できます。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel:80\nmsgid \"If the forum is marked as \\\"not safe for work\\\" or \\\"age restricted\\\".\"\nmsgstr \"フォーラムに年齢制限がかかっているか。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel:86\nmsgid \"The default auto archive duration in minutes for threads created in this forum.\"\nmsgstr \"このフォーラムで作成されたスレッドのデフォルトの分単位の自動アーカイブ期間。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel:109\nmsgid \"The default layout for posts in this forum channel. Defaults to :attr:`ForumLayoutType.not_set`.\"\nmsgstr \"このフォーラムチャネルの投稿のデフォルトの表示レイアウト。デフォルトは :attr:`ForumLayoutType.not_set` です。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel:114\nmsgid \":class:`ForumLayoutType`\"\nmsgstr \":class:`ForumLayoutType`\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel:122\nmsgid \"Optional[:class:`ForumOrderType`]\"\nmsgstr \"Optional[:class:`ForumOrderType`]\"\n\n#: ../../../discord/channel.py:docstring of discord.ForumChannel.flags:1\n#: ../../../discord/threads.py:docstring of discord.Thread.flags:1\nmsgid \"The flags associated with this thread.\"\nmsgstr \"このスレッドに関連付けられたフラグ。\"\n\n#: ../../../discord/channel.py:docstring of discord.ForumChannel.available_tags:1\nmsgid \"Returns all the available tags for this forum.\"\nmsgstr \"このフォーラムで利用可能なタグをすべて返します。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.get_tag:1\nmsgid \"Returns the tag with the given ID.\"\nmsgstr \"与えられたIDのタグを返します。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.get_tag:8\nmsgid \"The tag with the given ID, or ``None`` if not found.\"\nmsgstr \"与えられたIDのタグ、または該当するものが見つからない場合 ``None`` が返ります。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.get_tag:9\nmsgid \"Optional[:class:`ForumTag`]\"\nmsgstr \"Optional[:class:`ForumTag`]\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.is_nsfw:1\nmsgid \":class:`bool`: Checks if the forum is NSFW.\"\nmsgstr \":class:`bool`: フォーラムに年齢制限があるかどうかをチェックします。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.is_media:1\nmsgid \":class:`bool`: Checks if the channel is a media channel.\"\nmsgstr \"\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.edit:3\nmsgid \"Edits the forum.\"\nmsgstr \"フォーラムを編集します。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.edit:7\nmsgid \"The new forum name.\"\nmsgstr \"新しいフォーラムの名前。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.edit:9\nmsgid \"The new forum's topic.\"\nmsgstr \"新しいフォーラムのトピック。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.edit:11\nmsgid \"The new forum's position.\"\nmsgstr \"新しいフォーラムの位置。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.edit:13\nmsgid \"To mark the forum as NSFW or not.\"\nmsgstr \"フォーラムに年齢制限をかけるかどうか。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.edit:15\nmsgid \"Whether to sync permissions with the forum's new or pre-existing category. Defaults to ``False``.\"\nmsgstr \"フォーラムの新しい、又は既存のカテゴリと権限を同期するか。デフォルトは ``False`` です。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.edit:18\nmsgid \"The new category for this forum. Can be ``None`` to remove the category.\"\nmsgstr \"フォーラムの新しいカテゴリ。カテゴリを削除するには ``None`` を指定できます。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.edit:21\nmsgid \"Specifies the slowmode rate limit for user in this forum, in seconds. A value of ``0`` disables slowmode. The maximum value possible is ``21600``.\"\nmsgstr \"秒単位でこのフォーラムのユーザーの低速モードの値を指定します。 ``0`` を渡すと低速モードを無効にできます。可能な最大の値は ``21600`` です。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.edit:24\nmsgid \"Change the type of this text forum. Currently, only conversion between :attr:`ChannelType.text` and :attr:`ChannelType.news` is supported. This is only available to guilds that contain ``NEWS`` in :attr:`Guild.features`.\"\nmsgstr \"このフォーラムチャンネルのタイプを変更します。現時点では :attr:`ChannelType.text` と :attr:`ChannelType.news` 間での変更のみできます。これは :attr:`Guild.features` に ``NEWS`` を含むギルドでのみ利用できます。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.edit:28\nmsgid \"The reason for editing this forum. Shows up on the audit log.\"\nmsgstr \"フォーラムを編集する理由。監査ログに表示されます。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.edit:30\nmsgid \"A :class:`Mapping` of target (either a role or a member) to :class:`PermissionOverwrite` to apply to the forum.\"\nmsgstr \"ターゲット（ロール又はメンバー）をキーとし適用される :class:`PermissionOverwrite` を値とする :class:`Mapping` 。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.edit:36\nmsgid \"The new available tags for this forum.\"\nmsgstr \"新しいフォーラムで利用できるタグ。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.edit:40\nmsgid \"The new default slowmode delay for threads in this channel.\"\nmsgstr \"新しいチャンネル内のスレッドのデフォルトの低速モードレート制限。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.edit:44\nmsgid \"The new default reaction emoji for threads in this channel.\"\nmsgstr \"新しいチャンネル内のスレッドのデフォルトのリアクション絵文字。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.edit:48\nmsgid \"The new default layout for posts in this forum.\"\nmsgstr \"このフォーラムの新しい投稿のデフォルトの表示レイアウト。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.edit:52\nmsgid \"The new default sort order for posts in this forum.\"\nmsgstr \"このフォーラムの新しい投稿のデフォルトの並び替え順。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.edit:56\nmsgid \"Whether to require a tag for threads in this channel or not.\"\nmsgstr \"チャンネル内のスレッドにタグが必要であるかどうか。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.edit:62\nmsgid \"The permission overwrite information is not in proper form or a type     is not the expected type.\"\nmsgstr \"権限上書きが適切でないか、または期待された型でない場合。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.edit:63\nmsgid \"You do not have permissions to edit the forum.\"\nmsgstr \"フォーラムを編集する権限がない場合。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.edit:64\nmsgid \"Editing the forum failed.\"\nmsgstr \"フォーラムの編集に失敗した場合。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.edit:66\nmsgid \"The newly edited forum channel. If the edit was only positional then ``None`` is returned instead.\"\nmsgstr \"新しく編集されたフォーラムチャンネル。編集が位置のみだった場合は代わりに ``None`` が返されます。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.edit:68\nmsgid \"Optional[:class:`.ForumChannel`]\"\nmsgstr \"Optional[:class:`.ForumChannel`]\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.create_tag:3\nmsgid \"Creates a new tag in this forum.\"\nmsgstr \"このフォーラムに新しいタグを作成します。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.create_tag:7\n#: ../../../discord/channel.py:docstring of discord.channel.ForumTag:32\nmsgid \"The name of the tag. Can only be up to 20 characters.\"\nmsgstr \"タグ名。最大20文字までです。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.create_tag:9\nmsgid \"The emoji to use for the tag.\"\nmsgstr \"タグに使用する絵文字。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.create_tag:11\nmsgid \"Whether the tag can only be applied by moderators.\"\nmsgstr \"モデレータによってのみタグを追加できるようにするかどうか。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.create_tag:13\nmsgid \"The reason for creating this tag. Shows up on the audit log.\"\nmsgstr \"タグを作成する理由。監査ログに表示されます。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.create_tag:16\nmsgid \"You do not have permissions to create a tag in this forum.\"\nmsgstr \"このフォーラムでタグを作成する権限がない場合。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.create_tag:17\nmsgid \"Creating the tag failed.\"\nmsgstr \"タグの作成に失敗した場合。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.create_tag:19\nmsgid \"The newly created tag.\"\nmsgstr \"新しく作成されたタグ。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.create_tag:20\nmsgid \":class:`ForumTag`\"\nmsgstr \":class:`ForumTag`\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.create_thread:3\nmsgid \"Creates a thread in this forum.\"\nmsgstr \"このフォーラムにスレッドを作成します。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.create_thread:5\nmsgid \"This thread is a public thread with the initial message given. Currently in order to start a thread in this forum, the user needs :attr:`~discord.Permissions.send_messages`.\"\nmsgstr \"このスレッドは、最初のメッセージが与えられたパブリックスレッドになります。現在、フォーラムでスレッドを作成するには、 :attr:`~discord.Permissions.send_messages` 権限が必要です。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.create_thread:8\nmsgid \"You must send at least one of ``content``, ``embed``, ``embeds``, ``file``, ``files``, or ``view`` to create a thread in a forum, since forum channels must have a starter message.\"\nmsgstr \"フォーラムチャンネルには最初ののメッセージが必要であるため、 ``content`` 、 ``embed`` 、 ``embed`` 、 ``file`` 、 ``files`` 、 ``files`` 、 ``view`` のうち少なくとも1つを送信する必要があります。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.create_thread:22\nmsgid \"The content of the message to send with the thread.\"\nmsgstr \"スレッドで送信するメッセージの内容。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.create_thread:43\nmsgid \"A list of tags to apply to the thread.\"\nmsgstr \"スレッドに適用するタグのリスト。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.create_thread:57\nmsgid \"You specified both ``file`` and ``files``,     or you specified both ``embed`` and ``embeds``.\"\nmsgstr \"``file`` と ``files`` の両方が指定された場合、または ``embed`` と ``embeds`` の両方が指定された場合。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.create_thread:59\nmsgid \"The created thread with the created message. This is also accessible as a namedtuple with ``thread`` and ``message`` fields.\"\nmsgstr \"作成されたスレッドとメッセージ。これは、 ``thread`` と ``message`` フィールドを持つ名前付きタプルとしてもアクセスできます。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.create_thread:61\nmsgid \"Tuple[:class:`Thread`, :class:`Message`]\"\nmsgstr \"Tuple[:class:`Thread`, :class:`Message`]\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.archived_threads:1\nmsgid \"Returns an :term:`asynchronous iterator` that iterates over all archived threads in this forum in order of decreasing :attr:`Thread.archive_timestamp`.\"\nmsgstr \"このフォーラムののアーカイブされたスレッドを :attr:`Thread.archive_timestamp` の降順でイテレートする :term:`asynchronous iterator` を返します。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.ForumChannel.archived_threads:4\nmsgid \"You must have :attr:`~Permissions.read_message_history` to do this.\"\nmsgstr \"これを行うためには、 :attr:`~Permissions.read_message_history` が必要です。\"\n\n#: ../../api.rst:4651\nmsgid \"Thread\"\nmsgstr \"Thread\"\n\n#: ../../../discord/threads.py:docstring of discord.threads.Thread:1\nmsgid \"Represents a Discord thread.\"\nmsgstr \"Discordのスレッドを表します。\"\n\n#: ../../../discord/threads.py:docstring of discord.threads.Thread:7\nmsgid \"Checks if two threads are equal.\"\nmsgstr \"二つのスレッドが等しいかを比較します。\"\n\n#: ../../../discord/threads.py:docstring of discord.threads.Thread:11\nmsgid \"Checks if two threads are not equal.\"\nmsgstr \"二つのスレッドが等しいものではないか比較します。\"\n\n#: ../../../discord/threads.py:docstring of discord.threads.Thread:15\nmsgid \"Returns the thread's hash.\"\nmsgstr \"スレッドのハッシュ値を返します。\"\n\n#: ../../../discord/threads.py:docstring of discord.threads.Thread:19\nmsgid \"Returns the thread's name.\"\nmsgstr \"スレッドの名前を返します。\"\n\n#: ../../../discord/threads.py:docstring of discord.threads.Thread:25\nmsgid \"The thread name.\"\nmsgstr \"スレッドの名前。\"\n\n#: ../../../discord/threads.py:docstring of discord.threads.Thread:31\nmsgid \"The guild the thread belongs to.\"\nmsgstr \"このスレッドが属するギルド。\"\n\n#: ../../../discord/threads.py:docstring of discord.threads.Thread:37\nmsgid \"The thread ID. This is the same as the thread starter message ID.\"\nmsgstr \"スレッドID。スレッドの最初のメッセージのIDと同じです。\"\n\n#: ../../../discord/threads.py:docstring of discord.threads.Thread:43\nmsgid \"The parent :class:`TextChannel` or :class:`ForumChannel` ID this thread belongs to.\"\nmsgstr \"スレッドが属する親 :class:`TextChannel` または :class:`ForumChannel` のID。\"\n\n#: ../../../discord/threads.py:docstring of discord.threads.Thread:49\nmsgid \"The user's ID that created this thread.\"\nmsgstr \"このスレッドを作成したユーザーのID。\"\n\n#: ../../../discord/threads.py:docstring of discord.threads.Thread:55\nmsgid \"The last message ID of the message sent to this thread. It may *not* point to an existing or valid message.\"\nmsgstr \"このスレッドに送信された最後のメッセージのID。既存または有効なメッセージを指して *いない* 場合があります。\"\n\n#: ../../../discord/threads.py:docstring of discord.threads.Thread:62\nmsgid \"The number of seconds a member must wait between sending messages in this thread. A value of ``0`` denotes that it is disabled. Bots and users with :attr:`~Permissions.manage_channels` or :attr:`~Permissions.manage_messages` bypass slowmode.\"\nmsgstr \"このスレッドにメッセージを送信する間にメンバーが待たなければいけない時間。値が ``0`` の場合これは無効です。ボットやユーザーが :attr:`~Permissions.manage_channels` か :attr:`~Permissions.manage_messages` 権限を有する場合低速モードを回避できます。\"\n\n#: ../../../discord/threads.py:docstring of discord.threads.Thread:71\nmsgid \"An approximate number of messages in this thread.\"\nmsgstr \"このスレッドのおおよそのメッセージ数。\"\n\n#: ../../../discord/threads.py:docstring of discord.threads.Thread:77\nmsgid \"An approximate number of members in this thread. This caps at 50.\"\nmsgstr \"このスレッドのおおよそのメンバー数。この値は50の上限があります。\"\n\n#: ../../../discord/threads.py:docstring of discord.threads.Thread:83\nmsgid \"A thread member representing yourself, if you've joined the thread. This could not be available.\"\nmsgstr \"スレッドに参加している場合、自分自身を示すスレッドメンバーです。これは利用できない場合があります。\"\n\n#: ../../../discord/threads.py:docstring of discord.threads.Thread:86\nmsgid \"Optional[:class:`ThreadMember`]\"\nmsgstr \"Optional[:class:`ThreadMember`]\"\n\n#: ../../../discord/threads.py:docstring of discord.threads.Thread:90\nmsgid \"Whether the thread is archived.\"\nmsgstr \"スレッドがアーカイブされているかどうか。\"\n\n#: ../../../discord/threads.py:docstring of discord.threads.Thread:96\nmsgid \"Whether the thread is locked.\"\nmsgstr \"スレッドがロックされているかどうか。\"\n\n#: ../../../discord/threads.py:docstring of discord.threads.Thread:102\nmsgid \"Whether non-moderators can add other non-moderators to this thread. This is always ``True`` for public threads.\"\nmsgstr \"モデレータでないユーザーがこのスレッドに他のモデレータでないユーザーを追加できるかどうか。これは公開スレッドでは常に ``True`` です。\"\n\n#: ../../../discord/threads.py:docstring of discord.threads.Thread:109\nmsgid \"The user's ID that archived this thread.\"\nmsgstr \"このスレッドをアーカイブしたユーザーのID。\"\n\n#: ../../../discord/threads.py:docstring of discord.threads.Thread:115\nmsgid \"The duration in minutes until the thread is automatically hidden from the channel list. Usually a value of 60, 1440, 4320 and 10080.\"\nmsgstr \"スレッドがチャンネルリストから自動的に非表示になるまでの分単位の期間。通常は60、1440、4320、10080のいずれかの値です。\"\n\n#: ../../../discord/threads.py:docstring of discord.threads.Thread:122\nmsgid \"An aware timestamp of when the thread's archived status was last updated in UTC.\"\nmsgstr \"スレッドのアーカイブ状態が最後に更新されたときのUTCでのawareなタイムスタンプ。\"\n\n#: ../../../discord/threads.py:docstring of discord.Thread.parent:1\nmsgid \"The parent channel this thread belongs to.\"\nmsgstr \"このスレッドが属する親チャンネル。\"\n\n#: ../../../discord/threads.py:docstring of discord.Thread.parent:3\nmsgid \"Optional[Union[:class:`ForumChannel`, :class:`TextChannel`]]\"\nmsgstr \"Optional[Union[:class:`ForumChannel`, :class:`TextChannel`]]\"\n\n#: ../../../discord/threads.py:docstring of discord.Thread.owner:1\nmsgid \"The member this thread belongs to.\"\nmsgstr \"スレッドを所有するメンバー。\"\n\n#: ../../../discord/threads.py:docstring of discord.Thread.mention:1\nmsgid \"The string that allows you to mention the thread.\"\nmsgstr \"スレッドにメンションするための文字列。\"\n\n#: ../../../discord/threads.py:docstring of discord.Thread.jump_url:1\nmsgid \"Returns a URL that allows the client to jump to the thread.\"\nmsgstr \"クライアントがこのスレッドにジャンプすることのできるURLを返します。\"\n\n#: ../../../discord/threads.py:docstring of discord.Thread.members:1\nmsgid \"A list of thread members in this thread.\"\nmsgstr \"スレッドのメンバーのリスト。\"\n\n#: ../../../discord/threads.py:docstring of discord.Thread.members:3\nmsgid \"This requires :attr:`Intents.members` to be properly filled. Most of the time however, this data is not provided by the gateway and a call to :meth:`fetch_members` is needed.\"\nmsgstr \"これを適切に使用するには :attr:`Intents.members` が必要です。しかし、ほとんどの場合では、このデータはゲートウェイにより提供されていないため :meth:`fetch_members` を呼び出さないといけません。\"\n\n#: ../../../discord/threads.py:docstring of discord.Thread.members:7\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.fetch_members:11\nmsgid \"List[:class:`ThreadMember`]\"\nmsgstr \"List[:class:`ThreadMember`]\"\n\n#: ../../../discord/threads.py:docstring of discord.Thread.applied_tags:1\nmsgid \"A list of tags applied to this thread.\"\nmsgstr \"スレッドに適用されたタグのリスト。\"\n\n#: ../../../discord/threads.py:docstring of discord.Thread.applied_tags:5\nmsgid \"List[:class:`ForumTag`]\"\nmsgstr \"List[:class:`ForumTag`]\"\n\n#: ../../../discord/threads.py:docstring of discord.Thread.starter_message:1\nmsgid \"Returns the thread starter message from the cache.\"\nmsgstr \"キャッシュからスレッドの最初のメッセージを返します。\"\n\n#: ../../../discord/threads.py:docstring of discord.Thread.starter_message:3\nmsgid \"The message might not be cached, valid, or point to an existing message.\"\nmsgstr \"このメッセージはキャッシュされていなかったり、有効でなかったり、存在するものでない場合があります。\"\n\n#: ../../../discord/threads.py:docstring of discord.Thread.starter_message:5\nmsgid \"Note that the thread starter message ID is the same ID as the thread.\"\nmsgstr \"スレッドの最初のメッセージのIDはスレッドIDと同じです。\"\n\n#: ../../../discord/threads.py:docstring of discord.Thread.starter_message:7\nmsgid \"The thread starter message or ``None`` if not found.\"\nmsgstr \"スレッドの最初のメッセージ、または該当するものが見つからない場合 ``None`` が返ります。\"\n\n#: ../../../discord/threads.py:docstring of discord.Thread.last_message:1\nmsgid \"Returns the last message from this thread from the cache.\"\nmsgstr \"キャッシュからこのスレッドに最後に送信されたメッセージを返します。\"\n\n#: ../../../discord/threads.py:docstring of discord.Thread.category:1\nmsgid \"The category channel the parent channel belongs to, if applicable.\"\nmsgstr \"該当する場合、親チャンネルが属するカテゴリチャンネル。\"\n\n#: ../../../discord/threads.py:docstring of discord.Thread.category:3\n#: ../../../discord/threads.py:docstring of discord.Thread.category_id:3\nmsgid \"The parent channel was not cached and returned ``None``.\"\nmsgstr \"親チャンネルがキャッシュされておらず、 ``None`` を返した場合。\"\n\n#: ../../../discord/threads.py:docstring of discord.Thread.category:5\nmsgid \"The parent channel's category.\"\nmsgstr \"親チャンネルのカテゴリ。\"\n\n#: ../../../discord/threads.py:docstring of discord.Thread.category:6\nmsgid \"Optional[:class:`CategoryChannel`]\"\nmsgstr \"Optional[:class:`CategoryChannel`]\"\n\n#: ../../../discord/threads.py:docstring of discord.Thread.category_id:1\nmsgid \"The category channel ID the parent channel belongs to, if applicable.\"\nmsgstr \"該当する場合、親チャンネルが属するカテゴリチャンネルのID。\"\n\n#: ../../../discord/threads.py:docstring of discord.Thread.category_id:5\nmsgid \"The parent channel's category ID.\"\nmsgstr \"親チャンネルのカテゴリID。\"\n\n#: ../../../discord/threads.py:docstring of discord.Thread.created_at:1\nmsgid \"An aware timestamp of when the thread was created in UTC.\"\nmsgstr \"スレッドが作成されたときのUTCでのaware タイムスタンプ。\"\n\n#: ../../../discord/threads.py:docstring of discord.Thread.created_at:5\nmsgid \"This timestamp only exists for threads created after 9 January 2022, otherwise returns ``None``.\"\nmsgstr \"このタイムスタンプは、2022 年1 月 9 日以降に作成されたスレッドにのみ存在します。それ以外の場合は ``None`` を返します。\"\n\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.is_private:1\nmsgid \":class:`bool`: Whether the thread is a private thread.\"\nmsgstr \":class:`bool`: スレッドがプライベートスレッドかどうか。\"\n\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.is_private:3\nmsgid \"A private thread is only viewable by those that have been explicitly invited or have :attr:`~.Permissions.manage_threads`.\"\nmsgstr \"プライベートスレッドは、明示的に招待された者と :attr:`~.Permissions.manage_threads` 権限を有する者のみが閲覧できます。\"\n\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.is_news:1\nmsgid \":class:`bool`: Whether the thread is a news thread.\"\nmsgstr \":class:`bool`: スレッドがニューススレッドかどうか。\"\n\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.is_news:3\nmsgid \"A news thread is a thread that has a parent that is a news channel, i.e. :meth:`.TextChannel.is_news` is ``True``.\"\nmsgstr \"ニューススレッドは親がニュースチャンネルであるスレッドです。つまり、 :meth:`.TextChannel.is_news` が ``True`` であるものです。\"\n\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.is_nsfw:1\nmsgid \":class:`bool`: Whether the thread is NSFW or not.\"\nmsgstr \":class:`bool`: スレッドに年齢制限があるか。\"\n\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.is_nsfw:3\nmsgid \"An NSFW thread is a thread that has a parent that is an NSFW channel, i.e. :meth:`.TextChannel.is_nsfw` is ``True``.\"\nmsgstr \"年齢制限のあるスレッドとは親チャンネルに年齢制限があるスレッドです。つまり、 :meth:`.TextChannel.is_nsfw` が ``True`` であるものです。\"\n\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.permissions_for:4\nmsgid \"Since threads do not have their own permissions, they mostly inherit them from the parent channel with some implicit permissions changed.\"\nmsgstr \"スレッドは独自の権限を有さないため、親チャンネルから一部の変更を加えたうえでほとんどの権限を継承します。\"\n\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.permissions_for:13\nmsgid \"The parent channel was not cached and returned ``None``\"\nmsgstr \"親チャンネルがキャッシュされておらず、 ``None`` を返した場合。\"\n\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.delete_messages:21\nmsgid \"You do not have proper permissions to delete the messages or     you're not using a bot account.\"\nmsgstr \"メッセージを削除するための適切な権限がないか、ボットアカウントを使用していない場合。\"\n\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.edit:3\nmsgid \"Edits the thread.\"\nmsgstr \"スレッドを編集します。\"\n\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.edit:5\nmsgid \"Editing the thread requires :attr:`.Permissions.manage_threads`. The thread creator can also edit ``name``, ``archived`` or ``auto_archive_duration``. Note that if the thread is locked then only those with :attr:`.Permissions.manage_threads` can unarchive a thread.\"\nmsgstr \"スレッドの編集には :attr:`.Permissions.manage_threads` 権限が必要です。スレッドの作成者は ``name`` 、 ``archived`` 、 ``auto_archive_duration`` も編集できます。もしスレッドがロックされている場合は :attr:`.Permissions.manage_threads` 権限を有する者のみスレッドのアーカイブを解除できます。\"\n\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.edit:10\nmsgid \"The thread must be unarchived to be edited.\"\nmsgstr \"スレッドを編集するにはアーカイブを解除する必要があります。\"\n\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.edit:12\nmsgid \"The new name of the thread.\"\nmsgstr \"スレッドの新しい名前。\"\n\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.edit:14\nmsgid \"Whether to archive the thread or not.\"\nmsgstr \"スレッドをアーカイブするかどうか。\"\n\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.edit:16\nmsgid \"Whether to lock the thread or not.\"\nmsgstr \"スレッドをロックするかどうか。\"\n\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.edit:18\nmsgid \"Whether to pin the thread or not. This only works if the thread is part of a forum.\"\nmsgstr \"スレッドをピン留めするかどうか。スレッドがフォーラムに属する場合にのみ動作します。\"\n\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.edit:20\nmsgid \"Whether non-moderators can add other non-moderators to this thread. Only available for private threads.\"\nmsgstr \"モデレータでないユーザーがこのスレッドに他のモデレータでないユーザーを追加できるかどうか。プライベートスレッドでのみ利用できます。\"\n\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.edit:23\nmsgid \"The new duration in minutes before a thread is automatically hidden from the channel list. Must be one of ``60``, ``1440``, ``4320``, or ``10080``.\"\nmsgstr \"スレッドが自動的にチャンネルリストから非表示となるまでの分単位の新しい期間。``60``、``1440``、``4320``、または ``10080`` のいずれかでなければなりません。\"\n\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.edit:26\nmsgid \"Specifies the slowmode rate limit for user in this thread, in seconds. A value of ``0`` disables slowmode. The maximum value possible is ``21600``.\"\nmsgstr \"秒単位でこのスレッドのユーザーの低速モードの値を指定します。 ``0`` を渡すと低速モードを無効にできます。可能な最大の値は ``21600`` です。\"\n\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.edit:29\nmsgid \"The new tags to apply to the thread. There can only be up to 5 tags applied to a thread.\"\nmsgstr \"スレッドに適用する新しいタグ。スレッドに適用できるタグは最大5つまでです。\"\n\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.edit:33\nmsgid \"The reason for editing this thread. Shows up on the audit log.\"\nmsgstr \"スレッドを編集する理由。監査ログに表示されます。\"\n\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.edit:36\nmsgid \"You do not have permissions to edit the thread.\"\nmsgstr \"スレッドを編集する権限がない場合。\"\n\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.edit:37\nmsgid \"Editing the thread failed.\"\nmsgstr \"スレッドの編集に失敗した場合。\"\n\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.edit:39\nmsgid \"The newly edited thread.\"\nmsgstr \"新しく編集されたスレッド。\"\n\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.add_tags:3\nmsgid \"Adds the given forum tags to a thread.\"\nmsgstr \"渡されたフォーラムタグをスレッドに追加します。\"\n\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.add_tags:5\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.remove_tags:5\nmsgid \"You must have :attr:`~Permissions.manage_threads` to use this or the thread must be owned by you.\"\nmsgstr \"自身で作成したスレッド以外でこれを使用するには、 :attr:`~Permissions.manage_threads` が必要です。\"\n\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.add_tags:8\nmsgid \"Tags that have :attr:`ForumTag.moderated` set to ``True`` require :attr:`~Permissions.manage_threads` to be added.\"\nmsgstr \":attr:`ForumTag.moderated` が ``True`` に設定されているタグを追加するには、 :attr:`~Permissions.manage_threads` が必要になります。\"\n\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.add_tags:11\nmsgid \"The maximum number of tags that can be added to a thread is 5.\"\nmsgstr \"スレッドに追加できるタグの最大数は 5 です。\"\n\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.add_tags:13\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.remove_tags:8\nmsgid \"The parent channel must be a :class:`ForumChannel`.\"\nmsgstr \"親チャンネルは :class:`ForumChannel` でなければなりません。\"\n\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.add_tags:17\nmsgid \"An argument list of :class:`abc.Snowflake` representing a :class:`ForumTag` to add to the thread.\"\nmsgstr \"スレッドに追加する :class:`ForumTag` である :class:`abc.Snowflake` の引数リスト。\"\n\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.add_tags:20\nmsgid \"The reason for adding these tags.\"\nmsgstr \"タグを追加する理由。\"\n\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.add_tags:23\nmsgid \"You do not have permissions to add these tags.\"\nmsgstr \"タグを追加する権限がない場合。\"\n\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.add_tags:24\nmsgid \"Adding tags failed.\"\nmsgstr \"タグの追加に失敗した場合。\"\n\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.remove_tags:3\nmsgid \"Remove the given forum tags to a thread.\"\nmsgstr \"渡されたフォーラムタグをスレッドから除去します。\"\n\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.remove_tags:12\nmsgid \"An argument list of :class:`abc.Snowflake` representing a :class:`ForumTag` to remove to the thread.\"\nmsgstr \"スレッドから除去する :class:`ForumTag` である :class:`abc.Snowflake` の引数リスト。\"\n\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.remove_tags:15\nmsgid \"The reason for removing these tags.\"\nmsgstr \"タグを除去する理由。\"\n\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.remove_tags:18\nmsgid \"You do not have permissions to remove these tags.\"\nmsgstr \"タグを除去する権限がない場合。\"\n\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.remove_tags:19\nmsgid \"Removing tags failed.\"\nmsgstr \"タグの除去に失敗した場合。\"\n\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.join:3\nmsgid \"Joins this thread.\"\nmsgstr \"スレッドに参加します。\"\n\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.join:5\nmsgid \"You must have :attr:`~Permissions.send_messages_in_threads` to join a thread. If the thread is private, :attr:`~Permissions.manage_threads` is also needed.\"\nmsgstr \"スレッドに参加するには :attr:`~Permissions.send_messages_in_threads` 権限が必要です。スレッドがプライベートの場合は、 :attr:`~Permissions.manage_threads` も必要です。\"\n\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.join:8\nmsgid \"You do not have permissions to join the thread.\"\nmsgstr \"スレッドに参加する権限を持っていない場合。\"\n\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.join:9\nmsgid \"Joining the thread failed.\"\nmsgstr \"スレッドへの参加に失敗した場合。\"\n\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.leave:3\nmsgid \"Leaves this thread.\"\nmsgstr \"このスレッドから退出します。\"\n\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.leave:5\nmsgid \"Leaving the thread failed.\"\nmsgstr \"スレッドの退出に失敗した場合。\"\n\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.add_user:3\nmsgid \"Adds a user to this thread.\"\nmsgstr \"このスレッドにユーザーを追加します。\"\n\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.add_user:5\nmsgid \"You must have :attr:`~Permissions.send_messages_in_threads` to add a user to a thread. If the thread is private and :attr:`invitable` is ``False`` then :attr:`~Permissions.manage_messages` is required to add a user to the thread.\"\nmsgstr \"スレッドにユーザーを追加するには :attr:`~Permissions.send_messages_in_threads` 権限が必要です。このスレッドがプライベートで :attr:`invitable` が ``False`` ならば :attr:`~Permissions.manage_messages` 権限も必要です。\"\n\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.add_user:9\nmsgid \"The user to add to the thread.\"\nmsgstr \"スレッドに追加するユーザー。\"\n\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.add_user:12\nmsgid \"You do not have permissions to add the user to the thread.\"\nmsgstr \"スレッドにユーザーを追加する権限がない場合。\"\n\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.add_user:13\nmsgid \"Adding the user to the thread failed.\"\nmsgstr \"スレッドへのユーザーの追加に失敗した場合。\"\n\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.remove_user:3\nmsgid \"Removes a user from this thread.\"\nmsgstr \"このスレッドからユーザーを除去します。\"\n\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.remove_user:5\nmsgid \"You must have :attr:`~Permissions.manage_threads` or be the creator of the thread to remove a user.\"\nmsgstr \"ユーザーの除去には、 :attr:`~Permissions.manage_threads` 権限を持ち、またはスレッドの作成者である必要があります。\"\n\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.remove_user:7\nmsgid \"The user to remove from the thread.\"\nmsgstr \"スレッドから除去するユーザー。\"\n\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.remove_user:10\nmsgid \"You do not have permissions to remove the user from the thread.\"\nmsgstr \"スレッドからユーザーを除去する権限がない場合。\"\n\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.remove_user:11\nmsgid \"Removing the user from the thread failed.\"\nmsgstr \"スレッドからユーザーを除去するのに失敗した場合。\"\n\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.fetch_member:3\nmsgid \"Retrieves a :class:`ThreadMember` for the given user ID.\"\nmsgstr \"指定されたユーザー ID の :class:`ThreadMember` を取得します。\"\n\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.fetch_member:5\nmsgid \"The specified user is not a member of this thread.\"\nmsgstr \"指定されたユーザーがこのスレッドのメンバーでない場合。\"\n\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.fetch_member:6\nmsgid \"Retrieving the member failed.\"\nmsgstr \"メンバーの取得に失敗した場合。\"\n\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.fetch_member:8\nmsgid \"The thread member from the user ID.\"\nmsgstr \"指定されたユーザー IDのスレッドメンバー。\"\n\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.fetch_member:9\nmsgid \":class:`ThreadMember`\"\nmsgstr \":class:`ThreadMember`\"\n\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.fetch_members:3\nmsgid \"Retrieves all :class:`ThreadMember` that are in this thread.\"\nmsgstr \"このスレッドにいるすべての :class:`ThreadMember` を取得します。\"\n\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.fetch_members:10\nmsgid \"All thread members in the thread.\"\nmsgstr \"スレッドのすべてのメンバー。\"\n\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.delete:3\nmsgid \"Deletes this thread.\"\nmsgstr \"スレッドを削除します。\"\n\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.delete:5\nmsgid \"You must have :attr:`~Permissions.manage_threads` to delete threads.\"\nmsgstr \"スレッドを削除するには、 :attr:`~Permissions.manage_threads` 権限が必要です。\"\n\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.delete:7\nmsgid \"You do not have permissions to delete this thread.\"\nmsgstr \"スレッドを削除する権限がない場合。\"\n\n#: ../../../discord/threads.py:docstring of discord.threads.Thread.delete:8\nmsgid \"Deleting the thread failed.\"\nmsgstr \"スレッドの削除に失敗した場合。\"\n\n#: ../../api.rst:4664\nmsgid \"ThreadMember\"\nmsgstr \"ThreadMember\"\n\n#: ../../../discord/threads.py:docstring of discord.threads.ThreadMember:1\nmsgid \"Represents a Discord thread member.\"\nmsgstr \"Discordのスレッドのメンバーを表します。\"\n\n#: ../../../discord/threads.py:docstring of discord.threads.ThreadMember:7\nmsgid \"Checks if two thread members are equal.\"\nmsgstr \"二つのスレッドメンバーが等しいかを比較します。\"\n\n#: ../../../discord/threads.py:docstring of discord.threads.ThreadMember:11\nmsgid \"Checks if two thread members are not equal.\"\nmsgstr \"二つのスレッドメンバーが等しくないかを比較します。\"\n\n#: ../../../discord/threads.py:docstring of discord.threads.ThreadMember:15\nmsgid \"Returns the thread member's hash.\"\nmsgstr \"スレッドメンバーのハッシュ値を返します。\"\n\n#: ../../../discord/threads.py:docstring of discord.threads.ThreadMember:19\nmsgid \"Returns the thread member's name.\"\nmsgstr \"スレッドメンバーの名前を返します。\"\n\n#: ../../../discord/threads.py:docstring of discord.threads.ThreadMember:25\nmsgid \"The thread member's ID.\"\nmsgstr \"スレッドメンバーのID。\"\n\n#: ../../../discord/threads.py:docstring of discord.threads.ThreadMember:31\nmsgid \"The thread's ID.\"\nmsgstr \"スレッドのID。\"\n\n#: ../../../discord/threads.py:docstring of discord.threads.ThreadMember:37\nmsgid \"The time the member joined the thread in UTC.\"\nmsgstr \"メンバーがスレッドに参加したUTC時刻。\"\n\n#: ../../../discord/threads.py:docstring of discord.ThreadMember.thread:1\nmsgid \"The thread this member belongs to.\"\nmsgstr \"メンバーが属するスレッド。\"\n\n#: ../../api.rst:4672\nmsgid \"VoiceChannel\"\nmsgstr \"VoiceChannel\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.VoiceChannel:1\nmsgid \"Represents a Discord guild voice channel.\"\nmsgstr \"Discordサーバーのボイスチャンネル。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.VoiceChannel:79\nmsgid \"The type of this attribute has changed to :class:`str`.\"\nmsgstr \"この属性の型は :class:`str` に変更されました。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.VoiceChannel.edit:13\n#: ../../../discord/channel.py:docstring of discord.channel.StageChannel.edit:13\nmsgid \"The ``region`` parameter now accepts :class:`str` instead of an enum.\"\nmsgstr \"``region`` パラメータは列挙型の代わりに :class:`str` を受け付けるようになりました。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.VoiceChannel.edit:20\n#: ../../../discord/channel.py:docstring of discord.channel.StageChannel.edit:20\nmsgid \"The new channel's name.\"\nmsgstr \"チャンネルの新しい名前。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.VoiceChannel.edit:22\nmsgid \"The new channel's bitrate.\"\nmsgstr \"チャンネルの新しいビットレート。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.VoiceChannel.edit:26\n#: ../../../discord/channel.py:docstring of discord.channel.StageChannel.edit:26\nmsgid \"The new channel's user limit.\"\nmsgstr \"チャンネルの新しいユーザー人数制限。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.VoiceChannel.edit:44\nmsgid \"The new region for the voice channel's voice communication. A value of ``None`` indicates automatic voice region detection.\"\nmsgstr \"ボイスチャンネルの新しい音声通信のためのリージョン。値が ``None`` の場合は自動で検出されます。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.VoiceChannel.edit:53\nmsgid \"The new voice channel status. It can be up to 500 characters. Can be ``None`` to remove the status.\"\nmsgstr \"\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.VoiceChannel.edit:59\n#: ../../../discord/channel.py:docstring of discord.channel.StageChannel.edit:50\nmsgid \"If the permission overwrite information is not in proper form.\"\nmsgstr \"権限の上書きの情報が適切なものでない場合。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.VoiceChannel.edit:63\nmsgid \"The newly edited voice channel. If the edit was only positional then ``None`` is returned instead.\"\nmsgstr \"新しく編集されたボイスチャンネル。編集が位置のみだった場合は代わりに ``None`` が返されます。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.VoiceChannel.edit:65\nmsgid \"Optional[:class:`.VoiceChannel`]\"\nmsgstr \"Optional[:class:`.VoiceChannel`]\"\n\n#: ../../../discord/channel.py:docstring of discord.VoiceChannel.members:1\n#: ../../../discord/channel.py:docstring of discord.StageChannel.members:1\nmsgid \"Returns all members that are currently inside this voice channel.\"\nmsgstr \"このボイスチャンネル内にいるすべてのメンバーを返します。\"\n\n#: ../../../discord/channel.py:docstring of discord.VoiceChannel.scheduled_events:1\n#: ../../../discord/channel.py:docstring of discord.StageChannel.scheduled_events:1\nmsgid \"Returns all scheduled events for this channel.\"\nmsgstr \"このチャンネルのすべてのスケジュールイベントを返します。\"\n\n#: ../../../discord/channel.py:docstring of discord.VoiceChannel.voice_states:1\n#: ../../../discord/channel.py:docstring of discord.StageChannel.voice_states:1\nmsgid \"Returns a mapping of member IDs who have voice states in this channel.\"\nmsgstr \"このチャンネル内にボイス状態のあるメンバーIDのマッピングを返します。\"\n\n#: ../../../discord/channel.py:docstring of discord.VoiceChannel.voice_states:7\n#: ../../../discord/channel.py:docstring of discord.StageChannel.voice_states:7\nmsgid \"This function is intentionally low level to replace :attr:`members` when the member cache is unavailable.\"\nmsgstr \"これは、メンバーキャッシュが存在しない場合に :attr:`members` を置き換えるため意図的に低レベルとなっています。\"\n\n#: ../../../discord/channel.py:docstring of discord.VoiceChannel.voice_states:10\n#: ../../../discord/channel.py:docstring of discord.StageChannel.voice_states:10\nmsgid \"The mapping of member ID to a voice state.\"\nmsgstr \"メンバーIDをキーとしボイス状態を値とするマッピング。\"\n\n#: ../../../discord/channel.py:docstring of discord.VoiceChannel.voice_states:11\n#: ../../../discord/channel.py:docstring of discord.StageChannel.voice_states:11\nmsgid \"Mapping[:class:`int`, :class:`VoiceState`]\"\nmsgstr \"Mapping[:class:`int`, :class:`VoiceState`]\"\n\n#: ../../api.rst:4681\nmsgid \"StageChannel\"\nmsgstr \"StageChannel\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.StageChannel:1\nmsgid \"Represents a Discord guild stage channel.\"\nmsgstr \"Discordサーバーのステージチャンネルを表します。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.StageChannel:51\nmsgid \"The channel's topic. ``None`` if it isn't set.\"\nmsgstr \"チャンネルのトピック。存在しない場合は ``None`` になります。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.StageChannel:76\nmsgid \"The channel's limit for number of members that can be in a stage channel.\"\nmsgstr \"ステージチャンネルに参加できるメンバー数の制限。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.StageChannel:82\nmsgid \"The region for the stage channel's voice communication. A value of ``None`` indicates automatic voice region detection.\"\nmsgstr \"ステージチャンネルの音声通信のためのリージョン。値が ``None`` の場合は自動で検出されます。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.StageChannel:89\n#: ../../../discord/channel.py:docstring of discord.channel.StageChannel.edit:45\nmsgid \"The camera video quality for the stage channel's participants.\"\nmsgstr \"ステージチャンネル参加者のカメラビデオの画質。\"\n\n#: ../../../discord/channel.py:docstring of discord.StageChannel.requesting_to_speak:1\nmsgid \"A list of members who are requesting to speak in the stage channel.\"\nmsgstr \"ステージチャンネルで話すことを要求しているメンバーのリスト。\"\n\n#: ../../../discord/channel.py:docstring of discord.StageChannel.speakers:1\nmsgid \"A list of members who have been permitted to speak in the stage channel.\"\nmsgstr \"ステージチャンネルで話すことが許可されたメンバーのリスト。\"\n\n#: ../../../discord/channel.py:docstring of discord.StageChannel.listeners:1\nmsgid \"A list of members who are listening in the stage channel.\"\nmsgstr \"ステージチャンネルで聴いているメンバーのリスト。\"\n\n#: ../../../discord/channel.py:docstring of discord.StageChannel.moderators:1\nmsgid \"A list of members who are moderating the stage channel.\"\nmsgstr \"ステージチャンネルを管理しているメンバーのリスト。\"\n\n#: ../../../discord/channel.py:docstring of discord.StageChannel.instance:1\nmsgid \"The running stage instance of the stage channel.\"\nmsgstr \"ステージチャンネルの開催中のステージインスタンス。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.StageChannel.create_instance:3\nmsgid \"Create a stage instance.\"\nmsgstr \"ステージインスタンスを作成します。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.StageChannel.create_instance:9\nmsgid \"The stage instance's topic.\"\nmsgstr \"ステージインスタンスのトピック。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.StageChannel.create_instance:11\nmsgid \"The stage instance's privacy level. Defaults to :attr:`PrivacyLevel.guild_only`.\"\nmsgstr \"ステージインスタンスのプライバシーレベル。デフォルトは :attr:`PrivacyLevel.guild_only` です。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.StageChannel.create_instance:13\nmsgid \"Whether to send a start notification. This sends a push notification to @everyone if ``True``. Defaults to ``False``. You must have :attr:`~Permissions.mention_everyone` to do this.\"\nmsgstr \"開始通知を送信するかどうか。 ``True`` の場合、プッシュ通知を@everyoneに送信します。 デフォルトは ``False`` です。これを行うには、 :attr:`~Permissions.mention_everyone` が必要です。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.StageChannel.create_instance:18\nmsgid \"The guild scheduled event associated with the stage instance.\"\nmsgstr \"\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.StageChannel.create_instance:22\nmsgid \"The reason the stage instance was created. Shows up on the audit log.\"\nmsgstr \"ステージインスタンスを作成する理由。監査ログに表示されます。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.StageChannel.create_instance:25\n#: ../../../discord/stage_instance.py:docstring of discord.stage_instance.StageInstance.edit:14\nmsgid \"If the ``privacy_level`` parameter is not the proper type.\"\nmsgstr \"引数 ``privacy_level`` が適切な型でない場合。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.StageChannel.create_instance:26\nmsgid \"You do not have permissions to create a stage instance.\"\nmsgstr \"ステージインスタンスを作成する権限がない場合。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.StageChannel.create_instance:27\nmsgid \"Creating a stage instance failed.\"\nmsgstr \"ステージインスタンスの作成に失敗した場合。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.StageChannel.create_instance:29\nmsgid \"The newly created stage instance.\"\nmsgstr \"新しく作成されたステージインスタンス。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.StageChannel.create_instance:30\n#: ../../../discord/channel.py:docstring of discord.channel.StageChannel.fetch_instance:11\nmsgid \":class:`StageInstance`\"\nmsgstr \":class:`StageInstance`\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.StageChannel.fetch_instance:3\nmsgid \"Gets the running :class:`StageInstance`.\"\nmsgstr \"開催中の :class:`StageInstance` を取得します。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.StageChannel.fetch_instance:10\nmsgid \"The stage instance.\"\nmsgstr \"ステージインスタンス。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.StageChannel.edit:7\nmsgid \"The ``topic`` parameter must now be set via :attr:`create_instance`.\"\nmsgstr \"``topic`` パラメーターは :attr:`create_instance` で設定する必要があります。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.StageChannel.edit:42\nmsgid \"The new region for the stage channel's voice communication. A value of ``None`` indicates automatic voice region detection.\"\nmsgstr \"新しいステージチャンネルの音声通信のためのリージョン。値が ``None`` の場合は自動で検出されます。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.StageChannel.edit:54\nmsgid \"The newly edited stage channel. If the edit was only positional then ``None`` is returned instead.\"\nmsgstr \"新しく編集されたステージチャンネル。編集が位置のみだった場合は代わりに ``None`` が返されます。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.StageChannel.edit:56\nmsgid \"Optional[:class:`.StageChannel`]\"\nmsgstr \"Optional[:class:`.StageChannel`]\"\n\n#: ../../api.rst:4691\nmsgid \"StageInstance\"\nmsgstr \"StageInstance\"\n\n#: ../../../discord/stage_instance.py:docstring of discord.stage_instance.StageInstance:1\nmsgid \"Represents a stage instance of a stage channel in a guild.\"\nmsgstr \"ギルド内のステージチャンネルのステージインスタンスを表します。\"\n\n#: ../../../discord/stage_instance.py:docstring of discord.stage_instance.StageInstance:9\nmsgid \"Checks if two stage instances are equal.\"\nmsgstr \"二つのステージインスタンスが等しいかを比較します。\"\n\n#: ../../../discord/stage_instance.py:docstring of discord.stage_instance.StageInstance:13\nmsgid \"Checks if two stage instances are not equal.\"\nmsgstr \"二つのステージインスタンスが等しくないかを比較します。\"\n\n#: ../../../discord/stage_instance.py:docstring of discord.stage_instance.StageInstance:17\nmsgid \"Returns the stage instance's hash.\"\nmsgstr \"ステージインスタンスのハッシュ値を返します。\"\n\n#: ../../../discord/stage_instance.py:docstring of discord.stage_instance.StageInstance:21\nmsgid \"The stage instance's ID.\"\nmsgstr \"ステージインスタンスのID。\"\n\n#: ../../../discord/stage_instance.py:docstring of discord.stage_instance.StageInstance:27\nmsgid \"The guild that the stage instance is running in.\"\nmsgstr \"ステージインスタンスが開催されているギルド。\"\n\n#: ../../../discord/stage_instance.py:docstring of discord.stage_instance.StageInstance:33\nmsgid \"The ID of the channel that the stage instance is running in.\"\nmsgstr \"ステージインスタンスを開催しているチャンネルの ID。\"\n\n#: ../../../discord/stage_instance.py:docstring of discord.stage_instance.StageInstance:39\nmsgid \"The topic of the stage instance.\"\nmsgstr \"ステージインスタンスのトピック。\"\n\n#: ../../../discord/stage_instance.py:docstring of discord.stage_instance.StageInstance:45\nmsgid \"The privacy level of the stage instance.\"\nmsgstr \"ステージインスタンスのプライバシーレベル。\"\n\n#: ../../../discord/stage_instance.py:docstring of discord.stage_instance.StageInstance:51\nmsgid \"Whether discoverability for the stage instance is disabled.\"\nmsgstr \"ステージインスタンスの発見が無効になっているかどうか。\"\n\n#: ../../../discord/stage_instance.py:docstring of discord.stage_instance.StageInstance:57\nmsgid \"The ID of scheduled event that belongs to the stage instance if any.\"\nmsgstr \"存在する場合、このステージインスタンスに属するスケジュールイベントのID。\"\n\n#: ../../docstring of discord.StageInstance.channel:1\nmsgid \"The channel that stage instance is running in.\"\nmsgstr \"ステージインスタンスを開催しているチャンネル。\"\n\n#: ../../docstring of discord.StageInstance.channel:3\nmsgid \"Optional[:class:`StageChannel`]\"\nmsgstr \"Optional[:class:`StageChannel`]\"\n\n#: ../../docstring of discord.StageInstance.scheduled_event:1\nmsgid \"The scheduled event that belongs to the stage instance.\"\nmsgstr \"ステージインスタンスに属するスケジュールイベント。\"\n\n#: ../../../discord/stage_instance.py:docstring of discord.stage_instance.StageInstance.edit:3\nmsgid \"Edits the stage instance.\"\nmsgstr \"ステージインスタンスを編集します。\"\n\n#: ../../../discord/stage_instance.py:docstring of discord.stage_instance.StageInstance.edit:7\nmsgid \"The stage instance's new topic.\"\nmsgstr \"ステージインスタンスの新しいトピック。\"\n\n#: ../../../discord/stage_instance.py:docstring of discord.stage_instance.StageInstance.edit:9\nmsgid \"The stage instance's new privacy level.\"\nmsgstr \"ステージインスタンスの新しいプライバシーレベル。\"\n\n#: ../../../discord/stage_instance.py:docstring of discord.stage_instance.StageInstance.edit:11\nmsgid \"The reason the stage instance was edited. Shows up on the audit log.\"\nmsgstr \"ステージインスタンスを編集する理由。監査ログに表示されます。\"\n\n#: ../../../discord/stage_instance.py:docstring of discord.stage_instance.StageInstance.edit:15\nmsgid \"You do not have permissions to edit the stage instance.\"\nmsgstr \"ステージインスタンスを編集する権限がない場合。\"\n\n#: ../../../discord/stage_instance.py:docstring of discord.stage_instance.StageInstance.edit:16\nmsgid \"Editing a stage instance failed.\"\nmsgstr \"ステージインスタンスの編集に失敗した場合。\"\n\n#: ../../../discord/stage_instance.py:docstring of discord.stage_instance.StageInstance.delete:3\nmsgid \"Deletes the stage instance.\"\nmsgstr \"ステージインスタンスを削除します。\"\n\n#: ../../../discord/stage_instance.py:docstring of discord.stage_instance.StageInstance.delete:7\nmsgid \"The reason the stage instance was deleted. Shows up on the audit log.\"\nmsgstr \"ステージインスタンスを削除する理由。監査ログに表示されます。\"\n\n#: ../../../discord/stage_instance.py:docstring of discord.stage_instance.StageInstance.delete:10\nmsgid \"You do not have permissions to delete the stage instance.\"\nmsgstr \"ステージインスタンスを削除する権限がない場合。\"\n\n#: ../../../discord/stage_instance.py:docstring of discord.stage_instance.StageInstance.delete:11\nmsgid \"Deleting the stage instance failed.\"\nmsgstr \"ステージインスタンスの削除に失敗した場合。\"\n\n#: ../../api.rst:4699\nmsgid \"CategoryChannel\"\nmsgstr \"CategoryChannel\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.CategoryChannel:1\nmsgid \"Represents a Discord channel category.\"\nmsgstr \"Discordのチャンネルカテゴリを表します。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.CategoryChannel:3\nmsgid \"These are useful to group channels to logical compartments.\"\nmsgstr \"チャンネルを論理的な区画にグループ化するのに便利な機能です。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.CategoryChannel:17\nmsgid \"Returns the category's hash.\"\nmsgstr \"カテゴリのハッシュを返します。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.CategoryChannel:21\nmsgid \"Returns the category's name.\"\nmsgstr \"カテゴリの名前を返します。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.CategoryChannel:25\nmsgid \"The category name.\"\nmsgstr \"カテゴリの名前。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.CategoryChannel:31\nmsgid \"The guild the category belongs to.\"\nmsgstr \"カテゴリが属するギルド。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.CategoryChannel:37\nmsgid \"The category channel ID.\"\nmsgstr \"カテゴリチャンネルのID。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.CategoryChannel:43\nmsgid \"The position in the category list. This is a number that starts at 0. e.g. the top category is position 0.\"\nmsgstr \"カテゴリリストにおける位置。これは0から始まる番号で、最も上のカテゴリの位置は0です。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.CategoryChannel:50\nmsgid \"If the channel is marked as \\\"not safe for work\\\".\"\nmsgstr \"チャンネルに年齢制限がかかっているか。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.CategoryChannel:54\nmsgid \"To check if the channel or the guild of that channel are marked as NSFW, consider :meth:`is_nsfw` instead.\"\nmsgstr \"チャンネルやその属するギルドに年齢制限があるかを調べるには :meth:`is_nsfw` を使用してみてください。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.CategoryChannel.is_nsfw:1\nmsgid \":class:`bool`: Checks if the category is NSFW.\"\nmsgstr \":class:`bool`: カテゴリに年齢制限があるかどうかをチェックします。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.CategoryChannel.edit:17\nmsgid \"The new category's name.\"\nmsgstr \"新しいカテゴリの名前。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.CategoryChannel.edit:19\nmsgid \"The new category's position.\"\nmsgstr \"新しいカテゴリの位置。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.CategoryChannel.edit:21\nmsgid \"To mark the category as NSFW or not.\"\nmsgstr \"カテゴリに年齢制限をかけるかどうか。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.CategoryChannel.edit:23\nmsgid \"The reason for editing this category. Shows up on the audit log.\"\nmsgstr \"カテゴリを編集する理由。監査ログに表示されます。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.CategoryChannel.edit:29\nmsgid \"If position is less than 0 or greater than the number of categories.\"\nmsgstr \"位置が0より小さいか、カテゴリの数値より大きい場合。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.CategoryChannel.edit:30\nmsgid \"The overwrite information is not in proper form.\"\nmsgstr \"上書き情報が適切なものでない場合。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.CategoryChannel.edit:31\nmsgid \"You do not have permissions to edit the category.\"\nmsgstr \"カテゴリを編集するのに必要な権限がない場合。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.CategoryChannel.edit:32\nmsgid \"Editing the category failed.\"\nmsgstr \"カテゴリの編集に失敗した場合。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.CategoryChannel.edit:34\nmsgid \"The newly edited category channel. If the edit was only positional then ``None`` is returned instead.\"\nmsgstr \"新しく編集されたカテゴリチャンネル。編集が位置のみだった場合は代わりに ``None`` が返されます。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.CategoryChannel.edit:36\nmsgid \"Optional[:class:`.CategoryChannel`]\"\nmsgstr \"Optional[:class:`.CategoryChannel`]\"\n\n#: ../../../discord/channel.py:docstring of discord.CategoryChannel.channels:1\nmsgid \"Returns the channels that are under this category.\"\nmsgstr \"このカテゴリに属するチャンネルを返します。\"\n\n#: ../../../discord/channel.py:docstring of discord.CategoryChannel.channels:3\nmsgid \"These are sorted by the official Discord UI, which places voice channels below the text channels.\"\nmsgstr \"これらは公式のDiscord UIによってソートされており、ボイスチャンネルはテキストチャンネルの下に配置されます。\"\n\n#: ../../../discord/channel.py:docstring of discord.CategoryChannel.channels:5\nmsgid \"List[:class:`abc.GuildChannel`]\"\nmsgstr \"List[:class:`abc.GuildChannel`]\"\n\n#: ../../../discord/channel.py:docstring of discord.CategoryChannel.text_channels:1\nmsgid \"Returns the text channels that are under this category.\"\nmsgstr \"このカテゴリに属するテキストチャンネルを返します。\"\n\n#: ../../../discord/channel.py:docstring of discord.CategoryChannel.voice_channels:1\nmsgid \"Returns the voice channels that are under this category.\"\nmsgstr \"このカテゴリに属するボイスチャンネルを返します。\"\n\n#: ../../../discord/channel.py:docstring of discord.CategoryChannel.stage_channels:1\nmsgid \"Returns the stage channels that are under this category.\"\nmsgstr \"このカテゴリに属するステージチャンネルを返します。\"\n\n#: ../../../discord/channel.py:docstring of discord.CategoryChannel.forums:1\nmsgid \"Returns the forum channels that are under this category.\"\nmsgstr \"\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.CategoryChannel.create_text_channel:3\nmsgid \"A shortcut method to :meth:`Guild.create_text_channel` to create a :class:`TextChannel` in the category.\"\nmsgstr \"カテゴリ内に :class:`TextChannel` を作成するための :meth:`Guild.create_text_channel` のショートカット。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.CategoryChannel.create_voice_channel:3\nmsgid \"A shortcut method to :meth:`Guild.create_voice_channel` to create a :class:`VoiceChannel` in the category.\"\nmsgstr \"カテゴリ内に :class:`VoiceChannel` を作成するための :meth:`Guild.create_voice_channel` のショートカット。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.CategoryChannel.create_stage_channel:3\nmsgid \"A shortcut method to :meth:`Guild.create_stage_channel` to create a :class:`StageChannel` in the category.\"\nmsgstr \"カテゴリ内に :class:`StageChannel` を作成するための :meth:`Guild.create_stage_channel` のショートカット。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.CategoryChannel.create_forum:3\nmsgid \"A shortcut method to :meth:`Guild.create_forum` to create a :class:`ForumChannel` in the category.\"\nmsgstr \"カテゴリ内に :class:`ForumChannel` を作成するための :meth:`Guild.create_forum` のショートカット。\"\n\n#: ../../api.rst:4708\nmsgid \"DMChannel\"\nmsgstr \"DMChannel\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.DMChannel:1\nmsgid \"Represents a Discord direct message channel.\"\nmsgstr \"Discordのダイレクトメッセージチャンネルを表します。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.DMChannel:19\n#: ../../../discord/channel.py:docstring of discord.channel.GroupChannel:19\nmsgid \"Returns a string representation of the channel\"\nmsgstr \"このチャンネルの文字列表現を返します。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.DMChannel:23\nmsgid \"The user you are participating with in the direct message channel. If this channel is received through the gateway, the recipient information may not be always available.\"\nmsgstr \"ダイレクトメッセージチャンネルに参加しているユーザー。 このチャンネルがゲートウェイ経由で受信された場合は、この情報が利用可能ではない場合があります。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.DMChannel:37\nmsgid \"The direct message channel ID.\"\nmsgstr \"ダイレクトメッセージチャンネルのID。\"\n\n#: ../../../discord/channel.py:docstring of discord.DMChannel.guild:1\nmsgid \"The guild this DM channel belongs to. Always ``None``.\"\nmsgstr \"DMチャンネルが属するギルド。常に ``None`` 。\"\n\n#: ../../../discord/channel.py:docstring of discord.DMChannel.guild:3\n#: ../../../discord/channel.py:docstring of discord.GroupChannel.guild:3\nmsgid \"This is mainly provided for compatibility purposes in duck typing.\"\nmsgstr \"これは主にダックタイピング時の互換性の目的で提供されます。\"\n\n#: ../../../discord/channel.py:docstring of discord.DMChannel.created_at:1\nmsgid \"Returns the direct message channel's creation time in UTC.\"\nmsgstr \"ダイレクトメッセージチャンネルの作成された時間をUTCで返します。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.DMChannel.permissions_for:5\n#: ../../../discord/channel.py:docstring of discord.channel.GroupChannel.permissions_for:5\nmsgid \"Actual direct messages do not really have the concept of permissions.\"\nmsgstr \"実際のダイレクトメッセージには権限の概念は存在しません。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.DMChannel.permissions_for:7\n#: ../../../discord/channel.py:docstring of discord.channel.GroupChannel.permissions_for:7\nmsgid \"This returns all the Text related permissions set to ``True`` except:\"\nmsgstr \"これは以下を除いてテキスト関連の権限を ``True`` にしたものです:\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.DMChannel.permissions_for:9\n#: ../../../discord/channel.py:docstring of discord.channel.GroupChannel.permissions_for:9\nmsgid \":attr:`~Permissions.send_tts_messages`: You cannot send TTS messages in a DM.\"\nmsgstr \":attr:`~Permissions.send_tts_messages` ：DMにTTSメッセージは送ることはできません。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.DMChannel.permissions_for:10\n#: ../../../discord/channel.py:docstring of discord.channel.GroupChannel.permissions_for:10\nmsgid \":attr:`~Permissions.manage_messages`: You cannot delete others messages in a DM.\"\nmsgstr \":attr:`~Permissions.manage_messages` ：DM内の他のメッセージは削除できません。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.DMChannel.permissions_for:11\n#: ../../../discord/channel.py:docstring of discord.channel.GroupChannel.permissions_for:11\nmsgid \":attr:`~Permissions.create_private_threads`: There are no threads in a DM.\"\nmsgstr \":attr:`~Permissions.create_private_threads`: DMにはスレッドが存在しません。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.DMChannel.permissions_for:12\n#: ../../../discord/channel.py:docstring of discord.channel.GroupChannel.permissions_for:12\nmsgid \":attr:`~Permissions.create_public_threads`: There are no threads in a DM.\"\nmsgstr \":attr:`~Permissions.create_public_threads`: DMにはスレッドが存在しません。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.DMChannel.permissions_for:13\n#: ../../../discord/channel.py:docstring of discord.channel.GroupChannel.permissions_for:13\nmsgid \":attr:`~Permissions.manage_threads`: There are no threads in a DM.\"\nmsgstr \":attr:`~Permissions.manage_threads`: DMにはスレッドが存在しません。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.DMChannel.permissions_for:14\n#: ../../../discord/channel.py:docstring of discord.channel.GroupChannel.permissions_for:14\nmsgid \":attr:`~Permissions.send_messages_in_threads`: There are no threads in a DM.\"\nmsgstr \":attr:`~Permissions.send_messages_in_threads`: DMにはスレッドが存在しません。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.DMChannel.permissions_for:22\n#: ../../../discord/channel.py:docstring of discord.channel.GroupChannel.permissions_for:24\nmsgid \"Thread related permissions are now set to ``False``.\"\nmsgstr \"スレッド関連の権限が ``False`` に設定されるようになりました。\"\n\n#: ../../api.rst:4721\nmsgid \"GroupChannel\"\nmsgstr \"GroupChannel\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.GroupChannel:1\nmsgid \"Represents a Discord group channel.\"\nmsgstr \"Discordのグループチャンネルを表します。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.GroupChannel:23\nmsgid \"The users you are participating with in the group channel.\"\nmsgstr \"グループチャンネルに参加しているユーザー。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.GroupChannel:35\nmsgid \"The group channel ID.\"\nmsgstr \"グループチャンネルのID。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.GroupChannel:41\nmsgid \"The user that owns the group channel.\"\nmsgstr \"グループチャンネルを所有するユーザー。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.GroupChannel:47\nmsgid \"The owner ID that owns the group channel.\"\nmsgstr \"グループチャンネルを所有するユーザーのID。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.GroupChannel:55\nmsgid \"The group channel's name if provided.\"\nmsgstr \"与えられた場合、グループチャンネルの名前。\"\n\n#: ../../../discord/channel.py:docstring of discord.GroupChannel.guild:1\nmsgid \"The guild this group channel belongs to. Always ``None``.\"\nmsgstr \"グループチャンネルが属するギルド。常に ``None`` 。\"\n\n#: ../../../discord/channel.py:docstring of discord.GroupChannel.icon:1\nmsgid \"Returns the channel's icon asset if available.\"\nmsgstr \"利用できる場合、チャンネルのアイコンのアセットを返します。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.GroupChannel.permissions_for:16\nmsgid \"This also checks the kick_members permission if the user is the owner.\"\nmsgstr \"ユーザーが所有者の場合、kick_members 権限もチェックします。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.GroupChannel.permissions_for:26\nmsgid \"The user to check permissions for.\"\nmsgstr \"権限を確認したいユーザー。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.GroupChannel.permissions_for:29\nmsgid \"The resolved permissions for the user.\"\nmsgstr \"ユーザーの解決された権限。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.GroupChannel.leave:3\nmsgid \"Leave the group.\"\nmsgstr \"グループから脱退します。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.GroupChannel.leave:5\nmsgid \"If you are the only one in the group, this deletes it as well.\"\nmsgstr \"あなたがグループにいる唯一の者である場合、グループが削除されます。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.GroupChannel.leave:7\nmsgid \"Leaving the group failed.\"\nmsgstr \"グループの脱退に失敗した場合。\"\n\n#: ../../api.rst:4734\nmsgid \"PartialInviteGuild\"\nmsgstr \"PartialInviteGuild\"\n\n#: ../../../discord/invite.py:docstring of discord.invite.PartialInviteGuild:1\nmsgid \"Represents a \\\"partial\\\" invite guild.\"\nmsgstr \"「部分的な」招待ギルドを表します。\"\n\n#: ../../../discord/invite.py:docstring of discord.invite.PartialInviteGuild:3\n#: ../../../discord/invite.py:docstring of discord.invite.PartialInviteChannel:3\nmsgid \"This model will be given when the user is not part of the guild the :class:`Invite` resolves to.\"\nmsgstr \"このモデルは、ユーザーが :class:`Invite` にて解決されたギルドに属さない場合に与えられます。\"\n\n#: ../../../discord/invite.py:docstring of discord.invite.PartialInviteGuild:10\nmsgid \"Checks if two partial guilds are the same.\"\nmsgstr \"2つの部分的なギルドが等しいものか比較します。\"\n\n#: ../../../discord/invite.py:docstring of discord.invite.PartialInviteGuild:14\nmsgid \"Checks if two partial guilds are not the same.\"\nmsgstr \"2つの部分的なギルドが等しいものではないか比較します。\"\n\n#: ../../../discord/invite.py:docstring of discord.invite.PartialInviteGuild:18\nmsgid \"Return the partial guild's hash.\"\nmsgstr \"部分的なギルドのハッシュ値を返します。\"\n\n#: ../../../discord/invite.py:docstring of discord.invite.PartialInviteGuild:22\nmsgid \"Returns the partial guild's name.\"\nmsgstr \"部分的なギルドの名前を返します。\"\n\n#: ../../../discord/invite.py:docstring of discord.invite.PartialInviteGuild:26\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.PartialWebhookGuild:15\nmsgid \"The partial guild's name.\"\nmsgstr \"部分的なギルドの名前。\"\n\n#: ../../../discord/invite.py:docstring of discord.invite.PartialInviteGuild:32\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.PartialWebhookGuild:9\nmsgid \"The partial guild's ID.\"\nmsgstr \"部分的なギルドのID。\"\n\n#: ../../../discord/invite.py:docstring of discord.invite.PartialInviteGuild:38\nmsgid \"The partial guild's verification level.\"\nmsgstr \"部分的なギルドの認証レベル。\"\n\n#: ../../../discord/invite.py:docstring of discord.invite.PartialInviteGuild:44\nmsgid \"A list of features the guild has. See :attr:`Guild.features` for more information.\"\nmsgstr \"ギルドが持っている機能のリスト。詳細は :attr:`Guild.features` を参照してください。\"\n\n#: ../../../discord/invite.py:docstring of discord.invite.PartialInviteGuild:50\nmsgid \"The partial guild's description.\"\nmsgstr \"部分的なギルドの説明。\"\n\n#: ../../../discord/invite.py:docstring of discord.invite.PartialInviteGuild:56\nmsgid \"The partial guild's NSFW level.\"\nmsgstr \"部分的なギルドの年齢制限レベル。\"\n\n#: ../../../discord/invite.py:docstring of discord.invite.PartialInviteGuild:64\nmsgid \"The partial guild's vanity URL code, if available.\"\nmsgstr \"利用可能な場合は、部分的なギルドのバニティURLコード。\"\n\n#: ../../../discord/invite.py:docstring of discord.invite.PartialInviteGuild:72\nmsgid \"The number of \\\"boosts\\\" the partial guild currently has.\"\nmsgstr \"部分的なギルドの現在の「ブースト」数。\"\n\n#: ../../../discord/invite.py:docstring of discord.PartialInviteGuild.vanity_url:1\nmsgid \"The Discord vanity invite URL for this partial guild, if available.\"\nmsgstr \"存在する場合、部分的なギルドのDiscord バニティURL。\"\n\n#: ../../api.rst:4742\nmsgid \"PartialInviteChannel\"\nmsgstr \"PartialInviteChannel\"\n\n#: ../../../discord/invite.py:docstring of discord.invite.PartialInviteChannel:1\nmsgid \"Represents a \\\"partial\\\" invite channel.\"\nmsgstr \"\\\"部分的な\\\"招待チャンネルを表します。\"\n\n#: ../../../discord/invite.py:docstring of discord.invite.PartialInviteChannel:10\n#: ../../../discord/widget.py:docstring of discord.widget.WidgetChannel:7\nmsgid \"Checks if two partial channels are the same.\"\nmsgstr \"2つの部分的なチャンネルが等しいものか比較します。\"\n\n#: ../../../discord/invite.py:docstring of discord.invite.PartialInviteChannel:14\n#: ../../../discord/widget.py:docstring of discord.widget.WidgetChannel:11\nmsgid \"Checks if two partial channels are not the same.\"\nmsgstr \"2つの部分的なチャンネルが等しいものではないか比較します。\"\n\n#: ../../../discord/invite.py:docstring of discord.invite.PartialInviteChannel:18\n#: ../../../discord/widget.py:docstring of discord.widget.WidgetChannel:15\nmsgid \"Return the partial channel's hash.\"\nmsgstr \"部分的なチャンネルのハッシュ値を返します。\"\n\n#: ../../../discord/invite.py:docstring of discord.invite.PartialInviteChannel:22\n#: ../../../discord/widget.py:docstring of discord.widget.WidgetChannel:19\nmsgid \"Returns the partial channel's name.\"\nmsgstr \"部分的なチャンネルの名前を返します。\"\n\n#: ../../../discord/invite.py:docstring of discord.invite.PartialInviteChannel:26\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.PartialWebhookChannel:15\nmsgid \"The partial channel's name.\"\nmsgstr \"部分的なチャンネルの名前。\"\n\n#: ../../../discord/invite.py:docstring of discord.invite.PartialInviteChannel:32\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.PartialWebhookChannel:9\nmsgid \"The partial channel's ID.\"\nmsgstr \"部分的なチャンネルのID。\"\n\n#: ../../../discord/invite.py:docstring of discord.invite.PartialInviteChannel:38\nmsgid \"The partial channel's type.\"\nmsgstr \"部分的なチャンネルの種類。\"\n\n#: ../../api.rst:4750\nmsgid \"Invite\"\nmsgstr \"Invite\"\n\n#: ../../../discord/invite.py:docstring of discord.invite.Invite:1\nmsgid \"Represents a Discord :class:`Guild` or :class:`abc.GuildChannel` invite.\"\nmsgstr \"Discord の :class:`Guild` または :class:`abc.GuildChannel` への招待を表します。\"\n\n#: ../../../discord/invite.py:docstring of discord.invite.Invite:10\nmsgid \"Checks if two invites are equal.\"\nmsgstr \"二つの招待が等しいかを比較します。\"\n\n#: ../../../discord/invite.py:docstring of discord.invite.Invite:14\nmsgid \"Checks if two invites are not equal.\"\nmsgstr \"二つの招待が等しくないかを比較します。\"\n\n#: ../../../discord/invite.py:docstring of discord.invite.Invite:18\nmsgid \"Returns the invite hash.\"\nmsgstr \"招待のハッシュ値を返します。\"\n\n#: ../../../discord/invite.py:docstring of discord.invite.Invite:22\nmsgid \"Returns the invite URL.\"\nmsgstr \"招待URLを返します。\"\n\n#: ../../../discord/invite.py:docstring of discord.invite.Invite:24\nmsgid \"The following table illustrates what methods will obtain the attributes:\"\nmsgstr \"次の表は、属性を取得できるメソッドを示しています。\"\n\n#: ../../../discord/invite.py:docstring of discord.invite.Invite:27\nmsgid \"Attribute\"\nmsgstr \"Attribute\"\n\n#: ../../../discord/invite.py:docstring of discord.invite.Invite:27\nmsgid \"Method\"\nmsgstr \"Method\"\n\n#: ../../../discord/invite.py:docstring of discord.invite.Invite:29\nmsgid \":attr:`max_age`\"\nmsgstr \":attr:`max_age`\"\n\n#: ../../../discord/invite.py:docstring of discord.invite.Invite:29\n#: ../../../discord/invite.py:docstring of discord.invite.Invite:31\n#: ../../../discord/invite.py:docstring of discord.invite.Invite:33\n#: ../../../discord/invite.py:docstring of discord.invite.Invite:35\n#: ../../../discord/invite.py:docstring of discord.invite.Invite:37\nmsgid \":meth:`abc.GuildChannel.invites`\\\\, :meth:`Guild.invites`\"\nmsgstr \":meth:`abc.GuildChannel.invites`\\\\, :meth:`Guild.invites`\"\n\n#: ../../../discord/invite.py:docstring of discord.invite.Invite:31\nmsgid \":attr:`max_uses`\"\nmsgstr \":attr:`max_uses`\"\n\n#: ../../../discord/invite.py:docstring of discord.invite.Invite:33\nmsgid \":attr:`created_at`\"\nmsgstr \":attr:`created_at`\"\n\n#: ../../../discord/invite.py:docstring of discord.invite.Invite:35\nmsgid \":attr:`temporary`\"\nmsgstr \":attr:`temporary`\"\n\n#: ../../../discord/invite.py:docstring of discord.invite.Invite:37\nmsgid \":attr:`uses`\"\nmsgstr \":attr:`uses`\"\n\n#: ../../../discord/invite.py:docstring of discord.invite.Invite:39\nmsgid \":attr:`approximate_member_count`\"\nmsgstr \":attr:`approximate_member_count`\"\n\n#: ../../../discord/invite.py:docstring of discord.invite.Invite:39\n#: ../../../discord/invite.py:docstring of discord.invite.Invite:41\nmsgid \":meth:`Client.fetch_invite` with ``with_counts`` enabled\"\nmsgstr \":meth:`Client.fetch_invite` で ``with_counts`` を有効にする。\"\n\n#: ../../../discord/invite.py:docstring of discord.invite.Invite:41\nmsgid \":attr:`approximate_presence_count`\"\nmsgstr \":attr:`approximate_presence_count`\"\n\n#: ../../../discord/invite.py:docstring of discord.invite.Invite:43\nmsgid \":attr:`expires_at`\"\nmsgstr \":attr:`expires_at`\"\n\n#: ../../../discord/invite.py:docstring of discord.invite.Invite:43\nmsgid \":meth:`Client.fetch_invite` with ``with_expiration`` enabled\"\nmsgstr \":meth:`Client.fetch_invite` で ``with_expiration`` を有効にする。\"\n\n#: ../../../discord/invite.py:docstring of discord.invite.Invite:46\nmsgid \"If it's not in the table above then it is available by all methods.\"\nmsgstr \"上の表にない場合は、すべての方法で利用可能です。\"\n\n#: ../../../discord/invite.py:docstring of discord.invite.Invite:50\nmsgid \"How long before the invite expires in seconds. A value of ``0`` indicates that it doesn't expire.\"\nmsgstr \"招待の有効期限を秒単位で指定します。値が ``0`` の場合は、有効期限がないことを示します。\"\n\n#: ../../../discord/invite.py:docstring of discord.invite.Invite:57\nmsgid \"The URL fragment used for the invite.\"\nmsgstr \"招待に使用されるURLフラグメント。\"\n\n#: ../../../discord/invite.py:docstring of discord.invite.Invite:63\nmsgid \"The guild the invite is for. Can be ``None`` if it's from a group direct message.\"\nmsgstr \"招待先のギルド。グループのダイレクトメッセージからの場合は ``None`` にできます。\"\n\n#: ../../../discord/invite.py:docstring of discord.invite.Invite:65\nmsgid \"Optional[Union[:class:`Guild`, :class:`Object`, :class:`PartialInviteGuild`]]\"\nmsgstr \"Optional[Union[:class:`Guild`, :class:`Object`, :class:`PartialInviteGuild`]]\"\n\n#: ../../../discord/invite.py:docstring of discord.invite.Invite:69\nmsgid \"Indicates if the invite has been revoked.\"\nmsgstr \"招待が取り消されたかどうかを示します。\"\n\n#: ../../../discord/invite.py:docstring of discord.invite.Invite:75\nmsgid \"An aware UTC datetime object denoting the time the invite was created.\"\nmsgstr \"招待が作成された時刻を示す UTC datetimeオブジェクトです。\"\n\n#: ../../../discord/invite.py:docstring of discord.invite.Invite:81\nmsgid \"Indicates that the invite grants temporary membership. If ``True``, members who joined via this invite will be kicked upon disconnect.\"\nmsgstr \"一時的なメンバーとして招待することを示します。 ``True`` の場合、この招待を通じて参加したメンバーは切断時にキックされます。\"\n\n#: ../../../discord/invite.py:docstring of discord.invite.Invite:88\nmsgid \"How many times the invite has been used.\"\nmsgstr \"招待が使用された回数。\"\n\n#: ../../../discord/invite.py:docstring of discord.invite.Invite:94\nmsgid \"How many times the invite can be used. A value of ``0`` indicates that it has unlimited uses.\"\nmsgstr \"招待できる回数を指定します。 ``0`` の値は無制限の使用を示します。\"\n\n#: ../../../discord/invite.py:docstring of discord.invite.Invite:107\nmsgid \"The approximate number of members in the guild.\"\nmsgstr \"ギルド内のメンバーのおおよその数。\"\n\n#: ../../../discord/invite.py:docstring of discord.invite.Invite:113\nmsgid \"The approximate number of members currently active in the guild. This includes idle, dnd, online, and invisible members. Offline members are excluded.\"\nmsgstr \"ギルドで現在アクティブなメンバーのおおよその数です。これには退席中、取り込み中、オンライン、非表示のメンバーが含まれます。オフラインのメンバーは除外されます。\"\n\n#: ../../../discord/invite.py:docstring of discord.invite.Invite:120\nmsgid \"The expiration date of the invite. If the value is ``None`` when received through :meth:`Client.fetch_invite` with ``with_expiration`` enabled, the invite will never expire.\"\nmsgstr \"招待の有効期限。 ``with_expiration`` が有効になっている :meth:`Client.fetch_invite` 経由で受け取ったときにこれが ``None`` の場合は、招待は期限切れになりません。\"\n\n#: ../../../discord/invite.py:docstring of discord.invite.Invite:129\nmsgid \"The channel the invite is for.\"\nmsgstr \"招待先のチャンネル。\"\n\n#: ../../../discord/invite.py:docstring of discord.invite.Invite:131\nmsgid \"Optional[Union[:class:`abc.GuildChannel`, :class:`Object`, :class:`PartialInviteChannel`]]\"\nmsgstr \"Optional[Union[:class:`abc.GuildChannel`, :class:`Object`, :class:`PartialInviteChannel`]]\"\n\n#: ../../../discord/invite.py:docstring of discord.invite.Invite:135\nmsgid \"The type of target for the voice channel invite.\"\nmsgstr \"ボイスチャンネル招待の対象の種類。\"\n\n#: ../../../discord/invite.py:docstring of discord.invite.Invite:139\nmsgid \":class:`InviteTarget`\"\nmsgstr \":class:`InviteTarget`\"\n\n#: ../../../discord/invite.py:docstring of discord.invite.Invite:143\nmsgid \"The user whose stream to display for this invite, if any.\"\nmsgstr \"存在する場合、この招待に表示すべきストリームのユーザー。\"\n\n#: ../../../discord/invite.py:docstring of discord.invite.Invite:151\nmsgid \"The embedded application the invite targets, if any.\"\nmsgstr \"存在する場合、この招待の対象の埋め込みアプリケーション。\"\n\n#: ../../../discord/invite.py:docstring of discord.invite.Invite:155\nmsgid \"Optional[:class:`PartialAppInfo`]\"\nmsgstr \"Optional[:class:`PartialAppInfo`]\"\n\n#: ../../../discord/invite.py:docstring of discord.invite.Invite:159\nmsgid \"The scheduled event associated with this invite, if any.\"\nmsgstr \"存在する場合、この招待に関連付けられたスケジュールイベント。\"\n\n#: ../../../discord/invite.py:docstring of discord.invite.Invite:167\nmsgid \"The ID of the scheduled event associated with this invite, if any.\"\nmsgstr \"存在する場合、この招待に関連付けられたスケジュールイベントのID。\"\n\n#: ../../../discord/invite.py:docstring of discord.Invite.id:1\nmsgid \"Returns the proper code portion of the invite.\"\nmsgstr \"招待のコード部分を返します。\"\n\n#: ../../../discord/invite.py:docstring of discord.Invite.url:1\nmsgid \"A property that retrieves the invite URL.\"\nmsgstr \"招待URLを取得するプロパティ。\"\n\n#: ../../../discord/invite.py:docstring of discord.invite.Invite.set_scheduled_event:1\nmsgid \"Sets the scheduled event for this invite.\"\nmsgstr \"この招待のスケジュールイベントを設定します。\"\n\n#: ../../../discord/invite.py:docstring of discord.invite.Invite.set_scheduled_event:5\nmsgid \"The ID of the scheduled event.\"\nmsgstr \"スケジュールイベントのID。\"\n\n#: ../../../discord/invite.py:docstring of discord.invite.Invite.set_scheduled_event:8\nmsgid \"The invite with the new scheduled event.\"\nmsgstr \"スケジュールイベント付きの新しい招待。\"\n\n#: ../../../discord/invite.py:docstring of discord.invite.Invite.set_scheduled_event:9\nmsgid \":class:`Invite`\"\nmsgstr \":class:`Invite`\"\n\n#: ../../../discord/invite.py:docstring of discord.invite.Invite.delete:3\nmsgid \"Revokes the instant invite.\"\nmsgstr \"インスタント招待を取り消します。\"\n\n#: ../../../discord/invite.py:docstring of discord.invite.Invite.delete:7\nmsgid \"The reason for deleting this invite. Shows up on the audit log.\"\nmsgstr \"招待を削除する理由。監査ログに表示されます。\"\n\n#: ../../api.rst:4758\nmsgid \"Template\"\nmsgstr \"Template\"\n\n#: ../../../discord/template.py:docstring of discord.template.Template:1\nmsgid \"Represents a Discord template.\"\nmsgstr \"Discordのテンプレートを表します。\"\n\n#: ../../../discord/template.py:docstring of discord.template.Template:13\nmsgid \"How many times the template has been used.\"\nmsgstr \"テンプレートが使用された回数。\"\n\n#: ../../../discord/template.py:docstring of discord.template.Template:31\nmsgid \"The creator of the template.\"\nmsgstr \"テンプレートの作成者。\"\n\n#: ../../../discord/template.py:docstring of discord.template.Template:37\nmsgid \"An aware datetime in UTC representing when the template was created.\"\nmsgstr \"テンプレートが作成された日時を表す UTC aware datetime。\"\n\n#: ../../../discord/template.py:docstring of discord.template.Template:43\nmsgid \"An aware datetime in UTC representing when the template was last updated. This is referred to as \\\"last synced\\\" in the official Discord client.\"\nmsgstr \"テンプレートが最後に更新された日時を表す UTC aware datetime。これは公式のDiscordクライアントでは「最終同期日時」と呼ばれています。\"\n\n#: ../../../discord/template.py:docstring of discord.template.Template:50\nmsgid \"The guild snapshot that represents the data that this template currently holds.\"\nmsgstr \"このテンプレートが現在保有しているデータを表すギルドのスナップショット。\"\n\n#: ../../../discord/template.py:docstring of discord.template.Template:56\nmsgid \"Whether the template has unsynced changes.\"\nmsgstr \"テンプレートに同期されていない変更があるかどうか。\"\n\n#: ../../../discord/template.py:docstring of discord.template.Template.create_guild:3\nmsgid \"Creates a :class:`.Guild` using the template.\"\nmsgstr \"テンプレートを使用して :class:`.Guild` を作成します。\"\n\n#: ../../../discord/template.py:docstring of discord.template.Template.create_guild:7\nmsgid \"The ``region`` parameter has been removed.\"\nmsgstr \"``region`` キーワード引数が削除されました。\"\n\n#: ../../../discord/template.py:docstring of discord.template.Template.sync:3\nmsgid \"Sync the template to the guild's current state.\"\nmsgstr \"テンプレートをギルドの現在の状態に同期します。\"\n\n#: ../../../discord/template.py:docstring of discord.template.Template.sync:5\n#: ../../../discord/template.py:docstring of discord.template.Template.edit:5\n#: ../../../discord/template.py:docstring of discord.template.Template.delete:5\nmsgid \"You must have :attr:`~Permissions.manage_guild` in the source guild to do this.\"\nmsgstr \"これを行うためには、元のギルドにて :attr:`~Permissions.manage_guild` が必要です。\"\n\n#: ../../../discord/template.py:docstring of discord.template.Template.sync:9\n#: ../../../discord/template.py:docstring of discord.template.Template.edit:9\nmsgid \"The template is no longer edited in-place, instead it is returned.\"\nmsgstr \"編集はテンプレートを置き換えず、編集された新しいテンプレートが返されるようになりました。\"\n\n#: ../../../discord/template.py:docstring of discord.template.Template.sync:12\n#: ../../../discord/template.py:docstring of discord.template.Template.edit:17\n#: ../../../discord/template.py:docstring of discord.template.Template.delete:9\nmsgid \"Editing the template failed.\"\nmsgstr \"テンプレートの編集に失敗した場合。\"\n\n#: ../../../discord/template.py:docstring of discord.template.Template.sync:13\n#: ../../../discord/template.py:docstring of discord.template.Template.edit:18\n#: ../../../discord/template.py:docstring of discord.template.Template.delete:10\nmsgid \"You don't have permissions to edit the template.\"\nmsgstr \"テンプレートを編集するのに必要な権限がない場合。\"\n\n#: ../../../discord/template.py:docstring of discord.template.Template.sync:14\n#: ../../../discord/template.py:docstring of discord.template.Template.edit:19\n#: ../../../discord/template.py:docstring of discord.template.Template.delete:11\nmsgid \"This template does not exist.\"\nmsgstr \"テンプレートが存在しない場合。\"\n\n#: ../../../discord/template.py:docstring of discord.template.Template.sync:16\n#: ../../../discord/template.py:docstring of discord.template.Template.edit:21\nmsgid \"The newly edited template.\"\nmsgstr \"編集された新しいテンプレート。\"\n\n#: ../../../discord/template.py:docstring of discord.template.Template.sync:17\n#: ../../../discord/template.py:docstring of discord.template.Template.edit:22\nmsgid \":class:`Template`\"\nmsgstr \":class:`Template`\"\n\n#: ../../../discord/template.py:docstring of discord.template.Template.edit:3\nmsgid \"Edit the template metadata.\"\nmsgstr \"テンプレートのメタデータを編集します。\"\n\n#: ../../../discord/template.py:docstring of discord.template.Template.edit:12\nmsgid \"The template's new name.\"\nmsgstr \"テンプレートの新しい名前。\"\n\n#: ../../../discord/template.py:docstring of discord.template.Template.edit:14\nmsgid \"The template's new description.\"\nmsgstr \"テンプレートの新しい説明。\"\n\n#: ../../../discord/template.py:docstring of discord.template.Template.delete:3\nmsgid \"Delete the template.\"\nmsgstr \"テンプレートを削除します。\"\n\n#: ../../../discord/template.py:docstring of discord.Template.url:1\nmsgid \"The template url.\"\nmsgstr \"テンプレートのURL。\"\n\n#: ../../api.rst:4766\nmsgid \"WelcomeScreen\"\nmsgstr \"WelcomeScreen\"\n\n#: ../../../discord/welcome_screen.py:docstring of discord.welcome_screen.WelcomeScreen:1\nmsgid \"Represents a :class:`Guild` welcome screen.\"\nmsgstr \":class:`Guild` ようこそ画面を表します。\"\n\n#: ../../../discord/welcome_screen.py:docstring of discord.welcome_screen.WelcomeScreen:7\nmsgid \"The description shown on the welcome screen.\"\nmsgstr \"ようこそ画面に表示される説明。\"\n\n#: ../../../discord/welcome_screen.py:docstring of discord.welcome_screen.WelcomeScreen:13\nmsgid \"The channels shown on the welcome screen.\"\nmsgstr \"ようこそ画面に表示されるチャンネル。\"\n\n#: ../../../discord/welcome_screen.py:docstring of discord.welcome_screen.WelcomeScreen:15\nmsgid \"List[:class:`WelcomeChannel`]\"\nmsgstr \"List[:class:`WelcomeChannel`]\"\n\n#: ../../../discord/welcome_screen.py:docstring of discord.WelcomeScreen.enabled:1\nmsgid \"Whether the welcome screen is displayed.\"\nmsgstr \"ようこそ画面を表示すべきか。\"\n\n#: ../../../discord/welcome_screen.py:docstring of discord.WelcomeScreen.enabled:3\nmsgid \"This is equivalent to checking if ``WELCOME_SCREEN_ENABLED`` is present in :attr:`Guild.features`.\"\nmsgstr \"これは :attr:`Guild.features` に ``WELCOME_SCREEN_ENABLED`` があるかどうかを確認するのと同じです。\"\n\n#: ../../../discord/welcome_screen.py:docstring of discord.welcome_screen.WelcomeScreen.edit:3\nmsgid \"Edit the welcome screen.\"\nmsgstr \"ようこそ画面を編集します。\"\n\n#: ../../../discord/welcome_screen.py:docstring of discord.welcome_screen.WelcomeScreen.edit:5\nmsgid \"Welcome channels can only accept custom emojis if :attr:`Guild.premium_tier` is level 2 or above.\"\nmsgstr \"ようこそ画面のチャンネルは、 :attr:`Guild.premium_tier` がレベル 2 以上の場合のみカスタム絵文字を使用できます。\"\n\n#: ../../../discord/welcome_screen.py:docstring of discord.welcome_screen.WelcomeScreen.edit:7\nmsgid \"You must have :attr:`~Permissions.manage_guild` in the guild to do this.\"\nmsgstr \"これを行うためには、ギルドにて :attr:`~Permissions.manage_guild` が必要です。\"\n\n#: ../../../discord/welcome_screen.py:docstring of discord.welcome_screen.WelcomeScreen.edit:9\nmsgid \"Usage: ::\"\nmsgstr \"使い方: ::\"\n\n#: ../../../discord/welcome_screen.py:docstring of discord.welcome_screen.WelcomeScreen.edit:24\nmsgid \"The welcome screen's description.\"\nmsgstr \"ようこそ画面の説明。\"\n\n#: ../../../discord/welcome_screen.py:docstring of discord.welcome_screen.WelcomeScreen.edit:26\nmsgid \"The welcome channels, in their respective order.\"\nmsgstr \"ようこそ画面のチャンネルを、順番に並べたもの。\"\n\n#: ../../../discord/welcome_screen.py:docstring of discord.welcome_screen.WelcomeScreen.edit:28\nmsgid \"Whether the welcome screen should be displayed.\"\nmsgstr \"ようこそ画面を表示すべきか。\"\n\n#: ../../../discord/welcome_screen.py:docstring of discord.welcome_screen.WelcomeScreen.edit:30\nmsgid \"The reason for editing the welcome screen. Shows up on the audit log.\"\nmsgstr \"ようこそ画面を編集する理由。監査ログに表示されます。\"\n\n#: ../../../discord/welcome_screen.py:docstring of discord.welcome_screen.WelcomeScreen.edit:33\nmsgid \"Editing the welcome screen failed.\"\nmsgstr \"ようこそ画面の編集に失敗した場合。\"\n\n#: ../../../discord/welcome_screen.py:docstring of discord.welcome_screen.WelcomeScreen.edit:34\nmsgid \"You don't have permissions to edit the welcome screen.\"\nmsgstr \"ようこそ画面を編集するのに必要な権限がない場合。\"\n\n#: ../../../discord/welcome_screen.py:docstring of discord.welcome_screen.WelcomeScreen.edit:35\nmsgid \"This welcome screen does not exist.\"\nmsgstr \"ようこそ画面が存在しない場合。\"\n\n#: ../../api.rst:4774\nmsgid \"WelcomeChannel\"\nmsgstr \"WelcomeChannel\"\n\n#: ../../../discord/welcome_screen.py:docstring of discord.welcome_screen.WelcomeChannel:1\nmsgid \"Represents a :class:`WelcomeScreen` welcome channel.\"\nmsgstr \":class:`WelcomeScreen` のチャンネルを表します。\"\n\n#: ../../../discord/welcome_screen.py:docstring of discord.welcome_screen.WelcomeChannel:7\nmsgid \"The guild channel that is being referenced.\"\nmsgstr \"参照されているギルドチャンネル。\"\n\n#: ../../../discord/welcome_screen.py:docstring of discord.welcome_screen.WelcomeChannel:9\nmsgid \":class:`abc.Snowflake`\"\nmsgstr \":class:`abc.Snowflake`\"\n\n#: ../../../discord/welcome_screen.py:docstring of discord.welcome_screen.WelcomeChannel:13\nmsgid \"The description shown of the channel.\"\nmsgstr \"表示されるチャンネルの説明。\"\n\n#: ../../../discord/welcome_screen.py:docstring of discord.welcome_screen.WelcomeChannel:19\nmsgid \"The emoji used beside the channel description.\"\nmsgstr \"チャンネルの説明の横に使用される絵文字。\"\n\n#: ../../../discord/welcome_screen.py:docstring of discord.welcome_screen.WelcomeChannel:21\nmsgid \"Optional[:class:`PartialEmoji`, :class:`Emoji`, :class:`str`]\"\nmsgstr \"Optional[:class:`PartialEmoji`, :class:`Emoji`, :class:`str`]\"\n\n#: ../../api.rst:4782\nmsgid \"WidgetChannel\"\nmsgstr \"WidgetChannel\"\n\n#: ../../../discord/widget.py:docstring of discord.widget.WidgetChannel:1\nmsgid \"Represents a \\\"partial\\\" widget channel.\"\nmsgstr \"\\\"部分的な\\\" ウィジェットチャンネルを表します。\"\n\n#: ../../../discord/widget.py:docstring of discord.widget.WidgetChannel:23\nmsgid \"The channel's ID.\"\nmsgstr \"チャンネルのID。\"\n\n#: ../../../discord/widget.py:docstring of discord.widget.WidgetChannel:35\nmsgid \"The channel's position\"\nmsgstr \"チャンネルの位置。\"\n\n#: ../../api.rst:4790\nmsgid \"WidgetMember\"\nmsgstr \"WidgetMember\"\n\n#: ../../../discord/widget.py:docstring of discord.widget.WidgetMember:1\nmsgid \"Represents a \\\"partial\\\" member of the widget's guild.\"\nmsgstr \"ウィジェットのギルドの \\\"部分的な\\\" メンバーを表します。\"\n\n#: ../../../discord/widget.py:docstring of discord.widget.WidgetMember:7\nmsgid \"Checks if two widget members are the same.\"\nmsgstr \"2つのウィジェットメンバーが等しいものか比較します。\"\n\n#: ../../../discord/widget.py:docstring of discord.widget.WidgetMember:11\nmsgid \"Checks if two widget members are not the same.\"\nmsgstr \"2つのウィジェットメンバーが等しいものではないか比較します。\"\n\n#: ../../../discord/widget.py:docstring of discord.widget.WidgetMember:15\nmsgid \"Return the widget member's hash.\"\nmsgstr \"ウィジェットメンバーのハッシュ値を返します。\"\n\n#: ../../../discord/widget.py:docstring of discord.widget.WidgetMember:19\nmsgid \"Returns the widget member's handle (e.g. ``name`` or ``name#discriminator``).\"\nmsgstr \"ウィジェットメンバーのハンドル（例えば ``name`` や ``name#discriminator`` など）を返します。\"\n\n#: ../../../discord/widget.py:docstring of discord.widget.WidgetMember:23\nmsgid \"The member's ID.\"\nmsgstr \"メンバーのID。\"\n\n#: ../../../discord/widget.py:docstring of discord.widget.WidgetMember:29\nmsgid \"The member's username.\"\nmsgstr \"メンバーのユーザー名。\"\n\n#: ../../../discord/widget.py:docstring of discord.widget.WidgetMember:35\nmsgid \"The member's discriminator. This is a legacy concept that is no longer used.\"\nmsgstr \"メンバーのタグ。これは、現在は使用されていない、過去の遺物です。\"\n\n#: ../../../discord/widget.py:docstring of discord.widget.WidgetMember:41\nmsgid \"The member's global nickname, taking precedence over the username in display.\"\nmsgstr \"メンバーのグローバルの表示名。ユーザー名より優先して表示されます。\"\n\n#: ../../../discord/widget.py:docstring of discord.widget.WidgetMember:49\nmsgid \"Whether the member is a bot.\"\nmsgstr \"メンバーがボットであるかどうか。\"\n\n#: ../../../discord/widget.py:docstring of discord.widget.WidgetMember:55\nmsgid \"The member's status.\"\nmsgstr \"メンバーのステータス。\"\n\n#: ../../../discord/widget.py:docstring of discord.widget.WidgetMember:61\nmsgid \"The member's guild-specific nickname. Takes precedence over the global name.\"\nmsgstr \"メンバーのギルド内専用のニックネーム。グローバルの表示名よりも優先されます。\"\n\n#: ../../../discord/widget.py:docstring of discord.widget.WidgetMember:67\nmsgid \"The member's avatar hash.\"\nmsgstr \"メンバーのアバターのハッシュ値。\"\n\n#: ../../../discord/widget.py:docstring of discord.widget.WidgetMember:73\nmsgid \"The member's activity.\"\nmsgstr \"メンバーのアクティビティ。\"\n\n#: ../../../discord/widget.py:docstring of discord.widget.WidgetMember:79\nmsgid \"Whether the member is currently deafened.\"\nmsgstr \"メンバーがスピーカーミュートされているかどうか。\"\n\n#: ../../../discord/widget.py:docstring of discord.widget.WidgetMember:85\nmsgid \"Whether the member is currently muted.\"\nmsgstr \"メンバーがミュートされているかどうか。\"\n\n#: ../../../discord/widget.py:docstring of discord.widget.WidgetMember:91\nmsgid \"Whether the member is currently being suppressed.\"\nmsgstr \"メンバーが現在抑制されているのかどうか。\"\n\n#: ../../../discord/widget.py:docstring of discord.widget.WidgetMember:97\nmsgid \"Which channel the member is connected to.\"\nmsgstr \"メンバーが接続しているチャンネル。\"\n\n#: ../../../discord/widget.py:docstring of discord.widget.WidgetMember:99\nmsgid \"Optional[:class:`WidgetChannel`]\"\nmsgstr \"Optional[:class:`WidgetChannel`]\"\n\n#: ../../../discord/widget.py:docstring of discord.WidgetMember.display_name:1\nmsgid \"Returns the member's display name.\"\nmsgstr \"メンバーの表示名を返します。\"\n\n#: ../../api.rst:4799\nmsgid \"Widget\"\nmsgstr \"Widget\"\n\n#: ../../../discord/widget.py:docstring of discord.widget.Widget:1\nmsgid \"Represents a :class:`Guild` widget.\"\nmsgstr \":class:`Guild` ウィジェットを表します。\"\n\n#: ../../../discord/widget.py:docstring of discord.widget.Widget:7\nmsgid \"Checks if two widgets are the same.\"\nmsgstr \"2つのウィジェットが等しいものか比較します。\"\n\n#: ../../../discord/widget.py:docstring of discord.widget.Widget:11\nmsgid \"Checks if two widgets are not the same.\"\nmsgstr \"2つのウィジェットが等しいものではないか比較します。\"\n\n#: ../../../discord/widget.py:docstring of discord.widget.Widget:15\nmsgid \"Returns the widget's JSON URL.\"\nmsgstr \"ウィジェットの JSON URL を返します。\"\n\n#: ../../../discord/widget.py:docstring of discord.widget.Widget:25\nmsgid \"The guild's name.\"\nmsgstr \"ギルドの名前。\"\n\n#: ../../../discord/widget.py:docstring of discord.widget.Widget:31\nmsgid \"The accessible voice channels in the guild.\"\nmsgstr \"ギルド内のアクセスできるボイスチャンネル。\"\n\n#: ../../../discord/widget.py:docstring of discord.widget.Widget:33\nmsgid \"List[:class:`WidgetChannel`]\"\nmsgstr \"List[:class:`WidgetChannel`]\"\n\n#: ../../../discord/widget.py:docstring of discord.widget.Widget:37\nmsgid \"The online members in the guild. Offline members do not appear in the widget.\"\nmsgstr \"ギルド内のオンラインのメンバー。オフラインのメンバーはウィジェットには表示されません。\"\n\n#: ../../../discord/widget.py:docstring of discord.widget.Widget:42\nmsgid \"Due to a Discord limitation, if this data is available the users will be \\\"anonymized\\\" with linear IDs and discriminator information being incorrect. Likewise, the number of members retrieved is capped.\"\nmsgstr \"Discordの制限により、このデータが利用可能な場合、ユーザーのIDとタグは「仮名化」され、誤った情報になります。同様に、取得できるメンバー数にも制限があります。\"\n\n#: ../../../discord/widget.py:docstring of discord.widget.Widget:47\nmsgid \"List[:class:`WidgetMember`]\"\nmsgstr \"List[:class:`WidgetMember`]\"\n\n#: ../../../discord/widget.py:docstring of discord.widget.Widget:51\nmsgid \"The approximate number of online members in the guild. Offline members are not included in this count.\"\nmsgstr \"ギルド内のオンラインのメンバーのおおよその数。オフラインのメンバーはこの数には含まれません。\"\n\n#: ../../../discord/widget.py:docstring of discord.Widget.created_at:1\nmsgid \"Returns the member's creation time in UTC.\"\nmsgstr \"メンバーの作成された時間をUTCで返します。\"\n\n#: ../../../discord/widget.py:docstring of discord.Widget.json_url:1\nmsgid \"The JSON URL of the widget.\"\nmsgstr \"ウィジェットのJSON URL\"\n\n#: ../../../discord/widget.py:docstring of discord.Widget.invite_url:1\nmsgid \"The invite URL for the guild, if available.\"\nmsgstr \"利用可能な場合はギルドの招待URKです。\"\n\n#: ../../../discord/widget.py:docstring of discord.widget.Widget.fetch_invite:3\nmsgid \"Retrieves an :class:`Invite` from the widget's invite URL. This is the same as :meth:`Client.fetch_invite`; the invite code is abstracted away.\"\nmsgstr \"ウィジェットの招待URLから :class:`Invite` を取得します。これは :meth:`Client.fetch_invite` と同じです。招待コードは抽象化されます。\"\n\n#: ../../../discord/widget.py:docstring of discord.widget.Widget.fetch_invite:7\nmsgid \"Whether to include count information in the invite. This fills the :attr:`Invite.approximate_member_count` and :attr:`Invite.approximate_presence_count` fields.\"\nmsgstr \"招待にカウント情報を含めるかどうか。これにより :attr:`Invite.approximate_member_count` と :attr:`Invite.approximate_presence_count` に取得した値が代入されます。\"\n\n#: ../../../discord/widget.py:docstring of discord.widget.Widget.fetch_invite:12\nmsgid \"The invite from the widget's invite URL, if available.\"\nmsgstr \"利用可能な場合は、ウィジェットの招待URLからの招待。\"\n\n#: ../../api.rst:4807\nmsgid \"StickerPack\"\nmsgstr \"StickerPack\"\n\n#: ../../../discord/sticker.py:docstring of discord.sticker.StickerPack:1\nmsgid \"Represents a sticker pack.\"\nmsgstr \"スタンプパックを表します。\"\n\n#: ../../../discord/sticker.py:docstring of discord.sticker.StickerPack:9\nmsgid \"Returns the name of the sticker pack.\"\nmsgstr \"スタンプパックの名前を返します。\"\n\n#: ../../../discord/sticker.py:docstring of discord.sticker.StickerPack:13\nmsgid \"Checks if the sticker pack is equal to another sticker pack.\"\nmsgstr \"スタンプパックが他のスタンプパックと等しいか確認します。\"\n\n#: ../../../discord/sticker.py:docstring of discord.sticker.StickerPack:17\nmsgid \"Checks if the sticker pack is not equal to another sticker pack.\"\nmsgstr \"スタンプパックが他のスタンプパックと等しくないか確認します。\"\n\n#: ../../../discord/sticker.py:docstring of discord.sticker.StickerPack:21\nmsgid \"The name of the sticker pack.\"\nmsgstr \"スタンプパックの名前。\"\n\n#: ../../../discord/sticker.py:docstring of discord.sticker.StickerPack:27\nmsgid \"The description of the sticker pack.\"\nmsgstr \"スタンプパックの説明。\"\n\n#: ../../../discord/sticker.py:docstring of discord.sticker.StickerPack:33\nmsgid \"The id of the sticker pack.\"\nmsgstr \"スタンプパックのID。\"\n\n#: ../../../discord/sticker.py:docstring of discord.sticker.StickerPack:39\nmsgid \"The stickers of this sticker pack.\"\nmsgstr \"このスタンプパックのスタンプ。\"\n\n#: ../../../discord/sticker.py:docstring of discord.sticker.StickerPack:41\nmsgid \"List[:class:`StandardSticker`]\"\nmsgstr \"List[:class:`StandardSticker`]\"\n\n#: ../../../discord/sticker.py:docstring of discord.sticker.StickerPack:45\nmsgid \"The SKU ID of the sticker pack.\"\nmsgstr \"スタンプパックの SKU ID。\"\n\n#: ../../../discord/sticker.py:docstring of discord.sticker.StickerPack:51\nmsgid \"The ID of the sticker used for the cover of the sticker pack.\"\nmsgstr \"スタンプパックのカバーに使用されるスタンプのID。\"\n\n#: ../../../discord/sticker.py:docstring of discord.sticker.StickerPack:57\nmsgid \"The sticker used for the cover of the sticker pack.\"\nmsgstr \"スタンプパックのカバーに使用されるスタンプ。\"\n\n#: ../../../discord/sticker.py:docstring of discord.sticker.StickerPack:59\nmsgid \"Optional[:class:`StandardSticker`]\"\nmsgstr \"Optional[:class:`StandardSticker`]\"\n\n#: ../../../discord/sticker.py:docstring of discord.StickerPack.banner:1\nmsgid \"The banner asset of the sticker pack.\"\nmsgstr \"スタンプパックのバナーアセット。\"\n\n#: ../../api.rst:4815\nmsgid \"StickerItem\"\nmsgstr \"StickerItem\"\n\n#: ../../../discord/sticker.py:docstring of discord.sticker.StickerItem:1\nmsgid \"Represents a sticker item.\"\nmsgstr \"スタンプアイテムを表します。\"\n\n#: ../../../discord/sticker.py:docstring of discord.sticker.StickerItem:9\nmsgid \"Returns the name of the sticker item.\"\nmsgstr \"スタンプアイテムの名前を返します。\"\n\n#: ../../../discord/sticker.py:docstring of discord.sticker.StickerItem:13\nmsgid \"Checks if the sticker item is equal to another sticker item.\"\nmsgstr \"スタンプアイテムが他のスタンプアイテムと等しいか確認します。\"\n\n#: ../../../discord/sticker.py:docstring of discord.sticker.StickerItem:17\nmsgid \"Checks if the sticker item is not equal to another sticker item.\"\nmsgstr \"スタンプアイテムが他のスタンプアイテムと等しくないことを確認します。\"\n\n#: ../../../discord/sticker.py:docstring of discord.sticker.StickerItem:21\n#: ../../../discord/sticker.py:docstring of discord.sticker.Sticker:21\n#: ../../../discord/sticker.py:docstring of discord.sticker.StandardSticker:21\n#: ../../../discord/sticker.py:docstring of discord.sticker.GuildSticker:21\nmsgid \"The sticker's name.\"\nmsgstr \"スタンプの名前。\"\n\n#: ../../../discord/sticker.py:docstring of discord.sticker.StickerItem:27\n#: ../../../discord/sticker.py:docstring of discord.sticker.Sticker:27\n#: ../../../discord/sticker.py:docstring of discord.sticker.StandardSticker:27\n#: ../../../discord/sticker.py:docstring of discord.sticker.GuildSticker:27\nmsgid \"The id of the sticker.\"\nmsgstr \"スタンプのID。\"\n\n#: ../../../discord/sticker.py:docstring of discord.sticker.StickerItem:33\n#: ../../../discord/sticker.py:docstring of discord.sticker.Sticker:45\n#: ../../../discord/sticker.py:docstring of discord.sticker.StandardSticker:45\n#: ../../../discord/sticker.py:docstring of discord.sticker.GuildSticker:39\nmsgid \"The format for the sticker's image.\"\nmsgstr \"スタンプの画像のフォーマット。\"\n\n#: ../../../discord/sticker.py:docstring of discord.sticker.StickerItem:39\n#: ../../../discord/sticker.py:docstring of discord.sticker.Sticker:51\nmsgid \"The URL for the sticker's image.\"\nmsgstr \"スタンプの画像の URL。\"\n\n#: ../../../discord/sticker.py:docstring of discord.sticker.StickerItem.fetch:3\nmsgid \"Attempts to retrieve the full sticker data of the sticker item.\"\nmsgstr \"スタンプアイテムの完全なスタンプデータを取得するのを試みます。\"\n\n#: ../../../discord/sticker.py:docstring of discord.sticker.StickerItem.fetch:8\nmsgid \"Union[:class:`StandardSticker`, :class:`GuildSticker`]\"\nmsgstr \"Union[:class:`StandardSticker`, :class:`GuildSticker`]\"\n\n#: ../../api.rst:4823\nmsgid \"Sticker\"\nmsgstr \"Sticker\"\n\n#: ../../../discord/sticker.py:docstring of discord.sticker.Sticker:1\nmsgid \"Represents a sticker.\"\nmsgstr \"スタンプを表します。\"\n\n#: ../../../discord/sticker.py:docstring of discord.sticker.Sticker:9\n#: ../../../discord/sticker.py:docstring of discord.sticker.StandardSticker:9\n#: ../../../discord/sticker.py:docstring of discord.sticker.GuildSticker:9\nmsgid \"Returns the name of the sticker.\"\nmsgstr \"スタンプの名前を返します。\"\n\n#: ../../../discord/sticker.py:docstring of discord.sticker.Sticker:13\n#: ../../../discord/sticker.py:docstring of discord.sticker.StandardSticker:13\n#: ../../../discord/sticker.py:docstring of discord.sticker.GuildSticker:13\nmsgid \"Checks if the sticker is equal to another sticker.\"\nmsgstr \"スタンプが他のスタンプと等しいか確認します。\"\n\n#: ../../../discord/sticker.py:docstring of discord.sticker.Sticker:17\n#: ../../../discord/sticker.py:docstring of discord.sticker.StandardSticker:17\n#: ../../../discord/sticker.py:docstring of discord.sticker.GuildSticker:17\nmsgid \"Checks if the sticker is not equal to another sticker.\"\nmsgstr \"スタンプが他のスタンプと等しくないか確認します。\"\n\n#: ../../../discord/sticker.py:docstring of discord.sticker.Sticker:33\n#: ../../../discord/sticker.py:docstring of discord.sticker.StandardSticker:33\n#: ../../../discord/sticker.py:docstring of discord.sticker.GuildSticker:33\nmsgid \"The description of the sticker.\"\nmsgstr \"スタンプの説明。\"\n\n#: ../../../discord/sticker.py:docstring of discord.sticker.Sticker:39\n#: ../../../discord/sticker.py:docstring of discord.sticker.StandardSticker:39\nmsgid \"The id of the sticker's pack.\"\nmsgstr \"スタンプパックのID。\"\n\n#: ../../../discord/sticker.py:docstring of discord.Sticker.created_at:1\nmsgid \"Returns the sticker's creation time in UTC.\"\nmsgstr \"スタンプの作成された時間をUTCで返します。\"\n\n#: ../../api.rst:4831\nmsgid \"StandardSticker\"\nmsgstr \"StandardSticker\"\n\n#: ../../../discord/sticker.py:docstring of discord.sticker.StandardSticker:1\nmsgid \"Represents a sticker that is found in a standard sticker pack.\"\nmsgstr \"標準のスタンプパックに含まれるスタンプを表します。\"\n\n#: ../../../discord/sticker.py:docstring of discord.sticker.StandardSticker:51\nmsgid \"A list of tags for the sticker.\"\nmsgstr \"スタンプのタグのリスト。\"\n\n#: ../../../discord/sticker.py:docstring of discord.sticker.StandardSticker:57\nmsgid \"The sticker's sort order within its pack.\"\nmsgstr \"パックのスタンプの並べ替え順序。\"\n\n#: ../../../discord/sticker.py:docstring of discord.sticker.StandardSticker.pack:3\nmsgid \"Retrieves the sticker pack that this sticker belongs to.\"\nmsgstr \"このスタンプが属するスタンプパックを取得します。\"\n\n#: ../../../discord/sticker.py:docstring of discord.sticker.StandardSticker.pack:5\nmsgid \"The corresponding sticker pack was not found.\"\nmsgstr \"対応するスタンプパックが見つからない場合。\"\n\n#: ../../../discord/sticker.py:docstring of discord.sticker.StandardSticker.pack:6\nmsgid \"Retrieving the sticker pack failed.\"\nmsgstr \"スタンプパックの取得に失敗した場合。\"\n\n#: ../../../discord/sticker.py:docstring of discord.sticker.StandardSticker.pack:8\nmsgid \"The retrieved sticker pack.\"\nmsgstr \"取得したスタンプパック。\"\n\n#: ../../../discord/sticker.py:docstring of discord.sticker.StandardSticker.pack:9\nmsgid \":class:`StickerPack`\"\nmsgstr \":class:`StickerPack`\"\n\n#: ../../api.rst:4839\nmsgid \"GuildSticker\"\nmsgstr \"GuildSticker\"\n\n#: ../../../discord/sticker.py:docstring of discord.sticker.GuildSticker:1\nmsgid \"Represents a sticker that belongs to a guild.\"\nmsgstr \"ギルドに属するスタンプを表します。\"\n\n#: ../../../discord/sticker.py:docstring of discord.sticker.GuildSticker:45\nmsgid \"Whether this sticker is available for use.\"\nmsgstr \"スタンプを使用できるかどうか。\"\n\n#: ../../../discord/sticker.py:docstring of discord.sticker.GuildSticker:51\nmsgid \"The ID of the guild that this sticker is from.\"\nmsgstr \"このスタンプが属するギルドのID。\"\n\n#: ../../../discord/sticker.py:docstring of discord.sticker.GuildSticker:57\nmsgid \"The user that created this sticker. This can only be retrieved using :meth:`Guild.fetch_sticker` and having :attr:`~Permissions.manage_emojis_and_stickers`.\"\nmsgstr \"スタンプを作成したユーザー。これは :meth:`Guild.fetch_sticker` 経由で、かつ :attr:`~Permissions.manage_emojis_and_stickers` を持つユーザーによってのみ取得できます。\"\n\n#: ../../../discord/sticker.py:docstring of discord.sticker.GuildSticker:64\nmsgid \"The name of a unicode emoji that represents this sticker.\"\nmsgstr \"スタンプを表現するユニコード絵文字の名前。\"\n\n#: ../../docstring of discord.GuildSticker.guild:1\nmsgid \"The guild that this sticker is from. Could be ``None`` if the bot is not in the guild.\"\nmsgstr \"このスタイルが属するギルド。ボットがギルドにいない場合は ``None`` になります。\"\n\n#: ../../../discord/sticker.py:docstring of discord.sticker.GuildSticker.edit:3\nmsgid \"Edits a :class:`GuildSticker` for the guild.\"\nmsgstr \"ギルドの :class:`GuildSticker` を編集します。\"\n\n#: ../../../discord/sticker.py:docstring of discord.sticker.GuildSticker.edit:5\nmsgid \"The sticker's new name. Must be at least 2 characters.\"\nmsgstr \"スタンプの新しい名前。2文字以上でなければなりません。\"\n\n#: ../../../discord/sticker.py:docstring of discord.sticker.GuildSticker.edit:7\nmsgid \"The sticker's new description. Can be ``None``.\"\nmsgstr \"スタンプの新しい説明。``None`` にできます。\"\n\n#: ../../../discord/sticker.py:docstring of discord.sticker.GuildSticker.edit:11\nmsgid \"The reason for editing this sticker. Shows up on the audit log.\"\nmsgstr \"スタンプを編集する理由。監査ログに表示されます。\"\n\n#: ../../../discord/sticker.py:docstring of discord.sticker.GuildSticker.edit:14\nmsgid \"You are not allowed to edit stickers.\"\nmsgstr \"スタンプを編集する権限がない場合。\"\n\n#: ../../../discord/sticker.py:docstring of discord.sticker.GuildSticker.edit:15\nmsgid \"An error occurred editing the sticker.\"\nmsgstr \"スタンプの編集中にエラーが発生した場合。\"\n\n#: ../../../discord/sticker.py:docstring of discord.sticker.GuildSticker.edit:17\nmsgid \"The newly modified sticker.\"\nmsgstr \"新しく変更されたスタンプ。\"\n\n#: ../../api.rst:4847\nmsgid \"ShardInfo\"\nmsgstr \"ShardInfo\"\n\n#: ../../../discord/shard.py:docstring of discord.shard.ShardInfo:1\nmsgid \"A class that gives information and control over a specific shard.\"\nmsgstr \"特定のシャードの情報と制御を与えるクラス。\"\n\n#: ../../../discord/shard.py:docstring of discord.shard.ShardInfo:3\nmsgid \"You can retrieve this object via :meth:`AutoShardedClient.get_shard` or :attr:`AutoShardedClient.shards`.\"\nmsgstr \"このオブジェクトは :meth:`AutoShardedClient.get_shard` や :attr:`AutoShardedClient.shards` から取得できます。\"\n\n#: ../../../discord/shard.py:docstring of discord.shard.ShardInfo:10\nmsgid \"The shard ID for this shard.\"\nmsgstr \"このシャードのシャードID。\"\n\n#: ../../../discord/shard.py:docstring of discord.shard.ShardInfo:16\nmsgid \"The shard count for this cluster. If this is ``None`` then the bot has not started yet.\"\nmsgstr \"このクラスターのシャード数。これが ``None`` の場合、ボットはまだ開始されていません。\"\n\n#: ../../../discord/shard.py:docstring of discord.shard.ShardInfo.is_closed:1\nmsgid \":class:`bool`: Whether the shard connection is currently closed.\"\nmsgstr \":class:`bool`: シャード接続が現在閉じているかどうか。\"\n\n#: ../../../discord/shard.py:docstring of discord.shard.ShardInfo.disconnect:3\nmsgid \"Disconnects a shard. When this is called, the shard connection will no longer be open.\"\nmsgstr \"シャードを切断します。これが呼び出されると、シャードの接続は以降開かれません。\"\n\n#: ../../../discord/shard.py:docstring of discord.shard.ShardInfo.disconnect:6\nmsgid \"If the shard is already disconnected this does nothing.\"\nmsgstr \"シャードがすでに切断されている場合、これは何もしません。\"\n\n#: ../../../discord/shard.py:docstring of discord.shard.ShardInfo.reconnect:3\nmsgid \"Disconnects and then connects the shard again.\"\nmsgstr \"シャードを切断した後、再接続します。\"\n\n#: ../../../discord/shard.py:docstring of discord.shard.ShardInfo.connect:3\nmsgid \"Connects a shard. If the shard is already connected this does nothing.\"\nmsgstr \"シャードを接続します。もしすでに接続されている場合、これは何もしません。\"\n\n#: ../../../discord/shard.py:docstring of discord.ShardInfo.latency:1\nmsgid \"Measures latency between a HEARTBEAT and a HEARTBEAT_ACK in seconds for this shard.\"\nmsgstr \"このシャードのHEARTBEATとHEARTBEAT_ACK間の待ち時間を秒単位で測定します。\"\n\n#: ../../api.rst:4855\nmsgid \"SKU\"\nmsgstr \"\"\n\n#: ../../../discord/sku.py:docstring of discord.sku.SKU:1\nmsgid \"Represents a premium offering as a stock-keeping unit (SKU).\"\nmsgstr \"\"\n\n#: ../../../discord/sku.py:docstring of discord.sku.SKU:7\nmsgid \"The SKU's ID.\"\nmsgstr \"\"\n\n#: ../../../discord/sku.py:docstring of discord.sku.SKU:13\nmsgid \"The type of the SKU.\"\nmsgstr \"\"\n\n#: ../../../discord/sku.py:docstring of discord.sku.SKU:15\nmsgid \":class:`SKUType`\"\nmsgstr \"\"\n\n#: ../../../discord/sku.py:docstring of discord.sku.SKU:19\nmsgid \"The ID of the application that the SKU belongs to.\"\nmsgstr \"\"\n\n#: ../../../discord/sku.py:docstring of discord.sku.SKU:25\nmsgid \"The consumer-facing name of the premium offering.\"\nmsgstr \"\"\n\n#: ../../../discord/sku.py:docstring of discord.sku.SKU:31\nmsgid \"A system-generated URL slug based on the SKU name.\"\nmsgstr \"\"\n\n#: ../../../discord/sku.py:docstring of discord.SKU.flags:1\nmsgid \"Returns the flags of the SKU.\"\nmsgstr \"\"\n\n#: ../../../discord/sku.py:docstring of discord.SKU.flags:3\nmsgid \":class:`SKUFlags`\"\nmsgstr \"\"\n\n#: ../../../discord/sku.py:docstring of discord.SKU.created_at:1\nmsgid \"Returns the sku's creation time in UTC.\"\nmsgstr \"\"\n\n#: ../../api.rst:4863\nmsgid \"Entitlement\"\nmsgstr \"\"\n\n#: ../../../discord/sku.py:docstring of discord.sku.Entitlement:1\nmsgid \"Represents an entitlement from user or guild which has been granted access to a premium offering.\"\nmsgstr \"\"\n\n#: ../../../discord/sku.py:docstring of discord.sku.Entitlement:7\nmsgid \"The entitlement's ID.\"\nmsgstr \"\"\n\n#: ../../../discord/sku.py:docstring of discord.sku.Entitlement:13\nmsgid \"The ID of the SKU that the entitlement belongs to.\"\nmsgstr \"\"\n\n#: ../../../discord/sku.py:docstring of discord.sku.Entitlement:19\nmsgid \"The ID of the application that the entitlement belongs to.\"\nmsgstr \"\"\n\n#: ../../../discord/sku.py:docstring of discord.sku.Entitlement:25\nmsgid \"The ID of the user that is granted access to the entitlement.\"\nmsgstr \"\"\n\n#: ../../../discord/sku.py:docstring of discord.sku.Entitlement:31\nmsgid \"The type of the entitlement.\"\nmsgstr \"\"\n\n#: ../../../discord/sku.py:docstring of discord.sku.Entitlement:33\nmsgid \":class:`EntitlementType`\"\nmsgstr \"\"\n\n#: ../../../discord/sku.py:docstring of discord.sku.Entitlement:37\nmsgid \"Whether the entitlement has been deleted.\"\nmsgstr \"\"\n\n#: ../../../discord/sku.py:docstring of discord.sku.Entitlement:43\nmsgid \"A UTC start date which the entitlement is valid. Not present when using test entitlements.\"\nmsgstr \"\"\n\n#: ../../../discord/sku.py:docstring of discord.sku.Entitlement:49\nmsgid \"A UTC date which entitlement is no longer valid. Not present when using test entitlements.\"\nmsgstr \"\"\n\n#: ../../../discord/sku.py:docstring of discord.sku.Entitlement:55\nmsgid \"The ID of the guild that is granted access to the entitlement\"\nmsgstr \"\"\n\n#: ../../../discord/sku.py:docstring of discord.Entitlement.user:1\nmsgid \"The user that is granted access to the entitlement.\"\nmsgstr \"\"\n\n#: ../../../discord/sku.py:docstring of discord.Entitlement.guild:1\nmsgid \"The guild that is granted access to the entitlement.\"\nmsgstr \"\"\n\n#: ../../../discord/sku.py:docstring of discord.Entitlement.created_at:1\nmsgid \"Returns the entitlement's creation time in UTC.\"\nmsgstr \"\"\n\n#: ../../../discord/sku.py:docstring of discord.sku.Entitlement.is_expired:1\nmsgid \":class:`bool`: Returns ``True`` if the entitlement is expired. Will be always False for test entitlements.\"\nmsgstr \"\"\n\n#: ../../../discord/sku.py:docstring of discord.sku.Entitlement.delete:3\nmsgid \"Deletes the entitlement.\"\nmsgstr \"\"\n\n#: ../../../discord/sku.py:docstring of discord.sku.Entitlement.delete:6\nmsgid \"The entitlement could not be found.\"\nmsgstr \"\"\n\n#: ../../../discord/sku.py:docstring of discord.sku.Entitlement.delete:7\nmsgid \"Deleting the entitlement failed.\"\nmsgstr \"\"\n\n#: ../../api.rst:4871\nmsgid \"RawMessageDeleteEvent\"\nmsgstr \"RawMessageDeleteEvent\"\n\n#: ../../../discord/raw_models.py:docstring of discord.raw_models.RawMessageDeleteEvent:1\nmsgid \"Represents the event payload for a :func:`on_raw_message_delete` event.\"\nmsgstr \":func:`on_raw_message_delete` イベントのペイロードを表します。\"\n\n#: ../../../discord/raw_models.py:docstring of discord.raw_models.RawMessageDeleteEvent:5\nmsgid \"The channel ID where the deletion took place.\"\nmsgstr \"削除が行われたチャンネルのID。\"\n\n#: ../../../discord/raw_models.py:docstring of discord.raw_models.RawMessageDeleteEvent:11\nmsgid \"The guild ID where the deletion took place, if applicable.\"\nmsgstr \"該当する場合、削除が行われたギルドのID。\"\n\n#: ../../../discord/raw_models.py:docstring of discord.raw_models.RawMessageDeleteEvent:17\nmsgid \"The message ID that got deleted.\"\nmsgstr \"削除されたメッセージ ID。\"\n\n#: ../../../discord/raw_models.py:docstring of discord.raw_models.RawMessageDeleteEvent:23\n#: ../../../discord/message.py:docstring of discord.MessageReference.cached_message:1\nmsgid \"The cached message, if found in the internal message cache.\"\nmsgstr \"内部のメッセージキャッシュに見つかった場合、そのキャッシュされたメッセージ。\"\n\n#: ../../api.rst:4879\nmsgid \"RawBulkMessageDeleteEvent\"\nmsgstr \"RawBulkMessageDeleteEvent\"\n\n#: ../../../discord/raw_models.py:docstring of discord.raw_models.RawBulkMessageDeleteEvent:1\nmsgid \"Represents the event payload for a :func:`on_raw_bulk_message_delete` event.\"\nmsgstr \":func:`on_raw_bulk_message_delete` イベントのペイロードを表します。\"\n\n#: ../../../discord/raw_models.py:docstring of discord.raw_models.RawBulkMessageDeleteEvent:5\nmsgid \"A :class:`set` of the message IDs that were deleted.\"\nmsgstr \"削除されたメッセージ ID の :class:`set` 。\"\n\n#: ../../../discord/raw_models.py:docstring of discord.raw_models.RawBulkMessageDeleteEvent:11\nmsgid \"The channel ID where the message got deleted.\"\nmsgstr \"メッセージが削除されたチャンネルのID。\"\n\n#: ../../../discord/raw_models.py:docstring of discord.raw_models.RawBulkMessageDeleteEvent:17\nmsgid \"The guild ID where the message got deleted, if applicable.\"\nmsgstr \"該当する場合、削除が行われたギルドのID。\"\n\n#: ../../../discord/raw_models.py:docstring of discord.raw_models.RawBulkMessageDeleteEvent:23\nmsgid \"The cached messages, if found in the internal message cache.\"\nmsgstr \"内部のメッセージキャッシュに見つかった場合、そのキャッシュされたメッセージ。\"\n\n#: ../../../discord/raw_models.py:docstring of discord.raw_models.RawBulkMessageDeleteEvent:25\nmsgid \"List[:class:`Message`]\"\nmsgstr \"List[:class:`Message`]\"\n\n#: ../../api.rst:4887\nmsgid \"RawMessageUpdateEvent\"\nmsgstr \"RawMessageUpdateEvent\"\n\n#: ../../../discord/raw_models.py:docstring of discord.raw_models.RawMessageUpdateEvent:1\nmsgid \"Represents the payload for a :func:`on_raw_message_edit` event.\"\nmsgstr \":func:`on_raw_message_edit` イベントのペイロードを表します。\"\n\n#: ../../../discord/raw_models.py:docstring of discord.raw_models.RawMessageUpdateEvent:5\nmsgid \"The message ID that got updated.\"\nmsgstr \"更新されたメッセージ ID。\"\n\n#: ../../../discord/raw_models.py:docstring of discord.raw_models.RawMessageUpdateEvent:11\nmsgid \"The channel ID where the update took place.\"\nmsgstr \"更新が行われたチャンネルのID。\"\n\n#: ../../../discord/raw_models.py:docstring of discord.raw_models.RawMessageUpdateEvent:19\nmsgid \"The guild ID where the message got updated, if applicable.\"\nmsgstr \"該当する場合、更新が行われたギルドのID。\"\n\n#: ../../../discord/raw_models.py:docstring of discord.raw_models.RawMessageUpdateEvent:27\nmsgid \"The raw data given by the :ddocs:`gateway <topics/gateway#message-update>`\"\nmsgstr \":ddocs:`ゲートウェイ <topics/gateway#message-update>` によって与えられた生のデータ。\"\n\n#: ../../../discord/raw_models.py:docstring of discord.raw_models.RawMessageUpdateEvent:29\n#: ../../../discord/raw_models.py:docstring of discord.raw_models.RawThreadUpdateEvent:33\n#: ../../../discord/raw_models.py:docstring of discord.raw_models.RawThreadMembersUpdate:27\n#: ../../../discord/activity.py:docstring of discord.activity.Activity:65\n#: ../../../discord/activity.py:docstring of discord.activity.Activity:77\nmsgid \":class:`dict`\"\nmsgstr \":class:`dict`\"\n\n#: ../../../discord/raw_models.py:docstring of discord.raw_models.RawMessageUpdateEvent:33\nmsgid \"The cached message, if found in the internal message cache. Represents the message before it is modified by the data in :attr:`RawMessageUpdateEvent.data`.\"\nmsgstr \"内部メッセージキャッシュで見つかった場合、そのキャッシュされたメッセージ。 :attr:`RawMessageUpdateEvent.data` のデータによって変更される前のメッセージを表します。\"\n\n#: ../../api.rst:4895\nmsgid \"RawReactionActionEvent\"\nmsgstr \"RawReactionActionEvent\"\n\n#: ../../../discord/raw_models.py:docstring of discord.raw_models.RawReactionActionEvent:1\nmsgid \"Represents the payload for a :func:`on_raw_reaction_add` or :func:`on_raw_reaction_remove` event.\"\nmsgstr \":func:`on_raw_reaction_add` または :func:`on_raw_reaction_remove` イベントのペイロードを表します。\"\n\n#: ../../../discord/raw_models.py:docstring of discord.raw_models.RawReactionActionEvent:6\nmsgid \"The message ID that got or lost a reaction.\"\nmsgstr \"リアクションが追加され、または除去されたメッセージのID。\"\n\n#: ../../../discord/raw_models.py:docstring of discord.raw_models.RawReactionActionEvent:12\nmsgid \"The user ID who added the reaction or whose reaction was removed.\"\nmsgstr \"リアクションを追加したユーザーのID、またはそのリアクションが除去されたユーザーのID。\"\n\n#: ../../../discord/raw_models.py:docstring of discord.raw_models.RawReactionActionEvent:18\nmsgid \"The channel ID where the reaction got added or removed.\"\nmsgstr \"リアクションが追加または除去されたチャンネルのID 。\"\n\n#: ../../../discord/raw_models.py:docstring of discord.raw_models.RawReactionActionEvent:24\nmsgid \"The guild ID where the reaction got added or removed, if applicable.\"\nmsgstr \"該当する場合、リアクションの追加または除去が行われたギルドのID。\"\n\n#: ../../../discord/raw_models.py:docstring of discord.raw_models.RawReactionActionEvent:30\nmsgid \"The custom or unicode emoji being used.\"\nmsgstr \"使用されたカスタムまたはユニコード絵文字。\"\n\n#: ../../../discord/raw_models.py:docstring of discord.raw_models.RawReactionActionEvent:36\nmsgid \"The member who added the reaction. Only available if ``event_type`` is ``REACTION_ADD`` and the reaction is inside a guild.\"\nmsgstr \"リアクションを追加したメンバー。 ``event_type`` が ``REACTION_ADD`` でリアクションがギルド内にある場合にのみ利用できます。\"\n\n#: ../../../discord/raw_models.py:docstring of discord.raw_models.RawReactionActionEvent:44\nmsgid \"The author ID of the message being reacted to. Only available if ``event_type`` is ``REACTION_ADD``.\"\nmsgstr \"\"\n\n#: ../../../discord/raw_models.py:docstring of discord.raw_models.RawReactionActionEvent:52\nmsgid \"The event type that triggered this action. Can be ``REACTION_ADD`` for reaction addition or ``REACTION_REMOVE`` for reaction removal.\"\nmsgstr \"このアクションの原因であるイベントタイプ。リアクションの追加は ``REACTION_ADD`` 、リアクションの除去は ``REACTION_REMOVE`` です。\"\n\n#: ../../../discord/raw_models.py:docstring of discord.raw_models.RawReactionActionEvent:62\nmsgid \"Whether the reaction was a burst reaction, also known as a \\\"super reaction\\\".\"\nmsgstr \"\"\n\n#: ../../../discord/raw_models.py:docstring of discord.raw_models.RawReactionActionEvent:70\nmsgid \"A list of colours used for burst reaction animation. Only available if ``burst`` is ``True`` and if ``event_type`` is ``REACTION_ADD``.\"\nmsgstr \"\"\n\n#: ../../../discord/raw_models.py:docstring of discord.raw_models.RawReactionActionEvent:75\nmsgid \"List[:class:`Colour`]\"\nmsgstr \"\"\n\n#: ../../../discord/raw_models.py:docstring of discord.RawReactionActionEvent.burst_colors:1\nmsgid \"An alias of :attr:`burst_colours`.\"\nmsgstr \"\"\n\n#: ../../api.rst:4903\nmsgid \"RawReactionClearEvent\"\nmsgstr \"RawReactionClearEvent\"\n\n#: ../../../discord/raw_models.py:docstring of discord.raw_models.RawReactionClearEvent:1\nmsgid \"Represents the payload for a :func:`on_raw_reaction_clear` event.\"\nmsgstr \":func:`on_raw_reaction_clear` イベントのペイロードを表します。\"\n\n#: ../../../discord/raw_models.py:docstring of discord.raw_models.RawReactionClearEvent:5\n#: ../../../discord/raw_models.py:docstring of discord.raw_models.RawReactionClearEmojiEvent:7\nmsgid \"The message ID that got its reactions cleared.\"\nmsgstr \"リアクションが一括除去されたメッセージ。\"\n\n#: ../../../discord/raw_models.py:docstring of discord.raw_models.RawReactionClearEvent:11\n#: ../../../discord/raw_models.py:docstring of discord.raw_models.RawReactionClearEmojiEvent:13\nmsgid \"The channel ID where the reactions got cleared.\"\nmsgstr \"リアクションの一括除去が行われたチャンネルのID。\"\n\n#: ../../../discord/raw_models.py:docstring of discord.raw_models.RawReactionClearEvent:17\n#: ../../../discord/raw_models.py:docstring of discord.raw_models.RawReactionClearEmojiEvent:19\nmsgid \"The guild ID where the reactions got cleared.\"\nmsgstr \"リアクションの一括除去が行われたギルドのID。\"\n\n#: ../../api.rst:4911\nmsgid \"RawReactionClearEmojiEvent\"\nmsgstr \"RawReactionClearEmojiEvent\"\n\n#: ../../../discord/raw_models.py:docstring of discord.raw_models.RawReactionClearEmojiEvent:1\nmsgid \"Represents the payload for a :func:`on_raw_reaction_clear_emoji` event.\"\nmsgstr \":func:`on_raw_reaction_clear_emoji` イベントのペイロードを表します。\"\n\n#: ../../../discord/raw_models.py:docstring of discord.raw_models.RawReactionClearEmojiEvent:25\nmsgid \"The custom or unicode emoji being removed.\"\nmsgstr \"除去されたカスタムまたはユニコード絵文字。\"\n\n#: ../../api.rst:4919\nmsgid \"RawIntegrationDeleteEvent\"\nmsgstr \"RawIntegrationDeleteEvent\"\n\n#: ../../../discord/raw_models.py:docstring of discord.raw_models.RawIntegrationDeleteEvent:1\nmsgid \"Represents the payload for a :func:`on_raw_integration_delete` event.\"\nmsgstr \":func:`on_raw_integration_delete` イベントのペイロードを表します。\"\n\n#: ../../../discord/raw_models.py:docstring of discord.raw_models.RawIntegrationDeleteEvent:7\nmsgid \"The ID of the integration that got deleted.\"\nmsgstr \"削除された連携サービスのID。\"\n\n#: ../../../discord/raw_models.py:docstring of discord.raw_models.RawIntegrationDeleteEvent:13\nmsgid \"The ID of the bot/OAuth2 application for this deleted integration.\"\nmsgstr \"削除された連携サービスのボットやOAuth2 アプリケーションのID。\"\n\n#: ../../../discord/raw_models.py:docstring of discord.raw_models.RawIntegrationDeleteEvent:19\nmsgid \"The guild ID where the integration got deleted.\"\nmsgstr \"連携サービスが削除されたギルドのID。\"\n\n#: ../../api.rst:4927\nmsgid \"RawThreadUpdateEvent\"\nmsgstr \"RawThreadUpdateEvent\"\n\n#: ../../../discord/raw_models.py:docstring of discord.raw_models.RawThreadUpdateEvent:1\nmsgid \"Represents the payload for a :func:`on_raw_thread_update` event.\"\nmsgstr \":func:`on_raw_thread_update` イベントのペイロードを表します。\"\n\n#: ../../../discord/raw_models.py:docstring of discord.raw_models.RawThreadUpdateEvent:7\n#: ../../../discord/raw_models.py:docstring of discord.raw_models.RawThreadMembersUpdate:7\nmsgid \"The ID of the thread that was updated.\"\nmsgstr \"更新されたスレッドのID。\"\n\n#: ../../../discord/raw_models.py:docstring of discord.raw_models.RawThreadUpdateEvent:13\nmsgid \"The channel type of the updated thread.\"\nmsgstr \"更新されたスレッドのチャンネルタイプ。\"\n\n#: ../../../discord/raw_models.py:docstring of discord.raw_models.RawThreadUpdateEvent:15\n#: ../../../discord/raw_models.py:docstring of discord.raw_models.RawThreadDeleteEvent:15\nmsgid \":class:`discord.ChannelType`\"\nmsgstr \":class:`discord.ChannelType`\"\n\n#: ../../../discord/raw_models.py:docstring of discord.raw_models.RawThreadUpdateEvent:19\n#: ../../../discord/raw_models.py:docstring of discord.raw_models.RawThreadMembersUpdate:13\nmsgid \"The ID of the guild the thread is in.\"\nmsgstr \"スレッドが属するギルドのID。\"\n\n#: ../../../discord/raw_models.py:docstring of discord.raw_models.RawThreadUpdateEvent:25\nmsgid \"The ID of the channel the thread belongs to.\"\nmsgstr \"スレッドが属するチャンネルの ID。\"\n\n#: ../../../discord/raw_models.py:docstring of discord.raw_models.RawThreadUpdateEvent:31\nmsgid \"The raw data given by the :ddocs:`gateway <topics/gateway#thread-update>`\"\nmsgstr \":ddocs:`ゲートウェイ <topics/gateway#thread-update>` によって与えられた生のデータ。\"\n\n#: ../../../discord/raw_models.py:docstring of discord.raw_models.RawThreadUpdateEvent:37\n#: ../../../discord/raw_models.py:docstring of discord.raw_models.RawThreadDeleteEvent:31\nmsgid \"The thread, if it could be found in the internal cache.\"\nmsgstr \"スレッドが内部キャッシュで見つかった場合、そのスレッド。\"\n\n#: ../../../discord/raw_models.py:docstring of discord.raw_models.RawThreadUpdateEvent:39\n#: ../../../discord/raw_models.py:docstring of discord.raw_models.RawThreadDeleteEvent:33\nmsgid \"Optional[:class:`discord.Thread`]\"\nmsgstr \"Optional[:class:`discord.Thread`]\"\n\n#: ../../api.rst:4935\nmsgid \"RawThreadMembersUpdate\"\nmsgstr \"RawThreadMembersUpdate\"\n\n#: ../../../discord/raw_models.py:docstring of discord.raw_models.RawThreadMembersUpdate:1\nmsgid \"Represents the payload for a :func:`on_raw_thread_member_remove` event.\"\nmsgstr \":func:`on_raw_thread_member_remove` イベントのペイロードを表します。\"\n\n#: ../../../discord/raw_models.py:docstring of discord.raw_models.RawThreadMembersUpdate:19\nmsgid \"The approximate number of members in the thread. This caps at 50.\"\nmsgstr \"スレッドのおおよそのメンバー数。この値は50の上限があります。\"\n\n#: ../../../discord/raw_models.py:docstring of discord.raw_models.RawThreadMembersUpdate:25\nmsgid \"The raw data given by the :ddocs:`gateway <topics/gateway#thread-members-update>`.\"\nmsgstr \":ddocs:`ゲートウェイ <topics/gateway#thread-members-update>` によって与えられた生のデータ。\"\n\n#: ../../api.rst:4943\nmsgid \"RawThreadDeleteEvent\"\nmsgstr \"RawThreadDeleteEvent\"\n\n#: ../../../discord/raw_models.py:docstring of discord.raw_models.RawThreadDeleteEvent:1\nmsgid \"Represents the payload for a :func:`on_raw_thread_delete` event.\"\nmsgstr \":func:`on_raw_thread_delete` イベントのペイロードを表します。\"\n\n#: ../../../discord/raw_models.py:docstring of discord.raw_models.RawThreadDeleteEvent:7\nmsgid \"The ID of the thread that was deleted.\"\nmsgstr \"削除されたスレッドのID。\"\n\n#: ../../../discord/raw_models.py:docstring of discord.raw_models.RawThreadDeleteEvent:13\nmsgid \"The channel type of the deleted thread.\"\nmsgstr \"削除されたスレッドのチャンネルタイプ。\"\n\n#: ../../../discord/raw_models.py:docstring of discord.raw_models.RawThreadDeleteEvent:19\nmsgid \"The ID of the guild the thread was deleted in.\"\nmsgstr \"スレッドが削除されたギルドのID。\"\n\n#: ../../../discord/raw_models.py:docstring of discord.raw_models.RawThreadDeleteEvent:25\nmsgid \"The ID of the channel the thread belonged to.\"\nmsgstr \"スレッドが属したチャンネルの ID。\"\n\n#: ../../api.rst:4951\nmsgid \"RawTypingEvent\"\nmsgstr \"RawTypingEvent\"\n\n#: ../../../discord/raw_models.py:docstring of discord.raw_models.RawTypingEvent:1\nmsgid \"Represents the payload for a :func:`on_raw_typing` event.\"\nmsgstr \":func:`on_raw_typing` イベントのペイロードを表します。\"\n\n#: ../../../discord/raw_models.py:docstring of discord.raw_models.RawTypingEvent:7\nmsgid \"The ID of the channel the user started typing in.\"\nmsgstr \"ユーザーが入力し始めたチャンネルのID。\"\n\n#: ../../../discord/raw_models.py:docstring of discord.raw_models.RawTypingEvent:13\nmsgid \"The ID of the user that started typing.\"\nmsgstr \"入力を始めたユーザーのID。\"\n\n#: ../../../discord/raw_models.py:docstring of discord.raw_models.RawTypingEvent:19\nmsgid \"The user that started typing, if they could be found in the internal cache.\"\nmsgstr \"内部キャッシュで見つかった場合、入力し始めたユーザー。\"\n\n#: ../../../discord/raw_models.py:docstring of discord.raw_models.RawTypingEvent:21\nmsgid \"Optional[Union[:class:`discord.User`, :class:`discord.Member`]]\"\nmsgstr \"Optional[Union[:class:`discord.User`, :class:`discord.Member`]]\"\n\n#: ../../../discord/raw_models.py:docstring of discord.raw_models.RawTypingEvent:31\nmsgid \"The ID of the guild the user started typing in, if applicable.\"\nmsgstr \"該当する場合、ユーザーが入力し始めたギルドのID。\"\n\n#: ../../api.rst:4959\nmsgid \"RawMemberRemoveEvent\"\nmsgstr \"RawMemberRemoveEvent\"\n\n#: ../../../discord/raw_models.py:docstring of discord.raw_models.RawMemberRemoveEvent:1\nmsgid \"Represents the payload for a :func:`on_raw_member_remove` event.\"\nmsgstr \":func:`on_raw_member_remove` イベントのペイロードを表します。\"\n\n#: ../../../discord/raw_models.py:docstring of discord.raw_models.RawMemberRemoveEvent:7\nmsgid \"The user that left the guild.\"\nmsgstr \"ギルドを脱退したユーザー。\"\n\n#: ../../../discord/raw_models.py:docstring of discord.raw_models.RawMemberRemoveEvent:9\nmsgid \"Union[:class:`discord.User`, :class:`discord.Member`]\"\nmsgstr \"Union[:class:`discord.User`, :class:`discord.Member`]\"\n\n#: ../../../discord/raw_models.py:docstring of discord.raw_models.RawMemberRemoveEvent:13\nmsgid \"The ID of the guild the user left.\"\nmsgstr \"ユーザーが脱退したギルドのID。\"\n\n#: ../../api.rst:4967\nmsgid \"RawAppCommandPermissionsUpdateEvent\"\nmsgstr \"RawAppCommandPermissionsUpdateEvent\"\n\n#: ../../../discord/raw_models.py:docstring of discord.raw_models.RawAppCommandPermissionsUpdateEvent:1\nmsgid \"Represents the payload for a :func:`on_raw_app_command_permissions_update` event.\"\nmsgstr \":func:`on_raw_app_command_permissions_update` イベントのペイロードを表します。\"\n\n#: ../../../discord/raw_models.py:docstring of discord.raw_models.RawAppCommandPermissionsUpdateEvent:7\nmsgid \"The ID of the command or application whose permissions were updated. When this is the application ID instead of a command ID, the permissions apply to all commands that do not contain explicit overwrites.\"\nmsgstr \"権限が更新されたコマンドIDまたはアプリケーションID。これがコマンドIDではなくアプリケーションIDの場合、権限は明示的に上書きされていないすべてのコマンドに適用されます。\"\n\n#: ../../../discord/raw_models.py:docstring of discord.raw_models.RawAppCommandPermissionsUpdateEvent:15\nmsgid \"The ID of the application that the command belongs to.\"\nmsgstr \"このコマンドが属するアプリケーションのID。\"\n\n#: ../../../discord/raw_models.py:docstring of discord.raw_models.RawAppCommandPermissionsUpdateEvent:21\nmsgid \"The guild where the permissions were updated.\"\nmsgstr \"権限が更新されたギルド。\"\n\n#: ../../../discord/raw_models.py:docstring of discord.raw_models.RawAppCommandPermissionsUpdateEvent:27\nmsgid \"List of new permissions for the app command.\"\nmsgstr \"アプリケーションコマンドの新しい権限のリスト。\"\n\n#: ../../api.rst:4975\nmsgid \"PartialWebhookGuild\"\nmsgstr \"PartialWebhookGuild\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.PartialWebhookGuild:1\nmsgid \"Represents a partial guild for webhooks.\"\nmsgstr \"Webhook用の部分的なギルドを表します。\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.PartialWebhookGuild:3\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.PartialWebhookChannel:3\nmsgid \"These are typically given for channel follower webhooks.\"\nmsgstr \"これは通常、チャンネルをフォローするWebhookから与えられます。\"\n\n#: ../../api.rst:4983\nmsgid \"PartialWebhookChannel\"\nmsgstr \"PartialWebhookChannel\"\n\n#: ../../../discord/webhook/async_.py:docstring of discord.webhook.async_.PartialWebhookChannel:1\nmsgid \"Represents a partial channel for webhooks.\"\nmsgstr \"Webhook用の部分的なチャンネルを表します。\"\n\n#: ../../api.rst:4993\nmsgid \"Data Classes\"\nmsgstr \"データクラス\"\n\n#: ../../api.rst:4995\nmsgid \"Some classes are just there to be data containers, this lists them.\"\nmsgstr \"一部のクラスはデータコンテナとして用いられます。ここではそのクラスを一覧表にしています。\"\n\n#: ../../api.rst:4997\nmsgid \"Unlike :ref:`models <discord_api_models>` you are allowed to create most of these yourself, even if they can also be used to hold attributes.\"\nmsgstr \":ref:`models <discord_api_models>` とは異なり、属性を持つものであっても、自分で作成することが許されています。\"\n\n#: ../../api.rst:5003\nmsgid \"The only exception to this rule is :class:`Object`, which is made with dynamic attributes in mind.\"\nmsgstr \"このルールの唯一の例外は :class:`Object` で、動的な属性を念頭に置いて作成されます。\"\n\n#: ../../api.rst:5008\nmsgid \"Object\"\nmsgstr \"Object\"\n\n#: ../../../discord/object.py:docstring of discord.object.Object:1\nmsgid \"Represents a generic Discord object.\"\nmsgstr \"一般的なDiscordオブジェクトを表します。\"\n\n#: ../../../discord/object.py:docstring of discord.object.Object:3\nmsgid \"The purpose of this class is to allow you to create 'miniature' versions of data classes if you want to pass in just an ID. Most functions that take in a specific data class with an ID can also take in this class as a substitute instead. Note that even though this is the case, not all objects (if any) actually inherit from this class.\"\nmsgstr \"このクラスの目的は、IDだけを渡したい場合に、ミニチュアバージョンのデータクラスを作成できるようにすることです。 IDを持つ特定のデータクラスを受け取るほとんどの関数も、このクラスを代わりに受け取ることができます。 この場合であっても、（もしあるとすれば） すべてのオブジェクトがこのクラスから継承されるわけではないことに注意してください。\"\n\n#: ../../../discord/object.py:docstring of discord.object.Object:9\nmsgid \"There are also some cases where some websocket events are received in :issue:`strange order <21>` and when such events happened you would receive this class rather than the actual data class. These cases are extremely rare.\"\nmsgstr \"また、WebSocketイベントを :issue:`奇妙な順序 <21>` で受け取る場合があり、この場合には実際のデータクラスではなくこのクラスを受け取ります。これは非常にまれです。\"\n\n#: ../../../discord/object.py:docstring of discord.object.Object:18\nmsgid \"Checks if two objects are equal.\"\nmsgstr \"二つのオブジェクトが等しいか比較します。\"\n\n#: ../../../discord/object.py:docstring of discord.object.Object:22\nmsgid \"Checks if two objects are not equal.\"\nmsgstr \"二つのオブジェクトが等しいものでないか比較します。\"\n\n#: ../../../discord/object.py:docstring of discord.object.Object:26\nmsgid \"Returns the object's hash.\"\nmsgstr \"オブジェクトのハッシュを返します。\"\n\n#: ../../../discord/object.py:docstring of discord.object.Object:30\nmsgid \"The ID of the object.\"\nmsgstr \"オブジェクトのID。\"\n\n#: ../../../discord/object.py:docstring of discord.object.Object:36\nmsgid \"The discord.py model type of the object, if not specified, defaults to this class.\"\nmsgstr \"オブジェクトのdiscord.pyモデルタイプ。指定されていない場合は、デフォルトでこのクラスになります。\"\n\n#: ../../../discord/object.py:docstring of discord.object.Object:40\nmsgid \"In instances where there are multiple applicable types, use a shared base class. for example, both :class:`Member` and :class:`User` are subclasses of :class:`abc.User`.\"\nmsgstr \"適用可能な型が複数ある場合は、共通の基底クラスを使用してください。 例えば、 :class:`Member` と :class:`User` は両方とも :class:`abc.User` のサブクラスです。\"\n\n#: ../../../discord/object.py:docstring of discord.object.Object:45\nmsgid \"Type[:class:`abc.Snowflake`]\"\nmsgstr \"Type[:class:`abc.Snowflake`]\"\n\n#: ../../../discord/object.py:docstring of discord.Object.created_at:1\nmsgid \"Returns the snowflake's creation time in UTC.\"\nmsgstr \"スノーフレークの作成時刻をUTCで返します。\"\n\n#: ../../api.rst:5016\nmsgid \"Embed\"\nmsgstr \"Embed\"\n\n#: ../../../discord/embeds.py:docstring of discord.embeds.Embed:1\nmsgid \"Represents a Discord embed.\"\nmsgstr \"Discordの埋め込み。\"\n\n#: ../../../discord/embeds.py:docstring of discord.embeds.Embed:7\nmsgid \"Returns the total size of the embed. Useful for checking if it's within the 6000 character limit.\"\nmsgstr \"埋め込みの合計サイズを返します。6000文字の上限内かどうかを確認するのに便利です。\"\n\n#: ../../../discord/embeds.py:docstring of discord.embeds.Embed:12\nmsgid \"Returns whether the embed has any data set.\"\nmsgstr \"埋め込みにデータがあるかどうかを返します。\"\n\n#: ../../../discord/embeds.py:docstring of discord.embeds.Embed:18\nmsgid \"Checks if two embeds are equal.\"\nmsgstr \"二つの埋め込みが等しいかを比較します。\"\n\n#: ../../../discord/embeds.py:docstring of discord.embeds.Embed:22\nmsgid \"For ease of use, all parameters that expect a :class:`str` are implicitly casted to :class:`str` for you.\"\nmsgstr \"使いやすさを考慮して、:class:`str` が渡されることを想定されたすべてのパラメータは、暗黙的に :class:`str` にキャストされます。\"\n\n#: ../../../discord/embeds.py:docstring of discord.embeds.Embed:25\nmsgid \"``Embed.Empty`` has been removed in favour of ``None``.\"\nmsgstr \"``Embed.Empty`` は、 ``None`` に置き換えられ削除されました。\"\n\n#: ../../../discord/embeds.py:docstring of discord.embeds.Embed:30\nmsgid \"The title of the embed. This can be set during initialisation. Can only be up to 256 characters.\"\nmsgstr \"埋め込みのタイトル。初期化中に設定できます。最大256文字までです。\"\n\n#: ../../../discord/embeds.py:docstring of discord.embeds.Embed:38\nmsgid \"The type of embed. Usually \\\"rich\\\". This can be set during initialisation. Possible strings for embed types can be found on discord's :ddocs:`api docs <resources/channel#embed-object-embed-types>`\"\nmsgstr \"埋め込みのタイプ。通常は「rich」です。初期化時に設定できます。 埋め込みのタイプとして可能な文字列は Discordの :ddocs:`API 説明書 <resources/channel#embed-object-embed-types>` にあります。\"\n\n#: ../../../discord/embeds.py:docstring of discord.embeds.Embed:47\nmsgid \"The description of the embed. This can be set during initialisation. Can only be up to 4096 characters.\"\nmsgstr \"埋め込みの説明。初期化中に設定できます。最大4096文字までです。\"\n\n#: ../../../discord/embeds.py:docstring of discord.embeds.Embed:55\nmsgid \"The URL of the embed. This can be set during initialisation.\"\nmsgstr \"埋め込みのURL。初期化時に設定できます。\"\n\n#: ../../../discord/embeds.py:docstring of discord.embeds.Embed:62\nmsgid \"The timestamp of the embed content. This is an aware datetime. If a naive datetime is passed, it is converted to an aware datetime with the local timezone.\"\nmsgstr \"埋め込みコンテンツのタイムスタンプ。これはaware datetimeです。 naive datetimeが渡されると、ローカルタイムゾーンを用いたaware datetimeに変換されます。\"\n\n#: ../../../discord/embeds.py:docstring of discord.embeds.Embed:70\nmsgid \"The colour code of the embed. Aliased to ``color`` as well. This can be set during initialisation.\"\nmsgstr \"埋め込みのカラーコード。 ``color`` というエイリアスが存在します。初期化時に設定できます。\"\n\n#: ../../../discord/embeds.py:docstring of discord.embeds.Embed:73\nmsgid \"Optional[Union[:class:`Colour`, :class:`int`]]\"\nmsgstr \"Optional[Union[:class:`Colour`, :class:`int`]]\"\n\n#: ../../../discord/embeds.py:docstring of discord.embeds.Embed.from_dict:1\nmsgid \"Converts a :class:`dict` to a :class:`Embed` provided it is in the format that Discord expects it to be in.\"\nmsgstr \"Discordの期待するフォーマットの :class:`dict` を :class:`Embed` に変換します。\"\n\n#: ../../../discord/embeds.py:docstring of discord.embeds.Embed.from_dict:4\nmsgid \"You can find out about this format in the :ddocs:`official Discord documentation <resources/channel#embed-object>`.\"\nmsgstr \"このフォーマットについては、 :ddocs:`Discord公式のドキュメント <resources/channel#embed-object>` を参照してください。\"\n\n#: ../../../discord/embeds.py:docstring of discord.embeds.Embed.from_dict:6\nmsgid \"The dictionary to convert into an embed.\"\nmsgstr \"埋め込みに変換する辞書。\"\n\n#: ../../../discord/embeds.py:docstring of discord.embeds.Embed.copy:1\nmsgid \"Returns a shallow copy of the embed.\"\nmsgstr \"埋め込みのシャローコピーを返します。\"\n\n#: ../../../discord/embeds.py:docstring of discord.Embed.footer:1\nmsgid \"Returns an ``EmbedProxy`` denoting the footer contents.\"\nmsgstr \"フッターの内容を表す ``EmbedProxy`` を返します。\"\n\n#: ../../../discord/embeds.py:docstring of discord.Embed.footer:3\nmsgid \"See :meth:`set_footer` for possible values you can access.\"\nmsgstr \"アクセス可能な値は :meth:`set_footer` を参照してください。\"\n\n#: ../../../discord/embeds.py:docstring of discord.Embed.footer:5\n#: ../../../discord/embeds.py:docstring of discord.Embed.image:10\n#: ../../../discord/embeds.py:docstring of discord.Embed.thumbnail:10\n#: ../../../discord/embeds.py:docstring of discord.Embed.video:9\n#: ../../../discord/embeds.py:docstring of discord.Embed.provider:5\nmsgid \"If the attribute has no value then ``None`` is returned.\"\nmsgstr \"属性に値がない場合は ``None`` が返されます。\"\n\n#: ../../../discord/embeds.py:docstring of discord.embeds.Embed.set_footer:1\nmsgid \"Sets the footer for the embed content.\"\nmsgstr \"埋め込みコンテンツのフッターを設定します。\"\n\n#: ../../../discord/embeds.py:docstring of discord.embeds.Embed.set_footer:3\n#: ../../../discord/embeds.py:docstring of discord.embeds.Embed.remove_footer:3\n#: ../../../discord/embeds.py:docstring of discord.embeds.Embed.set_image:3\n#: ../../../discord/embeds.py:docstring of discord.embeds.Embed.set_thumbnail:3\n#: ../../../discord/embeds.py:docstring of discord.embeds.Embed.set_author:3\nmsgid \"This function returns the class instance to allow for fluent-style chaining.\"\nmsgstr \"この関数は、流暢なスタイルのチェーンを可能にするため、クラスインスタンスを返します。\"\n\n#: ../../../discord/embeds.py:docstring of discord.embeds.Embed.set_footer:6\nmsgid \"The footer text. Can only be up to 2048 characters.\"\nmsgstr \"フッターテキスト。最大2048文字までです。\"\n\n#: ../../../discord/embeds.py:docstring of discord.embeds.Embed.set_footer:8\nmsgid \"The URL of the footer icon. Only HTTP(S) is supported. Inline attachment URLs are also supported, see :ref:`local_image`.\"\nmsgstr \"フッターアイコンのURL。HTTP(S) のみサポートされています。インラインの添付ファイル URL もサポートされています。 :ref:`local_image` を参照してください。\"\n\n#: ../../../discord/embeds.py:docstring of discord.embeds.Embed.remove_footer:1\nmsgid \"Clears embed's footer information.\"\nmsgstr \"埋め込みフッター情報を消去します。\"\n\n#: ../../../discord/embeds.py:docstring of discord.Embed.image:1\nmsgid \"Returns an ``EmbedProxy`` denoting the image contents.\"\nmsgstr \"画像の内容を表す ``EmbedProxy`` を返します。\"\n\n#: ../../../discord/embeds.py:docstring of discord.Embed.image:3\n#: ../../../discord/embeds.py:docstring of discord.Embed.thumbnail:3\nmsgid \"Possible attributes you can access are:\"\nmsgstr \"アクセス可能な属性は次のとおりです：\"\n\n#: ../../../discord/embeds.py:docstring of discord.Embed.image:5\n#: ../../../discord/embeds.py:docstring of discord.Embed.thumbnail:5\nmsgid \"``url``\"\nmsgstr \"``url``\"\n\n#: ../../../discord/embeds.py:docstring of discord.Embed.image:6\n#: ../../../discord/embeds.py:docstring of discord.Embed.thumbnail:6\nmsgid \"``proxy_url``\"\nmsgstr \"``proxy_url``\"\n\n#: ../../../discord/embeds.py:docstring of discord.Embed.image:7\n#: ../../../discord/embeds.py:docstring of discord.Embed.thumbnail:7\nmsgid \"``width``\"\nmsgstr \"``width``\"\n\n#: ../../../discord/embeds.py:docstring of discord.Embed.image:8\n#: ../../../discord/embeds.py:docstring of discord.Embed.thumbnail:8\nmsgid \"``height``\"\nmsgstr \"``height``\"\n\n#: ../../../discord/embeds.py:docstring of discord.embeds.Embed.set_image:1\nmsgid \"Sets the image for the embed content.\"\nmsgstr \"埋め込みコンテンツの画像を設定します。\"\n\n#: ../../../discord/embeds.py:docstring of discord.embeds.Embed.set_image:6\nmsgid \"The source URL for the image. Only HTTP(S) is supported. Inline attachment URLs are also supported, see :ref:`local_image`.\"\nmsgstr \"画像のソースURL。HTTP(S) のみサポートされています。インラインの添付ファイル URL もサポートされています。 :ref:`local_image` を参照してください。\"\n\n#: ../../../discord/embeds.py:docstring of discord.Embed.thumbnail:1\nmsgid \"Returns an ``EmbedProxy`` denoting the thumbnail contents.\"\nmsgstr \"サムネイルの内容を表す ``EmbedProxy`` を返します。\"\n\n#: ../../../discord/embeds.py:docstring of discord.embeds.Embed.set_thumbnail:1\nmsgid \"Sets the thumbnail for the embed content.\"\nmsgstr \"埋め込みコンテンツのサムネイルを設定します。\"\n\n#: ../../../discord/embeds.py:docstring of discord.embeds.Embed.set_thumbnail:6\nmsgid \"Passing ``None`` removes the thumbnail.\"\nmsgstr \"``None`` を渡すとサムネイルが除去されます。\"\n\n#: ../../../discord/embeds.py:docstring of discord.embeds.Embed.set_thumbnail:9\nmsgid \"The source URL for the thumbnail. Only HTTP(S) is supported. Inline attachment URLs are also supported, see :ref:`local_image`.\"\nmsgstr \"サムネイルのソースURL。HTTP(S) のみサポートされています。インラインの添付ファイル URL もサポートされています。 :ref:`local_image` を参照してください。\"\n\n#: ../../../discord/embeds.py:docstring of discord.Embed.video:1\nmsgid \"Returns an ``EmbedProxy`` denoting the video contents.\"\nmsgstr \"ビデオの内容を表す ``EmbedProxy`` を返します。\"\n\n#: ../../../discord/embeds.py:docstring of discord.Embed.video:3\nmsgid \"Possible attributes include:\"\nmsgstr \"可能な属性は次のとおりです：\"\n\n#: ../../../discord/embeds.py:docstring of discord.Embed.video:5\nmsgid \"``url`` for the video URL.\"\nmsgstr \"``url`` ：ビデオのURL\"\n\n#: ../../../discord/embeds.py:docstring of discord.Embed.video:6\nmsgid \"``height`` for the video height.\"\nmsgstr \"``height`` ：ビデオの高さ\"\n\n#: ../../../discord/embeds.py:docstring of discord.Embed.video:7\nmsgid \"``width`` for the video width.\"\nmsgstr \"``width`` ：ビデオの幅\"\n\n#: ../../../discord/embeds.py:docstring of discord.Embed.provider:1\nmsgid \"Returns an ``EmbedProxy`` denoting the provider contents.\"\nmsgstr \"プロバイダの内容を表す ``EmbedProxy`` を返します。\"\n\n#: ../../../discord/embeds.py:docstring of discord.Embed.provider:3\nmsgid \"The only attributes that might be accessed are ``name`` and ``url``.\"\nmsgstr \"アクセス可能な属性は ``name`` と ``url`` だけです。\"\n\n#: ../../../discord/embeds.py:docstring of discord.Embed.author:1\nmsgid \"Returns an ``EmbedProxy`` denoting the author contents.\"\nmsgstr \"作成者の内容を表す ``EmbedProxy`` を返します。\"\n\n#: ../../../discord/embeds.py:docstring of discord.Embed.author:3\nmsgid \"See :meth:`set_author` for possible values you can access.\"\nmsgstr \"アクセス可能な値は :meth:`set_author` を参照してください。\"\n\n#: ../../../discord/embeds.py:docstring of discord.embeds.Embed.set_author:1\nmsgid \"Sets the author for the embed content.\"\nmsgstr \"埋め込みコンテンツの作成者を設定します。\"\n\n#: ../../../discord/embeds.py:docstring of discord.embeds.Embed.set_author:6\nmsgid \"The name of the author. Can only be up to 256 characters.\"\nmsgstr \"作成者名。最大256文字までです。\"\n\n#: ../../../discord/embeds.py:docstring of discord.embeds.Embed.set_author:8\nmsgid \"The URL for the author.\"\nmsgstr \"作成者のURL。\"\n\n#: ../../../discord/embeds.py:docstring of discord.embeds.Embed.set_author:10\nmsgid \"The URL of the author icon. Only HTTP(S) is supported. Inline attachment URLs are also supported, see :ref:`local_image`.\"\nmsgstr \"作成者のアイコンのURL。HTTP(S) のみサポートされています。インラインの添付ファイル URL もサポートされています。 :ref:`local_image` を参照してください。\"\n\n#: ../../../discord/embeds.py:docstring of discord.embeds.Embed.remove_author:1\nmsgid \"Clears embed's author information.\"\nmsgstr \"埋め込みの作成者情報を消去します。\"\n\n#: ../../../discord/embeds.py:docstring of discord.Embed.fields:1\nmsgid \"Returns a :class:`list` of ``EmbedProxy`` denoting the field contents.\"\nmsgstr \"項目の内容を表す ``EmbedProxy`` の :class:`list` を返します。\"\n\n#: ../../../discord/embeds.py:docstring of discord.Embed.fields:3\nmsgid \"See :meth:`add_field` for possible values you can access.\"\nmsgstr \"アクセス可能な値は :meth:`add_field` を参照してください。\"\n\n#: ../../../discord/embeds.py:docstring of discord.Embed.fields:7\nmsgid \"List[``EmbedProxy``]\"\nmsgstr \"List[``EmbedProxy``]\"\n\n#: ../../../discord/embeds.py:docstring of discord.embeds.Embed.add_field:1\nmsgid \"Adds a field to the embed object.\"\nmsgstr \"埋め込みオブジェクトに項目を追加します。\"\n\n#: ../../../discord/embeds.py:docstring of discord.embeds.Embed.add_field:3\n#: ../../../discord/embeds.py:docstring of discord.embeds.Embed.insert_field_at:3\nmsgid \"This function returns the class instance to allow for fluent-style chaining. Can only be up to 25 fields.\"\nmsgstr \"この関数は、流暢なスタイルのチェーンを可能にするため、クラスインスタンスを返します。項目は最大25個まで追加できます。\"\n\n#: ../../../discord/embeds.py:docstring of discord.embeds.Embed.add_field:6\n#: ../../../discord/embeds.py:docstring of discord.embeds.Embed.insert_field_at:10\n#: ../../../discord/embeds.py:docstring of discord.embeds.Embed.set_field_at:10\nmsgid \"The name of the field. Can only be up to 256 characters.\"\nmsgstr \"項目の名前。最大256文字までです。\"\n\n#: ../../../discord/embeds.py:docstring of discord.embeds.Embed.add_field:8\n#: ../../../discord/embeds.py:docstring of discord.embeds.Embed.insert_field_at:12\n#: ../../../discord/embeds.py:docstring of discord.embeds.Embed.set_field_at:12\nmsgid \"The value of the field. Can only be up to 1024 characters.\"\nmsgstr \"項目の値。最大1024文字までです。\"\n\n#: ../../../discord/embeds.py:docstring of discord.embeds.Embed.add_field:10\n#: ../../../discord/embeds.py:docstring of discord.embeds.Embed.insert_field_at:14\n#: ../../../discord/embeds.py:docstring of discord.embeds.Embed.set_field_at:14\nmsgid \"Whether the field should be displayed inline.\"\nmsgstr \"項目をインライン表示するかどうか。\"\n\n#: ../../../discord/embeds.py:docstring of discord.embeds.Embed.insert_field_at:1\nmsgid \"Inserts a field before a specified index to the embed.\"\nmsgstr \"指定したインデックスの前に項目を挿入します。\"\n\n#: ../../../discord/embeds.py:docstring of discord.embeds.Embed.insert_field_at:8\nmsgid \"The index of where to insert the field.\"\nmsgstr \"項目を挿入する場所のインデックス。\"\n\n#: ../../../discord/embeds.py:docstring of discord.embeds.Embed.clear_fields:1\nmsgid \"Removes all fields from this embed.\"\nmsgstr \"埋め込みからすべての項目を削除します。\"\n\n#: ../../../discord/embeds.py:docstring of discord.embeds.Embed.clear_fields:6\n#: ../../../discord/embeds.py:docstring of discord.embeds.Embed.remove_field:14\nmsgid \"This function now returns the class instance.\"\nmsgstr \"この関数はクラスインスタンスを返すようになりました。\"\n\n#: ../../../discord/embeds.py:docstring of discord.embeds.Embed.remove_field:1\nmsgid \"Removes a field at a specified index.\"\nmsgstr \"特定のインデックスの項目を削除します。\"\n\n#: ../../../discord/embeds.py:docstring of discord.embeds.Embed.remove_field:3\nmsgid \"If the index is invalid or out of bounds then the error is silently swallowed.\"\nmsgstr \"インデックスが無効または範囲外の場合、エラーは無視されます。\"\n\n#: ../../../discord/embeds.py:docstring of discord.embeds.Embed.remove_field:11\nmsgid \"When deleting a field by index, the index of the other fields shift to fill the gap just like a regular list.\"\nmsgstr \"インデックスで項目を削除する場合、他の項目のインデックスは、通常のリストのようにギャップを埋めるために繰り上げられます。\"\n\n#: ../../../discord/embeds.py:docstring of discord.embeds.Embed.remove_field:17\nmsgid \"The index of the field to remove.\"\nmsgstr \"削除する項目のインデックス。\"\n\n#: ../../../discord/embeds.py:docstring of discord.embeds.Embed.set_field_at:1\nmsgid \"Modifies a field to the embed object.\"\nmsgstr \"埋め込みオブジェクトの項目を変更します。\"\n\n#: ../../../discord/embeds.py:docstring of discord.embeds.Embed.set_field_at:3\nmsgid \"The index must point to a valid pre-existing field. Can only be up to 25 fields.\"\nmsgstr \"インデックスは、有効な既存の項目を指す必要があります。項目は最大で25個までです。\"\n\n#: ../../../discord/embeds.py:docstring of discord.embeds.Embed.set_field_at:8\nmsgid \"The index of the field to modify.\"\nmsgstr \"変更する項目のインデックス。\"\n\n#: ../../../discord/embeds.py:docstring of discord.embeds.Embed.set_field_at:17\nmsgid \"An invalid index was provided.\"\nmsgstr \"無効なインデックスが指定された場合。\"\n\n#: ../../../discord/embeds.py:docstring of discord.embeds.Embed.to_dict:1\nmsgid \"Converts this embed object into a dict.\"\nmsgstr \"埋め込みオブジェクトを辞書型に変換します。\"\n\n#: ../../api.rst:5024\nmsgid \"AllowedMentions\"\nmsgstr \"AllowedMentions\"\n\n#: ../../../discord/mentions.py:docstring of discord.mentions.AllowedMentions:1\nmsgid \"A class that represents what mentions are allowed in a message.\"\nmsgstr \"メッセージ内で許可されたメンションを表すクラス。\"\n\n#: ../../../discord/mentions.py:docstring of discord.mentions.AllowedMentions:3\nmsgid \"This class can be set during :class:`Client` initialisation to apply to every message sent. It can also be applied on a per message basis via :meth:`abc.Messageable.send` for more fine-grained control.\"\nmsgstr \"これは :class:`Client` の初期化時に設定して、すべての送信されるメッセージに適用できます。より細かなコントロールを行いたい場合に、:meth:`abc.Messageable.send` を用いてメッセージ単位でも適用できます。\"\n\n#: ../../../discord/mentions.py:docstring of discord.mentions.AllowedMentions:9\nmsgid \"Whether to allow everyone and here mentions. Defaults to ``True``.\"\nmsgstr \"everyoneとhereメンションを許可するか。デフォルトは ``True`` です。\"\n\n#: ../../../discord/mentions.py:docstring of discord.mentions.AllowedMentions:15\nmsgid \"Controls the users being mentioned. If ``True`` (the default) then users are mentioned based on the message content. If ``False`` then users are not mentioned at all. If a list of :class:`abc.Snowflake` is given then only the users provided will be mentioned, provided those users are in the message content.\"\nmsgstr \"メンションできるユーザーをコントロールします。 ``True`` （デフォルト）の場合ユーザーはメッセージ内容によってメンションされます。 ``False`` の場合ユーザーは一切メンションされません。 :class:`abc.Snowflake` のリストが与えられた場合、与えられたユーザーがメッセージ内容に存在する場合に、そのユーザーのみメンションされます。\"\n\n#: ../../../discord/mentions.py:docstring of discord.mentions.AllowedMentions:21\n#: ../../../discord/mentions.py:docstring of discord.mentions.AllowedMentions:31\nmsgid \"Union[:class:`bool`, Sequence[:class:`abc.Snowflake`]]\"\nmsgstr \"Union[:class:`bool`, Sequence[:class:`abc.Snowflake`]]\"\n\n#: ../../../discord/mentions.py:docstring of discord.mentions.AllowedMentions:25\nmsgid \"Controls the roles being mentioned. If ``True`` (the default) then roles are mentioned based on the message content. If ``False`` then roles are not mentioned at all. If a list of :class:`abc.Snowflake` is given then only the roles provided will be mentioned, provided those roles are in the message content.\"\nmsgstr \"メンションできるロールをコントロールします。 ``True`` （デフォルト）の場合ロールはメッセージ内容によってメンションされます。 ``False`` の場合ロールは一切メンションされません。 :class:`abc.Snowflake` のリストが与えられた場合、与えられたロールがメッセージ内容に存在する場合に、そのロールのみメンションされます。\"\n\n#: ../../../discord/mentions.py:docstring of discord.mentions.AllowedMentions:35\nmsgid \"Whether to mention the author of the message being replied to. Defaults to ``True``.\"\nmsgstr \"返信先のメッセージの作成者をメンションするかどうか。デフォルトは ``True`` です。\"\n\n#: ../../../discord/mentions.py:docstring of discord.mentions.AllowedMentions.all:1\nmsgid \"A factory method that returns a :class:`AllowedMentions` with all fields explicitly set to ``True``\"\nmsgstr \"すべてのフィールドが ``True`` に明示的に設定された :class:`AllowedMentions` を返すファクトリメソッド。\"\n\n#: ../../../discord/mentions.py:docstring of discord.mentions.AllowedMentions.none:1\nmsgid \"A factory method that returns a :class:`AllowedMentions` with all fields set to ``False``\"\nmsgstr \"すべてのフィールドが ``False`` に設定された :class:`AllowedMentions` を返すファクトリメソッド。\"\n\n#: ../../api.rst:5032\nmsgid \"MessageReference\"\nmsgstr \"MessageReference\"\n\n#: ../../../discord/message.py:docstring of discord.message.MessageReference:1\nmsgid \"Represents a reference to a :class:`~discord.Message`.\"\nmsgstr \":class:`~discord.Message` への参照を表します。\"\n\n#: ../../../discord/message.py:docstring of discord.message.MessageReference:5\nmsgid \"This class can now be constructed by users.\"\nmsgstr \"このクラスはユーザーによって作成できるようになりました。\"\n\n#: ../../../discord/message.py:docstring of discord.message.MessageReference:10\nmsgid \"The id of the message referenced.\"\nmsgstr \"参照されているメッセージのID。\"\n\n#: ../../../discord/message.py:docstring of discord.message.MessageReference:16\nmsgid \"The channel id of the message referenced.\"\nmsgstr \"参照されているメッセージのチャンネルID。\"\n\n#: ../../../discord/message.py:docstring of discord.message.MessageReference:22\nmsgid \"The guild id of the message referenced.\"\nmsgstr \"参照されているメッセージのギルドID。\"\n\n#: ../../../discord/message.py:docstring of discord.message.MessageReference:28\n#: ../../../discord/message.py:docstring of discord.message.MessageReference.from_message:7\nmsgid \"Whether replying to the referenced message should raise :class:`HTTPException` if the message no longer exists or Discord could not fetch the message.\"\nmsgstr \"参照されたメッセージに返信するとき、メッセージが存在しなくなった場合、またはDiscordがメッセージを取得できなかった場合、 :class:`HTTPException` を送出させるかどうか。\"\n\n#: ../../../discord/message.py:docstring of discord.message.MessageReference:37\nmsgid \"The message that this reference resolved to. If this is ``None`` then the original message was not fetched either due to the Discord API not attempting to resolve it or it not being available at the time of creation. If the message was resolved at a prior point but has since been deleted then this will be of type :class:`DeletedReferencedMessage`.\"\nmsgstr \"この参照が解決したメッセージ。 ``None`` の場合、Discord APIが解決しようとしていないか、作成時に利用できないため、元のメッセージは取得されませんでした。 メッセージが以前の時点で解決されていて削除されている場合は、 :class:`DeletedReferencedMessage` になります。\"\n\n#: ../../../discord/message.py:docstring of discord.message.MessageReference:43\nmsgid \"Currently, this is mainly the replied to message when a user replies to a message.\"\nmsgstr \"現在、これは主にユーザーがメッセージに返信したときの返信元メッセージです。\"\n\n#: ../../../discord/message.py:docstring of discord.message.MessageReference:47\nmsgid \"Optional[Union[:class:`Message`, :class:`DeletedReferencedMessage`]]\"\nmsgstr \"Optional[Union[:class:`Message`, :class:`DeletedReferencedMessage`]]\"\n\n#: ../../../discord/message.py:docstring of discord.message.MessageReference.from_message:1\nmsgid \"Creates a :class:`MessageReference` from an existing :class:`~discord.Message`.\"\nmsgstr \"既存の :class:`~discord.Message` から :class:`MessageReference` を作成します。\"\n\n#: ../../../discord/message.py:docstring of discord.message.MessageReference.from_message:5\nmsgid \"The message to be converted into a reference.\"\nmsgstr \"参照に変換されるメッセージ。\"\n\n#: ../../../discord/message.py:docstring of discord.message.MessageReference.from_message:13\nmsgid \"A reference to the message.\"\nmsgstr \"メッセージへの参照。\"\n\n#: ../../../discord/message.py:docstring of discord.message.MessageReference.from_message:14\nmsgid \":class:`MessageReference`\"\nmsgstr \":class:`MessageReference`\"\n\n#: ../../../discord/message.py:docstring of discord.MessageReference.cached_message:3\nmsgid \"Optional[:class:`~discord.Message`]\"\nmsgstr \"Optional[:class:`~discord.Message`]\"\n\n#: ../../../discord/message.py:docstring of discord.MessageReference.jump_url:1\nmsgid \"Returns a URL that allows the client to jump to the referenced message.\"\nmsgstr \"クライアントが参照されたメッセージにジャンプすることのできるURLを返します。\"\n\n#: ../../api.rst:5040\nmsgid \"PartialMessage\"\nmsgstr \"PartialMessage\"\n\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage:1\nmsgid \"Represents a partial message to aid with working messages when only a message and channel ID are present.\"\nmsgstr \"チャンネルIDとメッセージIDのみ存在する場合にメッセージとの作業を簡単にする部分的なメッセージを表します。\"\n\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage:4\nmsgid \"There are two ways to construct this class. The first one is through the constructor itself, and the second is via the following:\"\nmsgstr \"このクラスを構築するには2つの方法があります。最初の方法はコンストラクタ自体で、もう一つの方法は以下によるものです：\"\n\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage:7\nmsgid \":meth:`TextChannel.get_partial_message`\"\nmsgstr \":meth:`TextChannel.get_partial_message`\"\n\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage:8\nmsgid \":meth:`VoiceChannel.get_partial_message`\"\nmsgstr \":meth:`VoiceChannel.get_partial_message`\"\n\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage:9\nmsgid \":meth:`StageChannel.get_partial_message`\"\nmsgstr \":meth:`StageChannel.get_partial_message`\"\n\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage:10\nmsgid \":meth:`Thread.get_partial_message`\"\nmsgstr \":meth:`Thread.get_partial_message`\"\n\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage:11\nmsgid \":meth:`DMChannel.get_partial_message`\"\nmsgstr \":meth:`DMChannel.get_partial_message`\"\n\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage:21\nmsgid \"Checks if two partial messages are equal.\"\nmsgstr \"二つの部分的なメッセージが等しいかを比較します。\"\n\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage:25\nmsgid \"Checks if two partial messages are not equal.\"\nmsgstr \"二つの部分的なメッセージが等しくないかを比較します。\"\n\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage:29\nmsgid \"Returns the partial message's hash.\"\nmsgstr \"部分的なメッセージのハッシュ値を返します。\"\n\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage:33\nmsgid \"The channel associated with this partial message.\"\nmsgstr \"この部分的なメッセージに関連付けられたチャンネル。\"\n\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage:35\nmsgid \"Union[:class:`PartialMessageable`, :class:`TextChannel`, :class:`StageChannel`, :class:`VoiceChannel`, :class:`Thread`, :class:`DMChannel`]\"\nmsgstr \"Union[:class:`PartialMessageable`, :class:`TextChannel`, :class:`StageChannel`, :class:`VoiceChannel`, :class:`Thread`, :class:`DMChannel`]\"\n\n#: ../../../discord/message.py:docstring of discord.message.PartialMessage:45\nmsgid \"The guild that the partial message belongs to, if applicable.\"\nmsgstr \"該当する場合、この部分的なメッセージが属するギルド。\"\n\n#: ../../../discord/message.py:docstring of discord.PartialMessage.created_at:1\nmsgid \"The partial message's creation time in UTC.\"\nmsgstr \"UTCの、部分的なメッセージが作成された時刻。\"\n\n#: ../../../discord/message.py:docstring of discord.PartialMessage.thread:5\nmsgid \"This does not retrieve archived threads, as they are not retained in the internal cache. Use :meth:`fetch_thread` instead.\"\nmsgstr \"\"\n\n#: ../../api.rst:5048\nmsgid \"MessageApplication\"\nmsgstr \"MessageApplication\"\n\n#: ../../../discord/message.py:docstring of discord.message.MessageApplication:1\nmsgid \"Represents a message's application data from a :class:`~discord.Message`.\"\nmsgstr \":class:`~discord.Message` のメッセージアプリケーションデータ。\"\n\n#: ../../../discord/message.py:docstring of discord.MessageApplication.icon:1\nmsgid \"The application's icon, if any.\"\nmsgstr \"存在する場合、アプリケーションのアイコン。\"\n\n#: ../../../discord/message.py:docstring of discord.MessageApplication.cover:1\nmsgid \"The application's cover image, if any.\"\nmsgstr \"存在する場合、アプリケーションのカバー画像。\"\n\n#: ../../api.rst:5056\nmsgid \"RoleSubscriptionInfo\"\nmsgstr \"RoleSubscriptionInfo\"\n\n#: ../../../discord/message.py:docstring of discord.message.RoleSubscriptionInfo:1\nmsgid \"Represents a message's role subscription information.\"\nmsgstr \"メッセージのロールサブスクリプション情報を表します。\"\n\n#: ../../../discord/message.py:docstring of discord.message.RoleSubscriptionInfo:3\nmsgid \"This is currently only attached to messages of type :attr:`MessageType.role_subscription_purchase`.\"\nmsgstr \"現在、 :attr:`MessageType.role_subscription_purchase` のメッセージでのみ利用されています。\"\n\n#: ../../../discord/message.py:docstring of discord.message.RoleSubscriptionInfo:9\nmsgid \"The ID of the SKU and listing that the user is subscribed to.\"\nmsgstr \"ユーザーが購読しているSKUとリスティングのID。\"\n\n#: ../../../discord/message.py:docstring of discord.message.RoleSubscriptionInfo:15\nmsgid \"The name of the tier that the user is subscribed to.\"\nmsgstr \"ユーザーが購読している階級の名前。\"\n\n#: ../../../discord/message.py:docstring of discord.message.RoleSubscriptionInfo:21\nmsgid \"The cumulative number of months that the user has been subscribed for.\"\nmsgstr \"ユーザーが購読している月数の合計。\"\n\n#: ../../../discord/message.py:docstring of discord.message.RoleSubscriptionInfo:27\nmsgid \"Whether this notification is for a renewal rather than a new purchase.\"\nmsgstr \"この通知が新しい購入ではなく、更新のためであるかどうか。\"\n\n#: ../../api.rst:5064\nmsgid \"Intents\"\nmsgstr \"Intents\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.Intents:1\nmsgid \"Wraps up a Discord gateway intent flag.\"\nmsgstr \"Discordゲートウェイのインテントフラグをまとめます。\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.Intents:3\nmsgid \"Similar to :class:`Permissions`\\\\, the properties provided are two way. You can set and retrieve individual bits using the properties as if they were regular bools.\"\nmsgstr \":class:`Permissions` と同様に、提供されるプロパティは双方向で利用できます。通常の真偽値であるかのように、 プロパティを使用し個々のビットを設定したり取得したりできます。\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.Intents:7\n#: ../../../discord/flags.py:docstring of discord.flags.MemberCacheFlags:12\n#: ../../../discord/flags.py:docstring of discord.flags.SystemChannelFlags:7\nmsgid \"To construct an object you can pass keyword arguments denoting the flags to enable or disable.\"\nmsgstr \"オブジェクトを構築するときに、フラグを表すキーワード引数を渡して有効または無効にすることができます。\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.Intents:10\nmsgid \"This is used to disable certain gateway features that are unnecessary to run your bot. To make use of this, it is passed to the ``intents`` keyword argument of :class:`Client`.\"\nmsgstr \"これは、ボットを実行するのに不要な特定のゲートウェイ機能を無効にするために使用されます。 これを利用するには、 :class:`Client` の ``intents`` キーワード引数に渡してください。\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.Intents:20\n#: ../../../discord/flags.py:docstring of discord.flags.MemberCacheFlags:23\n#: ../../../discord/flags.py:docstring of discord.flags.SystemChannelFlags:14\n#: ../../../discord/flags.py:docstring of discord.flags.MessageFlags:9\nmsgid \"Checks if two flags are equal.\"\nmsgstr \"二つのフラグが等しいかを比較します。\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.Intents:23\n#: ../../../discord/flags.py:docstring of discord.flags.MemberCacheFlags:26\n#: ../../../discord/flags.py:docstring of discord.flags.SystemChannelFlags:18\n#: ../../../discord/flags.py:docstring of discord.flags.MessageFlags:12\nmsgid \"Checks if two flags are not equal.\"\nmsgstr \"二つのフラグが等しいものではないか比較します。\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.Intents:27\nmsgid \"Returns an Intents instance with all enabled flags from both x and y.\"\nmsgstr \"x と y のどちらかにて有効化されたフラグを持つIntentsインスタンスを返します。\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.Intents:34\nmsgid \"Returns an Intents instance with only flags enabled on both x and y.\"\nmsgstr \"x と y の両方にて有効化されたフラグのみを持つIntentsインスタンスを返します。\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.Intents:41\nmsgid \"Returns an Intents instance with only flags enabled on only one of x or y, not on both.\"\nmsgstr \"x と y のいずれか一方のみにて有効化されたフラグのみを持つIntentsインスタンスを返します。\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.Intents:48\nmsgid \"Returns an Intents instance with all flags inverted from x.\"\nmsgstr \"x のすべてのフラグが反転したIntentsインスタンスを返します。\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.Intents:54\n#: ../../../discord/flags.py:docstring of discord.flags.MemberCacheFlags:57\n#: ../../../discord/flags.py:docstring of discord.flags.ApplicationFlags:41\n#: ../../../discord/flags.py:docstring of discord.flags.ChannelFlags:41\n#: ../../../discord/flags.py:docstring of discord.flags.AutoModPresets:45\nmsgid \"Return the flag's hash.\"\nmsgstr \"フラグのハッシュ値を返します。\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.Intents:57\n#: ../../../discord/flags.py:docstring of discord.flags.MemberCacheFlags:60\n#: ../../../discord/flags.py:docstring of discord.flags.SystemChannelFlags:53\n#: ../../../discord/flags.py:docstring of discord.flags.MessageFlags:46\nmsgid \"Returns an iterator of ``(name, value)`` pairs. This allows it to be, for example, constructed as a dict or a list of pairs.\"\nmsgstr \"``(name, value)`` ペアのイテレータを返します。これにより、例えば、辞書型やペアのリストに変換できます。\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.Intents:62\nmsgid \"Returns whether any intent is enabled.\"\nmsgstr \"何らかのインテントが有効かどうかを返します。\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.Intents:68\n#: ../../../discord/flags.py:docstring of discord.flags.MemberCacheFlags:71\n#: ../../../discord/flags.py:docstring of discord.flags.ApplicationFlags:56\n#: ../../../discord/flags.py:docstring of discord.flags.ChannelFlags:56\n#: ../../../discord/flags.py:docstring of discord.flags.AutoModPresets:58\nmsgid \"The raw value. You should query flags via the properties rather than using this raw value.\"\nmsgstr \"生の値。この値を使用するのではなく、プロパティ経由でフラグを取得すべきです。\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.Intents.all:1\nmsgid \"A factory method that creates a :class:`Intents` with everything enabled.\"\nmsgstr \"すべて有効化された :class:`Intents` を作成するファクトリメソッド。\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.Intents.none:1\nmsgid \"A factory method that creates a :class:`Intents` with everything disabled.\"\nmsgstr \"すべて無効化された :class:`Intents` を作成するファクトリメソッド。\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.Intents.default:1\nmsgid \"A factory method that creates a :class:`Intents` with everything enabled except :attr:`presences`, :attr:`members`, and :attr:`message_content`.\"\nmsgstr \":attr:`presences` 、 :attr:`members` 、 :attr:`message_content` 以外の全てのインテントを有効にした :class:`Intents` を作成するファクトリメソッド。\"\n\n#: ../../docstring of discord.Intents.guilds:1\nmsgid \"Whether guild related events are enabled.\"\nmsgstr \"ギルド関連イベントが有効かどうか。\"\n\n#: ../../docstring of discord.Intents.guilds:3\n#: ../../docstring of discord.Intents.members:3\n#: ../../docstring of discord.Intents.moderation:3\n#: ../../docstring of discord.Intents.emojis_and_stickers:5\n#: ../../docstring of discord.Intents.integrations:3\nmsgid \"This corresponds to the following events:\"\nmsgstr \"以下のイベントに対応します：\"\n\n#: ../../docstring of discord.Intents.guilds:5\nmsgid \":func:`on_guild_join`\"\nmsgstr \":func:`on_guild_join`\"\n\n#: ../../docstring of discord.Intents.guilds:6\nmsgid \":func:`on_guild_remove`\"\nmsgstr \":func:`on_guild_remove`\"\n\n#: ../../docstring of discord.Intents.guilds:7\nmsgid \":func:`on_guild_available`\"\nmsgstr \":func:`on_guild_available`\"\n\n#: ../../docstring of discord.Intents.guilds:8\nmsgid \":func:`on_guild_unavailable`\"\nmsgstr \":func:`on_guild_unavailable`\"\n\n#: ../../docstring of discord.Intents.guilds:9\nmsgid \":func:`on_guild_channel_update`\"\nmsgstr \":func:`on_guild_channel_update`\"\n\n#: ../../docstring of discord.Intents.guilds:10\nmsgid \":func:`on_guild_channel_create`\"\nmsgstr \":func:`on_guild_channel_create`\"\n\n#: ../../docstring of discord.Intents.guilds:11\nmsgid \":func:`on_guild_channel_delete`\"\nmsgstr \":func:`on_guild_channel_delete`\"\n\n#: ../../docstring of discord.Intents.guilds:12\nmsgid \":func:`on_guild_channel_pins_update`\"\nmsgstr \":func:`on_guild_channel_pins_update`\"\n\n#: ../../docstring of discord.Intents.guilds:13\nmsgid \":func:`on_thread_create`\"\nmsgstr \":func:`on_thread_create`\"\n\n#: ../../docstring of discord.Intents.guilds:14\nmsgid \":func:`on_thread_join`\"\nmsgstr \":func:`on_thread_join`\"\n\n#: ../../docstring of discord.Intents.guilds:15\nmsgid \":func:`on_thread_update`\"\nmsgstr \":func:`on_thread_update`\"\n\n#: ../../docstring of discord.Intents.guilds:16\nmsgid \":func:`on_thread_delete`\"\nmsgstr \":func:`on_thread_delete`\"\n\n#: ../../docstring of discord.Intents.guilds:18\n#: ../../docstring of discord.Intents.members:12\n#: ../../docstring of discord.Intents.emojis_and_stickers:10\n#: ../../docstring of discord.Intents.voice_states:7\n#: ../../docstring of discord.Intents.presences:7\nmsgid \"This also corresponds to the following attributes and classes in terms of cache:\"\nmsgstr \"これはキャッシュの点で次の属性とクラスにも対応します：\"\n\n#: ../../docstring of discord.Intents.guilds:20\nmsgid \":attr:`Client.guilds`\"\nmsgstr \":attr:`Client.guilds`\"\n\n#: ../../docstring of discord.Intents.guilds:21\nmsgid \":class:`Guild` and all its attributes.\"\nmsgstr \":class:`Guild` とそのすべての属性\"\n\n#: ../../docstring of discord.Intents.guilds:22\nmsgid \":meth:`Client.get_channel`\"\nmsgstr \":meth:`Client.get_channel`\"\n\n#: ../../docstring of discord.Intents.guilds:23\nmsgid \":meth:`Client.get_all_channels`\"\nmsgstr \":meth:`Client.get_all_channels`\"\n\n#: ../../docstring of discord.Intents.guilds:25\nmsgid \"It is highly advisable to leave this intent enabled for your bot to function.\"\nmsgstr \"ボットの動作のためにこのインテントを有効化しておくことを強く推奨します。\"\n\n#: ../../docstring of discord.Intents.members:1\nmsgid \"Whether guild member related events are enabled.\"\nmsgstr \"ギルドメンバー関連イベントが有効になっているかどうか。\"\n\n#: ../../docstring of discord.Intents.members:5\nmsgid \":func:`on_member_join`\"\nmsgstr \":func:`on_member_join`\"\n\n#: ../../docstring of discord.Intents.members:6\nmsgid \":func:`on_member_remove`\"\nmsgstr \":func:`on_member_remove`\"\n\n#: ../../docstring of discord.Intents.members:7\nmsgid \":func:`on_member_update`\"\nmsgstr \":func:`on_member_update`\"\n\n#: ../../docstring of discord.Intents.members:8\nmsgid \":func:`on_user_update`\"\nmsgstr \":func:`on_user_update`\"\n\n#: ../../docstring of discord.Intents.members:9\nmsgid \":func:`on_thread_member_join`\"\nmsgstr \":func:`on_thread_member_join`\"\n\n#: ../../docstring of discord.Intents.members:10\nmsgid \":func:`on_thread_member_remove`\"\nmsgstr \":func:`on_thread_member_remove`\"\n\n#: ../../docstring of discord.Intents.members:14\nmsgid \":meth:`Client.get_all_members`\"\nmsgstr \":meth:`Client.get_all_members`\"\n\n#: ../../docstring of discord.Intents.members:15\nmsgid \":meth:`Client.get_user`\"\nmsgstr \":meth:`Client.get_user`\"\n\n#: ../../docstring of discord.Intents.members:16\nmsgid \":meth:`Guild.chunk`\"\nmsgstr \":meth:`Guild.chunk`\"\n\n#: ../../docstring of discord.Intents.members:17\nmsgid \":meth:`Guild.fetch_members`\"\nmsgstr \":meth:`Guild.fetch_members`\"\n\n#: ../../docstring of discord.Intents.members:18\nmsgid \":meth:`Guild.get_member`\"\nmsgstr \":meth:`Guild.get_member`\"\n\n#: ../../docstring of discord.Intents.members:19\nmsgid \":attr:`Guild.members`\"\nmsgstr \":attr:`Guild.members`\"\n\n#: ../../docstring of discord.Intents.members:20\nmsgid \":attr:`Member.roles`\"\nmsgstr \":attr:`Member.roles`\"\n\n#: ../../docstring of discord.Intents.members:21\nmsgid \":attr:`Member.nick`\"\nmsgstr \":attr:`Member.nick`\"\n\n#: ../../docstring of discord.Intents.members:22\nmsgid \":attr:`Member.premium_since`\"\nmsgstr \":attr:`Member.premium_since`\"\n\n#: ../../docstring of discord.Intents.members:23\nmsgid \":attr:`User.name`\"\nmsgstr \":attr:`User.name`\"\n\n#: ../../docstring of discord.Intents.members:24\nmsgid \":attr:`User.avatar`\"\nmsgstr \":attr:`User.avatar`\"\n\n#: ../../docstring of discord.Intents.members:25\nmsgid \":attr:`User.discriminator`\"\nmsgstr \":attr:`User.discriminator`\"\n\n#: ../../docstring of discord.Intents.members:26\nmsgid \":attr:`User.global_name`\"\nmsgstr \":attr:`User.global_name`\"\n\n#: ../../docstring of discord.Intents.members:28\nmsgid \"For more information go to the :ref:`member intent documentation <need_members_intent>`.\"\nmsgstr \"詳細については、 :ref:`メンバーインテントの説明 <need_members_intent>` を参照してください。\"\n\n#: ../../docstring of discord.Intents.members:32\n#: ../../docstring of discord.Intents.presences:17\n#: ../../docstring of discord.Intents.message_content:19\nmsgid \"Currently, this requires opting in explicitly via the developer portal as well. Bots in over 100 guilds will need to apply to Discord for verification.\"\nmsgstr \"現在、開発者ポータルからも明示的にオプトインする必要があります。100を超えるギルドに属するボットは、認証のためにDiscordに申請する必要があります。\"\n\n#: ../../docstring of discord.Intents.moderation:1\nmsgid \"Whether guild moderation related events are enabled.\"\nmsgstr \"ギルドモデレーション関連イベントが有効になっているかどうか。\"\n\n#: ../../docstring of discord.Intents.moderation:5\nmsgid \":func:`on_member_ban`\"\nmsgstr \":func:`on_member_ban`\"\n\n#: ../../docstring of discord.Intents.moderation:6\nmsgid \":func:`on_member_unban`\"\nmsgstr \":func:`on_member_unban`\"\n\n#: ../../docstring of discord.Intents.moderation:7\nmsgid \":func:`on_audit_log_entry_create`\"\nmsgstr \":func:`on_audit_log_entry_create`\"\n\n#: ../../docstring of discord.Intents.moderation:9\n#: ../../docstring of discord.Intents.integrations:10\n#: ../../docstring of discord.Intents.webhooks:7\n#: ../../docstring of discord.Intents.invites:8\n#: ../../docstring of discord.Intents.typing:9\nmsgid \"This does not correspond to any attributes or classes in the library in terms of cache.\"\nmsgstr \"これは、キャッシュに関しては、ライブラリ内の属性やクラスには対応しません。\"\n\n#: ../../docstring of discord.Intents.bans:1\nmsgid \"An alias of :attr:`moderation`.\"\nmsgstr \":attr:`moderation` のエイリアス。\"\n\n#: ../../docstring of discord.Intents.bans:3\n#: ../../docstring of discord.Intents.emojis:3\nmsgid \"Changed to an alias.\"\nmsgstr \"エイリアスに変更されました。\"\n\n#: ../../docstring of discord.Intents.emojis:1\nmsgid \"Alias of :attr:`.emojis_and_stickers`.\"\nmsgstr \":attr:`.emojis_and_stickers` のエイリアス。\"\n\n#: ../../docstring of discord.Intents.emojis_and_stickers:1\nmsgid \"Whether guild emoji and sticker related events are enabled.\"\nmsgstr \"ギルドの絵文字とスタンプ関連イベントが有効になっているかどうか。\"\n\n#: ../../docstring of discord.Intents.emojis_and_stickers:7\nmsgid \":func:`on_guild_emojis_update`\"\nmsgstr \":func:`on_guild_emojis_update`\"\n\n#: ../../docstring of discord.Intents.emojis_and_stickers:8\nmsgid \":func:`on_guild_stickers_update`\"\nmsgstr \":func:`on_guild_stickers_update`\"\n\n#: ../../docstring of discord.Intents.emojis_and_stickers:14\nmsgid \":meth:`Client.get_emoji`\"\nmsgstr \":meth:`Client.get_emoji`\"\n\n#: ../../docstring of discord.Intents.emojis_and_stickers:15\nmsgid \":meth:`Client.get_sticker`\"\nmsgstr \":meth:`Client.get_sticker`\"\n\n#: ../../docstring of discord.Intents.emojis_and_stickers:16\nmsgid \":meth:`Client.emojis`\"\nmsgstr \":meth:`Client.emojis`\"\n\n#: ../../docstring of discord.Intents.emojis_and_stickers:17\nmsgid \":meth:`Client.stickers`\"\nmsgstr \":meth:`Client.stickers`\"\n\n#: ../../docstring of discord.Intents.emojis_and_stickers:18\nmsgid \":attr:`Guild.emojis`\"\nmsgstr \":attr:`Guild.emojis`\"\n\n#: ../../docstring of discord.Intents.emojis_and_stickers:19\nmsgid \":attr:`Guild.stickers`\"\nmsgstr \":attr:`Guild.stickers`\"\n\n#: ../../docstring of discord.Intents.integrations:1\nmsgid \"Whether guild integration related events are enabled.\"\nmsgstr \"ギルド連携サービス関連イベントが有効になっているかどうか。\"\n\n#: ../../docstring of discord.Intents.integrations:5\nmsgid \":func:`on_guild_integrations_update`\"\nmsgstr \":func:`on_guild_integrations_update`\"\n\n#: ../../docstring of discord.Intents.integrations:6\nmsgid \":func:`on_integration_create`\"\nmsgstr \":func:`on_integration_create`\"\n\n#: ../../docstring of discord.Intents.integrations:7\nmsgid \":func:`on_integration_update`\"\nmsgstr \":func:`on_integration_update`\"\n\n#: ../../docstring of discord.Intents.integrations:8\nmsgid \":func:`on_raw_integration_delete`\"\nmsgstr \":func:`on_raw_integration_delete`\"\n\n#: ../../docstring of discord.Intents.webhooks:1\nmsgid \"Whether guild webhook related events are enabled.\"\nmsgstr \"ギルドのWebhook関連イベントが有効かどうか。\"\n\n#: ../../docstring of discord.Intents.webhooks:5\nmsgid \":func:`on_webhooks_update`\"\nmsgstr \":func:`on_webhooks_update`\"\n\n#: ../../docstring of discord.Intents.invites:1\nmsgid \"Whether guild invite related events are enabled.\"\nmsgstr \"ギルド招待関連イベントが有効かどうか。\"\n\n#: ../../docstring of discord.Intents.invites:5\nmsgid \":func:`on_invite_create`\"\nmsgstr \":func:`on_invite_create`\"\n\n#: ../../docstring of discord.Intents.invites:6\nmsgid \":func:`on_invite_delete`\"\nmsgstr \":func:`on_invite_delete`\"\n\n#: ../../docstring of discord.Intents.voice_states:1\nmsgid \"Whether guild voice state related events are enabled.\"\nmsgstr \"ギルドのボイス状態関連イベントが有効かどうか。\"\n\n#: ../../docstring of discord.Intents.voice_states:5\nmsgid \":func:`on_voice_state_update`\"\nmsgstr \":func:`on_voice_state_update`\"\n\n#: ../../docstring of discord.Intents.voice_states:9\nmsgid \":attr:`VoiceChannel.members`\"\nmsgstr \":attr:`VoiceChannel.members`\"\n\n#: ../../docstring of discord.Intents.voice_states:10\nmsgid \":attr:`VoiceChannel.voice_states`\"\nmsgstr \":attr:`VoiceChannel.voice_states`\"\n\n#: ../../docstring of discord.Intents.voice_states:11\nmsgid \":attr:`Member.voice`\"\nmsgstr \":attr:`Member.voice`\"\n\n#: ../../docstring of discord.Intents.voice_states:15\nmsgid \"This intent is required to connect to voice.\"\nmsgstr \"ボイスに接続するには、このインテントが必要です。\"\n\n#: ../../docstring of discord.Intents.presences:1\nmsgid \"Whether guild presence related events are enabled.\"\nmsgstr \"ギルドプレゼンス関連イベントが有効になっているかどうか。\"\n\n#: ../../docstring of discord.Intents.presences:5\nmsgid \":func:`on_presence_update`\"\nmsgstr \":func:`on_presence_update`\"\n\n#: ../../docstring of discord.Intents.presences:9\nmsgid \":attr:`Member.activities`\"\nmsgstr \":attr:`Member.activities`\"\n\n#: ../../docstring of discord.Intents.presences:10\nmsgid \":attr:`Member.status`\"\nmsgstr \":attr:`Member.status`\"\n\n#: ../../docstring of discord.Intents.presences:11\nmsgid \":attr:`Member.raw_status`\"\nmsgstr \":attr:`Member.raw_status`\"\n\n#: ../../docstring of discord.Intents.presences:13\nmsgid \"For more information go to the :ref:`presence intent documentation <need_presence_intent>`.\"\nmsgstr \"詳細については、 :ref:`プレゼンスインテントの説明 <need_presence_intent>` を参照してください。\"\n\n#: ../../docstring of discord.Intents.messages:1\nmsgid \"Whether guild and direct message related events are enabled.\"\nmsgstr \"ギルドとダイレクトメッセージ関連イベントが有効になっているかどうか。\"\n\n#: ../../docstring of discord.Intents.messages:3\nmsgid \"This is a shortcut to set or get both :attr:`guild_messages` and :attr:`dm_messages`.\"\nmsgstr \":attr:`guild_messages` と :attr:`dm_messages` の両方を設定または取得するためのショートカットです。\"\n\n#: ../../docstring of discord.Intents.messages:7\nmsgid \":func:`on_message` (both guilds and DMs)\"\nmsgstr \":func:`on_message` (ギルドとDMの両方)\"\n\n#: ../../docstring of discord.Intents.messages:8\nmsgid \":func:`on_message_edit` (both guilds and DMs)\"\nmsgstr \":func:`on_message_edit` (ギルドとDMの両方)\"\n\n#: ../../docstring of discord.Intents.messages:9\nmsgid \":func:`on_message_delete` (both guilds and DMs)\"\nmsgstr \":func:`on_message_delete` (ギルドとDMの両方)\"\n\n#: ../../docstring of discord.Intents.messages:10\nmsgid \":func:`on_raw_message_delete` (both guilds and DMs)\"\nmsgstr \":func:`on_raw_message_delete` (ギルドとDMの両方)\"\n\n#: ../../docstring of discord.Intents.messages:11\nmsgid \":func:`on_raw_message_edit` (both guilds and DMs)\"\nmsgstr \":func:`on_raw_message_edit` (ギルドとDMの両方)\"\n\n#: ../../docstring of discord.Intents.messages:16\nmsgid \":attr:`Client.cached_messages`\"\nmsgstr \":attr:`Client.cached_messages`\"\n\n#: ../../docstring of discord.Intents.messages:18\n#: ../../docstring of discord.Intents.guild_messages:18\n#: ../../docstring of discord.Intents.dm_messages:18\nmsgid \"Note that due to an implicit relationship this also corresponds to the following events:\"\nmsgstr \"暗黙の関係により、これは次のイベントにも対応することに注意してください：\"\n\n#: ../../docstring of discord.Intents.messages:20\n#: ../../docstring of discord.Intents.reactions:7\nmsgid \":func:`on_reaction_add` (both guilds and DMs)\"\nmsgstr \":func:`on_reaction_add` (ギルドとDMの両方)\"\n\n#: ../../docstring of discord.Intents.messages:21\n#: ../../docstring of discord.Intents.reactions:8\nmsgid \":func:`on_reaction_remove` (both guilds and DMs)\"\nmsgstr \":func:`on_reaction_remove` (ギルドとDMの両方)\"\n\n#: ../../docstring of discord.Intents.messages:22\n#: ../../docstring of discord.Intents.reactions:9\nmsgid \":func:`on_reaction_clear` (both guilds and DMs)\"\nmsgstr \":func:`on_reaction_clear` (ギルドとDMの両方)\"\n\n#: ../../docstring of discord.Intents.guild_messages:1\nmsgid \"Whether guild message related events are enabled.\"\nmsgstr \"ギルドメッセージ関連イベントが有効になっているかどうか。\"\n\n#: ../../docstring of discord.Intents.guild_messages:3\nmsgid \"See also :attr:`dm_messages` for DMs or :attr:`messages` for both.\"\nmsgstr \"DMの場合は :attr:`dm_messages` 、両方に対応する :attr:`messages` も参照してください。\"\n\n#: ../../docstring of discord.Intents.guild_messages:7\nmsgid \":func:`on_message` (only for guilds)\"\nmsgstr \":func:`on_message` (ギルドのみ)\"\n\n#: ../../docstring of discord.Intents.guild_messages:8\nmsgid \":func:`on_message_edit` (only for guilds)\"\nmsgstr \":func:`on_message_edit` (ギルドのみ)\"\n\n#: ../../docstring of discord.Intents.guild_messages:9\nmsgid \":func:`on_message_delete` (only for guilds)\"\nmsgstr \":func:`on_message_delete` (ギルドのみ)\"\n\n#: ../../docstring of discord.Intents.guild_messages:10\nmsgid \":func:`on_raw_message_delete` (only for guilds)\"\nmsgstr \":func:`on_raw_message_delete` (ギルドのみ)\"\n\n#: ../../docstring of discord.Intents.guild_messages:11\nmsgid \":func:`on_raw_message_edit` (only for guilds)\"\nmsgstr \":func:`on_raw_message_edit` (ギルドのみ)\"\n\n#: ../../docstring of discord.Intents.guild_messages:16\nmsgid \":attr:`Client.cached_messages` (only for guilds)\"\nmsgstr \":attr:`Client.cached_messages` (ギルドのみ)\"\n\n#: ../../docstring of discord.Intents.guild_messages:20\n#: ../../docstring of discord.Intents.guild_reactions:7\nmsgid \":func:`on_reaction_add` (only for guilds)\"\nmsgstr \":func:`on_reaction_add` (ギルドのみ)\"\n\n#: ../../docstring of discord.Intents.guild_messages:21\n#: ../../docstring of discord.Intents.guild_reactions:8\nmsgid \":func:`on_reaction_remove` (only for guilds)\"\nmsgstr \":func:`on_reaction_remove` (ギルドのみ)\"\n\n#: ../../docstring of discord.Intents.guild_messages:22\n#: ../../docstring of discord.Intents.guild_reactions:9\nmsgid \":func:`on_reaction_clear` (only for guilds)\"\nmsgstr \":func:`on_reaction_clear` (ギルドのみ)\"\n\n#: ../../docstring of discord.Intents.dm_messages:1\nmsgid \"Whether direct message related events are enabled.\"\nmsgstr \"ダイレクトメッセージ関連イベントが有効になっているかどうか。\"\n\n#: ../../docstring of discord.Intents.dm_messages:3\nmsgid \"See also :attr:`guild_messages` for guilds or :attr:`messages` for both.\"\nmsgstr \"ギルドの場合は :attr:`guild_messages` 、両方に対応する :attr:`messages` も参照してください。\"\n\n#: ../../docstring of discord.Intents.dm_messages:7\nmsgid \":func:`on_message` (only for DMs)\"\nmsgstr \":func:`on_message` (DMのみ)\"\n\n#: ../../docstring of discord.Intents.dm_messages:8\nmsgid \":func:`on_message_edit` (only for DMs)\"\nmsgstr \":func:`on_message_edit` (DMのみ)\"\n\n#: ../../docstring of discord.Intents.dm_messages:9\nmsgid \":func:`on_message_delete` (only for DMs)\"\nmsgstr \":func:`on_message_delete` (DMのみ)\"\n\n#: ../../docstring of discord.Intents.dm_messages:10\nmsgid \":func:`on_raw_message_delete` (only for DMs)\"\nmsgstr \":func:`on_raw_message_delete` (DMのみ)\"\n\n#: ../../docstring of discord.Intents.dm_messages:11\nmsgid \":func:`on_raw_message_edit` (only for DMs)\"\nmsgstr \":func:`on_raw_message_edit` (DMのみ)\"\n\n#: ../../docstring of discord.Intents.dm_messages:16\nmsgid \":attr:`Client.cached_messages` (only for DMs)\"\nmsgstr \":attr:`Client.cached_messages` (DMのみ)\"\n\n#: ../../docstring of discord.Intents.dm_messages:20\n#: ../../docstring of discord.Intents.dm_reactions:7\nmsgid \":func:`on_reaction_add` (only for DMs)\"\nmsgstr \":func:`on_reaction_add` (DMのみ)\"\n\n#: ../../docstring of discord.Intents.dm_messages:21\n#: ../../docstring of discord.Intents.dm_reactions:8\nmsgid \":func:`on_reaction_remove` (only for DMs)\"\nmsgstr \":func:`on_reaction_remove` (DMのみ)\"\n\n#: ../../docstring of discord.Intents.dm_messages:22\n#: ../../docstring of discord.Intents.dm_reactions:9\nmsgid \":func:`on_reaction_clear` (only for DMs)\"\nmsgstr \":func:`on_reaction_clear` (DMのみ)\"\n\n#: ../../docstring of discord.Intents.reactions:1\nmsgid \"Whether guild and direct message reaction related events are enabled.\"\nmsgstr \"ギルドとダイレクトメッセージのリアクション関連イベントが有効になっているかどうか。\"\n\n#: ../../docstring of discord.Intents.reactions:3\nmsgid \"This is a shortcut to set or get both :attr:`guild_reactions` and :attr:`dm_reactions`.\"\nmsgstr \":attr:`guild_reactions` と :attr:`dm_reactions` の両方を設定または取得するためのショートカットです。\"\n\n#: ../../docstring of discord.Intents.reactions:10\nmsgid \":func:`on_raw_reaction_add` (both guilds and DMs)\"\nmsgstr \":func:`on_raw_reaction_add` (ギルドとDMの両方)\"\n\n#: ../../docstring of discord.Intents.reactions:11\nmsgid \":func:`on_raw_reaction_remove` (both guilds and DMs)\"\nmsgstr \":func:`on_raw_reaction_remove` (ギルドとDMの両方)\"\n\n#: ../../docstring of discord.Intents.reactions:12\nmsgid \":func:`on_raw_reaction_clear` (both guilds and DMs)\"\nmsgstr \":func:`on_raw_reaction_clear` (ギルドとDMの両方)\"\n\n#: ../../docstring of discord.Intents.reactions:16\nmsgid \":attr:`Message.reactions` (both guild and DM messages)\"\nmsgstr \":attr:`Message.reactions` (ギルドとDMの両方のメッセージ)\"\n\n#: ../../docstring of discord.Intents.guild_reactions:1\nmsgid \"Whether guild message reaction related events are enabled.\"\nmsgstr \"ギルドメッセージのリアクション関連イベントが有効かどうか。\"\n\n#: ../../docstring of discord.Intents.guild_reactions:3\nmsgid \"See also :attr:`dm_reactions` for DMs or :attr:`reactions` for both.\"\nmsgstr \"DMの場合は :attr:`dm_reactions` 、両方に対応する :attr:`reactions` も参照してください。\"\n\n#: ../../docstring of discord.Intents.guild_reactions:10\nmsgid \":func:`on_raw_reaction_add` (only for guilds)\"\nmsgstr \":func:`on_raw_reaction_add` (ギルドのみ)\"\n\n#: ../../docstring of discord.Intents.guild_reactions:11\nmsgid \":func:`on_raw_reaction_remove` (only for guilds)\"\nmsgstr \":func:`on_raw_reaction_remove` (ギルドのみ)\"\n\n#: ../../docstring of discord.Intents.guild_reactions:12\nmsgid \":func:`on_raw_reaction_clear` (only for guilds)\"\nmsgstr \":func:`on_raw_reaction_clear` (ギルドのみ)\"\n\n#: ../../docstring of discord.Intents.guild_reactions:16\nmsgid \":attr:`Message.reactions` (only for guild messages)\"\nmsgstr \":attr:`Message.reactions` (ギルドメッセージのみ)\"\n\n#: ../../docstring of discord.Intents.dm_reactions:1\nmsgid \"Whether direct message reaction related events are enabled.\"\nmsgstr \"ダイレクトメッセージのリアクション関連イベントが有効かどうか。\"\n\n#: ../../docstring of discord.Intents.dm_reactions:3\nmsgid \"See also :attr:`guild_reactions` for guilds or :attr:`reactions` for both.\"\nmsgstr \"ギルドの場合は :attr:`guild_reactions` 、両方に対応する :attr:`reactions` も参照してください。\"\n\n#: ../../docstring of discord.Intents.dm_reactions:10\nmsgid \":func:`on_raw_reaction_add` (only for DMs)\"\nmsgstr \":func:`on_raw_reaction_add` (DMのみ)\"\n\n#: ../../docstring of discord.Intents.dm_reactions:11\nmsgid \":func:`on_raw_reaction_remove` (only for DMs)\"\nmsgstr \":func:`on_raw_reaction_remove` (DMのみ)\"\n\n#: ../../docstring of discord.Intents.dm_reactions:12\nmsgid \":func:`on_raw_reaction_clear` (only for DMs)\"\nmsgstr \":func:`on_raw_reaction_clear` (DMのみ)\"\n\n#: ../../docstring of discord.Intents.dm_reactions:16\nmsgid \":attr:`Message.reactions` (only for DM messages)\"\nmsgstr \":attr:`Message.reactions` (DMのメッセージのみ)\"\n\n#: ../../docstring of discord.Intents.typing:1\n#: ../../docstring of discord.Intents.guild_typing:1\n#: ../../docstring of discord.Intents.dm_typing:1\nmsgid \"Whether guild and direct message typing related events are enabled.\"\nmsgstr \"ギルドとダイレクトメッセージの入力関連イベントが有効になっているかどうか。\"\n\n#: ../../docstring of discord.Intents.typing:3\nmsgid \"This is a shortcut to set or get both :attr:`guild_typing` and :attr:`dm_typing`.\"\nmsgstr \":attr:`guild_typing` と :attr:`dm_typing` の両方を設定または取得するためのショートカットです。\"\n\n#: ../../docstring of discord.Intents.typing:7\nmsgid \":func:`on_typing` (both guilds and DMs)\"\nmsgstr \":func:`on_typing` (ギルドとDMの両方)\"\n\n#: ../../docstring of discord.Intents.guild_typing:3\nmsgid \"See also :attr:`dm_typing` for DMs or :attr:`typing` for both.\"\nmsgstr \"DMの場合は :attr:`dm_typing` 、両方に対応する :attr:`typing` も参照してください。\"\n\n#: ../../docstring of discord.Intents.guild_typing:7\nmsgid \":func:`on_typing` (only for guilds)\"\nmsgstr \":func:`on_typing` (ギルドのみ)\"\n\n#: ../../docstring of discord.Intents.dm_typing:3\nmsgid \"See also :attr:`guild_typing` for guilds or :attr:`typing` for both.\"\nmsgstr \"ギルドの場合は :attr:`guild_typing` 、両方に対応する :attr:`typing` も参照してください。\"\n\n#: ../../docstring of discord.Intents.dm_typing:7\nmsgid \":func:`on_typing` (only for DMs)\"\nmsgstr \":func:`on_typing` (DMのみ)\"\n\n#: ../../docstring of discord.Intents.message_content:1\nmsgid \"Whether message content, attachments, embeds and components will be available in messages which do not meet the following criteria:\"\nmsgstr \"メッセージの内容、添付ファイル、埋め込みおよびコンポーネントが次の基準をすべて満たしていないメッセージで利用できるかどうか：\"\n\n#: ../../docstring of discord.Intents.message_content:4\nmsgid \"The message was sent by the client\"\nmsgstr \"このクライアントにより送信されていないこと。\"\n\n#: ../../docstring of discord.Intents.message_content:5\nmsgid \"The message was sent in direct messages\"\nmsgstr \"メッセージがダイレクトメッセージで送信されていないこと。\"\n\n#: ../../docstring of discord.Intents.message_content:6\nmsgid \"The message mentions the client\"\nmsgstr \"メッセージがクライアントをメンションしないこと。\"\n\n#: ../../docstring of discord.Intents.message_content:8\nmsgid \"This applies to the following events:\"\nmsgstr \"以下のイベントに適用されます。\"\n\n#: ../../docstring of discord.Intents.message_content:10\nmsgid \":func:`on_message`\"\nmsgstr \":func:`on_message`\"\n\n#: ../../docstring of discord.Intents.message_content:11\nmsgid \":func:`on_message_edit`\"\nmsgstr \":func:`on_message_edit`\"\n\n#: ../../docstring of discord.Intents.message_content:12\nmsgid \":func:`on_message_delete`\"\nmsgstr \":func:`on_message_delete`\"\n\n#: ../../docstring of discord.Intents.message_content:13\nmsgid \":func:`on_raw_message_edit`\"\nmsgstr \":func:`on_raw_message_edit`\"\n\n#: ../../docstring of discord.Intents.message_content:15\nmsgid \"For more information go to the :ref:`message content intent documentation <need_message_content_intent>`.\"\nmsgstr \"詳細は :ref:`メッセージコンテンツインテントの説明 <need_message_content_intent>` を参照してください。\"\n\n#: ../../docstring of discord.Intents.guild_scheduled_events:1\nmsgid \"Whether guild scheduled event related events are enabled.\"\nmsgstr \"ギルドスケジュールイベント関連イベントが有効になっているかどうか。\"\n\n#: ../../docstring of discord.Intents.guild_scheduled_events:5\nmsgid \":func:`on_scheduled_event_create`\"\nmsgstr \":func:`on_scheduled_event_create`\"\n\n#: ../../docstring of discord.Intents.guild_scheduled_events:6\nmsgid \":func:`on_scheduled_event_update`\"\nmsgstr \":func:`on_scheduled_event_update`\"\n\n#: ../../docstring of discord.Intents.guild_scheduled_events:7\nmsgid \":func:`on_scheduled_event_delete`\"\nmsgstr \":func:`on_scheduled_event_delete`\"\n\n#: ../../docstring of discord.Intents.guild_scheduled_events:8\nmsgid \":func:`on_scheduled_event_user_add`\"\nmsgstr \":func:`on_scheduled_event_user_add`\"\n\n#: ../../docstring of discord.Intents.guild_scheduled_events:9\nmsgid \":func:`on_scheduled_event_user_remove`\"\nmsgstr \":func:`on_scheduled_event_user_remove`\"\n\n#: ../../docstring of discord.Intents.auto_moderation:1\nmsgid \"Whether auto moderation related events are enabled.\"\nmsgstr \"自動管理ルール関係のイベントが有効になっているかどうか。\"\n\n#: ../../docstring of discord.Intents.auto_moderation:3\nmsgid \"This is a shortcut to set or get both :attr:`auto_moderation_configuration` and :attr:`auto_moderation_execution`.\"\nmsgstr \"これは、 :attr:`auto_moderation_configuration` と :attr:`auto_moderation_execution` の両方を設定または取得するためのショートカットです。\"\n\n#: ../../docstring of discord.Intents.auto_moderation:8\n#: ../../docstring of discord.Intents.auto_moderation_configuration:5\nmsgid \":func:`on_automod_rule_create`\"\nmsgstr \":func:`on_automod_rule_create`\"\n\n#: ../../docstring of discord.Intents.auto_moderation:9\n#: ../../docstring of discord.Intents.auto_moderation_configuration:6\nmsgid \":func:`on_automod_rule_update`\"\nmsgstr \":func:`on_automod_rule_update`\"\n\n#: ../../docstring of discord.Intents.auto_moderation:10\n#: ../../docstring of discord.Intents.auto_moderation_configuration:7\nmsgid \":func:`on_automod_rule_delete`\"\nmsgstr \":func:`on_automod_rule_delete`\"\n\n#: ../../docstring of discord.Intents.auto_moderation:11\nmsgid \":func:`on_automod_action`\"\nmsgstr \":func:`on_automod_action`\"\n\n#: ../../docstring of discord.Intents.auto_moderation_configuration:1\nmsgid \"Whether auto moderation configuration related events are enabled.\"\nmsgstr \"自動管理ルール設定関係のイベントが有効になっているかどうか。\"\n\n#: ../../docstring of discord.Intents.auto_moderation_execution:1\nmsgid \"Whether auto moderation execution related events are enabled.\"\nmsgstr \"自動管理ルール対応関係のイベントが有効になっているかどうか。\"\n\n#: ../../docstring of discord.Intents.auto_moderation_execution:3\nmsgid \"This corresponds to the following events: - :func:`on_automod_action`\"\nmsgstr \"これは以下のイベントに対応します: - :func:`on_automod_action`\"\n\n#: ../../api.rst:5072\nmsgid \"MemberCacheFlags\"\nmsgstr \"MemberCacheFlags\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.MemberCacheFlags:1\nmsgid \"Controls the library's cache policy when it comes to members.\"\nmsgstr \"メンバーに関するライブラリのキャッシュポリシーを制御します。\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.MemberCacheFlags:3\nmsgid \"This allows for finer grained control over what members are cached. Note that the bot's own member is always cached. This class is passed to the ``member_cache_flags`` parameter in :class:`Client`.\"\nmsgstr \"これはキャッシュされたメンバーをより細かく制御することを可能にします。ボット自身のメンバーは常にキャッシュされることに注意してください。 このクラスは :class:`Client` の ``member_cache_flags`` パラメータに渡されます。\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.MemberCacheFlags:7\nmsgid \"Due to a quirk in how Discord works, in order to ensure proper cleanup of cache resources it is recommended to have :attr:`Intents.members` enabled. Otherwise the library cannot know when a member leaves a guild and is thus unable to cleanup after itself.\"\nmsgstr \"Discordがどのように動作するかの影響で、キャッシュリソースを適切にクリーンアップするために、 :attr:`Intents.members` を有効化することをお勧めします。そうでなければ、ライブラリはメンバーがいつギルドから脱退したのかを知ることができず、その後のクリーンアップができません。\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.MemberCacheFlags:15\nmsgid \"The default value is all flags enabled.\"\nmsgstr \"デフォルト値はすべて有効になっているフラグです。\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.MemberCacheFlags:30\nmsgid \"Returns a MemberCacheFlags instance with all enabled flags from both x and y.\"\nmsgstr \"x と y のどちらかにて有効化されたフラグを持つMemberCacheFlagsインスタンスを返します。\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.MemberCacheFlags:37\nmsgid \"Returns a MemberCacheFlags instance with only flags enabled on both x and y.\"\nmsgstr \"x と y の両方にて有効化されたフラグのみを持つMemberCacheFlagsインスタンスを返します。\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.MemberCacheFlags:44\nmsgid \"Returns a MemberCacheFlags instance with only flags enabled on only one of x or y, not on both.\"\nmsgstr \"x と y のいずれか一方のみにて有効化されたフラグのみを持つMemberCacheFlagsインスタンスを返します。\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.MemberCacheFlags:51\nmsgid \"Returns a MemberCacheFlags instance with all flags inverted from x.\"\nmsgstr \"x のすべてのフラグが反転したMemberCacheFlagsインスタンスを返します。\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.MemberCacheFlags:65\n#: ../../../discord/flags.py:docstring of discord.flags.ApplicationFlags:50\n#: ../../../discord/flags.py:docstring of discord.flags.ChannelFlags:50\n#: ../../../discord/flags.py:docstring of discord.flags.AutoModPresets:54\n#: ../../../discord/flags.py:docstring of discord.flags.SystemChannelFlags:58\nmsgid \"Returns whether any flag is set to ``True``.\"\nmsgstr \"何らかのフラグが ``True`` に設定されているかどうかを返します。\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.MemberCacheFlags.all:1\nmsgid \"A factory method that creates a :class:`MemberCacheFlags` with everything enabled.\"\nmsgstr \"すべて有効化された :class:`MemberCacheFlags` を作成するファクトリメソッド。\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.MemberCacheFlags.none:1\nmsgid \"A factory method that creates a :class:`MemberCacheFlags` with everything disabled.\"\nmsgstr \"すべて無効化された :class:`MemberCacheFlags` を作成するファクトリメソッド。\"\n\n#: ../../docstring of discord.MemberCacheFlags.voice:1\nmsgid \"Whether to cache members that are in voice.\"\nmsgstr \"ボイス内のメンバーをキャッシュするか。\"\n\n#: ../../docstring of discord.MemberCacheFlags.voice:3\nmsgid \"This requires :attr:`Intents.voice_states`.\"\nmsgstr \":attr:`Intents.voice_states` が必要です。\"\n\n#: ../../docstring of discord.MemberCacheFlags.voice:5\nmsgid \"Members that leave voice are no longer cached.\"\nmsgstr \"ボイスを退出したメンバーはキャッシュされません。\"\n\n#: ../../docstring of discord.MemberCacheFlags.joined:1\nmsgid \"Whether to cache members that joined the guild or are chunked as part of the initial log in flow.\"\nmsgstr \"ギルドに参加したメンバーや、最初のログインフローの一環としてチャンクされたメンバーをキャッシュするか。\"\n\n#: ../../docstring of discord.MemberCacheFlags.joined:4\nmsgid \"This requires :attr:`Intents.members`.\"\nmsgstr \":attr:`Intents.members` を有効にする必要があります。\"\n\n#: ../../docstring of discord.MemberCacheFlags.joined:6\nmsgid \"Members that leave the guild are no longer cached.\"\nmsgstr \"ギルドから脱退したメンバーはキャッシュされません。\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.MemberCacheFlags.from_intents:1\nmsgid \"A factory method that creates a :class:`MemberCacheFlags` based on the currently selected :class:`Intents`.\"\nmsgstr \"現在選択されている :class:`Intents` に基づいて :class:`MemberCacheFlags` を作成するファクトリメソッド。\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.MemberCacheFlags.from_intents:4\nmsgid \"The intents to select from.\"\nmsgstr \"選択するインテント。\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.MemberCacheFlags.from_intents:7\nmsgid \"The resulting member cache flags.\"\nmsgstr \"結果として生成されるメンバーキャッシュフラグ。\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.MemberCacheFlags.from_intents:8\nmsgid \":class:`MemberCacheFlags`\"\nmsgstr \":class:`MemberCacheFlags`\"\n\n#: ../../api.rst:5080\nmsgid \"ApplicationFlags\"\nmsgstr \"ApplicationFlags\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.ApplicationFlags:1\nmsgid \"Wraps up the Discord Application flags.\"\nmsgstr \"Discordアプリケーションのフラグをまとめます。\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.ApplicationFlags:7\nmsgid \"Checks if two ApplicationFlags are equal.\"\nmsgstr \"アプリケーションフラグが等しいか確認します。\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.ApplicationFlags:10\nmsgid \"Checks if two ApplicationFlags are not equal.\"\nmsgstr \"アプリケーションフラグが等しくないか確認します。\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.ApplicationFlags:14\nmsgid \"Returns an ApplicationFlags instance with all enabled flags from both x and y.\"\nmsgstr \"x と y のどちらかにて有効化されたフラグを持つApplicationFlagsインスタンスを返します。\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.ApplicationFlags:21\nmsgid \"Returns an ApplicationFlags instance with only flags enabled on both x and y.\"\nmsgstr \"x と y の両方にて有効化されたフラグのみを持つApplicationFlagsインスタンスを返します。\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.ApplicationFlags:28\nmsgid \"Returns an ApplicationFlags instance with only flags enabled on only one of x or y, not on both.\"\nmsgstr \"x と y のいずれか一方のみにて有効化されたフラグのみを持つApplicationFlagsインスタンスを返します。\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.ApplicationFlags:35\nmsgid \"Returns an ApplicationFlags instance with all flags inverted from x.\"\nmsgstr \"x のすべてのフラグが反転したApplicationFlagsインスタンスを返します。\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.ApplicationFlags:44\n#: ../../../discord/flags.py:docstring of discord.flags.ChannelFlags:44\n#: ../../../discord/flags.py:docstring of discord.flags.AutoModPresets:48\n#: ../../../discord/flags.py:docstring of discord.flags.PublicUserFlags:44\n#: ../../../discord/flags.py:docstring of discord.flags.MemberFlags:40\nmsgid \"Returns an iterator of ``(name, value)`` pairs. This allows it to be, for example, constructed as a dict or a list of pairs. Note that aliases are not shown.\"\nmsgstr \"``(name, value)`` ペアのイテレータを返します。これにより、例えば、辞書型やペアのリストに変換できます。エイリアスは含まれません。\"\n\n#: ../../docstring of discord.ApplicationFlags.auto_mod_badge:1\nmsgid \"Returns ``True`` if the application uses at least 100 automod rules across all guilds. This shows up as a badge in the official client.\"\nmsgstr \"アプリケーションがすべてのギルドを合算して少なくとも100の自動管理ルールを使用している場合 ``True`` を返します。これは公式クライアントにバッジとして表示されます。\"\n\n#: ../../docstring of discord.ApplicationFlags.gateway_presence:1\nmsgid \"Returns ``True`` if the application is verified and is allowed to receive presence information over the gateway.\"\nmsgstr \"アプリケーションが認証済みでプレゼンス情報をゲートウェイ経由で受け取ることができる場合に ``True`` を返します。\"\n\n#: ../../docstring of discord.ApplicationFlags.gateway_presence_limited:1\nmsgid \"Returns ``True`` if the application is allowed to receive limited presence information over the gateway.\"\nmsgstr \"アプリケーションが制限付きのプレゼンス情報をゲートウェイ経由で受け取ることができる場合に ``True`` を返します。\"\n\n#: ../../docstring of discord.ApplicationFlags.gateway_guild_members:1\nmsgid \"Returns ``True`` if the application is verified and is allowed to receive guild members information over the gateway.\"\nmsgstr \"アプリケーションが認証済みでギルドメンバー情報をゲートウェイ経由で受け取ることができる場合に ``True`` を返します。\"\n\n#: ../../docstring of discord.ApplicationFlags.gateway_guild_members_limited:1\nmsgid \"Returns ``True`` if the application is allowed to receive limited guild members information over the gateway.\"\nmsgstr \"アプリケーションが制限付きのギルドメンバー情報をゲートウェイ経由で受け取ることができる場合に ``True`` を返します。\"\n\n#: ../../docstring of discord.ApplicationFlags.verification_pending_guild_limit:1\nmsgid \"Returns ``True`` if the application is currently pending verification and has hit the guild limit.\"\nmsgstr \"アプリケーションが認証待ちでギルド制限に到達した場合に ``True`` を返します。\"\n\n#: ../../docstring of discord.ApplicationFlags.embedded:1\nmsgid \"Returns ``True`` if the application is embedded within the Discord client.\"\nmsgstr \"アプリケーションがDiscordクライアントに埋め込まれている場合に ``True`` を返します。\"\n\n#: ../../docstring of discord.ApplicationFlags.gateway_message_content:1\nmsgid \"Returns ``True`` if the application is verified and is allowed to read message content in guilds.\"\nmsgstr \"アプリケーションが認証済みでギルドのメッセージコンテンツを読むことができる場合に ``True`` を返します。\"\n\n#: ../../docstring of discord.ApplicationFlags.gateway_message_content_limited:1\nmsgid \"Returns ``True`` if the application is unverified and is allowed to read message content in guilds.\"\nmsgstr \"アプリケーションが認証されておらず、ギルドのメッセージコンテンツを読むことができる場合に ``True`` を返します。\"\n\n#: ../../docstring of discord.ApplicationFlags.app_commands_badge:1\nmsgid \"Returns ``True`` if the application has registered a global application command. This shows up as a badge in the official client.\"\nmsgstr \"アプリケーションがグローバルアプリケーションコマンドを登録している場合に ``True`` を返します。これは公式クライアントにバッジとして表示されます。\"\n\n#: ../../docstring of discord.ApplicationFlags.active:1\nmsgid \"Returns ``True`` if the application has had at least one global application command used in the last 30 days.\"\nmsgstr \"過去30日間で少なくとも1つのグローバルアプリケーションコマンドが使用されている場合に ``True`` を返します。\"\n\n#: ../../api.rst:5088\nmsgid \"ChannelFlags\"\nmsgstr \"ChannelFlags\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.ChannelFlags:1\nmsgid \"Wraps up the Discord :class:`~discord.abc.GuildChannel` or :class:`Thread` flags.\"\nmsgstr \"Discordの :class:`~discord.abc.GuildChannel` や :class:`Thread` のフラグをまとめます。\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.ChannelFlags:7\nmsgid \"Checks if two channel flags are equal.\"\nmsgstr \"二つのチャンネルフラグが等しいかを比較します。\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.ChannelFlags:10\nmsgid \"Checks if two channel flags are not equal.\"\nmsgstr \"二つのチャンネルフラグが等しいものではないか比較します。\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.ChannelFlags:14\nmsgid \"Returns a ChannelFlags instance with all enabled flags from both x and y.\"\nmsgstr \"x と y のどちらかにて有効化されたフラグを持つChannelFlagsインスタンスを返します。\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.ChannelFlags:21\nmsgid \"Returns a ChannelFlags instance with only flags enabled on both x and y.\"\nmsgstr \"x と y の両方にて有効化されたフラグのみを持つChannelFlagsインスタンスを返します。\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.ChannelFlags:28\nmsgid \"Returns a ChannelFlags instance with only flags enabled on only one of x or y, not on both.\"\nmsgstr \"x と y のいずれか一方のみにて有効化されたフラグのみを持つChannelFlagsインスタンスを返します。\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.ChannelFlags:35\nmsgid \"Returns a ChannelFlags instance with all flags inverted from x.\"\nmsgstr \"x のすべてのフラグが反転したChannelFlagsインスタンスを返します。\"\n\n#: ../../docstring of discord.ChannelFlags.pinned:1\nmsgid \"Returns ``True`` if the thread is pinned to the forum channel.\"\nmsgstr \"スレッドがフォーラムチャンネルにピン留めされている場合に ``True`` を返します。\"\n\n#: ../../docstring of discord.ChannelFlags.require_tag:1\nmsgid \"Returns ``True`` if a tag is required to be specified when creating a thread in a :class:`ForumChannel`.\"\nmsgstr \":class:`ForumChannel` でスレッドを作成する際にタグを指定する必要がある場合に ``True`` を返します。\"\n\n#: ../../docstring of discord.ChannelFlags.hide_media_download_options:1\nmsgid \"Returns ``True`` if the client hides embedded media download options in a :class:`ForumChannel`. Only available in media channels.\"\nmsgstr \"\"\n\n#: ../../api.rst:5096\nmsgid \"AutoModPresets\"\nmsgstr \"AutoModPresets\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.AutoModPresets:1\nmsgid \"Wraps up the Discord :class:`AutoModRule` presets.\"\nmsgstr \"Discordの :class:`AutoModRule` プリセットをまとめます。\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.AutoModPresets:10\nmsgid \"Checks if two AutoMod preset flags are equal.\"\nmsgstr \"二つの自動管理プリセットフラグが等しいかを比較します。\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.AutoModPresets:14\nmsgid \"Checks if two AutoMod preset flags are not equal.\"\nmsgstr \"二つの自動管理プリセットフラグが等しいものではないか比較します。\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.AutoModPresets:18\nmsgid \"Returns an AutoModPresets instance with all enabled flags from both x and y.\"\nmsgstr \"x と y のどちらかにて有効化されたフラグを持つAutoModPresetsインスタンスを返します。\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.AutoModPresets:25\nmsgid \"Returns an AutoModPresets instance with only flags enabled on both x and y.\"\nmsgstr \"x と y の両方にて有効化されたフラグのみを持つAutoModPresetsインスタンスを返します。\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.AutoModPresets:32\nmsgid \"Returns an AutoModPresets instance with only flags enabled on only one of x or y, not on both.\"\nmsgstr \"x と y のいずれか一方のみにて有効化されたフラグのみを持つAutoModPresetsインスタンスを返します。\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.AutoModPresets:39\nmsgid \"Returns an AutoModPresets instance with all flags inverted from x.\"\nmsgstr \"x のすべてのフラグが反転したAutoModPresetsインスタンスを返します。\"\n\n#: ../../docstring of discord.AutoModPresets.profanity:1\nmsgid \"Whether to use the preset profanity filter.\"\nmsgstr \"過度に卑猥な言葉のフィルタのプリセットを使用するかどうか。\"\n\n#: ../../docstring of discord.AutoModPresets.sexual_content:1\nmsgid \"Whether to use the preset sexual content filter.\"\nmsgstr \"性行為を連想させる描写のフィルタのプリセットを使用するかどうか。\"\n\n#: ../../docstring of discord.AutoModPresets.slurs:1\nmsgid \"Whether to use the preset slurs filter.\"\nmsgstr \"侮辱語、差別語のフィルタのプリセットを使用するかどうか。\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.AutoModPresets.all:1\nmsgid \"A factory method that creates a :class:`AutoModPresets` with everything enabled.\"\nmsgstr \"すべて有効化された :class:`AutoModPresets` を作成するファクトリメソッド。\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.AutoModPresets.none:1\nmsgid \"A factory method that creates a :class:`AutoModPresets` with everything disabled.\"\nmsgstr \"すべて無効化された :class:`AutoModPresets` を作成するファクトリメソッド。\"\n\n#: ../../api.rst:5104\nmsgid \"AutoModRuleAction\"\nmsgstr \"AutoModRuleAction\"\n\n#: ../../../discord/automod.py:docstring of discord.automod.AutoModRuleAction:1\nmsgid \"Represents an auto moderation's rule action.\"\nmsgstr \"自動管理ルールの対応を表します。\"\n\n#: ../../../discord/automod.py:docstring of discord.automod.AutoModRuleAction:4\nmsgid \"Only one of ``channel_id``, ``duration``, or ``custom_message`` can be used.\"\nmsgstr \"``channel_id`` 、 ``duration`` 、 ``custom_message`` のいずれか一つのみが使用できます。\"\n\n#: ../../../discord/automod.py:docstring of discord.automod.AutoModRuleAction:10\nmsgid \"The type of action to take. Defaults to :attr:`~AutoModRuleActionType.block_message`.\"\nmsgstr \"行う対応の種類。デフォルトは :attr:`~AutoModRuleActionType.block_message` です。\"\n\n#: ../../../discord/automod.py:docstring of discord.automod.AutoModRuleAction:13\nmsgid \":class:`AutoModRuleActionType`\"\nmsgstr \":class:`AutoModRuleActionType`\"\n\n#: ../../../discord/automod.py:docstring of discord.automod.AutoModRuleAction:17\nmsgid \"The ID of the channel or thread to send the alert message to, if any. Passing this sets :attr:`type` to :attr:`~AutoModRuleActionType.send_alert_message`.\"\nmsgstr \"該当する場合、アラートメッセージを送信するチャンネルまたはスレッドのID。これを渡すと、 :attr:`type` が :attr:`~AutoModRuleActionType.send_alert_message` に設定されます。\"\n\n#: ../../../discord/automod.py:docstring of discord.automod.AutoModRuleAction:24\nmsgid \"The duration of the timeout to apply, if any. Has a maximum of 28 days. Passing this sets :attr:`type` to :attr:`~AutoModRuleActionType.timeout`.\"\nmsgstr \"該当する場合、適用するタイムアウトの長さ。最大28日間です。これを渡すと、 :attr:`type` が :attr:`~AutoModRuleActionType.timeout` に設定されます。\"\n\n#: ../../../discord/automod.py:docstring of discord.automod.AutoModRuleAction:28\nmsgid \"Optional[:class:`datetime.timedelta`]\"\nmsgstr \"Optional[:class:`datetime.timedelta`]\"\n\n#: ../../../discord/automod.py:docstring of discord.automod.AutoModRuleAction:32\nmsgid \"A custom message which will be shown to a user when their message is blocked. Passing this sets :attr:`type` to :attr:`~AutoModRuleActionType.block_message`.\"\nmsgstr \"メッセージがブロックされたときに送信者に表示されるカスタムメッセージ。 :attr:`type` を :attr:`~AutoModRuleActionType.block_message` に設定します。\"\n\n#: ../../api.rst:5112\nmsgid \"AutoModTrigger\"\nmsgstr \"AutoModTrigger\"\n\n#: ../../../discord/automod.py:docstring of discord.automod.AutoModTrigger:1\nmsgid \"Represents a trigger for an auto moderation rule.\"\nmsgstr \"自動管理ルールの発動条件を表します。\"\n\n#: ../../../discord/automod.py:docstring of discord.automod.AutoModTrigger:3\nmsgid \"The following table illustrates relevant attributes for each :class:`AutoModRuleTriggerType`:\"\nmsgstr \"以下は、各 :class:`AutoModRuleTriggerType` に関連する属性を示す表です。\"\n\n#: ../../../discord/automod.py:docstring of discord.automod.AutoModTrigger:6\nmsgid \"Type\"\nmsgstr \"種類\"\n\n#: ../../../discord/automod.py:docstring of discord.automod.AutoModTrigger:6\nmsgid \"Attributes\"\nmsgstr \"属性\"\n\n#: ../../../discord/automod.py:docstring of discord.automod.AutoModTrigger:8\nmsgid \":attr:`AutoModRuleTriggerType.keyword`\"\nmsgstr \":attr:`AutoModRuleTriggerType.keyword`\"\n\n#: ../../../discord/automod.py:docstring of discord.automod.AutoModTrigger:8\n#: ../../../discord/automod.py:docstring of discord.automod.AutoModTrigger:18\nmsgid \":attr:`keyword_filter`, :attr:`regex_patterns`, :attr:`allow_list`\"\nmsgstr \":attr:`keyword_filter`, :attr:`regex_patterns`, :attr:`allow_list`\"\n\n#: ../../../discord/automod.py:docstring of discord.automod.AutoModTrigger:11\nmsgid \":attr:`AutoModRuleTriggerType.spam`\"\nmsgstr \":attr:`AutoModRuleTriggerType.spam`\"\n\n#: ../../../discord/automod.py:docstring of discord.automod.AutoModTrigger:13\nmsgid \":attr:`AutoModRuleTriggerType.keyword_preset`\"\nmsgstr \":attr:`AutoModRuleTriggerType.keyword_preset`\"\n\n#: ../../../discord/automod.py:docstring of discord.automod.AutoModTrigger:13\nmsgid \":attr:`presets`\\\\, :attr:`allow_list`\"\nmsgstr \":attr:`presets`\\\\, :attr:`allow_list`\"\n\n#: ../../../discord/automod.py:docstring of discord.automod.AutoModTrigger:15\nmsgid \":attr:`AutoModRuleTriggerType.mention_spam`\"\nmsgstr \":attr:`AutoModRuleTriggerType.mention_spam`\"\n\n#: ../../../discord/automod.py:docstring of discord.automod.AutoModTrigger:15\nmsgid \":attr:`mention_limit`, :attr:`mention_raid_protection`\"\nmsgstr \"\"\n\n#: ../../../discord/automod.py:docstring of discord.automod.AutoModTrigger:18\nmsgid \":attr:`AutoModRuleTriggerType.member_profile`\"\nmsgstr \"\"\n\n#: ../../../discord/automod.py:docstring of discord.automod.AutoModTrigger:26\nmsgid \"The type of trigger.\"\nmsgstr \"発動条件の種類。\"\n\n#: ../../../discord/automod.py:docstring of discord.automod.AutoModTrigger:32\nmsgid \"The list of strings that will trigger the filter. Maximum of 1000. Keywords can only be up to 60 characters in length.\"\nmsgstr \"\"\n\n#: ../../../discord/automod.py:docstring of discord.automod.AutoModTrigger:35\nmsgid \"This could be combined with :attr:`regex_patterns`.\"\nmsgstr \":attr:`regex_patterns` と組み合わせることができます。\"\n\n#: ../../../discord/automod.py:docstring of discord.automod.AutoModTrigger:41\nmsgid \"The regex pattern that will trigger the filter. The syntax is based off of `Rust's regex syntax <https://docs.rs/regex/latest/regex/#syntax>`_. Maximum of 10. Regex strings can only be up to 260 characters in length.\"\nmsgstr \"フィルタを発動させる正規表現パターン。構文は `Rust の正規表現構文 <https://docs.rs/regex/latest/regex/#syntax>`_ に基づいています。 最大 10 個まで。正規表現文字列は 260 文字までしか使用できません。\"\n\n#: ../../../discord/automod.py:docstring of discord.automod.AutoModTrigger:45\nmsgid \"This could be combined with :attr:`keyword_filter` and/or :attr:`allow_list`\"\nmsgstr \":attr:`keyword_filter` や :attr:`allow_list` と組み合わせることができます。\"\n\n#: ../../../discord/automod.py:docstring of discord.automod.AutoModTrigger:53\nmsgid \"The presets used with the preset keyword filter.\"\nmsgstr \"プリセットキーワードフィルタで使用されるプリセット。\"\n\n#: ../../../discord/automod.py:docstring of discord.automod.AutoModTrigger:55\nmsgid \":class:`AutoModPresets`\"\nmsgstr \":class:`AutoModPresets`\"\n\n#: ../../../discord/automod.py:docstring of discord.automod.AutoModTrigger:59\nmsgid \"The list of words that are exempt from the commonly flagged words. Maximum of 100. Keywords can only be up to 60 characters in length.\"\nmsgstr \"共通のキーワードフィルタの単語から除外される単語の一覧。最大100個まで。キーワードは各60文字以内です。\"\n\n#: ../../../discord/automod.py:docstring of discord.automod.AutoModTrigger:66\nmsgid \"The total number of user and role mentions a message can contain. Has a maximum of 50.\"\nmsgstr \"メッセージに含めることのできるユーザーとロールのメンションの合計数。最大で50個です。\"\n\n#: ../../../discord/automod.py:docstring of discord.automod.AutoModTrigger:73\nmsgid \"Whether mention raid protection is enabled or not.\"\nmsgstr \"\"\n\n#: ../../api.rst:5120\nmsgid \"File\"\nmsgstr \"File\"\n\n#: ../../../discord/file.py:docstring of discord.file.File:1\nmsgid \"A parameter object used for :meth:`abc.Messageable.send` for sending file objects.\"\nmsgstr \":meth:`abc.Messageable.send` にてファイルを送信するときに使用されるパラメータオブジェクト。\"\n\n#: ../../../discord/file.py:docstring of discord.file.File:6\nmsgid \"File objects are single use and are not meant to be reused in multiple :meth:`abc.Messageable.send`\\\\s.\"\nmsgstr \"ファイルオブジェクトは使い切りであり、複数の :meth:`abc.Messageable.send` 呼び出しで再利用することは意図していません。\"\n\n#: ../../../discord/file.py:docstring of discord.file.File:11\nmsgid \"A file-like object opened in binary mode and read mode or a filename representing a file in the hard drive to open.\"\nmsgstr \"バイナリモードで開かれたファイルライクオブジェクト、または開くハードドライブ内のファイルを表すファイル名。\"\n\n#: ../../../discord/file.py:docstring of discord.file.File:17\nmsgid \"If the file-like object passed is opened via ``open`` then the modes 'rb' should be used.\"\nmsgstr \"もしファイルライクオブジェクトが ``open`` で開かれた場合モード `rb` が使用されるべきです。\"\n\n#: ../../../discord/file.py:docstring of discord.file.File:20\nmsgid \"To pass binary data, consider usage of ``io.BytesIO``.\"\nmsgstr \"バイナリデータを渡すには、 ``io.BytesIO`` を使用してみてください。\"\n\n#: ../../../discord/file.py:docstring of discord.file.File:22\nmsgid \"Union[:class:`os.PathLike`, :class:`io.BufferedIOBase`]\"\nmsgstr \"Union[:class:`os.PathLike`, :class:`io.BufferedIOBase`]\"\n\n#: ../../../discord/file.py:docstring of discord.file.File:26\nmsgid \"Whether the attachment is a spoiler. If left unspecified, the :attr:`~File.filename` is used to determine if the file is a spoiler.\"\nmsgstr \"添付ファイルがスポイラーであるかどうか。指定されていない場合は、 :attr:`~File.filename` を使用してファイルがスポイラーであるかどうかを判断します。\"\n\n#: ../../../discord/file.py:docstring of discord.file.File:33\nmsgid \"The file description to display, currently only supported for images.\"\nmsgstr \"表示するファイルの説明。現在画像でのみサポートされています。\"\n\n#: ../../../discord/file.py:docstring of discord.File.filename:1\nmsgid \"The filename to display when uploading to Discord. If this is not given then it defaults to ``fp.name`` or if ``fp`` is a string then the ``filename`` will default to the string given.\"\nmsgstr \"Discordにアップロードするときに表示されるファイル名。指定されていない場合はデフォルトでは ``fp.name`` 、または ``fp`` が文字列の場合、 ``filename`` は与えられた文字列をデフォルトにします。\"\n\n#: ../../api.rst:5128\nmsgid \"Colour\"\nmsgstr \"Colour\"\n\n#: ../../../discord/colour.py:docstring of discord.colour.Colour:1\nmsgid \"Represents a Discord role colour. This class is similar to a (red, green, blue) :class:`tuple`.\"\nmsgstr \"Discordのロールの色を表します。このクラスは (赤、緑、青) の :class:`tuple` に似ています。\"\n\n#: ../../../discord/colour.py:docstring of discord.colour.Colour:4\nmsgid \"There is an alias for this called Color.\"\nmsgstr \"Colorという名前のエイリアスが存在します。\"\n\n#: ../../../discord/colour.py:docstring of discord.colour.Colour:10\nmsgid \"Checks if two colours are equal.\"\nmsgstr \"二つの色が等しいかを比較します。\"\n\n#: ../../../discord/colour.py:docstring of discord.colour.Colour:14\nmsgid \"Checks if two colours are not equal.\"\nmsgstr \"二つの色が等しいものではないか比較します。\"\n\n#: ../../../discord/colour.py:docstring of discord.colour.Colour:18\nmsgid \"Return the colour's hash.\"\nmsgstr \"色のハッシュ値を返します。\"\n\n#: ../../../discord/colour.py:docstring of discord.colour.Colour:22\nmsgid \"Returns the hex format for the colour.\"\nmsgstr \"色の16進数表記を返します。\"\n\n#: ../../../discord/colour.py:docstring of discord.colour.Colour:26\nmsgid \"Returns the raw colour value.\"\nmsgstr \"生の色の値を返します。\"\n\n#: ../../../discord/colour.py:docstring of discord.colour.Colour:30\nmsgid \"The colour values in the classmethods are mostly provided as-is and can change between versions should the Discord client's representation of that colour also change.\"\nmsgstr \"クラスメソッドの色はDiscordクライアントの色をほぼそのまま提供しているため、クライアントで使用する色が変更された場合、値がバージョン間で変更されることがあります。\"\n\n#: ../../../discord/colour.py:docstring of discord.colour.Colour:35\nmsgid \"The raw integer colour value.\"\nmsgstr \"生の色の整数値。\"\n\n#: ../../../discord/colour.py:docstring of discord.Colour.r:1\nmsgid \"Returns the red component of the colour.\"\nmsgstr \"色の赤の成分を返します。\"\n\n#: ../../../discord/colour.py:docstring of discord.Colour.g:1\nmsgid \"Returns the green component of the colour.\"\nmsgstr \"色の緑色の成分を返します。\"\n\n#: ../../../discord/colour.py:docstring of discord.Colour.b:1\nmsgid \"Returns the blue component of the colour.\"\nmsgstr \"色の青色の成分を返します。\"\n\n#: ../../../discord/colour.py:docstring of discord.colour.Colour.to_rgb:1\nmsgid \"Tuple[:class:`int`, :class:`int`, :class:`int`]: Returns an (r, g, b) tuple representing the colour.\"\nmsgstr \"Tuple[:class:`int`, :class:`int`, :class:`int`]: 色を表す (r, g, b) タプルを返します。\"\n\n#: ../../../discord/colour.py:docstring of discord.colour.Colour.from_rgb:1\nmsgid \"Constructs a :class:`Colour` from an RGB tuple.\"\nmsgstr \"RGB のタプルから :class:`Colour` を作成します。\"\n\n#: ../../../discord/colour.py:docstring of discord.colour.Colour.from_hsv:1\nmsgid \"Constructs a :class:`Colour` from an HSV tuple.\"\nmsgstr \"HSV のタプルから :class:`Colour` を作成します。\"\n\n#: ../../../discord/colour.py:docstring of discord.colour.Colour.from_str:1\nmsgid \"Constructs a :class:`Colour` from a string.\"\nmsgstr \"文字列から :class:`Colour` を作成します。\"\n\n#: ../../../discord/colour.py:docstring of discord.colour.Colour.from_str:3\nmsgid \"The following formats are accepted:\"\nmsgstr \"以下のフォーマットが利用可能です:\"\n\n#: ../../../discord/colour.py:docstring of discord.colour.Colour.from_str:5\nmsgid \"``0x<hex>``\"\nmsgstr \"``0x<hex>``\"\n\n#: ../../../discord/colour.py:docstring of discord.colour.Colour.from_str:6\nmsgid \"``#<hex>``\"\nmsgstr \"``#<hex>``\"\n\n#: ../../../discord/colour.py:docstring of discord.colour.Colour.from_str:7\nmsgid \"``0x#<hex>``\"\nmsgstr \"``0x#<hex>``\"\n\n#: ../../../discord/colour.py:docstring of discord.colour.Colour.from_str:8\nmsgid \"``rgb(<number>, <number>, <number>)``\"\nmsgstr \"``rgb(<数値>, <数値>, <数値>)``\"\n\n#: ../../../discord/colour.py:docstring of discord.colour.Colour.from_str:10\nmsgid \"Like CSS, ``<number>`` can be either 0-255 or 0-100% and ``<hex>`` can be either a 6 digit hex number or a 3 digit hex shortcut (e.g. #FFF).\"\nmsgstr \"CSSのように、 ``<number>`` は0-255か0-100%で指定でき、 ``<hex>`` は6桁の16進数表記か3桁のショートカット (例: #FFF)で指定できます。\"\n\n#: ../../../discord/colour.py:docstring of discord.colour.Colour.from_str:15\nmsgid \"The string could not be converted into a colour.\"\nmsgstr \"文字列を色に変換できなかった場合。\"\n\n#: ../../../discord/colour.py:docstring of discord.colour.Colour.default:1\nmsgid \"A factory method that returns a :class:`Colour` with a value of ``0``.\"\nmsgstr \"``0`` の値を持つ :class:`Colour` を返すクラスメソッドです。\"\n\n#: ../../../discord/colour.py:docstring of discord.colour.Colour.random:1\nmsgid \"A factory method that returns a :class:`Colour` with a random hue.\"\nmsgstr \"ランダムな色相を持つ :class:`Colour` を返すクラスメソッドです。\"\n\n#: ../../../discord/colour.py:docstring of discord.colour.Colour.random:5\nmsgid \"The random algorithm works by choosing a colour with a random hue but with maxed out saturation and value.\"\nmsgstr \"これは、色相をランダムに選び、彩度と明度を最大にした色を選びます。\"\n\n#: ../../../discord/colour.py:docstring of discord.colour.Colour.random:10\nmsgid \"The seed to initialize the RNG with. If ``None`` is passed the default RNG is used.\"\nmsgstr \"RNGを初期化するときのシード値。``None`` を渡した場合、デフォルトのRNGが使用されます。\"\n\n#: ../../../discord/colour.py:docstring of discord.colour.Colour.teal:1\nmsgid \"A factory method that returns a :class:`Colour` with a value of ``0x1ABC9C``.\"\nmsgstr \"``0x1ABC9C`` の値を持つ :class:`Colour` を返すクラスメソッドです。\"\n\n#: ../../../discord/colour.py:docstring of discord.colour.Colour.dark_teal:1\nmsgid \"A factory method that returns a :class:`Colour` with a value of ``0x11806A``.\"\nmsgstr \"``0x11806A`` の値を持つ :class:`Colour` を返すクラスメソッドです。\"\n\n#: ../../../discord/colour.py:docstring of discord.colour.Colour.brand_green:1\nmsgid \"A factory method that returns a :class:`Colour` with a value of ``0x57F287``.\"\nmsgstr \"``0x57F287`` の値を持つ :class:`Colour` を返すクラスメソッドです。\"\n\n#: ../../../discord/colour.py:docstring of discord.colour.Colour.green:1\nmsgid \"A factory method that returns a :class:`Colour` with a value of ``0x2ECC71``.\"\nmsgstr \"``0x2ECC71`` の値を持つ :class:`Colour` を返すクラスメソッドです。\"\n\n#: ../../../discord/colour.py:docstring of discord.colour.Colour.dark_green:1\nmsgid \"A factory method that returns a :class:`Colour` with a value of ``0x1F8B4C``.\"\nmsgstr \"``0x1F8B4C`` の値を持つ :class:`Colour` を返すクラスメソッドです。\"\n\n#: ../../../discord/colour.py:docstring of discord.colour.Colour.blue:1\nmsgid \"A factory method that returns a :class:`Colour` with a value of ``0x3498DB``.\"\nmsgstr \"``0x3498DB`` の値を持つ :class:`Colour` を返すクラスメソッドです。\"\n\n#: ../../../discord/colour.py:docstring of discord.colour.Colour.dark_blue:1\nmsgid \"A factory method that returns a :class:`Colour` with a value of ``0x206694``.\"\nmsgstr \"``0x206694`` の値を持つ :class:`Colour` を返すクラスメソッドです。\"\n\n#: ../../../discord/colour.py:docstring of discord.colour.Colour.purple:1\nmsgid \"A factory method that returns a :class:`Colour` with a value of ``0x9B59B6``.\"\nmsgstr \"``0x9B59B6`` の値を持つ :class:`Colour` を返すクラスメソッドです。\"\n\n#: ../../../discord/colour.py:docstring of discord.colour.Colour.dark_purple:1\nmsgid \"A factory method that returns a :class:`Colour` with a value of ``0x71368A``.\"\nmsgstr \"``0x71368A`` の値を持つ :class:`Colour` を返すクラスメソッドです。\"\n\n#: ../../../discord/colour.py:docstring of discord.colour.Colour.magenta:1\nmsgid \"A factory method that returns a :class:`Colour` with a value of ``0xE91E63``.\"\nmsgstr \"``0xE91E63`` の値を持つ :class:`Colour` を返すクラスメソッドです。\"\n\n#: ../../../discord/colour.py:docstring of discord.colour.Colour.dark_magenta:1\nmsgid \"A factory method that returns a :class:`Colour` with a value of ``0xAD1457``.\"\nmsgstr \"``0xAD1457`` の値を持つ :class:`Colour` を返すクラスメソッドです。\"\n\n#: ../../../discord/colour.py:docstring of discord.colour.Colour.gold:1\nmsgid \"A factory method that returns a :class:`Colour` with a value of ``0xF1C40F``.\"\nmsgstr \"``0xF1C40F`` の値を持つ :class:`Colour` を返すクラスメソッドです。\"\n\n#: ../../../discord/colour.py:docstring of discord.colour.Colour.dark_gold:1\nmsgid \"A factory method that returns a :class:`Colour` with a value of ``0xC27C0E``.\"\nmsgstr \"``0xC27C0E`` の値を持つ :class:`Colour` を返すクラスメソッドです。\"\n\n#: ../../../discord/colour.py:docstring of discord.colour.Colour.orange:1\nmsgid \"A factory method that returns a :class:`Colour` with a value of ``0xE67E22``.\"\nmsgstr \"``0xE67E22`` の値を持つ :class:`Colour` を返すクラスメソッドです。\"\n\n#: ../../../discord/colour.py:docstring of discord.colour.Colour.dark_orange:1\nmsgid \"A factory method that returns a :class:`Colour` with a value of ``0xA84300``.\"\nmsgstr \"``0xA84300`` の値を持つ :class:`Colour` を返すクラスメソッドです。\"\n\n#: ../../../discord/colour.py:docstring of discord.colour.Colour.brand_red:1\nmsgid \"A factory method that returns a :class:`Colour` with a value of ``0xED4245``.\"\nmsgstr \"``0xED4245`` の値を持つ :class:`Colour` を返すクラスメソッドです。\"\n\n#: ../../../discord/colour.py:docstring of discord.colour.Colour.red:1\nmsgid \"A factory method that returns a :class:`Colour` with a value of ``0xE74C3C``.\"\nmsgstr \"``0xE74C3C`` の値を持つ :class:`Colour` を返すクラスメソッドです。\"\n\n#: ../../../discord/colour.py:docstring of discord.colour.Colour.dark_red:1\nmsgid \"A factory method that returns a :class:`Colour` with a value of ``0x992D22``.\"\nmsgstr \"``0x992D22`` の値を持つ :class:`Colour` を返すクラスメソッドです。\"\n\n#: ../../../discord/colour.py:docstring of discord.colour.Colour.lighter_grey:1\n#: ../../../discord/colour.py:docstring of discord.colour.Colour.lighter_grey:1\nmsgid \"A factory method that returns a :class:`Colour` with a value of ``0x95A5A6``.\"\nmsgstr \"``0x95A5A6`` の値を持つ :class:`Colour` を返すクラスメソッドです。\"\n\n#: ../../../discord/colour.py:docstring of discord.colour.Colour.dark_grey:1\n#: ../../../discord/colour.py:docstring of discord.colour.Colour.dark_grey:1\nmsgid \"A factory method that returns a :class:`Colour` with a value of ``0x607d8b``.\"\nmsgstr \"``0x607d8b`` の値を持つ :class:`Colour` を返すクラスメソッドです。\"\n\n#: ../../../discord/colour.py:docstring of discord.colour.Colour.light_grey:1\n#: ../../../discord/colour.py:docstring of discord.colour.Colour.light_grey:1\nmsgid \"A factory method that returns a :class:`Colour` with a value of ``0x979C9F``.\"\nmsgstr \"``0x979C9F`` の値を持つ :class:`Colour` を返すクラスメソッドです。\"\n\n#: ../../../discord/colour.py:docstring of discord.colour.Colour.darker_grey:1\n#: ../../../discord/colour.py:docstring of discord.colour.Colour.darker_grey:1\nmsgid \"A factory method that returns a :class:`Colour` with a value of ``0x546E7A``.\"\nmsgstr \"``0x546E7A`` の値を持つ :class:`Colour` を返すクラスメソッドです。\"\n\n#: ../../../discord/colour.py:docstring of discord.colour.Colour.og_blurple:1\nmsgid \"A factory method that returns a :class:`Colour` with a value of ``0x7289DA``.\"\nmsgstr \"``0x7289DA`` の値を持つ :class:`Colour` を返すクラスメソッドです。\"\n\n#: ../../../discord/colour.py:docstring of discord.colour.Colour.blurple:1\nmsgid \"A factory method that returns a :class:`Colour` with a value of ``0x5865F2``.\"\nmsgstr \"``0x5865F2`` の値を持つ :class:`Colour` を返すクラスメソッドです。\"\n\n#: ../../../discord/colour.py:docstring of discord.colour.Colour.greyple:1\nmsgid \"A factory method that returns a :class:`Colour` with a value of ``0x99AAB5``.\"\nmsgstr \"``0x99AAB5`` の値を持つ :class:`Colour` を返すクラスメソッドです。\"\n\n#: ../../../discord/colour.py:docstring of discord.colour.Colour.dark_theme:1\nmsgid \"A factory method that returns a :class:`Colour` with a value of ``0x313338``.\"\nmsgstr \"``0x313338`` の値を持つ :class:`Colour` を返すクラスメソッドです。\"\n\n#: ../../../discord/colour.py:docstring of discord.colour.Colour.dark_theme:3\nmsgid \"This will appear transparent on Discord's dark theme.\"\nmsgstr \"これはDiscordのダークテーマでは透明に見えます。\"\n\n#: ../../../discord/colour.py:docstring of discord.colour.Colour.dark_theme:9\nmsgid \"Updated colour from previous ``0x36393F`` to reflect discord theme changes.\"\nmsgstr \"Discordテーマの変更を反映するため以前の ``0x36393F`` から色を変更しました。\"\n\n#: ../../../discord/colour.py:docstring of discord.colour.Colour.fuchsia:1\nmsgid \"A factory method that returns a :class:`Colour` with a value of ``0xEB459E``.\"\nmsgstr \"``0xEB459E`` の値を持つ :class:`Colour` を返すクラスメソッドです。\"\n\n#: ../../../discord/colour.py:docstring of discord.colour.Colour.yellow:1\nmsgid \"A factory method that returns a :class:`Colour` with a value of ``0xFEE75C``.\"\nmsgstr \"``0xFEE75C`` の値を持つ :class:`Colour` を返すクラスメソッドです。\"\n\n#: ../../../discord/colour.py:docstring of discord.colour.Colour.dark_embed:1\nmsgid \"A factory method that returns a :class:`Colour` with a value of ``0x2B2D31``.\"\nmsgstr \"``0x2B2D31`` の値を持つ :class:`Colour` を返すクラスメソッドです。\"\n\n#: ../../../discord/colour.py:docstring of discord.colour.Colour.light_embed:1\nmsgid \"A factory method that returns a :class:`Colour` with a value of ``0xEEEFF1``.\"\nmsgstr \"``0xEEEFF1`` の値を持つ :class:`Colour` を返すクラスメソッドです。\"\n\n#: ../../../discord/colour.py:docstring of discord.colour.Colour.pink:1\nmsgid \"A factory method that returns a :class:`Colour` with a value of ``0xEB459F``.\"\nmsgstr \"``0xEB459F`` の値を持つ :class:`Colour` を返すクラスメソッドです。\"\n\n#: ../../api.rst:5136\nmsgid \"BaseActivity\"\nmsgstr \"BaseActivity\"\n\n#: ../../../discord/activity.py:docstring of discord.activity.BaseActivity:1\nmsgid \"The base activity that all user-settable activities inherit from. A user-settable activity is one that can be used in :meth:`Client.change_presence`.\"\nmsgstr \"ユーザーが設定可能なアクティビティがすべて継承する基礎のアクティビティ。ユーザーが設定可能なアクティビティは、 :meth:`Client.change_presence` で使用できるものです。\"\n\n#: ../../../discord/activity.py:docstring of discord.activity.BaseActivity:4\nmsgid \"The following types currently count as user-settable:\"\nmsgstr \"現在以下がユーザーによって設定できます：\"\n\n#: ../../../discord/activity.py:docstring of discord.activity.BaseActivity:6\nmsgid \":class:`Activity`\"\nmsgstr \":class:`Activity`\"\n\n#: ../../../discord/activity.py:docstring of discord.activity.BaseActivity:7\n#: ../../../discord/activity.py:docstring of discord.activity.Activity:9\nmsgid \":class:`Game`\"\nmsgstr \":class:`Game`\"\n\n#: ../../../discord/activity.py:docstring of discord.activity.BaseActivity:8\n#: ../../../discord/activity.py:docstring of discord.activity.Activity:10\nmsgid \":class:`Streaming`\"\nmsgstr \":class:`Streaming`\"\n\n#: ../../../discord/activity.py:docstring of discord.activity.BaseActivity:9\nmsgid \":class:`CustomActivity`\"\nmsgstr \":class:`CustomActivity`\"\n\n#: ../../../discord/activity.py:docstring of discord.activity.BaseActivity:11\nmsgid \"Note that although these types are considered user-settable by the library, Discord typically ignores certain combinations of activity depending on what is currently set. This behaviour may change in the future so there are no guarantees on whether Discord will actually let you set these types.\"\nmsgstr \"なお、ライブラリはこれらをユーザー設定可能としますが、Discordは現在設定されているものによって特定のアクティビティの組み合わせを無視することがよくあります。この動作は将来変更される可能性があるため、こうしたタイプを実際に設定できるかの保証はありません。\"\n\n#: ../../../discord/activity.py:docstring of discord.BaseActivity.created_at:1\nmsgid \"When the user started doing this activity in UTC.\"\nmsgstr \"ユーザーがアクティビティを開始したときのUTC時刻。\"\n\n#: ../../api.rst:5144\nmsgid \"Activity\"\nmsgstr \"Activity\"\n\n#: ../../../discord/activity.py:docstring of discord.activity.Activity:1\nmsgid \"Represents an activity in Discord.\"\nmsgstr \"Discordでのアクティビティを表します。\"\n\n#: ../../../discord/activity.py:docstring of discord.activity.Activity:3\nmsgid \"This could be an activity such as streaming, playing, listening or watching.\"\nmsgstr \"これは、ストリーミング、再生、リスニング、視聴などのアクティビティであるかもしれません。\"\n\n#: ../../../discord/activity.py:docstring of discord.activity.Activity:6\nmsgid \"For memory optimisation purposes, some activities are offered in slimmed down versions:\"\nmsgstr \"メモリの最適化のために、いくつかのアクティビティは軽量化されたバージョンで提供されます：\"\n\n#: ../../../discord/activity.py:docstring of discord.activity.Activity:14\nmsgid \"The application ID of the game.\"\nmsgstr \"ゲームのアプリケーションID。\"\n\n#: ../../../discord/activity.py:docstring of discord.activity.Activity:20\nmsgid \"The name of the activity.\"\nmsgstr \"アクティビティの名前。\"\n\n#: ../../../discord/activity.py:docstring of discord.activity.Activity:26\nmsgid \"A stream URL that the activity could be doing.\"\nmsgstr \"アクティビティが実行中のストリームURL。\"\n\n#: ../../../discord/activity.py:docstring of discord.activity.Activity:32\nmsgid \"The type of activity currently being done.\"\nmsgstr \"現在行われているアクティビティのタイプ。\"\n\n#: ../../../discord/activity.py:docstring of discord.activity.Activity:38\nmsgid \"The user's current state. For example, \\\"In Game\\\".\"\nmsgstr \"ユーザーの現在の状態。例えば、「In Game」など。\"\n\n#: ../../../discord/activity.py:docstring of discord.activity.Activity:44\nmsgid \"The detail of the user's current activity.\"\nmsgstr \"ユーザーの現在のアクティビティの詳細。\"\n\n#: ../../../discord/activity.py:docstring of discord.activity.Activity:50\nmsgid \"The user's current platform.\"\nmsgstr \"\"\n\n#: ../../../discord/activity.py:docstring of discord.activity.Activity:58\nmsgid \"A dictionary of timestamps. It contains the following optional keys:\"\nmsgstr \"タイムスタンプの辞書。次のオプションキーが含まれています：\"\n\n#: ../../../discord/activity.py:docstring of discord.activity.Activity:60\nmsgid \"``start``: Corresponds to when the user started doing the activity in milliseconds since Unix epoch.\"\nmsgstr \"``start``: ユーザーがアクティビティを開始したときのUnixエポック起算ミリ秒数に対応します。\"\n\n#: ../../../discord/activity.py:docstring of discord.activity.Activity:62\nmsgid \"``end``: Corresponds to when the user will finish doing the activity in milliseconds since Unix epoch.\"\nmsgstr \"``end``: ユーザーがアクティビティを終了する予定時刻のUnixエポック起算ミリ秒数に対応します。\"\n\n#: ../../../discord/activity.py:docstring of discord.activity.Activity:69\nmsgid \"A dictionary representing the images and their hover text of an activity. It contains the following optional keys:\"\nmsgstr \"アクティビティの画像とそれらのホバーテキストを表す辞書。次のオプションキーが含まれています：\"\n\n#: ../../../discord/activity.py:docstring of discord.activity.Activity:72\n#: ../../../discord/activity.py:docstring of discord.activity.Game:45\nmsgid \"``large_image``: A string representing the ID for the large image asset.\"\nmsgstr \"``large_image``: 大きな画像アセットのIDを表す文字列。\"\n\n#: ../../../discord/activity.py:docstring of discord.activity.Activity:73\n#: ../../../discord/activity.py:docstring of discord.activity.Game:46\nmsgid \"``large_text``: A string representing the text when hovering over the large image asset.\"\nmsgstr \"``large_text``: 大きな画像アセットをホバーしたときに表示するテキストを表す文字列。\"\n\n#: ../../../discord/activity.py:docstring of discord.activity.Activity:74\n#: ../../../discord/activity.py:docstring of discord.activity.Game:47\nmsgid \"``small_image``: A string representing the ID for the small image asset.\"\nmsgstr \"``small_image``: 小さな画像アセットのIDを表す文字列。\"\n\n#: ../../../discord/activity.py:docstring of discord.activity.Activity:75\n#: ../../../discord/activity.py:docstring of discord.activity.Game:48\nmsgid \"``small_text``: A string representing the text when hovering over the small image asset.\"\nmsgstr \"``small_text``: 小さな画像アセットをホバーしたときに表示するテキストを表す文字列。\"\n\n#: ../../../discord/activity.py:docstring of discord.activity.Activity:81\nmsgid \"A dictionary representing the activity party. It contains the following optional keys:\"\nmsgstr \"アクティビティのパーティーを表す辞書。次のオプションキーが含まれています：\"\n\n#: ../../../discord/activity.py:docstring of discord.activity.Activity:83\nmsgid \"``id``: A string representing the party ID.\"\nmsgstr \"``id``: パーティー ID を表す文字列。\"\n\n#: ../../../discord/activity.py:docstring of discord.activity.Activity:84\nmsgid \"``size``: A list of up to two integer elements denoting (current_size, maximum_size).\"\nmsgstr \"``size``: 現在の大きさと最大の大きさをである二個以内の整数のリスト。\"\n\n#: ../../../discord/activity.py:docstring of discord.activity.Activity:90\nmsgid \"A list of strings representing the labels of custom buttons shown in a rich presence.\"\nmsgstr \"リッチプレゼンスに表示されるカスタムボタンのラベルを表す文字列のリスト。\"\n\n#: ../../../discord/activity.py:docstring of discord.activity.Activity:98\nmsgid \"The emoji that belongs to this activity.\"\nmsgstr \"このアクティビティに属する絵文字。\"\n\n#: ../../../discord/activity.py:docstring of discord.Activity.start:1\nmsgid \"When the user started doing this activity in UTC, if applicable.\"\nmsgstr \"該当する場合、ユーザーがアクティビティを開始したときのUTC時刻。\"\n\n#: ../../../discord/activity.py:docstring of discord.Activity.end:1\nmsgid \"When the user will stop doing this activity in UTC, if applicable.\"\nmsgstr \"該当する場合、ユーザーがアクティビティを終了する予定のUTC時刻。\"\n\n#: ../../../discord/activity.py:docstring of discord.Activity.large_image_url:1\nmsgid \"Returns a URL pointing to the large image asset of this activity, if applicable.\"\nmsgstr \"該当する場合、このアクティビティの大きな画像アセットを指すURLを返します。\"\n\n#: ../../../discord/activity.py:docstring of discord.Activity.small_image_url:1\nmsgid \"Returns a URL pointing to the small image asset of this activity, if applicable.\"\nmsgstr \"該当する場合、このアクティビティの小さな画像アセットを指すURLを返します。\"\n\n#: ../../../discord/activity.py:docstring of discord.Activity.large_image_text:1\nmsgid \"Returns the large image asset hover text of this activity, if applicable.\"\nmsgstr \"該当する場合、このアクティビティの大きな画像アセットのホバーテキストを返します。\"\n\n#: ../../../discord/activity.py:docstring of discord.Activity.small_image_text:1\nmsgid \"Returns the small image asset hover text of this activity, if applicable.\"\nmsgstr \"該当する場合、このアクティビティの小さな画像アセットのホバーテキストを返します。\"\n\n#: ../../api.rst:5152\nmsgid \"Game\"\nmsgstr \"Game\"\n\n#: ../../../discord/activity.py:docstring of discord.activity.Game:1\nmsgid \"A slimmed down version of :class:`Activity` that represents a Discord game.\"\nmsgstr \"Discordのゲームを表す :class:`Activity` の軽量化されたバージョン。\"\n\n#: ../../../discord/activity.py:docstring of discord.activity.Game:3\nmsgid \"This is typically displayed via **Playing** on the official Discord client.\"\nmsgstr \"これは通常、公式のDiscordクライアントにて **プレイ中** として表示されます。\"\n\n#: ../../../discord/activity.py:docstring of discord.activity.Game:9\nmsgid \"Checks if two games are equal.\"\nmsgstr \"二つのゲームが等しいかを比較します。\"\n\n#: ../../../discord/activity.py:docstring of discord.activity.Game:13\nmsgid \"Checks if two games are not equal.\"\nmsgstr \"二つのゲームが等しいものではないか比較します。\"\n\n#: ../../../discord/activity.py:docstring of discord.activity.Game:17\nmsgid \"Returns the game's hash.\"\nmsgstr \"ゲームのハッシュ値を返します。\"\n\n#: ../../../discord/activity.py:docstring of discord.activity.Game:21\nmsgid \"Returns the game's name.\"\nmsgstr \"ゲームの名前を返します。\"\n\n#: ../../../discord/activity.py:docstring of discord.activity.Game:23\n#: ../../../discord/activity.py:docstring of discord.activity.Game:28\nmsgid \"The game's name.\"\nmsgstr \"ゲームの名前。\"\n\n#: ../../../discord/activity.py:docstring of discord.activity.Game:34\nmsgid \"Where the user is playing from (ie. PS5, Xbox).\"\nmsgstr \"\"\n\n#: ../../../discord/activity.py:docstring of discord.activity.Game:42\nmsgid \"A dictionary representing the images and their hover text of a game. It contains the following optional keys:\"\nmsgstr \"\"\n\n#: ../../../discord/activity.py:docstring of discord.Game.type:1\n#: ../../../discord/activity.py:docstring of discord.Streaming.type:1\nmsgid \"Returns the game's type. This is for compatibility with :class:`Activity`.\"\nmsgstr \"ゲームのタイプを返します。これは :class:`Activity` との互換性のためです。\"\n\n#: ../../../discord/activity.py:docstring of discord.Game.type:3\nmsgid \"It always returns :attr:`ActivityType.playing`.\"\nmsgstr \"これは常に :attr:`ActivityType.playing` を返します。\"\n\n#: ../../../discord/activity.py:docstring of discord.Game.start:1\nmsgid \"When the user started playing this game in UTC, if applicable.\"\nmsgstr \"該当する場合、ユーザーがゲームを開始したときのUTC時刻。\"\n\n#: ../../../discord/activity.py:docstring of discord.Game.end:1\nmsgid \"When the user will stop playing this game in UTC, if applicable.\"\nmsgstr \"該当する場合、ユーザーがゲームを終了する予定のUTC時刻。\"\n\n#: ../../api.rst:5160\nmsgid \"Streaming\"\nmsgstr \"Streaming\"\n\n#: ../../../discord/activity.py:docstring of discord.activity.Streaming:1\nmsgid \"A slimmed down version of :class:`Activity` that represents a Discord streaming status.\"\nmsgstr \"Discordのストリーム状態を表す :class:`Activity` の軽量化されたバージョン。\"\n\n#: ../../../discord/activity.py:docstring of discord.activity.Streaming:3\nmsgid \"This is typically displayed via **Streaming** on the official Discord client.\"\nmsgstr \"これは通常、公式のDiscordクライアントにて **ストリーム中** として表示されます。\"\n\n#: ../../../discord/activity.py:docstring of discord.activity.Streaming:9\nmsgid \"Checks if two streams are equal.\"\nmsgstr \"二つのストリームが等しいかを比較します。\"\n\n#: ../../../discord/activity.py:docstring of discord.activity.Streaming:13\nmsgid \"Checks if two streams are not equal.\"\nmsgstr \"二つのストリームが等しいものではないか比較します。\"\n\n#: ../../../discord/activity.py:docstring of discord.activity.Streaming:17\nmsgid \"Returns the stream's hash.\"\nmsgstr \"ストリームのハッシュ値を返します。\"\n\n#: ../../../discord/activity.py:docstring of discord.activity.Streaming:21\nmsgid \"Returns the stream's name.\"\nmsgstr \"ストリームの名前を返します。\"\n\n#: ../../../discord/activity.py:docstring of discord.activity.Streaming:25\nmsgid \"Where the user is streaming from (ie. YouTube, Twitch).\"\nmsgstr \"ユーザーがストリームしている場所 (例: YouTube、Twitch)。\"\n\n#: ../../../discord/activity.py:docstring of discord.activity.Streaming:33\nmsgid \"The stream's name.\"\nmsgstr \"ストリームの名前。\"\n\n#: ../../../discord/activity.py:docstring of discord.activity.Streaming:39\nmsgid \"An alias for :attr:`name`\"\nmsgstr \":attr:`name` のエイリアス。\"\n\n#: ../../../discord/activity.py:docstring of discord.activity.Streaming:45\nmsgid \"The game being streamed.\"\nmsgstr \"ストリーム中のゲーム。\"\n\n#: ../../../discord/activity.py:docstring of discord.activity.Streaming:53\nmsgid \"The stream's URL.\"\nmsgstr \"ストリームのURL。\"\n\n#: ../../../discord/activity.py:docstring of discord.activity.Streaming:59\nmsgid \"A dictionary comprising of similar keys than those in :attr:`Activity.assets`.\"\nmsgstr \":attr:`Activity.assets` のキーと同様のキーで構成される辞書。\"\n\n#: ../../../discord/activity.py:docstring of discord.Streaming.type:3\nmsgid \"It always returns :attr:`ActivityType.streaming`.\"\nmsgstr \"これは常に :attr:`ActivityType.streaming` を返します。\"\n\n#: ../../../discord/activity.py:docstring of discord.Streaming.twitch_name:1\nmsgid \"If provided, the twitch name of the user streaming.\"\nmsgstr \"提供された場合、ストリーム中のユーザーのTwitchの名前。\"\n\n#: ../../../discord/activity.py:docstring of discord.Streaming.twitch_name:3\nmsgid \"This corresponds to the ``large_image`` key of the :attr:`Streaming.assets` dictionary if it starts with ``twitch:``. Typically set by the Discord client.\"\nmsgstr \"これが ``twitch:`` で始まる場合、 :attr:`Streaming.assets` 辞書の ``large_image`` キーに対応します。典型的にはDiscordクライアントによって設定されます。\"\n\n#: ../../api.rst:5168\nmsgid \"CustomActivity\"\nmsgstr \"CustomActivity\"\n\n#: ../../../discord/activity.py:docstring of discord.activity.CustomActivity:1\nmsgid \"Represents a custom activity from Discord.\"\nmsgstr \"Discordでのカスタムアクティビティを表します。\"\n\n#: ../../../discord/activity.py:docstring of discord.activity.CustomActivity:19\nmsgid \"Returns the custom status text.\"\nmsgstr \"カスタムステータスのテキストを返します。\"\n\n#: ../../../discord/activity.py:docstring of discord.activity.CustomActivity:25\nmsgid \"The custom activity's name.\"\nmsgstr \"カスタムアクティビティの名前。\"\n\n#: ../../../discord/activity.py:docstring of discord.activity.CustomActivity:31\nmsgid \"The emoji to pass to the activity, if any.\"\nmsgstr \"存在する場合、アクティビティに渡す絵文字。\"\n\n#: ../../../discord/activity.py:docstring of discord.CustomActivity.type:3\nmsgid \"It always returns :attr:`ActivityType.custom`.\"\nmsgstr \"これは常に :attr:`ActivityType.custom` を返します。\"\n\n#: ../../api.rst:5176\nmsgid \"Permissions\"\nmsgstr \"Permissions\"\n\n#: ../../../discord/permissions.py:docstring of discord.permissions.Permissions:1\nmsgid \"Wraps up the Discord permission value.\"\nmsgstr \"Discordの権限値をまとめます。\"\n\n#: ../../../discord/permissions.py:docstring of discord.permissions.Permissions:3\nmsgid \"The properties provided are two way. You can set and retrieve individual bits using the properties as if they were regular bools. This allows you to edit permissions.\"\nmsgstr \"供されるプロパティは双方向で利用できます。通常の真偽値であるかのように、 プロパティを使用し個々のビットを設定したり取得したりできます。これを用いると権限を編集できます。\"\n\n#: ../../../discord/permissions.py:docstring of discord.permissions.Permissions:7\nmsgid \"You can now use keyword arguments to initialize :class:`Permissions` similar to :meth:`update`.\"\nmsgstr \"キーワード引数を使用して、 :class:`Permissions` を :meth:`update` と同様に初期化できるようになりました。\"\n\n#: ../../../discord/permissions.py:docstring of discord.permissions.Permissions:15\nmsgid \"Checks if two permissions are equal.\"\nmsgstr \"二つの権限が等しいかを比較します。\"\n\n#: ../../../discord/permissions.py:docstring of discord.permissions.Permissions:18\nmsgid \"Checks if two permissions are not equal.\"\nmsgstr \"二つの権限が等しくないかを比較します。\"\n\n#: ../../../discord/permissions.py:docstring of discord.permissions.Permissions:21\nmsgid \"Checks if a permission is a subset of another permission.\"\nmsgstr \"権限が他の権限の部分集合であるかどうかを確認します。\"\n\n#: ../../../discord/permissions.py:docstring of discord.permissions.Permissions:24\nmsgid \"Checks if a permission is a superset of another permission.\"\nmsgstr \"権限が他の権限の上位集合であるかどうかを確認します。\"\n\n#: ../../../discord/permissions.py:docstring of discord.permissions.Permissions:27\nmsgid \"Checks if a permission is a strict subset of another permission.\"\nmsgstr \"権限が他の権限の真部分集合であるかどうかを確認します。\"\n\n#: ../../../discord/permissions.py:docstring of discord.permissions.Permissions:30\nmsgid \"Checks if a permission is a strict superset of another permission.\"\nmsgstr \"権限が他の権限の真上位集合であるかどうかを確認します。\"\n\n#: ../../../discord/permissions.py:docstring of discord.permissions.Permissions:34\nmsgid \"Returns a Permissions instance with all enabled flags from both x and y.\"\nmsgstr \"x と y のどちらかにて有効化されたフラグを持つPermissionsインスタンスを返します。\"\n\n#: ../../../discord/permissions.py:docstring of discord.permissions.Permissions:41\nmsgid \"Returns a Permissions instance with only flags enabled on both x and y.\"\nmsgstr \"x と y の両方にて有効化されたフラグのみを持つPermissionsインスタンスを返します。\"\n\n#: ../../../discord/permissions.py:docstring of discord.permissions.Permissions:48\nmsgid \"Returns a Permissions instance with only flags enabled on only one of x or y, not on both.\"\nmsgstr \"x と y のいずれか一方のみにて有効化されたフラグのみを持つPermissionsインスタンスを返します。\"\n\n#: ../../../discord/permissions.py:docstring of discord.permissions.Permissions:55\nmsgid \"Returns a Permissions instance with all flags inverted from x.\"\nmsgstr \"x のすべてのフラグが反転したPermissionsインスタンスを返します。\"\n\n#: ../../../discord/permissions.py:docstring of discord.permissions.Permissions:61\nmsgid \"Return the permission's hash.\"\nmsgstr \"権限のハッシュ値を返します。\"\n\n#: ../../../discord/permissions.py:docstring of discord.permissions.Permissions:64\n#: ../../../discord/permissions.py:docstring of discord.permissions.PermissionOverwrite:22\nmsgid \"Returns an iterator of ``(perm, value)`` pairs. This allows it to be, for example, constructed as a dict or a list of pairs. Note that aliases are not shown.\"\nmsgstr \"``(perm, value)`` ペアのイテレータを返します。これにより、例えば、辞書型やペアのリストに変換できます。エイリアスは含まれません。\"\n\n#: ../../../discord/permissions.py:docstring of discord.permissions.Permissions:70\nmsgid \"Returns whether the permissions object has any permissions set to ``True``.\"\nmsgstr \"権限オブジェクトの権限のいずれかが ``True`` に設定されているかどうかを返します。\"\n\n#: ../../../discord/permissions.py:docstring of discord.permissions.Permissions:76\nmsgid \"The raw value. This value is a bit array field of a 53-bit integer representing the currently available permissions. You should query permissions via the properties rather than using this raw value.\"\nmsgstr \"生の値。この値は、現在使用可能な権限を表す 53 ビット整数のビット配列フィールドです。権限の取得には、この生の値ではなくプロパティを使用すべきです。\"\n\n#: ../../../discord/permissions.py:docstring of discord.permissions.Permissions.is_subset:1\nmsgid \"Returns ``True`` if self has the same or fewer permissions as other.\"\nmsgstr \"これが他の権限より同じか少ない権限を有する場合 ``True`` を返します。\"\n\n#: ../../../discord/permissions.py:docstring of discord.permissions.Permissions.is_superset:1\nmsgid \"Returns ``True`` if self has the same or more permissions as other.\"\nmsgstr \"これが他の権限より同じか多い権限を有する場合 ``True`` を返します。\"\n\n#: ../../../discord/permissions.py:docstring of discord.permissions.Permissions.is_strict_subset:1\nmsgid \"Returns ``True`` if the permissions on other are a strict subset of those on self.\"\nmsgstr \"この権限が他の権限の真部分集合である場合に ``True`` を返します。\"\n\n#: ../../../discord/permissions.py:docstring of discord.permissions.Permissions.is_strict_superset:1\nmsgid \"Returns ``True`` if the permissions on other are a strict superset of those on self.\"\nmsgstr \"この権限が他の権限の真上位集合である場合に ``True`` を返します。\"\n\n#: ../../../discord/permissions.py:docstring of discord.permissions.Permissions.none:1\nmsgid \"A factory method that creates a :class:`Permissions` with all permissions set to ``False``.\"\nmsgstr \"すべての権限が ``False`` に設定された :class:`Permissions` を作成するファクトリメソッド。\"\n\n#: ../../../discord/permissions.py:docstring of discord.permissions.Permissions.all:1\nmsgid \"A factory method that creates a :class:`Permissions` with all permissions set to ``True``.\"\nmsgstr \"すべての権限が ``True`` に設定された :class:`Permissions` を作成するファクトリメソッド。\"\n\n#: ../../../discord/permissions.py:docstring of discord.permissions.Permissions.all_channel:1\nmsgid \"A :class:`Permissions` with all channel-specific permissions set to ``True`` and the guild-specific ones set to ``False``. The guild-specific permissions are currently:\"\nmsgstr \"チャンネル特有の権限が ``True`` に、ギルド特有の権限が ``False`` に設定された :class:`Permissions` 。ギルド特有の権限は現在以下の通りです：\"\n\n#: ../../../discord/permissions.py:docstring of discord.permissions.Permissions.all_channel:5\n#: ../../../discord/permissions.py:docstring of discord.permissions.Permissions.elevated:12\nmsgid \":attr:`manage_expressions`\"\nmsgstr \":attr:`manage_expressions`\"\n\n#: ../../../discord/permissions.py:docstring of discord.permissions.Permissions.all_channel:6\nmsgid \":attr:`view_audit_log`\"\nmsgstr \":attr:`view_audit_log`\"\n\n#: ../../../discord/permissions.py:docstring of discord.permissions.Permissions.all_channel:7\nmsgid \":attr:`view_guild_insights`\"\nmsgstr \":attr:`view_guild_insights`\"\n\n#: ../../../discord/permissions.py:docstring of discord.permissions.Permissions.all_channel:8\n#: ../../../discord/permissions.py:docstring of discord.permissions.Permissions.elevated:8\nmsgid \":attr:`manage_guild`\"\nmsgstr \":attr:`manage_guild`\"\n\n#: ../../../discord/permissions.py:docstring of discord.permissions.Permissions.all_channel:9\nmsgid \":attr:`change_nickname`\"\nmsgstr \":attr:`change_nickname`\"\n\n#: ../../../discord/permissions.py:docstring of discord.permissions.Permissions.all_channel:10\nmsgid \":attr:`manage_nicknames`\"\nmsgstr \":attr:`manage_nicknames`\"\n\n#: ../../../discord/permissions.py:docstring of discord.permissions.Permissions.all_channel:11\n#: ../../../discord/permissions.py:docstring of discord.permissions.Permissions.elevated:4\nmsgid \":attr:`kick_members`\"\nmsgstr \":attr:`kick_members`\"\n\n#: ../../../discord/permissions.py:docstring of discord.permissions.Permissions.all_channel:12\n#: ../../../discord/permissions.py:docstring of discord.permissions.Permissions.elevated:5\nmsgid \":attr:`ban_members`\"\nmsgstr \":attr:`ban_members`\"\n\n#: ../../../discord/permissions.py:docstring of discord.permissions.Permissions.all_channel:13\n#: ../../../discord/permissions.py:docstring of discord.permissions.Permissions.elevated:6\nmsgid \":attr:`administrator`\"\nmsgstr \":attr:`administrator`\"\n\n#: ../../../discord/permissions.py:docstring of discord.permissions.Permissions.all_channel:14\nmsgid \":attr:`create_expressions`\"\nmsgstr \":attr:`create_expressions`\"\n\n#: ../../../discord/permissions.py:docstring of discord.permissions.Permissions.all_channel:16\nmsgid \"Added :attr:`stream`, :attr:`priority_speaker` and :attr:`use_application_commands` permissions.\"\nmsgstr \":attr:`stream` 、 :attr:`priority_speaker` 、 :attr:`use_application_commands` 権限を追加しました。\"\n\n#: ../../../discord/permissions.py:docstring of discord.permissions.Permissions.all_channel:19\nmsgid \"Added :attr:`create_public_threads`, :attr:`create_private_threads`, :attr:`manage_threads`, :attr:`use_external_stickers`, :attr:`send_messages_in_threads` and :attr:`request_to_speak` permissions.\"\nmsgstr \":attr:`create_public_threads` 、 :attr:`create_private_threads` 、 :attr:`manage_threads` 、 :attr:`use_external_stickers` 、 :attr:`send_messages_in_threads` 、 :attr:`request_to_speak` 権限を追加しました。\"\n\n#: ../../../discord/permissions.py:docstring of discord.permissions.Permissions.all_channel:24\nmsgid \"Added :attr:`use_soundboard`, :attr:`create_expressions` permissions.\"\nmsgstr \":attr:`use_soundboard` と :attr:`create_expressions` 権限を追加しました。\"\n\n#: ../../../discord/permissions.py:docstring of discord.permissions.Permissions.general:1\nmsgid \"A factory method that creates a :class:`Permissions` with all \\\"General\\\" permissions from the official Discord UI set to ``True``.\"\nmsgstr \"Discord公式UIの「サーバー全般の権限」をすべて ``True`` に設定した :class:`Permissions` を作成するファクトリメソッド。\"\n\n#: ../../../discord/permissions.py:docstring of discord.permissions.Permissions.general:4\nmsgid \"Permission :attr:`read_messages` is now included in the general permissions, but permissions :attr:`administrator`, :attr:`create_instant_invite`, :attr:`kick_members`, :attr:`ban_members`, :attr:`change_nickname` and :attr:`manage_nicknames` are no longer part of the general permissions.\"\nmsgstr \":attr:`read_messages` が全般の権限に含まれるようになり、 :attr:`administrator` 、 :attr:`create_instant_invite` 、 :attr:`kick_members` 、 :attr:`ban_members` 、 :attr:`change_nickname` 、 :attr:`manage_nicknames` は全般の権限に含まれなくなりました。\"\n\n#: ../../../discord/permissions.py:docstring of discord.permissions.Permissions.general:10\nmsgid \"Added :attr:`create_expressions` permission.\"\nmsgstr \":attr:`create_expressions` 権限を追加しました。\"\n\n#: ../../../discord/permissions.py:docstring of discord.permissions.Permissions.membership:1\nmsgid \"A factory method that creates a :class:`Permissions` with all \\\"Membership\\\" permissions from the official Discord UI set to ``True``.\"\nmsgstr \"Discord公式UIの「メンバーシップ権限」をすべて ``True`` に設定した :class:`Permissions` を作成するファクトリメソッド。\"\n\n#: ../../../discord/permissions.py:docstring of discord.permissions.Permissions.text:1\nmsgid \"A factory method that creates a :class:`Permissions` with all \\\"Text\\\" permissions from the official Discord UI set to ``True``.\"\nmsgstr \"Discord公式UIの「テキストチャンネル権限」をすべて ``True`` に設定した :class:`Permissions` を作成するファクトリメソッド。\"\n\n#: ../../../discord/permissions.py:docstring of discord.permissions.Permissions.text:4\nmsgid \"Permission :attr:`read_messages` is no longer part of the text permissions. Added :attr:`use_application_commands` permission.\"\nmsgstr \":attr:`read_messages` がテキストチャンネル権限に含まれなくなりました。 :attr:`use_application_commands` 権限を追加しました。\"\n\n#: ../../../discord/permissions.py:docstring of discord.permissions.Permissions.text:8\nmsgid \"Added :attr:`create_public_threads`, :attr:`create_private_threads`, :attr:`manage_threads`, :attr:`send_messages_in_threads` and :attr:`use_external_stickers` permissions.\"\nmsgstr \":attr:`create_public_threads` 、 :attr:`create_private_threads` 、 :attr:`manage_threads` 、 :attr:`send_messages_in_threads` 、 :attr:`use_external_stickers` 権限が追加されました。\"\n\n#: ../../../discord/permissions.py:docstring of discord.permissions.Permissions.text:12\nmsgid \"Added :attr:`send_voice_messages` permission.\"\nmsgstr \":attr:`send_voice_messages` 権限を追加しました。\"\n\n#: ../../../discord/permissions.py:docstring of discord.permissions.Permissions.voice:1\nmsgid \"A factory method that creates a :class:`Permissions` with all \\\"Voice\\\" permissions from the official Discord UI set to ``True``.\"\nmsgstr \"Discord公式UIの「ボイスチャンネル権限」をすべて ``True`` に設定した :class:`Permissions` を作成するファクトリメソッド。\"\n\n#: ../../../discord/permissions.py:docstring of discord.permissions.Permissions.stage:1\nmsgid \"A factory method that creates a :class:`Permissions` with all \\\"Stage Channel\\\" permissions from the official Discord UI set to ``True``.\"\nmsgstr \"Discord公式UIの「ステージチャンネル権限」をすべて ``True`` に設定した :class:`Permissions` を作成するファクトリメソッド。\"\n\n#: ../../../discord/permissions.py:docstring of discord.permissions.Permissions.stage_moderator:1\nmsgid \"A factory method that creates a :class:`Permissions` with all permissions for stage moderators set to ``True``. These permissions are currently:\"\nmsgstr \"ステージモデレーターの権限をすべて ``True`` に設定した :class:`Permissions` を作成するファクトリメソッド。これは現在以下の通りです：\"\n\n#: ../../../discord/permissions.py:docstring of discord.permissions.Permissions.stage_moderator:4\n#: ../../../discord/permissions.py:docstring of discord.permissions.Permissions.elevated:7\nmsgid \":attr:`manage_channels`\"\nmsgstr \":attr:`manage_channels`\"\n\n#: ../../../discord/permissions.py:docstring of discord.permissions.Permissions.stage_moderator:5\nmsgid \":attr:`mute_members`\"\nmsgstr \":attr:`mute_members`\"\n\n#: ../../../discord/permissions.py:docstring of discord.permissions.Permissions.stage_moderator:6\nmsgid \":attr:`move_members`\"\nmsgstr \":attr:`move_members`\"\n\n#: ../../../discord/permissions.py:docstring of discord.permissions.Permissions.stage_moderator:10\nmsgid \"Added :attr:`manage_channels` permission and removed :attr:`request_to_speak` permission.\"\nmsgstr \":attr:`manage_channels` 権限を追加し、 :attr:`request_to_speak` 権限を削除しました。\"\n\n#: ../../../discord/permissions.py:docstring of discord.permissions.Permissions.elevated:1\nmsgid \"A factory method that creates a :class:`Permissions` with all permissions that require 2FA set to ``True``. These permissions are currently:\"\nmsgstr \"二段階認証を必要とする権限をすべて ``True`` に設定した :class:`Permissions` を作成するファクトリメソッド。これは現在以下の通りです：\"\n\n#: ../../../discord/permissions.py:docstring of discord.permissions.Permissions.elevated:9\nmsgid \":attr:`manage_messages`\"\nmsgstr \":attr:`manage_messages`\"\n\n#: ../../../discord/permissions.py:docstring of discord.permissions.Permissions.elevated:10\nmsgid \":attr:`manage_roles`\"\nmsgstr \":attr:`manage_roles`\"\n\n#: ../../../discord/permissions.py:docstring of discord.permissions.Permissions.elevated:11\nmsgid \":attr:`manage_webhooks`\"\nmsgstr \":attr:`manage_webhooks`\"\n\n#: ../../../discord/permissions.py:docstring of discord.permissions.Permissions.elevated:13\nmsgid \":attr:`manage_threads`\"\nmsgstr \":attr:`manage_threads`\"\n\n#: ../../../discord/permissions.py:docstring of discord.permissions.Permissions.elevated:14\nmsgid \":attr:`moderate_members`\"\nmsgstr \":attr:`moderate_members`\"\n\n#: ../../../discord/permissions.py:docstring of discord.permissions.Permissions.events:1\nmsgid \"A factory method that creates a :class:`Permissions` with all \\\"Events\\\" permissions from the official Discord UI set to ``True``.\"\nmsgstr \"\"\n\n#: ../../../discord/permissions.py:docstring of discord.permissions.Permissions.advanced:1\nmsgid \"A factory method that creates a :class:`Permissions` with all \\\"Advanced\\\" permissions from the official Discord UI set to ``True``.\"\nmsgstr \"Discord公式UIの「高度な権限」をすべて ``True`` に設定した :class:`Permissions` を作成するファクトリメソッド。\"\n\n#: ../../../discord/permissions.py:docstring of discord.permissions.Permissions.update:1\nmsgid \"Bulk updates this permission object.\"\nmsgstr \"権限オブジェクトを一括更新します。\"\n\n#: ../../../discord/permissions.py:docstring of discord.permissions.Permissions.update:3\n#: ../../../discord/permissions.py:docstring of discord.permissions.PermissionOverwrite.update:3\nmsgid \"Allows you to set multiple attributes by using keyword arguments. The names must be equivalent to the properties listed. Extraneous key/value pairs will be silently ignored.\"\nmsgstr \"キーワード引数を使用して複数の属性を設定できます。 名前は記載されているプロパティと同等でなければなりません。それ以外のキーと値のペアは無視されます。\"\n\n#: ../../../discord/permissions.py:docstring of discord.permissions.Permissions.update:7\nmsgid \"A list of key/value pairs to bulk update permissions with.\"\nmsgstr \"権限を一括更新するためのキーと値のペアのリスト。\"\n\n#: ../../docstring of discord.Permissions.create_instant_invite:1\nmsgid \"Returns ``True`` if the user can create instant invites.\"\nmsgstr \"ユーザーが招待を作成できる場合は ``True`` を返します。\"\n\n#: ../../docstring of discord.Permissions.kick_members:1\nmsgid \"Returns ``True`` if the user can kick users from the guild.\"\nmsgstr \"ギルドからユーザーをキックできる場合は ``True`` を返します。\"\n\n#: ../../docstring of discord.Permissions.ban_members:1\nmsgid \"Returns ``True`` if a user can ban users from the guild.\"\nmsgstr \"ギルドからユーザーをBANできる場合は ``True`` を返します。\"\n\n#: ../../docstring of discord.Permissions.administrator:1\nmsgid \"Returns ``True`` if a user is an administrator. This role overrides all other permissions.\"\nmsgstr \"ユーザーが管理者の場合は ``True`` を返します。このロールは他のすべての権限を上書きします。\"\n\n#: ../../docstring of discord.Permissions.administrator:3\nmsgid \"This also bypasses all channel-specific overrides.\"\nmsgstr \"これはチャンネル特有のすべての上書きもバイパスします。\"\n\n#: ../../docstring of discord.Permissions.manage_channels:1\nmsgid \"Returns ``True`` if a user can edit, delete, or create channels in the guild.\"\nmsgstr \"ギルド内のチャンネルを編集、削除、作成できる場合は ``True`` を返します。\"\n\n#: ../../docstring of discord.Permissions.manage_channels:3\nmsgid \"This also corresponds to the \\\"Manage Channel\\\" channel-specific override.\"\nmsgstr \"「チャンネルの管理」のチャンネル固有の上書きにも対応します。\"\n\n#: ../../docstring of discord.Permissions.manage_guild:1\nmsgid \"Returns ``True`` if a user can edit guild properties.\"\nmsgstr \"ユーザーがギルドのプロパティを編集できる場合は ``True`` を返します。\"\n\n#: ../../docstring of discord.Permissions.add_reactions:1\nmsgid \"Returns ``True`` if a user can add reactions to messages.\"\nmsgstr \"ユーザーがメッセージにリアクションを追加できる場合は ``True`` を返します。\"\n\n#: ../../docstring of discord.Permissions.view_audit_log:1\nmsgid \"Returns ``True`` if a user can view the guild's audit log.\"\nmsgstr \"ユーザーがギルドの監査ログを具を見ることが出来る場合は ``True`` を返します。\"\n\n#: ../../docstring of discord.Permissions.priority_speaker:1\nmsgid \"Returns ``True`` if a user can be more easily heard while talking.\"\nmsgstr \"通話中のユーザーの声が聞き取りやすくなった場合 ``True`` を返します。\"\n\n#: ../../docstring of discord.Permissions.stream:1\nmsgid \"Returns ``True`` if a user can stream in a voice channel.\"\nmsgstr \"ユーザーがボイスチャンネルでストリーミングできる場合は ``True`` を返します。\"\n\n#: ../../docstring of discord.Permissions.read_messages:1\nmsgid \"Returns ``True`` if a user can read messages from all or specific text channels.\"\nmsgstr \"ユーザーがすべてまたは特定のテキストチャンネルからメッセージを読み取れる場合は ``True`` を返します。\"\n\n#: ../../docstring of discord.Permissions.view_channel:1\nmsgid \"An alias for :attr:`read_messages`.\"\nmsgstr \":attr:`read_messages` のエイリアス。\"\n\n#: ../../docstring of discord.Permissions.send_messages:1\nmsgid \"Returns ``True`` if a user can send messages from all or specific text channels.\"\nmsgstr \"ユーザーがすべてまたは特定のテキストチャンネルにメッセージを送信できる場合は ``True`` を返します。\"\n\n#: ../../docstring of discord.Permissions.send_tts_messages:1\nmsgid \"Returns ``True`` if a user can send TTS messages from all or specific text channels.\"\nmsgstr \"ユーザーがすべてまたは特定のテキストチャンネルにTTSメッセージを送信できる場合は ``True`` を返します。\"\n\n#: ../../docstring of discord.Permissions.manage_messages:1\nmsgid \"Returns ``True`` if a user can delete or pin messages in a text channel.\"\nmsgstr \"テキストチャンネル内のメッセージを削除またはピン留めできる場合は ``True`` を返します。\"\n\n#: ../../docstring of discord.Permissions.manage_messages:5\nmsgid \"Note that there are currently no ways to edit other people's messages.\"\nmsgstr \"なお、現在、他の人のメッセージを編集する方法はありません。\"\n\n#: ../../docstring of discord.Permissions.embed_links:1\nmsgid \"Returns ``True`` if a user's messages will automatically be embedded by Discord.\"\nmsgstr \"ユーザーが埋め込みコンテンツを表示するリンクを許可している場合は ``True`` を返します。\"\n\n#: ../../docstring of discord.Permissions.attach_files:1\nmsgid \"Returns ``True`` if a user can send files in their messages.\"\nmsgstr \"ユーザーがファイルを送信できる場合は ``True`` を返します。\"\n\n#: ../../docstring of discord.Permissions.read_message_history:1\nmsgid \"Returns ``True`` if a user can read a text channel's previous messages.\"\nmsgstr \"ユーザーが過去にテキストチャンネルで送られたメッセージを読める場合は ``True`` を返します。\"\n\n#: ../../docstring of discord.Permissions.mention_everyone:1\nmsgid \"Returns ``True`` if a user's @everyone or @here will mention everyone in the text channel.\"\nmsgstr \"ユーザーが @everyone または @here を使用することが出来る場合は ``True`` を返します。\"\n\n#: ../../docstring of discord.Permissions.external_emojis:1\nmsgid \"Returns ``True`` if a user can use emojis from other guilds.\"\nmsgstr \"ユーザーが他のギルドの絵文字を使用できる場合は ``True`` を返します。\"\n\n#: ../../docstring of discord.Permissions.use_external_emojis:1\nmsgid \"An alias for :attr:`external_emojis`.\"\nmsgstr \":attr:`external_emojis` のエイリアス。\"\n\n#: ../../docstring of discord.Permissions.view_guild_insights:1\nmsgid \"Returns ``True`` if a user can view the guild's insights.\"\nmsgstr \"ユーザーがサーバーインサイトを閲覧できる場合は ``True`` を返します。\"\n\n#: ../../docstring of discord.Permissions.connect:1\nmsgid \"Returns ``True`` if a user can connect to a voice channel.\"\nmsgstr \"ボイスチャンネルに接続できる場合は ``True`` を返します。\"\n\n#: ../../docstring of discord.Permissions.speak:1\nmsgid \"Returns ``True`` if a user can speak in a voice channel.\"\nmsgstr \"ユーザーがボイスチャンネルで話せる場合は ``True`` を返します。\"\n\n#: ../../docstring of discord.Permissions.mute_members:1\nmsgid \"Returns ``True`` if a user can mute other users.\"\nmsgstr \"ユーザーが他のユーザーをミュートできる場合は ``True`` を返します。\"\n\n#: ../../docstring of discord.Permissions.deafen_members:1\nmsgid \"Returns ``True`` if a user can deafen other users.\"\nmsgstr \"ユーザーが他のユーザーのスピーカーをミュートにできる場合は ``True`` を返します。\"\n\n#: ../../docstring of discord.Permissions.move_members:1\nmsgid \"Returns ``True`` if a user can move users between other voice channels.\"\nmsgstr \"ユーザーが他のユーザーを他のボイスチャンネルへ移動させれる場合は ``True`` を返します。\"\n\n#: ../../docstring of discord.Permissions.use_voice_activation:1\nmsgid \"Returns ``True`` if a user can use voice activation in voice channels.\"\nmsgstr \"ユーザーがボイスチャンネルで音声検出を使用できる場合は ``True`` を返します。\"\n\n#: ../../docstring of discord.Permissions.change_nickname:1\nmsgid \"Returns ``True`` if a user can change their nickname in the guild.\"\nmsgstr \"ユーザーがギルド内でのニックネームを変更できる場合は ``True`` を返します。\"\n\n#: ../../docstring of discord.Permissions.manage_nicknames:1\nmsgid \"Returns ``True`` if a user can change other user's nickname in the guild.\"\nmsgstr \"ユーザーが他のユーザーのニックネームを変更できる場合は ``True`` を返します。\"\n\n#: ../../docstring of discord.Permissions.manage_roles:1\nmsgid \"Returns ``True`` if a user can create or edit roles less than their role's position.\"\nmsgstr \"ユーザーに付与されている最高レベルのロールより低いレベルのロールを、作成または編集できる場合は ``True`` を返します。\"\n\n#: ../../docstring of discord.Permissions.manage_roles:3\nmsgid \"This also corresponds to the \\\"Manage Permissions\\\" channel-specific override.\"\nmsgstr \"「権限の管理」のチャンネル固有の上書きにも対応します。\"\n\n#: ../../docstring of discord.Permissions.manage_permissions:1\nmsgid \"An alias for :attr:`manage_roles`.\"\nmsgstr \":attr:`manage_roles` のエイリアス。\"\n\n#: ../../docstring of discord.Permissions.manage_webhooks:1\nmsgid \"Returns ``True`` if a user can create, edit, or delete webhooks.\"\nmsgstr \"ユーザーがWebhookを作成、編集、削除できる場合は、``True`` を返します。\"\n\n#: ../../docstring of discord.Permissions.manage_expressions:1\nmsgid \"Returns ``True`` if a user can edit or delete emojis, stickers, and soundboard sounds.\"\nmsgstr \"絵文字、スタンプ、サウンドボードのサウンドを編集または削除できる場合は ``True`` を返します。\"\n\n#: ../../docstring of discord.Permissions.manage_emojis:1\n#: ../../docstring of discord.Permissions.manage_emojis_and_stickers:1\nmsgid \"An alias for :attr:`manage_expressions`.\"\nmsgstr \":attr:`manage_expressions` のエイリアス。\"\n\n#: ../../docstring of discord.Permissions.use_application_commands:1\nmsgid \"Returns ``True`` if a user can use slash commands.\"\nmsgstr \"ユーザーがスラッシュコマンドを使用できる場合は ``True`` を返します。\"\n\n#: ../../docstring of discord.Permissions.request_to_speak:1\nmsgid \"Returns ``True`` if a user can request to speak in a stage channel.\"\nmsgstr \"ユーザーがステージチャンネルでスピーカー参加をリクエストできる場合は ``True`` を返します。\"\n\n#: ../../docstring of discord.Permissions.manage_events:1\nmsgid \"Returns ``True`` if a user can manage guild events.\"\nmsgstr \"ユーザーがイベントの管理ができる場合は ``True`` を返します。\"\n\n#: ../../docstring of discord.Permissions.manage_threads:1\nmsgid \"Returns ``True`` if a user can manage threads.\"\nmsgstr \"ユーザーがスレッドを管理できる場合は ``True`` を返します。\"\n\n#: ../../docstring of discord.Permissions.create_public_threads:1\nmsgid \"Returns ``True`` if a user can create public threads.\"\nmsgstr \"ユーザーがパブリックスレッドを作成できる場合は ``True`` を返します。\"\n\n#: ../../docstring of discord.Permissions.create_private_threads:1\nmsgid \"Returns ``True`` if a user can create private threads.\"\nmsgstr \"ユーザーがプライベートスレッドを作成できる場合は ``True`` を返します。\"\n\n#: ../../docstring of discord.Permissions.external_stickers:1\nmsgid \"Returns ``True`` if a user can use stickers from other guilds.\"\nmsgstr \"ユーザーが他のギルドのスタンプを使用できる場合は ``True`` を返します。\"\n\n#: ../../docstring of discord.Permissions.use_external_stickers:1\nmsgid \"An alias for :attr:`external_stickers`.\"\nmsgstr \":attr:`external_stickers` のエイリアス。\"\n\n#: ../../docstring of discord.Permissions.send_messages_in_threads:1\nmsgid \"Returns ``True`` if a user can send messages in threads.\"\nmsgstr \"ユーザーがスレッド内でメッセージを送信できる場合は ``True`` を返します。\"\n\n#: ../../docstring of discord.Permissions.use_embedded_activities:1\nmsgid \"Returns ``True`` if a user can launch an embedded application in a Voice channel.\"\nmsgstr \"ユーザーがボイスチャンネルにて埋め込みアプリケーションを起動できる場合は ``True`` を返します。\"\n\n#: ../../docstring of discord.Permissions.moderate_members:1\nmsgid \"Returns ``True`` if a user can time out other members.\"\nmsgstr \"ユーザーが他のユーザーをタイムアウトできる場合は ``True`` を返します。\"\n\n#: ../../docstring of discord.Permissions.view_creator_monetization_analytics:1\nmsgid \"Returns ``True`` if a user can view role subscription insights.\"\nmsgstr \"\"\n\n#: ../../docstring of discord.Permissions.use_soundboard:1\nmsgid \"Returns ``True`` if a user can use the soundboard.\"\nmsgstr \"ユーザーがサウンドボードを使用できる場合は ``True`` を返します。\"\n\n#: ../../docstring of discord.Permissions.create_expressions:1\nmsgid \"Returns ``True`` if a user can create emojis, stickers, and soundboard sounds.\"\nmsgstr \"絵文字、スタンプ、サウンドボードのサウンドを作成できる場合は ``True`` を返します。\"\n\n#: ../../docstring of discord.Permissions.create_events:1\nmsgid \"Returns ``True`` if a user can create guild events.\"\nmsgstr \"\"\n\n#: ../../docstring of discord.Permissions.use_external_sounds:1\nmsgid \"Returns ``True`` if a user can use sounds from other guilds.\"\nmsgstr \"ユーザーが他のギルドのサウンドを使用できる場合は ``True`` を返します。\"\n\n#: ../../docstring of discord.Permissions.send_voice_messages:1\nmsgid \"Returns ``True`` if a user can send voice messages.\"\nmsgstr \"ユーザーがボイスメッセージを送信できる場合は ``True`` を返します。\"\n\n#: ../../api.rst:5184\nmsgid \"PermissionOverwrite\"\nmsgstr \"PermissionOverwrite\"\n\n#: ../../../discord/permissions.py:docstring of discord.permissions.PermissionOverwrite:1\nmsgid \"A type that is used to represent a channel specific permission.\"\nmsgstr \"チャンネル固有の権限を表すために使用されるタイプ。\"\n\n#: ../../../discord/permissions.py:docstring of discord.permissions.PermissionOverwrite:3\nmsgid \"Unlike a regular :class:`Permissions`\\\\, the default value of a permission is equivalent to ``None`` and not ``False``. Setting a value to ``False`` is **explicitly** denying that permission, while setting a value to ``True`` is **explicitly** allowing that permission.\"\nmsgstr \"通常の :class:`Permissions` とは異なり、権限の既定値は ``False`` でなく ``None`` です。値を ``False`` にすると **明示的に** 権限が拒否され、値を ``True`` にすると **明示的に** 権限が許可されます。\"\n\n#: ../../../discord/permissions.py:docstring of discord.permissions.PermissionOverwrite:9\nmsgid \"The values supported by this are the same as :class:`Permissions` with the added possibility of it being set to ``None``.\"\nmsgstr \"サポートされる値はこれが ``None`` になる可能性を除き :class:`Permissions` と同じです。\"\n\n#: ../../../discord/permissions.py:docstring of discord.permissions.PermissionOverwrite:16\nmsgid \"Checks if two overwrites are equal.\"\nmsgstr \"二つの上書きが等しいかを比較します。\"\n\n#: ../../../discord/permissions.py:docstring of discord.permissions.PermissionOverwrite:19\nmsgid \"Checks if two overwrites are not equal.\"\nmsgstr \"二つの上書きが等しくないかを比較します。\"\n\n#: ../../../discord/permissions.py:docstring of discord.permissions.PermissionOverwrite:26\nmsgid \"Set the value of permissions by their name.\"\nmsgstr \"権限の値を名前を指定して設定します。\"\n\n#: ../../../discord/permissions.py:docstring of discord.permissions.PermissionOverwrite.pair:1\nmsgid \"Tuple[:class:`Permissions`, :class:`Permissions`]: Returns the (allow, deny) pair from this overwrite.\"\nmsgstr \"Tuple[:class:`Permissions`, :class:`Permissions`]: この上書きの (許可, 拒否) ペアを返します。\"\n\n#: ../../../discord/permissions.py:docstring of discord.permissions.PermissionOverwrite.from_pair:1\nmsgid \"Creates an overwrite from an allow/deny pair of :class:`Permissions`.\"\nmsgstr \":class:`Permissions` の許可と拒否のペアから上書きを作成します。\"\n\n#: ../../../discord/permissions.py:docstring of discord.permissions.PermissionOverwrite.is_empty:1\nmsgid \"Checks if the permission overwrite is currently empty.\"\nmsgstr \"権限の上書きが現在空であるかどうかを確認します。\"\n\n#: ../../../discord/permissions.py:docstring of discord.permissions.PermissionOverwrite.is_empty:3\nmsgid \"An empty permission overwrite is one that has no overwrites set to ``True`` or ``False``.\"\nmsgstr \"空の権限上書きは、``True`` または ``False`` に設定された上書きが存在しないものです。\"\n\n#: ../../../discord/permissions.py:docstring of discord.permissions.PermissionOverwrite.is_empty:6\nmsgid \"Indicates if the overwrite is empty.\"\nmsgstr \"上書きが空かどうかを示します。\"\n\n#: ../../../discord/permissions.py:docstring of discord.permissions.PermissionOverwrite.update:1\nmsgid \"Bulk updates this permission overwrite object.\"\nmsgstr \"権限上書きオブジェクトを一括更新します。\"\n\n#: ../../../discord/permissions.py:docstring of discord.permissions.PermissionOverwrite.update:7\nmsgid \"A list of key/value pairs to bulk update with.\"\nmsgstr \"一括更新するためのキーと値のペアのリスト。\"\n\n#: ../../api.rst:5192\nmsgid \"SystemChannelFlags\"\nmsgstr \"SystemChannelFlags\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.SystemChannelFlags:1\nmsgid \"Wraps up a Discord system channel flag value.\"\nmsgstr \"Discordシステムチャンネルのフラグ値をまとめます。\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.SystemChannelFlags:3\nmsgid \"Similar to :class:`Permissions`\\\\, the properties provided are two way. You can set and retrieve individual bits using the properties as if they were regular bools. This allows you to edit the system flags easily.\"\nmsgstr \":class:`Permissions` と同様に、提供されるプロパティは双方向で利用できます。通常の真偽値であるかのように、 プロパティを使用し個々のビットを設定したり取得したりできます。これを用いるとシステムフラグを容易に変更できます。\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.SystemChannelFlags:22\nmsgid \"Returns a SystemChannelFlags instance with all enabled flags from both x and y.\"\nmsgstr \"x と y のどちらかにて有効化されたフラグを持つSystemChannelFlagsインスタンスを返します。\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.SystemChannelFlags:29\nmsgid \"Returns a SystemChannelFlags instance with only flags enabled on both x and y.\"\nmsgstr \"x と y の両方にて有効化されたフラグのみを持つSystemChannelFlagsインスタンスを返します。\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.SystemChannelFlags:36\nmsgid \"Returns a SystemChannelFlags instance with only flags enabled on only one of x or y, not on both.\"\nmsgstr \"x と y のいずれか一方のみにて有効化されたフラグのみを持つSystemChannelFlagsインスタンスを返します。\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.SystemChannelFlags:43\nmsgid \"Returns a SystemChannelFlags instance with all flags inverted from x.\"\nmsgstr \"x のすべてのフラグが反転したSystemChannelFlagsインスタンスを返します。\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.SystemChannelFlags:64\n#: ../../../discord/flags.py:docstring of discord.flags.MessageFlags:59\n#: ../../../discord/flags.py:docstring of discord.flags.PublicUserFlags:58\nmsgid \"The raw value. This value is a bit array field of a 53-bit integer representing the currently available flags. You should query flags via the properties rather than using this raw value.\"\nmsgstr \"生の値。この値は、現在使用可能なフラグを表す 53 ビット整数のビット配列フィールドです。フラグの取得には、この生の値ではなくプロパティを使用すべきです。\"\n\n#: ../../docstring of discord.SystemChannelFlags.join_notifications:1\nmsgid \"Returns ``True`` if the system channel is used for member join notifications.\"\nmsgstr \"システムチャンネルがメンバーの参加通知に使用される場合に ``True`` を返します。\"\n\n#: ../../docstring of discord.SystemChannelFlags.premium_subscriptions:1\nmsgid \"Returns ``True`` if the system channel is used for \\\"Nitro boosting\\\" notifications.\"\nmsgstr \"システムチャンネルが「Nitroブースト」通知に使用される場合に ``True`` を返します。\"\n\n#: ../../docstring of discord.SystemChannelFlags.guild_reminder_notifications:1\nmsgid \"Returns ``True`` if the system channel is used for server setup helpful tips notifications.\"\nmsgstr \"システムチャンネルがサーバー設定に役立つヒントの通知に使用される場合に ``True`` を返します。\"\n\n#: ../../docstring of discord.SystemChannelFlags.join_notification_replies:1\nmsgid \"Returns ``True`` if sticker reply button (\\\"Wave to say hi!\\\") is shown for member join notifications.\"\nmsgstr \"メンバーの参加通知にスタンプ返信ボタン（「手を振って挨拶しましょう！」）が表示される場合に ``True`` を返します。\"\n\n#: ../../docstring of discord.SystemChannelFlags.role_subscription_purchase_notifications:1\nmsgid \"Returns ``True`` if role subscription purchase and renewal notifications are enabled.\"\nmsgstr \"ロールサブスクリプションの購入と更新通知が有効になっている場合に ``True`` を返します。\"\n\n#: ../../docstring of discord.SystemChannelFlags.role_subscription_purchase_notification_replies:1\nmsgid \"Returns ``True`` if the role subscription notifications have a sticker reply button.\"\nmsgstr \"ロールサブスクリプション通知にスタンプの返信ボタンがある場合に ``True`` を返します。\"\n\n#: ../../api.rst:5200\nmsgid \"MessageFlags\"\nmsgstr \"MessageFlags\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.MessageFlags:1\nmsgid \"Wraps up a Discord Message flag value.\"\nmsgstr \"Discordメッセージのフラグ値をまとめます。\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.MessageFlags:3\nmsgid \"See :class:`SystemChannelFlags`.\"\nmsgstr \":class:`SystemChannelFlags` を参照してください。\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.MessageFlags:16\nmsgid \"Returns a MessageFlags instance with all enabled flags from both x and y.\"\nmsgstr \"x と y のどちらかにて有効化されたフラグを持つMessageFlagsインスタンスを返します。\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.MessageFlags:23\nmsgid \"Returns a MessageFlags instance with only flags enabled on both x and y.\"\nmsgstr \"x と y の両方にて有効化されたフラグのみを持つMessageFlagsインスタンスを返します。\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.MessageFlags:30\nmsgid \"Returns a MessageFlags instance with only flags enabled on only one of x or y, not on both.\"\nmsgstr \"x と y のいずれか一方のみにて有効化されたフラグのみを持つMessageFlagsインスタンスを返します。\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.MessageFlags:37\nmsgid \"Returns a MessageFlags instance with all flags inverted from x.\"\nmsgstr \"x のすべてのフラグが反転したMessageFlagsインスタンスを返します。\"\n\n#: ../../docstring of discord.MessageFlags.crossposted:1\nmsgid \"Returns ``True`` if the message is the original crossposted message.\"\nmsgstr \"メッセージがクロスポスト元のメッセージである場合に ``True`` を返します。\"\n\n#: ../../docstring of discord.MessageFlags.is_crossposted:1\nmsgid \"Returns ``True`` if the message was crossposted from another channel.\"\nmsgstr \"メッセージが他のチャンネルよりクロスポストされた場合に ``True`` を返します。\"\n\n#: ../../docstring of discord.MessageFlags.suppress_embeds:1\nmsgid \"Returns ``True`` if the message's embeds have been suppressed.\"\nmsgstr \"メッセージの埋め込みが抑制された場合に ``True`` を返します。\"\n\n#: ../../docstring of discord.MessageFlags.source_message_deleted:1\nmsgid \"Returns ``True`` if the source message for this crosspost has been deleted.\"\nmsgstr \"クロスポスト元のメッセージが削除された場合に ``True`` を返します。\"\n\n#: ../../docstring of discord.MessageFlags.urgent:1\nmsgid \"Returns ``True`` if the source message is an urgent message.\"\nmsgstr \"元メッセージが緊急メッセージの場合に ``True`` を返します。\"\n\n#: ../../docstring of discord.MessageFlags.urgent:3\nmsgid \"An urgent message is one sent by Discord Trust and Safety.\"\nmsgstr \"緊急メッセージはDiscord Trust and Safetyにより送信されます。\"\n\n#: ../../docstring of discord.MessageFlags.has_thread:1\nmsgid \"Returns ``True`` if the source message is associated with a thread.\"\nmsgstr \"元メッセージがスレッドに紐づいている場合に ``True`` を返します。\"\n\n#: ../../docstring of discord.MessageFlags.ephemeral:1\nmsgid \"Returns ``True`` if the source message is ephemeral.\"\nmsgstr \"元メッセージが一時的な場合に ``True`` を返します。\"\n\n#: ../../docstring of discord.MessageFlags.loading:1\nmsgid \"Returns ``True`` if the message is an interaction response and the bot is \\\"thinking\\\".\"\nmsgstr \"メッセージがインタラクションの応答で、ボットが「考え中」の場合に ``True`` を返します。\"\n\n#: ../../docstring of discord.MessageFlags.failed_to_mention_some_roles_in_thread:1\nmsgid \"Returns ``True`` if the message failed to mention some roles in a thread and add their members to the thread.\"\nmsgstr \"メッセージがロールをメンションし、そのメンバーをスレッドに追加するのに失敗した場合に ``True`` を返します。\"\n\n#: ../../docstring of discord.MessageFlags.suppress_notifications:1\nmsgid \"Returns ``True`` if the message will not trigger push and desktop notifications.\"\nmsgstr \"メッセージがプッシュ通知やデスクトップ通知を送信しない場合は ``True`` を返します。\"\n\n#: ../../docstring of discord.MessageFlags.silent:1\nmsgid \"Alias for :attr:`suppress_notifications`.\"\nmsgstr \":attr:`suppress_notifications` のエイリアス。\"\n\n#: ../../docstring of discord.MessageFlags.voice:1\nmsgid \"Returns ``True`` if the message is a voice message.\"\nmsgstr \"メッセージがボイスメッセージの場合に ``True`` を返します。\"\n\n#: ../../api.rst:5208\nmsgid \"PublicUserFlags\"\nmsgstr \"PublicUserFlags\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.PublicUserFlags:1\nmsgid \"Wraps up the Discord User Public flags.\"\nmsgstr \"Discordユーザーの公開フラグをまとめます。\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.PublicUserFlags:7\nmsgid \"Checks if two PublicUserFlags are equal.\"\nmsgstr \"公開ユーザーフラグが等しいか確認します。\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.PublicUserFlags:10\nmsgid \"Checks if two PublicUserFlags are not equal.\"\nmsgstr \"公開ユーザーフラグが等しくないか確認します。\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.PublicUserFlags:14\nmsgid \"Returns a PublicUserFlags instance with all enabled flags from both x and y.\"\nmsgstr \"x と y のどちらかにて有効化されたフラグを持つPublicUserFlagsインスタンスを返します。\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.PublicUserFlags:21\nmsgid \"Returns a PublicUserFlags instance with only flags enabled on both x and y.\"\nmsgstr \"x と y の両方にて有効化されたフラグのみを持つPublicUserFlagsインスタンスを返します。\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.PublicUserFlags:28\nmsgid \"Returns a PublicUserFlags instance with only flags enabled on only one of x or y, not on both.\"\nmsgstr \"x と y のいずれか一方のみにて有効化されたフラグのみを持つPublicUserFlagsインスタンスを返します。\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.PublicUserFlags:35\nmsgid \"Returns a PublicUserFlags instance with all flags inverted from x.\"\nmsgstr \"x のすべてのフラグが反転したPublicUserFlagsインスタンスを返します。\"\n\n#: ../../docstring of discord.PublicUserFlags.staff:1\nmsgid \"Returns ``True`` if the user is a Discord Employee.\"\nmsgstr \"ユーザーがDiscord従業員の場合 ``True`` を返します。\"\n\n#: ../../docstring of discord.PublicUserFlags.partner:1\nmsgid \"Returns ``True`` if the user is a Discord Partner.\"\nmsgstr \"ユーザーがDiscordパートナーの場合 ``True`` を返します。\"\n\n#: ../../docstring of discord.PublicUserFlags.hypesquad:1\nmsgid \"Returns ``True`` if the user is a HypeSquad Events member.\"\nmsgstr \"ユーザーがHypeSquad Eventsメンバーの場合 ``True`` を返します。\"\n\n#: ../../docstring of discord.PublicUserFlags.bug_hunter:1\nmsgid \"Returns ``True`` if the user is a Bug Hunter\"\nmsgstr \"ユーザーがバグハンターの場合 ``True`` を返します。\"\n\n#: ../../docstring of discord.PublicUserFlags.hypesquad_bravery:1\nmsgid \"Returns ``True`` if the user is a HypeSquad Bravery member.\"\nmsgstr \"ユーザーがHypeSquad Braveryメンバーの場合 ``True`` を返します。\"\n\n#: ../../docstring of discord.PublicUserFlags.hypesquad_brilliance:1\nmsgid \"Returns ``True`` if the user is a HypeSquad Brilliance member.\"\nmsgstr \"ユーザーがHypeSquad Brillianceメンバーの場合 ``True`` を返します。\"\n\n#: ../../docstring of discord.PublicUserFlags.hypesquad_balance:1\nmsgid \"Returns ``True`` if the user is a HypeSquad Balance member.\"\nmsgstr \"ユーザーがHypeSquad Balanceメンバーの場合 ``True`` を返します。\"\n\n#: ../../docstring of discord.PublicUserFlags.early_supporter:1\nmsgid \"Returns ``True`` if the user is an Early Supporter.\"\nmsgstr \"ユーザーが早期サポーターの場合 ``True`` を返します。\"\n\n#: ../../docstring of discord.PublicUserFlags.team_user:1\nmsgid \"Returns ``True`` if the user is a Team User.\"\nmsgstr \"ユーザーがチームユーザーの場合は ``True`` を返します。\"\n\n#: ../../docstring of discord.PublicUserFlags.system:1\nmsgid \"Returns ``True`` if the user is a system user (i.e. represents Discord officially).\"\nmsgstr \"ユーザーがシステムユーザー（Discordを公式に代表するもの）の場合 ``True`` を返します。\"\n\n#: ../../docstring of discord.PublicUserFlags.bug_hunter_level_2:1\nmsgid \"Returns ``True`` if the user is a Bug Hunter Level 2\"\nmsgstr \"ユーザーがバグハンターレベル2の場合 ``True`` を返します。\"\n\n#: ../../docstring of discord.PublicUserFlags.verified_bot:1\nmsgid \"Returns ``True`` if the user is a Verified Bot.\"\nmsgstr \"ユーザーが認証済みボットの場合 ``True`` を返します。\"\n\n#: ../../docstring of discord.PublicUserFlags.verified_bot_developer:1\nmsgid \"Returns ``True`` if the user is an Early Verified Bot Developer.\"\nmsgstr \"ユーザーが早期認証Botデベロッパーの場合 ``True`` を返します。\"\n\n#: ../../docstring of discord.PublicUserFlags.early_verified_bot_developer:1\nmsgid \"An alias for :attr:`verified_bot_developer`.\"\nmsgstr \":attr:`verified_bot_developer` のエイリアス。\"\n\n#: ../../docstring of discord.PublicUserFlags.discord_certified_moderator:1\nmsgid \"Returns ``True`` if the user is a Discord Certified Moderator.\"\nmsgstr \"ユーザーがDiscord認定モデレーターの場合 ``True`` を返します。\"\n\n#: ../../docstring of discord.PublicUserFlags.bot_http_interactions:1\nmsgid \"Returns ``True`` if the user is a bot that only uses HTTP interactions and is shown in the online member list.\"\nmsgstr \"ユーザーがHTTPインタラクションのみを使用するボットでオンラインメンバーリストに表示されている場合 ``True`` を返します。\"\n\n#: ../../docstring of discord.PublicUserFlags.spammer:1\nmsgid \"Returns ``True`` if the user is flagged as a spammer by Discord.\"\nmsgstr \"ユーザーがDiscordによりスパマーとフラグ付けされている場合 ``True`` を返します。\"\n\n#: ../../docstring of discord.PublicUserFlags.active_developer:1\nmsgid \"Returns ``True`` if the user is an active developer.\"\nmsgstr \"ユーザーがアクティブな開発者の場合に ``True`` を返します。\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.PublicUserFlags.all:1\nmsgid \"List[:class:`UserFlags`]: Returns all public flags the user has.\"\nmsgstr \"List[:class:`UserFlags`]: ユーザーが持つすべての公開フラグを返します。\"\n\n#: ../../api.rst:5216\nmsgid \"MemberFlags\"\nmsgstr \"MemberFlags\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.MemberFlags:1\nmsgid \"Wraps up the Discord Guild Member flags\"\nmsgstr \"Discord ギルドメンバーのフラグをまとめます。\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.MemberFlags:9\nmsgid \"Checks if two MemberFlags are equal.\"\nmsgstr \"二つのMemberFlagsが等しいかを比較します。\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.MemberFlags:13\nmsgid \"Checks if two MemberFlags are not equal.\"\nmsgstr \"二つのMemberFlagsが等しいものではないか比較します。\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.MemberFlags:17\nmsgid \"Returns a MemberFlags instance with all enabled flags from both x and y.\"\nmsgstr \"x と y のどちらかにて有効化されたフラグを持つMemberFlagsインスタンスを返します。\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.MemberFlags:22\nmsgid \"Returns a MemberFlags instance with only flags enabled on both x and y.\"\nmsgstr \"x と y の両方にて有効化されたフラグのみを持つMemberFlagsインスタンスを返します。\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.MemberFlags:27\nmsgid \"Returns a MemberFlags instance with only flags enabled on only one of x or y, not on both.\"\nmsgstr \"x と y のいずれか一方のみにて有効化されたフラグのみを持つMemberFlagsインスタンスを返します。\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.MemberFlags:32\nmsgid \"Returns a MemberFlags instance with all flags inverted from x.\"\nmsgstr \"x のすべてのフラグが反転したMemberFlagsインスタンスを返します。\"\n\n#: ../../docstring of discord.MemberFlags.did_rejoin:1\nmsgid \"Returns ``True`` if the member left and rejoined the :attr:`~discord.Member.guild`.\"\nmsgstr \"メンバーが :attr:`~discord.Member.guild` を一度脱退し、再参加した場合に ``True`` を返します。\"\n\n#: ../../docstring of discord.MemberFlags.completed_onboarding:1\nmsgid \"Returns ``True`` if the member has completed onboarding.\"\nmsgstr \"メンバーがオンボーディングを完了した場合に ``True`` を返します。\"\n\n#: ../../docstring of discord.MemberFlags.bypasses_verification:1\nmsgid \"Returns ``True`` if the member can bypass the guild verification requirements.\"\nmsgstr \"メンバーがギルドの認証要件をバイパスできる場合に ``True`` を返します。\"\n\n#: ../../docstring of discord.MemberFlags.started_onboarding:1\nmsgid \"Returns ``True`` if the member has started onboarding.\"\nmsgstr \"メンバーがオンボーディングを開始した場合に ``True`` を返します。\"\n\n#: ../../api.rst:5224\nmsgid \"AttachmentFlags\"\nmsgstr \"\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.AttachmentFlags:1\nmsgid \"Wraps up the Discord Attachment flags\"\nmsgstr \"\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.AttachmentFlags:9\nmsgid \"Checks if two AttachmentFlags are equal.\"\nmsgstr \"\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.AttachmentFlags:13\nmsgid \"Checks if two AttachmentFlags are not equal.\"\nmsgstr \"\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.AttachmentFlags:17\nmsgid \"Returns a AttachmentFlags instance with all enabled flags from both x and y.\"\nmsgstr \"\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.AttachmentFlags:22\nmsgid \"Returns a AttachmentFlags instance with only flags enabled on both x and y.\"\nmsgstr \"\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.AttachmentFlags:27\nmsgid \"Returns a AttachmentFlags instance with only flags enabled on only one of x or y, not on both.\"\nmsgstr \"\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.AttachmentFlags:32\nmsgid \"Returns a AttachmentFlags instance with all flags inverted from x.\"\nmsgstr \"\"\n\n#: ../../docstring of discord.AttachmentFlags.clip:1\nmsgid \"Returns ``True`` if the attachment is a clip.\"\nmsgstr \"\"\n\n#: ../../docstring of discord.AttachmentFlags.thumbnail:1\nmsgid \"Returns ``True`` if the attachment is a thumbnail.\"\nmsgstr \"\"\n\n#: ../../docstring of discord.AttachmentFlags.remix:1\nmsgid \"Returns ``True`` if the attachment has been edited using the remix feature.\"\nmsgstr \"\"\n\n#: ../../api.rst:5232\nmsgid \"RoleFlags\"\nmsgstr \"\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.RoleFlags:1\nmsgid \"Wraps up the Discord Role flags\"\nmsgstr \"\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.RoleFlags:9\nmsgid \"Checks if two RoleFlags are equal.\"\nmsgstr \"\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.RoleFlags:13\nmsgid \"Checks if two RoleFlags are not equal.\"\nmsgstr \"\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.RoleFlags:17\nmsgid \"Returns a RoleFlags instance with all enabled flags from both x and y.\"\nmsgstr \"\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.RoleFlags:22\nmsgid \"Returns a RoleFlags instance with only flags enabled on both x and y.\"\nmsgstr \"\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.RoleFlags:27\nmsgid \"Returns a RoleFlags instance with only flags enabled on only one of x or y, not on both.\"\nmsgstr \"\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.RoleFlags:32\nmsgid \"Returns a RoleFlags instance with all flags inverted from x.\"\nmsgstr \"\"\n\n#: ../../docstring of discord.RoleFlags.in_prompt:1\nmsgid \"Returns ``True`` if the role can be selected by members in an onboarding prompt.\"\nmsgstr \"\"\n\n#: ../../api.rst:5240\nmsgid \"SKUFlags\"\nmsgstr \"\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.SKUFlags:1\nmsgid \"Wraps up the Discord SKU flags\"\nmsgstr \"\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.SKUFlags:9\nmsgid \"Checks if two SKUFlags are equal.\"\nmsgstr \"\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.SKUFlags:13\nmsgid \"Checks if two SKUFlags are not equal.\"\nmsgstr \"\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.SKUFlags:17\nmsgid \"Returns a SKUFlags instance with all enabled flags from both x and y.\"\nmsgstr \"\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.SKUFlags:22\nmsgid \"Returns a SKUFlags instance with only flags enabled on both x and y.\"\nmsgstr \"\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.SKUFlags:27\nmsgid \"Returns a SKUFlags instance with only flags enabled on only one of x or y, not on both.\"\nmsgstr \"\"\n\n#: ../../../discord/flags.py:docstring of discord.flags.SKUFlags:32\nmsgid \"Returns a SKUFlags instance with all flags inverted from x.\"\nmsgstr \"\"\n\n#: ../../docstring of discord.SKUFlags.available:1\nmsgid \"Returns ``True`` if the SKU is available for purchase.\"\nmsgstr \"\"\n\n#: ../../docstring of discord.SKUFlags.guild_subscription:1\nmsgid \"Returns ``True`` if the SKU is a guild subscription.\"\nmsgstr \"\"\n\n#: ../../docstring of discord.SKUFlags.user_subscription:1\nmsgid \"Returns ``True`` if the SKU is a user subscription.\"\nmsgstr \"\"\n\n#: ../../api.rst:5248\nmsgid \"ForumTag\"\nmsgstr \"ForumTag\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.ForumTag:1\nmsgid \"Represents a forum tag that can be applied to a thread within a :class:`ForumChannel`.\"\nmsgstr \":class:`ForumChannel` 内のスレッドに適用できるフォーラムタグを表します。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.ForumTag:9\nmsgid \"Checks if two forum tags are equal.\"\nmsgstr \"二つのフォーラムタグが等しいかを比較します。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.ForumTag:13\nmsgid \"Checks if two forum tags are not equal.\"\nmsgstr \"二つのフォーラムタグが等しいものではないか比較します。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.ForumTag:17\nmsgid \"Returns the forum tag's hash.\"\nmsgstr \"フォーラムタグのハッシュ値を返します。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.ForumTag:21\nmsgid \"Returns the forum tag's name.\"\nmsgstr \"フォーラムタグの名前を返します。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.ForumTag:26\nmsgid \"The ID of the tag. If this was manually created then the ID will be ``0``.\"\nmsgstr \"タグの ID です。これが手動で作成された場合、ID は ``0`` になります。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.ForumTag:38\nmsgid \"Whether this tag can only be added or removed by a moderator with the :attr:`~Permissions.manage_threads` permission.\"\nmsgstr \":attr:`~Permissions.manage_threads` 権限を有するモデレータのみ、タグを追加除去できるか。\"\n\n#: ../../../discord/channel.py:docstring of discord.channel.ForumTag:45\nmsgid \"The emoji that is used to represent this tag. Note that if the emoji is a custom emoji, it will *not* have name information.\"\nmsgstr \"このタグを表すために使用される絵文字。絵文字がカスタム絵文字の場合、名前情報は *提供されません* 。\"\n\n#: ../../api.rst:5257\nmsgid \"Exceptions\"\nmsgstr \"例外\"\n\n#: ../../api.rst:5259\nmsgid \"The following exceptions are thrown by the library.\"\nmsgstr \"以下の例外がライブラリにより送出されます。\"\n\n#: ../../../discord/errors.py:docstring of discord.errors.DiscordException:1\nmsgid \"Base exception class for discord.py\"\nmsgstr \"discord.py の基本例外クラス\"\n\n#: ../../../discord/errors.py:docstring of discord.errors.DiscordException:3\nmsgid \"Ideally speaking, this could be caught to handle any exceptions raised from this library.\"\nmsgstr \"理想的には、このライブラリから発生した例外をすべて処理するために、これを捕捉することができます。\"\n\n#: ../../../discord/errors.py:docstring of discord.errors.ClientException:1\nmsgid \"Exception that's raised when an operation in the :class:`Client` fails.\"\nmsgstr \":class:`Client` での操作が失敗したときに送出される例外。\"\n\n#: ../../../discord/errors.py:docstring of discord.errors.ClientException:3\nmsgid \"These are usually for exceptions that happened due to user input.\"\nmsgstr \"これらは通常、ユーザー入力によって発生した例外です。\"\n\n#: ../../../discord/errors.py:docstring of discord.errors.LoginFailure:1\nmsgid \"Exception that's raised when the :meth:`Client.login` function fails to log you in from improper credentials or some other misc. failure.\"\nmsgstr \":meth:`Client.login` 関数が不適切な認証情報またはその他の問題によりログインに失敗した場合に送出する例外。\"\n\n#: ../../../discord/errors.py:docstring of discord.errors.HTTPException:1\nmsgid \"Exception that's raised when an HTTP request operation fails.\"\nmsgstr \"HTTPリクエスト操作に失敗したときに発生する例外です。\"\n\n#: ../../../discord/errors.py:docstring of discord.errors.HTTPException:5\nmsgid \"The response of the failed HTTP request. This is an instance of :class:`aiohttp.ClientResponse`. In some cases this could also be a :class:`requests.Response`.\"\nmsgstr \"失敗したHTTPリクエストのレスポンス。これは :class:`aiohttp.ClientResponse` のインスタンスです。場合によっては、 :class:`requests.Response` になるかもしれません。\"\n\n#: ../../../discord/errors.py:docstring of discord.errors.HTTPException:9\nmsgid \":class:`aiohttp.ClientResponse`\"\nmsgstr \":class:`aiohttp.ClientResponse`\"\n\n#: ../../../discord/errors.py:docstring of discord.errors.HTTPException:13\nmsgid \"The text of the error. Could be an empty string.\"\nmsgstr \"エラーのテキスト。空文字列である可能性があります。\"\n\n#: ../../../discord/errors.py:docstring of discord.errors.HTTPException:19\nmsgid \"The status code of the HTTP request.\"\nmsgstr \"HTTP リクエストのステータスコード。\"\n\n#: ../../../discord/errors.py:docstring of discord.errors.HTTPException:25\nmsgid \"The Discord specific error code for the failure.\"\nmsgstr \"失敗したときのDiscord固有のエラーコード。\"\n\n#: ../../../discord/errors.py:docstring of discord.errors.RateLimited:1\nmsgid \"Exception that's raised for when status code 429 occurs and the timeout is greater than the configured maximum using the ``max_ratelimit_timeout`` parameter in :class:`Client`.\"\nmsgstr \"ステータスコード429が発生し、タイムアウトが :class:`Client` の ``max_ratelimit_timeout`` パラメータで指定された最大値を超えた場合に送出される例外。\"\n\n#: ../../../discord/errors.py:docstring of discord.errors.RateLimited:5\nmsgid \"This is not raised during global ratelimits.\"\nmsgstr \"これは、グローバルのレート制限では発生しません。\"\n\n#: ../../../discord/errors.py:docstring of discord.errors.RateLimited:7\nmsgid \"Since sometimes requests are halted pre-emptively before they're even made, this **does not** subclass :exc:`HTTPException`.\"\nmsgstr \"リクエストが実際に行われる前に送出されることがあるため、これは :exc:`HTTPException` をサブクラス **しません** 。\"\n\n#: ../../../discord/errors.py:docstring of discord.errors.RateLimited:14\nmsgid \"The amount of seconds that the client should wait before retrying the request.\"\nmsgstr \"リクエストを再試行する前にクライアントが待機すべき秒数。\"\n\n#: ../../../discord/errors.py:docstring of discord.errors.Forbidden:1\nmsgid \"Exception that's raised for when status code 403 occurs.\"\nmsgstr \"ステータスコード403が発生したときに発生する例外です。\"\n\n#: ../../../discord/errors.py:docstring of discord.errors.Forbidden:3\n#: ../../../discord/errors.py:docstring of discord.errors.NotFound:3\nmsgid \"Subclass of :exc:`HTTPException`\"\nmsgstr \":exc:`HTTPException` のサブクラス\"\n\n#: ../../../discord/errors.py:docstring of discord.errors.NotFound:1\nmsgid \"Exception that's raised for when status code 404 occurs.\"\nmsgstr \"ステータスコード404が発生したときに発生する例外です。\"\n\n#: ../../../discord/errors.py:docstring of discord.errors.DiscordServerError:1\nmsgid \"Exception that's raised for when a 500 range status code occurs.\"\nmsgstr \"500番台のステータスコードが発生したときに発生する例外です。\"\n\n#: ../../../discord/errors.py:docstring of discord.errors.DiscordServerError:3\nmsgid \"Subclass of :exc:`HTTPException`.\"\nmsgstr \":exc:`HTTPException` のサブクラス。\"\n\n#: ../../../discord/errors.py:docstring of discord.errors.InvalidData:1\nmsgid \"Exception that's raised when the library encounters unknown or invalid data from Discord.\"\nmsgstr \"ライブラリがDiscordから不明または無効なデータに遭遇した場合に発生する例外です。\"\n\n#: ../../../discord/errors.py:docstring of discord.errors.GatewayNotFound:1\nmsgid \"An exception that is raised when the gateway for Discord could not be found\"\nmsgstr \"Discordのゲートウェイが見つからなかったときに発生する例外です。\"\n\n#: ../../../discord/errors.py:docstring of discord.errors.ConnectionClosed:1\nmsgid \"Exception that's raised when the gateway connection is closed for reasons that could not be handled internally.\"\nmsgstr \"内部で処理できなかった理由でゲートウェイ接続が閉じられたときに送出される例外。\"\n\n#: ../../../discord/errors.py:docstring of discord.errors.ConnectionClosed:6\nmsgid \"The close code of the websocket.\"\nmsgstr \"WebSocketのクローズコード。\"\n\n#: ../../../discord/errors.py:docstring of discord.errors.ConnectionClosed:12\nmsgid \"The reason provided for the closure.\"\nmsgstr \"切断の理由。\"\n\n#: ../../../discord/errors.py:docstring of discord.errors.ConnectionClosed:18\n#: ../../../discord/errors.py:docstring of discord.errors.PrivilegedIntentsRequired:13\nmsgid \"The shard ID that got closed if applicable.\"\nmsgstr \"該当する場合、閉じられたシャードID。\"\n\n#: ../../../discord/errors.py:docstring of discord.errors.PrivilegedIntentsRequired:1\nmsgid \"Exception that's raised when the gateway is requesting privileged intents but they're not ticked in the developer page yet.\"\nmsgstr \"ゲートウェイが特権インテントを要求しているが、開発者ページではまだ有効にされていない場合に発生する例外です。\"\n\n#: ../../../discord/errors.py:docstring of discord.errors.PrivilegedIntentsRequired:4\nmsgid \"Go to https://discord.com/developers/applications/ and enable the intents that are required. Currently these are as follows:\"\nmsgstr \"https://discord.com/developers/applications/ にアクセスし、必要なインテントを有効にします。現在、これらは以下の通りです。\"\n\n#: ../../../discord/errors.py:docstring of discord.errors.PrivilegedIntentsRequired:7\nmsgid \":attr:`Intents.members`\"\nmsgstr \":attr:`Intents.members`\"\n\n#: ../../../discord/errors.py:docstring of discord.errors.PrivilegedIntentsRequired:8\nmsgid \":attr:`Intents.presences`\"\nmsgstr \":attr:`Intents.presences`\"\n\n#: ../../../discord/errors.py:docstring of discord.errors.PrivilegedIntentsRequired:9\nmsgid \":attr:`Intents.message_content`\"\nmsgstr \":attr:`Intents.message_content`\"\n\n#: ../../../discord/errors.py:docstring of discord.errors.InteractionResponded:1\nmsgid \"Exception that's raised when sending another interaction response using :class:`InteractionResponse` when one has already been done before.\"\nmsgstr \":class:`InteractionResponse` を用いてインタラクションに応答しようとしたときに、すでに応答があった場合に送出される例外。\"\n\n#: ../../../discord/errors.py:docstring of discord.errors.InteractionResponded:4\nmsgid \"An interaction can only respond once.\"\nmsgstr \"インタラクションは一度だけ応答します。\"\n\n#: ../../../discord/errors.py:docstring of discord.errors.InteractionResponded:10\nmsgid \"The interaction that's already been responded to.\"\nmsgstr \"すでに応答されたインタラクション。\"\n\n#: ../../../discord/errors.py:docstring of discord.errors.InteractionResponded:12\nmsgid \":class:`Interaction`\"\nmsgstr \":class:`Interaction`\"\n\n#: ../../../discord/opus.py:docstring of discord.opus.OpusError:1\nmsgid \"An exception that is thrown for libopus related errors.\"\nmsgstr \"libopus 関連のエラーに対して送出される例外。\"\n\n#: ../../../discord/opus.py:docstring of discord.opus.OpusError:5\nmsgid \"The error code returned.\"\nmsgstr \"返されたエラーコード。\"\n\n#: ../../../discord/opus.py:docstring of discord.opus.OpusNotLoaded:1\nmsgid \"An exception that is thrown for when libopus is not loaded.\"\nmsgstr \"libopus がロードされていないときに送出される例外。\"\n\n#: ../../api.rst:5294\nmsgid \"Exception Hierarchy\"\nmsgstr \"例外の階層構造\"\n\n#: ../../api.rst:5311\nmsgid \":exc:`Exception`\"\nmsgstr \":exc:`Exception`\"\n\n#: ../../api.rst:5311\nmsgid \":exc:`DiscordException`\"\nmsgstr \":exc:`DiscordException`\"\n\n#: ../../api.rst:5304\nmsgid \":exc:`ClientException`\"\nmsgstr \":exc:`ClientException`\"\n\n#: ../../api.rst:5301\nmsgid \":exc:`InvalidData`\"\nmsgstr \":exc:`InvalidData`\"\n\n#: ../../api.rst:5302\nmsgid \":exc:`LoginFailure`\"\nmsgstr \":exc:`LoginFailure`\"\n\n#: ../../api.rst:5303\nmsgid \":exc:`ConnectionClosed`\"\nmsgstr \":exc:`ConnectionClosed`\"\n\n#: ../../api.rst:5304\nmsgid \":exc:`PrivilegedIntentsRequired`\"\nmsgstr \":exc:`PrivilegedIntentsRequired`\"\n\n#: ../../api.rst:5305\nmsgid \":exc:`InteractionResponded`\"\nmsgstr \":exc:`InteractionResponded`\"\n\n#: ../../api.rst:5306\nmsgid \":exc:`GatewayNotFound`\"\nmsgstr \":exc:`GatewayNotFound`\"\n\n#: ../../api.rst:5310\nmsgid \":exc:`HTTPException`\"\nmsgstr \":exc:`HTTPException`\"\n\n#: ../../api.rst:5308\nmsgid \":exc:`Forbidden`\"\nmsgstr \":exc:`Forbidden`\"\n\n#: ../../api.rst:5309\nmsgid \":exc:`NotFound`\"\nmsgstr \":exc:`NotFound`\"\n\n#: ../../api.rst:5310\nmsgid \":exc:`DiscordServerError`\"\nmsgstr \":exc:`DiscordServerError`\"\n\n#: ../../api.rst:5311\nmsgid \":exc:`app_commands.CommandSyncFailure`\"\nmsgstr \":exc:`app_commands.CommandSyncFailure`\"\n\n#: ../../api.rst:5312\nmsgid \":exc:`RateLimited`\"\nmsgstr \":exc:`RateLimited`\"\n\n"
  },
  {
    "path": "docs/locale/ja/LC_MESSAGES/discord.po",
    "content": "msgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: discordpy\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2023-06-21 01:17+0000\\n\"\n\"PO-Revision-Date: 2024-04-17 02:43\\n\"\n\"Last-Translator: \\n\"\n\"Language-Team: Japanese\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Plural-Forms: nplurals=1; plural=0;\\n\"\n\"X-Crowdin-Project: discordpy\\n\"\n\"X-Crowdin-Project-ID: 362783\\n\"\n\"X-Crowdin-Language: ja\\n\"\n\"X-Crowdin-File: discord.pot\\n\"\n\"X-Crowdin-File-ID: 72\\n\"\n\"Language: ja_JP\\n\"\n\n#: ../../discord.rst:6\nmsgid \"Creating a Bot Account\"\nmsgstr \"Botアカウント作成\"\n\n#: ../../discord.rst:8\nmsgid \"In order to work with the library and the Discord API in general, we must first create a Discord Bot account.\"\nmsgstr \"ライブラリとDiscord APIを使用するには、BotのDiscordアカウントを用意する必要があります。\"\n\n#: ../../discord.rst:10\nmsgid \"Creating a Bot account is a pretty straightforward process.\"\nmsgstr \"Botのアカウント作成はとても簡単です。\"\n\n#: ../../discord.rst:12\n#: ../../discord.rst:61\nmsgid \"Make sure you're logged on to the `Discord website <https://discord.com>`_.\"\nmsgstr \"`Discordのウェブサイト <https://discord.com>`_ にログインできていることを確認してください。\"\n\n#: ../../discord.rst:13\n#: ../../discord.rst:62\nmsgid \"Navigate to the `application page <https://discord.com/developers/applications>`_\"\nmsgstr \"`Applicationページ <https://discord.com/developers/applications>`_ に移動します。\"\n\n#: ../../discord.rst:14\nmsgid \"Click on the \\\"New Application\\\" button.\"\nmsgstr \"「New Application」ボタンをクリックします。\"\n\n#: ../../discord.rst:0\nmsgid \"The new application button.\"\nmsgstr \"「New Application」ボタン\"\n\n#: ../../discord.rst:19\nmsgid \"Give the application a name and click \\\"Create\\\".\"\nmsgstr \"アプリケーションの名前を決めて、「Create」をクリックします。\"\n\n#: ../../discord.rst:0\nmsgid \"The new application form filled in.\"\nmsgstr \"記入された新しいアプリケーションフォーム\"\n\n#: ../../discord.rst:24\nmsgid \"Navigate to the \\\"Bot\\\" tab to configure it.\"\nmsgstr \"\\\"Bot\\\" タブに移動して設定します。\"\n\n#: ../../discord.rst:25\nmsgid \"Make sure that **Public Bot** is ticked if you want others to invite your bot.\"\nmsgstr \"他人にBotの招待を許可する場合には、 **Public Bot** にチェックを入れてください。\"\n\n#: ../../discord.rst:27\nmsgid \"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**.\"\nmsgstr \"また、必要なサービスを開発している場合を除いて、 **Require OAuth2 Code Grant** がオフになっていることを確認する必要があります。わからない場合は **チェックを外してください** 。\"\n\n#: ../../discord.rst:0\nmsgid \"How the Bot User options should look like for most people.\"\nmsgstr \"Botユーザーの設定がほとんどの人にとってどのように見えるか\"\n\n#: ../../discord.rst:33\nmsgid \"Copy the token using the \\\"Copy\\\" button.\"\nmsgstr \"「Copy」ボタンを使ってトークンをコピーします。\"\n\n#: ../../discord.rst:35\nmsgid \"**This is not the Client Secret at the General Information page.**\"\nmsgstr \"**General InformationページのClient Secretではないので注意してください。**\"\n\n#: ../../discord.rst:39\nmsgid \"It should be worth noting that this token is essentially your bot's password. You should **never** share this with 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.\"\nmsgstr \"このトークンは、あなたのBotのパスワードと同義であることを覚えておきましょう。誰か他の人とトークンを共有することは絶対に避けてください。トークンがあれば、誰かがあなたのBotにログインし、サーバーから退出したり、サーバー内のすべてのメンバーをBANしたり、すべての人にメンションを送るなどといった悪質な行為を行える様になってしまいます。\"\n\n#: ../../discord.rst:44\nmsgid \"The possibilities are endless, so **do not share this token.**\"\nmsgstr \"可能性は無限にあるので、絶対に **トークンを共有しないでください** 。\"\n\n#: ../../discord.rst:46\nmsgid \"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.\"\nmsgstr \"誤ってトークンを流出させてしまった場合、可能な限り速急に「Regenerate」ボタンをクリックしましょう。これによって古いトークンが無効になり、新しいトークンが再生成されます。今度からは新しいトークンを利用してログインを行う必要があります。\"\n\n#: ../../discord.rst:50\nmsgid \"And that's it. You now have a bot account and you can login with that token.\"\nmsgstr \"以上です。 これでボットアカウントが作成され、そのトークンでログインできます。\"\n\n#: ../../discord.rst:55\nmsgid \"Inviting Your Bot\"\nmsgstr \"Botを招待する\"\n\n#: ../../discord.rst:57\nmsgid \"So you've made a Bot User but it's not actually in any server.\"\nmsgstr \"Botのユーザーを作成しましたが、現時点ではどのサーバーにも参加していない状態です。\"\n\n#: ../../discord.rst:59\nmsgid \"If you want to invite your bot you must create an invite URL for it.\"\nmsgstr \"Botを招待したい場合は、そのための招待URLを作成する必要があります。\"\n\n#: ../../discord.rst:63\nmsgid \"Click on your bot's page.\"\nmsgstr \"Botのページを開きます。\"\n\n#: ../../discord.rst:64\nmsgid \"Go to the \\\"OAuth2 > URL Generator\\\" tab.\"\nmsgstr \"\\\"OAuth2 > URL Generator\\\" タブに移動します。\"\n\n#: ../../discord.rst:0\nmsgid \"How the OAuth2 page should look like.\"\nmsgstr \"OAuth2ページがどのように見えるか\"\n\n#: ../../discord.rst:69\nmsgid \"Tick the \\\"bot\\\" checkbox under \\\"scopes\\\".\"\nmsgstr \"「scopes」下にある「bot」チェックボックスを選択してください。\"\n\n#: ../../discord.rst:0\nmsgid \"The scopes checkbox with \\\"bot\\\" ticked.\"\nmsgstr \"「bot」がチェックされたスコープのチェックボックス\"\n\n#: ../../discord.rst:74\nmsgid \"Tick the permissions required for your bot to function under \\\"Bot Permissions\\\".\"\nmsgstr \"「Bot Permissions」からBotの機能に必要な権限を選択してください。\"\n\n#: ../../discord.rst:76\nmsgid \"Please be aware of the consequences of requiring your bot to have the \\\"Administrator\\\" permission.\"\nmsgstr \"Botに「管理者」権限を要求させることによる影響は認識しておきましょう。\"\n\n#: ../../discord.rst:78\nmsgid \"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.\"\nmsgstr \"二段階認証が有効になっているサーバーにボットを追加する場合、ボットの所有者は特定の動作や権限を与えるために二段階認証を有効化させる必要があります。詳細は `二段階認証のサポートページ <https://support.discord.com/hc/ja/articles/219576828-Setting-up-Two-Factor-Authentication>`_ を参照してください。\"\n\n#: ../../discord.rst:0\nmsgid \"The permission checkboxes with some permissions checked.\"\nmsgstr \"いくつかの権限にチェックが入った権限のチェックボックス\"\n\n#: ../../discord.rst:83\nmsgid \"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\\\".\"\nmsgstr \"結果的に生成されたURLを使ってBotをサーバーに追加することができます。URLをコピーしてブラウザに貼り付け、Botを招待したいサーバーを選択した後、「認証」をクリックしてください。\"\n\n#: ../../discord.rst:88\nmsgid \"The person adding the bot needs \\\"Manage Server\\\" permissions to do so.\"\nmsgstr \"Botを追加する人には「サーバー管理」権限が必要です。\"\n\n#: ../../discord.rst:90\nmsgid \"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`.\"\nmsgstr \"このURLを実行時に動的に生成したい場合は、 :class:`discord.Permissions` インターフェイスから :func:`discord.utils.oauth_url` を使用できます。\"\n\n"
  },
  {
    "path": "docs/locale/ja/LC_MESSAGES/ext/commands/api.po",
    "content": "msgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: discordpy\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2023-06-21 01:17+0000\\n\"\n\"PO-Revision-Date: 2023-06-21 01:20\\n\"\n\"Last-Translator: \\n\"\n\"Language-Team: Japanese\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Plural-Forms: nplurals=1; plural=0;\\n\"\n\"X-Crowdin-Project: discordpy\\n\"\n\"X-Crowdin-Project-ID: 362783\\n\"\n\"X-Crowdin-Language: ja\\n\"\n\"X-Crowdin-File: /ext/commands/api.pot\\n\"\n\"X-Crowdin-File-ID: 62\\n\"\n\"Language: ja_JP\\n\"\n\n#: ../../ext/commands/api.rst:4\nmsgid \"API Reference\"\nmsgstr \"APIリファレンス\"\n\n#: ../../ext/commands/api.rst:6\nmsgid \"The following section outlines the API of discord.py's command extension module.\"\nmsgstr \"この項目ではdiscord.pyのAPIが持つコマンド拡張モジュールについて解説します。\"\n\n#: ../../ext/commands/api.rst:11\nmsgid \"Bots\"\nmsgstr \"Bot\"\n\n#: ../../ext/commands/api.rst:14\nmsgid \"Bot\"\nmsgstr \"Bot\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.Bot:1\nmsgid \"Represents a Discord bot.\"\nmsgstr \"Discord Botを表します。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.Bot:3\nmsgid \"This class is a subclass of :class:`discord.Client` and as a result anything that you can do with a :class:`discord.Client` you can do with this bot.\"\nmsgstr \"このクラスは :class:`discord.Client` のサブクラスのため、 :class:`discord.Client` でできることと同じことをこのBotで行うことができます。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.Bot:7\nmsgid \"This class also subclasses :class:`.GroupMixin` to provide the functionality to manage commands.\"\nmsgstr \"また、 :class:`.GroupMixin` も継承しており、コマンド管理の機能も使用可能です。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.Bot:10\nmsgid \"Unlike :class:`discord.Client`, this class does not require manually setting a :class:`~discord.app_commands.CommandTree` and is automatically set upon instantiating the class.\"\nmsgstr \":class:`discord.Client` とは異なり、このクラスでは :class:`~discord.app_commands.CommandTree` を手動で設定する必要はなく、クラスのインスタンスを作成する際に自動的に設定されます。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.Bot:18\nmsgid \"Asynchronously initialises the bot and automatically cleans up.\"\nmsgstr \"非同期的にボットを初期化し自動でクリーンアップします。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.Bot:24\nmsgid \"The command prefix is what the message content must contain initially to have a command invoked. This prefix could either be a string to indicate what the prefix should be, or a callable that takes in the bot as its first parameter and :class:`discord.Message` as its second parameter and returns the prefix. This is to facilitate \\\"dynamic\\\" command prefixes. This callable can be either a regular function or a coroutine.\"\nmsgstr \"コマンドの接頭詞とは、コマンドの判定のためにメッセージの先頭に付けなければならないものです。接頭詞には、そのまま接頭詞として使用する文字列、または :class:`discord.Message` を二つ目の引数として受け取り、接頭詞を返す呼び出し可能な関数を渡すことができます。これは「動的な」接頭詞の実装を容易にするためです。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.Bot:32\nmsgid \"An empty string as the prefix always matches, enabling prefix-less command invocation. While this may be useful in DMs it should be avoided in servers, as it's likely to cause performance issues and unintended command invocations.\"\nmsgstr \"接頭詞に空文字列を渡せば、接頭詞なしでコマンドの呼び出しができます。これはDM上では有用ですが、サーバーでは意図せずコマンドを呼び出してしまうことに繋がるため、避けるべきです。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.Bot:37\nmsgid \"The command prefix could also be an iterable of strings indicating that multiple checks for the prefix should be used and the first one to match will be the invocation prefix. You can get this prefix via :attr:`.Context.prefix`.\"\nmsgstr \"コマンドの接頭辞を文字列のイテラブルで指定することもできます。この場合、接頭辞を複数回チェックし、最初にマッチしたものを呼び出し時の接頭辞とします。使用された接頭辞は、 :attr:`.Context.prefix` で取得することができます。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.Bot:44\nmsgid \"When passing multiple prefixes be careful to not pass a prefix that matches a longer prefix occurring later in the sequence.  For example, if the command prefix is ``('!', '!?')``  the ``'!?'`` prefix will never be matched to any message as the previous one matches messages starting with ``!?``. This is especially important when passing an empty string, it should always be last as no prefix after it will be matched.\"\nmsgstr \"複数の接頭辞を渡すとき、後の接頭辞にマッチする接頭辞を、それよりも前に渡さないよう注意してください。たとえば、接頭辞が ``('!', '!?')`` のとき、 ``!?`` の接頭辞は、その前のものが ``!?`` で始まるメッセージにマッチするため、どのメッセージにも反応しません。これは空文字列を渡すときは特に重要で、その後の接頭辞は無視されるため、空文字列は最後に置かないといけません。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.Bot:54\nmsgid \"Whether the commands should be case insensitive. Defaults to ``False``. This attribute does not carry over to groups. You must set it to every group if you require group commands to be case insensitive as well.\"\nmsgstr \"コマンド名で大文字と小文字を区別するかどうか。デフォルトでは\\\\ ``False``\\\\ です。この属性はグループに適用されません。もしグループコマンドも大文字と小文字を区別したくない場合、すべてのグループで設定しなければなりません。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.Bot:0\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.Bot:0\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.Bot:0\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.Bot:0\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.Bot:0\nmsgid \"type\"\nmsgstr \"型\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.Bot:58\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.Bot:102\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.is_owner:21\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command:49\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command:86\nmsgid \":class:`bool`\"\nmsgstr \":class:`bool`\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.Bot:62\nmsgid \"The content prefixed into the default help message.\"\nmsgstr \"デフォルトのヘルプメッセージの最初に表示される文字列。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.Bot:64\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command:10\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command:79\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.Command.full_parent_name:6\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.Command.qualified_name:7\nmsgid \":class:`str`\"\nmsgstr \":class:`str`\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.Bot:68\nmsgid \"The help command implementation to use. This can be dynamically set at runtime. To remove the help command pass ``None``. For more information on implementing a help command, see :ref:`ext_commands_help_command`.\"\nmsgstr \"使用するヘルプコマンドの実装。これは、実行時でも動的に設定できます。ヘルプコマンドを削除するには、``None`` を引数に入れてください。ヘルプ コマンドの実装の詳細については、 :ref:`ext_commands_help_command` を参照してください。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.Bot:72\nmsgid \"Optional[:class:`.HelpCommand`]\"\nmsgstr \"Optional[:class:`.HelpCommand`]\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.Bot:76\nmsgid \"The user ID that owns the bot. If this is not set and is then queried via :meth:`.is_owner` then it is fetched automatically using :meth:`~.Bot.application_info`.\"\nmsgstr \"Botを所有するユーザーのID。 もし設定されていない場合、 :meth:`.is_owner` が呼び出されたとき、 :meth:`~.Bot.application_info` を用いて自動的に取得します。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.Bot:80\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.Bot.application_id:10\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.DefaultHelpCommand:36\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.MinimalHelpCommand:41\nmsgid \"Optional[:class:`int`]\"\nmsgstr \"Optional[:class:`int`]\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.Bot:84\nmsgid \"The user IDs that owns the bot. This is similar to :attr:`owner_id`. If this is not set and the application is team based, then it is fetched automatically using :meth:`~.Bot.application_info`. For performance reasons it is recommended to use a :class:`set` for the collection. You cannot set both ``owner_id`` and ``owner_ids``.\"\nmsgstr \"Botを所有するユーザーのID群。これは :attr:`owner_id` と同様のものです。もしこの変数が設定されておらず、Botのアプリケーションがチームに帰属する場合、自動的に :meth:`~.Bot.application_info` から取得されます。パフォーマンス上の問題により、このID群を操作するにあたって :class:`set` を使うことが推奨されています。 ``owner_id`` と ``owner_ids`` は、どちらか片方しか設定することができません。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.Bot:92\nmsgid \"Optional[Collection[:class:`int`]]\"\nmsgstr \"Optional[Collection[:class:`int`]]\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.Bot:96\nmsgid \"Whether to strip whitespace characters after encountering the command prefix. This allows for ``!   hello`` and ``!hello`` to both work if the ``command_prefix`` is set to ``!``. Defaults to ``False``.\"\nmsgstr \"接頭辞の後の空白を除去するかどうか。 ``command_prefix`` が ``!`` に設定されているときに、これが有効だと ``! hello`` 、 ``!hello`` 両方が動作するようになります。 デフォルトは ``False`` です。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.Bot:106\nmsgid \"The type of application command tree to use. Defaults to :class:`~discord.app_commands.CommandTree`.\"\nmsgstr \"使用するアプリケーションコマンドツリーの型を指定します。デフォルトは :class:`~discord.app_commands.CommandTree` です。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.Bot:110\nmsgid \"Type[:class:`~discord.app_commands.CommandTree`]\"\nmsgstr \"Type[:class:`~discord.app_commands.CommandTree`]\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.after_invoke:1\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.after_invoke:1\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.after_invoke:1\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.after_invoke:1\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.after_invoke:1\nmsgid \"A decorator that registers a coroutine as a post-invoke hook.\"\nmsgstr \"コルーチンを、実行後に呼び出すフックとして登録するデコレータ。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.after_invoke:3\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.after_invoke:3\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.after_invoke:3\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.after_invoke:3\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.after_invoke:3\nmsgid \"A post-invoke hook is called directly after the command is called. This makes it a useful function to clean-up database connections or any type of clean up required.\"\nmsgstr \"実行後呼び出しフックは、コマンドが呼び出された直後に呼び出されます。 これにより、データベース接続をクリーンアップしたり、必要なクリーンアップを行うための便利な機能になります。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.after_invoke:7\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.after_invoke:7\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.after_invoke:7\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.after_invoke:7\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.after_invoke:7\nmsgid \"This post-invoke hook takes a sole parameter, a :class:`.Context`.\"\nmsgstr \"この実行後呼び出しフックは、 :class:`.Context` を単独の引数として取ります。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.after_invoke:11\nmsgid \"Similar to :meth:`~.Bot.before_invoke`\\\\, this is not called unless checks and argument parsing procedures succeed. This hook is, however, **always** called regardless of the internal command callback raising an error (i.e. :exc:`.CommandInvokeError`\\\\). This makes it ideal for clean-up scenarios.\"\nmsgstr \":meth:`~.Bot.before_invoke`\\\\と似て、チェックと引数展開が成功しない限り、これが呼び出されることはありません。ただし、このフックは、コマンドのエラー発生にかかわらず(例えば、:exc:`.CommandInvokeError`\\\\など)、**常時** 呼び出されます。そのため、クリーンアップするのに最適です。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.after_invoke:19\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.before_invoke:18\n#: ../../../discord/client.py:docstring of discord.client.Client.event:17\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.after_invoke:13\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.before_invoke:13\nmsgid \"``coro`` parameter is now positional-only.\"\nmsgstr \"``coro`` パラメータが位置指定のみになりました。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.after_invoke:0\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.before_invoke:0\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.add_check:0\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.add_cog:0\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.add_command:0\nmsgid \"Parameters\"\nmsgstr \"パラメータ\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.after_invoke:21\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.after_invoke:15\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.after_invoke:15\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.after_invoke:15\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.after_invoke:15\nmsgid \"The coroutine to register as the post-invoke hook.\"\nmsgstr \"実行後呼び出しフックとして登録するコルーチン。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.after_invoke:0\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.before_invoke:0\n#: ../../../discord/client.py:docstring of discord.client.Client.event:0\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.listen:0\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.add_cog:0\nmsgid \"Raises\"\nmsgstr \"例外\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.after_invoke:24\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.before_invoke:23\n#: ../../../discord/client.py:docstring of discord.client.Client.event:19\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.after_invoke:18\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.before_invoke:18\nmsgid \"The coroutine passed is not actually a coroutine.\"\nmsgstr \"渡された関数がコルーチンではない場合。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.before_invoke:1\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.before_invoke:1\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.before_invoke:1\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.before_invoke:1\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.before_invoke:1\nmsgid \"A decorator that registers a coroutine as a pre-invoke hook.\"\nmsgstr \"渡されたコルーチンを、実行前呼び出しフックとして登録するデコレータ。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.before_invoke:3\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.before_invoke:3\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.before_invoke:3\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.before_invoke:3\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.before_invoke:3\nmsgid \"A pre-invoke hook is called directly before the command is called. This makes it a useful function to set up database connections or any type of set up required.\"\nmsgstr \"実行前呼び出しフックは、コマンドが呼び出される前に呼び出されます。 これにより、データベース接続のセットアップや、必要なセットアップを行うにあたって便利です。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.before_invoke:7\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.before_invoke:7\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.before_invoke:7\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.before_invoke:7\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.before_invoke:7\nmsgid \"This pre-invoke hook takes a sole parameter, a :class:`.Context`.\"\nmsgstr \"この実行前呼び出しフックは、 :class:`.Context` を単独の引数として取ります。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.before_invoke:11\nmsgid \"The :meth:`~.Bot.before_invoke` and :meth:`~.Bot.after_invoke` hooks are only called if all checks and argument parsing procedures pass without error. If any check or argument parsing procedures fail then the hooks are not called.\"\nmsgstr \":meth:`~.Bot.before_invoke` と :meth:`~.Bot.after_invoke` は、すべてのチェックと引数解析が、例外を送出せずに渡された場合にのみ呼び出されます。 何らかのチェックまたは引数の解析に失敗した場合、これらのフックは呼び出されません。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.before_invoke:20\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.before_invoke:15\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.before_invoke:15\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.before_invoke:15\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.before_invoke:15\nmsgid \"The coroutine to register as the pre-invoke hook.\"\nmsgstr \"実行前呼び出しフックとして登録するコルーチン。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.check:1\nmsgid \"A decorator that adds a global check to the bot.\"\nmsgstr \"ボットにグローバルチェックを追加するデコレーター。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.check:3\nmsgid \"A global check is similar to a :func:`.check` that is applied on a per command basis except it is run before any command checks have been verified and applies to every command the bot has.\"\nmsgstr \"このグローバルチェックは、コマンドごとに適用される :func:`.check` と似ていますが、コマンドチェックが検証される前に実行され、かつボットが持つすべてのコマンドに適用される点で異なります。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.check:9\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.check_once:19\nmsgid \"This function can either be a regular function or a coroutine.\"\nmsgstr \"この関数は、通常の関数かコルーチン、どちらでも成り得ます。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.check:11\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.check_once:21\nmsgid \"Similar to a command :func:`.check`\\\\, this takes a single parameter of type :class:`.Context` and can only raise exceptions inherited from :exc:`.CommandError`.\"\nmsgstr \":func:`.check` コマンドと同様、 :class:`.Context` 型の単一のパラメータを取り、 :exc:`.CommandError` から継承された例外のみを投げることができます。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.check:16\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.check_once:26\n#: ../../../discord/client.py:docstring of discord.client.Client.event:8\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.listen:8\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.add_listener:13\nmsgid \"Example\"\nmsgstr \"例\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.check:25\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.check_once:35\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.add_check:8\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.add_listener:5\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.remove_check:8\nmsgid \"``func`` parameter is now positional-only.\"\nmsgstr \"``func`` 引数は位置限定引数になりました。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.check_once:1\nmsgid \"A decorator that adds a \\\"call once\\\" global check to the bot.\"\nmsgstr \"ボットに「一度だけ実行される」グローバルチェックを追加するデコレーター。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.check_once:3\nmsgid \"Unlike regular global checks, this one is called only once per :meth:`.invoke` call.\"\nmsgstr \"通常のグローバルチェックとは異なり、 :meth:`.invoke` の呼び出し毎に一度だけ実行されます。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.check_once:6\nmsgid \"Regular global checks are called whenever a command is called or :meth:`.Command.can_run` is called. This type of check bypasses that and ensures that it's called only once, even inside the default help command.\"\nmsgstr \"通常のグローバルチェックは、コマンドが呼び出されるか :meth:`.Command.can_run` が呼び出されるたび、実行されます。しかしこのグローバルチェックはそれを迂回し、デフォルトのhelpコマンドの中であっても、たった一度だけ呼ばれます。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.check_once:13\nmsgid \"When using this function the :class:`.Context` sent to a group subcommand may only parse the parent command and not the subcommands due to it being invoked once per :meth:`.Bot.invoke` call.\"\nmsgstr \"この関数を使用する場合、グループのサブコマンドに送信される :class:`.Context` は、 :meth:`.Bot.invoke` の呼び出しごとに一度だけ呼び出されるため、親コマンドの時にしかチェックされず、サブコマンドの時はチェックはされません。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.GroupMixin.command:1\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.GroupMixin.command:1\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.GroupMixin.command:1\nmsgid \"A shortcut decorator that invokes :func:`~discord.ext.commands.command` and adds it to the internal command list via :meth:`~.GroupMixin.add_command`.\"\nmsgstr \":func:`~discord.ext.commands.command` を呼び出し、 :meth:`~.GroupMixin.add_command` を介して内部コマンドリストに追加するショートカットデコレータ。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.GroupMixin.command:0\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.GroupMixin.group:0\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.hybrid_command:0\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.hybrid_group:0\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.application_info:0\nmsgid \"Returns\"\nmsgstr \"戻り値\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.GroupMixin.command:4\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.hybrid_command:4\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.GroupMixin.command:4\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.GroupMixin.command:4\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.hybrid.HybridGroup.command:4\nmsgid \"A decorator that converts the provided method into a Command, adds it to the bot, then returns it.\"\nmsgstr \"提供されたメソッドをCommandに変換し、Botに追加し、さらにCommandを返すデコレータ。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.GroupMixin.command:0\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.GroupMixin.group:0\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.hybrid_command:0\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.hybrid_group:0\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.application_info:0\nmsgid \"Return type\"\nmsgstr \"戻り値の型\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.GroupMixin.command:5\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.GroupMixin.command:5\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.GroupMixin.command:5\nmsgid \"Callable[..., :class:`Command`]\"\nmsgstr \"Callable[..., :class:`Command`]\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.event:1\nmsgid \"A decorator that registers an event to listen to.\"\nmsgstr \"受け取るイベントを登録するデコレータ。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.event:3\nmsgid \"You can find more info about the events on the :ref:`documentation below <discord-api-events>`.\"\nmsgstr \"イベントの詳細については :ref:`以下のドキュメント <discord-api-events>` を参照してください。\"\n\n#: ../../../discord/client.py:docstring of discord.client.Client.event:5\nmsgid \"The events must be a :ref:`coroutine <coroutine>`, if not, :exc:`TypeError` is raised.\"\nmsgstr \"イベントは :ref:`コルーチン <coroutine>` でなければいけません。違う場合は :exc:`TypeError` が発生します。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.GroupMixin.group:1\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.GroupMixin.group:1\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.GroupMixin.group:1\nmsgid \"A shortcut decorator that invokes :func:`.group` and adds it to the internal command list via :meth:`~.GroupMixin.add_command`.\"\nmsgstr \":func:`.group` を呼び出し、 :meth:`~.GroupMixin.add_command` を介して内部コマンドリストに追加するショートカットデコレータ。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.GroupMixin.group:4\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.hybrid_group:4\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.GroupMixin.group:4\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.GroupMixin.group:4\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.hybrid.HybridGroup.group:4\nmsgid \"A decorator that converts the provided method into a Group, adds it to the bot, then returns it.\"\nmsgstr \"提供されたメソッドをGroupに変換し、Botに追加し、そしてGroupを返すデコレータ。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.GroupMixin.group:5\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.GroupMixin.group:5\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.GroupMixin.group:5\nmsgid \"Callable[..., :class:`Group`]\"\nmsgstr \"Callable[..., :class:`Group`]\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.hybrid_command:1\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.hybrid.HybridGroup.command:1\nmsgid \"A shortcut decorator that invokes :func:`~discord.ext.commands.hybrid_command` and adds it to the internal command list via :meth:`add_command`.\"\nmsgstr \":func:`~discord.ext.commands.hybrid_command` を呼び出し、 :meth:`add_command` を介して内部コマンドリストに追加するショートカットデコレータ。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.hybrid_command:5\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.hybrid.HybridGroup.command:5\nmsgid \"Callable[..., :class:`HybridCommand`]\"\nmsgstr \"Callable[..., :class:`HybridCommand`]\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.hybrid_group:1\nmsgid \"A shortcut decorator that invokes :func:`~discord.ext.commands.hybrid_group` and adds it to the internal command list via :meth:`add_command`.\"\nmsgstr \":func:`~discord.ext.commands.hybrid_group` を呼び出し、 :meth:`add_command` を介して内部コマンドリストに追加するショートカットデコレータ。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.hybrid_group:5\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.hybrid.HybridGroup.group:5\nmsgid \"Callable[..., :class:`HybridGroup`]\"\nmsgstr \"Callable[..., :class:`HybridGroup`]\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.listen:1\nmsgid \"A decorator that registers another function as an external event listener. Basically this allows you to listen to multiple events from different places e.g. such as :func:`.on_ready`\"\nmsgstr \"関数を追加のイベントリスナーとして登録するデコレータ。 基本的には異なる場所から複数のイベントを登録することに使われます（ :func:`.on_ready` など）。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.listen:5\nmsgid \"The functions being listened to must be a :ref:`coroutine <coroutine>`.\"\nmsgstr \"登録する関数は :ref:`コルーチン <coroutine>` でなければなりません。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.listen:21\nmsgid \"Would print one and two in an unspecified order.\"\nmsgstr \"の、oneとtwoの出力順は保証されません。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.listen:23\nmsgid \"The function being listened to is not a coroutine.\"\nmsgstr \"受け取る関数がコルーチンではない場合。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.Bot.activity:1\nmsgid \"The activity being used upon logging in.\"\nmsgstr \"ログイン時に使用されるアクティビティ。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.Bot.activity:4\nmsgid \"Optional[:class:`.BaseActivity`]\"\nmsgstr \"Optional[:class:`.BaseActivity`]\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.add_check:1\nmsgid \"Adds a global check to the bot.\"\nmsgstr \"ボットにグローバルチェックを追加します。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.add_check:3\nmsgid \"This is the non-decorator interface to :meth:`.check` and :meth:`.check_once`.\"\nmsgstr \"これは :meth:`.check` と :meth:`.check_once` のデコレータでない実装です。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.add_check:10\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.add_check:11\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.add_check:11\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.core.Command.add_check:11\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.add_check:9\nmsgid \"The :func:`~discord.ext.commands.check` decorator\"\nmsgstr \":func:`~discord.ext.commands.check` デコレータ\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.add_check:12\nmsgid \"The function that was used as a global check.\"\nmsgstr \"グローバルチェックとして使用される関数。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.add_check:13\nmsgid \"If the function should only be called once per :meth:`.invoke` call.\"\nmsgstr \"関数が :meth:`.invoke` 呼び出しの時に、一度だけ呼び出されるべきかどうか。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.add_cog:1\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.application_info:1\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.before_identify_hook:1\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.change_presence:1\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.close:1\nmsgid \"|coro|\"\nmsgstr \"|coro|\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.add_cog:3\nmsgid \"Adds a \\\"cog\\\" to the bot.\"\nmsgstr \"ボットに「コグ」を追加します。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.add_cog:5\nmsgid \"A cog is a class that has its own event listeners and commands.\"\nmsgstr \"コグは、イベントリスナーとコマンドを持つクラスです。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.add_cog:7\nmsgid \"If the cog is a :class:`.app_commands.Group` then it is added to the bot's :class:`~discord.app_commands.CommandTree` as well.\"\nmsgstr \"コグが :class:`.app_commands.Group` の場合、ボットの :class:`~discord.app_commands.CommandTree` にも追加されます。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.add_cog:12\nmsgid \"Exceptions raised inside a :class:`.Cog`'s :meth:`~.Cog.cog_load` method will be propagated to the caller.\"\nmsgstr \":class:`.Cog` の、 :meth:`~.Cog.cog_load` メソッド内で発生した例外は呼び出し元に伝播されます。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.add_cog:17\nmsgid \":exc:`.ClientException` is raised when a cog with the same name is already loaded.\"\nmsgstr \"同じ名前のコグがすでに読み込まれている場合、:exc:`.ClientException` が発生します。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.add_cog:22\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.send_cog_help:23\nmsgid \"``cog`` parameter is now positional-only.\"\nmsgstr \"``cog`` 引数は位置限定引数になりました。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.add_cog:26\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.load_extension:14\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.remove_cog:16\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.unload_extension:15\nmsgid \"This method is now a :term:`coroutine`.\"\nmsgstr \"このメソッドは、:term:`coroutine` です。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.add_cog:28\nmsgid \"The cog to register to the bot.\"\nmsgstr \"ボットに登録するコグ。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.add_cog:30\nmsgid \"If a previously loaded cog with the same name should be ejected instead of raising an error.\"\nmsgstr \"同じ名前のコグがすでに読み込まれているときに、例外を発生せず既存のものを削除するか。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.add_cog:35\nmsgid \"If the cog is an application command group, then this would be the guild where the cog group would be added to. If not given then it becomes a global command instead.\"\nmsgstr \"コグがアプリケーションコマンドグループの場合、これはコググループが追加されるギルドになります。 \\n\"\n\"与えられない場合はグローバルコマンドになります。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.add_cog:41\nmsgid \"If the cog is an application command group, then this would be the guilds where the cog group would be added to. If not given then it becomes a global command instead. Cannot be mixed with ``guild``.\"\nmsgstr \"コグがアプリケーションコマンドグループの場合、これはコググループが追加されるギルドになります。 \\n\"\n\"与えられない場合はグローバルコマンドになります。\\n\"\n\"``guild`` と併用することはできません。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.add_cog:49\nmsgid \"The cog does not inherit from :class:`.Cog`.\"\nmsgstr \"コグが :class:`.Cog` から継承されていない場合。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.add_cog:50\nmsgid \"An error happened during loading.\"\nmsgstr \"読み込み中にエラーが発生した場合。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.add_cog:51\nmsgid \"A cog with the same name is already loaded.\"\nmsgstr \"同じ名前のコグがすでに読み込まれている場合。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.add_command:1\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.GroupMixin.add_command:1\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.GroupMixin.add_command:1\nmsgid \"Adds a :class:`.Command` into the internal list of commands.\"\nmsgstr \":class:`.Command` を内部のコマンドリストに追加します。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.add_command:3\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.GroupMixin.add_command:3\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.GroupMixin.add_command:3\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.hybrid.HybridGroup.add_command:3\nmsgid \"This is usually not called, instead the :meth:`~.GroupMixin.command` or :meth:`~.GroupMixin.group` shortcut decorators are used instead.\"\nmsgstr \"これは通常、呼び出されません。代わりに :meth:`~.GroupMixin.command` か :meth:`~.GroupMixin.group` のショートカットデコレータが使われます。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.add_command:6\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.GroupMixin.add_command:6\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.GroupMixin.add_command:6\nmsgid \"Raise :exc:`.CommandRegistrationError` instead of generic :exc:`.ClientException`\"\nmsgstr \"一般的な :exc:`.ClientException` の代わりに、 :exc:`.CommandRegistrationError` を送出します。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.add_command:11\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.GroupMixin.add_command:11\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.GroupMixin.add_command:11\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.get_command_signature:5\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.send_command_help:33\nmsgid \"``command`` parameter is now positional-only.\"\nmsgstr \"``command`` 引数は位置限定引数になりました。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.add_command:13\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.GroupMixin.add_command:13\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.GroupMixin.add_command:13\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.hybrid.HybridGroup.add_command:6\nmsgid \"The command to add.\"\nmsgstr \"追加するコマンド。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.add_command:16\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.GroupMixin.add_command:16\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.GroupMixin.add_command:16\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.hybrid.HybridGroup.add_command:9\nmsgid \"If the command or its alias is already registered by different command.\"\nmsgstr \"コマンドやその別名が異なるコマンドによって、すでに登録されている場合。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.add_command:17\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.GroupMixin.add_command:17\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.GroupMixin.add_command:17\nmsgid \"If the command passed is not a subclass of :class:`.Command`.\"\nmsgstr \"渡されたコマンドが、 :class:`.Command` のサブクラスでない場合。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.add_listener:1\nmsgid \"The non decorator alternative to :meth:`.listen`.\"\nmsgstr \":meth:`.listen` に対するデコレーターでない代替物です。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.add_listener:7\nmsgid \"The function to call.\"\nmsgstr \"呼び出される関数。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.add_listener:9\nmsgid \"The name of the event to listen for. Defaults to ``func.__name__``.\"\nmsgstr \"受け取るイベントの名前。デフォルトでは ``func.__name__`` です。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.add_view:1\nmsgid \"Registers a :class:`~discord.ui.View` for persistent listening.\"\nmsgstr \":class:`~discord.ui.View` を永続的にインタラクションを受け取るために登録します。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.add_view:3\nmsgid \"This method should be used for when a view is comprised of components that last longer than the lifecycle of the program.\"\nmsgstr \"このメソッドは、ビューがプログラムのライフサイクルを超えて存在するコンポーネントで構成されている場合に利用すべきです。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.add_view:8\nmsgid \"The view to register for dispatching.\"\nmsgstr \"実行するために登録するView\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.add_view:10\nmsgid \"The message ID that the view is attached to. This is currently used to refresh the view's state during message update events. If not given then message update events are not propagated for the view.\"\nmsgstr \"Viewが添付されているメッセージID。\\n\"\n\"これは、現在のViewの状態をメッセージ更新イベントの後に更新するのに使用されています。値が与えられていない場合はメッセージ更新のイベントはViewに伝わりません\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.add_view:15\nmsgid \"A view was not passed.\"\nmsgstr \"Viewが渡されなかった\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.add_view:16\nmsgid \"The view is not persistent or is already finished. A persistent view has no timeout     and all their components have an explicitly provided custom_id.\"\nmsgstr \"\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.Bot.allowed_mentions:1\nmsgid \"The allowed mention configuration.\"\nmsgstr \"許可されたメンションの設定。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.Bot.allowed_mentions:5\nmsgid \"Optional[:class:`~discord.AllowedMentions`]\"\nmsgstr \"Optional[:class:`~discord.AllowedMentions`]\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.Bot.application:1\nmsgid \"The client's application info.\"\nmsgstr \"クライアントのアプリケーション情報。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.Bot.application:3\nmsgid \"This is retrieved on :meth:`~discord.Client.login` and is not updated afterwards. This allows populating the application_id without requiring a gateway connection.\"\nmsgstr \"これは :meth:`~discord.Client.login` で取得され、その後更新されません。これによりゲートウェイ接続を行わずにapplication_idを取得できます。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.Bot.application:7\nmsgid \"This is ``None`` if accessed before :meth:`~discord.Client.login` is called.\"\nmsgstr \"もし :meth:`~discord.Client.login` の呼び出し前にアクセスされた場合は ``None`` です。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.Bot.application:9\nmsgid \"The :meth:`~discord.Client.application_info` API call\"\nmsgstr \":meth:`~discord.Client.application_info` API呼び出し\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.Bot.application:13\nmsgid \"Optional[:class:`~discord.AppInfo`]\"\nmsgstr \"Optional[:class:`~discord.AppInfo`]\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.Bot.application_flags:1\nmsgid \"The client's application flags.\"\nmsgstr \"クライアントのアプリケーションフラグ。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.Bot.application_flags:5\nmsgid \":class:`~discord.ApplicationFlags`\"\nmsgstr \":class:`~discord.ApplicationFlags`\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.Bot.application_id:1\nmsgid \"The client's application ID.\"\nmsgstr \"クライアントのアプリケーションID。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.Bot.application_id:3\nmsgid \"If this is not passed via ``__init__`` then this is retrieved through the gateway when an event contains the data or after a call to :meth:`~discord.Client.login`. Usually after :func:`~discord.on_connect` is called.\"\nmsgstr \"これが ``__init__`` で渡されなかった場合、データを含むイベントが発生した際にゲートウェイを介して、または :meth:`~discord.Client.login` の後に取得されます。通常は :func:`~discord.on_connect` が呼び出された後です。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.application_info:3\nmsgid \"Retrieves the bot's application information.\"\nmsgstr \"Botのアプリケーション情報を取得します。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.application_info:5\nmsgid \"Retrieving the information failed somehow.\"\nmsgstr \"情報の取得に失敗した場合。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.application_info:7\nmsgid \"The bot's application information.\"\nmsgstr \"Botのアプリケーション情報。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.application_info:8\nmsgid \":class:`.AppInfo`\"\nmsgstr \":class:`.AppInfo`\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.before_identify_hook:3\nmsgid \"A hook that is called before IDENTIFYing a session. This is useful if you wish to have more control over the synchronization of multiple IDENTIFYing clients.\"\nmsgstr \"セッションをIDENTIFYingする前に、呼び出されるフック。 これは、複数の IDENTIFYing クライアントの同期を、より詳細に制御したい場合に便利です。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.before_identify_hook:7\nmsgid \"The default implementation sleeps for 5 seconds.\"\nmsgstr \"デフォルトでは、5秒間スリープします。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.before_identify_hook:11\nmsgid \"The shard ID that requested being IDENTIFY'd\"\nmsgstr \"IDENTIFYを要求した時のシャードID。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.before_identify_hook:13\nmsgid \"Whether this IDENTIFY is the first initial IDENTIFY.\"\nmsgstr \"この IDENTIFY が、最初の初期化時の IDENTIFY であるかどうか。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.Bot.cached_messages:1\nmsgid \"Read-only list of messages the connected client has cached.\"\nmsgstr \"接続済みクライアントがキャッシュしている、読み取り専用のメッセージのリスト。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.Bot.cached_messages:5\nmsgid \"Sequence[:class:`.Message`]\"\nmsgstr \"Sequence[:class:`.Message`]\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.change_presence:3\nmsgid \"Changes the client's presence.\"\nmsgstr \"クライアントのステータスを変更します。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.change_presence:12\nmsgid \"Removed the ``afk`` keyword-only parameter.\"\nmsgstr \"キーワード引数 ``afk`` は削除されました。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.change_presence:15\nmsgid \"This function will now raise :exc:`TypeError` instead of ``InvalidArgument``.\"\nmsgstr \"この関数は ``InvalidArgument`` の代わりに :exc:`TypeError` を発生させます。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.change_presence:19\nmsgid \"The activity being done. ``None`` if no currently active activity is done.\"\nmsgstr \"実行中のアクティビティ。何も実行していない場合は ``None`` です。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.change_presence:21\nmsgid \"Indicates what status to change to. If ``None``, then :attr:`.Status.online` is used.\"\nmsgstr \"変更するステータスを示します。 ``None`` の場合、 :attr:`.Status.online` が使用されます。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.change_presence:25\nmsgid \"If the ``activity`` parameter is not the proper type.\"\nmsgstr \"引数 ``activity`` が適切な型でない場合。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.clear:1\nmsgid \"Clears the internal state of the bot.\"\nmsgstr \"Botの内部状態をクリアします。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.clear:3\nmsgid \"After this, the bot can be considered \\\"re-opened\\\", i.e. :meth:`is_closed` and :meth:`is_ready` both return ``False`` along with the bot's internal cache cleared.\"\nmsgstr \"これが実行されると、Botは「再実行」されたと見なされます。また、これにより :meth:`is_closed` や :meth:`is_ready` は ``False`` を返し、内部のキャッシュもクリアされます。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.close:3\nmsgid \"Closes the connection to Discord.\"\nmsgstr \"Discordとの接続を閉じます。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.Bot.cogs:1\nmsgid \"A read-only mapping of cog name to cog.\"\nmsgstr \"コグ名をキーとし、コグを値とする読み取り専用のマッピング。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.Bot.cogs:3\nmsgid \"Mapping[:class:`str`, :class:`Cog`]\"\nmsgstr \"Mapping[:class:`str`, :class:`Cog`]\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.Bot.commands:1\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.Group.commands:1\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.GroupMixin.commands:1\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.HybridGroup.commands:1\nmsgid \"A unique set of commands without aliases that are registered.\"\nmsgstr \"登録済みの、別名を含まないコマンドの集合。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.Bot.commands:3\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.Group.commands:3\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.GroupMixin.commands:3\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.HybridGroup.commands:3\nmsgid \"Set[:class:`.Command`]\"\nmsgstr \"Set[:class:`.Command`]\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.connect:3\nmsgid \"Creates a websocket connection and lets the websocket listen to messages from Discord. This is a loop that runs the entire event system and miscellaneous aspects of the library. Control is not resumed until the WebSocket connection is terminated.\"\nmsgstr \"WebSocket接続を作成し、Discordからのメッセージを受け取れるようにします。これはイベントシステム全体とライブラリの様々な機能を実行するループです。WebSocket接続が終了するまで、制御は再開されません。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.connect:8\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.run:22\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.start:8\nmsgid \"If we should attempt reconnecting, either due to internet failure or a specific failure on Discord's part. Certain disconnects that lead to bad state will not be handled (such as invalid sharding payloads or bad tokens).\"\nmsgstr \"インターネットの障害やDiscord側の特定の障害が発生した際に再接続を試みるかどうか。不正な状態による特定の切断 (無効なシャーディングペイロードや不正なトークンなど) は処理されません。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.connect:14\nmsgid \"If the gateway to connect to Discord is not found. Usually if this     is thrown then there is a Discord API outage.\"\nmsgstr \"Discordに接続するゲートウェイが見つからない場合。通常、これが発生した場合は、Discord側のAPIの停止が考えられます。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.connect:15\nmsgid \"The websocket connection has been terminated.\"\nmsgstr \"WebSocket接続が終了した場合。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.create_dm:3\nmsgid \"Creates a :class:`.DMChannel` with this user.\"\nmsgstr \"このユーザーと :class:`.DMChannel` を作成します。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.create_dm:5\nmsgid \"This should be rarely called, as this is done transparently for most people.\"\nmsgstr \"これは、ほとんどの人にとっては自動で行われるため、呼び出す必要はめったにありません。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.create_dm:10\nmsgid \"The user to create a DM with.\"\nmsgstr \"DMを作成するユーザー。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.create_dm:13\nmsgid \"The channel that was created.\"\nmsgstr \"作成されたチャンネル。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.create_dm:14\nmsgid \":class:`.DMChannel`\"\nmsgstr \":class:`.DMChannel`\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.create_guild:3\nmsgid \"Creates a :class:`.Guild`.\"\nmsgstr \":class:`.Guild` を作成します。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.create_guild:5\nmsgid \"Bot accounts in more than 10 guilds are not allowed to create guilds.\"\nmsgstr \"10以上のギルドに参加しているBotアカウントは、ギルドの作成ができません。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.create_guild:7\nmsgid \"``name`` and ``icon`` parameters are now keyword-only. The ``region`` parameter has been removed.\"\nmsgstr \"``name`` と ``icon`` パラメータはキーワード限定引数になりました。\\n\"\n\"``region`` パラメータは削除されました。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.create_guild:10\nmsgid \"This function will now raise :exc:`ValueError` instead of ``InvalidArgument``.\"\nmsgstr \"この関数は ``InvalidArgument`` の代わりに :exc:`ValueError` を発生させます。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.create_guild:14\nmsgid \"The name of the guild.\"\nmsgstr \"ギルドの名前。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.create_guild:16\nmsgid \"The :term:`py:bytes-like object` representing the icon. See :meth:`.ClientUser.edit` for more details on what is expected.\"\nmsgstr \"アイコンを表す :term:`py:bytes-like object` 。引数の詳細については、 :meth:`ClientUser.edit` を参照してください。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.create_guild:19\nmsgid \"The code for a template to create the guild with.\"\nmsgstr \"ギルドを作成するためのテンプレートコード。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.create_guild:24\nmsgid \"Guild creation failed.\"\nmsgstr \"ギルドの作成に失敗した場合。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.create_guild:25\nmsgid \"Invalid icon image format given. Must be PNG or JPG.\"\nmsgstr \"アイコンの画像形式が無効だった場合。画像は、PNGまたはJPGである必要があります。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.create_guild:27\nmsgid \"The guild created. This is not the same guild that is added to cache.\"\nmsgstr \"作成されたGuild。Botのキャッシュに追加されるGuildとはまた別物です。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.create_guild:29\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.fetch_guild:32\nmsgid \":class:`.Guild`\"\nmsgstr \":class:`.Guild`\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.delete_invite:3\nmsgid \"Revokes an :class:`.Invite`, URL, or ID to an invite.\"\nmsgstr \":class:`.Invite` や、招待のURL、IDを削除します。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.delete_invite:5\nmsgid \"You must have :attr:`~.Permissions.manage_channels` in the associated guild to do this.\"\nmsgstr \"これを行うには、関連付けられたGuildにて、 :attr:`~.Permissions.manage_channels` が必要です。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.delete_invite:10\nmsgid \"``invite`` parameter is now positional-only.\"\nmsgstr \"``invite`` 引数は位置限定引数になりました。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.delete_invite:12\nmsgid \"The invite to revoke.\"\nmsgstr \"取り消す招待。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.delete_invite:15\nmsgid \"You do not have permissions to revoke invites.\"\nmsgstr \"削除する権限がない場合。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.delete_invite:16\nmsgid \"The invite is invalid or expired.\"\nmsgstr \"招待が無効または期限切れの場合。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.delete_invite:17\nmsgid \"Revoking the invite failed.\"\nmsgstr \"招待の取り消しに失敗した場合。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.Bot.emojis:1\nmsgid \"The emojis that the connected client has.\"\nmsgstr \"接続したクライアントが利用できる絵文字。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.Bot.emojis:3\nmsgid \"Sequence[:class:`.Emoji`]\"\nmsgstr \"Sequence[:class:`.Emoji`]\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.Bot.extensions:1\nmsgid \"A read-only mapping of extension name to extension.\"\nmsgstr \"エクステンション名の読み取り専用マッピング。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.Bot.extensions:3\nmsgid \"Mapping[:class:`str`, :class:`py:types.ModuleType`]\"\nmsgstr \"Mapping[:class:`str`, :class:`py:types.ModuleType`]\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.fetch_channel:3\nmsgid \"Retrieves a :class:`.abc.GuildChannel`, :class:`.abc.PrivateChannel`, or :class:`.Thread` with the specified ID.\"\nmsgstr \"指定されたIDを持つ :class:`.abc.GuildChannel` 、 :class:`.abc.PrivateChannel` 、または :class:`.Thread` を取得します。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.fetch_channel:7\nmsgid \"This method is an API call. For general usage, consider :meth:`get_channel` instead.\"\nmsgstr \"このメソッドはDiscord APIからGETします。通常は :meth:`get_channel` を代わりとして使用してください。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.fetch_channel:13\nmsgid \"``channel_id`` parameter is now positional-only.\"\nmsgstr \"``channel_id`` 引数は位置限定引数になりました。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.fetch_channel:15\nmsgid \"An unknown channel type was received from Discord.\"\nmsgstr \"まだ定義されていないチャンネルタイプがDiscord APIから受信された場合。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.fetch_channel:16\nmsgid \"Retrieving the channel failed.\"\nmsgstr \"チャンネルの取得に失敗した場合。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.fetch_channel:17\nmsgid \"Invalid Channel ID.\"\nmsgstr \"引数が無効なチャンネル IDである場合。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.fetch_channel:18\nmsgid \"You do not have permission to fetch this channel.\"\nmsgstr \"このチャンネルからメッセージを取得する権限がない場合。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.fetch_channel:20\nmsgid \"The channel from the ID.\"\nmsgstr \"IDから取得したチャンネル。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.fetch_channel:21\nmsgid \"Union[:class:`.abc.GuildChannel`, :class:`.abc.PrivateChannel`, :class:`.Thread`]\"\nmsgstr \"Union[:class:`.abc.GuildChannel`, :class:`.abc.PrivateChannel`, :class:`.Thread`]\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.fetch_guild:3\nmsgid \"Retrieves a :class:`.Guild` from an ID.\"\nmsgstr \"IDから :class:`.Guild` を取得します。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.fetch_guild:7\nmsgid \"Using this, you will **not** receive :attr:`.Guild.channels`, :attr:`.Guild.members`, :attr:`.Member.activity` and :attr:`.Member.voice` per :class:`.Member`.\"\nmsgstr \"これを使用した場合、 :attr:`.Guild.channels` 、 :attr:`.Guild.members` 、そして各 :class:`.Member` ごとの :attr:`.Member.activity` 、 :attr:`.Member.voice` を**取得することができません** 。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.fetch_guild:12\nmsgid \"This method is an API call. For general usage, consider :meth:`get_guild` instead.\"\nmsgstr \"このメソッドはAPIを呼び出します。通常は :meth:`get_guild` を代わりとして使用してください。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.fetch_guild:16\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.fetch_widget:11\nmsgid \"``guild_id`` parameter is now positional-only.\"\nmsgstr \"``guild_id`` 引数は位置限定引数になりました。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.fetch_guild:19\nmsgid \"The guild's ID to fetch from.\"\nmsgstr \"取得したいギルドのID。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.fetch_guild:21\nmsgid \"Whether to include count information in the guild. This fills the :attr:`.Guild.approximate_member_count` and :attr:`.Guild.approximate_presence_count` attributes without needing any privileged intents. Defaults to ``True``.\"\nmsgstr \"ギルドにカウント情報を含めるかどうか。これを使うことで特権インテントがなくても :attr:`.Guild.approximate_member_count` と :attr:`.Guild.approximate_presence_count` 属性が設定されます。デフォルトは ``True`` です。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.fetch_guild:28\nmsgid \"You do not have access to the guild.\"\nmsgstr \"Guildに「アクセス」する権限を持っていない場合。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.fetch_guild:29\nmsgid \"Getting the guild failed.\"\nmsgstr \"Guildの取得に失敗した場合。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.fetch_guild:31\nmsgid \"The guild from the ID.\"\nmsgstr \"IDから取得したギルド。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.fetch_guilds:1\nmsgid \"Retrieves an :term:`asynchronous iterator` that enables receiving your guilds.\"\nmsgstr \"Botが所属するGuildを取得できる、 :term:`asynchronous iterator` を取得します。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.fetch_guilds:5\nmsgid \"Using this, you will only receive :attr:`.Guild.owner`, :attr:`.Guild.icon`, :attr:`.Guild.id`, :attr:`.Guild.name`, :attr:`.Guild.approximate_member_count`, and :attr:`.Guild.approximate_presence_count` per :class:`.Guild`.\"\nmsgstr \"\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.fetch_guilds:11\nmsgid \"This method is an API call. For general usage, consider :attr:`guilds` instead.\"\nmsgstr \"これはAPIを呼び出します。通常は :attr:`guilds` を代わりに使用してください。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.fetch_guilds:14\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.wait_for:22\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.check:37\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.check_any:20\n#: ../../../discord/ext/commands/context.py:docstring of discord.abc.Messageable.history:6\nmsgid \"Examples\"\nmsgstr \"例\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.fetch_guilds:15\n#: ../../../discord/ext/commands/context.py:docstring of discord.abc.Messageable.history:7\nmsgid \"Usage ::\"\nmsgstr \"使い方 ::\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.fetch_guilds:20\nmsgid \"Flattening into a list ::\"\nmsgstr \"リストへフラット化 ::\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.fetch_guilds:25\n#: ../../../discord/ext/commands/context.py:docstring of discord.abc.Messageable.history:19\nmsgid \"All parameters are optional.\"\nmsgstr \"すべてのパラメータがオプションです。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.fetch_guilds:27\nmsgid \"The number of guilds to retrieve. If ``None``, it retrieves every guild you have access to. Note, however, that this would make it a slow operation. Defaults to ``200``.\"\nmsgstr \"取得するギルドの数。 ``None`` の場合、Botがアクセスできるギルドすべてを取得します。ただし、これには時間が掛かることに注意してください。デフォルトは200です。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.fetch_guilds:34\nmsgid \"The default has been changed to 200.\"\nmsgstr \"デフォルトが200に変更されました。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.fetch_guilds:36\nmsgid \"Retrieves guilds before this date or object. If a datetime is provided, it is recommended to use a UTC aware datetime. If the datetime is naive, it is assumed to be local time.\"\nmsgstr \"渡された日付、またはギルドより前のギルドを取得します。日付を指定する場合、UTC aware datetimeを利用することを推奨します。naive datetimeである場合、これはローカル時間であるとみなされます。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.fetch_guilds:40\nmsgid \"Retrieve guilds after this date or object. If a datetime is provided, it is recommended to use a UTC aware datetime. If the datetime is naive, it is assumed to be local time.\"\nmsgstr \"渡された日付、またはオブジェクトより後のギルドを取得します。日付を指定する場合、UTC対応の「aware」を利用することを推奨します。日付が「naive」である場合、これは地域時間であるとみなされます。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.fetch_guilds:44\nmsgid \"Whether to include count information in the guilds. This fills the :attr:`.Guild.approximate_member_count` and :attr:`.Guild.approximate_presence_count` attributes without needing any privileged intents. Defaults to ``True``.\"\nmsgstr \"\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.fetch_guilds:51\nmsgid \"Getting the guilds failed.\"\nmsgstr \"Guildの取得に失敗した場合。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.fetch_guilds:0\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.get_all_channels:0\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.get_all_members:0\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.core.GroupMixin.walk_commands:0\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.GroupMixin.walk_commands:0\nmsgid \"Yields\"\nmsgstr \"Yieldする値\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.fetch_guilds:53\nmsgid \":class:`.Guild` -- The guild with the guild data parsed.\"\nmsgstr \":class:`.Guild` -- データを解析したGuild。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.fetch_invite:3\nmsgid \"Gets an :class:`.Invite` from a discord.gg URL or ID.\"\nmsgstr \"discord.gg URLまたはIDから、 :class:`.Invite` を取得します。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.fetch_invite:7\nmsgid \"If the invite is for a guild you have not joined, the guild and channel attributes of the returned :class:`.Invite` will be :class:`.PartialInviteGuild` and :class:`.PartialInviteChannel` respectively.\"\nmsgstr \"もしBotがInviteのGuildに参加していない場合、 :class:`.Invite` のguildとchannel属性はそれぞれ :class:`.PartialInviteGuild` と :class:`.PartialInviteChannel` になります。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.fetch_invite:11\nmsgid \"The Discord invite ID or URL (must be a discord.gg URL).\"\nmsgstr \"Discordの招待ID、またはURL (discord.gg URLである必要があります)。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.fetch_invite:13\nmsgid \"Whether to include count information in the invite. This fills the :attr:`.Invite.approximate_member_count` and :attr:`.Invite.approximate_presence_count` fields.\"\nmsgstr \"招待にカウントの情報を含めるかどうか。これにより :attr:`.Invite.approximate_member_count` と :attr:`.Invite.approximate_presence_count` 属性が追加されます。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.fetch_invite:17\nmsgid \"Whether to include the expiration date of the invite. This fills the :attr:`.Invite.expires_at` field.\"\nmsgstr \"招待の有効期限を含めるかどうか。有効期限は :attr:`.Invite.expires_at` に代入されます。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.fetch_invite:22\nmsgid \"The ID of the scheduled event this invite is for.\"\nmsgstr \"招待に紐づいたスケジュールイベントのID。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.fetch_invite:26\nmsgid \"It is not possible to provide a url that contains an ``event_id`` parameter when using this parameter.\"\nmsgstr \"このパラメータを使用する場合、``event_id`` パラメータを含む url を指定することはできません。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.fetch_invite:32\nmsgid \"The url contains an ``event_id``, but ``scheduled_event_id`` has also been provided.\"\nmsgstr \"URLに ``event_id`` が含まれているのに、 ``scheduled_event_id`` も渡された場合。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.fetch_invite:33\nmsgid \"The invite has expired or is invalid.\"\nmsgstr \"招待の有効期限が切れたか無効の場合。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.fetch_invite:34\nmsgid \"Getting the invite failed.\"\nmsgstr \"招待の取得に失敗した場合。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.fetch_invite:36\nmsgid \"The invite from the URL/ID.\"\nmsgstr \"URL/IDから取得した招待。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.fetch_invite:37\nmsgid \":class:`.Invite`\"\nmsgstr \":class:`.Invite`\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.fetch_premium_sticker_packs:3\nmsgid \"Retrieves all available premium sticker packs.\"\nmsgstr \"利用可能なプレミアムスタンプパックをすべて取得します。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.fetch_premium_sticker_packs:7\nmsgid \"Retrieving the sticker packs failed.\"\nmsgstr \"スタンプパックの取得に失敗した場合。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.fetch_premium_sticker_packs:9\nmsgid \"All available premium sticker packs.\"\nmsgstr \"利用可能なプレミアムスタンプパックすべて。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.fetch_premium_sticker_packs:10\nmsgid \"List[:class:`.StickerPack`]\"\nmsgstr \"List[:class:`.StickerPack`]\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.fetch_stage_instance:3\nmsgid \"Gets a :class:`.StageInstance` for a stage channel id.\"\nmsgstr \"ステージチャンネルIDの :class:`.StageInstance` を取得します。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.fetch_stage_instance:7\nmsgid \"The stage channel ID.\"\nmsgstr \"ステージチャンネルのID。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.fetch_stage_instance:10\nmsgid \"The stage instance or channel could not be found.\"\nmsgstr \"ステージインスタンスまたはチャンネルが見つからなかった場合。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.fetch_stage_instance:11\nmsgid \"Getting the stage instance failed.\"\nmsgstr \"ステージインスタンスの取得に失敗した場合。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.fetch_stage_instance:13\nmsgid \"The stage instance from the stage channel ID.\"\nmsgstr \"ステージチャンネルIDで取得したステージインスタンス\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.fetch_stage_instance:14\nmsgid \":class:`.StageInstance`\"\nmsgstr \":class:`.StageInstance`\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.fetch_sticker:3\nmsgid \"Retrieves a :class:`.Sticker` with the specified ID.\"\nmsgstr \"特定のIDの :class:`.Sticker` を取得します。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.fetch_sticker:7\nmsgid \"Retrieving the sticker failed.\"\nmsgstr \"スタンプの取得に失敗した場合。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.fetch_sticker:8\nmsgid \"Invalid sticker ID.\"\nmsgstr \"スタンプIDが無効な場合。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.fetch_sticker:10\nmsgid \"The sticker you requested.\"\nmsgstr \"要求されたスタンプ。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.fetch_sticker:11\nmsgid \"Union[:class:`.StandardSticker`, :class:`.GuildSticker`]\"\nmsgstr \"Union[:class:`.StandardSticker`, :class:`.GuildSticker`]\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.fetch_template:3\nmsgid \"Gets a :class:`.Template` from a discord.new URL or code.\"\nmsgstr \"discord.new URL またはコードから :class:`.Template` を取得します。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.fetch_template:5\nmsgid \"The Discord Template Code or URL (must be a discord.new URL).\"\nmsgstr \"DiscordテンプレートコードまたはURL (discord.new URLである必要があります)。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.fetch_template:8\nmsgid \"The template is invalid.\"\nmsgstr \"無効なテンプレートである場合。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.fetch_template:9\nmsgid \"Getting the template failed.\"\nmsgstr \"テンプレートの取得に失敗した場合。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.fetch_template:11\nmsgid \"The template from the URL/code.\"\nmsgstr \"URL/コードからのテンプレート。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.fetch_template:12\nmsgid \":class:`.Template`\"\nmsgstr \":class:`.Template`\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.fetch_user:3\nmsgid \"Retrieves a :class:`~discord.User` based on their ID. You do not have to share any guilds with the user to get this information, however many operations do require that you do.\"\nmsgstr \"IDをもとに :class:`~discord.User` を取得します。そのユーザーとギルドを共有する必要はありませんが、操作の多くはそれを必要とします。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.fetch_user:9\nmsgid \"This method is an API call. If you have :attr:`discord.Intents.members` and member cache enabled, consider :meth:`get_user` instead.\"\nmsgstr \"このメソッドはAPIを呼び出します。 :attr:`discord.Intents.members` とメンバーキャッシュを有効化している場合は、 :meth:`get_user` を使用するべきです\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.fetch_user:13\nmsgid \"``user_id`` parameter is now positional-only.\"\nmsgstr \"``user_id`` 引数は位置限定引数になりました。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.fetch_user:15\nmsgid \"The user's ID to fetch from.\"\nmsgstr \"取得したいユーザーのID。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.fetch_user:18\nmsgid \"A user with this ID does not exist.\"\nmsgstr \"この ID を持つユーザーが存在しない場合。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.fetch_user:19\nmsgid \"Fetching the user failed.\"\nmsgstr \"ユーザーの取得に失敗した場合。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.fetch_user:21\nmsgid \"The user you requested.\"\nmsgstr \"あなたがリクエストしたユーザー。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.fetch_user:22\nmsgid \":class:`~discord.User`\"\nmsgstr \":class:`~discord.User`\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.fetch_webhook:3\nmsgid \"Retrieves a :class:`.Webhook` with the specified ID.\"\nmsgstr \"指定した ID の :class:`.Webhook` を取得します。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.fetch_webhook:7\nmsgid \"``webhook_id`` parameter is now positional-only.\"\nmsgstr \"``webhook_id`` 引数は位置限定引数になりました。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.fetch_webhook:9\nmsgid \"Retrieving the webhook failed.\"\nmsgstr \"Webhookの取得に失敗した場合。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.fetch_webhook:10\nmsgid \"Invalid webhook ID.\"\nmsgstr \"無効なWebhookのIDだった場合。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.fetch_webhook:11\nmsgid \"You do not have permission to fetch this webhook.\"\nmsgstr \"Webhookを取得する権限がない場合。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.fetch_webhook:13\nmsgid \"The webhook you requested.\"\nmsgstr \"BotがリクエストしたWebhook。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.fetch_webhook:14\nmsgid \":class:`.Webhook`\"\nmsgstr \":class:`.Webhook`\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.fetch_widget:3\nmsgid \"Gets a :class:`.Widget` from a guild ID.\"\nmsgstr \"Guild IDから :class:`.Widget` を取得します。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.fetch_widget:7\nmsgid \"The guild must have the widget enabled to get this information.\"\nmsgstr \"この情報を取得するためには、Guildのウィジェットを有効化しておく必要があります。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.fetch_widget:13\nmsgid \"The ID of the guild.\"\nmsgstr \"GuildのID。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.fetch_widget:16\nmsgid \"The widget for this guild is disabled.\"\nmsgstr \"Guildのウィジェットが無効になっている場合。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.fetch_widget:17\nmsgid \"Retrieving the widget failed.\"\nmsgstr \"ウィジェットの取得に失敗した場合。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.fetch_widget:19\nmsgid \"The guild's widget.\"\nmsgstr \"Guildのウィジェット。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.fetch_widget:20\nmsgid \":class:`.Widget`\"\nmsgstr \":class:`.Widget`\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.get_all_channels:1\nmsgid \"A generator that retrieves every :class:`.abc.GuildChannel` the client can 'access'.\"\nmsgstr \"クライアントが「アクセス」できるすべての :class:`.abc.GuildChannel` のジェネレータを取得します。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.get_all_channels:3\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.get_all_members:3\nmsgid \"This is equivalent to: ::\"\nmsgstr \"これは以下に相当します: ::\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.get_all_channels:11\nmsgid \"Just because you receive a :class:`.abc.GuildChannel` does not mean that you can communicate in said channel. :meth:`.abc.GuildChannel.permissions_for` should be used for that.\"\nmsgstr \":class:`.abc.GuildChannel` を受け取ったからと言って、そのチャンネルで、クライアントが発言可能であるとは限りません。クライアントが発言可能なチャンネルのみを取得したいのなら、 :meth:`.abc.GuildChannel.permissions_for` を使ってください。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.get_all_channels:15\nmsgid \":class:`.abc.GuildChannel` -- A channel the client can 'access'.\"\nmsgstr \":class:`.abc.GuildChannel` -- クライアントが「アクセスする」ことができるチャンネル。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.get_all_members:1\nmsgid \"Returns a generator with every :class:`.Member` the client can see.\"\nmsgstr \"クライアントが参照可能なすべての :class:`.Member` のgeneratorを返します。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.get_all_members:9\nmsgid \":class:`.Member` -- A member the client can see.\"\nmsgstr \":class:`.Member` -- クライアントが見れる、Guildのメンバー。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.get_channel:1\nmsgid \"Returns a channel or thread with the given ID.\"\nmsgstr \"与えられたIDのチャンネルまたはスレッドを返します。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.get_channel:5\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.get_emoji:5\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.get_guild:5\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.get_user:5\nmsgid \"``id`` parameter is now positional-only.\"\nmsgstr \"``id`` 引数は位置限定引数になりました。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.get_channel:7\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.get_emoji:7\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.get_guild:7\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.get_stage_instance:5\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.get_user:7\nmsgid \"The ID to search for.\"\nmsgstr \"検索するID。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.get_channel:10\nmsgid \"The returned channel or ``None`` if not found.\"\nmsgstr \"チャンネル、または該当するものが見つからない場合 ``None`` が返ります。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.get_channel:11\nmsgid \"Optional[Union[:class:`.abc.GuildChannel`, :class:`.Thread`, :class:`.abc.PrivateChannel`]]\"\nmsgstr \"Optional[Union[:class:`.abc.GuildChannel`, :class:`.Thread`, :class:`.abc.PrivateChannel`]]\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.get_cog:1\nmsgid \"Gets the cog instance requested.\"\nmsgstr \"要求されたコグのインスタンスを取得します。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.get_cog:3\nmsgid \"If the cog is not found, ``None`` is returned instead.\"\nmsgstr \"コグが見つからなかった場合、代わりに ``None`` が返されます。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.get_cog:7\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.core.GroupMixin.get_command:12\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.remove_cog:12\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.remove_command:8\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.GroupMixin.get_command:12\nmsgid \"``name`` parameter is now positional-only.\"\nmsgstr \"``name`` 引数は位置限定引数になりました。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.get_cog:9\nmsgid \"The name of the cog you are requesting. This is equivalent to the name passed via keyword argument in class creation or the class name if unspecified.\"\nmsgstr \"リクエストしているコグの名前です。これは、クラス作成時にキーワード引数で渡された名前と同等です。指定しない場合は、クラス名と同等になります。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.get_cog:14\nmsgid \"The cog that was requested. If not found, returns ``None``.\"\nmsgstr \"要求されたコグ。見つからない場合は ``None`` を返します。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.get_cog:15\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command:62\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.HelpCommand.cog:10\nmsgid \"Optional[:class:`Cog`]\"\nmsgstr \"Optional[:class:`bool`]\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.core.GroupMixin.get_command:1\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.GroupMixin.get_command:1\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.GroupMixin.get_command:1\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.core.GroupMixin.get_command:1\nmsgid \"Get a :class:`.Command` from the internal list of commands.\"\nmsgstr \"内部のコマンドリストから検索し、 :class:`.Command` を取得します。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.core.GroupMixin.get_command:4\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.GroupMixin.get_command:4\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.GroupMixin.get_command:4\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.core.GroupMixin.get_command:4\nmsgid \"This could also be used as a way to get aliases.\"\nmsgstr \"これはコマンドのエイリアスを取得する方法としても使用できます。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.core.GroupMixin.get_command:6\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.GroupMixin.get_command:6\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.GroupMixin.get_command:6\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.core.GroupMixin.get_command:6\nmsgid \"The name could be fully qualified (e.g. ``'foo bar'``) will get the subcommand ``bar`` of the group command ``foo``. If a subcommand is not found then ``None`` is returned just as usual.\"\nmsgstr \"名前は修飾されていても構いません(例： ``'foo bar'`` など)。サブコマンドが見つからなかった場合は、通常通り ``None`` が返されます。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.core.GroupMixin.get_command:14\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.GroupMixin.get_command:14\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.GroupMixin.get_command:14\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.core.GroupMixin.get_command:14\nmsgid \"The name of the command to get.\"\nmsgstr \"取得するコマンドの名前。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.core.GroupMixin.get_command:17\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.GroupMixin.get_command:17\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.GroupMixin.get_command:17\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.core.GroupMixin.get_command:17\nmsgid \"The command that was requested. If not found, returns ``None``.\"\nmsgstr \"要求されたコマンド。見つからなければ ``None`` を返します。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.core.GroupMixin.get_command:18\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command:103\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.GroupMixin.get_command:18\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.GroupMixin.get_command:18\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.core.GroupMixin.get_command:18\nmsgid \"Optional[:class:`Command`]\"\nmsgstr \"Optional[:class:`Command`]\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.get_context:3\nmsgid \"Returns the invocation context from the message or interaction.\"\nmsgstr \"メッセージまたはインタラクションから、呼び出しコンテキストを返します。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.get_context:5\nmsgid \"This is a more low-level counter-part for :meth:`.process_commands` to allow users more fine grained control over the processing.\"\nmsgstr \"これは :meth:`.process_commands` より低レベルなcounter-partで、開発者がより細かく処理を制御できるようにするためのものです。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.get_context:8\nmsgid \"The returned context is not guaranteed to be a valid invocation context, :attr:`.Context.valid` must be checked to make sure it is. If the context is not valid then it is not a valid candidate to be invoked under :meth:`~.Bot.invoke`.\"\nmsgstr \"返されたコンテキストが、有効な呼び出しコンテキストであることは保証していないので、 :attr:`.Context.valid` によってチェックして確認する必要があります。コンテキストが有効でない場合は、 :meth:`~.Bot.invoke` で呼び出される有効な候補ではありません。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.get_context:15\nmsgid \"In order for the custom context to be used inside an interaction-based context (such as :class:`HybridCommand`) then this method must be overridden to return that class.\"\nmsgstr \"インタラクションベースのコンテキストでカスタムコンテキストを使用する場合（ :class:`HybridCommand` など）にはこのメソッドを上書きしてクラスを返さないといけません。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.get_context:21\nmsgid \"``message`` parameter is now positional-only and renamed to ``origin``.\"\nmsgstr \"``message`` パラメータが位置指定のみになり、 ``origin`` に改名されました。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.get_context:23\nmsgid \"The message or interaction to get the invocation context from.\"\nmsgstr \"呼び出しコンテキストを取得するためのメッセージやインタラクション。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.get_context:25\nmsgid \"The factory class that will be used to create the context. By default, this is :class:`.Context`. Should a custom class be provided, it must be similar enough to :class:`.Context`\\\\'s interface.\"\nmsgstr \"コンテキストを作成するために使用されるファクトリークラス。デフォルトでは、これは :class:`.Context` です。カスタムクラスを提供する場合は、 :class:`.Context` の引数が同じようにならなければなりません。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.get_context:30\nmsgid \"The invocation context. The type of this can change via the ``cls`` parameter.\"\nmsgstr \"呼び出しコンテキスト。このタイプは ``cls`` パラメータを使用して変更できます。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.get_context:32\nmsgid \":class:`.Context`\"\nmsgstr \":class:`.Context`\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.get_emoji:1\nmsgid \"Returns an emoji with the given ID.\"\nmsgstr \"与えられた ID の絵文字を返します。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.get_emoji:10\nmsgid \"The custom emoji or ``None`` if not found.\"\nmsgstr \"カスタム絵文字が返されます。見つからなかった場合は、 ``None`` が返ります。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.get_emoji:11\nmsgid \"Optional[:class:`.Emoji`]\"\nmsgstr \"Optional[:class:`.Emoji`]\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.get_guild:1\nmsgid \"Returns a guild with the given ID.\"\nmsgstr \"与えられたIDを検索し、それに合致するGuildを返します。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.get_guild:10\nmsgid \"The guild or ``None`` if not found.\"\nmsgstr \"Guildが返されます。見つからなかった場合は、 ``None`` が返ります。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.get_guild:11\n#: ../../docstring of discord.ext.commands.Context.guild:3\nmsgid \"Optional[:class:`.Guild`]\"\nmsgstr \"Optional[:class:`.Guild`]\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.get_partial_messageable:1\nmsgid \"Returns a partial messageable with the given channel ID.\"\nmsgstr \"与えられたチャンネルIDのPartialMessageableを返します。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.get_partial_messageable:3\nmsgid \"This is useful if you have a channel_id but don't want to do an API call to send messages to it.\"\nmsgstr \"これはチャンネルIDがあるがメッセージを送信するためにAPI呼び出しをしたくない場合に便利です。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.get_partial_messageable:8\nmsgid \"The channel ID to create a partial messageable for.\"\nmsgstr \"PartialMessageableを作成するためのチャンネルID。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.get_partial_messageable:10\nmsgid \"The optional guild ID to create a partial messageable for.  This is not required to actually send messages, but it does allow the :meth:`~discord.PartialMessageable.jump_url` and :attr:`~discord.PartialMessageable.guild` properties to function properly.\"\nmsgstr \"部分的なメッセージ可能チャンネルを作成するためのオプションのギルドID。これはメッセージの送信には必須ではありませんが、 :meth:`~discord.PartialMessageable.jump_url` や :attr:`~discord.PartialMessageable.guild` プロパティが適切に動作するようになります。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.get_partial_messageable:10\nmsgid \"The optional guild ID to create a partial messageable for.\"\nmsgstr \"部分的なメッセージ可能チャンネルを作成するためのオプションのギルドID。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.get_partial_messageable:12\nmsgid \"This is not required to actually send messages, but it does allow the :meth:`~discord.PartialMessageable.jump_url` and :attr:`~discord.PartialMessageable.guild` properties to function properly.\"\nmsgstr \"これはメッセージの送信には必須ではありませんが、 :meth:`~discord.PartialMessageable.jump_url` や :attr:`~discord.PartialMessageable.guild` プロパティが適切に動作するようになります。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.get_partial_messageable:16\nmsgid \"The underlying channel type for the partial messageable.\"\nmsgstr \"PartialMessageableの基礎となるチャンネルタイプ。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.get_partial_messageable:19\nmsgid \"The partial messageable\"\nmsgstr \"PartialMessageable\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.get_partial_messageable:20\nmsgid \":class:`.PartialMessageable`\"\nmsgstr \":class:`.PartialMessageable`\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.get_prefix:3\nmsgid \"Retrieves the prefix the bot is listening to with the message as a context.\"\nmsgstr \"特定のメッセージの文脈内でボットが使用する接頭辞を取得します。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.get_prefix:8\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.process_commands:19\nmsgid \"``message`` parameter is now positional-only.\"\nmsgstr \"``message`` パラメータが位置指定のみになりました。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.get_prefix:10\nmsgid \"The message context to get the prefix of.\"\nmsgstr \"接頭辞を取得するメッセージのコンテキスト。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.get_prefix:13\nmsgid \"A list of prefixes or a single prefix that the bot is listening for.\"\nmsgstr \"ボットが受け取る接頭辞またはそのリスト。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.get_prefix:15\nmsgid \"Union[List[:class:`str`], :class:`str`]\"\nmsgstr \"Union[List[:class:`str`], :class:`str`]\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.get_stage_instance:1\nmsgid \"Returns a stage instance with the given stage channel ID.\"\nmsgstr \"与えられたステージチャンネルIDを持つステージインスタンスを返します。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.get_stage_instance:8\nmsgid \"The stage instance or ``None`` if not found.\"\nmsgstr \"ステージインスタンス、または該当するものが見つからない場合 ``None`` が返ります。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.get_stage_instance:9\nmsgid \"Optional[:class:`.StageInstance`]\"\nmsgstr \"Optional[:class:`.StageInstance`]\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.get_sticker:1\nmsgid \"Returns a guild sticker with the given ID.\"\nmsgstr \"与えられたIDに合致するギルドスタンプを返します。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.get_sticker:7\nmsgid \"To retrieve standard stickers, use :meth:`.fetch_sticker`. or :meth:`.fetch_premium_sticker_packs`.\"\nmsgstr \"標準スタンプを取得するには、 :meth:`.fetch_sticker` か :meth:`.fetch_premium_sticker_packs` を使用してください。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.get_sticker:10\nmsgid \"The sticker or ``None`` if not found.\"\nmsgstr \"Stickerが返ります。見つからなかった場合は ``None`` が返ります。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.get_sticker:11\nmsgid \"Optional[:class:`.GuildSticker`]\"\nmsgstr \"Optional[:class:`.GuildSticker`]\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.get_user:1\nmsgid \"Returns a user with the given ID.\"\nmsgstr \"与えられたIDを検索し、それに合致するユーザーを返します。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.get_user:10\nmsgid \"The user or ``None`` if not found.\"\nmsgstr \"Userが返されます。見つからなかった場合は、 ``None`` が返ります。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.get_user:11\nmsgid \"Optional[:class:`~discord.User`]\"\nmsgstr \"Optional[:class:`~discord.User`]\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.Bot.guilds:1\nmsgid \"The guilds that the connected client is a member of.\"\nmsgstr \"接続したクライアントがメンバーとして参加しているギルド。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.Bot.guilds:3\nmsgid \"Sequence[:class:`.Guild`]\"\nmsgstr \"Sequence[:class:`.Guild`]\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.Bot.intents:1\nmsgid \"The intents configured for this connection.\"\nmsgstr \"この接続用に設定されたインテント。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.Bot.intents:5\nmsgid \":class:`~discord.Intents`\"\nmsgstr \":class:`~discord.Intents`\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.invoke:3\nmsgid \"Invokes the command given under the invocation context and handles all the internal event dispatch mechanisms.\"\nmsgstr \"コンテキストに与えられたコマンドを呼び出します。すべての内部イベントも処理されます。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.invoke:8\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.is_on_cooldown:5\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.reset_cooldown:5\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.get_cooldown_retry_after:7\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.can_run:12\nmsgid \"``ctx`` parameter is now positional-only.\"\nmsgstr \"``ctx`` パラメータは位置指定のみになりました。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.invoke:10\nmsgid \"The invocation context to invoke.\"\nmsgstr \"呼び出すコンテキスト。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.is_closed:1\nmsgid \":class:`bool`: Indicates if the websocket connection is closed.\"\nmsgstr \":class:`bool`: WebSocket接続が閉じられているかどうか。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.is_owner:3\nmsgid \"Checks if a :class:`~discord.User` or :class:`~discord.Member` is the owner of this bot.\"\nmsgstr \":class:`~discord.User` または :class:`~discord.Member` がこのボットの所有者か確認します。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.is_owner:6\nmsgid \"If an :attr:`owner_id` is not set, it is fetched automatically through the use of :meth:`~.Bot.application_info`.\"\nmsgstr \":attr:`owner_id` が設定されていない場合、 :meth:`~.Bot.application_info` から取得されます。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.is_owner:9\nmsgid \"The function also checks if the application is team-owned if :attr:`owner_ids` is not set.\"\nmsgstr \":attr:`owner_ids` が設定されていない場合、この関数はチームが所有しているかも確認します。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.is_owner:15\nmsgid \"``user`` parameter is now positional-only.\"\nmsgstr \"``user`` 引数は位置限定引数になりました。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.is_owner:17\nmsgid \"The user to check for.\"\nmsgstr \"確認するユーザー。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.is_owner:20\nmsgid \"Whether the user is the owner.\"\nmsgstr \"ユーザーが所有者かどうか。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.is_ready:1\nmsgid \":class:`bool`: Specifies if the client's internal cache is ready for use.\"\nmsgstr \":class:`bool`: クライアントの内部キャッシュが利用可能となっているかを表します。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.is_ws_ratelimited:1\nmsgid \":class:`bool`: Whether the websocket is currently rate limited.\"\nmsgstr \":class:`bool`: WebSocketがレート制限中かどうか。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.is_ws_ratelimited:3\nmsgid \"This can be useful to know when deciding whether you should query members using HTTP or via the gateway.\"\nmsgstr \"メンバーへのクエリをHTTPで行うか、ゲートウェイ経由で行うかを決めるときに役立ちます。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.Bot.latency:1\nmsgid \"Measures latency between a HEARTBEAT and a HEARTBEAT_ACK in seconds.\"\nmsgstr \"HEARTBEATとHEARTBEAT_ACKの間の遅延を秒単位で測定します。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.Bot.latency:3\nmsgid \"This could be referred to as the Discord WebSocket protocol latency.\"\nmsgstr \"DiscordのWebSocketプロトコルの遅延として使うこともできます。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.Bot.latency:5\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.get_cooldown_retry_after:14\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.get_cooldown_retry_after:14\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.core.Command.get_cooldown_retry_after:14\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.CommandOnCooldown:22\nmsgid \":class:`float`\"\nmsgstr \":class:`float`\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.load_extension:3\nmsgid \"Loads an extension.\"\nmsgstr \"エクステンションを読み込みます。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.load_extension:5\nmsgid \"An extension is a python module that contains commands, cogs, or listeners.\"\nmsgstr \"エクステンションはコマンド、コグ、リスナーを含むPythonのモジュールです。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.load_extension:8\nmsgid \"An extension must have a global function, ``setup`` defined as the entry point on what to do when the extension is loaded. This entry point must have a single argument, the ``bot``.\"\nmsgstr \"エクステンションは ``setup`` という名前のグローバルな関数を持っている必要があります。 ``setup`` はエクステンションを読み込むときのエントリーポイントになります。エントリーポイントは ``bot`` という引数を持っている必要があります。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.load_extension:16\nmsgid \"The extension name to load. It must be dot separated like regular Python imports if accessing a sub-module. e.g. ``foo.test`` if you want to import ``foo/test.py``.\"\nmsgstr \"読み込むエクステンションの名前。サブモジュールにアクセスする場合はPythonのimport文のようにドットで区切る必要があります。 例えば ``hoge/test.py`` を読み込むときには ``hoge.test`` になります。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.load_extension:20\nmsgid \"The package name to resolve relative imports with. This is required when loading an extension using a relative path, e.g ``.foo.test``. Defaults to ``None``.\"\nmsgstr \"相対インポートを解決するためのパッケージ名。例えば ``.foo.test`` のように、相対パスで拡張機能を読み込む場合に必要になります。デフォルトは ``None`` です。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.load_extension:27\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.reload_extension:22\nmsgid \"The extension could not be imported.     This is also raised if the name of the extension could not     be resolved using the provided ``package`` parameter.\"\nmsgstr \"エクステンションを読み込めなかった場合。この例外は渡された ``package`` パラメータを解釈できなかったときにも発生します。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.load_extension:28\nmsgid \"The extension is already loaded.\"\nmsgstr \"エクステンションがすでに読み込まれている場合。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.load_extension:29\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.reload_extension:23\nmsgid \"The extension does not have a setup function.\"\nmsgstr \"エクステンションに ``setup`` 関数がない場合。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.load_extension:30\nmsgid \"The extension or its setup function had an execution error.\"\nmsgstr \"エクステンション、または ``setup`` 関数で例外が発生した場合。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.login:3\nmsgid \"Logs in the client with the specified credentials and calls the :meth:`setup_hook`.\"\nmsgstr \"指定した資格情報を使用してクライアントにログインし、 :meth:`setup_hook` を呼び出します。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.login:7\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.run:19\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.start:5\nmsgid \"The authentication token. Do not prefix this token with anything as the library will do it for you.\"\nmsgstr \"認証トークン。ライブラリが処理するのでトークンには何もつけないでください（ ``Bot`` 等）。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.login:11\nmsgid \"The wrong credentials are passed.\"\nmsgstr \"不正な認証情報が渡された場合。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.login:12\nmsgid \"An unknown HTTP related error occurred,     usually when it isn't 200 or the known incorrect credentials     passing status code.\"\nmsgstr \"不明なHTTP関連のエラーが発生した場合。通常、ステータスコードが200でないか、既知の誤った資格情報が渡された場合です。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.on_command_error:3\nmsgid \"The default command error handler provided by the bot.\"\nmsgstr \"ボットに渡されたデフォルトのコマンドの例外のハンドラ。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.on_command_error:5\nmsgid \"By default this logs to the library logger, however it could be overridden to have a different implementation.\"\nmsgstr \"デフォルトではライブラリロガーに出力しますが、他の実装をするために上書きすることもできます。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.on_command_error:8\nmsgid \"This only fires if you do not specify any listeners for command error.\"\nmsgstr \"これは、コマンドの例外のリスナーを指定していない場合にのみ発生します。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.on_command_error:12\nmsgid \"``context`` and ``exception`` parameters are now positional-only. Instead of writing to ``sys.stderr`` this now uses the library logger.\"\nmsgstr \"``context`` と ``exception`` が位置限定引数になりました。 ``sys.stderr`` に出力するのではなくライブラリロガーが使用されるようになりました。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.on_error:3\nmsgid \"The default error handler provided by the client.\"\nmsgstr \"クライアントによって提供されるデフォルトのエラーハンドラ。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.on_error:5\nmsgid \"By default this logs to the library logger however it could be overridden to have a different implementation. Check :func:`~discord.on_error` for more details.\"\nmsgstr \"デフォルトでは、これはライブラリロガーに出力されますが、異なる実装によって上書きされる可能性があります。詳細については :func:`~discord.on_error` を確認してください。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.on_error:11\nmsgid \"``event_method`` parameter is now positional-only and instead of writing to ``sys.stderr`` it logs instead.\"\nmsgstr \"``event_method`` パラメータが位置限定引数になり、 ``sys.stderr`` に出力するのではなくログに記録するようになりました。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.Bot.persistent_views:1\nmsgid \"A sequence of persistent views added to the client.\"\nmsgstr \"クライアントに追加された永続的なビューのシーケンスです。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.Bot.persistent_views:5\nmsgid \"Sequence[:class:`.View`]\"\nmsgstr \"Sequence[:class:`.View`]\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.Bot.private_channels:1\nmsgid \"The private channels that the connected client is participating on.\"\nmsgstr \"接続したクライアントが参加しているプライベートチャンネル。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.Bot.private_channels:5\nmsgid \"This returns only up to 128 most recent private channels due to an internal working on how Discord deals with private channels.\"\nmsgstr \"Discordでのプライベートチャンネルの取扱いは内部的に処理されているため、これは最新のプライベートチャンネルから最大128個までしか取得できません。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.Bot.private_channels:8\nmsgid \"Sequence[:class:`.abc.PrivateChannel`]\"\nmsgstr \"Sequence[:class:`.abc.PrivateChannel`]\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.process_commands:3\nmsgid \"This function processes the commands that have been registered to the bot and other groups. Without this coroutine, none of the commands will be triggered.\"\nmsgstr \"ボットとそのグルーブに登録されたコマンドを処理します。この関数を取り除くとコマンドは処理されません。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.process_commands:7\nmsgid \"By default, this coroutine is called inside the :func:`.on_message` event. If you choose to override the :func:`.on_message` event, then you should invoke this coroutine as well.\"\nmsgstr \"デフォルトでは、この関数は :func:`on_message` のなかで呼び出されます。 :func:`on_message` を上書きした場合にはこの関数を呼び出す処理を書く必要があります。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.process_commands:11\nmsgid \"This is built using other low level tools, and is equivalent to a call to :meth:`~.Bot.get_context` followed by a call to :meth:`~.Bot.invoke`.\"\nmsgstr \"これは他の低レベルのツールを使って構築されており、 :meth:`~.Bot.get_context` の呼び出しに続いて、 :meth:`~.Bot.invoke` の呼び出しに相当します。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.process_commands:14\nmsgid \"This also checks if the message's author is a bot and doesn't call :meth:`~.Bot.get_context` or :meth:`~.Bot.invoke` if so.\"\nmsgstr \"また、メッセージの作成者がボットであるか確認し、その場合 :meth:`~.Bot.get_context` や :meth:`~.Bot.invoke` を呼び出しません。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.process_commands:21\nmsgid \"The message to process commands for.\"\nmsgstr \"コマンドを処理するメッセージ。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.reload_extension:3\nmsgid \"Atomically reloads an extension.\"\nmsgstr \"拡張機能を「極小単位で」リロードします。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.reload_extension:5\nmsgid \"This replaces the extension with the same extension, only refreshed. This is equivalent to a :meth:`unload_extension` followed by a :meth:`load_extension` except done in an atomic way. That is, if an operation fails mid-reload then the bot will roll-back to the prior working state.\"\nmsgstr \"これにより、拡張機能が、ほとんど同じ拡張機能で置き換えられ、更新されるだけです。 これは 、:meth:`unload_extension` が実行され、次に :meth:`load_extension` が実行される、この一連の流れと同等です。 つまり、操作がリロード中に失敗した場合、Botは以前の状態にロールバックします。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.reload_extension:10\nmsgid \"The extension name to reload. It must be dot separated like regular Python imports if accessing a sub-module. e.g. ``foo.test`` if you want to import ``foo/test.py``.\"\nmsgstr \"リロードする拡張モジュール名。サブモジュールにアクセスする場合は、通常の Pythonのimportのように、ドットで区切られている必要があります。 例: ``foo.test`` を ``foo/test.py`` をインポートする場合。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.reload_extension:14\nmsgid \"The package name to resolve relative imports with. This is required when reloading an extension using a relative path, e.g ``.foo.test``. Defaults to ``None``.\"\nmsgstr \"相対インポートを解決するためのパッケージ名。 ``.hoge.test`` のように、相対パスを使用してエクステンションを再読込する場合に必要です。デフォルトは ``None`` です。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.reload_extension:21\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.unload_extension:29\nmsgid \"The extension was not loaded.\"\nmsgstr \"拡張機能がもともとロードされていなかった場合。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.reload_extension:24\nmsgid \"The extension setup function had an execution error.\"\nmsgstr \"エクステンションセットアップ関数に、何らかの実行エラーが発生した場合。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.remove_check:1\nmsgid \"Removes a global check from the bot.\"\nmsgstr \"ボットからグローバルチェックを除去します。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.remove_check:3\nmsgid \"This function is idempotent and will not raise an exception if the function is not in the global checks.\"\nmsgstr \"この関数は冪等性を保持しており、関数がグローバルチェックに含まれていない場合でも例外が発生しません。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.remove_check:10\nmsgid \"The function to remove from the global checks.\"\nmsgstr \"グローバルチェックから除去する関数。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.remove_check:11\nmsgid \"If the function was added with ``call_once=True`` in the :meth:`.Bot.add_check` call or using :meth:`.check_once`.\"\nmsgstr \":meth:`.Bot.add_check` によって ``call_once=True`` を指定して関数を追加していた場合、または :meth:`.check_once` を使用して関数を追加していた場合。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.remove_cog:3\nmsgid \"Removes a cog from the bot and returns it.\"\nmsgstr \"ボットからコグを除去し、それを返します。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.remove_cog:5\nmsgid \"All registered commands and event listeners that the cog has registered will be removed as well.\"\nmsgstr \"これにより、コグが登録したすべての登録済みのコマンドと、コグに登録されているイベントリスナーも全て削除されます。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.remove_cog:8\nmsgid \"If no cog is found then this method has no effect.\"\nmsgstr \"コグが見つからない場合、このメソッドによる影響はありません。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.remove_cog:18\nmsgid \"The name of the cog to remove.\"\nmsgstr \"削除するコグの名前。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.remove_cog:20\nmsgid \"If the cog is an application command group, then this would be the guild where the cog group would be removed from. If not given then a global command is removed instead instead.\"\nmsgstr \"コグがアプリケーションコマンドグループの場合、これはコググループが除去されるギルドになります。 \\n\"\n\"与えられない場合はグローバルコマンドになります。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.remove_cog:26\nmsgid \"If the cog is an application command group, then this would be the guilds where the cog group would be removed from. If not given then a global command is removed instead instead. Cannot be mixed with ``guild``.\"\nmsgstr \"コグがアプリケーションコマンドグループの場合、これはコググループが除去されるギルドになります。 \\n\"\n\"与えられない場合はグローバルコマンドになります。\\n\"\n\"``guild`` と併用することはできません。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.remove_cog:34\nmsgid \"The cog that was removed. ``None`` if not found.\"\nmsgstr \"除去されたコグ。見つからない場合は ``None`` 。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.remove_cog:35\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.Context.cog:3\nmsgid \"Optional[:class:`.Cog`]\"\nmsgstr \"Optional[:class:`.Cog`]\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.remove_command:1\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.GroupMixin.remove_command:1\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.GroupMixin.remove_command:1\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.hybrid.HybridGroup.remove_command:1\nmsgid \"Remove a :class:`.Command` from the internal list of commands.\"\nmsgstr \"内部のコマンドリストから該当するコマンドを検索し、その :class:`.Command` を除去します。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.remove_command:4\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.GroupMixin.remove_command:4\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.GroupMixin.remove_command:4\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.hybrid.HybridGroup.remove_command:4\nmsgid \"This could also be used as a way to remove aliases.\"\nmsgstr \"これはコマンドのエイリアスによって、コマンドを除去することもできます。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.remove_command:10\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.GroupMixin.remove_command:10\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.GroupMixin.remove_command:10\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.hybrid.HybridGroup.remove_command:10\nmsgid \"The name of the command to remove.\"\nmsgstr \"除去するコマンドの名前。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.remove_command:13\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.GroupMixin.remove_command:13\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.GroupMixin.remove_command:13\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.hybrid.HybridGroup.remove_command:13\nmsgid \"The command that was removed. If the name is not valid then ``None`` is returned instead.\"\nmsgstr \"除去されたコマンド。有効な名前ではない場合は ``None`` が返されます。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.remove_command:15\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.GroupMixin.remove_command:15\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.GroupMixin.remove_command:15\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.hybrid.HybridGroup.remove_command:15\nmsgid \"Optional[:class:`.Command`]\"\nmsgstr \"Optional[:class:`.Command`]\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.remove_listener:1\nmsgid \"Removes a listener from the pool of listeners.\"\nmsgstr \"リスナープールからリスナーを除去します。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.remove_listener:7\nmsgid \"The function that was used as a listener to remove.\"\nmsgstr \"除去するリスナーとして使用された関数。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.remove_listener:8\nmsgid \"The name of the event we want to remove. Defaults to ``func.__name__``.\"\nmsgstr \"除去したいイベントの名前。デフォルトでは ``func.__name__`` です。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.run:1\nmsgid \"A blocking call that abstracts away the event loop initialisation from you.\"\nmsgstr \"イベントループの初期化を簡単に行うことができるブロッキングコール。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.run:4\nmsgid \"If you want more control over the event loop then this function should not be used. Use :meth:`start` coroutine or :meth:`connect` + :meth:`login`.\"\nmsgstr \"イベントループをより詳細に制御するには、この関数を使用しないでください。 :meth:`start` または :meth:`connect` + :meth:`login` を使用してください。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.run:8\nmsgid \"This function also sets up the logging library to make it easier for beginners to know what is going on with the library. For more advanced users, this can be disabled by passing ``None`` to the ``log_handler`` parameter.\"\nmsgstr \"またこの関数は、初心者がライブラリの仕組みを知ることが簡単にできるよう logging ライブラリを設定します。より高度なユーザーは、 ``log_handler`` に ``None`` を渡してこれを無効化することもできます。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.run:15\nmsgid \"This function must be the last function to call due to the fact that it is blocking. That means that registration of events or anything being called after this function call will not execute until it returns.\"\nmsgstr \"この関数はブロッキングを行うため、必ず最後の方で呼び出してください。この関数を呼び出した後に書かれているイベントや関数は、Botが停止するまで実行されません。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.run:27\nmsgid \"The log handler to use for the library's logger. If this is ``None`` then the library will not set up anything logging related. Logging will still work if ``None`` is passed, though it is your responsibility to set it up.\"\nmsgstr \"ライブラリロガーにて使用すべきログハンドラ。もしこれが ``None`` の場合ライブラリはログ関連のセットアップを一切行いません。 ``None`` を渡してもログは記録されますが、設定は自己責任となります。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.run:32\nmsgid \"The default log handler if not provided is :class:`logging.StreamHandler`.\"\nmsgstr \"渡されない場合のデフォルトは :class:`logging.StreamHandler` です。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.run:36\nmsgid \"The formatter to use with the given log handler. If not provided then it defaults to a colour based logging formatter (if available).\"\nmsgstr \"指定されたログハンドラで使用するフォーマッタ。渡されない場合は、既定で色ベースのログフォーマッタが使用されます (使用可能な場合)。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.run:41\nmsgid \"The default log level for the library's logger. This is only applied if the ``log_handler`` parameter is not ``None``. Defaults to ``logging.INFO``.\"\nmsgstr \"ライブラリロガーの既定のログレベル。これは ``log_handler`` が ``None`` でない場合のみ適用されます。デフォルトは ``logging.INFO`` です。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.run:46\nmsgid \"Whether to set up the root logger rather than the library logger. By default, only the library logger (``'discord'``) is set up. If this is set to ``True`` then the root logger is set up as well.\"\nmsgstr \"ライブラリロガーではなくルートロガーを設定するかどうか。デフォルトではライブラリロガー (``'discord'``) のみが設定されています。 これが ``True`` に設定されている場合、ルートロガーも設定されます。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.run:50\nmsgid \"Defaults to ``False``.\"\nmsgstr \"デフォルトでは ``False`` です。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.setup_hook:3\nmsgid \"A coroutine to be called to setup the bot, by default this is blank.\"\nmsgstr \"Botのセットアップ時に呼び出されるコルーチンです。デフォルトでは空白です\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.setup_hook:5\nmsgid \"To perform asynchronous setup after the bot is logged in but before it has connected to the Websocket, overwrite this coroutine.\"\nmsgstr \"Websocketに接続する前になにか非同期な関数を実行したい場合は、このコルーチンを上書きして下さい。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.setup_hook:8\nmsgid \"This is only called once, in :meth:`login`, and will be called before any events are dispatched, making it a better solution than doing such setup in the :func:`~discord.on_ready` event.\"\nmsgstr \":meth:`login` で１回だけ呼ばれ、全てのイベントが発火する前に呼ばれます。 :func:`~discord.on_ready` より良いセットアップの方法です。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.setup_hook:14\nmsgid \"Since this is called *before* the websocket connection is made therefore anything that waits for the websocket will deadlock, this includes things like :meth:`wait_for` and :meth:`wait_until_ready`.\"\nmsgstr \"これはWebSocket接続の *前に* 呼ばれるため、WebSocketを待つ関数の呼び出しはデッドロックします。これには :meth:`wait_for` や :meth:`wait_until_ready` が含まれます。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.start:3\nmsgid \"A shorthand coroutine for :meth:`login` + :meth:`connect`.\"\nmsgstr \":meth:`login` + :meth:`connect` を簡略化したコルーチン。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.start:14\nmsgid \"An unexpected keyword argument was received.\"\nmsgstr \"予期しないキーワード引数を受け取った場合。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.Bot.status:1\nmsgid \":class:`.Status`: The status being used upon logging on to Discord.\"\nmsgstr \":class:`.Status`: Discordへのログイン時に使用されるステータス。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.Bot.stickers:1\nmsgid \"The stickers that the connected client has.\"\nmsgstr \"接続したクライアントが持つスタンプ。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.Bot.stickers:5\nmsgid \"Sequence[:class:`.GuildSticker`]\"\nmsgstr \"Sequence[:class:`.GuildSticker`]\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.Bot.tree:1\nmsgid \"The command tree responsible for handling the application commands in this bot.\"\nmsgstr \"このボット内のアプリケーションコマンドを処理するコマンドツリー。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.Bot.tree:6\nmsgid \":class:`~discord.app_commands.CommandTree`\"\nmsgstr \":class:`~discord.app_commands.CommandTree`\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.unload_extension:3\nmsgid \"Unloads an extension.\"\nmsgstr \"拡張機能をアンロードします。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.unload_extension:5\nmsgid \"When the extension is unloaded, all commands, listeners, and cogs are removed from the bot and the module is un-imported.\"\nmsgstr \"拡張機能がアンロードされると、すべてのコマンド、リスナー、コグがボットから除去され、モジュールはアンインポートされます。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.unload_extension:8\nmsgid \"The extension can provide an optional global function, ``teardown``, to do miscellaneous clean-up if necessary. This function takes a single parameter, the ``bot``, similar to ``setup`` from :meth:`~.Bot.load_extension`.\"\nmsgstr \"拡張機能から提供される、オプションのグローバル関数 ``teardown`` によって、必要に応じてその他のクリーンアップを行うことができます。 この関数は、 :meth:`~.Bot.load_extension` の ``setup`` と似た、単一のパラメータを取ります。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.unload_extension:17\nmsgid \"The extension name to unload. It must be dot separated like regular Python imports if accessing a sub-module. e.g. ``foo.test`` if you want to import ``foo/test.py``.\"\nmsgstr \"アンロードする拡張モジュール名。サブモジュールにアクセスする場合は、通常の Pythonのimportのように、ドットで区切られている必要があります。 例: ``foo/test.py`` をアンロードする場合、``foo.test`` と書いてください。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.unload_extension:21\nmsgid \"The package name to resolve relative imports with. This is required when unloading an extension using a relative path, e.g ``.foo.test``. Defaults to ``None``.\"\nmsgstr \"相対インポートを解決するためのパッケージ名。例えば ``.foo.test`` のように、相対パスで拡張機能をアンロードするときに必要です。デフォルトでは ``None`` です。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.BotBase.unload_extension:28\nmsgid \"The name of the extension could not     be resolved using the provided ``package`` parameter.\"\nmsgstr \"渡された ``package`` パラメータを使用してエクステンションの名前を解決できなかった場合。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.Bot.user:1\nmsgid \"Represents the connected client. ``None`` if not logged in.\"\nmsgstr \"接続されたクライアントを表します。ログインしていない場合は ``None`` が返されます。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.Bot.user:3\nmsgid \"Optional[:class:`.ClientUser`]\"\nmsgstr \"Optional[:class:`.ClientUser`]\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.Bot.users:1\nmsgid \"Returns a list of all the users the bot can see.\"\nmsgstr \"Botが見ることができるユーザーのリストを返します。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.Bot.users:3\nmsgid \"List[:class:`~discord.User`]\"\nmsgstr \"List[:class:`~discord.User`]\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.Bot.voice_clients:1\nmsgid \"Represents a list of voice connections.\"\nmsgstr \"ボイス接続のリストを表します。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.Bot.voice_clients:3\nmsgid \"These are usually :class:`.VoiceClient` instances.\"\nmsgstr \"これらは通常、 :class:`.VoiceClient` のインスタンスです。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.Bot.voice_clients:5\nmsgid \"List[:class:`.VoiceProtocol`]\"\nmsgstr \"List[:class:`.VoiceProtocol`]\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.wait_for:3\nmsgid \"Waits for a WebSocket event to be dispatched.\"\nmsgstr \"WebSocketイベントがディスパッチされるまで待機します。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.wait_for:5\nmsgid \"This could be used to wait for a user to reply to a message, or to react to a message, or to edit a message in a self-contained way.\"\nmsgstr \"これは、ユーザーがメッセージに返信するのを待ったり、メッセージに反応したり、メッセージを自己完結的に編集したりするために使うことができます。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.wait_for:9\nmsgid \"The ``timeout`` parameter is passed onto :func:`asyncio.wait_for`. By default, it does not timeout. Note that this does propagate the :exc:`asyncio.TimeoutError` for you in case of timeout and is provided for ease of use.\"\nmsgstr \"``timeout`` パラメータは :func:`asyncio.wait_for` に渡されます。デフォルトではタイムアウトしません。タイムアウトした際に :exc:`asyncio.TimeoutError` が発生するのは、使いやすさを考慮したためです。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.wait_for:14\nmsgid \"In case the event returns multiple arguments, a :class:`tuple` containing those arguments is returned instead. Please check the :ref:`documentation <discord-api-events>` for a list of events and their parameters.\"\nmsgstr \"指定されたイベントが複数の引数を返す場合は、代わりとしてその引数を含んだ :class:`tuple` が返ります。イベントとそのパラメータについては :ref:`documentation <discord-api-events>` を参照してください。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.wait_for:19\nmsgid \"This function returns the **first event that meets the requirements**.\"\nmsgstr \"この関数は **条件を満たす最初のイベント** を返します。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.wait_for:23\nmsgid \"Waiting for a user reply: ::\"\nmsgstr \"ユーザーからの返信メッセージを待つ場合、次のような書き方ができます: ::\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.wait_for:37\nmsgid \"Waiting for a thumbs up reaction from the message author: ::\"\nmsgstr \"また、メッセージ送信者が、サムズアップ リアクションを付けるのを待つ場合、次のようにも書けます: ::\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.wait_for:57\nmsgid \"``event`` parameter is now positional-only.\"\nmsgstr \"``event`` 引数は位置限定引数になりました。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.wait_for:59\nmsgid \"The event name, similar to the :ref:`event reference <discord-api-events>`, but without the ``on_`` prefix, to wait for.\"\nmsgstr \"イベント名は :ref:`イベントリファレンス <discord-api-events>` に似ていますが、接頭詞の ``on_`` がありません。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.wait_for:62\nmsgid \"A predicate to check what to wait for. The arguments must meet the parameters of the event being waited for.\"\nmsgstr \"待っているものに該当するかを確認する関数。引数は、待機しているイベントの返り値を満たしている必要があります。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.wait_for:65\nmsgid \"The number of seconds to wait before timing out and raising :exc:`asyncio.TimeoutError`.\"\nmsgstr \"タイムアウトして :exc:`asyncio.TimeoutError` が送出されるまでの秒数。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.wait_for:69\nmsgid \"If a timeout is provided and it was reached.\"\nmsgstr \"タイムアウトが設定されていて、かつその時間が経過した場合。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.wait_for:71\nmsgid \"Returns no arguments, a single argument, or a :class:`tuple` of multiple arguments that mirrors the parameters passed in the :ref:`event reference <discord-api-events>`.\"\nmsgstr \"単一の引数、あるいは :ref:`イベントリファレンス <discord-api-events>` の返り値を反映した、複数の引数の値を含む :class:`tuple` が返ります。返り値がない場合もあります。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.wait_until_ready:3\nmsgid \"Waits until the client's internal cache is all ready.\"\nmsgstr \"クライアントの内部キャッシュの準備が完了するまで待機します。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.client.Client.wait_until_ready:7\nmsgid \"Calling this inside :meth:`setup_hook` can lead to a deadlock.\"\nmsgstr \":meth:`setup_hook` の内部でこれを呼び出すと、デッドロックになる可能性があります。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.core.GroupMixin.walk_commands:1\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.GroupMixin.walk_commands:1\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.GroupMixin.walk_commands:1\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.core.GroupMixin.walk_commands:1\nmsgid \"An iterator that recursively walks through all commands and subcommands.\"\nmsgstr \"すべてのコマンドとサブコマンドを、再帰的に網羅するイテレータ。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.core.GroupMixin.walk_commands:3\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.GroupMixin.walk_commands:3\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.GroupMixin.walk_commands:3\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.core.GroupMixin.walk_commands:3\nmsgid \"Duplicates due to aliases are no longer returned\"\nmsgstr \"エイリアスによって重複した場合は、そのエイリアスまたはコマンドは返しません。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.core.GroupMixin.walk_commands:6\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.GroupMixin.walk_commands:6\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.GroupMixin.walk_commands:6\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.core.GroupMixin.walk_commands:6\nmsgid \"Union[:class:`.Command`, :class:`.Group`] -- A command or group from the internal list of commands.\"\nmsgstr \"Union[:class:`.Command`, :class:`.Group`] -- コマンドの内部リストからの、コマンドまたはグループ。\"\n\n#: ../../ext/commands/api.rst:54\nmsgid \"AutoShardedBot\"\nmsgstr \"AutoShardedBot\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.AutoShardedBot:1\nmsgid \"This is similar to :class:`.Bot` except that it is inherited from :class:`discord.AutoShardedClient` instead.\"\nmsgstr \"これは、 :class:`discord.AutoShardedClient` から代わりに継承されていることを除いて、 :class:`.Bot` と似ています。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.AutoShardedBot:8\nmsgid \"Asynchronously initialises the bot and automatically cleans.\"\nmsgstr \"非同期的にボットを初期化し自動でクリーンアップします。\"\n\n#: ../../ext/commands/api.rst:62\nmsgid \"Prefix Helpers\"\nmsgstr \"接頭辞のヘルパー\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.when_mentioned:1\nmsgid \"A callable that implements a command prefix equivalent to being mentioned.\"\nmsgstr \"メンションされるのと同等のコマンドの接頭辞を実装する呼び出し可能オブジェクト。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.when_mentioned:3\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.when_mentioned_or:3\nmsgid \"These are meant to be passed into the :attr:`.Bot.command_prefix` attribute.\"\nmsgstr \"これらは :attr:`.Bot.command_prefix` 属性に渡されます。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.when_mentioned:7\nmsgid \"``bot`` and ``msg`` parameters are now positional-only.\"\nmsgstr \"``bot`` と ``msg`` のパラメータは位置指定のみになりました。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.when_mentioned_or:1\nmsgid \"A callable that implements when mentioned or other prefixes provided.\"\nmsgstr \"上記または他の接頭辞が提供されたときの接頭辞を実装する呼び出し可能オブジェクト。\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.when_mentioned_or:13\nmsgid \"This callable returns another callable, so if this is done inside a custom callable, you must call the returned callable, for example:\"\nmsgstr \"この呼び出し可能オブジェクトは別の呼び出し可能オブジェクトを返すため、カスタム呼び出し可能オブジェクト内でこれが行われる場合は、返される呼び出し可能オブジェクトを必ず呼び出さなければなりません。例:\"\n\n#: ../../../discord/ext/commands/bot.py:docstring of discord.ext.commands.bot.when_mentioned_or:23\nmsgid \":func:`.when_mentioned`\"\nmsgstr \":func:`.when_mentioned`\"\n\n#: ../../ext/commands/api.rst:71\nmsgid \"Event Reference\"\nmsgstr \"イベントリファレンス\"\n\n#: ../../ext/commands/api.rst:73\nmsgid \"These events function similar to :ref:`the regular events <discord-api-events>`, except they are custom to the command extension module.\"\nmsgstr \"これらのイベントは、コマンド拡張モジュールのカスタム関数であることを除けば、 :ref:`通常のイベント <discord-api-events>` に似ています。\"\n\n#: ../../ext/commands/api.rst:78\nmsgid \"An error handler that is called when an error is raised inside a command either through user input error, check failure, or an error in your own code.\"\nmsgstr \"ユーザーによる入力エラー、チェックの失敗、またはコードの記述ミスによって、コマンド内でエラーが発生したときに呼び出されるエラーハンドラ。\"\n\n#: ../../ext/commands/api.rst:82\nmsgid \"A default one is provided (:meth:`.Bot.on_command_error`).\"\nmsgstr \"デフォルトは (:meth:`.Bot.on_command_error`) です。\"\n\n#: ../../ext/commands/api.rst:84\n#: ../../ext/commands/api.rst:96\n#: ../../ext/commands/api.rst:106\n#: ../../../discord/ext/commands/cog.py:docstring of discord.ext.commands.cog.Cog.cog_before_invoke:9\n#: ../../../discord/ext/commands/cog.py:docstring of discord.ext.commands.cog.Cog.cog_after_invoke:9\nmsgid \"The invocation context.\"\nmsgstr \"呼び出しコンテキスト。\"\n\n#: ../../ext/commands/api.rst:86\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.on_help_command_error:17\nmsgid \"The error that was raised.\"\nmsgstr \"発生したエラー。\"\n\n#: ../../ext/commands/api.rst:91\nmsgid \"An event that is called when a command is found and is about to be invoked.\"\nmsgstr \"該当するコマンドが見つかり、呼び出されようとするときに、呼び出されるイベント。\"\n\n#: ../../ext/commands/api.rst:93\nmsgid \"This event is called regardless of whether the command itself succeeds via error or completes.\"\nmsgstr \"このイベントは、エラーまたは完了を介して、コマンド自体が成功するかどうかに関係なく、必ず呼び出されます。\"\n\n#: ../../ext/commands/api.rst:101\nmsgid \"An event that is called when a command has completed its invocation.\"\nmsgstr \"コマンドの呼び出しが完了したときに呼び出されるイベント。\"\n\n#: ../../ext/commands/api.rst:103\nmsgid \"This event is called only if the command succeeded, i.e. all checks have passed and the user input it correctly.\"\nmsgstr \"このイベントは、コマンドの実行が成功した場合にのみ呼び出されます。すなわち、すべてのチェックが成功し、ユーザーによって正しく入力された場合にのみ実行されます。\"\n\n#: ../../ext/commands/api.rst:112\nmsgid \"Commands\"\nmsgstr \"コマンド\"\n\n#: ../../ext/commands/api.rst:115\nmsgid \"Decorators\"\nmsgstr \"デコレータ\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.command:1\nmsgid \"A decorator that transforms a function into a :class:`.Command` or if called with :func:`.group`, :class:`.Group`.\"\nmsgstr \"関数を :class:`.Command` 、または :func:`.group` で呼び出した場合には :class:`.Group` に変換するデコレータです。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.command:4\nmsgid \"By default the ``help`` attribute is received automatically from the docstring of the function and is cleaned up with the use of ``inspect.cleandoc``. If the docstring is ``bytes``, then it is decoded into :class:`str` using utf-8 encoding.\"\nmsgstr \"デフォルトでは、 ``help`` 属性は、関数の docstring から自動的に取得したものを ``inspect.cleandoc`` を使用してクリーンアップされたものを使用します。 docstring が ``bytes`` の場合、utf-8 エンコーディングを使って :class:`str` にデコードされます。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.command:9\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.hybrid.hybrid_command:15\nmsgid \"All checks added using the :func:`.check` & co. decorators are added into the function. There is no way to supply your own checks through this decorator.\"\nmsgstr \":func:`.check` & co.デコレータを使用して追加された、すべてのチェックを機能に追加されます。 このデコレータを通さずして、独自のチェックを提供する以外の方法はありません。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.command:13\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.hybrid.hybrid_command:21\nmsgid \"The name to create the command with. By default this uses the function name unchanged.\"\nmsgstr \"コマンドの名前。デフォルトでは関数名をそのまま使用します。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.command:16\nmsgid \"The class to construct with. By default this is :class:`.Command`. You usually do not change this.\"\nmsgstr \"構築するクラス。デフォルトでは、 :class:`.Command` です。通常これは変更しません。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.command:18\nmsgid \"Keyword arguments to pass into the construction of the class denoted by ``cls``.\"\nmsgstr \"``cls`` で指定されたクラスの構築時に渡すキーワード引数。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.command:21\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.hybrid.hybrid_command:29\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.hybrid.hybrid_group:12\nmsgid \"If the function is not a coroutine or is already a command.\"\nmsgstr \"関数がコルーチンでない場合、またはすでにコマンドが登録されている場合。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.group:1\nmsgid \"A decorator that transforms a function into a :class:`.Group`.\"\nmsgstr \"関数を :class:`.Group` に変換するデコレータ。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.group:3\nmsgid \"This is similar to the :func:`~discord.ext.commands.command` decorator but the ``cls`` parameter is set to :class:`Group` by default.\"\nmsgstr \"これは :func:`~discord.ext.commands.command` デコレータに似ていますが、デフォルトでは引数の ``cls`` は :class:`Group` に設定されています。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.group:6\nmsgid \"The ``cls`` parameter can now be passed.\"\nmsgstr \"``cls`` パラメータを渡せるようになりました。\"\n\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.hybrid.hybrid_command:1\nmsgid \"A decorator that transforms a function into a :class:`.HybridCommand`.\"\nmsgstr \"関数を :class:`.HybridCommand` に変換するデコレータ。\"\n\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.hybrid.hybrid_command:3\nmsgid \"A hybrid command is one that functions both as a regular :class:`.Command` and one that is also a :class:`app_commands.Command <discord.app_commands.Command>`.\"\nmsgstr \"ハイブリッドコマンドは、通常の :class:`.Command` と :class:`app_commands.Command <discord.app_commands.Command>` の両方として機能するコマンドです。\"\n\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.hybrid.hybrid_command:6\nmsgid \"The callback being attached to the command must be representable as an application command callback. Converters are silently converted into a :class:`~discord.app_commands.Transformer` with a :attr:`discord.AppCommandOptionType.string` type.\"\nmsgstr \"コマンドのコールバックはアプリケーションコマンドコールバックとして表現できるものでないといけません。コンバーターは :attr:`discord.AppCommandOptionType.string` 型の :class:`~discord.app_commands.Transformer` に暗黙的に変換されます。\"\n\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.hybrid.hybrid_command:11\nmsgid \"Checks and error handlers are dispatched and called as-if they were commands similar to :class:`.Command`. This means that they take :class:`Context` as a parameter rather than :class:`discord.Interaction`.\"\nmsgstr \"チェックとエラーハンドラは、 :class:`.Command` のようなコマンドであるかのように呼び出されます。つまり、パラメータには :class:`discord.Interaction` ではなく :class:`Context` を取ります。\"\n\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.hybrid.hybrid_command:24\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.hybrid.hybrid_group:9\nmsgid \"Whether to register the command also as an application command.\"\nmsgstr \"アプリケーションコマンドとしてもコマンドを登録するかどうか。\"\n\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.hybrid.hybrid_command:26\nmsgid \"Keyword arguments to pass into the construction of the hybrid command.\"\nmsgstr \"ハイブリッドコマンドの構築時に渡すキーワード引数。\"\n\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.hybrid.hybrid_group:1\nmsgid \"A decorator that transforms a function into a :class:`.HybridGroup`.\"\nmsgstr \"関数を :class:`.HybridGroup` に変換するデコレータ。\"\n\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.hybrid.hybrid_group:3\nmsgid \"This is similar to the :func:`~discord.ext.commands.group` decorator except it creates a hybrid group instead.\"\nmsgstr \"これは :func:`~discord.ext.commands.group` デコレータに似ていますが、代わりにハイブリッドグループを作成します。\"\n\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.hybrid.hybrid_group:6\nmsgid \"The name to create the group with. By default this uses the function name unchanged.\"\nmsgstr \"\"\n\n#: ../../ext/commands/api.rst:131\nmsgid \"Command\"\nmsgstr \"Command\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command:1\nmsgid \"A class that implements the protocol for a bot text command.\"\nmsgstr \"Botのテキストコマンドのプロトコルを実装するクラス。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command:3\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.hybrid.HybridCommand:8\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.hybrid.HybridGroup:10\nmsgid \"These are not created manually, instead they are created via the decorator or functional interface.\"\nmsgstr \"これらは手動では作成されず、デコレータまたは機能インターフェースを介して作成されます。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command:8\nmsgid \"The name of the command.\"\nmsgstr \"コマンドの名前。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command:14\nmsgid \"The coroutine that is executed when the command is called.\"\nmsgstr \"コマンドが呼び出されたときに実行されるコルーチン。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command:16\nmsgid \":ref:`coroutine <coroutine>`\"\nmsgstr \":ref:`コルーチン <coroutine>`\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command:20\nmsgid \"The long help text for the command.\"\nmsgstr \"コマンドに関する、長いヘルプテキスト。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command:22\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command:28\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command:34\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.Command.cog_name:3\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.Group.cog_name:3\nmsgid \"Optional[:class:`str`]\"\nmsgstr \"Optional[:class:`str`]\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command:26\nmsgid \"The short help text for the command.\"\nmsgstr \"コマンドに関する、短いヘルプテキスト。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command:32\nmsgid \"A replacement for arguments in the default help text.\"\nmsgstr \"デフォルトのヘルプ テキストを置き換えるための引数。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command:38\nmsgid \"The list of aliases the command can be invoked under.\"\nmsgstr \"そのコマンドを呼び出すことができるエイリアスのリスト。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command:40\nmsgid \"Union[List[:class:`str`], Tuple[:class:`str`]]\"\nmsgstr \"Union[List[:class:`str`], Tuple[:class:`str`]]\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command:44\nmsgid \"A boolean that indicates if the command is currently enabled. If the command is invoked while it is disabled, then :exc:`.DisabledCommand` is raised to the :func:`.on_command_error` event. Defaults to ``True``.\"\nmsgstr \"コマンドが、現在、有効かどうかを示すbool値。コマンドが無効化されている状態で呼び出された場合、:exc:`.DisabledCommand` が :func:`.on_command_error` にて発生します。デフォルトは ``True`` です。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command:53\nmsgid \"The parent group that this command belongs to. ``None`` if there isn't one.\"\nmsgstr \"このコマンドが属する親コマンド。 親コマンドが存在しない場合、``None`` が返ります。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command:56\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.Command.root_parent:7\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.Group.root_parent:7\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.HybridGroup.root_parent:7\nmsgid \"Optional[:class:`Group`]\"\nmsgstr \"Optional[:class:`Group`]\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command:60\nmsgid \"The cog that this command belongs to. ``None`` if there isn't one.\"\nmsgstr \"このコマンドが属するコグ。 属するコグが存在しない場合、``None`` が返ります。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command:66\nmsgid \"A list of predicates that verifies if the command could be executed with the given :class:`.Context` as the sole parameter. If an exception is necessary to be thrown to signal failure, then one inherited from :exc:`.CommandError` should be used. Note that if the checks fail then :exc:`.CheckFailure` exception is raised to the :func:`.on_command_error` event.\"\nmsgstr \"与えられた :class:`.Context` を唯一のパラメータとしてコマンドが実行できるかどうかを確認するチェック関数のリストです。もし失敗を知らせるために例外を発生させる必要がある場合には、 :exc:`.CommandError` から継承したものを使用する必要があります。もしチェックに失敗した場合には、 :func:`.on_command_error` イベントで :exc:`.CheckFailure` 例外が発生することに注意してください。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command:73\nmsgid \"List[Callable[[:class:`.Context`], :class:`bool`]]\"\nmsgstr \"List[Callable[[:class:`.Context`], :class:`bool`]]\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command:77\nmsgid \"The message prefixed into the default help command.\"\nmsgstr \"デフォルトのヘルプコマンドの前に表示されるメッセージ。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command:83\nmsgid \"If ``True``\\\\, the default help command does not show this in the help output.\"\nmsgstr \"``True`` の場合、デフォルトのヘルプコマンドではヘルプ出力に表示されません。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command:90\nmsgid \"If ``False`` and a keyword-only argument is provided then the keyword only argument is stripped and handled as if it was a regular argument that handles :exc:`.MissingRequiredArgument` and default values in a regular matter rather than passing the rest completely raw. If ``True`` then the keyword-only argument will pass in the rest of the arguments in a completely raw matter. Defaults to ``False``.\"\nmsgstr \"もし ``False`` でキーワードのみの引数を指定した場合には、キーワードのみの引数は取り除かれて、残りを完全に生のまま渡すのではなく、 :exc:`.MissingRequiredArgument` やデフォルト値を通常の引数として扱うように処理されます。もし ``True`` ならば、キーワードのみの引数は、残りの引数を完全に生のまま渡します。デフォルトは ``False`` です。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command:101\nmsgid \"The subcommand that was invoked, if any.\"\nmsgstr \"存在する場合、呼び出されたサブコマンド。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command:107\nmsgid \"If ``True`` and a variadic positional argument is specified, requires the user to specify at least one argument. Defaults to ``False``.\"\nmsgstr \"もし ``True`` で可変長の位置引数が指定された場合、少なくとも1つの引数を指定するようユーザーに要求します。デフォルトは ``False`` です。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command:116\nmsgid \"If ``True``\\\\, ignores extraneous strings passed to a command if all its requirements are met (e.g. ``?foo a b c`` when only expecting ``a`` and ``b``). Otherwise :func:`.on_command_error` and local error handlers are called with :exc:`.TooManyArguments`. Defaults to ``True``.\"\nmsgstr \"もし ``True`` ならば、コマンドの要求がすべて満たされていれば、余計な文字列を無視します (例: ``?foo a b c`` で ``a`` と ``b`` しか期待できない場合)。そうでなければ :func:`.on_command_error` とローカルのエラーハンドラが :exc:`.TooManyArguments` と共に呼び出されます。デフォルトは ``True`` です。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command:125\nmsgid \"If ``True``\\\\, cooldown processing is done after argument parsing, which calls converters. If ``False`` then cooldown processing is done first and then the converters are called second. Defaults to ``False``.\"\nmsgstr \"もし ``True`` ならば、引数解析の後にクールダウン処理が行われ、コンバータが呼び出されます。 ``False`` の場合は、クールダウン処理が最初に行われ、その後にコンバータが呼ばれます。デフォルトは ``False`` です。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command:133\nmsgid \"A dict of user provided extras to attach to the Command.\"\nmsgstr \"コマンドに添付するユーザー提供のオマケの辞書。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command:136\nmsgid \"This object may be copied by the library.\"\nmsgstr \"このオブジェクトはライブラリによってコピーされることがあります。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command:138\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.GroupMixin:9\n#: ../../../discord/ext/commands/cog.py:docstring of discord.ext.commands.cog.CogMeta:65\n#: ../../../discord/ext/commands/cog.py:docstring of discord.ext.commands.cog.CogMeta:112\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand:44\nmsgid \":class:`dict`\"\nmsgstr \":class:`dict`\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.after_invoke:9\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.after_invoke:9\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.after_invoke:9\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.after_invoke:9\nmsgid \"See :meth:`.Bot.after_invoke` for more info.\"\nmsgstr \"詳細は :meth:`.Bot.after_invoke` を参照してください。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.before_invoke:9\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.before_invoke:9\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.before_invoke:9\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.before_invoke:9\nmsgid \"See :meth:`.Bot.before_invoke` for more info.\"\nmsgstr \"詳細は :meth:`.Bot.before_invoke` を参照してください。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.error:1\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.error:1\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.error:1\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.error:1\nmsgid \"A decorator that registers a coroutine as a local error handler.\"\nmsgstr \"コルーチンをローカルエラーハンドラとして登録するデコレータです。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.error:3\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.error:3\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.error:3\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.error:3\nmsgid \"A local error handler is an :func:`.on_command_error` event limited to a single command. However, the :func:`.on_command_error` is still invoked afterwards as the catch-all.\"\nmsgstr \"ローカルエラーハンドラは、一つのコマンドに限定された :func:`.on_command_error` イベントです。しかし、キャッチオールとして :func:`.on_command_error` イベントはその後も呼び出されます。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.error:11\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.error:11\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.error:11\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.error:11\nmsgid \"The coroutine to register as the local error handler.\"\nmsgstr \"ローカルエラーハンドラとして登録するコルーチン。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.add_check:1\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.add_check:1\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.core.Command.add_check:1\nmsgid \"Adds a check to the command.\"\nmsgstr \"コマンドにチェックを追加します。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.add_check:3\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.add_check:3\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.core.Command.add_check:3\nmsgid \"This is the non-decorator interface to :func:`.check`.\"\nmsgstr \"これは :func:`.check` に対する非デコレーターインターフェイスです。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.add_check:13\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.add_check:13\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.core.Command.add_check:13\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.add_check:11\nmsgid \"The function that will be used as a check.\"\nmsgstr \"チェックとして使用される関数。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.remove_check:1\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.remove_check:1\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.core.Command.remove_check:1\nmsgid \"Removes a check from the command.\"\nmsgstr \"コマンドからチェックを削除します。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.remove_check:3\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.remove_check:3\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.core.Command.remove_check:3\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.remove_check:3\nmsgid \"This function is idempotent and will not raise an exception if the function is not in the command's checks.\"\nmsgstr \"この関数は冪等性を保持しており、関数がグローバルチェックに含まれていない場合でも例外が発生しません。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.remove_check:12\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.remove_check:12\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.core.Command.remove_check:12\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.remove_check:12\nmsgid \"The function to remove from the checks.\"\nmsgstr \"チェックから除去する関数。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.update:1\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.update:1\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.core.Command.update:1\nmsgid \"Updates :class:`Command` instance with updated attribute.\"\nmsgstr \":class:`Command` インスタンスを更新された属性で更新します。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.update:3\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.update:3\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.core.Command.update:3\nmsgid \"This works similarly to the :func:`~discord.ext.commands.command` decorator in terms of parameters in that they are passed to the :class:`Command` or subclass constructors, sans the name and callback.\"\nmsgstr \"これは :func:`~discord.ext.commands.command` デコレーターと同様に動作します。パラメータは :class:`Command` やサブクラスのコンストラクターに渡され、名前とコールバックは除かれます。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.__call__:3\nmsgid \"Calls the internal callback that the command holds.\"\nmsgstr \"コマンドが保持する内部コールバックを呼び出します。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.__call__:7\nmsgid \"This bypasses all mechanisms -- including checks, converters, invoke hooks, cooldowns, etc. You must take care to pass the proper arguments and types to this function.\"\nmsgstr \"これは、チェック、コンバーター、呼び出しフック、クールダウンなど、すべてのメカニズムを回避します。この関数には、適切な引数と型を渡すように注意してください。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.__call__:15\nmsgid \"``context`` parameter is now positional-only.\"\nmsgstr \"``ctx`` パラメータは位置指定のみになりました。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.copy:1\nmsgid \"Creates a copy of this command.\"\nmsgstr \"コマンドのコピーを作成します。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.copy:3\nmsgid \"A new instance of this command.\"\nmsgstr \"このコマンドの新しいインスタンス。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.copy:4\nmsgid \":class:`Command`\"\nmsgstr \":class:`Command`\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.Command.clean_params:1\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.Group.clean_params:1\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.HybridGroup.clean_params:1\nmsgid \"Dict[:class:`str`, :class:`Parameter`]: Retrieves the parameter dictionary without the context or self parameters.\"\nmsgstr \"Dict[:class:`str`, :class:`Parameter`]: コンテキストまたは自己のパラメータなしでパラメータ辞書を取得します。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.Command.clean_params:4\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.Group.clean_params:4\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.HybridGroup.clean_params:4\nmsgid \"Useful for inspecting signature.\"\nmsgstr \"シグネチャーの検査に便利です。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.Command.cooldown:1\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.Group.cooldown:1\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.HybridGroup.cooldown:1\nmsgid \"The cooldown of a command when invoked or ``None`` if the command doesn't have a registered cooldown.\"\nmsgstr \"コマンドを実行したときのクールダウン。クールダウンが登録されていないコマンドの場合は ``None`` となります。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.Command.cooldown:6\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.Group.cooldown:6\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.HybridGroup.cooldown:6\nmsgid \"Optional[:class:`~discord.app_commands.Cooldown`]\"\nmsgstr \"Optional[:class:`discord.app_commands.Cooldown`]\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.Command.full_parent_name:1\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.Group.full_parent_name:1\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.HybridGroup.full_parent_name:1\nmsgid \"Retrieves the fully qualified parent command name.\"\nmsgstr \"完全修飾された親コマンド名を取得します。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.Command.full_parent_name:3\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.Group.full_parent_name:3\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.HybridGroup.full_parent_name:3\nmsgid \"This the base command name required to execute it. For example, in ``?one two three`` the parent name would be ``one two``.\"\nmsgstr \"これは実行に必要なベースコマンド名です。例えば、 ``?one two three`` では親名は ``one two`` になります。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.Command.parents:1\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.Group.parents:1\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.HybridGroup.parents:1\nmsgid \"Retrieves the parents of this command.\"\nmsgstr \"このコマンドの親を取得します。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.Command.parents:3\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.Group.parents:3\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.HybridGroup.parents:3\nmsgid \"If the command has no parents then it returns an empty :class:`list`.\"\nmsgstr \"親がない場合は、空の :class:`list` を返します。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.Command.parents:5\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.Group.parents:5\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.HybridGroup.parents:5\nmsgid \"For example in commands ``?a b c test``, the parents are ``[c, b, a]``.\"\nmsgstr \"例えば、``?a b c test`` では、親は ``[c, b, a]`` です。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.Command.parents:9\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.Group.parents:9\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.HybridGroup.parents:9\nmsgid \"List[:class:`Group`]\"\nmsgstr \"List[:class:`Group`]\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.Command.root_parent:1\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.Group.root_parent:1\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.HybridGroup.root_parent:1\nmsgid \"Retrieves the root parent of this command.\"\nmsgstr \"このコマンドの大元の親を取得します。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.Command.root_parent:3\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.Group.root_parent:3\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.HybridGroup.root_parent:3\nmsgid \"If the command has no parents then it returns ``None``.\"\nmsgstr \"親がない場合は、``None`` を返します。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.Command.root_parent:5\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.Group.root_parent:5\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.HybridGroup.root_parent:5\nmsgid \"For example in commands ``?a b c test``, the root parent is ``a``.\"\nmsgstr \"例えば、``?a b c test`` では、親は ``a`` です。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.Command.qualified_name:1\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.Group.qualified_name:1\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.HybridGroup.qualified_name:1\nmsgid \"Retrieves the fully qualified command name.\"\nmsgstr \"完全修飾されたコマンド名を取得します。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.Command.qualified_name:3\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.Group.qualified_name:3\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.HybridGroup.qualified_name:3\nmsgid \"This is the full parent name with the command name as well. For example, in ``?one two three`` the qualified name would be ``one two three``.\"\nmsgstr \"これは、コマンド名を含む完全な親名称です。例えば、 ``?one two three`` の場合、完全修飾名は ``one two three`` となります。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.is_on_cooldown:1\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.is_on_cooldown:1\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.core.Command.is_on_cooldown:1\nmsgid \"Checks whether the command is currently on cooldown.\"\nmsgstr \"コマンドが現在クールダウン中であるかどうかを確認します。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.is_on_cooldown:7\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.is_on_cooldown:7\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.core.Command.is_on_cooldown:7\nmsgid \"The invocation context to use when checking the commands cooldown status.\"\nmsgstr \"コマンドのクールダウン状況を確認するときに使用する呼び出しコンテキスト。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.is_on_cooldown:10\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.is_on_cooldown:10\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.core.Command.is_on_cooldown:10\nmsgid \"A boolean indicating if the command is on cooldown.\"\nmsgstr \"コマンドがクールダウン中かを示すbool値。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.reset_cooldown:1\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.reset_cooldown:1\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.core.Command.reset_cooldown:1\nmsgid \"Resets the cooldown on this command.\"\nmsgstr \"このコマンドのクールダウンをリセットします。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.reset_cooldown:7\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.reset_cooldown:7\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.core.Command.reset_cooldown:7\nmsgid \"The invocation context to reset the cooldown under.\"\nmsgstr \"クールダウンをリセットするための呼び出しコンテキスト。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.get_cooldown_retry_after:1\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.get_cooldown_retry_after:1\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.core.Command.get_cooldown_retry_after:1\nmsgid \"Retrieves the amount of seconds before this command can be tried again.\"\nmsgstr \"このコマンドを再試行できるまでの秒数を取得します。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.get_cooldown_retry_after:9\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.get_cooldown_retry_after:9\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.core.Command.get_cooldown_retry_after:9\nmsgid \"The invocation context to retrieve the cooldown from.\"\nmsgstr \"クールダウンをリセットするための呼び出しコンテキスト。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.get_cooldown_retry_after:12\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.get_cooldown_retry_after:12\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.core.Command.get_cooldown_retry_after:12\nmsgid \"The amount of time left on this command's cooldown in seconds. If this is ``0.0`` then the command isn't on cooldown.\"\nmsgstr \"このコマンドのクールダウンの残り時間（秒）。これが ``0.0`` であれば、コマンドはクールダウン中ではありません。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.has_error_handler:1\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.has_error_handler:1\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.core.Command.has_error_handler:1\nmsgid \":class:`bool`: Checks whether the command has an error handler registered.\"\nmsgstr \":class:`bool`: コマンドにエラーハンドラが登録されているかどうかを確認します。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.Command.cog_name:1\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.Group.cog_name:1\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.HybridGroup.cog_name:1\nmsgid \"The name of the cog this command belongs to, if any.\"\nmsgstr \"このコマンドが属するコグの名前があれば、その名前。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.Command.short_doc:1\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.Group.short_doc:1\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.HybridGroup.short_doc:1\nmsgid \"Gets the \\\"short\\\" documentation of a command.\"\nmsgstr \"コマンドの「短い」説明を取得します。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.Command.short_doc:3\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.Group.short_doc:3\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.HybridGroup.short_doc:3\nmsgid \"By default, this is the :attr:`.brief` attribute. If that lookup leads to an empty string then the first line of the :attr:`.help` attribute is used instead.\"\nmsgstr \"デフォルトでは、これは :attr:`brief` 属性です。属性値が空の文字列であれば、代わりに :attr:`help` 属性の最初の行が使われます。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.Command.signature:1\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.Group.signature:1\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.HybridGroup.signature:1\nmsgid \"Returns a POSIX-like signature useful for help command output.\"\nmsgstr \"POSIX のような書式テキストを返します。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.can_run:3\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.can_run:3\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.hybrid.HybridCommand.can_run:3\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.hybrid.HybridGroup.can_run:3\nmsgid \"Checks if the command can be executed by checking all the predicates inside the :attr:`~Command.checks` attribute. This also checks whether the command is disabled.\"\nmsgstr \":attr:`~Command.checks` 属性内のすべての関数をチェックすることで、コマンドが実行可能かどうかをチェックします。また、コマンドが無効かどうかもチェックします。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.can_run:7\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.can_run:7\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.hybrid.HybridCommand.can_run:7\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.hybrid.HybridGroup.can_run:7\nmsgid \"Checks whether the command is disabled or not\"\nmsgstr \"コマンドが無効であるかどうかをチェックします。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.can_run:14\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.can_run:14\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.hybrid.HybridCommand.can_run:14\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.hybrid.HybridGroup.can_run:14\nmsgid \"The ctx of the command currently being invoked.\"\nmsgstr \"現在呼び出されているコマンドのコンテキスト。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.can_run:17\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.can_run:17\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.hybrid.HybridCommand.can_run:17\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.hybrid.HybridGroup.can_run:17\nmsgid \"Any command error that was raised during a check call will be propagated     by this function.\"\nmsgstr \"チェック中に発生したコマンドエラーは、この関数によってキャッチされます。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.can_run:19\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Command.can_run:19\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.hybrid.HybridCommand.can_run:19\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.hybrid.HybridGroup.can_run:19\nmsgid \"A boolean indicating if the command can be invoked.\"\nmsgstr \"コマンドが呼び出し可能かどうかを示すbool値。\"\n\n#: ../../ext/commands/api.rst:150\nmsgid \"Group\"\nmsgstr \"Group\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Group:1\nmsgid \"A class that implements a grouping protocol for commands to be executed as subcommands.\"\nmsgstr \"サブコマンドとして実行されるコマンド用のgroupingプロトコルを実装したクラス。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Group:4\nmsgid \"This class is a subclass of :class:`.Command` and thus all options valid in :class:`.Command` are valid in here as well.\"\nmsgstr \"このクラスは :class:`.Command` のサブクラスなので、 :class:`.Command` で使える関数も使えます。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Group:9\nmsgid \"Indicates if the group callback should begin parsing and invocation only if no subcommand was found. Useful for making it an error handling function to tell the user that no subcommand was found or to have different functionality in case no subcommand was found. If this is ``False``, then the group callback will always be invoked first. This means that the checks and the parsing dictated by its parameters will be executed. Defaults to ``False``.\"\nmsgstr \"サブコマンドが見つからなかった場合にのみ、グループコールバックが解析と呼び出しを開始するかどうかを示します。 サブコマンドが見つからなかったこと、またはサブコマンドが見つからなかった場合に異なる機能を持つことをユーザに伝えるエラー処理関数にするのに便利です。 これが ``False`` の場合、グループコールバックは常に最初に呼び出されます。 つまり、パラメータによって決定されるチェックと解析が実行されます。デフォルトは ``False`` です。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Group:22\nmsgid \"Indicates if the group's commands should be case insensitive. Defaults to ``False``.\"\nmsgstr \"グループのコマンドが大文字と小文字を区別する必要があるかどうかを示します。デフォルトは ``False`` です。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Group.copy:1\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.core.Group.copy:1\nmsgid \"Creates a copy of this :class:`Group`.\"\nmsgstr \"この :class:`Group` のコピーを作成します。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Group.copy:3\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.core.Group.copy:3\nmsgid \"A new instance of this group.\"\nmsgstr \"このグループの新しいインスタンス。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.Group.copy:4\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.core.Group.copy:4\nmsgid \":class:`Group`\"\nmsgstr \":class:`Group`\"\n\n#: ../../ext/commands/api.rst:175\nmsgid \"GroupMixin\"\nmsgstr \"GroupMixin\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.GroupMixin:1\nmsgid \"A mixin that implements common functionality for classes that behave similar to :class:`.Group` and are allowed to register commands.\"\nmsgstr \":class:`.Group` と同様に動作し、コマンドを登録可能なクラスの共通機能を実装したミックスイン。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.GroupMixin:6\nmsgid \"A mapping of command name to :class:`.Command` objects.\"\nmsgstr \"コマンド名の :class:`.Command` オブジェクトへのマッピング。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.GroupMixin:13\nmsgid \"Whether the commands should be case insensitive. Defaults to ``False``.\"\nmsgstr \"コマンドの大文字小文字を区別するかどうか。デフォルトは ``False`` です。\"\n\n#: ../../ext/commands/api.rst:190\nmsgid \"HybridCommand\"\nmsgstr \"HybridCommand\"\n\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.hybrid.HybridCommand:1\nmsgid \"A class that is both an application command and a regular text command.\"\nmsgstr \"アプリケーションコマンドと通常のテキストコマンドの両方であるクラス。\"\n\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.hybrid.HybridCommand:3\nmsgid \"This has the same parameters and attributes as a regular :class:`~discord.ext.commands.Command`. However, it also doubles as an :class:`application command <discord.app_commands.Command>`. In order for this to work, the callbacks must have the same subset that is supported by application commands.\"\nmsgstr \"これは通常の :class:`~discord.ext.commands.Command` と同じパラメータや属性を有します。しかし、これは :class:`アプリケーションコマンド <discord.app_commands.Command>` としても動作します。このため、コールバックはアプリケーションコマンドでサポートされるものでないといけません。\"\n\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.hybrid.HybridCommand.autocomplete:1\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.hybrid.HybridGroup.autocomplete:1\nmsgid \"A decorator that registers a coroutine as an autocomplete prompt for a parameter.\"\nmsgstr \"パラメータのオートコンプリートに使用されるコルーチンを登録するデコレータ。\"\n\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.hybrid.HybridCommand.autocomplete:3\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.hybrid.HybridGroup.autocomplete:3\nmsgid \"This is the same as :meth:`~discord.app_commands.Command.autocomplete`. It is only applicable for the application command and doesn't do anything if the command is a regular command.\"\nmsgstr \"これは :meth:`~discord.app_commands.Command.autocomplete` と同じです。これはアプリケーションコマンドにのみ適用され、通常のコマンドでは何もしません。\"\n\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.hybrid.HybridCommand.autocomplete:9\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.hybrid.HybridGroup.autocomplete:11\nmsgid \"Similar to the :meth:`~discord.app_commands.Command.autocomplete` method, this takes :class:`~discord.Interaction` as a parameter rather than a :class:`Context`.\"\nmsgstr \":meth:`~discord.app_commands.Command.autocomplete` メソッドと同様に、 :class:`Context` ではなく :class:`~discord.Interaction` をパラメータとして取ります。\"\n\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.hybrid.HybridCommand.autocomplete:12\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.hybrid.HybridGroup.autocomplete:14\nmsgid \"The parameter name to register as autocomplete.\"\nmsgstr \"オートコンプリートに登録するパラメータ名。\"\n\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.hybrid.HybridCommand.autocomplete:15\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.hybrid.HybridGroup.autocomplete:17\nmsgid \"The coroutine passed is not actually a coroutine or     the parameter is not found or of an invalid type.\"\nmsgstr \"渡されたコルーチンが実際にはコルーチンでない場合や、パラメータが見つからず、または無効な型であった場合。\"\n\n#: ../../ext/commands/api.rst:212\nmsgid \"HybridGroup\"\nmsgstr \"HybridGroup\"\n\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.hybrid.HybridGroup:1\nmsgid \"A class that is both an application command group and a regular text group.\"\nmsgstr \"アプリケーションコマンドグループと通常のテキストグループの両方であるクラス。\"\n\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.hybrid.HybridGroup:3\nmsgid \"This has the same parameters and attributes as a regular :class:`~discord.ext.commands.Group`. However, it also doubles as an :class:`application command group <discord.app_commands.Group>`. Note that application commands groups cannot have callbacks associated with them, so the callback is only called if it's not invoked as an application command.\"\nmsgstr \"これは通常の :class:`~discord.ext.commands.Group` と同じパラメータや属性を有します。しかし、これは :class:`アプリケーションコマンドグループ <discord.app_commands.Group>` としても動作します。なお、アプリケーションコマンドグループにはコールバックを付けることはできないため、コールバックはアプリケーションコマンドとして呼び出されていない場合のみに呼び出されます。\"\n\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.hybrid.HybridGroup:8\nmsgid \"Hybrid groups will always have :attr:`Group.invoke_without_command` set to ``True``.\"\nmsgstr \"ハイブリッドグループでは :attr:`Group.invoke_without_command` が常に ``True`` に設定されています。\"\n\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.hybrid.HybridGroup:17\nmsgid \"The command name to use as a fallback for the application command. Since application command groups cannot be invoked, this creates a subcommand within the group that can be invoked with the given group callback. If ``None`` then no fallback command is given. Defaults to ``None``.\"\nmsgstr \"アプリケーションコマンド用のフォールバックとして使用するコマンド名。アプリケーションコマンドグループを呼び出すことはできないため、これはグループ内に与えられたグループコールバックで呼び出すことのできるサブコマンドを作成します。 ``None`` の場合、フォールバックコマンドは指定されません。デフォルトは ``None`` です。\"\n\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.hybrid.HybridGroup.autocomplete:7\nmsgid \"This is only available if the group has a fallback application command registered.\"\nmsgstr \"これは、フォールバックアプリケーションコマンドが登録されている場合にのみ使用できます。\"\n\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.hybrid.HybridGroup.group:1\nmsgid \"A shortcut decorator that invokes :func:`~discord.ext.commands.hybrid_group` and adds it to the internal command list via :meth:`~.GroupMixin.add_command`.\"\nmsgstr \":func:`~discord.ext.commands.hybrid_group` を呼び出し、 :meth:`~.GroupMixin.add_command` を介して内部コマンドリストに追加するショートカットデコレータ。\"\n\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.hybrid.HybridGroup.add_command:1\nmsgid \"Adds a :class:`.HybridCommand` into the internal list of commands.\"\nmsgstr \":class:`.HybridCommand` を内部のコマンドリストに追加します。\"\n\n#: ../../../discord/ext/commands/hybrid.py:docstring of discord.ext.commands.hybrid.HybridGroup.add_command:10\nmsgid \"If the command passed is not a subclass of :class:`.HybridCommand`.\"\nmsgstr \"渡されたコマンドが、 :class:`.HybridCommand` のサブクラスでない場合。\"\n\n#: ../../ext/commands/api.rst:243\nmsgid \"Cogs\"\nmsgstr \"Cogs\"\n\n#: ../../ext/commands/api.rst:246\nmsgid \"Cog\"\nmsgstr \"Cog\"\n\n#: ../../../discord/ext/commands/cog.py:docstring of discord.ext.commands.cog.Cog:1\nmsgid \"The base class that all cogs must inherit from.\"\nmsgstr \"すべてのコグが継承しなければならないベースクラス。\"\n\n#: ../../../discord/ext/commands/cog.py:docstring of discord.ext.commands.cog.Cog:3\nmsgid \"A cog is a collection of commands, listeners, and optional state to help group commands together. More information on them can be found on the :ref:`ext_commands_cogs` page.\"\nmsgstr \"コグは、コマンドをまとめるのに役立つ、コマンド、リスナー、任意の状態の集まりです。 詳細については、 :ref:`ext_commands_cogs` ページを参照してください。\"\n\n#: ../../../discord/ext/commands/cog.py:docstring of discord.ext.commands.cog.Cog:7\nmsgid \"When inheriting from this class, the options shown in :class:`CogMeta` are equally valid here.\"\nmsgstr \"このクラスを継承する場合、 :class:`CogMeta` に表示されているオプションもここで同様に有効です。\"\n\n#: ../../../discord/ext/commands/cog.py:docstring of discord.ext.commands.cog.Cog.get_commands:1\nmsgid \"Returns the commands that are defined inside this cog.\"\nmsgstr \"このコグ内で定義されているコマンドを返します。\"\n\n#: ../../../discord/ext/commands/cog.py:docstring of discord.ext.commands.cog.Cog.get_commands:3\nmsgid \"This does *not* include :class:`discord.app_commands.Command` or :class:`discord.app_commands.Group` instances.\"\nmsgstr \"これには :class:`discord.app_commands.Command` や :class:`discord.app_commands.Group` のインスタンスは *含まれません* 。\"\n\n#: ../../../discord/ext/commands/cog.py:docstring of discord.ext.commands.cog.Cog.get_commands:6\nmsgid \"A :class:`list` of :class:`.Command`\\\\s that are defined inside this cog, not including subcommands.\"\nmsgstr \"このコグ内で定義されているサブコマンドを含まない :class:`.Command` の :class:`list` 。\"\n\n#: ../../../discord/ext/commands/cog.py:docstring of discord.ext.commands.cog.Cog.get_commands:8\nmsgid \"List[:class:`.Command`]\"\nmsgstr \"List[:class:`.Command`]\"\n\n#: ../../../discord/ext/commands/cog.py:docstring of discord.ext.commands.cog.Cog.get_app_commands:1\nmsgid \"Returns the app commands that are defined inside this cog.\"\nmsgstr \"このコグ内で定義されているアプリケーションコマンドを返します。\"\n\n#: ../../../discord/ext/commands/cog.py:docstring of discord.ext.commands.cog.Cog.get_app_commands:3\nmsgid \"A :class:`list` of :class:`discord.app_commands.Command`\\\\s and :class:`discord.app_commands.Group`\\\\s that are defined inside this cog, not including subcommands.\"\nmsgstr \"このコグ内で定義されている、サブコマンドを除いた :class:`discord.app_commands.Command` と :class:`discord.app_commands.Group` の :class:`list` 。\"\n\n#: ../../../discord/ext/commands/cog.py:docstring of discord.ext.commands.cog.Cog.get_app_commands:5\nmsgid \"List[Union[:class:`discord.app_commands.Command`, :class:`discord.app_commands.Group`]]\"\nmsgstr \"List[Union[:class:`discord.app_commands.Command`, :class:`discord.app_commands.Group`]]\"\n\n#: ../../../discord/ext/commands/cog.py:docstring of discord.ext.commands.Cog.qualified_name:1\nmsgid \"Returns the cog's specified name, not the class name.\"\nmsgstr \"クラス名ではなく、コグの指定した名前を返します。\"\n\n#: ../../../discord/ext/commands/cog.py:docstring of discord.ext.commands.Cog.description:1\nmsgid \"Returns the cog's description, typically the cleaned docstring.\"\nmsgstr \"コグの説明を返します。通常、クリーンな docstring を返します。\"\n\n#: ../../../discord/ext/commands/cog.py:docstring of discord.ext.commands.cog.Cog.walk_commands:1\nmsgid \"An iterator that recursively walks through this cog's commands and subcommands.\"\nmsgstr \"このコグのすべてのコマンドとサブコマンドを、再帰的に網羅するイテレータ。\"\n\n#: ../../../discord/ext/commands/cog.py:docstring of discord.ext.commands.cog.Cog.walk_commands:3\nmsgid \"Union[:class:`.Command`, :class:`.Group`] -- A command or group from the cog.\"\nmsgstr \"Union[:class:`.Command`, :class:`.Group`] -- コグ内のコマンドまたはグループ。\"\n\n#: ../../../discord/ext/commands/cog.py:docstring of discord.ext.commands.cog.Cog.walk_app_commands:1\nmsgid \"An iterator that recursively walks through this cog's app commands and subcommands.\"\nmsgstr \"このコグのすべてのアプリケーションコマンドとサブコマンドを、再帰的に網羅するイテレータ。\"\n\n#: ../../../discord/ext/commands/cog.py:docstring of discord.ext.commands.cog.Cog.walk_app_commands:3\nmsgid \"Union[:class:`discord.app_commands.Command`, :class:`discord.app_commands.Group`] -- An app command or group from the cog.\"\nmsgstr \"Union[:class:`discord.app_commands.Command`, :class:`discord.app_commands.Group`] -- コグのアプリケーションコマンドまたはグループ。\"\n\n#: ../../../discord/ext/commands/cog.py:docstring of discord.ext.commands.Cog.app_command:1\nmsgid \"Returns the associated group with this cog.\"\nmsgstr \"このコグに関連付けられたグループを返します。\"\n\n#: ../../../discord/ext/commands/cog.py:docstring of discord.ext.commands.Cog.app_command:3\nmsgid \"This is only available if inheriting from :class:`GroupCog`.\"\nmsgstr \":class:`GroupCog` から継承する場合にのみ使用できます。\"\n\n#: ../../../discord/ext/commands/cog.py:docstring of discord.ext.commands.Cog.app_command:5\nmsgid \"Optional[:class:`discord.app_commands.Group`]\"\nmsgstr \"Optional[:class:`discord.app_commands.Group`]\"\n\n#: ../../../discord/ext/commands/cog.py:docstring of discord.ext.commands.cog.Cog.get_listeners:1\nmsgid \"Returns a :class:`list` of (name, function) listener pairs that are defined in this cog.\"\nmsgstr \"このコグで定義されている (コマンド名 , 関数) リスナーのペアの :class:`list` を返します。\"\n\n#: ../../../discord/ext/commands/cog.py:docstring of discord.ext.commands.cog.Cog.get_listeners:3\nmsgid \"The listeners defined in this cog.\"\nmsgstr \"このコグで定義されるリスナー。\"\n\n#: ../../../discord/ext/commands/cog.py:docstring of discord.ext.commands.cog.Cog.get_listeners:4\nmsgid \"List[Tuple[:class:`str`, :ref:`coroutine <coroutine>`]]\"\nmsgstr \"List[Tuple[:class:`str`, :ref:`coroutine <coroutine>`]]\"\n\n#: ../../../discord/ext/commands/cog.py:docstring of discord.ext.commands.cog.Cog.listener:1\nmsgid \"A decorator that marks a function as a listener.\"\nmsgstr \"関数をリスナーとしてマークするデコレータ。\"\n\n#: ../../../discord/ext/commands/cog.py:docstring of discord.ext.commands.cog.Cog.listener:3\nmsgid \"This is the cog equivalent of :meth:`.Bot.listen`.\"\nmsgstr \"これはコグの :meth:`.Bot.listen` に相当するものです。\"\n\n#: ../../../discord/ext/commands/cog.py:docstring of discord.ext.commands.cog.Cog.listener:5\nmsgid \"The name of the event being listened to. If not provided, it defaults to the function's name.\"\nmsgstr \"受信するイベント名です。指定されていない場合は、関数の名前がデフォルトで使われます。\"\n\n#: ../../../discord/ext/commands/cog.py:docstring of discord.ext.commands.cog.Cog.listener:9\nmsgid \"The function is not a coroutine function or a string was not passed as     the name.\"\nmsgstr \"関数がコルーチンではないか、文字列が名前として渡されていません。\"\n\n#: ../../../discord/ext/commands/cog.py:docstring of discord.ext.commands.cog.Cog.has_error_handler:1\nmsgid \":class:`bool`: Checks whether the cog has an error handler.\"\nmsgstr \":class:`bool`: コグにエラーハンドラが登録されているかどうかをチェックします。\"\n\n#: ../../../discord/ext/commands/cog.py:docstring of discord.ext.commands.cog.Cog.has_app_command_error_handler:1\nmsgid \":class:`bool`: Checks whether the cog has an app error handler.\"\nmsgstr \":class:`bool`: コグにアプリケーションエラーハンドラが登録されているかどうかをチェックします。\"\n\n#: ../../../discord/ext/commands/cog.py:docstring of discord.ext.commands.cog.Cog.cog_load:1\n#: ../../../discord/ext/commands/cog.py:docstring of discord.ext.commands.cog.Cog.cog_unload:1\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.command_not_found:1\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.subcommand_not_found:1\nmsgid \"|maybecoro|\"\nmsgstr \"|maybecoro|\"\n\n#: ../../../discord/ext/commands/cog.py:docstring of discord.ext.commands.cog.Cog.cog_load:3\nmsgid \"A special method that is called when the cog gets loaded.\"\nmsgstr \"コグが読み込まれた際に呼び出される特別なメソッド。\"\n\n#: ../../../discord/ext/commands/cog.py:docstring of discord.ext.commands.cog.Cog.cog_load:5\nmsgid \"Subclasses must replace this if they want special asynchronous loading behaviour. Note that the ``__init__`` special method does not allow asynchronous code to run inside it, thus this is helpful for setting up code that needs to be asynchronous.\"\nmsgstr \"サブクラスは特別な非同期読み込み動作が必要な場合にこれを置き換えなければなりません。 特別な ``__init__`` メソッドは、その中で非同期コードを実行することを許可しないので、これは非同期な必要があるコードを設定することに役立つ、ということに注意してください。\"\n\n#: ../../../discord/ext/commands/cog.py:docstring of discord.ext.commands.cog.Cog.cog_unload:3\nmsgid \"A special method that is called when the cog gets removed.\"\nmsgstr \"コグが削除された際に呼び出される特別なメソッド。\"\n\n#: ../../../discord/ext/commands/cog.py:docstring of discord.ext.commands.cog.Cog.cog_unload:5\nmsgid \"Subclasses must replace this if they want special unloading behaviour.\"\nmsgstr \"サブクラスは特別なアンロード動作が必要な場合にこれを置き換えなければなりません。\"\n\n#: ../../../discord/ext/commands/cog.py:docstring of discord.ext.commands.cog.Cog.cog_unload:7\nmsgid \"Exceptions raised in this method are ignored during extension unloading.\"\nmsgstr \"\"\n\n#: ../../../discord/ext/commands/cog.py:docstring of discord.ext.commands.cog.Cog.cog_unload:11\nmsgid \"This method can now be a :term:`coroutine`.\"\nmsgstr \"このメソッドは現在 :term:`coroutine` になりました。\"\n\n#: ../../../discord/ext/commands/cog.py:docstring of discord.ext.commands.cog.Cog.bot_check_once:1\nmsgid \"A special method that registers as a :meth:`.Bot.check_once` check.\"\nmsgstr \":meth:`.Bot.check_once` チェックとして登録する特別なメソッド。\"\n\n#: ../../../discord/ext/commands/cog.py:docstring of discord.ext.commands.cog.Cog.bot_check_once:4\n#: ../../../discord/ext/commands/cog.py:docstring of discord.ext.commands.cog.Cog.bot_check:4\n#: ../../../discord/ext/commands/cog.py:docstring of discord.ext.commands.cog.Cog.cog_check:4\nmsgid \"This function **can** be a coroutine and must take a sole parameter, ``ctx``, to represent the :class:`.Context`.\"\nmsgstr \"この関数はコルーチンであり、 :class:`.Context` を表すために唯一のパラメータである ``ctx`` を取る必要があります。\"\n\n#: ../../../discord/ext/commands/cog.py:docstring of discord.ext.commands.cog.Cog.bot_check:1\nmsgid \"A special method that registers as a :meth:`.Bot.check` check.\"\nmsgstr \":meth:`.Bot.check` チェックとして登録する特別なメソッド。\"\n\n#: ../../../discord/ext/commands/cog.py:docstring of discord.ext.commands.cog.Cog.cog_check:1\nmsgid \"A special method that registers as a :func:`~discord.ext.commands.check` for every command and subcommand in this cog.\"\nmsgstr \"このコグのすべてのコマンドとサブコマンドに対して :func:`~discord.ext.commands.check` として登録する特別なメソッド。\"\n\n#: ../../../discord/ext/commands/cog.py:docstring of discord.ext.commands.cog.Cog.interaction_check:1\n#: ../../../discord/ext/commands/cog.py:docstring of discord.ext.commands.cog.Cog.interaction_check:1\nmsgid \"A special method that registers as a :func:`discord.app_commands.check` for every app command and subcommand in this cog.\"\nmsgstr \"\"\n\n#: ../../../discord/ext/commands/cog.py:docstring of discord.ext.commands.cog.Cog.interaction_check:4\n#: ../../../discord/ext/commands/cog.py:docstring of discord.ext.commands.cog.Cog.interaction_check:4\nmsgid \"This function **can** be a coroutine and must take a sole parameter, ``interaction``, to represent the :class:`~discord.Interaction`.\"\nmsgstr \"\"\n\n#: ../../../discord/ext/commands/cog.py:docstring of discord.ext.commands.cog.Cog.cog_command_error:3\nmsgid \"A special method that is called whenever an error is dispatched inside this cog.\"\nmsgstr \"このコグ内でエラーが発生するたびに呼び出される特別なメソッド。\"\n\n#: ../../../discord/ext/commands/cog.py:docstring of discord.ext.commands.cog.Cog.cog_command_error:6\nmsgid \"This is similar to :func:`.on_command_error` except only applying to the commands inside this cog.\"\nmsgstr \"これは :func:`.on_command_error` に似ていますが、コグ内のコマンドにのみ適用されます。\"\n\n#: ../../../discord/ext/commands/cog.py:docstring of discord.ext.commands.cog.Cog.cog_command_error:9\n#: ../../../discord/ext/commands/cog.py:docstring of discord.ext.commands.cog.Cog.cog_app_command_error:9\n#: ../../../discord/ext/commands/cog.py:docstring of discord.ext.commands.cog.Cog.cog_before_invoke:7\n#: ../../../discord/ext/commands/cog.py:docstring of discord.ext.commands.cog.Cog.cog_after_invoke:7\nmsgid \"This **must** be a coroutine.\"\nmsgstr \"**コルーチンでなければなりません**。\"\n\n#: ../../../discord/ext/commands/cog.py:docstring of discord.ext.commands.cog.Cog.cog_command_error:11\nmsgid \"The invocation context where the error happened.\"\nmsgstr \"エラーが発生した呼び出しコンテキスト。\"\n\n#: ../../../discord/ext/commands/cog.py:docstring of discord.ext.commands.cog.Cog.cog_command_error:13\nmsgid \"The error that happened.\"\nmsgstr \"発生したエラー\"\n\n#: ../../../discord/ext/commands/cog.py:docstring of discord.ext.commands.cog.Cog.cog_app_command_error:3\nmsgid \"A special method that is called whenever an error within an application command is dispatched inside this cog.\"\nmsgstr \"このコグ内でアプリケーションコマンドのエラーが発生するたびに呼び出される特別なメソッド。\"\n\n#: ../../../discord/ext/commands/cog.py:docstring of discord.ext.commands.cog.Cog.cog_app_command_error:6\nmsgid \"This is similar to :func:`discord.app_commands.CommandTree.on_error` except only applying to the application commands inside this cog.\"\nmsgstr \"これは :func:`discord.app_commands.CommandTree.on_error` に似ていますが、コグ内のアプリケーションコマンドにのみ適用されます。\"\n\n#: ../../../discord/ext/commands/cog.py:docstring of discord.ext.commands.cog.Cog.cog_app_command_error:11\nmsgid \"The interaction that is being handled.\"\nmsgstr \"処理中のインタラクション。\"\n\n#: ../../../discord/ext/commands/cog.py:docstring of discord.ext.commands.cog.Cog.cog_app_command_error:13\nmsgid \"The exception that was raised.\"\nmsgstr \"発生した例外。\"\n\n#: ../../../discord/ext/commands/cog.py:docstring of discord.ext.commands.cog.Cog.cog_before_invoke:3\nmsgid \"A special method that acts as a cog local pre-invoke hook.\"\nmsgstr \"コグのローカル事前呼び出しフックとして機能する特別なメソッド。\"\n\n#: ../../../discord/ext/commands/cog.py:docstring of discord.ext.commands.cog.Cog.cog_before_invoke:5\nmsgid \"This is similar to :meth:`.Command.before_invoke`.\"\nmsgstr \"これは :meth:`.Command.before_invoke` に似ています。\"\n\n#: ../../../discord/ext/commands/cog.py:docstring of discord.ext.commands.cog.Cog.cog_after_invoke:3\nmsgid \"A special method that acts as a cog local post-invoke hook.\"\nmsgstr \"コグのローカルポスト呼び出しフックとして機能する特別なメソッド。\"\n\n#: ../../../discord/ext/commands/cog.py:docstring of discord.ext.commands.cog.Cog.cog_after_invoke:5\nmsgid \"This is similar to :meth:`.Command.after_invoke`.\"\nmsgstr \"これは :meth:`.Command.after_invoke` に似ています。\"\n\n#: ../../ext/commands/api.rst:254\nmsgid \"GroupCog\"\nmsgstr \"GroupCog\"\n\n#: ../../../discord/ext/commands/cog.py:docstring of discord.ext.commands.cog.GroupCog:1\nmsgid \"Represents a cog that also doubles as a parent :class:`discord.app_commands.Group` for the application commands defined within it.\"\nmsgstr \"この中で定義されたアプリケーションコマンドの親 :class:`discord.app_commands.Group` としても機能するコグ。\"\n\n#: ../../../discord/ext/commands/cog.py:docstring of discord.ext.commands.cog.GroupCog:4\nmsgid \"This inherits from :class:`Cog` and the options in :class:`CogMeta` also apply to this. See the :class:`Cog` documentation for methods.\"\nmsgstr \"これは :class:`Cog` から継承され、 :class:`CogMeta` のオプションもこれに適用されます。メソッドについては :class:`Cog` ドキュメントを参照してください。\"\n\n#: ../../../discord/ext/commands/cog.py:docstring of discord.ext.commands.cog.GroupCog:7\nmsgid \"Decorators such as :func:`~discord.app_commands.guild_only`, :func:`~discord.app_commands.guilds`, and :func:`~discord.app_commands.default_permissions` will apply to the group if used on top of the cog.\"\nmsgstr \":func:`~discord.app_commands.guild_only` 、 :func:`~discord.app_commands.guilds` 、 :func:`~discord.app_commands.default_permissions` のようなデコレータはコグの上に使用されている場合、グループに適用されます。\"\n\n#: ../../../discord/ext/commands/cog.py:docstring of discord.ext.commands.cog.GroupCog:11\nmsgid \"Hybrid commands will also be added to the Group, giving the ability to categorize slash commands into groups, while keeping the prefix-style command as a root-level command.\"\nmsgstr \"\"\n\n#: ../../../discord/ext/commands/cog.py:docstring of discord.ext.commands.cog.GroupCog:14\nmsgid \"For example:\"\nmsgstr \"例：\"\n\n#: ../../ext/commands/api.rst:263\nmsgid \"CogMeta\"\nmsgstr \"CogMeta\"\n\n#: ../../../discord/ext/commands/cog.py:docstring of discord.ext.commands.cog.CogMeta:1\nmsgid \"A metaclass for defining a cog.\"\nmsgstr \"コグを定義するメタクラス。\"\n\n#: ../../../discord/ext/commands/cog.py:docstring of discord.ext.commands.cog.CogMeta:3\nmsgid \"Note that you should probably not use this directly. It is exposed purely for documentation purposes along with making custom metaclasses to intermix with other metaclasses such as the :class:`abc.ABCMeta` metaclass.\"\nmsgstr \"これを直接使うべきではないということに注意してください。 これは、 :class:`abc.ABCMeta` のような他のメタクラスと相互に混在させるカスタムメタクラスとして説明する目的だけで公開されています。\"\n\n#: ../../../discord/ext/commands/cog.py:docstring of discord.ext.commands.cog.CogMeta:7\nmsgid \"For example, to create an abstract cog mixin class, the following would be done.\"\nmsgstr \"たとえば、抽象的なコグのミックスインのクラスを作成するには、次のようにします。\"\n\n#: ../../../discord/ext/commands/cog.py:docstring of discord.ext.commands.cog.CogMeta:24\nmsgid \"When passing an attribute of a metaclass that is documented below, note that you must pass it as a keyword-only argument to the class creation like the following example:\"\nmsgstr \"以下に文書化されているメタクラスの属性を渡す場合、次の例のように、キーワードのみの引数としてクラスの作成に渡す必要があることに注意してください:\"\n\n#: ../../../discord/ext/commands/cog.py:docstring of discord.ext.commands.cog.CogMeta:35\nmsgid \"The cog name. By default, it is the name of the class with no modification.\"\nmsgstr \"コグの名前。デフォルトではクラス名そのままになります。\"\n\n#: ../../../discord/ext/commands/cog.py:docstring of discord.ext.commands.cog.CogMeta:41\nmsgid \"The cog description. By default, it is the cleaned docstring of the class.\"\nmsgstr \"コグの説明。デフォルトでは、綺麗にされたクラスのdocstringになります。\"\n\n#: ../../../discord/ext/commands/cog.py:docstring of discord.ext.commands.cog.CogMeta:49\nmsgid \"A list of attributes to apply to every command inside this cog. The dictionary is passed into the :class:`Command` options at ``__init__``. If you specify attributes inside the command attribute in the class, it will override the one specified inside this attribute. For example:\"\nmsgstr \"このコグ内のすべてのコマンドに適用される属性のリスト。 辞書は :class:`Command` オプションの ``__init__`` に渡されます。 クラス内の command 属性内で属性を指定すると、この属性内で指定された属性を上書きします。例えば:\"\n\n#: ../../../discord/ext/commands/cog.py:docstring of discord.ext.commands.cog.CogMeta:69\nmsgid \"The group name of a cog. This is only applicable for :class:`GroupCog` instances. By default, it's the same value as :attr:`name`.\"\nmsgstr \"コグのグループ名。これは :class:`GroupCog` インスタンスにのみ適用されます。デフォルトでは、 :attr:`name` と同じ値です。\"\n\n#: ../../../discord/ext/commands/cog.py:docstring of discord.ext.commands.cog.CogMeta:74\n#: ../../../discord/ext/commands/cog.py:docstring of discord.ext.commands.cog.CogMeta:83\nmsgid \"Union[:class:`str`, :class:`~discord.app_commands.locale_str`]\"\nmsgstr \"Union[:class:`str`, :class:`~discord.app_commands.locale_str`]\"\n\n#: ../../../discord/ext/commands/cog.py:docstring of discord.ext.commands.cog.CogMeta:78\nmsgid \"The group description of a cog. This is only applicable for :class:`GroupCog` instances. By default, it's the same value as :attr:`description`.\"\nmsgstr \"コグのグループ説明。これは :class:`GroupCog` インスタンスにのみ適用されます。デフォルトでは、 :attr:`description` と同じ値です。\"\n\n#: ../../../discord/ext/commands/cog.py:docstring of discord.ext.commands.cog.CogMeta:87\nmsgid \"Whether the application command group is NSFW. This is only applicable for :class:`GroupCog` instances. By default, it's ``False``.\"\nmsgstr \"アプリケーションコマンドグループに年齢制限をかけるか。これは :class:`GroupCog` インスタンスにのみ適用されます。デフォルトでは ``False`` です。\"\n\n#: ../../../discord/ext/commands/cog.py:docstring of discord.ext.commands.cog.CogMeta:96\nmsgid \"If this is set to ``True``, then all translatable strings will implicitly be wrapped into :class:`~discord.app_commands.locale_str` rather than :class:`str`. Defaults to ``True``.\"\nmsgstr \"これが ``True`` に設定されている場合、翻訳可能な文字列は :class:`str` ではなく暗黙的に :class:`~discord.app_commands.locale_str` にラップされます。デフォルトは ``True`` です。\"\n\n#: ../../../discord/ext/commands/cog.py:docstring of discord.ext.commands.cog.CogMeta:106\nmsgid \"A dictionary that can be used to store extraneous data. This is only applicable for :class:`GroupCog` instances. The library will not touch any values or keys within this dictionary.\"\nmsgstr \"追加のデータを保管できる辞書型。これは :class:`GroupCog` インスタンスにのみ適用されます。ライブラリは辞書型の中のキーや値を一切操作しません。\"\n\n#: ../../ext/commands/api.rst:273\nmsgid \"Help Commands\"\nmsgstr \"ヘルプコマンド\"\n\n#: ../../ext/commands/api.rst:276\nmsgid \"HelpCommand\"\nmsgstr \"HelpCommand\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand:1\nmsgid \"The base implementation for help command formatting.\"\nmsgstr \"ヘルプコマンドの書式設定のための基本的実装。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand:5\nmsgid \"Internally instances of this class are deep copied every time the command itself is invoked to prevent a race condition mentioned in :issue:`2123`.\"\nmsgstr \"内部的にこのクラスのインスタンスは、 :issue:`2123` に記載されている競合状態を防ぐため、コマンド自体が呼び出されるたびにディープコピーされます。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand:9\nmsgid \"This means that relying on the state of this class to be the same between command invocations would not work as expected.\"\nmsgstr \"つまり、このクラスの状態に依存してコマンドの呼び出しが同じになると、期待どおりに動作しないということです。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand:14\nmsgid \"The context that invoked this help formatter. This is generally set after the help command assigned, :func:`command_callback`\\\\, has been called.\"\nmsgstr \"このヘルプを整形するクラスを呼び出したコンテキストです。これは一般的にヘルプコマンドが割り当てられ、:func:`command_callback` が呼び出された後に設定されます。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand:17\nmsgid \"Optional[:class:`Context`]\"\nmsgstr \"Optional[:class:`Context`]\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand:21\nmsgid \"Specifies if hidden commands should be shown in the output. Defaults to ``False``.\"\nmsgstr \"隠しコマンドを表示するかどうかを指定します。デフォルトでは ``False`` です。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand:28\nmsgid \"Specifies if commands should have their :attr:`.Command.checks` called and verified. If ``True``, always calls :attr:`.Command.checks`. If ``None``, only calls :attr:`.Command.checks` in a guild setting. If ``False``, never calls :attr:`.Command.checks`. Defaults to ``True``.\"\nmsgstr \"コマンドが、 :attr:`.Command.checks` を呼び出し検証すべきかを指定します。もし ``True`` なら、常に :attr:`.Command.checks` を呼び出します。もし ``None`` なら、ギルドでのみ :attr:`.Command.checks` を呼び出します。もし ``False`` なら、 :attr:`.Command.checks` は一切呼び出しません。デフォルトは ``True`` です。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand:35\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.DefaultHelpCommand:29\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.MinimalHelpCommand:34\nmsgid \"Optional[:class:`bool`]\"\nmsgstr \"Optional[:class:`bool`]\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand:39\nmsgid \"A dictionary of options to pass in for the construction of the help command. This allows you to change the command behaviour without actually changing the implementation of the command. The attributes will be the same as the ones passed in the :class:`.Command` constructor.\"\nmsgstr \"ヘルプコマンドの構築のために渡すオプションの辞書。 これにより、実際にヘルプコマンドの実装を変更することなく、その動作を変更できます。 属性は :class:`.Command` コンストラクタで渡されたものと同じになります。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.add_check:1\nmsgid \"Adds a check to the help command.\"\nmsgstr \"ヘルプコマンドにチェックを追加します。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.remove_check:1\nmsgid \"Removes a check from the help command.\"\nmsgstr \"ヘルプコマンドからチェックを除去します。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.get_bot_mapping:1\nmsgid \"Retrieves the bot mapping passed to :meth:`send_bot_help`.\"\nmsgstr \":meth:`send_bot_help` に渡されたボットのマッピングを取得します。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.HelpCommand.invoked_with:1\nmsgid \"Similar to :attr:`Context.invoked_with` except properly handles the case where :meth:`Context.send_help` is used.\"\nmsgstr \":meth:`Context.send_help` が使われた場合にちゃんと処理することを除いて、:attr:`Context.invoked_with` と同様です。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.HelpCommand.invoked_with:4\nmsgid \"If the help command was used regularly then this returns the :attr:`Context.invoked_with` attribute. Otherwise, if it the help command was called using :meth:`Context.send_help` then it returns the internal command name of the help command.\"\nmsgstr \"ヘルプコマンドが標準的に使われたならば、これは :attr:`Context.invoked_with` を返します。\\n\"\n\"そうではなく、もしヘルプコマンドが :meth:`Context.send_help` を用いて呼び出されたなら、その時はヘルプコマンドの内部的なコマンド名を返します。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.HelpCommand.invoked_with:9\nmsgid \"The command name that triggered this invocation.\"\nmsgstr \"この実行を引き起こしたコマンド名。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.get_command_signature:1\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.DefaultHelpCommand.get_command_signature:1\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.MinimalHelpCommand.get_command_signature:1\nmsgid \"Retrieves the signature portion of the help page.\"\nmsgstr \"ヘルプページに表示される、コマンドの使用方法を示す文字列を返します。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.get_command_signature:7\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.DefaultHelpCommand.get_command_signature:8\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.MinimalHelpCommand.get_command_signature:7\nmsgid \"The command to get the signature of.\"\nmsgstr \"使用方法を取得したいコマンド。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.get_command_signature:10\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.DefaultHelpCommand.get_command_signature:11\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.MinimalHelpCommand.get_command_signature:10\nmsgid \"The signature for the command.\"\nmsgstr \"コマンドの使用方法を示す文字列。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.remove_mentions:1\nmsgid \"Removes mentions from the string to prevent abuse.\"\nmsgstr \"不正使用を防ぐために文字列からメンションを除去します。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.remove_mentions:3\nmsgid \"This includes ``@everyone``, ``@here``, member mentions and role mentions.\"\nmsgstr \"これには ``@everyone`` 、 ``@here`` 、 メンバーメンションとロールメンションが含まれます。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.remove_mentions:7\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.command_not_found:10\nmsgid \"``string`` parameter is now positional-only.\"\nmsgstr \"``string`` 引数は位置限定引数になりました。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.remove_mentions:9\nmsgid \"The string with mentions removed.\"\nmsgstr \"メンションが除去された文字列。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.HelpCommand.cog:1\nmsgid \"A property for retrieving or setting the cog for the help command.\"\nmsgstr \"ヘルプコマンドのコグを取得または設定するためのプロパティ。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.HelpCommand.cog:3\nmsgid \"When a cog is set for the help command, it is as-if the help command belongs to that cog. All cog special methods will apply to the help command and it will be automatically unset on unload.\"\nmsgstr \"ヘルプコマンドにコグが設定されている場合は、ヘルプコマンドがそのコグに属している場合と同様です。 コグの特別なメソッドはすべてヘルプコマンドに適用され、アンロード時に自動的にアンロードされます。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.HelpCommand.cog:7\nmsgid \"To unbind the cog from the help command, you can set it to ``None``.\"\nmsgstr \"コグをヘルプコマンドから解除するには、``None`` を設定します。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.HelpCommand.cog:9\nmsgid \"The cog that is currently set for the help command.\"\nmsgstr \"ヘルプコマンドに現在設定されているコグ。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.command_not_found:3\nmsgid \"A method called when a command is not found in the help command. This is useful to override for i18n.\"\nmsgstr \"ヘルプコマンドでコマンドが見つからない場合に呼び出されるメソッド。これは、i18nでオーバーライドするのに便利です。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.command_not_found:6\nmsgid \"Defaults to ``No command called {0} found.``\"\nmsgstr \"デフォルトは ``No command called {0} found.`` です。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.command_not_found:12\nmsgid \"The string that contains the invalid command. Note that this has had mentions removed to prevent abuse.\"\nmsgstr \"不正なコマンドを含む文字列。不正使用を防ぐためにメンションが削除されていることに注意してください。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.command_not_found:16\nmsgid \"The string to use when a command has not been found.\"\nmsgstr \"コマンドが見つからないときに使用する文字列。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.subcommand_not_found:3\nmsgid \"A method called when a command did not have a subcommand requested in the help command. This is useful to override for i18n.\"\nmsgstr \"ヘルプコマンドでコマンドが要求されたサブコマンドを持っていない場合に呼び出されるメソッド。これは、i18nでオーバーライドするのに便利です。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.subcommand_not_found:6\nmsgid \"Defaults to either:\"\nmsgstr \"デフォルトは以下のどちらかです:\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.subcommand_not_found:8\nmsgid \"``'Command \\\"{command.qualified_name}\\\" has no subcommands.'``\"\nmsgstr \"``'Command \\\"{command.qualified_name}\\\" has no subcommands.'``\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.subcommand_not_found:9\nmsgid \"If there is no subcommand in the ``command`` parameter.\"\nmsgstr \"``command`` パラメータにサブコマンドがない場合。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.subcommand_not_found:11\nmsgid \"``'Command \\\"{command.qualified_name}\\\" has no subcommand named {string}'``\"\nmsgstr \"``'Command \\\"{command.qualified_name}\\\" has no subcommand named {string}'``\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.subcommand_not_found:11\nmsgid \"If the ``command`` parameter has subcommands but not one named ``string``.\"\nmsgstr \"``command`` パラメータにサブコマンドはあるが、``string`` という名前のものがない場合。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.subcommand_not_found:15\nmsgid \"``command`` and ``string`` parameters are now positional-only.\"\nmsgstr \"``command`` と ``string`` のパラメータは位置指定のみになりました。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.subcommand_not_found:17\nmsgid \"The command that did not have the subcommand requested.\"\nmsgstr \"そのサブコマンドを持っていなかった要求されたコマンド。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.subcommand_not_found:19\nmsgid \"The string that contains the invalid subcommand. Note that this has had mentions removed to prevent abuse.\"\nmsgstr \"不正なサブコマンドを含む文字列。不正使用を防ぐためにメンションが削除されていることに注意してください。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.subcommand_not_found:23\nmsgid \"The string to use when the command did not have the subcommand requested.\"\nmsgstr \"要求されたコマンドがそのサブコマンドを持っていなかった時に使われる文字列。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.filter_commands:3\nmsgid \"Returns a filtered list of commands and optionally sorts them.\"\nmsgstr \"フィルタリングされたコマンドのリストを返し、必要に応じて並び替えます。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.filter_commands:5\nmsgid \"This takes into account the :attr:`verify_checks` and :attr:`show_hidden` attributes.\"\nmsgstr \"これは :attr:`verify_checks` と :attr:`show_hidden` 属性を考慮します。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.filter_commands:10\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.get_max_size:5\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.DefaultHelpCommand.add_indented_commands:10\nmsgid \"``commands`` parameter is now positional-only.\"\nmsgstr \"``commands`` 引数は位置限定引数になりました。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.filter_commands:12\nmsgid \"An iterable of commands that are getting filtered.\"\nmsgstr \"フィルタリングされるコマンドのイテラブル。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.filter_commands:14\nmsgid \"Whether to sort the result.\"\nmsgstr \"結果を並び替えるかどうか。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.filter_commands:16\nmsgid \"An optional key function to pass to :func:`py:sorted` that takes a :class:`Command` as its sole parameter. If ``sort`` is passed as ``True`` then this will default as the command name.\"\nmsgstr \":class:`Command` を唯一のパラメータとして取る、 :func:`py:sorted` に渡す任意のキー関数。 ``sort`` が ``True`` として渡された場合、これはコマンド名としてデフォルトになります。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.filter_commands:21\nmsgid \"A list of commands that passed the filter.\"\nmsgstr \"フィルタを通過したコマンドのリスト。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.filter_commands:22\nmsgid \"List[:class:`Command`]\"\nmsgstr \"List[:class:`Command`]\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.get_max_size:1\nmsgid \"Returns the largest name length of the specified command list.\"\nmsgstr \"指定されたコマンドリストの中の名前の最大の長さを返します。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.get_max_size:7\nmsgid \"A sequence of commands to check for the largest size.\"\nmsgstr \"最大の長さをチェックするコマンドのシーケンス。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.get_max_size:10\nmsgid \"The maximum width of the commands.\"\nmsgstr \"コマンドの最大の幅。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.get_max_size:11\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.DefaultHelpCommand:12\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.DefaultHelpCommand:42\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.Paginator:25\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.Context.filesize_limit:5\nmsgid \":class:`int`\"\nmsgstr \":class:`int`\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.get_destination:1\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.DefaultHelpCommand.get_destination:1\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.MinimalHelpCommand.get_destination:1\nmsgid \"Returns the :class:`~discord.abc.Messageable` where the help command will be output.\"\nmsgstr \"ヘルプコマンドが出力される :class:`~discord.abc.Messageable` を返します。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.get_destination:3\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.send_error_message:6\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.send_bot_help:11\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.send_cog_help:11\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.send_group_help:11\nmsgid \"You can override this method to customise the behaviour.\"\nmsgstr \"このメソッドをオーバーライドして動作をカスタマイズできます。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.get_destination:5\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.DefaultHelpCommand.get_destination:5\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.MinimalHelpCommand.get_destination:5\nmsgid \"By default this returns the context's channel.\"\nmsgstr \"デフォルトでは、コンテキストのチャンネルを返します。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.get_destination:7\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.DefaultHelpCommand.get_destination:7\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.MinimalHelpCommand.get_destination:7\nmsgid \"The destination where the help command will be output.\"\nmsgstr \"ヘルプコマンドの出力先。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.get_destination:8\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.DefaultHelpCommand.get_destination:8\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.MinimalHelpCommand.get_destination:8\nmsgid \":class:`.abc.Messageable`\"\nmsgstr \":class:`.abc.Messageable`\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.send_error_message:3\nmsgid \"Handles the implementation when an error happens in the help command. For example, the result of :meth:`command_not_found` will be passed here.\"\nmsgstr \"ヘルプコマンドでエラーが発生したときにその実装を処理します。例えば、 :meth:`command_not_found` の結果がここに渡されます。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.send_error_message:8\nmsgid \"By default, this sends the error message to the destination specified by :meth:`get_destination`.\"\nmsgstr \"デフォルトでは、これは :meth:`get_destination` で指定された宛先にエラーメッセージを送信します。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.send_error_message:13\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.send_bot_help:15\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.send_cog_help:15\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.send_group_help:15\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.send_command_help:14\nmsgid \"You can access the invocation context with :attr:`HelpCommand.context`.\"\nmsgstr \":attr:`HelpCommand.context` で呼び出しコンテキストにアクセスできます。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.send_error_message:17\nmsgid \"``error`` parameter is now positional-only.\"\nmsgstr \"``error`` 引数は位置限定引数になりました。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.send_error_message:19\nmsgid \"The error message to display to the user. Note that this has had mentions removed to prevent abuse.\"\nmsgstr \"ユーザーに表示されるエラーメッセージ。これは、メンションが不正使用を防ぐために削除されていることに注意してください。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.on_help_command_error:3\nmsgid \"The help command's error handler, as specified by :ref:`ext_commands_error_handler`.\"\nmsgstr \"ヘルプコマンドのエラーハンドラは :ref:`ext_commands_error_handler` で指定されています。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.on_help_command_error:5\nmsgid \"Useful to override if you need some specific behaviour when the error handler is called.\"\nmsgstr \"エラーハンドラが呼び出されたときに特定の動作が必要な場合にオーバーライドするのに便利です。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.on_help_command_error:8\nmsgid \"By default this method does nothing and just propagates to the default error handlers.\"\nmsgstr \"デフォルトでは、このメソッドは何もせず、単にデフォルトのエラーハンドラに伝播します。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.on_help_command_error:13\nmsgid \"``ctx`` and ``error`` parameters are now positional-only.\"\nmsgstr \"``bot`` と ``msg`` 引数は位置限定引数になりました。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.send_bot_help:3\nmsgid \"Handles the implementation of the bot command page in the help command. This function is called when the help command is called with no arguments.\"\nmsgstr \"ボットのコマンドページの実装をヘルプコマンドで処理します。この関数は、引数なしでヘルプコマンドが呼び出されたときに呼び出されます。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.send_bot_help:6\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.send_cog_help:6\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.send_group_help:6\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.send_command_help:5\nmsgid \"It should be noted that this method does not return anything -- rather the actual message sending should be done inside this method. Well behaved subclasses should use :meth:`get_destination` to know where to send, as this is a customisation point for other users.\"\nmsgstr \"このメソッドは何も返さないことに注意してください -- むしろ実際のメッセージ送信はこのメソッド内で行う必要があります。 適切な振る舞いをするサブクラスは、他のユーザ向けにカスタマイズする箇所であるため、どこに送信するかを知るために :meth:`get_destination` を使用する必要があります。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.send_bot_help:17\nmsgid \"Also, the commands in the mapping are not filtered. To do the filtering you will have to call :meth:`filter_commands` yourself.\"\nmsgstr \"また、マッピング内のコマンドはフィルタリングされません。フィルタリングを行うには、 :meth:`filter_commands` を自分で呼び出す必要があります。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.send_bot_help:22\nmsgid \"``mapping`` parameter is now positional-only.\"\nmsgstr \"``mapping`` 引数は位置限定引数になりました。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.send_bot_help:24\nmsgid \"A mapping of cogs to commands that have been requested by the user for help. The key of the mapping is the :class:`~.commands.Cog` that the command belongs to, or ``None`` if there isn't one, and the value is a list of commands that belongs to that cog.\"\nmsgstr \"ヘルプのためにユーザーから要求されたコマンドへのコグのマッピング。マッピングのキーはコマンドが属する :class:`~.commands.Cog` です。値がない場合は ``None`` になり、そのコグに属するコマンドのリストになります。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.send_cog_help:3\nmsgid \"Handles the implementation of the cog page in the help command. This function is called when the help command is called with a cog as the argument.\"\nmsgstr \"ヘルプコマンドでコグページの実装を処理します。 この関数は、ヘルプコマンドがコグを引数として呼び出されたときに呼び出されます。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.send_cog_help:17\nmsgid \"To get the commands that belong to this cog see :meth:`Cog.get_commands`. The commands returned not filtered. To do the filtering you will have to call :meth:`filter_commands` yourself.\"\nmsgstr \"このコグに属するコマンドを取得するには、 :meth:`Cog.get_commands` を確認してください。返されるコマンドはフィルタリングされていません。フィルタリングをするには、自分で :meth:`filter_commands` を呼び出す必要があるでしょう。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.send_cog_help:25\nmsgid \"The cog that was requested for help.\"\nmsgstr \"ヘルプを要求されたコグ。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.send_group_help:3\nmsgid \"Handles the implementation of the group page in the help command. This function is called when the help command is called with a group as the argument.\"\nmsgstr \"ヘルプコマンドでグループページの実装を処理します。 この関数は、ヘルプコマンドがグループを引数として呼び出されたときに呼び出されます。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.send_group_help:17\nmsgid \"To get the commands that belong to this group without aliases see :attr:`Group.commands`. The commands returned not filtered. To do the filtering you will have to call :meth:`filter_commands` yourself.\"\nmsgstr \"このコグに属するコマンドを別名を除いて取得するには、 :attr:`Group.commands` を確認してください。返されるコマンドはフィルタリングされていません。フィルタリングをするには、自分で :meth:`filter_commands` を呼び出す必要があるでしょう。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.send_group_help:23\nmsgid \"``group`` parameter is now positional-only.\"\nmsgstr \"``group`` 引数は位置限定引数になりました。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.send_group_help:25\nmsgid \"The group that was requested for help.\"\nmsgstr \"ヘルプを要求されたグループ。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.send_command_help:3\nmsgid \"Handles the implementation of the single command page in the help command.\"\nmsgstr \"ヘルプコマンドで単一のコマンドページの実装を処理します。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.send_command_help:16\nmsgid \"Showing Help\"\nmsgstr \"ヘルプを表示\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.send_command_help:19\nmsgid \"There are certain attributes and methods that are helpful for a help command to show such as the following:\"\nmsgstr \"以下のような、ヘルプコマンドに役立つ属性やメソッドがあります。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.send_command_help:22\nmsgid \":attr:`Command.help`\"\nmsgstr \":attr:`Command.help`\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.send_command_help:23\nmsgid \":attr:`Command.brief`\"\nmsgstr \":attr:`Command.brief`\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.send_command_help:24\nmsgid \":attr:`Command.short_doc`\"\nmsgstr \":attr:`Command.short_doc`\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.send_command_help:25\nmsgid \":attr:`Command.description`\"\nmsgstr \":attr:`Command.description`\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.send_command_help:26\nmsgid \":meth:`get_command_signature`\"\nmsgstr \":meth:`get_command_signature`\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.send_command_help:28\nmsgid \"There are more than just these attributes but feel free to play around with these to help you get started to get the output that you want.\"\nmsgstr \"これら以外にももっと属性はありますが、欲しい出力を得るのを助けてくれるこいつらで遊ぶことに開放感を感じてみてください。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.send_command_help:35\nmsgid \"The command that was requested for help.\"\nmsgstr \"ヘルプを要求されたコマンド。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.prepare_help_command:3\nmsgid \"A low level method that can be used to prepare the help command before it does anything. For example, if you need to prepare some state in your subclass before the command does its processing then this would be the place to do it.\"\nmsgstr \"ヘルプコマンドを準備するのに使用できる低レベルのメソッドです。 例えば、 コマンドが処理する前にサブクラスの状態を準備する必要がある場合は、ここで行うことができます。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.prepare_help_command:8\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.MinimalHelpCommand.get_ending_note:3\nmsgid \"The default implementation does nothing.\"\nmsgstr \"デフォルトの実装では何もしません。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.prepare_help_command:12\nmsgid \"This is called *inside* the help command callback body. So all the usual rules that happen inside apply here as well.\"\nmsgstr \"これは *内部* ヘルプコマンドコールバック本体と呼ばれていますので、内部で発生する通常のルールはすべてここでも適用されます。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.prepare_help_command:17\nmsgid \"``ctx`` and ``command`` parameters are now positional-only.\"\nmsgstr \"``ctx`` と ``command`` 引数は位置限定引数になりました。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.prepare_help_command:21\nmsgid \"The argument passed to the help command.\"\nmsgstr \"ヘルプコマンドに渡される引数。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.command_callback:3\nmsgid \"The actual implementation of the help command.\"\nmsgstr \"ヘルプコマンドの実際の実装。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.command_callback:5\nmsgid \"It is not recommended to override this method and instead change the behaviour through the methods that actually get dispatched.\"\nmsgstr \"このメソッドをオーバーライドして、実際にディスパッチされるメソッドを通じて動作を変更することは推奨されません。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.command_callback:8\nmsgid \":meth:`send_bot_help`\"\nmsgstr \":meth:`send_bot_help`\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.command_callback:9\nmsgid \":meth:`send_cog_help`\"\nmsgstr \":meth:`send_cog_help`\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.command_callback:10\nmsgid \":meth:`send_group_help`\"\nmsgstr \":meth:`send_group_help`\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.command_callback:11\nmsgid \":meth:`send_command_help`\"\nmsgstr \":meth:`send_command_help`\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.command_callback:12\nmsgid \":meth:`get_destination`\"\nmsgstr \":meth:`get_destination`\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.command_callback:13\nmsgid \":meth:`command_not_found`\"\nmsgstr \":meth:`command_not_found`\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.command_callback:14\nmsgid \":meth:`subcommand_not_found`\"\nmsgstr \":meth:`subcommand_not_found`\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.command_callback:15\nmsgid \":meth:`send_error_message`\"\nmsgstr \":meth:`send_error_message`\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.command_callback:16\nmsgid \":meth:`on_help_command_error`\"\nmsgstr \":meth:`on_help_command_error`\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.HelpCommand.command_callback:17\nmsgid \":meth:`prepare_help_command`\"\nmsgstr \":meth:`prepare_help_command`\"\n\n#: ../../ext/commands/api.rst:284\nmsgid \"DefaultHelpCommand\"\nmsgstr \"DefaultHelpCommand\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.DefaultHelpCommand:1\nmsgid \"The implementation of the default help command.\"\nmsgstr \"デフォルトのヘルプコマンドの実装。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.DefaultHelpCommand:3\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.MinimalHelpCommand:3\nmsgid \"This inherits from :class:`HelpCommand`.\"\nmsgstr \"これは :class:`HelpCommand` から継承されます。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.DefaultHelpCommand:5\nmsgid \"It extends it with the following attributes.\"\nmsgstr \"以下の属性で拡張されます。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.DefaultHelpCommand:9\nmsgid \"The maximum number of characters that fit in a line. Defaults to 80.\"\nmsgstr \"1行に収める最大の文字数を指定します。デフォルトでは80です。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.DefaultHelpCommand:16\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.MinimalHelpCommand:7\nmsgid \"Whether to sort the commands in the output alphabetically. Defaults to ``True``.\"\nmsgstr \"出力されるコマンドをアルファベット順に並べ替えるかどうか。デフォルトは ``True`` です。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.DefaultHelpCommand:22\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.MinimalHelpCommand:27\nmsgid \"A tribool that indicates if the help command should DM the user instead of sending it to the channel it received it from. If the boolean is set to ``True``, then all help output is DM'd. If ``False``, none of the help output is DM'd. If ``None``, then the bot will only DM when the help message becomes too long (dictated by more than :attr:`dm_help_threshold` characters). Defaults to ``False``.\"\nmsgstr \"ヘルプコマンドが、受信したチャンネルに送信する代わりにユーザのDMに送信するかどうかを示す三値論理値。 ブール値が ``True`` に設定されている場合、すべてのヘルプ出力は DMに送信されます。 ``False`` の場合、いずれのヘルプ出力もDMには送信されません。 ``None`` の場合、ボットはヘルプメッセージが長すぎる場合にのみDMに送信します( :attr:`dm_help_threshold` の文字数以上で決定されます)。 デフォルトは ``False`` です。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.DefaultHelpCommand:33\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.MinimalHelpCommand:38\nmsgid \"The number of characters the paginator must accumulate before getting DM'd to the user if :attr:`dm_help` is set to ``None``. Defaults to 1000.\"\nmsgstr \":attr:`dm_help` が ``None`` に設定されているときに、ペジネーターがユーザのDMに送信するのに必要な文字数。デフォルトは 1000 です。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.DefaultHelpCommand:40\nmsgid \"How much to indent the commands from a heading. Defaults to ``2``.\"\nmsgstr \"見出しからのコマンドのインデントの量。デフォルトは ``2`` です。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.DefaultHelpCommand:46\nmsgid \"The arguments list's heading string used when the help command is invoked with a command name. Useful for i18n. Defaults to ``\\\"Arguments:\\\"``. Shown when :attr:`.show_parameter_descriptions` is ``True``.\"\nmsgstr \"コマンド名を指定してhelpコマンドを実行したときに使用される引数リストの見出し文字列です。国際化対応に便利です。デフォルトは ``\\\"Arguments:\\\"`` です。:attr:`.show_parameter_descriptions` が ``True`` の場合に表示されます。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.DefaultHelpCommand:56\nmsgid \"Whether to show the parameter descriptions. Defaults to ``True``. Setting this to ``False`` will revert to showing the :attr:`~.commands.Command.signature` instead.\"\nmsgstr \"パラメータの説明を表示するかどうか。デフォルトは ``True`` です。``False`` に設定すると、代わりに :attr:`~.commands.Command.signature` が表示されるようになります。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.DefaultHelpCommand:65\nmsgid \"The command list's heading string used when the help command is invoked with a category name. Useful for i18n. Defaults to ``\\\"Commands:\\\"``\"\nmsgstr \"ヘルプコマンドがカテゴリ名で呼び出されたときに使用されるコマンドリストの見出し文字列。i18nに便利です。デフォルトは ``\\\"Commands:\\\"`` です。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.DefaultHelpCommand:72\nmsgid \"The default argument description string used when the argument's :attr:`~.commands.Parameter.description` is ``None``. Useful for i18n. Defaults to ``\\\"No description given.\\\"``\"\nmsgstr \"引数の :attr:`~.commands.Parameter.description` が ``None`` である場合に使用される、デフォルトの引数の説明文字列です。国際化対応に便利です。デフォルトは ``\\\"No description given.\\\"`` です。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.DefaultHelpCommand:81\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.MinimalHelpCommand:45\nmsgid \"The string used when there is a command which does not belong to any category(cog). Useful for i18n. Defaults to ``\\\"No Category\\\"``\"\nmsgstr \"任意のカテゴリ(コグ) に属さないコマンドがある場合に使用される文字列。i18nに便利です。デフォルトは ``\\\"No Category\\\"`` です。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.DefaultHelpCommand:88\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.MinimalHelpCommand:52\nmsgid \"The paginator used to paginate the help command output.\"\nmsgstr \"ヘルプコマンドの出力にページ番号を付けるために使用されるペジネーター。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.DefaultHelpCommand:90\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.MinimalHelpCommand:54\nmsgid \":class:`Paginator`\"\nmsgstr \":class:`Paginator`\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.DefaultHelpCommand.shorten_text:1\nmsgid \":class:`str`: Shortens text to fit into the :attr:`width`.\"\nmsgstr \":class:`str`：渡された文字列を、 :attr:`width` に収まるよう省略します。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.DefaultHelpCommand.shorten_text:5\nmsgid \"``text`` parameter is now positional-only.\"\nmsgstr \"``text`` 引数は位置限定引数になりました。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.DefaultHelpCommand.get_ending_note:1\nmsgid \":class:`str`: Returns help command's ending note. This is mainly useful to override for i18n purposes.\"\nmsgstr \":class:`str`: Helpコマンドの末尾の文字列を返します。主に翻訳する際にオーバーライドしてください。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.DefaultHelpCommand.get_command_signature:3\nmsgid \"Calls :meth:`~.HelpCommand.get_command_signature` if :attr:`show_parameter_descriptions` is ``False`` else returns a modified signature where the command parameters are not shown.\"\nmsgstr \":attr:`show_parameter_descriptions` が ``False`` の場合に :meth:`~.HelpCommand.get_command_signature` を呼び出し、それ以外の場合はコマンドパラメータを表示しない修正したシグネチャを返します。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.DefaultHelpCommand.add_indented_commands:1\nmsgid \"Indents a list of commands after the specified heading.\"\nmsgstr \"指定した見出しの後の、コマンドのリストをインデントします。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.DefaultHelpCommand.add_indented_commands:3\nmsgid \"The formatting is added to the :attr:`paginator`.\"\nmsgstr \"書式は :attr:`paginator` に追加されます。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.DefaultHelpCommand.add_indented_commands:5\nmsgid \"The default implementation is the command name indented by :attr:`indent` spaces, padded to ``max_size`` followed by the command's :attr:`Command.short_doc` and then shortened to fit into the :attr:`width`.\"\nmsgstr \"デフォルトの実装は :attr:`indent` の空白でインデントされ、コマンドの :attr:`Command.short_doc` に先立って ``max_size`` まで肉付けされ、 :attr:`width` に沿うように縮められたコマンド名です。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.DefaultHelpCommand.add_indented_commands:13\nmsgid \"A list of commands to indent for output.\"\nmsgstr \"出力にてインデントするコマンドのリスト。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.DefaultHelpCommand.add_indented_commands:15\nmsgid \"The heading to add to the output. This is only added if the list of commands is greater than 0.\"\nmsgstr \"出力に追加する見出し。これはコマンドのリストが 0 より大きい場合にのみ追加されます。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.DefaultHelpCommand.add_indented_commands:18\nmsgid \"The max size to use for the gap between indents. If unspecified, calls :meth:`~HelpCommand.get_max_size` on the commands parameter.\"\nmsgstr \"インデント間の差分に使用する最大サイズです。指定されていない場合は、 :meth:`~HelpCommand.get_max_size` をコマンドパラメータとして呼び出します。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.DefaultHelpCommand.add_command_arguments:1\nmsgid \"Indents a list of command arguments after the :attr:`.arguments_heading`.\"\nmsgstr \"コマンドの引数のリストを :attr:`.arguments_heading` の後にインデントします。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.DefaultHelpCommand.add_command_arguments:3\nmsgid \"The default implementation is the argument :attr:`~.commands.Parameter.name` indented by :attr:`indent` spaces, padded to ``max_size`` using :meth:`~HelpCommand.get_max_size` followed by the argument's :attr:`~.commands.Parameter.description` or :attr:`.default_argument_description` and then shortened to fit into the :attr:`width` and then :attr:`~.commands.Parameter.displayed_default` between () if one is present after that.\"\nmsgstr \"デフォルトの実装では、引数の :attr:`~.commands.Parameter.name` は :attr:`indent` の量のスペースでインデントされ、引数の :attr:`~.commands.Parameter.description` または :attr:`.default_argument_description` が後に続くよう :meth:`~HelpCommand.get_max_size` を用いて ``max_size`` にパディングされ、そして引数の :attr:`width` と :attr:`~.commands.Parameter.displayed_default` の間に () があれば、その後に入るように短縮されます。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.DefaultHelpCommand.add_command_arguments:12\nmsgid \"The command to list the arguments for.\"\nmsgstr \"引数の一覧を表示するコマンド。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.DefaultHelpCommand.send_pages:3\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.MinimalHelpCommand.send_pages:3\nmsgid \"A helper utility to send the page output from :attr:`paginator` to the destination.\"\nmsgstr \":attr:`paginator` から出力されたページを宛先に送信するためのヘルパーユーティリティ。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.DefaultHelpCommand.add_command_formatting:1\nmsgid \"A utility function to format the non-indented block of commands and groups.\"\nmsgstr \"コマンドとグループのインデントされていないブロックをフォーマットするユーティリティ関数。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.DefaultHelpCommand.add_command_formatting:7\nmsgid \":meth:`.add_command_arguments` is now called if :attr:`.show_parameter_descriptions` is ``True``.\"\nmsgstr \":meth:`.add_command_arguments` は :attr:`.show_parameter_descriptions` が ``True`` であれば呼び出されるようになりました。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.DefaultHelpCommand.add_command_formatting:10\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.MinimalHelpCommand.add_command_formatting:7\nmsgid \"The command to format.\"\nmsgstr \"フォーマットするコマンド。\"\n\n#: ../../ext/commands/api.rst:293\nmsgid \"MinimalHelpCommand\"\nmsgstr \"MinimalHelpCommand\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.MinimalHelpCommand:1\nmsgid \"An implementation of a help command with minimal output.\"\nmsgstr \"最小限の出力を持つヘルプコマンドの実装。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.MinimalHelpCommand:13\nmsgid \"The command list's heading string used when the help command is invoked with a category name. Useful for i18n. Defaults to ``\\\"Commands\\\"``\"\nmsgstr \"ヘルプコマンドがカテゴリ名で呼び出されたときに使用されるコマンドリストの見出し文字列。i18nに便利です。デフォルトは ``\\\"Commands\\\"`` です。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.MinimalHelpCommand:20\nmsgid \"The alias list's heading string used to list the aliases of the command. Useful for i18n. Defaults to ``\\\"Aliases:\\\"``.\"\nmsgstr \"コマンドのエイリアスを列挙するために使用するエイリアス一覧のの見出し文字列。i18nに便利です。デフォルトでは ``\\\"Aliases:\\\"`` です。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.MinimalHelpCommand.get_opening_note:1\nmsgid \"Returns help command's opening note. This is mainly useful to override for i18n purposes.\"\nmsgstr \"ヘルプコマンドの冒頭の文字列を返します。主に翻訳する際にオーバーライドしてください。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.MinimalHelpCommand.get_opening_note:3\nmsgid \"The default implementation returns ::\"\nmsgstr \"デフォルトの実装では次を返します ::\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.MinimalHelpCommand.get_opening_note:8\nmsgid \"The help command opening note.\"\nmsgstr \"ヘルプコマンドの冒頭の文字列。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.MinimalHelpCommand.get_ending_note:1\nmsgid \"Return the help command's ending note. This is mainly useful to override for i18n purposes.\"\nmsgstr \"ヘルプコマンドの末尾の文字列を返します。主に翻訳する際にオーバーライドしてください。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.MinimalHelpCommand.get_ending_note:5\nmsgid \"The help command ending note.\"\nmsgstr \"ヘルプコマンドの末尾の文字列。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.MinimalHelpCommand.add_bot_commands_formatting:1\nmsgid \"Adds the minified bot heading with commands to the output.\"\nmsgstr \"出力に小さなボットの見出しとコマンドを追加します。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.MinimalHelpCommand.add_bot_commands_formatting:3\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.MinimalHelpCommand.add_subcommand_formatting:3\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.MinimalHelpCommand.add_aliases_formatting:3\nmsgid \"The formatting should be added to the :attr:`paginator`.\"\nmsgstr \"書式は :attr:`paginator` に追加すべきです。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.MinimalHelpCommand.add_bot_commands_formatting:5\nmsgid \"The default implementation is a bold underline heading followed by commands separated by an EN SPACE (U+2002) in the next line.\"\nmsgstr \"デフォルトの実装では、太字の下線の見出しに続いて、次の行にEN スペース (U+2002) で区切られたコマンドが出力されます。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.MinimalHelpCommand.add_bot_commands_formatting:10\nmsgid \"``commands`` and ``heading`` parameters are now positional-only.\"\nmsgstr \"``commands`` と ``heading`` 引数は位置限定引数になりました。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.MinimalHelpCommand.add_bot_commands_formatting:12\nmsgid \"A list of commands that belong to the heading.\"\nmsgstr \"この見出しに属するコマンドのリスト。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.MinimalHelpCommand.add_bot_commands_formatting:14\nmsgid \"The heading to add to the line.\"\nmsgstr \"行に追加する見出し。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.MinimalHelpCommand.add_subcommand_formatting:1\nmsgid \"Adds formatting information on a subcommand.\"\nmsgstr \"サブコマンドの書式情報を追加します。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.MinimalHelpCommand.add_subcommand_formatting:5\nmsgid \"The default implementation is the prefix and the :attr:`Command.qualified_name` optionally followed by an En dash and the command's :attr:`Command.short_doc`.\"\nmsgstr \"デフォルトの実装ではプレフィックスと、 :attr:`Command.qualified_name` の後にEn ダッシュとコマンドの :attr:`Command.short_doc` が追加されます。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.MinimalHelpCommand.add_subcommand_formatting:12\nmsgid \"The command to show information of.\"\nmsgstr \"情報を表示するコマンド。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.MinimalHelpCommand.add_aliases_formatting:1\nmsgid \"Adds the formatting information on a command's aliases.\"\nmsgstr \"コマンドのエイリアスの書式情報を追加します。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.MinimalHelpCommand.add_aliases_formatting:5\nmsgid \"The default implementation is the :attr:`aliases_heading` bolded followed by a comma separated list of aliases.\"\nmsgstr \"デフォルトの実装では、太字の :attr:`aliases_heading` の後にカンマで区切られたエイリアスの一覧が出力されます。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.MinimalHelpCommand.add_aliases_formatting:8\nmsgid \"This is not called if there are no aliases to format.\"\nmsgstr \"フォーマットするエイリアスがない場合は呼び出されません。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.MinimalHelpCommand.add_aliases_formatting:12\nmsgid \"``aliases`` parameter is now positional-only.\"\nmsgstr \"引数 ``aliases`` は位置専用引数となりました。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.MinimalHelpCommand.add_aliases_formatting:14\nmsgid \"A list of aliases to format.\"\nmsgstr \"フォーマットするエイリアスのリスト。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.MinimalHelpCommand.add_command_formatting:1\nmsgid \"A utility function to format commands and groups.\"\nmsgstr \"コマンドとグループをフォーマットするユーティリティ関数。\"\n\n#: ../../ext/commands/api.rst:302\nmsgid \"Paginator\"\nmsgstr \"Paginator\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.Paginator:1\nmsgid \"A class that aids in paginating code blocks for Discord messages.\"\nmsgstr \"Discordメッセージのコードブロックをページに分割するのに役立つクラス。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.Paginator:7\nmsgid \"Returns the total number of characters in the paginator.\"\nmsgstr \"ペジネーター内の文字数の合計を返します。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.Paginator:11\nmsgid \"The prefix inserted to every page. e.g. three backticks, if any.\"\nmsgstr \"存在する場合、毎ページに挿入されるプレフィックス。例: バックティック3個。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.Paginator:17\nmsgid \"The suffix appended at the end of every page. e.g. three backticks, if any.\"\nmsgstr \"存在する場合、毎ページの末尾に挿入されるサフィックス。例: バックティック3個。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.Paginator:23\nmsgid \"The maximum amount of codepoints allowed in a page.\"\nmsgstr \"ページ内で許可されるコードポイントの最大数。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.Paginator:32\nmsgid \"The character string inserted between lines. e.g. a newline character.\"\nmsgstr \"行間に挿入される文字列。例: 改行文字。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.Paginator.clear:1\nmsgid \"Clears the paginator to have no pages.\"\nmsgstr \"ページネーターのページを消去します。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.Paginator.add_line:1\nmsgid \"Adds a line to the current page.\"\nmsgstr \"現在のページに行を追加します。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.Paginator.add_line:3\nmsgid \"If the line exceeds the :attr:`max_size` then an exception is raised.\"\nmsgstr \"行が :attr:`max_size` を超えると、例外が発生します。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.Paginator.add_line:6\nmsgid \"The line to add.\"\nmsgstr \"追加する行。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.Paginator.add_line:8\nmsgid \"Indicates if another empty line should be added.\"\nmsgstr \"別に空行を追加するかどうかを示します。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.Paginator.add_line:11\nmsgid \"The line was too big for the current :attr:`max_size`.\"\nmsgstr \"現在の :attr:`max_size` に対し行が大きすぎる場合。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.help.Paginator.close_page:1\nmsgid \"Prematurely terminate a page.\"\nmsgstr \"ページを改めます。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.Paginator.pages:1\nmsgid \"Returns the rendered list of pages.\"\nmsgstr \"レンダリングされたページの一覧を返します。\"\n\n#: ../../../discord/ext/commands/help.py:docstring of discord.ext.commands.Paginator.pages:3\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context:98\n#: ../../../discord/ext/commands/flags.py:docstring of discord.ext.commands.flags.Flag:17\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.MissingPermissions:10\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.BotMissingPermissions:10\nmsgid \"List[:class:`str`]\"\nmsgstr \"List[:class:`str`]\"\n\n#: ../../ext/commands/api.rst:310\nmsgid \"Enums\"\nmsgstr \"列挙型\"\n\n#: ../../ext/commands/api.rst:315\nmsgid \"Specifies a type of bucket for, e.g. a cooldown.\"\nmsgstr \"クールダウンなどに使用するバケットの種類を指定します。\"\n\n#: ../../ext/commands/api.rst:319\nmsgid \"The default bucket operates on a global basis.\"\nmsgstr \"デフォルトのバケットはグローバル基準で動作します。\"\n\n#: ../../ext/commands/api.rst:322\nmsgid \"The user bucket operates on a per-user basis.\"\nmsgstr \"ユーザーバケットは、ユーザーごとに動作します。\"\n\n#: ../../ext/commands/api.rst:325\nmsgid \"The guild bucket operates on a per-guild basis.\"\nmsgstr \"ギルドバケットは、ギルドごとに動作します。\"\n\n#: ../../ext/commands/api.rst:328\nmsgid \"The channel bucket operates on a per-channel basis.\"\nmsgstr \"チャンネルバケットは、チャンネルごとに動作します。\"\n\n#: ../../ext/commands/api.rst:331\nmsgid \"The member bucket operates on a per-member basis.\"\nmsgstr \"メンバーバケットは、メンバーごとに動作します。\"\n\n#: ../../ext/commands/api.rst:334\nmsgid \"The category bucket operates on a per-category basis.\"\nmsgstr \"カテゴリバケットは、カテゴリごとに動作します。\"\n\n#: ../../ext/commands/api.rst:337\nmsgid \"The role bucket operates on a per-role basis.\"\nmsgstr \"ロールバケットは、ロールごとに動作します。\"\n\n#: ../../ext/commands/api.rst:345\nmsgid \"Checks\"\nmsgstr \"Checks\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.check:1\nmsgid \"A decorator that adds a check to the :class:`.Command` or its subclasses. These checks could be accessed via :attr:`.Command.checks`.\"\nmsgstr \":class:`.Command` またはそのサブクラスにチェックを追加するデコレータ。これらのチェックは :attr:`.Command.checks` 経由でアクセスできます。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.check:4\nmsgid \"These checks should be predicates that take in a single parameter taking a :class:`.Context`. If the check returns a ``False``\\\\-like value then during invocation a :exc:`.CheckFailure` exception is raised and sent to the :func:`.on_command_error` event.\"\nmsgstr \"これらのチェックは唯一の引数 :class:`.Context` を取る関数であるべきです。もしチェックが ``False`` のような値を返せば、呼び出し中に :exc:`.CheckFailure` が発生され :func:`.on_command_error` に送られます。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.check:9\nmsgid \"If an exception should be thrown in the predicate then it should be a subclass of :exc:`.CommandError`. Any exception not subclassed from it will be propagated while those subclassed will be sent to :func:`.on_command_error`.\"\nmsgstr \"もし関数内で例外が発生するとしたら、それは :exc:`.CommandError` のサブクラスであるべきです。これらのサブクラスが :func:`.on_command_error` に送られるのに対し、それから継承されていないどんな例外も、伝播します。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.check:14\nmsgid \"A special attribute named ``predicate`` is bound to the value returned by this decorator to retrieve the predicate passed to the decorator. This allows the following introspection and chaining to be done:\"\nmsgstr \"``predicate`` という特別な属性は、デコレータから返された値にバインドされ、デコレータに渡された関数を取得します。 これにより、次のイントロスペクションとチェーンを行うことができます:\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.check:30\nmsgid \"The function returned by ``predicate`` is **always** a coroutine, even if the original function was not a coroutine.\"\nmsgstr \"``predicate`` によって返される関数は、たとえ元の関数がコルーチンでなくても、**常に** コルーチンです。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.check:33\nmsgid \"The ``predicate`` attribute was added.\"\nmsgstr \"``predicate`` 属性が追加されました。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.check:38\nmsgid \"Creating a basic check to see if the command invoker is you.\"\nmsgstr \"コマンドを呼び出したのがあなたであるかどうかを確認するための基本的なチェックの作成。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.check:50\nmsgid \"Transforming common checks into its own decorator:\"\nmsgstr \"一般的なチェックを独自のデコレータに変換します:\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.check:66\nmsgid \"``predicate`` parameter is now positional-only.\"\nmsgstr \"``predicate`` 引数は位置限定引数になりました。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.check:68\nmsgid \"The predicate to check if the command should be invoked.\"\nmsgstr \"コマンドが呼び出されるかどうかをチェックする関数。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.check_any:1\nmsgid \"A :func:`check` that is added that checks if any of the checks passed will pass, i.e. using logical OR.\"\nmsgstr \"渡されたチェックのいずれかが合格するか、すなわち論理ORを使用するかをチェックする追加された :func:`check` 。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.check_any:4\nmsgid \"If all checks fail then :exc:`.CheckAnyFailure` is raised to signal the failure. It inherits from :exc:`.CheckFailure`.\"\nmsgstr \"すべてのチェックに失敗した場合、 :exc:`.CheckAnyFailure` が発生して失敗したことを通知します。これは :exc:`.CheckFailure` を継承します。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.check_any:9\nmsgid \"The ``predicate`` attribute for this function **is** a coroutine.\"\nmsgstr \"この関数の ``predicate`` 属性は**コルーチン**です。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.check_any:13\nmsgid \"An argument list of checks that have been decorated with the :func:`check` decorator.\"\nmsgstr \":func:`check` デコレータで装飾されたチェックの引数リスト。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.check_any:17\nmsgid \"A check passed has not been decorated with the :func:`check`     decorator.\"\nmsgstr \"渡されたチェックが :func:`check` デコレータで装飾されていません。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.check_any:21\nmsgid \"Creating a basic check to see if it's the bot owner or the server owner:\"\nmsgstr \"ボットの所有者かサーバーの所有者かを確認するための基本的なチェックの作成なら:\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.has_role:1\nmsgid \"A :func:`.check` that is added that checks if the member invoking the command has the role specified via the name or ID specified.\"\nmsgstr \"コマンドを呼び出したメンバーが、指定された名前またはIDのロールを持っているかどうかのチェックを追加する :func:`.check` 。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.has_role:4\nmsgid \"If a string is specified, you must give the exact name of the role, including caps and spelling.\"\nmsgstr \"文字列が指定された場合は、大文字やつづりを含めロールの名前を正確に指定する必要があります。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.has_role:7\nmsgid \"If an integer is specified, you must give the exact snowflake ID of the role.\"\nmsgstr \"整数が指定されている場合は、ロールの正確なsnowflake IDを指定する必要があります。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.has_role:9\nmsgid \"If the message is invoked in a private message context then the check will return ``False``.\"\nmsgstr \"メッセージがプライベートメッセージのコンテキストで呼び出された場合、チェックは ``False`` を返します。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.has_role:12\nmsgid \"This check raises one of two special exceptions, :exc:`.MissingRole` if the user is missing a role, or :exc:`.NoPrivateMessage` if it is used in a private message. Both inherit from :exc:`.CheckFailure`.\"\nmsgstr \"このチェックは２つの特別な例外のうち１つ、もしユーザがロールを持っていないなら :exc:`.MissingRole` を、プライベートメッセージで使用されたなら :exc:`.NoPrivateMessage` を発生します。どちらも :exc:`.CheckFailure` を継承します。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.has_role:18\nmsgid \"Raise :exc:`.MissingRole` or :exc:`.NoPrivateMessage` instead of generic :exc:`.CheckFailure`\"\nmsgstr \"一般的な :exc:`.CheckFailure` の代わりに :exc:`.MissingRole` または :exc:`.NoPrivateMessage` を発生させます。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.has_role:23\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.bot_has_role:15\nmsgid \"``item`` parameter is now positional-only.\"\nmsgstr \"``item`` 引数は位置限定引数になりました。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.has_role:25\nmsgid \"The name or ID of the role to check.\"\nmsgstr \"チェックするロールの名前またはID。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.has_permissions:1\nmsgid \"A :func:`.check` that is added that checks if the member has all of the permissions necessary.\"\nmsgstr \"メンバーが必要なすべての権限を持っているかどうかのチェックを追加する :func:`.check` 。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.has_permissions:4\nmsgid \"Note that this check operates on the current channel permissions, not the guild wide permissions.\"\nmsgstr \"このチェックはギルド全体の権限ではなく、現在のチャンネルの権限で動作することに注意してください。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.has_permissions:7\nmsgid \"The permissions passed in must be exactly like the properties shown under :class:`.discord.Permissions`.\"\nmsgstr \"渡された権限は、 :class:`.discord.Permissions` のプロパティとまったく同じでなければなりません。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.has_permissions:10\nmsgid \"This check raises a special exception, :exc:`.MissingPermissions` that is inherited from :exc:`.CheckFailure`.\"\nmsgstr \"このチェックは特別な例外であり、 :exc:`.CheckFailure` から継承されている :exc:`.MissingPermissions` を発生します。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.has_permissions:13\nmsgid \"An argument list of permissions to check for.\"\nmsgstr \"チェックする権限の引数のリスト。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.has_guild_permissions:1\nmsgid \"Similar to :func:`.has_permissions`, but operates on guild wide permissions instead of the current channel permissions.\"\nmsgstr \":func:`.has_permissions` と似ていますが、現在のチャンネルの権限の代わりにギルド全体の権限で動作します。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.has_guild_permissions:4\nmsgid \"If this check is called in a DM context, it will raise an exception, :exc:`.NoPrivateMessage`.\"\nmsgstr \"このチェックがDMのコンテキストで呼び出されると、 :exc:`.NoPrivateMessage` 例外が発生します。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.has_any_role:1\nmsgid \"A :func:`.check` that is added that checks if the member invoking the command has **any** of the roles specified. This means that if they have one out of the three roles specified, then this check will return ``True``.\"\nmsgstr \"コマンドを呼び出したメンバーが、指定された名前またはIDのロールのうちの **どれか** を持っているかをチェックを追加する :func:`.check` 。 これは、指定された3つのうちのどのロールが指定されていても、このチェックが ``True`` を返すことを意味します。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.has_any_role:5\nmsgid \"Similar to :func:`.has_role`\\\\, the names or IDs passed in must be exact.\"\nmsgstr \":func:`.has_role` と同様に、渡された名前やIDは正確でなければなりません。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.has_any_role:7\nmsgid \"This check raises one of two special exceptions, :exc:`.MissingAnyRole` if the user is missing all roles, or :exc:`.NoPrivateMessage` if it is used in a private message. Both inherit from :exc:`.CheckFailure`.\"\nmsgstr \"このチェックは２つの特別な例外のうち１つ、もしユーザがロールをすべて持っていないなら :exc:`.MissingAnyRole` を、プライベートメッセージで使用されたなら :exc:`.NoPrivateMessage` を発生します。どちらも :exc:`.CheckFailure` を継承します。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.has_any_role:13\nmsgid \"Raise :exc:`.MissingAnyRole` or :exc:`.NoPrivateMessage` instead of generic :exc:`.CheckFailure`\"\nmsgstr \"一般的な :exc:`.CheckFailure` の代わりに :exc:`.MissingAnyRole` または :exc:`.NoPrivateMessage` を発生させます。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.has_any_role:16\nmsgid \"An argument list of names or IDs to check that the member has roles wise.\"\nmsgstr \"メンバーが割り当てられたロールを持っているかどうかをチェックする名前またはIDの引数リスト。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.bot_has_role:1\nmsgid \"Similar to :func:`.has_role` except checks if the bot itself has the role.\"\nmsgstr \"ボット自体がロールを持っているかどうかをチェックする以外は、 :func:`.has_role` と同様です。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.bot_has_role:4\nmsgid \"This check raises one of two special exceptions, :exc:`.BotMissingRole` if the bot is missing the role, or :exc:`.NoPrivateMessage` if it is used in a private message. Both inherit from :exc:`.CheckFailure`.\"\nmsgstr \"このチェックは２つの特別な例外のうち１つ、もしボットがロールを持っていないなら :exc:`.BotMissingRole` を、プライベートメッセージで使用されたなら :exc:`.NoPrivateMessage` を発生します。どちらも :exc:`.CheckFailure` を継承します。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.bot_has_role:10\nmsgid \"Raise :exc:`.BotMissingRole` or :exc:`.NoPrivateMessage` instead of generic :exc:`.CheckFailure`\"\nmsgstr \"一般的な :exc:`.CheckFailure` の代わりに :exc:`.BotMissingRole` または :exc:`.NoPrivateMessage` を発生させます。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.bot_has_permissions:1\nmsgid \"Similar to :func:`.has_permissions` except checks if the bot itself has the permissions listed.\"\nmsgstr \"ボット自身がリストされている権限を持っているかどうかをチェックすること以外は :func:`.has_permissions` と同様です。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.bot_has_permissions:4\nmsgid \"This check raises a special exception, :exc:`.BotMissingPermissions` that is inherited from :exc:`.CheckFailure`.\"\nmsgstr \"このチェックは特別な例外であり、 :exc:`.CheckFailure` から継承されている :exc:`.BotMissingPermissions` を発生します。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.bot_has_guild_permissions:1\nmsgid \"Similar to :func:`.has_guild_permissions`, but checks the bot members guild permissions.\"\nmsgstr \":func:`.has_guild_permissions` と似ていますが、ボットメンバーのギルドの権限をチェックします。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.bot_has_any_role:1\nmsgid \"Similar to :func:`.has_any_role` except checks if the bot itself has any of the roles listed.\"\nmsgstr \"ボット自体がリストされたロールを持っているかどうかをチェックする以外は、 :func:`.has_any_role` と同様です。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.bot_has_any_role:4\nmsgid \"This check raises one of two special exceptions, :exc:`.BotMissingAnyRole` if the bot is missing all roles, or :exc:`.NoPrivateMessage` if it is used in a private message. Both inherit from :exc:`.CheckFailure`.\"\nmsgstr \"このチェックは２つの特別な例外のうち１つ、もしボットがどのロールも持っていないなら :exc:`.BotMissingAnyRole` を、プライベートメッセージで使用されたなら :exc:`.NoPrivateMessage` を発生します。どちらも :exc:`.CheckFailure` を継承します。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.bot_has_any_role:10\nmsgid \"Raise :exc:`.BotMissingAnyRole` or :exc:`.NoPrivateMessage` instead of generic checkfailure\"\nmsgstr \"一般的なCheckFailureの代わりに :exc:`.BotMissingAnyRole` または :exc:`.NoPrivateMessage` を発生させます。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.cooldown:1\nmsgid \"A decorator that adds a cooldown to a :class:`.Command`\"\nmsgstr \":class:`.Command` にクールダウンを追加するデコレーター。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.cooldown:3\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.dynamic_cooldown:8\nmsgid \"A cooldown allows a command to only be used a specific amount of times in a specific time frame. These cooldowns can be based either on a per-guild, per-channel, per-user, per-role or global basis. Denoted by the third argument of ``type`` which must be of enum type :class:`.BucketType`.\"\nmsgstr \"クールダウンにより、コマンドは特定の時間枠内でのみ使用することができます。 これらのクールダウンは、ギルドごと、チャンネルごと、ユーザごと、ロールごと、またはグローバル基準のいずれかに基づくことができます。 列挙型 :class:`.BucketType` でなければならない第３引数 ``type`` によって示されます。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.cooldown:9\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.dynamic_cooldown:14\nmsgid \"If a cooldown is triggered, then :exc:`.CommandOnCooldown` is triggered in :func:`.on_command_error` and the local error handler.\"\nmsgstr \"クールダウンが発生した場合、 :exc:`.CommandOnCooldown` が :func:`.on_command_error` とローカルのエラーハンドラに引っかかります。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.cooldown:12\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.dynamic_cooldown:17\nmsgid \"A command can only have a single cooldown.\"\nmsgstr \"コマンドは1つのクールダウンしか持つことができません。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.cooldown:14\nmsgid \"The number of times a command can be used before triggering a cooldown.\"\nmsgstr \"クールダウンを発生させる前にコマンドを使用できる回数。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.cooldown:16\nmsgid \"The amount of seconds to wait for a cooldown when it's been triggered.\"\nmsgstr \"トリガーされたときにクールダウンを待つ秒数。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.cooldown:18\nmsgid \"The type of cooldown to have. If callable, should return a key for the mapping.\"\nmsgstr \"持っているクールダウンの種類。呼び出し可能な場合は、マッピングのキーを返す必要があります。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.cooldown:20\nmsgid \"Callables are now supported for custom bucket types.\"\nmsgstr \"カスタムされたBucketタイプの呼び出しをサポートするようになりました。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.cooldown:23\nmsgid \"When passing a callable, it now needs to accept :class:`.Context` rather than :class:`~discord.Message` as its only argument.\"\nmsgstr \"呼び出し可能オブジェクトを渡す場合、 :class:`~discord.Message` ではなく、 :class:`.Context` を引数として受け付けないといけないようになりました。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.dynamic_cooldown:1\nmsgid \"A decorator that adds a dynamic cooldown to a :class:`.Command`\"\nmsgstr \":class:`.Command` に動的なクールダウンを追加するデコレータ。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.dynamic_cooldown:3\nmsgid \"This differs from :func:`.cooldown` in that it takes a function that accepts a single parameter of type :class:`.Context` and must return a :class:`~discord.app_commands.Cooldown` or ``None``. If ``None`` is returned then that cooldown is effectively bypassed.\"\nmsgstr \"これは唯一のパラメータに :class:`.Context` を取り、 :class:`~discord.app_commands.Cooldown` または ``None`` を返す関数を取るという点で :func:`.cooldown` と異なります。もし ``None`` を返せば、クールダウンは事実上回避されます。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.dynamic_cooldown:21\nmsgid \"A function that takes a message and returns a cooldown that will apply to this invocation or ``None`` if the cooldown should be bypassed.\"\nmsgstr \"メッセージを受け取り、この呼び出しに適用されるクールダウンまたはクールダウンを回避する場合 ``None`` を返す関数。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.dynamic_cooldown:24\nmsgid \"The type of cooldown to have.\"\nmsgstr \"持っているクールダウンの種類。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.max_concurrency:1\nmsgid \"A decorator that adds a maximum concurrency to a :class:`.Command` or its subclasses.\"\nmsgstr \":class:`.Command` またはそのサブクラスに最大同時実行数制限を追加するデコレータ。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.max_concurrency:3\nmsgid \"This enables you to only allow a certain number of command invocations at the same time, for example if a command takes too long or if only one user can use it at a time. This differs from a cooldown in that there is no set waiting period or token bucket -- only a set number of people can run the command.\"\nmsgstr \"これにより、特定の数のコマンドの同時呼び出しを許可することができます。 例えば、コマンドに時間がかかりすぎたり、あるいは一度に1人のユーザーしか使えない場合などです。 これは、設定された待ち時間やトークンバケットがないという点でクールダウンとは異なります - コマンドを実行できるのは、設定された数の人だけです。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.max_concurrency:10\nmsgid \"The maximum number of invocations of this command that can be running at the same time.\"\nmsgstr \"同時に実行できるコマンドの呼び出しの最大数。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.max_concurrency:12\nmsgid \"The bucket that this concurrency is based on, e.g. ``BucketType.guild`` would allow it to be used up to ``number`` times per guild.\"\nmsgstr \"この並行性がベースになっているバケット。例えば、``BucketType.guild`` ではギルドごとに ``number`` 回まで使用できます。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.max_concurrency:15\nmsgid \"Whether the command should wait for the queue to be over. If this is set to ``False`` then instead of waiting until the command can run again, the command raises :exc:`.MaxConcurrencyReached` to its error handler. If this is set to ``True`` then the command waits until it can be executed.\"\nmsgstr \"コマンドがキューが終わるのを待つかどうか。 これが ``False`` に設定されている場合、コマンドが再び実行可能になるまで待つことのかわりに、コマンドはそのエラーハンドラに対し :exc:`.MaxConcurrencyReached` を発生させます。 これが ``True`` に設定されている場合、コマンドが実行可能になるまで待機します。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.before_invoke:3\nmsgid \"This allows you to refer to one before invoke hook for several commands that do not have to be within the same cog.\"\nmsgstr \"これにより、同じコグ内になくてもよい、複数のコマンドについてフックを呼び出す前に 参照することができます。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.after_invoke:3\nmsgid \"This allows you to refer to one after invoke hook for several commands that do not have to be within the same cog.\"\nmsgstr \"これにより、同じコグ内になくてもよい、複数のコマンドについてフックを呼び出した後に 参照することができます。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.guild_only:1\nmsgid \"A :func:`.check` that indicates this command must only be used in a guild context only. Basically, no private messages are allowed when using the command.\"\nmsgstr \"このコマンドを示す :func:`.check` は、ギルドのコンテキスト内でのみ使用される必要があります。 基本的には、プライベートメッセージはコマンドを使用するときに許可されません。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.guild_only:5\nmsgid \"This check raises a special exception, :exc:`.NoPrivateMessage` that is inherited from :exc:`.CheckFailure`.\"\nmsgstr \"このチェックは特別な例外であり、 :exc:`.CheckFailure` から継承されている :exc:`.NoPrivateMessage` を発生します。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.guild_only:8\nmsgid \"If used on hybrid commands, this will be equivalent to the :func:`discord.app_commands.guild_only` decorator. In an unsupported context, such as a subcommand, this will still fallback to applying the check.\"\nmsgstr \"ハイブリッドコマンドで使用する場合は、 :func:`discord.app_commands.guild_only` デコレータと同じです。 サブコマンドのようなサポートされていないコンテキストであっても、チェックは適用されます。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.dm_only:1\nmsgid \"A :func:`.check` that indicates this command must only be used in a DM context. Only private messages are allowed when using the command.\"\nmsgstr \"このコマンドを示す :func:`.check` は、DMのコンテキストでのみ使用される必要があります。このコマンドを使用するときプライベートメッセージのみが許可されます。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.dm_only:5\nmsgid \"This check raises a special exception, :exc:`.PrivateMessageOnly` that is inherited from :exc:`.CheckFailure`.\"\nmsgstr \"このチェックは特別な例外であり、 :exc:`.CheckFailure` から継承されている :exc:`.PrivateMessageOnly` を発生します。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.is_owner:1\nmsgid \"A :func:`.check` that checks if the person invoking this command is the owner of the bot.\"\nmsgstr \"このコマンドを実行している人がボットの所有者であるかどうかをチェックする :func:`.check` 。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.is_owner:4\nmsgid \"This is powered by :meth:`.Bot.is_owner`.\"\nmsgstr \"これは :meth:`.Bot.is_owner` を使って動作します。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.is_owner:6\nmsgid \"This check raises a special exception, :exc:`.NotOwner` that is derived from :exc:`.CheckFailure`.\"\nmsgstr \"このチェックは特別な例外であり、 :exc:`.CheckFailure` から継承されている :exc:`.NotOwner` を発生します。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.is_nsfw:1\nmsgid \"A :func:`.check` that checks if the channel is a NSFW channel.\"\nmsgstr \"NSFWチャンネルであるかどうかをチェックする :func:`.check` 。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.is_nsfw:3\nmsgid \"This check raises a special exception, :exc:`.NSFWChannelRequired` that is derived from :exc:`.CheckFailure`.\"\nmsgstr \"このチェックは特別な例外であり、 :exc:`.CheckFailure` から継承されている :exc:`.NSFWChannelRequired` を発生します。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.is_nsfw:6\nmsgid \"If used on hybrid commands, this will be equivalent to setting the application command's ``nsfw`` attribute to ``True``. In an unsupported context, such as a subcommand, this will still fallback to applying the check.\"\nmsgstr \"ハイブリッドコマンドで使用する場合は、アプリケーションコマンドの ``nsfw`` 属性を ``True`` に設定するのと同じです。サブコマンドのようなサポートされていないコンテキストであっても、チェックは適用されます。\"\n\n#: ../../../discord/ext/commands/core.py:docstring of discord.ext.commands.core.is_nsfw:13\nmsgid \"Raise :exc:`.NSFWChannelRequired` instead of generic :exc:`.CheckFailure`. DM channels will also now pass this check.\"\nmsgstr \"一般的な :exc:`.CheckFailure` の代わりに :exc:`NSFWChannelRequired` を発生させます。DMチャンネルもこのチェックを通過するようになります。\"\n\n#: ../../ext/commands/api.rst:407\nmsgid \"Context\"\nmsgstr \"Context\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context:1\nmsgid \"Represents the context in which a command is being invoked under.\"\nmsgstr \"コマンドが実行されているコンテキストを表します。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context:3\nmsgid \"This class contains a lot of meta data to help you understand more about the invocation context. This class is not created manually and is instead passed around to commands as the first parameter.\"\nmsgstr \"このクラスには、呼び出しコンテキストについて理解するのに役立つ多くのメタデータが含まれています。 このクラスは手動では作成されず、代わりに最初のパラメータとしてコマンドに渡されます。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context:7\nmsgid \"This class implements the :class:`~discord.abc.Messageable` ABC.\"\nmsgstr \"このクラスは :class:`~discord.abc.Messageable` ABC を実装しています。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context:11\nmsgid \"The message that triggered the command being executed.\"\nmsgstr \"実行中のコマンドをトリガーしたメッセージ。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context:15\nmsgid \"In the case of an interaction based context, this message is \\\"synthetic\\\" and does not actually exist. Therefore, the ID on it is invalid similar to ephemeral messages.\"\nmsgstr \"インタラクションベースのコンテキストの場合、メッセージは「合成」されていて、実在しません。そのため、IDは一時的なメッセージ同様無効です。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context:19\nmsgid \":class:`.Message`\"\nmsgstr \":class:`.Message`\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context:23\nmsgid \"The bot that contains the command being executed.\"\nmsgstr \"実行中のコマンドを含むボット。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context:25\nmsgid \":class:`.Bot`\"\nmsgstr \":class:`.Bot`\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context:29\nmsgid \"The list of transformed arguments that were passed into the command. If this is accessed during the :func:`.on_command_error` event then this list could be incomplete.\"\nmsgstr \"コマンドに渡された変換された引数のリスト。 もしこれが :func:`.on_command_error` イベント中にアクセスされた場合、このリストは不完全である可能性があります。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context:33\nmsgid \":class:`list`\"\nmsgstr \":class:`list`\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context:37\nmsgid \"A dictionary of transformed arguments that were passed into the command. Similar to :attr:`args`\\\\, if this is accessed in the :func:`.on_command_error` event then this dict could be incomplete.\"\nmsgstr \"コマンドに渡された変換された引数の辞書。 :attr:`args` と似ていて、もしこれが :func:`.on_command_error` イベント中にアクセスされた場合、この辞書は不完全である可能性があります。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context:45\nmsgid \"The parameter that is currently being inspected and converted. This is only of use for within converters.\"\nmsgstr \"現在検査および変換されているパラメータ。これはコンバータ内でのみ使用されます。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context:50\nmsgid \"Optional[:class:`Parameter`]\"\nmsgstr \"Optional[:class:`Parameter`]\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context:54\nmsgid \"The argument string of the :attr:`current_parameter` that is currently being converted. This is only of use for within converters.\"\nmsgstr \"現在変換されている :attr:`current_parameter` の引数文字列。これはコンバーター内でのみ使用されます。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context:63\nmsgid \"The interaction associated with this context.\"\nmsgstr \"このコンテキストに関連付けられたインタラクション。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context:67\nmsgid \"Optional[:class:`~discord.Interaction`]\"\nmsgstr \"Optional[:class:`~discord.Interaction`]\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context:71\nmsgid \"The prefix that was used to invoke the command. For interaction based contexts, this is ``/`` for slash commands and ``\\\\u200b`` for context menu commands.\"\nmsgstr \"コマンドを呼び出すために使用された接頭辞。インタラクションベースのコンテキストでは、スラッシュコマンドでは ``/`` で、コンテキストメニューコマンドでは ``\\\\u200b`` です。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context:78\nmsgid \"The command that is being invoked currently.\"\nmsgstr \"現在呼び出されているコマンド。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context:84\nmsgid \"The command name that triggered this invocation. Useful for finding out which alias called the command.\"\nmsgstr \"この呼び出しを引き起こしたコマンドの名前。コマンドを呼び出した別名を突き止めるのに役立ちます。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context:91\nmsgid \"The command names of the parents that triggered this invocation. Useful for finding out which aliases called the command.\"\nmsgstr \"この呼び出しを引き起こした親のコマンドの名前。コマンドを呼び出した別名を突き止めるのに役立ちます。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context:94\nmsgid \"For example in commands ``?a b c test``, the invoked parents are ``['a', 'b', 'c']``.\"\nmsgstr \"例えば、``?a b c test`` では、呼び出された親は ``['a', 'b', 'c']`` です。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context:102\nmsgid \"The subcommand that was invoked. If no valid subcommand was invoked then this is equal to ``None``.\"\nmsgstr \"呼び出されたサブコマンド。有効なサブコマンドが呼び出されなかった場合、これは ``None`` と等しくなります。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context:109\nmsgid \"The string that was attempted to call a subcommand. This does not have to point to a valid registered subcommand and could just point to a nonsense string. If nothing was passed to attempt a call to a subcommand then this is set to ``None``.\"\nmsgstr \"サブコマンドの呼び出しを試みた文字列。 これは有効な登録されたサブコマンドを指す必要はなく、無茶な文字列を指すだけとなり得ます。 サブコマンドへの呼び出しに何も渡されなかった場合、これは ``None`` に設定されます。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context:118\nmsgid \"A boolean that indicates if the command failed to be parsed, checked, or invoked.\"\nmsgstr \"コマンドの分解、チェック、呼び出しに失敗したかどうかを示すブール値。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context.typing:1\nmsgid \"Returns an asynchronous context manager that allows you to send a typing indicator to the destination for an indefinite period of time, or 10 seconds if the context manager is called using ``await``.\"\nmsgstr \"入力インジケーターを宛先に無期限で、または ``await`` で呼び出された場合10秒間表示できるようにする非同期コンテキストマネージャーを返します。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context.typing:5\nmsgid \"In an interaction based context, this is equivalent to a :meth:`defer` call and does not do any typing calls.\"\nmsgstr \"インタラクションベースのコンテキストでは、これは :meth:`defer` 呼び出しと同じで、入力呼び出しは行いません。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context.typing:8\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context.typing:16\nmsgid \"Example Usage: ::\"\nmsgstr \"使用例: ::\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context.typing:22\nmsgid \"This no longer works with the ``with`` syntax, ``async with`` must be used instead.\"\nmsgstr \"これは ``with`` 構文で動作せず、代わりに ``async with`` を使用しないといけないように変更されました。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context.typing:25\nmsgid \"Added functionality to ``await`` the context manager to send a typing indicator for 10 seconds.\"\nmsgstr \"コンテキストマネージャーを ``await`` して入力インジケーターを10秒間送信する機能を追加しました。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context.typing:28\nmsgid \"Indicates whether the deferred message will eventually be ephemeral. Only valid for interaction based contexts.\"\nmsgstr \"遅延されたメッセージが後に一時的になるかどうかを示します。インタラクションベースのコンテキストでのみ有効です。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context.from_interaction:3\nmsgid \"Creates a context from a :class:`discord.Interaction`. This only works on application command based interactions, such as slash commands or context menus.\"\nmsgstr \":class:`discord.Interaction` からコンテキストを作成します。これはスラッシュコマンドやコンテキストメニューなどのアプリケーションコマンドベースのインタラクションでのみ動作します。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context.from_interaction:7\nmsgid \"On slash command based interactions this creates a synthetic :class:`~discord.Message` that points to an ephemeral message that the command invoker has executed. This means that :attr:`Context.author` returns the member that invoked the command.\"\nmsgstr \"スラッシュコマンドベースのインタラクションではこれはコマンド実行者が実行した一時的なメッセージを指す :class:`~discord.Message` を合成します。つまり、 :attr:`Context.author` はコマンドを実行したメンバーを返します。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context.from_interaction:11\nmsgid \"In a message context menu based interaction, the :attr:`Context.message` attribute is the message that the command is being executed on. This means that :attr:`Context.author` returns the author of the message being targetted. To get the member that invoked the command then :attr:`discord.Interaction.user` should be used instead.\"\nmsgstr \"メッセージコンテキストメニューベースのインタラクションでは、 :attr:`Context.message` 属性はコマンドが実行されたメッセージです。つまり、 :attr:`Context.author` は対象メッセージの送信者を返します。コマンドを実行したメンバーを得るには、代わりに :attr:`discord.Interaction.user` を使用すべきです。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context.from_interaction:18\nmsgid \"The interaction to create a context with.\"\nmsgstr \"コンテキストを作成するためのインタラクション。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context.from_interaction:21\nmsgid \"The interaction does not have a valid command.\"\nmsgstr \"インタラクションに有効なコマンドが存在しない場合。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context.from_interaction:22\nmsgid \"The interaction client is not derived from :class:`Bot` or :class:`AutoShardedBot`.\"\nmsgstr \"インタラクションクライアントが :class:`Bot` や :class:`AutoShardedBot` を継承していない場合。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context.invoke:3\nmsgid \"Calls a command with the arguments given.\"\nmsgstr \"与えられた引数でコマンドを呼び出します。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context.invoke:5\nmsgid \"This is useful if you want to just call the callback that a :class:`.Command` holds internally.\"\nmsgstr \"単に :class:`.Command` が内部的に保持しているコールバックを呼び出したい場合に便利です。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context.invoke:10\nmsgid \"This does not handle converters, checks, cooldowns, pre-invoke, or after-invoke hooks in any matter. It calls the internal callback directly as-if it was a regular function.\"\nmsgstr \"これは、いずれの場合においても、コンバーター、チェック、クールダウン、呼び出し前、または呼び出し後のフックを処理しません。 内部コールバックが通常の関数であるかのように直接呼び出します。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context.invoke:14\nmsgid \"You must take care in passing the proper arguments when using this function.\"\nmsgstr \"この関数を使用する場合は、適切な引数を渡すことに注意しなければなりません。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context.invoke:21\nmsgid \"The command that is going to be called.\"\nmsgstr \"呼び出されるコマンド。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context.invoke:23\nmsgid \"The arguments to use.\"\nmsgstr \"使用する引数。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context.invoke:24\nmsgid \"The keyword arguments to use.\"\nmsgstr \"使用するキーワード引数。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context.invoke:26\nmsgid \"The command argument to invoke is missing.\"\nmsgstr \"呼び出すコマンド引数がありません。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context.reinvoke:3\nmsgid \"Calls the command again.\"\nmsgstr \"コマンドを再度呼び出します。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context.reinvoke:5\nmsgid \"This is similar to :meth:`~.Context.invoke` except that it bypasses checks, cooldowns, and error handlers.\"\nmsgstr \"これはチェック、クールダウン、エラーハンドラが回避されていることを除き、 :meth:`~.Context.invoke` と同様です。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context.reinvoke:10\nmsgid \"If you want to bypass :exc:`.UserInputError` derived exceptions, it is recommended to use the regular :meth:`~.Context.invoke` as it will work more naturally. After all, this will end up using the old arguments the user has used and will thus just fail again.\"\nmsgstr \"派生した例外の :exc:`.UserInputError` を回避したい場合は、より自然に動作する標準の :meth:`~.Context.invoke` を使用することをお勧めします。結局のところ、これはユーザが使用した古い引数を使用することになり、したがって再び失敗します。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context.reinvoke:16\nmsgid \"Whether to call the before and after invoke hooks.\"\nmsgstr \"前後にフックを呼び出すかどうかを設定します。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context.reinvoke:18\nmsgid \"Whether to start the call chain from the very beginning or where we left off (i.e. the command that caused the error). The default is to start where we left off.\"\nmsgstr \"呼び出しチェーンを最初、または中断した場所(例えばエラーの原因となったコマンド)から開始するかどうか。デフォルトでは、中断した位置から開始します。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context.reinvoke:23\nmsgid \"The context to reinvoke is not valid.\"\nmsgstr \"再呼び出しするコンテキストが無効です。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.Context.valid:1\nmsgid \"Checks if the invocation context is valid to be invoked with.\"\nmsgstr \"呼び出しコンテキストを呼び出すのが有効かどうかを確認します。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.Context.clean_prefix:1\nmsgid \"The cleaned up invoke prefix. i.e. mentions are ``@name`` instead of ``<@id>``.\"\nmsgstr \"「クリーンアップ」されたプレフィックスを返します。たとえば、メンションは ``<@id>`` のかわりに ``@name`` となります。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.Context.cog:1\nmsgid \"Returns the cog associated with this context's command. None if it does not exist.\"\nmsgstr \"このコンテキストのコマンドに関連付けられたコグを返します。存在しない場合はNoneを返します。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.Context.filesize_limit:1\nmsgid \"Returns the maximum number of bytes files can have when uploaded to this guild or DM channel associated with this context.\"\nmsgstr \"\"\n\n#: ../../docstring of discord.ext.commands.Context.guild:1\nmsgid \"Returns the guild associated with this context's command. None if not available.\"\nmsgstr \"このコンテキストのコマンドに関連付けられているギルドを返します。利用できない場合はNoneを返します。\"\n\n#: ../../docstring of discord.ext.commands.Context.channel:1\nmsgid \"Returns the channel associated with this context's command. Shorthand for :attr:`.Message.channel`.\"\nmsgstr \"このコンテキストのコマンドに関連付けられているチャンネルを返します。 :attr:`.Message.channel` のショートカットです。\"\n\n#: ../../docstring of discord.ext.commands.Context.channel:4\nmsgid \"Union[:class:`.abc.Messageable`]\"\nmsgstr \"Union[:class:`.abc.Messageable`]\"\n\n#: ../../docstring of discord.ext.commands.Context.author:1\nmsgid \"Union[:class:`~discord.User`, :class:`.Member`]: Returns the author associated with this context's command. Shorthand for :attr:`.Message.author`\"\nmsgstr \"Union[:class:`~discord.User`, :class:`.Member`]: このコンテキストのコマンドに関連付けられた作者を返します。 :attr:`.Message.author` のショートカットです。\"\n\n#: ../../docstring of discord.ext.commands.Context.me:1\nmsgid \"Union[:class:`.Member`, :class:`.ClientUser`]: Similar to :attr:`.Guild.me` except it may return the :class:`.ClientUser` in private message contexts.\"\nmsgstr \"Union[:class:`.Member`, :class:`ClientUser`]: これはプライベートメッセージコンテキストでは :class:`ClientUser` を返すことを除いて、 :attr:`.Guild.me` と同様です。\"\n\n#: ../../docstring of discord.ext.commands.Context.permissions:1\nmsgid \"Returns the resolved permissions for the invoking user in this channel. Shorthand for :meth:`.abc.GuildChannel.permissions_for` or :attr:`.Interaction.permissions`.\"\nmsgstr \"このチャンネルでのコマンドを実行したユーザーの解決された権限を返します。 :meth:`.abc.GuildChannel.permissions_for` と :attr:`.Interaction.permissions` のショートカットです。\"\n\n#: ../../docstring of discord.ext.commands.Context.permissions:6\n#: ../../docstring of discord.ext.commands.Context.bot_permissions:13\nmsgid \":class:`.Permissions`\"\nmsgstr \":class:`.Permissions`\"\n\n#: ../../docstring of discord.ext.commands.Context.bot_permissions:1\nmsgid \"Returns the resolved permissions for the bot in this channel. Shorthand for :meth:`.abc.GuildChannel.permissions_for` or :attr:`.Interaction.app_permissions`.\"\nmsgstr \"このチャンネルでのボットの解決された権限を返します。 :meth:`.abc.GuildChannel.permissions_for` と :attr:`.Interaction.app_permissions` のショートカットです。\"\n\n#: ../../docstring of discord.ext.commands.Context.bot_permissions:4\nmsgid \"For interaction-based commands, this will reflect the effective permissions for :class:`Context` calls, which may differ from calls through other :class:`.abc.Messageable` endpoints, like :attr:`channel`.\"\nmsgstr \"インタラクションベースのコマンドでは、これは :class:`Context` 呼び出しにて有効な権限を反映していて、 :attr:`channel` のような他の :class:`.abc.Messageable` に適用されるものと異なる可能性があります。\"\n\n#: ../../docstring of discord.ext.commands.Context.bot_permissions:8\nmsgid \"Notably, sending messages, embedding links, and attaching files are always permitted, while reading messages might not be.\"\nmsgstr \"特に、メッセージの送信、埋め込みリンク、ファイルの添付は常に許可されていますが、メッセージを読むことはできない場合があります。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.Context.voice_client:1\nmsgid \"A shortcut to :attr:`.Guild.voice_client`\\\\, if applicable.\"\nmsgstr \"該当する場合は、 :attr:`.Guild.voice_client` へのショートカット。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.Context.voice_client:3\nmsgid \"Optional[:class:`.VoiceProtocol`]\"\nmsgstr \"Optional[:class:`.VoiceProtocol`]\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context.send_help:3\nmsgid \"Shows the help command for the specified entity if given. The entity can be a command or a cog.\"\nmsgstr \"指定されたエンティティのヘルプコマンドを表示します。エンティティはコマンドまたはコグになることができます。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context.send_help:6\nmsgid \"If no entity is given, then it'll show help for the entire bot.\"\nmsgstr \"エンティティが指定されていない場合は、ボット全体のヘルプが表示されます。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context.send_help:9\nmsgid \"If the entity is a string, then it looks up whether it's a :class:`Cog` or a :class:`Command`.\"\nmsgstr \"エンティティが文字列の場合、 :class:`Cog` または :class:`Command` を検索します。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context.send_help:14\nmsgid \"Due to the way this function works, instead of returning something similar to :meth:`~.commands.HelpCommand.command_not_found` this returns ``None`` on bad input or no help command.\"\nmsgstr \"この関数の動作によっては、 :meth:`~.commands.HelpCommand.command_not_found` のようなものを返す代わりに、不正な入力またはヘルプコマンドがない際に ``None`` を返します。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context.send_help:18\nmsgid \"The entity to show help for.\"\nmsgstr \"ヘルプを表示するエンティティ。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context.send_help:21\nmsgid \"The result of the help command, if any.\"\nmsgstr \"もしあれば、ヘルプコマンドの結果。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.abc.Messageable.fetch_message:3\nmsgid \"Retrieves a single :class:`~discord.Message` from the destination.\"\nmsgstr \"出力先から、単一の :class:`~discord.Message` を取得します。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.abc.Messageable.fetch_message:5\nmsgid \"The message ID to look for.\"\nmsgstr \"探索をするメッセージID。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.abc.Messageable.fetch_message:8\nmsgid \"The specified message was not found.\"\nmsgstr \"指定されたメッセージが見つからなかった場合。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.abc.Messageable.fetch_message:9\nmsgid \"You do not have the permissions required to get a message.\"\nmsgstr \"メッセージの取得に必要な権限がない場合。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.abc.Messageable.fetch_message:10\nmsgid \"Retrieving the message failed.\"\nmsgstr \"メッセージの取得に失敗した場合。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.abc.Messageable.fetch_message:12\nmsgid \"The message asked for.\"\nmsgstr \"要求されたメッセージ。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.abc.Messageable.fetch_message:13\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context.reply:20\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context.send:91\nmsgid \":class:`~discord.Message`\"\nmsgstr \":class:`~discord.Message`\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.abc.Messageable.history:1\nmsgid \"Returns an :term:`asynchronous iterator` that enables receiving the destination's message history.\"\nmsgstr \"出力先のメッセージ履歴を取得する :term:`asynchronous iterator` を返します。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.abc.Messageable.history:3\nmsgid \"You must have :attr:`~discord.Permissions.read_message_history` to do this.\"\nmsgstr \"これを行うためには、 :attr:`~discord.Permissions.read_message_history` が必要です。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.abc.Messageable.history:14\nmsgid \"Flattening into a list: ::\"\nmsgstr \"リストにフラット化: ::\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.abc.Messageable.history:21\nmsgid \"The number of messages to retrieve. If ``None``, retrieves every message in the channel. Note, however, that this would make it a slow operation.\"\nmsgstr \"取得するメッセージの数。 ``None`` の場合、チャンネルのメッセージすべてを取得します。ただし、これには時間がかかります。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.abc.Messageable.history:25\nmsgid \"Retrieve messages before this date or message. If a datetime is provided, it is recommended to use a UTC aware datetime. If the datetime is naive, it is assumed to be local time.\"\nmsgstr \"この日付またはメッセージより前のメッセージを取得します。もしdatetimeを指定する場合、UTC基準のawareなdatetimeを利用することを推奨します。naiveなdatetimeである場合、これはローカル時間であるとみなされます。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.abc.Messageable.history:29\nmsgid \"Retrieve messages after this date or message. If a datetime is provided, it is recommended to use a UTC aware datetime. If the datetime is naive, it is assumed to be local time.\"\nmsgstr \"この日付またはメッセージより後のメッセージを取得します。もしdatetimeを指定する場合、UTC基準のawareなdatetimeを利用することを推奨します。naiveなdatetimeである場合、これはローカル時間であるとみなされます。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.abc.Messageable.history:33\nmsgid \"Retrieve messages around this date or message. If a datetime is provided, it is recommended to use a UTC aware datetime. If the datetime is naive, it is assumed to be local time. When using this argument, the maximum limit is 101. Note that if the limit is an even number then this will return at most limit + 1 messages.\"\nmsgstr \"この日付またはメッセージの周辺のメッセージを取得します。もしdatetimeを指定する場合、UTC基準のawareなdatetimeを利用することを推奨します。naiveなdatetimeである場合、これはローカル時間であるとみなされます。この引数を使うとき、最大限界値は101です。限界値が偶数なら最大で限界値+1のメッセージが返されることに注意してください。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.abc.Messageable.history:39\nmsgid \"If set to ``True``, return messages in oldest->newest order. Defaults to ``True`` if ``after`` is specified, otherwise ``False``.\"\nmsgstr \"``True`` の場合、古いものから新しいものの順で項目を返します。デフォルトは、 ``after`` が指定された場合には ``True`` で、そうでなければ ``False`` です。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.abc.Messageable.history:43\nmsgid \"You do not have permissions to get channel message history.\"\nmsgstr \"チャンネルのメッセージ履歴を読む権限がありません。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.abc.Messageable.history:44\nmsgid \"The request to get message history failed.\"\nmsgstr \"メッセージ履歴の取得に失敗しました。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.abc.Messageable.history:46\nmsgid \":class:`~discord.Message` -- The message with the message data parsed.\"\nmsgstr \":class:`~discord.Message` -- メッセージのデータを解析されたメッセージ。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.abc.Messageable.pins:3\nmsgid \"Retrieves all messages that are currently pinned in the channel.\"\nmsgstr \"現時点でチャンネルにピン留めされている全てのメッセージを取得します。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.abc.Messageable.pins:7\nmsgid \"Due to a limitation with the Discord API, the :class:`.Message` objects returned by this method do not contain complete :attr:`.Message.reactions` data.\"\nmsgstr \"Discord APIの制限により、このメソッドの返した :class:`.Message` オブジェクトには、完全な :attr:`Message.reactions` のデータが含まれていません。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.abc.Messageable.pins:11\nmsgid \"You do not have the permission to retrieve pinned messages.\"\nmsgstr \"ピン留めされたメッセージの取得に必要な権限がない場合。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.abc.Messageable.pins:12\nmsgid \"Retrieving the pinned messages failed.\"\nmsgstr \"ピン留めされたメッセージの取得に失敗しました。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.abc.Messageable.pins:14\nmsgid \"The messages that are currently pinned.\"\nmsgstr \"現時点でピン留めされているメッセージ。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.abc.Messageable.pins:15\nmsgid \"List[:class:`~discord.Message`]\"\nmsgstr \"List[:class:`~discord.Message`]\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context.reply:3\nmsgid \"A shortcut method to :meth:`send` to reply to the :class:`~discord.Message` referenced by this context.\"\nmsgstr \"このコンテキストで参照されている :class:`~discord.Message` に返信するための、 :meth:`send` のショートカットメソッド。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context.reply:6\nmsgid \"For interaction based contexts, this is the same as :meth:`send`.\"\nmsgstr \"インタラクションベースのコンテキストでは、 :meth:`send` と同じです。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context.reply:10\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context.send:13\nmsgid \"This function will now raise :exc:`TypeError` or :exc:`ValueError` instead of ``InvalidArgument``.\"\nmsgstr \"この関数は ``InvalidArgument`` の代わりに :exc:`TypeError` または :exc:`ValueError` を発生するようになりました。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context.reply:14\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context.send:85\nmsgid \"Sending the message failed.\"\nmsgstr \"メッセージの送信に失敗しました。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context.reply:15\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context.send:86\nmsgid \"You do not have the proper permissions to send the message.\"\nmsgstr \"メッセージを送信するための適切な権限がありません。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context.reply:16\nmsgid \"The ``files`` list is not of the appropriate size\"\nmsgstr \"``files`` リストの大きさが適切ではありません。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context.reply:17\nmsgid \"You specified both ``file`` and ``files``.\"\nmsgstr \"``file`` と ``files`` の両方が指定されています。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context.reply:19\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context.send:90\nmsgid \"The message that was sent.\"\nmsgstr \"送信されたメッセージ。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context.defer:3\nmsgid \"Defers the interaction based contexts.\"\nmsgstr \"インタラクションの応答を遅らせます。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context.defer:5\nmsgid \"This is typically used when the interaction is acknowledged and a secondary action will be done later.\"\nmsgstr \"これは通常、インタラクションを認識した後、後で他のことを実行する場合に使われます。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context.defer:8\nmsgid \"If this isn't an interaction based context then it does nothing.\"\nmsgstr \"これがインタラクションベースのコンテキストでない場合、何もしません。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context.defer:10\nmsgid \"Indicates whether the deferred message will eventually be ephemeral.\"\nmsgstr \"遅れて送信するメッセージが一時的になるかを示します。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context.defer:13\nmsgid \"Deferring the interaction failed.\"\nmsgstr \"インタラクションの遅延に失敗した場合。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context.defer:14\nmsgid \"This interaction has already been responded to before.\"\nmsgstr \"既にインタラクションに応答していた場合。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context.send:3\nmsgid \"Sends a message to the destination with the content given.\"\nmsgstr \"指定された内容のメッセージを出力先に送信します。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context.send:5\nmsgid \"This works similarly to :meth:`~discord.abc.Messageable.send` for non-interaction contexts.\"\nmsgstr \"これはインタラクションベースでないコンテキストでは :meth:`~discord.abc.Messageable.send` と同様に動作します。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context.send:7\nmsgid \"For interaction based contexts this does one of the following:\"\nmsgstr \"インタラクションベースのコンテキストでは以下のどれかを行います：\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context.send:9\nmsgid \":meth:`discord.InteractionResponse.send_message` if no response has been given.\"\nmsgstr \"応答が与えられていない場合 :meth:`discord.InteractionResponse.send_message` 。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context.send:10\nmsgid \"A followup message if a response has been given.\"\nmsgstr \"応答が与えられた場合フォローアップメッセージ。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context.send:11\nmsgid \"Regular send if the interaction has expired\"\nmsgstr \"インタラクションが期限切れの場合通常の送信\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context.send:17\nmsgid \"The content of the message to send.\"\nmsgstr \"送信するメッセージの内容。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context.send:19\nmsgid \"Indicates if the message should be sent using text-to-speech.\"\nmsgstr \"メッセージが読み上げテキストで送信されるべきかどうかを示します。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context.send:21\nmsgid \"The rich embed for the content.\"\nmsgstr \"内容に埋め込む、typeが ``rich`` な埋め込み。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context.send:23\nmsgid \"The file to upload.\"\nmsgstr \"アップロードするファイル。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context.send:25\nmsgid \"A list of files to upload. Must be a maximum of 10.\"\nmsgstr \"アップロードするファイルのリスト。ファイル数は最大で10個まででなければなりません。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context.send:27\nmsgid \"The nonce to use for sending this message. If the message was successfully sent, then the message will have a nonce with this value.\"\nmsgstr \"メッセージの送信時に使用するナンス値。メッセージが正常に送信された場合、このメッセージにはこの値のナンス値が含まれます。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context.send:30\nmsgid \"If provided, the number of seconds to wait in the background before deleting the message we just sent. If the deletion fails, then it is silently ignored.\"\nmsgstr \"指定すると、これはメッセージを送信したあと削除するまでにバックグラウンドで待機する秒数となります。もし削除が失敗しても、それは静かに無視されます。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context.send:34\nmsgid \"Controls the mentions being processed in this message. If this is passed, then the object is merged with :attr:`~discord.Client.allowed_mentions`. The merging behaviour only overrides attributes that have been explicitly passed to the object, otherwise it uses the attributes set in :attr:`~discord.Client.allowed_mentions`. If no object is passed at all then the defaults given by :attr:`~discord.Client.allowed_mentions` are used instead.\"\nmsgstr \"処理されるメッセージ内のメンションを制御します。これが渡された場合、オブジェクトは :attr:`~discord.Client.allowed_mentions` で合併されます。これは、オブジェクトに明示的に渡された属性のみを上書きするもので、それ以外は :attr:`~discord.Client.allowed_mentions` で設定された属性が使用されます。もしオブジェクトが渡されていない場合は :attr:`~discord.Client.allowed_mentions` がデフォルトとして利用されます。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context.send:43\nmsgid \"A reference to the :class:`~discord.Message` to which you are replying, this can be created using :meth:`~discord.Message.to_reference` or passed directly as a :class:`~discord.Message`. You can control whether this mentions the author of the referenced message using the :attr:`~discord.AllowedMentions.replied_user` attribute of ``allowed_mentions`` or by setting ``mention_author``.\"\nmsgstr \"返信する :class:`~discord.Message` への参照。これは、 :meth:`~discord.Message.to_reference` を使用して作成することができ、また、 :class:`~discord.Message` を直接渡すこともできます。これが返信元のメッセージの投稿者をメンションすべきかは、 ``allowed_mentions`` の :attr:`~discord.AllowedMentions.replied_user` 属性や、 ``mention_author`` パラメータで制御できます。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context.send:48\nmsgid \"This is ignored for interaction based contexts.\"\nmsgstr \"インタラクションベースのコンテキストでは無視されます。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context.send:52\nmsgid \"If set, overrides the :attr:`~discord.AllowedMentions.replied_user` attribute of ``allowed_mentions``. This is ignored for interaction based contexts.\"\nmsgstr \"設定された場合、 ``allowed_mentions`` の :attr:`~discord.AllowedMentions.replied_user` 属性を上書きします。インタラクションベースのコンテキストでは無視されます。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context.send:57\nmsgid \"A Discord UI View to add to the message.\"\nmsgstr \"メッセージに追加するDiscord UI ビュー。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context.send:61\nmsgid \"A list of embeds to upload. Must be a maximum of 10.\"\nmsgstr \"送信する埋め込みのリスト。最大10個まで送信できます。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context.send:65\nmsgid \"A list of stickers to upload. Must be a maximum of 3. This is ignored for interaction based contexts.\"\nmsgstr \"送信するスタンプのリスト。最大3個まで送信できます。インタラクションベースのコンテキストでは無視されます。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context.send:69\nmsgid \"Whether to suppress embeds for the message. This sends the message without any embeds if set to ``True``.\"\nmsgstr \"メッセージの埋め込みを抑制するかどうか。これが ``True`` に設定されている場合、埋め込みなしでメッセージを送信します。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context.send:73\nmsgid \"Indicates if the message should only be visible to the user who started the interaction. If a view is sent with an ephemeral message and it has no timeout set then the timeout is set to 15 minutes. **This is only applicable in contexts with an interaction**.\"\nmsgstr \"メッセージがインタラクションを開始したユーザーだけに表示されるかどうか。もしビューが一時的なメッセージで送信されている、かつタイムアウトが設定されていない場合、タイムアウトは15分に設定されます。 **これはインタラクションベースのコンテキストでのみ適用されます。**\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context.send:79\nmsgid \"Whether to suppress push and desktop notifications for the message. This will increment the mention counter in the UI, but will not actually send a notification.\"\nmsgstr \"\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context.send:87\nmsgid \"The ``files`` list is not of the appropriate size.\"\nmsgstr \"``files`` リストの大きさが適切でない場合。\"\n\n#: ../../../discord/ext/commands/context.py:docstring of discord.ext.commands.context.Context.send:88\nmsgid \"You specified both ``file`` and ``files``,     or you specified both ``embed`` and ``embeds``,     or the ``reference`` object is not a :class:`~discord.Message`,     :class:`~discord.MessageReference` or :class:`~discord.PartialMessage`.\"\nmsgstr \"``file`` と ``files`` の両方が指定された場合、 ``embed`` と ``embeds`` の両方が指定された場合、または ``reference`` が :class:`~discord.Message` 、 :class:`~discord.MessageReference` 、 :class:`~discord.PartialMessage` でない場合。\"\n\n#: ../../ext/commands/api.rst:422\nmsgid \"Converters\"\nmsgstr \"コンバーター\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.Converter:1\nmsgid \"The base class of custom converters that require the :class:`.Context` to be passed to be useful.\"\nmsgstr \":class:`.Context` を渡す必要のあるカスタムコンバーターの基底クラス。\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.Converter:4\nmsgid \"This allows you to implement converters that function similar to the special cased ``discord`` classes.\"\nmsgstr \"これにより、スペシャルケースの ``discord`` クラスと似たコンバーターを実装できます。\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.Converter:7\nmsgid \"Classes that derive from this should override the :meth:`~.Converter.convert` method to do its conversion logic. This method must be a :ref:`coroutine <coroutine>`.\"\nmsgstr \"サブクラスは :meth:`~.Converter.convert` メソッドを上書きして変換ロジックを実装すべきです。このメソッドは :ref:`coroutine <coroutine>` でないといけません。\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.Converter.convert:3\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.ObjectConverter.convert:3\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.MemberConverter.convert:3\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.UserConverter.convert:3\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.MessageConverter.convert:3\nmsgid \"The method to override to do conversion logic.\"\nmsgstr \"変換ロジックを行うために上書きすべきメソッド。\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.Converter.convert:5\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.ObjectConverter.convert:5\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.MemberConverter.convert:5\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.UserConverter.convert:5\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.MessageConverter.convert:5\nmsgid \"If an error is found while converting, it is recommended to raise a :exc:`.CommandError` derived exception as it will properly propagate to the error handlers.\"\nmsgstr \"変換中にエラーが発生した場合、エラーハンドラーに適切に伝播させるために :exc:`.CommandError` から派生する例外を送出することをおすすめします。\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.Converter.convert:9\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.ObjectConverter.convert:9\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.MemberConverter.convert:9\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.UserConverter.convert:9\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.MessageConverter.convert:9\nmsgid \"The invocation context that the argument is being used in.\"\nmsgstr \"引数が使用されている呼び出しコンテキスト。\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.Converter.convert:11\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.ObjectConverter.convert:11\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.MemberConverter.convert:11\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.UserConverter.convert:11\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.MessageConverter.convert:11\nmsgid \"The argument that is being converted.\"\nmsgstr \"変換する引数。\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.Converter.convert:14\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.ObjectConverter.convert:14\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.MemberConverter.convert:14\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.UserConverter.convert:14\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.MessageConverter.convert:14\nmsgid \"A generic exception occurred when converting the argument.\"\nmsgstr \"引数変換中に一般的なエラーが発生した場合。\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.Converter.convert:15\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.ObjectConverter.convert:15\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.MemberConverter.convert:15\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.UserConverter.convert:15\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.MessageConverter.convert:15\nmsgid \"The converter failed to convert the argument.\"\nmsgstr \"引数の変換に失敗した場合。\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.ObjectConverter:1\nmsgid \"Converts to a :class:`~discord.Object`.\"\nmsgstr \":class:`~discord.Object` に変換します。\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.ObjectConverter:3\nmsgid \"The argument must follow the valid ID or mention formats (e.g. ``<@80088516616269824>``).\"\nmsgstr \"引数は有効なIDかメンション(例: ``<@80088516616269824>``)でないといけません。\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.ObjectConverter:7\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.MemberConverter:6\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.UserConverter:5\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.MessageConverter:5\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.GuildChannelConverter:6\nmsgid \"The lookup strategy is as follows (in order):\"\nmsgstr \"検索は以下の順で行われます:\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.ObjectConverter:9\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.MemberConverter:8\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.UserConverter:7\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.GuildChannelConverter:8\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.TextChannelConverter:8\nmsgid \"Lookup by ID.\"\nmsgstr \"IDで検索\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.ObjectConverter:10\nmsgid \"Lookup by member, role, or channel mention.\"\nmsgstr \"メンバー、ロール、またはチャネルのメンションで検索。\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.MemberConverter:1\nmsgid \"Converts to a :class:`~discord.Member`.\"\nmsgstr \":class:`~discord.Member` に変換します。\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.MemberConverter:3\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.GuildChannelConverter:3\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.TextChannelConverter:3\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.VoiceChannelConverter:3\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.StageChannelConverter:5\nmsgid \"All lookups are via the local guild. If in a DM context, then the lookup is done by the global cache.\"\nmsgstr \"すべて検索は現在のギルドで行われます。DMでは、グローバルキャッシュが使用されます。\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.MemberConverter:9\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.UserConverter:8\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.GuildChannelConverter:9\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.TextChannelConverter:9\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.VoiceChannelConverter:9\nmsgid \"Lookup by mention.\"\nmsgstr \"メンションで検索\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.MemberConverter:10\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.UserConverter:9\nmsgid \"Lookup by username#discriminator (deprecated).\"\nmsgstr \"\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.MemberConverter:11\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.UserConverter:10\nmsgid \"Lookup by username#0 (deprecated, only gets users that migrated from their discriminator).\"\nmsgstr \"\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.MemberConverter:12\nmsgid \"Lookup by guild nickname.\"\nmsgstr \"\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.MemberConverter:13\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.UserConverter:11\nmsgid \"Lookup by global name.\"\nmsgstr \"\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.MemberConverter:14\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.UserConverter:12\nmsgid \"Lookup by user name.\"\nmsgstr \"\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.MemberConverter:16\nmsgid \"Raise :exc:`.MemberNotFound` instead of generic :exc:`.BadArgument`\"\nmsgstr \"一般的な :exc:`.BadArgument` の代わりに :exc:`.MemberNotFound` を発生させます。\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.MemberConverter:19\nmsgid \"This converter now lazily fetches members from the gateway and HTTP APIs, optionally caching the result if :attr:`.MemberCacheFlags.joined` is enabled.\"\nmsgstr \"このコンバータは、ゲートウェイやHTTP APIからメンバーを取得でき、 :attr:`.MemberCacheFlags.joined` が有効な場合には結果がキャッシュされるようになりました。\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.MemberConverter:23\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.UserConverter:21\nmsgid \"Looking up users by discriminator will be removed in a future version due to the removal of discriminators in an API change.\"\nmsgstr \"\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.UserConverter:1\nmsgid \"Converts to a :class:`~discord.User`.\"\nmsgstr \":class:`~discord.User` に変換します。\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.UserConverter:3\nmsgid \"All lookups are via the global user cache.\"\nmsgstr \"すべての検索はグローバルユーザーキャッシュを介して行われます。\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.UserConverter:14\nmsgid \"Raise :exc:`.UserNotFound` instead of generic :exc:`.BadArgument`\"\nmsgstr \"一般的な :exc:`.BadArgument` の代わりに :exc:`.UserNotFound` を発生させます。\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.UserConverter:17\nmsgid \"This converter now lazily fetches users from the HTTP APIs if an ID is passed and it's not available in cache.\"\nmsgstr \"このコンバータは、ID が渡され、キャッシュされていない場合、HTTP API からユーザーを取得するようになりました。\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.MessageConverter:1\nmsgid \"Converts to a :class:`discord.Message`.\"\nmsgstr \":class:`discord.Message` に変換します。\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.MessageConverter:7\nmsgid \"Lookup by \\\"{channel ID}-{message ID}\\\" (retrieved by shift-clicking on \\\"Copy ID\\\")\"\nmsgstr \"\\\"{チャンネルID}-{メッセージID}\\\" で検索 (\\\"Copy ID\\\" をシフト-クリック)\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.MessageConverter:8\nmsgid \"Lookup by message ID (the message **must** be in the context channel)\"\nmsgstr \"メッセージIDによる検索 (メッセージはコンテキストチャンネル内で **なければなりません**)\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.MessageConverter:9\nmsgid \"Lookup by message URL\"\nmsgstr \"メッセージURLで検索\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.MessageConverter:11\nmsgid \"Raise :exc:`.ChannelNotFound`, :exc:`.MessageNotFound` or :exc:`.ChannelNotReadable` instead of generic :exc:`.BadArgument`\"\nmsgstr \":exc:`.ChannelNotFound`, :exc:`.MessageNotFound` または :exc:`.ChannelNotReadable` を一般的な :exc:`.BadArgument` の代わりに発生します。\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.PartialMessageConverter:1\nmsgid \"Converts to a :class:`discord.PartialMessage`.\"\nmsgstr \":class:`discord.PartialMessage` に変換します。\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.PartialMessageConverter:5\nmsgid \"The creation strategy is as follows (in order):\"\nmsgstr \"作成は以下の順で行われます:\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.PartialMessageConverter:7\nmsgid \"By \\\"{channel ID}-{message ID}\\\" (retrieved by shift-clicking on \\\"Copy ID\\\")\"\nmsgstr \"\\\"{チャンネルID}-{メッセージID}\\\" (\\\"Copy ID\\\" をシフト-クリック)\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.PartialMessageConverter:8\nmsgid \"By message ID (The message is assumed to be in the context channel.)\"\nmsgstr \"メッセージID (メッセージは現在のチャンネル内であると推定されます。)\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.PartialMessageConverter:9\nmsgid \"By message URL\"\nmsgstr \"メッセージURL\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.GuildChannelConverter:1\nmsgid \"Converts to a :class:`~discord.abc.GuildChannel`.\"\nmsgstr \":class:`~discord.abc.GuildChannel` に変換します。\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.GuildChannelConverter:10\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.ThreadConverter:9\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.GuildStickerConverter:9\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.ScheduledEventConverter:10\nmsgid \"Lookup by name.\"\nmsgstr \"名前で検索\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.TextChannelConverter:1\nmsgid \"Converts to a :class:`~discord.TextChannel`.\"\nmsgstr \":class:`~discord.TextChannel` に変換します。\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.TextChannelConverter:10\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.VoiceChannelConverter:10\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.StageChannelConverter:12\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.CategoryChannelConverter:10\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.ForumChannelConverter:10\nmsgid \"Lookup by name\"\nmsgstr \"名前 で検索\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.TextChannelConverter:12\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.VoiceChannelConverter:12\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.CategoryChannelConverter:12\nmsgid \"Raise :exc:`.ChannelNotFound` instead of generic :exc:`.BadArgument`\"\nmsgstr \"一般的な :exc:`.BadArgument` の代わりに :exc:`.ChannelNotFound` を発生させます\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.VoiceChannelConverter:1\nmsgid \"Converts to a :class:`~discord.VoiceChannel`.\"\nmsgstr \":class:`~discord.VoiceChannel` に変換します。\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.StageChannelConverter:1\nmsgid \"Converts to a :class:`~discord.StageChannel`.\"\nmsgstr \":class:`~discord.StageChannel` に変換します。\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.CategoryChannelConverter:1\nmsgid \"Converts to a :class:`~discord.CategoryChannel`.\"\nmsgstr \":class:`~discord.CategoryChannel` に変換します。\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.ForumChannelConverter:1\nmsgid \"Converts to a :class:`~discord.ForumChannel`.\"\nmsgstr \":class:`~discord.ForumChannel` に変換します。\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.InviteConverter:1\nmsgid \"Converts to a :class:`~discord.Invite`.\"\nmsgstr \":class:`~discord.Invite` に変換します。\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.InviteConverter:3\nmsgid \"This is done via an HTTP request using :meth:`.Bot.fetch_invite`.\"\nmsgstr \":meth:`.Bot.fetch_invite` を使用したHTTP リクエストによって行われます。\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.InviteConverter:5\nmsgid \"Raise :exc:`.BadInviteArgument` instead of generic :exc:`.BadArgument`\"\nmsgstr \"一般的な :exc:`.BadArgument` の代わりに :exc:`.BadInviteArgument` を発生させます。\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.GuildConverter:1\nmsgid \"Converts to a :class:`~discord.Guild`.\"\nmsgstr \":class:`~discord.Guild` に変換します。\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.GuildConverter:6\nmsgid \"Lookup by name. (There is no disambiguation for Guilds with multiple matching names).\"\nmsgstr \"名前で検索。(名前が一致するギルドの曖昧さ回避は行われません。)\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.RoleConverter:1\nmsgid \"Converts to a :class:`~discord.Role`.\"\nmsgstr \":class:`~discord.Role` に変換します。\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.RoleConverter:3\nmsgid \"All lookups are via the local guild. If in a DM context, the converter raises :exc:`.NoPrivateMessage` exception.\"\nmsgstr \"すべて検索は現在のギルドで行われます。DMでは、 :exc:`.NoPrivateMessage` 例外が送出されます。\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.RoleConverter:12\nmsgid \"Raise :exc:`.RoleNotFound` instead of generic :exc:`.BadArgument`\"\nmsgstr \"一般的な :exc:`.BadArgument` の代わりに :exc:`.RoleNotFound` を発生させます。\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.GameConverter:1\nmsgid \"Converts to a :class:`~discord.Game`.\"\nmsgstr \":class:`~discord.Game` に変換します。\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.ColourConverter:1\nmsgid \"Converts to a :class:`~discord.Colour`.\"\nmsgstr \":class:`~discord.Colour` に変換します。\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.ColourConverter:3\nmsgid \"Add an alias named ColorConverter\"\nmsgstr \"ColorConverter という名前のエイリアスを追加\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.ColourConverter:6\nmsgid \"The following formats are accepted:\"\nmsgstr \"以下のフォーマットが利用可能です:\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.ColourConverter:8\nmsgid \"``0x<hex>``\"\nmsgstr \"``0x<hex>``\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.ColourConverter:9\nmsgid \"``#<hex>``\"\nmsgstr \"``#<hex>``\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.ColourConverter:10\nmsgid \"``0x#<hex>``\"\nmsgstr \"``0x#<hex>``\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.ColourConverter:11\nmsgid \"``rgb(<number>, <number>, <number>)``\"\nmsgstr \"``rgb(<数値>, <数値>, <数値>)``\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.ColourConverter:12\nmsgid \"Any of the ``classmethod`` in :class:`~discord.Colour`\"\nmsgstr \":class:`~discord.Colour` の ``classmethod`` のどれか\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.ColourConverter:14\nmsgid \"The ``_`` in the name can be optionally replaced with spaces.\"\nmsgstr \"名前の ``_`` は任意でスペースに置き換えることができます。\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.ColourConverter:16\nmsgid \"Like CSS, ``<number>`` can be either 0-255 or 0-100% and ``<hex>`` can be either a 6 digit hex number or a 3 digit hex shortcut (e.g. #fff).\"\nmsgstr \"CSSのように、 ``<number>`` は0-255か0-100%で指定でき、 ``<hex>`` は6桁の16進数表記か3桁のショートカット (例: #fff)で指定できます。\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.ColourConverter:19\nmsgid \"Raise :exc:`.BadColourArgument` instead of generic :exc:`.BadArgument`\"\nmsgstr \"一般的な :exc:`.BadArgument` の代わりに :exc:`.BadColourArgument` を発生させます。\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.ColourConverter:22\nmsgid \"Added support for ``rgb`` function and 3-digit hex shortcuts\"\nmsgstr \"``rgb`` 関数と3桁の16進数ショートカットのサポートを追加しました。\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.EmojiConverter:1\nmsgid \"Converts to a :class:`~discord.Emoji`.\"\nmsgstr \":class:`~discord.Emoji` に変換します。\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.EmojiConverter:3\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.GuildStickerConverter:3\nmsgid \"All lookups are done for the local guild first, if available. If that lookup fails, then it checks the client's global cache.\"\nmsgstr \"すべて検索は利用できる場合まず現在のギルドで行われます。失敗した場合、グローバルキャッシュが使用されます。\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.EmojiConverter:9\nmsgid \"Lookup by extracting ID from the emoji.\"\nmsgstr \"絵文字からIDを抽出して検索。\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.EmojiConverter:12\nmsgid \"Raise :exc:`.EmojiNotFound` instead of generic :exc:`.BadArgument`\"\nmsgstr \"一般的な :exc:`.BadArgument` の代わりに :exc:`.EmojiNotFound` を発生させます。\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.PartialEmojiConverter:1\nmsgid \"Converts to a :class:`~discord.PartialEmoji`.\"\nmsgstr \":class:`~discord.PartialEmoji` に変換します。\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.PartialEmojiConverter:3\nmsgid \"This is done by extracting the animated flag, name and ID from the emoji.\"\nmsgstr \"これは絵文字からアニメーションフラグ、名前、IDを抽出することによって行われます。\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.PartialEmojiConverter:5\nmsgid \"Raise :exc:`.PartialEmojiConversionFailure` instead of generic :exc:`.BadArgument`\"\nmsgstr \"一般的な :exc:`.BadArgument` の代わりに :exc:`.PartialEmojiConversionFailure` を発生させます。\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.ThreadConverter:1\nmsgid \"Converts to a :class:`~discord.Thread`.\"\nmsgstr \":class:`~discord.Thread` に変換します。\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.ThreadConverter:3\nmsgid \"All lookups are via the local guild.\"\nmsgstr \"すべての検索はローカルギルドを経由して行われます。\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.GuildStickerConverter:1\nmsgid \"Converts to a :class:`~discord.GuildSticker`.\"\nmsgstr \":class:`~discord.GuildSticker` に変換します。\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.ScheduledEventConverter:1\nmsgid \"Converts to a :class:`~discord.ScheduledEvent`.\"\nmsgstr \":class:`~discord.ScheduledEvent` に変換します。\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.ScheduledEventConverter:3\nmsgid \"Lookups are done for the local guild if available. Otherwise, for a DM context, lookup is done by the global cache.\"\nmsgstr \"可能な場合は、ローカルギルドに対して検索が行われます。それ以外の場合は、DMコンテキストでは、ルックアップはグローバルキャッシュによって行われます。\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.ScheduledEventConverter:9\nmsgid \"Lookup by url.\"\nmsgstr \"URL で検索する。\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.clean_content:1\nmsgid \"Converts the argument to mention scrubbed version of said content.\"\nmsgstr \"引数を、メンションを削ぎ落とされたコンテンツに変換します。\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.clean_content:4\nmsgid \"This behaves similarly to :attr:`~discord.Message.clean_content`.\"\nmsgstr \"これは :attr:`~discord.Message.clean_content` と同様に動作します。\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.clean_content:8\nmsgid \"Whether to clean channel mentions.\"\nmsgstr \"チャンネルのメンションを削除するかどうか。\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.clean_content:14\nmsgid \"Whether to use nicknames when transforming mentions.\"\nmsgstr \"メンションを変換する際にニックネームを使用するかどうか。\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.clean_content:20\nmsgid \"Whether to also escape special markdown characters.\"\nmsgstr \"特殊なマークダウン文字もエスケープするかどうか。\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.clean_content:26\nmsgid \"Whether to also remove special markdown characters. This option is not supported with ``escape_markdown``\"\nmsgstr \"特殊なマークダウン文字も除去するかどうか。このオプションは ``escape_markdown`` と一緒にはサポートされていません。\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.Greedy:1\nmsgid \"A special converter that greedily consumes arguments until it can't. As a consequence of this behaviour, most input errors are silently discarded, since it is used as an indicator of when to stop parsing.\"\nmsgstr \"できなくなるまで貪欲に引数を消費する特別なコンバータ。 この挙動の結果として、ほとんどの入力エラーは解析をいつ停止するかの指標として使用されるため無視されます。\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.Greedy:5\nmsgid \"When a parser error is met the greedy converter stops converting, undoes the internal string parsing routine, and continues parsing regularly.\"\nmsgstr \"解析エラーに遭遇すると、貪欲なコンバータは変換を停止し、内部の文字列の解析ルーチンを取り消し、通常の解析を続けます。\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.Greedy:8\nmsgid \"For example, in the following code:\"\nmsgstr \"例えば、以下のコードです:\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.Greedy:16\nmsgid \"An invocation of ``[p]test 1 2 3 4 5 6 hello`` would pass ``numbers`` with ``[1, 2, 3, 4, 5, 6]`` and ``reason`` with ``hello``\\\\.\"\nmsgstr \"``[p]test 1 2 3 4 5 6 hello`` で呼び出すと ``numbers`` に ``[1, 2, 3, 4, 5, 6]`` を、 ``reason`` に ``hello`` を渡します。\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.Greedy:19\nmsgid \"For more information, check :ref:`ext_commands_special_converters`.\"\nmsgstr \"詳細については、 :ref:`ext_commands_special_converters` を参照してください。\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.Greedy:23\nmsgid \"For interaction based contexts the conversion error is propagated rather than swallowed due to the difference in user experience with application commands.\"\nmsgstr \"インタラクションベースのコンテキストではアプリケーションコマンドでのユーザーエクスペリエンスの差異のため変換エラーは無視されず伝播されます。\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.Range:1\nmsgid \"A special converter that can be applied to a parameter to require a numeric or string type to fit within the range provided.\"\nmsgstr \"与えられた範囲内に収まる数値または文字列型を必要とするパラメータに適用できる特別なコンバーター。\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.Range:4\nmsgid \"During type checking time this is equivalent to :obj:`typing.Annotated` so type checkers understand the intent of the code.\"\nmsgstr \"型チェック時には型チェッカがコードの意図を理解できるよう :obj:`typing.Annotated` と同様になります。\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.Range:7\nmsgid \"Some example ranges:\"\nmsgstr \"例:\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.Range:9\nmsgid \"``Range[int, 10]`` means the minimum is 10 with no maximum.\"\nmsgstr \"``Range[int, 10]`` は最小値10、最大値なしを意味します。\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.Range:10\nmsgid \"``Range[int, None, 10]`` means the maximum is 10 with no minimum.\"\nmsgstr \"``Range[int, None, 10]`` は最小値なし、最大値10を意味します。\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.Range:11\nmsgid \"``Range[int, 1, 10]`` means the minimum is 1 and the maximum is 10.\"\nmsgstr \"``Range[int, 1, 10]`` は最小値1、最大値10を意味します。\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.Range:12\nmsgid \"``Range[float, 1.0, 5.0]`` means the minimum is 1.0 and the maximum is 5.0.\"\nmsgstr \"\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.Range:13\nmsgid \"``Range[str, 1, 10]`` means the minimum length is 1 and the maximum length is 10.\"\nmsgstr \"\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.Range:15\nmsgid \"Inside a :class:`HybridCommand` this functions equivalently to :class:`discord.app_commands.Range`.\"\nmsgstr \":class:`HybridCommand` 内では、この関数は :class:`discord.app_commands.Range` と同様に動作します。\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.Range:17\nmsgid \"If the value cannot be converted to the provided type or is outside the given range, :class:`~.ext.commands.BadArgument` or :class:`~.ext.commands.RangeError` is raised to the appropriate error handlers respectively.\"\nmsgstr \"もし値が渡された型に変換できず、または指定された範囲外である場合、:class:`~.ext.commands.BadArgument` や :class:`~.ext.commands.RangeError` が適切なエラーハンドラに送出されます。\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.run_converters:3\nmsgid \"Runs converters for a given converter, argument, and parameter.\"\nmsgstr \"指定したコンバータ、引数、パラメータのコンバータを実行します。\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.run_converters:5\nmsgid \"This function does the same work that the library does under the hood.\"\nmsgstr \"この関数は、内部的にはライブラリと同じように動作します。\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.run_converters:9\nmsgid \"The invocation context to run the converters under.\"\nmsgstr \"コンバータを実行する呼び出しコンテキスト。\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.run_converters:11\nmsgid \"The converter to run, this corresponds to the annotation in the function.\"\nmsgstr \"実行するコンバータで、関数の注釈に対応します。\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.run_converters:13\nmsgid \"The argument to convert to.\"\nmsgstr \"変換する引数。\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.run_converters:15\nmsgid \"The parameter being converted. This is mainly for error reporting.\"\nmsgstr \"変換されるパラメータ。これは主にエラー報告用です。\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.run_converters:18\nmsgid \"The converter failed to convert.\"\nmsgstr \"コンバータが変換に失敗しました。\"\n\n#: ../../../discord/ext/commands/converter.py:docstring of discord.ext.commands.converter.run_converters:20\nmsgid \"The resulting conversion.\"\nmsgstr \"変換の結果\"\n\n#: ../../ext/commands/api.rst:550\nmsgid \"Flag Converter\"\nmsgstr \"Flag Converter\"\n\n#: ../../../discord/ext/commands/flags.py:docstring of discord.ext.commands.flags.FlagConverter:1\nmsgid \"A converter that allows for a user-friendly flag syntax.\"\nmsgstr \"ユーザに優しいフラグ構文を可能にするコンバータ。\"\n\n#: ../../../discord/ext/commands/flags.py:docstring of discord.ext.commands.flags.FlagConverter:3\nmsgid \"The flags are defined using :pep:`526` type annotations similar to the :mod:`dataclasses` Python module. For more information on how this converter works, check the appropriate :ref:`documentation <ext_commands_flag_converter>`.\"\nmsgstr \"フラグはPythonモジュールの :mod:`dataclasses` と同様に :pep:`526` の型アノテーションを用いて定義されています。どのようにしてこのコンバータが動作するかの詳細については、当該の :ref:`ドキュメント <ext_commands_flag_converter>` を確認してください。\"\n\n#: ../../../discord/ext/commands/flags.py:docstring of discord.ext.commands.flags.FlagConverter:12\nmsgid \"Returns an iterator of ``(flag_name, flag_value)`` pairs. This allows it to be, for example, constructed as a dict or a list of pairs. Note that aliases are not shown.\"\nmsgstr \"``(flag_name, flag_value)`` ペアのイテレータを返します。 これにより、例えば、辞書型やペアのリストに変換できます。別名は表示されないことに注意してください。\"\n\n#: ../../../discord/ext/commands/flags.py:docstring of discord.ext.commands.flags.FlagConverter:18\nmsgid \"A class parameter to toggle case insensitivity of the flag parsing. If ``True`` then flags are parsed in a case insensitive manner. Defaults to ``False``.\"\nmsgstr \"フラグ解析で大文字と小文字を区別しないようにするクラスパラメータ。 ``True`` の場合、フラグは大文字と小文字を区別しない方法で解析されます。デフォルトは ``False`` です。\"\n\n#: ../../../discord/ext/commands/flags.py:docstring of discord.ext.commands.flags.FlagConverter:22\nmsgid \"The prefix that all flags must be prefixed with. By default there is no prefix.\"\nmsgstr \"すべてのフラグに付いていなければならない接頭辞。デフォルトでは接頭辞はありません。\"\n\n#: ../../../discord/ext/commands/flags.py:docstring of discord.ext.commands.flags.FlagConverter:25\nmsgid \"The delimiter that separates a flag's argument from the flag's name. By default this is ``:``.\"\nmsgstr \"フラグの引数とフラグの名前を区切る区切り文字。デフォルトでは ``:`` です。\"\n\n#: ../../../discord/ext/commands/flags.py:docstring of discord.ext.commands.flags.FlagConverter.get_flags:1\nmsgid \"Dict[:class:`str`, :class:`Flag`]: A mapping of flag name to flag object this converter has.\"\nmsgstr \"Dict[:class:`str`, :class:`Flag`]: このコンバータが持つフラグ名とフラグオブジェクトのマッピング。\"\n\n#: ../../../discord/ext/commands/flags.py:docstring of discord.ext.commands.flags.FlagConverter.convert:3\nmsgid \"The method that actually converters an argument to the flag mapping.\"\nmsgstr \"フラグのマッピングに実際に引数を変換するメソッド。\"\n\n#: ../../../discord/ext/commands/flags.py:docstring of discord.ext.commands.flags.FlagConverter.convert:7\nmsgid \"The argument to convert from.\"\nmsgstr \"変換する引数。\"\n\n#: ../../../discord/ext/commands/flags.py:docstring of discord.ext.commands.flags.FlagConverter.convert:10\nmsgid \"A flag related parsing error.\"\nmsgstr \"フラグ関連の解析エラー。\"\n\n#: ../../../discord/ext/commands/flags.py:docstring of discord.ext.commands.flags.FlagConverter.convert:12\nmsgid \"The flag converter instance with all flags parsed.\"\nmsgstr \"すべての解析済みフラグ付きのフラグコンバータインスタンス。\"\n\n#: ../../../discord/ext/commands/flags.py:docstring of discord.ext.commands.flags.FlagConverter.convert:13\nmsgid \":class:`FlagConverter`\"\nmsgstr \":class:`FlagConverter`\"\n\n#: ../../../discord/ext/commands/flags.py:docstring of discord.ext.commands.flags.Flag:1\nmsgid \"Represents a flag parameter for :class:`FlagConverter`.\"\nmsgstr \":class:`FlagConverter` のフラグパラメータを表します。\"\n\n#: ../../../discord/ext/commands/flags.py:docstring of discord.ext.commands.flags.Flag:3\nmsgid \"The :func:`~discord.ext.commands.flag` function helps create these flag objects, but it is not necessary to do so. These cannot be constructed manually.\"\nmsgstr \":func:`~discord.ext.commands.flag` 関数はこれらのフラグオブジェクトを作成するのに役立ちますが、必須ではありません。これらは手動で構築することはできません。\"\n\n#: ../../../discord/ext/commands/flags.py:docstring of discord.ext.commands.flags.Flag:9\nmsgid \"The name of the flag.\"\nmsgstr \"フラグの名前\"\n\n#: ../../../discord/ext/commands/flags.py:docstring of discord.ext.commands.flags.Flag:15\nmsgid \"The aliases of the flag name.\"\nmsgstr \"フラグ名のエイリアス\"\n\n#: ../../../discord/ext/commands/flags.py:docstring of discord.ext.commands.flags.Flag:21\nmsgid \"The attribute in the class that corresponds to this flag.\"\nmsgstr \"このフラグに対応するクラスの属性。\"\n\n#: ../../../discord/ext/commands/flags.py:docstring of discord.ext.commands.flags.Flag:27\nmsgid \"The default value of the flag, if available.\"\nmsgstr \"利用可能であれば、フラグのデフォルト値。\"\n\n#: ../../../discord/ext/commands/flags.py:docstring of discord.ext.commands.flags.Flag:29\n#: ../../../discord/ext/commands/flags.py:docstring of discord.ext.commands.flags.Flag:35\nmsgid \"Any\"\nmsgstr \"Any\"\n\n#: ../../../discord/ext/commands/flags.py:docstring of discord.ext.commands.flags.Flag:33\nmsgid \"The underlying evaluated annotation of the flag.\"\nmsgstr \"基礎評価済みのフラグのアノテーション。\"\n\n#: ../../../discord/ext/commands/flags.py:docstring of discord.ext.commands.flags.Flag:39\nmsgid \"The maximum number of arguments the flag can accept. A negative value indicates an unlimited amount of arguments.\"\nmsgstr \"フラグが受け付けられる引数の最大数。負の値は、引数の量が無制限であることを示します。\"\n\n#: ../../../discord/ext/commands/flags.py:docstring of discord.ext.commands.flags.Flag:46\nmsgid \"Whether multiple given values overrides the previous value.\"\nmsgstr \"指定された重複する値が前の値を上書きするかどうか。\"\n\n#: ../../../discord/ext/commands/flags.py:docstring of discord.ext.commands.flags.Flag:52\n#: ../../../discord/ext/commands/flags.py:docstring of discord.ext.commands.flags.flag:22\nmsgid \"The description of the flag. Shown for hybrid commands when they're used as application commands.\"\nmsgstr \"フラグの説明。ハイブリッドコマンドがアプリケーションコマンドとして使用されたときに表示されます。\"\n\n#: ../../../discord/ext/commands/flags.py:docstring of discord.ext.commands.Flag.required:1\nmsgid \"Whether the flag is required.\"\nmsgstr \"フラグが必須かどうか。\"\n\n#: ../../../discord/ext/commands/flags.py:docstring of discord.ext.commands.Flag.required:3\nmsgid \"A required flag has no default value.\"\nmsgstr \"必須フラグにはデフォルト値はありません。\"\n\n#: ../../../discord/ext/commands/flags.py:docstring of discord.ext.commands.flags.flag:1\nmsgid \"Override default functionality and parameters of the underlying :class:`FlagConverter` class attributes.\"\nmsgstr \":class:`FlagConverter` クラス属性のデフォルトの機能とパラメータを上書きします。\"\n\n#: ../../../discord/ext/commands/flags.py:docstring of discord.ext.commands.flags.flag:4\nmsgid \"The flag name. If not given, defaults to the attribute name.\"\nmsgstr \"フラグ名。指定しない場合、デフォルトでは属性名です。\"\n\n#: ../../../discord/ext/commands/flags.py:docstring of discord.ext.commands.flags.flag:6\nmsgid \"Aliases to the flag name. If not given no aliases are set.\"\nmsgstr \"フラグ名の別名。渡されない場合別名は設定されません。\"\n\n#: ../../../discord/ext/commands/flags.py:docstring of discord.ext.commands.flags.flag:8\nmsgid \"The default parameter. This could be either a value or a callable that takes :class:`Context` as its sole parameter. If not given then it defaults to the default value given to the attribute.\"\nmsgstr \"デフォルトパラメータ。これは値または :class:`Context` を引数として取る呼び出し可能オブジェクトでないといけません。指定されていない場合は、属性の既定値が使用されます。\"\n\n#: ../../../discord/ext/commands/flags.py:docstring of discord.ext.commands.flags.flag:12\nmsgid \"The maximum number of arguments the flag can accept. A negative value indicates an unlimited amount of arguments. The default value depends on the annotation given.\"\nmsgstr \"フラグが受け付けられる最大の引数の数。負数を渡した場合は何個でも引数を渡せることを示します。 デフォルト値は与えられたアノテーションによって異なります。\"\n\n#: ../../../discord/ext/commands/flags.py:docstring of discord.ext.commands.flags.flag:16\nmsgid \"Whether multiple given values overrides the previous value. The default value depends on the annotation given.\"\nmsgstr \"複数の値が与えられた場合に前の値を上書きするかどうか。デフォルト値は与えられたアノテーションによって異なります。\"\n\n#: ../../../discord/ext/commands/flags.py:docstring of discord.ext.commands.flags.flag:19\nmsgid \"The converter to use for this flag. This replaces the annotation at runtime which is transparent to type checkers.\"\nmsgstr \"このフラグに使用するコンバーター。実行時にアノテーションを置き換えます。これは型チェッカに対して透過的です。\"\n\n#: ../../ext/commands/api.rst:566\nmsgid \"Defaults\"\nmsgstr \"既定値\"\n\n#: ../../../discord/ext/commands/parameters.py:docstring of discord.ext.commands.parameters.Parameter:1\nmsgid \"A class that stores information on a :class:`Command`\\\\'s parameter.\"\nmsgstr \":class:`Command` のパラメータに関する情報を格納するクラス。\"\n\n#: ../../../discord/ext/commands/parameters.py:docstring of discord.ext.commands.parameters.Parameter:3\nmsgid \"This is a subclass of :class:`inspect.Parameter`.\"\nmsgstr \":class:`inspect.Parameter` のサブクラスです。\"\n\n#: ../../../discord/ext/commands/parameters.py:docstring of discord.ext.commands.parameters.Parameter.replace:1\nmsgid \"Creates a customized copy of the Parameter.\"\nmsgstr \"パラメータのカスタマイズされたコピーを返します。\"\n\n#: ../../../discord/ext/commands/parameters.py:docstring of discord.ext.commands.Parameter.name:1\nmsgid \"The parameter's name.\"\nmsgstr \"パラメータの名前。\"\n\n#: ../../../discord/ext/commands/parameters.py:docstring of discord.ext.commands.Parameter.kind:1\nmsgid \"The parameter's kind.\"\nmsgstr \"パラメータの種類。\"\n\n#: ../../../discord/ext/commands/parameters.py:docstring of discord.ext.commands.Parameter.default:1\nmsgid \"The parameter's default.\"\nmsgstr \"パラメータの既定値。\"\n\n#: ../../../discord/ext/commands/parameters.py:docstring of discord.ext.commands.Parameter.annotation:1\nmsgid \"The parameter's annotation.\"\nmsgstr \"パラメータのアノテーション。\"\n\n#: ../../../discord/ext/commands/parameters.py:docstring of discord.ext.commands.Parameter.required:1\nmsgid \"Whether this parameter is required.\"\nmsgstr \"パラメータが必須かどうか。\"\n\n#: ../../../discord/ext/commands/parameters.py:docstring of discord.ext.commands.Parameter.converter:1\nmsgid \"The converter that should be used for this parameter.\"\nmsgstr \"このパラメータに使用すべきコンバーター。\"\n\n#: ../../../discord/ext/commands/parameters.py:docstring of discord.ext.commands.Parameter.description:1\n#: ../../../discord/ext/commands/parameters.py:docstring of discord.ext.commands.parameters.parameter:20\nmsgid \"The description of this parameter.\"\nmsgstr \"このパラメータの説明。\"\n\n#: ../../../discord/ext/commands/parameters.py:docstring of discord.ext.commands.Parameter.displayed_default:1\nmsgid \"The displayed default in :class:`Command.signature`.\"\nmsgstr \":class:`Command.signature` で表示される既定値。\"\n\n#: ../../../discord/ext/commands/parameters.py:docstring of discord.ext.commands.Parameter.displayed_name:1\n#: ../../../discord/ext/commands/parameters.py:docstring of discord.ext.commands.parameters.parameter:24\nmsgid \"The name that is displayed to the user.\"\nmsgstr \"\"\n\n#: ../../../discord/ext/commands/parameters.py:docstring of discord.ext.commands.parameters.Parameter.get_default:3\nmsgid \"Gets this parameter's default value.\"\nmsgstr \"このパラメータの既定値を取得します。\"\n\n#: ../../../discord/ext/commands/parameters.py:docstring of discord.ext.commands.parameters.Parameter.get_default:5\nmsgid \"The invocation context that is used to get the default argument.\"\nmsgstr \"引数の既定値を取得するために使用される呼び出しコンテキスト。\"\n\n#: ../../../discord/ext/commands/parameters.py:docstring of discord.ext.commands.parameters.parameter:1\nmsgid \"A way to assign custom metadata for a :class:`Command`\\\\'s parameter.\"\nmsgstr \":class:`Command` のパラメータにカスタムメタデータを割り当てる方法。\"\n\n#: ../../../discord/ext/commands/parameters.py:docstring of discord.ext.commands.parameters.parameter:7\nmsgid \"A custom default can be used to have late binding behaviour.\"\nmsgstr \"カスタムの既定値を指定すると、既定値を動的に指定できます。\"\n\n#: ../../../discord/ext/commands/parameters.py:docstring of discord.ext.commands.parameters.parameter:15\nmsgid \"The converter to use for this parameter, this replaces the annotation at runtime which is transparent to type checkers.\"\nmsgstr \"このフラグに使用するコンバーター。実行時にアノテーションを置き換えます。これは型チェッカに対して透過的です。\"\n\n#: ../../../discord/ext/commands/parameters.py:docstring of discord.ext.commands.parameters.parameter:17\nmsgid \"The default value for the parameter, if this is a :term:`callable` or a |coroutine_link|_ it is called with a positional :class:`Context` argument.\"\nmsgstr \"パラメータの既定値。これが :term:`callable` か |coroutine_link|_ の場合これは位置指定の :class:`Context` 引数を渡して呼び出されます。\"\n\n#: ../../../discord/ext/commands/parameters.py:docstring of discord.ext.commands.parameters.parameter:22\nmsgid \"The displayed default in :attr:`Command.signature`.\"\nmsgstr \":attr:`Command.signature` で表示される既定値。\"\n\n#: ../../../discord/ext/commands/parameters.py:docstring of discord.ext.commands.parameters.parameter:1\nmsgid \"param(\\\\*, converter=..., default=..., description=..., displayed_default=..., displayed_name=...)\"\nmsgstr \"\"\n\n#: ../../../discord/ext/commands/parameters.py:docstring of discord.ext.commands.parameters.parameter:3\nmsgid \"An alias for :func:`parameter`.\"\nmsgstr \":func:`parameter` のエイリアス。\"\n\n#: ../../ext/commands/api.rst:579\nmsgid \"A default :class:`Parameter` which returns the :attr:`~.Context.author` for this context.\"\nmsgstr \"このコンテキストの :attr:`~.Context.author` を返すデフォルト :class:`Parameter` 。\"\n\n#: ../../ext/commands/api.rst:585\nmsgid \"A default :class:`Parameter` which returns the :attr:`~.Context.channel` for this context.\"\nmsgstr \"このコンテキストの :attr:`~.Context.channel` を返すデフォルト :class:`Parameter` 。\"\n\n#: ../../ext/commands/api.rst:591\nmsgid \"A default :class:`Parameter` which returns the :attr:`~.Context.guild` for this context. This will never be ``None``. If the command is called in a DM context then :exc:`~discord.ext.commands.NoPrivateMessage` is raised to the error handlers.\"\nmsgstr \"このコンテキストの :attr:`~.Context.guild` を返すデフォルト :class:`Parameter` 。これは ``None`` にはなりません。コマンドがDM内で呼び出された場合は :exc:`~discord.ext.commands.NoPrivateMessage` がエラーハンドラに送出されます。\"\n\n#: ../../ext/commands/api.rst:598\nmsgid \"Exceptions\"\nmsgstr \"例外\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.CommandError:1\nmsgid \"The base exception type for all command related errors.\"\nmsgstr \"コマンドに関連するエラーすべての基礎となる例外。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.CommandError:3\nmsgid \"This inherits from :exc:`discord.DiscordException`.\"\nmsgstr \"これは :exc:`discord.DiscordException` を継承しています。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.CommandError:5\nmsgid \"This exception and exceptions inherited from it are handled in a special way as they are caught and passed into a special event from :class:`.Bot`\\\\, :func:`.on_command_error`.\"\nmsgstr \"この例外及び、ここから継承された例外は、キャッチされると :class:`.Bot` の :func:`.on_command_error` に渡され、特別な方法で処理されます。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.ConversionError:1\nmsgid \"Exception raised when a Converter class raises non-CommandError.\"\nmsgstr \"Converter クラスで、CommandErrorではない例外が発生した際に、発生する例外。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.ConversionError:3\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.CommandNotFound:7\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.UserInputError:4\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.MaxConcurrencyReached:3\nmsgid \"This inherits from :exc:`CommandError`.\"\nmsgstr \"これは :exc:`CommandError` から継承されます。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.ConversionError:7\nmsgid \"The converter that failed.\"\nmsgstr \"失敗したコンバーター。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.ConversionError:9\nmsgid \":class:`discord.ext.commands.Converter`\"\nmsgstr \":class:`discord.ext.commands.Converter`\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.ConversionError:13\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.CommandInvokeError:7\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.BadFlagArgument:21\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.ExtensionFailed:13\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.HybridCommandError:9\nmsgid \"The original exception that was raised. You can also get this via the ``__cause__`` attribute.\"\nmsgstr \"Converter内で発生した元の例外。 ``__cause__`` からも取得できます。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.ConversionError:16\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.CommandInvokeError:10\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.ExtensionFailed:16\nmsgid \":exc:`Exception`\"\nmsgstr \":exc:`Exception`\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.MissingRequiredArgument:1\nmsgid \"Exception raised when parsing a command and a parameter that is required is not encountered.\"\nmsgstr \"コマンドのパラメータ解析の際、要求されたパラメータに値が渡されていない場合に発生します。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.MissingRequiredArgument:4\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.MissingRequiredAttachment:4\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.BadArgument:4\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.BadUnionArgument:4\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.BadLiteralArgument:4\nmsgid \"This inherits from :exc:`UserInputError`\"\nmsgstr \"これは :exc:`UserInputError` から継承されます。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.MissingRequiredArgument:8\nmsgid \"The argument that is missing.\"\nmsgstr \"不足している引数\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.MissingRequiredArgument:10\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.MissingRequiredAttachment:12\nmsgid \":class:`Parameter`\"\nmsgstr \":class:`Parameter`\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.MissingRequiredAttachment:1\nmsgid \"Exception raised when parsing a command and a parameter that requires an attachment is not given.\"\nmsgstr \"コマンドのパラメータ解析の際、添付ファイルを必要とするパラメータが与えられていない場合に発生します。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.MissingRequiredAttachment:10\nmsgid \"The argument that is missing an attachment.\"\nmsgstr \"添付ファイルがない引数。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.ArgumentParsingError:1\nmsgid \"An exception raised when the parser fails to parse a user's input.\"\nmsgstr \"パーサーがユーザーの入力の解析に失敗したときに発生する例外。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.ArgumentParsingError:3\nmsgid \"This inherits from :exc:`UserInputError`.\"\nmsgstr \"これは :exc:`UserInputError` から継承されます。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.ArgumentParsingError:5\nmsgid \"There are child classes that implement more granular parsing errors for i18n purposes.\"\nmsgstr \"i18n のためにより細かい解析エラーを実装するサブクラスがあります。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.UnexpectedQuoteError:1\nmsgid \"An exception raised when the parser encounters a quote mark inside a non-quoted string.\"\nmsgstr \"パーサーが引用符で囲まれていない文字列の中で引用符に遭遇したときに発生する例外。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.UnexpectedQuoteError:3\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.InvalidEndOfQuotedStringError:4\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.ExpectedClosingQuoteError:3\nmsgid \"This inherits from :exc:`ArgumentParsingError`.\"\nmsgstr \"これは :exc:`ArgumentParsingError` から継承されます。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.UnexpectedQuoteError:7\nmsgid \"The quote mark that was found inside the non-quoted string.\"\nmsgstr \"引用符で囲まれていない文字列の中に見つかった引用符。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.InvalidEndOfQuotedStringError:1\nmsgid \"An exception raised when a space is expected after the closing quote in a string but a different character is found.\"\nmsgstr \"文字列の引用符が閉じられた後に空白が期待されるとき、別の文字が見つかった場合の例外。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.InvalidEndOfQuotedStringError:8\nmsgid \"The character found instead of the expected string.\"\nmsgstr \"期待される文字列の代わりに見つかった文字。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.ExpectedClosingQuoteError:1\nmsgid \"An exception raised when a quote character is expected but not found.\"\nmsgstr \"引用符が期待されているが見つからない場合に発生する例外。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.ExpectedClosingQuoteError:7\nmsgid \"The quote character expected.\"\nmsgstr \"期待された引用符。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.BadArgument:1\nmsgid \"Exception raised when a parsing or conversion failure is encountered on an argument to pass into a command.\"\nmsgstr \"コマンドの引数に渡された値の解析、または変換に失敗した場合に発生する例外。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.BadUnionArgument:1\nmsgid \"Exception raised when a :data:`typing.Union` converter fails for all its associated types.\"\nmsgstr \":data:`typing.Union` コンバーターが対応するすべての型に対して失敗した場合に発生する例外。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.BadUnionArgument:8\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.BadLiteralArgument:10\nmsgid \"The parameter that failed being converted.\"\nmsgstr \"変換に失敗したパラメータ。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.BadUnionArgument:10\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.BadLiteralArgument:12\nmsgid \":class:`inspect.Parameter`\"\nmsgstr \":class:`inspect.Parameter`\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.BadUnionArgument:14\nmsgid \"A tuple of converters attempted in conversion, in order of failure.\"\nmsgstr \"変換しようとして失敗したコンバーターの、失敗した順のタプル。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.BadUnionArgument:16\nmsgid \"Tuple[Type, ``...``]\"\nmsgstr \"Tuple[Type, ``...``]\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.BadUnionArgument:20\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.BadLiteralArgument:22\nmsgid \"A list of errors that were caught from failing the conversion.\"\nmsgstr \"変換失敗時に捕捉されたエラーのリスト。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.BadUnionArgument:22\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.BadLiteralArgument:24\nmsgid \"List[:class:`CommandError`]\"\nmsgstr \"List[:class:`CommandError`]\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.BadLiteralArgument:1\nmsgid \"Exception raised when a :data:`typing.Literal` converter fails for all its associated values.\"\nmsgstr \":data:`typing.Literal` コンバーターが対応するすべての値に対して失敗した場合に発生する例外。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.BadLiteralArgument:16\nmsgid \"A tuple of values compared against in conversion, in order of failure.\"\nmsgstr \"比較が失敗した値の、失敗した順のタプル。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.BadLiteralArgument:18\nmsgid \"Tuple[Any, ``...``]\"\nmsgstr \"Tuple[Any, ``...``]\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.BadLiteralArgument:28\nmsgid \"The argument's value that failed to be converted. Defaults to an empty string.\"\nmsgstr \"\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.PrivateMessageOnly:1\nmsgid \"Exception raised when an operation does not work outside of private message contexts.\"\nmsgstr \"プライベートメッセージコンテキスト外で、要求された処理が実行できない場合に発生する例外。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.PrivateMessageOnly:4\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.NoPrivateMessage:4\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.NotOwner:3\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.MissingPermissions:4\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.BotMissingPermissions:4\nmsgid \"This inherits from :exc:`CheckFailure`\"\nmsgstr \"これは :exc:`CheckFailure` から継承されます。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.NoPrivateMessage:1\nmsgid \"Exception raised when an operation does not work in private message contexts.\"\nmsgstr \"プライベートメッセージコンテキストで、要求された処理が実行できない場合に発生する例外。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.CheckFailure:1\nmsgid \"Exception raised when the predicates in :attr:`.Command.checks` have failed.\"\nmsgstr \":attr:`.Command.checks` のチェックが失敗した場合に発生する例外。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.CheckFailure:3\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.DisabledCommand:3\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.CommandInvokeError:3\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.CommandOnCooldown:3\nmsgid \"This inherits from :exc:`CommandError`\"\nmsgstr \"これは :exc:`CommandError` から継承されます。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.CheckAnyFailure:1\nmsgid \"Exception raised when all predicates in :func:`check_any` fail.\"\nmsgstr \":func:`check_any` のチェックがすべて失敗した場合に発生する例外。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.CheckAnyFailure:3\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.NSFWChannelRequired:3\nmsgid \"This inherits from :exc:`CheckFailure`.\"\nmsgstr \"これは :exc:`CheckFailure` から継承されます。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.CheckAnyFailure:9\nmsgid \"A list of errors that were caught during execution.\"\nmsgstr \"実行時に捕捉されたエラーのリスト。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.CheckAnyFailure:11\nmsgid \"List[:class:`CheckFailure`]\"\nmsgstr \"List[:class:`CheckFailure`]\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.CheckAnyFailure:15\nmsgid \"A list of check predicates that failed.\"\nmsgstr \"失敗したチェックのリスト。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.CheckAnyFailure:17\nmsgid \"List[Callable[[:class:`Context`], :class:`bool`]]\"\nmsgstr \"List[Callable[[:class:`Context`], :class:`bool`]]\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.CommandNotFound:1\nmsgid \"Exception raised when a command is attempted to be invoked but no command under that name is found.\"\nmsgstr \"コマンドを呼び出す際に、指定された名前を持つコマンドが存在していなかった場合に発生する例外。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.CommandNotFound:4\nmsgid \"This is not raised for invalid subcommands, rather just the initial main command that is attempted to be invoked.\"\nmsgstr \"これは無効なサブコマンドに対して発生するのではなく、呼び出されようとした最初のメインコマンドに対し発生します。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.DisabledCommand:1\nmsgid \"Exception raised when the command being invoked is disabled.\"\nmsgstr \"呼び出そうとしたコマンドが無効化されていた際に発生する例外。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.CommandInvokeError:1\nmsgid \"Exception raised when the command being invoked raised an exception.\"\nmsgstr \"呼び出そうとしたコマンドが例外を送出した場合に発生する例外。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.TooManyArguments:1\nmsgid \"Exception raised when the command was passed too many arguments and its :attr:`.Command.ignore_extra` attribute was not set to ``True``.\"\nmsgstr \"コマンドに過剰の引数が渡され、 :attr:`.Command.ignore_extra` 属性が ``True`` でない場合に発生する例外。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.UserInputError:1\nmsgid \"The base exception type for errors that involve errors regarding user input.\"\nmsgstr \"ユーザー入力の誤りに関するエラーの基礎例外タイプ。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.CommandOnCooldown:1\nmsgid \"Exception raised when the command being invoked is on cooldown.\"\nmsgstr \"呼び出そうとしたコマンドがクールダウン中の場合に発生する例外。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.CommandOnCooldown:7\nmsgid \"A class with attributes ``rate`` and ``per`` similar to the :func:`.cooldown` decorator.\"\nmsgstr \":func:`.cooldown` デコレータに似た ``rate`` と ``per`` 属性を持つクラス。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.CommandOnCooldown:10\nmsgid \":class:`~discord.app_commands.Cooldown`\"\nmsgstr \":class:`~discord.app_commands.Cooldown`\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.CommandOnCooldown:14\nmsgid \"The type associated with the cooldown.\"\nmsgstr \"クールダウンに関連付けられたタイプ。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.CommandOnCooldown:16\nmsgid \":class:`BucketType`\"\nmsgstr \":class:`BucketType`\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.CommandOnCooldown:20\nmsgid \"The amount of seconds to wait before you can retry again.\"\nmsgstr \"再試行する前に待たないといけない秒数。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.MaxConcurrencyReached:1\nmsgid \"Exception raised when the command being invoked has reached its maximum concurrency.\"\nmsgstr \"呼び出そうとしたコマンドがその最大同時実行数に達している場合に発生する例外。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.MaxConcurrencyReached:7\nmsgid \"The maximum number of concurrent invokers allowed.\"\nmsgstr \"同時に実行できる最大の数。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.MaxConcurrencyReached:13\nmsgid \"The bucket type passed to the :func:`.max_concurrency` decorator.\"\nmsgstr \":func:`.max_concurrency` デコレータに渡されたバケットタイプ。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.MaxConcurrencyReached:15\nmsgid \":class:`.BucketType`\"\nmsgstr \":class:`.BucketType`\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.NotOwner:1\nmsgid \"Exception raised when the message author is not the owner of the bot.\"\nmsgstr \"メッセージ送信者がボットの所有者でない場合に発生する例外。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.MessageNotFound:1\nmsgid \"Exception raised when the message provided was not found in the channel.\"\nmsgstr \"渡されたメッセージがチャンネル内に見つからなかったときに発生する例外。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.MessageNotFound:3\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.MemberNotFound:4\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.GuildNotFound:3\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.UserNotFound:4\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.ChannelNotFound:3\nmsgid \"This inherits from :exc:`BadArgument`\"\nmsgstr \"これは :exc:`BadArgument` から継承されます。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.MessageNotFound:9\nmsgid \"The message supplied by the caller that was not found\"\nmsgstr \"呼び出し元から渡された、見つからなかったメッセージ。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.MemberNotFound:1\nmsgid \"Exception raised when the member provided was not found in the bot's cache.\"\nmsgstr \"渡されたメンバーがボットのキャッシュ内に見つからなかったときに発生する例外。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.MemberNotFound:10\nmsgid \"The member supplied by the caller that was not found\"\nmsgstr \"呼び出し元から渡された、見つからなかったメンバー。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.GuildNotFound:1\nmsgid \"Exception raised when the guild provided was not found in the bot's cache.\"\nmsgstr \"渡されたギルドがボットのキャッシュ内に見つからなかったときに発生する例外。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.GuildNotFound:9\nmsgid \"The guild supplied by the called that was not found\"\nmsgstr \"呼び出し元から渡された、見つからなかったギルド。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.UserNotFound:1\nmsgid \"Exception raised when the user provided was not found in the bot's cache.\"\nmsgstr \"渡されたユーザーがボットのキャッシュ内に見つからなかったときに発生する例外。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.UserNotFound:10\nmsgid \"The user supplied by the caller that was not found\"\nmsgstr \"呼び出し元から渡された、見つからなかったユーザー。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.ChannelNotFound:1\nmsgid \"Exception raised when the bot can not find the channel.\"\nmsgstr \"ボットがチャンネルを見つけられない場合に発生する例外。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.ChannelNotFound:9\nmsgid \"The channel supplied by the caller that was not found\"\nmsgstr \"呼び出し元から渡された、見つからなかったチャンネル。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.ChannelNotFound:11\nmsgid \"Union[:class:`int`, :class:`str`]\"\nmsgstr \"Union[:class:`int`, :class:`str`]\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.ChannelNotReadable:1\nmsgid \"Exception raised when the bot does not have permission to read messages in the channel.\"\nmsgstr \"ボットがチャンネル内のメッセージを読み取る権限がない場合に発生する例外。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.ChannelNotReadable:10\nmsgid \"The channel supplied by the caller that was not readable\"\nmsgstr \"呼び出し元から渡された、閲覧できないチャンネル。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.ChannelNotReadable:12\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.NSFWChannelRequired:11\nmsgid \"Union[:class:`.abc.GuildChannel`, :class:`.Thread`]\"\nmsgstr \"Union[:class:`.abc.GuildChannel`, :class:`.Thread`]\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.ThreadNotFound:1\nmsgid \"Exception raised when the bot can not find the thread.\"\nmsgstr \"ボットがスレッドを見つけられない場合に発生する例外。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.ThreadNotFound:9\nmsgid \"The thread supplied by the caller that was not found\"\nmsgstr \"呼び出し元から渡された、見つからなかったスレッド。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.BadColourArgument:1\nmsgid \"Exception raised when the colour is not valid.\"\nmsgstr \"色が有効でない場合に発生する例外。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.BadColourArgument:9\nmsgid \"The colour supplied by the caller that was not valid\"\nmsgstr \"呼び出し元から渡された、無効な色。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.RoleNotFound:1\nmsgid \"Exception raised when the bot can not find the role.\"\nmsgstr \"ボットがロールを見つけられない場合に発生する例外。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.RoleNotFound:9\nmsgid \"The role supplied by the caller that was not found\"\nmsgstr \"呼び出し元から渡された、見つからなかったロール。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.BadInviteArgument:1\nmsgid \"Exception raised when the invite is invalid or expired.\"\nmsgstr \"招待が無効または期限切れの場合に発生する例外。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.BadInviteArgument:9\nmsgid \"The invite supplied by the caller that was not valid\"\nmsgstr \"呼び出し元から渡された、無効な招待。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.EmojiNotFound:1\nmsgid \"Exception raised when the bot can not find the emoji.\"\nmsgstr \"ボットが絵文字を見つけられない場合に発生する例外。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.EmojiNotFound:9\nmsgid \"The emoji supplied by the caller that was not found\"\nmsgstr \"呼び出し元から渡された、見つからなかった絵文字。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.PartialEmojiConversionFailure:1\nmsgid \"Exception raised when the emoji provided does not match the correct format.\"\nmsgstr \"渡された絵文字が正しい形式でない場合に発生する例外。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.PartialEmojiConversionFailure:10\nmsgid \"The emoji supplied by the caller that did not match the regex\"\nmsgstr \"呼び出し元から渡された、正規表現にマッチしない絵文字。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.GuildStickerNotFound:1\nmsgid \"Exception raised when the bot can not find the sticker.\"\nmsgstr \"ボットがスタンプを見つけられない場合に発生する例外。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.GuildStickerNotFound:9\nmsgid \"The sticker supplied by the caller that was not found\"\nmsgstr \"呼び出し元から渡された、見つからなかったスタンプ。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.ScheduledEventNotFound:1\nmsgid \"Exception raised when the bot can not find the scheduled event.\"\nmsgstr \"ボットがスケジュールイベントを見つけられない場合に発生する例外。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.ScheduledEventNotFound:9\nmsgid \"The event supplied by the caller that was not found\"\nmsgstr \"呼び出し元から渡された、見つからなかったスケジュールイベント。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.BadBoolArgument:1\nmsgid \"Exception raised when a boolean argument was not convertable.\"\nmsgstr \"真偽値の引数が変換可能でない場合に発生する例外。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.BadBoolArgument:9\nmsgid \"The boolean argument supplied by the caller that is not in the predefined list\"\nmsgstr \"呼び出し元から渡された、事前に定義されたリスト内にない真偽値の引数の値。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.RangeError:1\nmsgid \"Exception raised when an argument is out of range.\"\nmsgstr \"引数が範囲外の場合に発生する例外。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.RangeError:9\nmsgid \"The minimum value expected or ``None`` if there wasn't one\"\nmsgstr \"期待された最小値。存在しない場合 ``None`` です。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.RangeError:11\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.RangeError:17\nmsgid \"Optional[Union[:class:`int`, :class:`float`]]\"\nmsgstr \"Optional[Union[:class:`int`, :class:`float`]]\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.RangeError:15\nmsgid \"The maximum value expected or ``None`` if there wasn't one\"\nmsgstr \"期待された最大値。存在しない場合 ``None`` です。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.RangeError:21\nmsgid \"The value that was out of range.\"\nmsgstr \"範囲外であった値。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.RangeError:23\nmsgid \"Union[:class:`int`, :class:`float`, :class:`str`]\"\nmsgstr \"Union[:class:`int`, :class:`float`, :class:`str`]\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.MissingPermissions:1\nmsgid \"Exception raised when the command invoker lacks permissions to run a command.\"\nmsgstr \"コマンド実行者がコマンドを実行する権限を持っていない場合に発生する例外。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.MissingPermissions:8\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.BotMissingPermissions:8\nmsgid \"The required permissions that are missing.\"\nmsgstr \"有していない必要な権限。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.BotMissingPermissions:1\nmsgid \"Exception raised when the bot's member lacks permissions to run a command.\"\nmsgstr \"ボットのメンバーがコマンドを実行する権限を持っていない場合に発生する例外。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.MissingRole:1\nmsgid \"Exception raised when the command invoker lacks a role to run a command.\"\nmsgstr \"コマンド実行者がコマンドを実行するためのロールを持っていない場合に発生する例外。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.MissingRole:9\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.BotMissingRole:9\nmsgid \"The required role that is missing. This is the parameter passed to :func:`~.commands.has_role`.\"\nmsgstr \"見つからなかった必須のロール。これは :func:`~.commands.has_role` に渡されたパラメータと同一です。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.MissingRole:12\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.BotMissingRole:12\nmsgid \"Union[:class:`str`, :class:`int`]\"\nmsgstr \"Union[:class:`str`, :class:`int`]\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.BotMissingRole:1\nmsgid \"Exception raised when the bot's member lacks a role to run a command.\"\nmsgstr \"ボットのメンバーがコマンドを実行するためのロールを持っていない場合に発生する例外。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.MissingAnyRole:1\nmsgid \"Exception raised when the command invoker lacks any of the roles specified to run a command.\"\nmsgstr \"コマンド実行者がコマンドを実行するためのロールをどれも持っていない場合に発生する例外。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.MissingAnyRole:10\nmsgid \"The roles that the invoker is missing. These are the parameters passed to :func:`~.commands.has_any_role`.\"\nmsgstr \"見つからなかったロール。これは :func:`~.commands.has_any_role` に渡されたパラメータと同一です。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.MissingAnyRole:13\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.BotMissingAnyRole:13\nmsgid \"List[Union[:class:`str`, :class:`int`]]\"\nmsgstr \"List[Union[:class:`str`, :class:`int`]]\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.BotMissingAnyRole:1\nmsgid \"Exception raised when the bot's member lacks any of the roles specified to run a command.\"\nmsgstr \"ボットのメンバーがコマンドを実行するためのロールをどれも持っていない場合に発生する例外。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.BotMissingAnyRole:10\nmsgid \"The roles that the bot's member is missing. These are the parameters passed to :func:`~.commands.has_any_role`.\"\nmsgstr \"見つからなかったロール。これは :func:`~.commands.has_any_role` に渡されたパラメータと同一です。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.NSFWChannelRequired:1\nmsgid \"Exception raised when a channel does not have the required NSFW setting.\"\nmsgstr \"チャンネルに必要な年齢制限設定がない場合に発生する例外。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.NSFWChannelRequired:9\nmsgid \"The channel that does not have NSFW enabled.\"\nmsgstr \"年齢制限が有効になっていないチャンネル。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.FlagError:1\nmsgid \"The base exception type for all flag parsing related errors.\"\nmsgstr \"フラグに関連するエラーすべての基礎となる例外。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.FlagError:3\nmsgid \"This inherits from :exc:`BadArgument`.\"\nmsgstr \"これは :exc:`BadArgument` から継承されます。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.BadFlagArgument:1\nmsgid \"An exception raised when a flag failed to convert a value.\"\nmsgstr \"フラグが値の変換に失敗したときに発生する例外。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.BadFlagArgument:3\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.MissingFlagArgument:3\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.MissingRequiredFlag:3\nmsgid \"This inherits from :exc:`FlagError`\"\nmsgstr \"これは :exc:`FlagError` から継承されます。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.BadFlagArgument:9\nmsgid \"The flag that failed to convert.\"\nmsgstr \"変換に失敗したフラグ。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.BadFlagArgument:11\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.MissingFlagArgument:11\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.TooManyFlags:11\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.MissingRequiredFlag:11\nmsgid \":class:`~discord.ext.commands.Flag`\"\nmsgstr \":class:`~discord.ext.commands.Flag`\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.BadFlagArgument:15\nmsgid \"The argument supplied by the caller that was not able to be converted.\"\nmsgstr \"変換できなかった呼び出し元によって与えられた引数。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.BadFlagArgument:24\nmsgid \":class:`Exception`\"\nmsgstr \":class:`Exception`\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.MissingFlagArgument:1\nmsgid \"An exception raised when a flag did not get a value.\"\nmsgstr \"フラグが値を受け取らなかった場合に発生する例外。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.MissingFlagArgument:9\nmsgid \"The flag that did not get a value.\"\nmsgstr \"値を受け取らなかったフラグ。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.TooManyFlags:1\nmsgid \"An exception raised when a flag has received too many values.\"\nmsgstr \"フラグが過剰な値を受け取った場合に発生する例外。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.TooManyFlags:3\nmsgid \"This inherits from :exc:`FlagError`.\"\nmsgstr \"これは :exc:`FlagError` から継承されます。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.TooManyFlags:9\nmsgid \"The flag that received too many values.\"\nmsgstr \"過剰な値を受け取ったフラグ。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.TooManyFlags:15\nmsgid \"The values that were passed.\"\nmsgstr \"渡された値。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.MissingRequiredFlag:1\nmsgid \"An exception raised when a required flag was not given.\"\nmsgstr \"必須のフラグが渡されなかった場合に発生する例外。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.MissingRequiredFlag:9\nmsgid \"The required flag that was not found.\"\nmsgstr \"見つからなかった必須のフラグ。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.ExtensionError:1\nmsgid \"Base exception for extension related errors.\"\nmsgstr \"エクステンション関連のエラーの基礎例外です。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.ExtensionError:3\nmsgid \"This inherits from :exc:`~discord.DiscordException`.\"\nmsgstr \"これは :exc:`~discord.DiscordException` を継承しています。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.ExtensionError:7\nmsgid \"The extension that had an error.\"\nmsgstr \"エラーが発生したエクステンション。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.ExtensionAlreadyLoaded:1\nmsgid \"An exception raised when an extension has already been loaded.\"\nmsgstr \"エクステンションが既に読み込まれている場合に発生する例外。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.ExtensionAlreadyLoaded:3\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.ExtensionNotLoaded:3\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.NoEntryPointError:3\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.ExtensionFailed:3\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.ExtensionNotFound:3\nmsgid \"This inherits from :exc:`ExtensionError`\"\nmsgstr \"これは :exc:`ExtensionError` から継承されます。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.ExtensionNotLoaded:1\nmsgid \"An exception raised when an extension was not loaded.\"\nmsgstr \"エクステンションが読み込まれていない場合に発生する例外。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.NoEntryPointError:1\nmsgid \"An exception raised when an extension does not have a ``setup`` entry point function.\"\nmsgstr \"エクステンションに ``setup`` エントリーポイント関数が存在しない場合に発生する例外。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.ExtensionFailed:1\nmsgid \"An exception raised when an extension failed to load during execution of the module or ``setup`` entry point.\"\nmsgstr \"モジュールまたは ``setup`` エントリーポイントの実行中にエクステンションの読み込みに失敗した場合に発生する例外。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.ExtensionFailed:7\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.ExtensionNotFound:10\nmsgid \"The extension that had the error.\"\nmsgstr \"エラーが発生したエクステンション。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.ExtensionNotFound:1\nmsgid \"An exception raised when an extension is not found.\"\nmsgstr \"エクステンションが見つからなかった場合に発生する例外。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.ExtensionNotFound:5\nmsgid \"Made the ``original`` attribute always None.\"\nmsgstr \"``original`` 属性を常に None にしました。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.CommandRegistrationError:1\nmsgid \"An exception raised when the command can't be added because the name is already taken by a different command.\"\nmsgstr \"コマンドが別のコマンドによって既に使用されているためコマンドが追加できない場合に発生する例外。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.CommandRegistrationError:4\nmsgid \"This inherits from :exc:`discord.ClientException`\"\nmsgstr \"これは :exc:`discord.ClientException` を継承しています。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.CommandRegistrationError:10\nmsgid \"The command name that had the error.\"\nmsgstr \"エラーの原因となったコマンド名。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.CommandRegistrationError:16\nmsgid \"Whether the name that conflicts is an alias of the command we try to add.\"\nmsgstr \"競合する名前が追加しようとしたコマンドの別名であるか。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.HybridCommandError:1\nmsgid \"An exception raised when a :class:`~discord.ext.commands.HybridCommand` raises an :exc:`~discord.app_commands.AppCommandError` derived exception that could not be sufficiently converted to an equivalent :exc:`CommandError` exception.\"\nmsgstr \":class:`~discord.ext.commands.HybridCommand` が :exc:`CommandError` 相当の例外に変換できない :exc:`~discord.app_commands.AppCommandError` 派生の例外を送出したときの例外。\"\n\n#: ../../../discord/ext/commands/errors.py:docstring of discord.ext.commands.errors.HybridCommandError:12\nmsgid \":exc:`~discord.app_commands.AppCommandError`\"\nmsgstr \":exc:`~discord.app_commands.AppCommandError`\"\n\n#: ../../ext/commands/api.rst:779\nmsgid \"Exception Hierarchy\"\nmsgstr \"例外の階層構造\"\n\n#: ../../ext/commands/api.rst:840\nmsgid \":exc:`~.DiscordException`\"\nmsgstr \":exc:`~.DiscordException`\"\n\n#: ../../ext/commands/api.rst:834\nmsgid \":exc:`~.commands.CommandError`\"\nmsgstr \":exc:`~.commands.CommandError`\"\n\n#: ../../ext/commands/api.rst:785\nmsgid \":exc:`~.commands.ConversionError`\"\nmsgstr \":exc:`~.commands.ConversionError`\"\n\n#: ../../ext/commands/api.rst:816\nmsgid \":exc:`~.commands.UserInputError`\"\nmsgstr \":exc:`~.commands.UserInputError`\"\n\n#: ../../ext/commands/api.rst:787\nmsgid \":exc:`~.commands.MissingRequiredArgument`\"\nmsgstr \":exc:`~.commands.MissingRequiredArgument`\"\n\n#: ../../ext/commands/api.rst:788\nmsgid \":exc:`~.commands.MissingRequiredAttachment`\"\nmsgstr \":exc:`~.commands.MissingRequiredAttachment`\"\n\n#: ../../ext/commands/api.rst:789\nmsgid \":exc:`~.commands.TooManyArguments`\"\nmsgstr \":exc:`~.commands.TooManyArguments`\"\n\n#: ../../ext/commands/api.rst:810\nmsgid \":exc:`~.commands.BadArgument`\"\nmsgstr \":exc:`~.commands.BadArgument`\"\n\n#: ../../ext/commands/api.rst:791\nmsgid \":exc:`~.commands.MessageNotFound`\"\nmsgstr \":exc:`~.commands.MessageNotFound`\"\n\n#: ../../ext/commands/api.rst:792\nmsgid \":exc:`~.commands.MemberNotFound`\"\nmsgstr \":exc:`~.commands.MemberNotFound`\"\n\n#: ../../ext/commands/api.rst:793\nmsgid \":exc:`~.commands.GuildNotFound`\"\nmsgstr \":exc:`~.commands.GuildNotFound`\"\n\n#: ../../ext/commands/api.rst:794\nmsgid \":exc:`~.commands.UserNotFound`\"\nmsgstr \":exc:`~.commands.UserNotFound`\"\n\n#: ../../ext/commands/api.rst:795\nmsgid \":exc:`~.commands.ChannelNotFound`\"\nmsgstr \":exc:`~.commands.ChannelNotFound`\"\n\n#: ../../ext/commands/api.rst:796\nmsgid \":exc:`~.commands.ChannelNotReadable`\"\nmsgstr \":exc:`~.commands.ChannelNotReadable`\"\n\n#: ../../ext/commands/api.rst:797\nmsgid \":exc:`~.commands.BadColourArgument`\"\nmsgstr \":exc:`~.commands.BadColourArgument`\"\n\n#: ../../ext/commands/api.rst:798\nmsgid \":exc:`~.commands.RoleNotFound`\"\nmsgstr \":exc:`~.commands.RoleNotFound`\"\n\n#: ../../ext/commands/api.rst:799\nmsgid \":exc:`~.commands.BadInviteArgument`\"\nmsgstr \":exc:`~.commands.BadInviteArgument`\"\n\n#: ../../ext/commands/api.rst:800\nmsgid \":exc:`~.commands.EmojiNotFound`\"\nmsgstr \":exc:`~.commands.EmojiNotFound`\"\n\n#: ../../ext/commands/api.rst:801\nmsgid \":exc:`~.commands.GuildStickerNotFound`\"\nmsgstr \":exc:`~.commands.GuildStickerNotFound`\"\n\n#: ../../ext/commands/api.rst:802\nmsgid \":exc:`~.commands.ScheduledEventNotFound`\"\nmsgstr \":exc:`~.commands.ScheduledEventNotFound`\"\n\n#: ../../ext/commands/api.rst:803\nmsgid \":exc:`~.commands.PartialEmojiConversionFailure`\"\nmsgstr \":exc:`~.commands.PartialEmojiConversionFailure`\"\n\n#: ../../ext/commands/api.rst:804\nmsgid \":exc:`~.commands.BadBoolArgument`\"\nmsgstr \":exc:`~.commands.BadBoolArgument`\"\n\n#: ../../ext/commands/api.rst:805\nmsgid \":exc:`~.commands.RangeError`\"\nmsgstr \":exc:`~.commands.RangeError`\"\n\n#: ../../ext/commands/api.rst:806\nmsgid \":exc:`~.commands.ThreadNotFound`\"\nmsgstr \":exc:`~.commands.ThreadNotFound`\"\n\n#: ../../ext/commands/api.rst:810\nmsgid \":exc:`~.commands.FlagError`\"\nmsgstr \":exc:`~.commands.FlagError`\"\n\n#: ../../ext/commands/api.rst:808\nmsgid \":exc:`~.commands.BadFlagArgument`\"\nmsgstr \":exc:`~.commands.BadFlagArgument`\"\n\n#: ../../ext/commands/api.rst:809\nmsgid \":exc:`~.commands.MissingFlagArgument`\"\nmsgstr \":exc:`~.commands.MissingFlagArgument`\"\n\n#: ../../ext/commands/api.rst:810\nmsgid \":exc:`~.commands.TooManyFlags`\"\nmsgstr \":exc:`~.commands.TooManyFlags`\"\n\n#: ../../ext/commands/api.rst:811\nmsgid \":exc:`~.commands.MissingRequiredFlag`\"\nmsgstr \":exc:`~.commands.MissingRequiredFlag`\"\n\n#: ../../ext/commands/api.rst:812\nmsgid \":exc:`~.commands.BadUnionArgument`\"\nmsgstr \":exc:`~.commands.BadUnionArgument`\"\n\n#: ../../ext/commands/api.rst:813\nmsgid \":exc:`~.commands.BadLiteralArgument`\"\nmsgstr \":exc:`~.commands.BadLiteralArgument`\"\n\n#: ../../ext/commands/api.rst:816\nmsgid \":exc:`~.commands.ArgumentParsingError`\"\nmsgstr \":exc:`~.commands.ArgumentParsingError`\"\n\n#: ../../ext/commands/api.rst:815\nmsgid \":exc:`~.commands.UnexpectedQuoteError`\"\nmsgstr \":exc:`~.commands.UnexpectedQuoteError`\"\n\n#: ../../ext/commands/api.rst:816\nmsgid \":exc:`~.commands.InvalidEndOfQuotedStringError`\"\nmsgstr \":exc:`~.commands.InvalidEndOfQuotedStringError`\"\n\n#: ../../ext/commands/api.rst:817\nmsgid \":exc:`~.commands.ExpectedClosingQuoteError`\"\nmsgstr \":exc:`~.commands.ExpectedClosingQuoteError`\"\n\n#: ../../ext/commands/api.rst:818\nmsgid \":exc:`~.commands.CommandNotFound`\"\nmsgstr \":exc:`~.commands.CommandNotFound`\"\n\n#: ../../ext/commands/api.rst:829\nmsgid \":exc:`~.commands.CheckFailure`\"\nmsgstr \":exc:`~.commands.CheckFailure`\"\n\n#: ../../ext/commands/api.rst:820\nmsgid \":exc:`~.commands.CheckAnyFailure`\"\nmsgstr \":exc:`~.commands.CheckAnyFailure`\"\n\n#: ../../ext/commands/api.rst:821\nmsgid \":exc:`~.commands.PrivateMessageOnly`\"\nmsgstr \":exc:`~.commands.PrivateMessageOnly`\"\n\n#: ../../ext/commands/api.rst:822\nmsgid \":exc:`~.commands.NoPrivateMessage`\"\nmsgstr \":exc:`~.commands.NoPrivateMessage`\"\n\n#: ../../ext/commands/api.rst:823\nmsgid \":exc:`~.commands.NotOwner`\"\nmsgstr \":exc:`~.commands.NotOwner`\"\n\n#: ../../ext/commands/api.rst:824\nmsgid \":exc:`~.commands.MissingPermissions`\"\nmsgstr \":exc:`~.commands.MissingPermissions`\"\n\n#: ../../ext/commands/api.rst:825\nmsgid \":exc:`~.commands.BotMissingPermissions`\"\nmsgstr \":exc:`~.commands.BotMissingPermissions`\"\n\n#: ../../ext/commands/api.rst:826\nmsgid \":exc:`~.commands.MissingRole`\"\nmsgstr \":exc:`~.commands.MissingRole`\"\n\n#: ../../ext/commands/api.rst:827\nmsgid \":exc:`~.commands.BotMissingRole`\"\nmsgstr \":exc:`~.commands.BotMissingRole`\"\n\n#: ../../ext/commands/api.rst:828\nmsgid \":exc:`~.commands.MissingAnyRole`\"\nmsgstr \":exc:`~.commands.MissingAnyRole`\"\n\n#: ../../ext/commands/api.rst:829\nmsgid \":exc:`~.commands.BotMissingAnyRole`\"\nmsgstr \":exc:`~.commands.BotMissingAnyRole`\"\n\n#: ../../ext/commands/api.rst:830\nmsgid \":exc:`~.commands.NSFWChannelRequired`\"\nmsgstr \":exc:`~.commands.NSFWChannelRequired`\"\n\n#: ../../ext/commands/api.rst:831\nmsgid \":exc:`~.commands.DisabledCommand`\"\nmsgstr \":exc:`~.commands.DisabledCommand`\"\n\n#: ../../ext/commands/api.rst:832\nmsgid \":exc:`~.commands.CommandInvokeError`\"\nmsgstr \":exc:`~.commands.CommandInvokeError`\"\n\n#: ../../ext/commands/api.rst:833\nmsgid \":exc:`~.commands.CommandOnCooldown`\"\nmsgstr \":exc:`~.commands.CommandOnCooldown`\"\n\n#: ../../ext/commands/api.rst:834\nmsgid \":exc:`~.commands.MaxConcurrencyReached`\"\nmsgstr \":exc:`~.commands.MaxConcurrencyReached`\"\n\n#: ../../ext/commands/api.rst:835\nmsgid \":exc:`~.commands.HybridCommandError`\"\nmsgstr \":exc:`~.commands.HybridCommandError`\"\n\n#: ../../ext/commands/api.rst:840\nmsgid \":exc:`~.commands.ExtensionError`\"\nmsgstr \":exc:`~.commands.ExtensionError`\"\n\n#: ../../ext/commands/api.rst:837\nmsgid \":exc:`~.commands.ExtensionAlreadyLoaded`\"\nmsgstr \":exc:`~.commands.ExtensionAlreadyLoaded`\"\n\n#: ../../ext/commands/api.rst:838\nmsgid \":exc:`~.commands.ExtensionNotLoaded`\"\nmsgstr \":exc:`~.commands.ExtensionNotLoaded`\"\n\n#: ../../ext/commands/api.rst:839\nmsgid \":exc:`~.commands.NoEntryPointError`\"\nmsgstr \":exc:`~.commands.NoEntryPointError`\"\n\n#: ../../ext/commands/api.rst:840\nmsgid \":exc:`~.commands.ExtensionFailed`\"\nmsgstr \":exc:`~.commands.ExtensionFailed`\"\n\n#: ../../ext/commands/api.rst:841\nmsgid \":exc:`~.commands.ExtensionNotFound`\"\nmsgstr \":exc:`~.commands.ExtensionNotFound`\"\n\n#: ../../ext/commands/api.rst:842\nmsgid \":exc:`~.ClientException`\"\nmsgstr \":exc:`~.ClientException`\"\n\n#: ../../ext/commands/api.rst:843\nmsgid \":exc:`~.commands.CommandRegistrationError`\"\nmsgstr \":exc:`~.commands.CommandRegistrationError`\"\n\n"
  },
  {
    "path": "docs/locale/ja/LC_MESSAGES/ext/commands/cogs.po",
    "content": "msgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: discordpy\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2023-06-21 01:17+0000\\n\"\n\"PO-Revision-Date: 2023-06-21 01:20\\n\"\n\"Last-Translator: \\n\"\n\"Language-Team: Japanese\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Plural-Forms: nplurals=1; plural=0;\\n\"\n\"X-Crowdin-Project: discordpy\\n\"\n\"X-Crowdin-Project-ID: 362783\\n\"\n\"X-Crowdin-Language: ja\\n\"\n\"X-Crowdin-File: /ext/commands/cogs.pot\\n\"\n\"X-Crowdin-File-ID: 60\\n\"\n\"Language: ja_JP\\n\"\n\n#: ../../ext/commands/cogs.rst:6\nmsgid \"Cogs\"\nmsgstr \"コグ\"\n\n#: ../../ext/commands/cogs.rst:8\nmsgid \"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.\"\nmsgstr \"Bot開発においてコマンドやリスナー、いくつかの状態を一つのクラスにまとめてしまいたい場合があるでしょう。コグはそれを実現したものです。\"\n\n#: ../../ext/commands/cogs.rst:10\nmsgid \"The gist:\"\nmsgstr \"要旨:\"\n\n#: ../../ext/commands/cogs.rst:12\nmsgid \"Each cog is a Python class that subclasses :class:`.commands.Cog`.\"\nmsgstr \"すべてのコグは :class:`.commands.Cog` を継承したPythonクラスです。\"\n\n#: ../../ext/commands/cogs.rst:13\nmsgid \"Every command is marked with the :func:`.commands.command` decorator.\"\nmsgstr \"すべてのコマンドは :func:`.commands.command` デコレータで装飾されます。\"\n\n#: ../../ext/commands/cogs.rst:14\nmsgid \"Every hybrid command is marked with the :func:`.commands.hybrid_command` decorator.\"\nmsgstr \"すべてのハイブリッドコマンドは :func:`.commands.hybrid_command` デコレータで装飾されます。\"\n\n#: ../../ext/commands/cogs.rst:15\nmsgid \"Every listener is marked with the :meth:`.commands.Cog.listener` decorator.\"\nmsgstr \"すべてのリスナーは :meth:`.commands.Cog.listener` デコレータで装飾されます。\"\n\n#: ../../ext/commands/cogs.rst:16\nmsgid \"Cogs are then registered with the :meth:`.Bot.add_cog` call.\"\nmsgstr \"コグは :meth:`.Bot.add_cog` を呼び出して登録します。\"\n\n#: ../../ext/commands/cogs.rst:17\nmsgid \"Cogs are subsequently removed with the :meth:`.Bot.remove_cog` call.\"\nmsgstr \"コグは :meth:`.Bot.remove_cog` を呼び出すことで除去されます。\"\n\n#: ../../ext/commands/cogs.rst:19\nmsgid \"It should be noted that cogs are typically used alongside with :ref:`ext_commands_extensions`.\"\nmsgstr \"コグは :ref:`ext_commands_extensions` とともに使用されるのが一般的であることを覚えておきましょう。\"\n\n#: ../../ext/commands/cogs.rst:22\nmsgid \"Quick Example\"\nmsgstr \"簡単な例\"\n\n#: ../../ext/commands/cogs.rst:24\nmsgid \"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>`.\"\nmsgstr \"この例で紹介するコグは ``hello`` という名前の :ref:`command <ext_commands_commands>` と、 :ref:`Event <discord-api-events>` を受信するリスナーを実装した ``Greetings`` という名前のコマンドカテゴリを定義しています。\"\n\n#: ../../ext/commands/cogs.rst:49\nmsgid \"A couple of technical notes to take into consideration:\"\nmsgstr \"考慮すべき二つのテクニカルノート:\"\n\n#: ../../ext/commands/cogs.rst:51\nmsgid \"All listeners must be explicitly marked via decorator, :meth:`~.commands.Cog.listener`.\"\nmsgstr \"すべてのリスナーは :meth:`~.commands.Cog.listener` で明示的に装飾する必要があります。\"\n\n#: ../../ext/commands/cogs.rst:52\nmsgid \"The name of the cog is automatically derived from the class name but can be overridden. See :ref:`ext_commands_cogs_meta_options`.\"\nmsgstr \"コグの名前は、自動的にクラスの名前が引用されますが、上書きも可能です。 :ref:`ext_commands_cogs_meta_options` を参照してください。\"\n\n#: ../../ext/commands/cogs.rst:53\nmsgid \"All commands must now take a ``self`` parameter to allow usage of instance attributes that can be used to maintain state.\"\nmsgstr \"すべてのコマンドは状態を保持するインスタンスの属性を使用するために ``self`` パラメータを持つ必要があります。\"\n\n#: ../../ext/commands/cogs.rst:56\nmsgid \"Cog Registration\"\nmsgstr \"コグの登録\"\n\n#: ../../ext/commands/cogs.rst:58\nmsgid \"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.\"\nmsgstr \"コグを定義したら、Botにコグを登録する処理が必要になります。 :meth:`~.commands.Bot.add_cog` メソッドを用いて登録ができます。\"\n\n#: ../../ext/commands/cogs.rst:64\nmsgid \"This binds the cog to the bot, adding all commands and listeners to the bot automatically.\"\nmsgstr \"これはコグとボットを紐づけ、すべてのコマンドとリスナーを自動的にボットに追加します。\"\n\n#: ../../ext/commands/cogs.rst:66\nmsgid \"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.\"\nmsgstr \"コグを名前で参照している点に注意してください。これは :ref:`ext_commands_cogs_meta_options` で上書きが可能です。そのため、後でコグを除去したい場合は、次の処理を行う必要があります。\"\n\n#: ../../ext/commands/cogs.rst:73\nmsgid \"Using Cogs\"\nmsgstr \"コグの使用\"\n\n#: ../../ext/commands/cogs.rst:75\nmsgid \"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:\"\nmsgstr \"コグを名前で除去するのと同様に、名前でコグを検索することもできます。これによってコグをデータ共有のためのコマンド間通信プロトコルとして使うことができます。例えば:\"\n\n#: ../../ext/commands/cogs.rst:110\nmsgid \"Special Methods\"\nmsgstr \"特殊なメソッド\"\n\n#: ../../ext/commands/cogs.rst:112\nmsgid \"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.\"\nmsgstr \"コグが複雑化し、多くのコマンドを持つようになるにつれ、コグあるいはBot全体の挙動をカスタマイズしたくなることがあります。\"\n\n#: ../../ext/commands/cogs.rst:114\nmsgid \"They are as follows:\"\nmsgstr \"そのための特殊なメソッドは以下のとおりです:\"\n\n#: ../../ext/commands/cogs.rst:116\nmsgid \":meth:`.Cog.cog_load`\"\nmsgstr \":meth:`.Cog.cog_load`\"\n\n#: ../../ext/commands/cogs.rst:117\nmsgid \":meth:`.Cog.cog_unload`\"\nmsgstr \":meth:`.Cog.cog_unload`\"\n\n#: ../../ext/commands/cogs.rst:118\nmsgid \":meth:`.Cog.cog_check`\"\nmsgstr \":meth:`.Cog.cog_check`\"\n\n#: ../../ext/commands/cogs.rst:119\nmsgid \":meth:`.Cog.cog_command_error`\"\nmsgstr \":meth:`.Cog.cog_command_error`\"\n\n#: ../../ext/commands/cogs.rst:120\nmsgid \":meth:`.Cog.cog_before_invoke`\"\nmsgstr \":meth:`.Cog.cog_before_invoke`\"\n\n#: ../../ext/commands/cogs.rst:121\nmsgid \":meth:`.Cog.cog_after_invoke`\"\nmsgstr \":meth:`.Cog.cog_after_invoke`\"\n\n#: ../../ext/commands/cogs.rst:122\nmsgid \":meth:`.Cog.bot_check`\"\nmsgstr \":meth:`.Cog.bot_check`\"\n\n#: ../../ext/commands/cogs.rst:123\nmsgid \":meth:`.Cog.bot_check_once`\"\nmsgstr \":meth:`.Cog.bot_check_once`\"\n\n#: ../../ext/commands/cogs.rst:125\nmsgid \"You can visit the reference to get more detail.\"\nmsgstr \"詳細はリファレンスを参照してください。\"\n\n#: ../../ext/commands/cogs.rst:130\nmsgid \"Meta Options\"\nmsgstr \"メタオプション\"\n\n#: ../../ext/commands/cogs.rst:132\nmsgid \"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:\"\nmsgstr \"コグの中核にはメタクラスである :class:`.commands.CogMeta` が存在します。これにはいくつかの挙動を変更ができる様々なオプションが用意されています。オプションを使用する際はキーワード引数をクラス定義の行で渡します。例えば、コグの名前を変更する場合はキーワード引数 ``name`` を次のように渡します。\"\n\n#: ../../ext/commands/cogs.rst:139\nmsgid \"To see more options that you can set, see the documentation of :class:`.commands.CogMeta`.\"\nmsgstr \"設定可能な他のオプションについては :class:`.commands.CogMeta` のドキュメントを参照してください。\"\n\n#: ../../ext/commands/cogs.rst:142\nmsgid \"Inspection\"\nmsgstr \"インスペクション\"\n\n#: ../../ext/commands/cogs.rst:144\nmsgid \"Since cogs ultimately are classes, we have some tools to help us inspect certain properties of the cog.\"\nmsgstr \"コグは究極的にはクラスのため、コグの特定のプロパティを調べるのに役立つツールがいくつか用意されています。\"\n\n#: ../../ext/commands/cogs.rst:147\nmsgid \"To get a :class:`list` of commands, we can use :meth:`.Cog.get_commands`. ::\"\nmsgstr \":meth:`.Cog.get_commands` を使うことで、コマンドの :class:`list` を取得できます。\"\n\n#: ../../ext/commands/cogs.rst:153\nmsgid \"If we want to get the subcommands as well, we can use the :meth:`.Cog.walk_commands` generator. ::\"\nmsgstr \"サブコマンドを取得したい場合は :meth:`.Cog.walk_commands` ジェネレータを使うことができます。\"\n\n#: ../../ext/commands/cogs.rst:157\nmsgid \"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. ::\"\nmsgstr \"これと同様の処理をリスナーで行う場合は、 :meth:`.Cog.get_listeners` が使用できます。これはタプルのリストを返します -- 最初の要素がリスナーの名前で、二つ目の要素が関数そのものです。\"\n\n"
  },
  {
    "path": "docs/locale/ja/LC_MESSAGES/ext/commands/commands.po",
    "content": "msgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: discordpy\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2023-06-21 01:17+0000\\n\"\n\"PO-Revision-Date: 2023-06-21 01:20\\n\"\n\"Last-Translator: \\n\"\n\"Language-Team: Japanese\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Plural-Forms: nplurals=1; plural=0;\\n\"\n\"X-Crowdin-Project: discordpy\\n\"\n\"X-Crowdin-Project-ID: 362783\\n\"\n\"X-Crowdin-Language: ja\\n\"\n\"X-Crowdin-File: /ext/commands/commands.pot\\n\"\n\"X-Crowdin-File-ID: 64\\n\"\n\"Language: ja_JP\\n\"\n\n#: ../../ext/commands/commands.rst:6\nmsgid \"Commands\"\nmsgstr \"コマンド\"\n\n#: ../../ext/commands/commands.rst:8\nmsgid \"One of the most appealing aspects 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.\"\nmsgstr \"コマンド拡張の最も魅力的な機能の一つは、簡単にコマンドが定義でき、かつそのコマンドを好きなようにネスト状にして、豊富なサブコマンドを用意することができる点です。\"\n\n#: ../../ext/commands/commands.rst:11\nmsgid \"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.\"\nmsgstr \"コマンドは、Pythonの関数と関連付けすることによって定義され、同様のシグネチャを使用してユーザーに呼び出されます。\"\n\n#: ../../ext/commands/commands.rst:16\nmsgid \"You must have access to the :attr:`~discord.Intents.message_content` intent for the commands extension to function. This must be set both in the developer portal and within your code.\"\nmsgstr \"コマンド拡張機能が機能するには、 :attr:`~discord.Intents.message_content` インテントが必要です。これは、デベロッパーポータルとコード内の両方で有効化しないといけません。\"\n\n#: ../../ext/commands/commands.rst:19\nmsgid \"Failure to do this will result in your bot not responding to any of your commands.\"\nmsgstr \"そうしない場合は、ボットはコマンドに応答しなくなります。\"\n\n#: ../../ext/commands/commands.rst:21\nmsgid \"For example, in the given command definition:\"\nmsgstr \"例えば、次のコマンド定義を使うと次のようになります。\"\n\n#: ../../ext/commands/commands.rst:29\nmsgid \"With the following prefix (``$``), it would be invoked by the user via:\"\nmsgstr \"接頭辞を (``$``) としたとすると、このコマンドは次のように実行できます。\"\n\n#: ../../ext/commands/commands.rst:35\nmsgid \"A command must always have at least one parameter, ``ctx``, which is the :class:`.Context` as the first one.\"\nmsgstr \"コマンドには、少なくとも :class:`.Context` を渡すための引数 ``ctx`` が必要です。\"\n\n#: ../../ext/commands/commands.rst:37\nmsgid \"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.\"\nmsgstr \"コマンドを登録するには二通りの方法があります。一つ目は :meth:`.Bot.command` を使用する方法で、二つ目が :func:`~ext.commands.command` デコレータを使用して :meth:`.Bot.add_command` でインスタンスにコマンドを追加していく方法です。\"\n\n#: ../../ext/commands/commands.rst:41\nmsgid \"Essentially, these two are equivalent: ::\"\nmsgstr \"本質的に、これら2つは同等になります: ::\"\n\n#: ../../ext/commands/commands.rst:63\nmsgid \"Since the :meth:`.Bot.command` decorator is shorter and easier to comprehend, it will be the one used throughout the documentation here.\"\nmsgstr \":meth:`.Bot.command` が簡単かつ理解がしやすいので、ドキュメント上ではこちらを使っています。\"\n\n#: ../../ext/commands/commands.rst:66\nmsgid \"Any parameter that is accepted by the :class:`~discord.ext.commands.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:\"\nmsgstr \":class:`~discord.ext.commands.Command` のコンストラクタの引数はデコレータに渡すことで利用できます。例えば、コマンドの名前を関数以外のものへと変更したい場合は以下のように簡単に設定することができます。\"\n\n#: ../../ext/commands/commands.rst:76\nmsgid \"Parameters\"\nmsgstr \"パラメータ\"\n\n#: ../../ext/commands/commands.rst:78\nmsgid \"Since we define commands by making Python functions, we also define the argument passing behaviour by the function parameters.\"\nmsgstr \"Pythonの関数定義によって、同時にコマンドを定義するので、関数のパラメータを設定することにより、コマンドの引数受け渡し動作も定義することができます。\"\n\n#: ../../ext/commands/commands.rst:81\nmsgid \"Certain parameter types do different things in the user side and most forms of parameter types are supported.\"\nmsgstr \"特定のパラメータタイプはユーザーサイドで異なる動作を行い、そしてほとんどの形式のパラメータタイプがサポートされています。\"\n\n#: ../../ext/commands/commands.rst:84\nmsgid \"Positional\"\nmsgstr \"位置パラメータ\"\n\n#: ../../ext/commands/commands.rst:86\nmsgid \"The most basic form of parameter passing is the positional parameter. This is where we pass a parameter as-is:\"\nmsgstr \"最も基本的な引数は位置パラメータです。与えられた値をそのまま渡します。\"\n\n#: ../../ext/commands/commands.rst:95\nmsgid \"On the bot using side, you can provide positional arguments by just passing a regular string:\"\nmsgstr \"Botの使用者側は、通常の文字列を渡すだけで位置パラメータに値を渡すことができます。\"\n\n#: ../../ext/commands/commands.rst:99\nmsgid \"To make use of a word with spaces in between, you should quote it:\"\nmsgstr \"間に空白を含む文字列を渡す場合は、文字列を引用符で囲む必要があります。\"\n\n#: ../../ext/commands/commands.rst:103\nmsgid \"As a note of warning, if you omit the quotes, you will only get the first word:\"\nmsgstr \"引用符を用いなかった場合、最初の文字列のみが渡されます。\"\n\n#: ../../ext/commands/commands.rst:107\nmsgid \"Since positional arguments are just regular Python arguments, you can have as many as you want:\"\nmsgstr \"位置パラメータは、Pythonの引数と同じものなので、好きなだけ設定することが可能です。\"\n\n#: ../../ext/commands/commands.rst:116\nmsgid \"Variable\"\nmsgstr \"可変長引数\"\n\n#: ../../ext/commands/commands.rst:118\nmsgid \"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:\"\nmsgstr \"場合によっては、可変長のパラメータを設定したい場合もあるでしょう。このライブラリはPythonの可変長パラメータと同様にこれをサポートしています。\"\n\n#: ../../ext/commands/commands.rst:128\nmsgid \"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.\"\nmsgstr \"これによって一つ、あるいは複数の引数を受け取ることができます。ただし、引数を渡す際の挙動は位置パラメータと同様のため、複数の単語を含む文字列は引用符で囲む必要があります。\"\n\n#: ../../ext/commands/commands.rst:131\nmsgid \"For example, on the bot side:\"\nmsgstr \"例えば、ボット側ではこのように動きます。\"\n\n#: ../../ext/commands/commands.rst:135\nmsgid \"If the user wants to input a multi-word argument, they have to quote it like earlier:\"\nmsgstr \"複数単語の文字列を渡す際は、引用符で囲んでください。\"\n\n#: ../../ext/commands/commands.rst:139\nmsgid \"Do note that similar to the Python function behaviour, a user can technically pass no arguments at all:\"\nmsgstr \"Pythonの振る舞いと同様に、ユーザーは引数なしの状態を渡すことも一応できます。\"\n\n#: ../../ext/commands/commands.rst:144\nmsgid \"Since the ``args`` variable is a :class:`py:tuple`, you can do anything you would usually do with one.\"\nmsgstr \"``args`` 変数は :class:`py:tuple` となるため、通常のタプルと同様の操作が行なえます。\"\n\n#: ../../ext/commands/commands.rst:148\nmsgid \"Keyword-Only Arguments\"\nmsgstr \"キーワード引数\"\n\n#: ../../ext/commands/commands.rst:150\nmsgid \"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:\"\nmsgstr \"引数の構文解析を自分で行う場合や、複数単語の入力を引用符で囲む必要のないようにしたい場合は、渡された値を単一の引数として受け取るようにライブラリに求めることができます。以下のコードのようにキーワード引数のみを使用することでこれが可能になります。\"\n\n#: ../../ext/commands/commands.rst:162\nmsgid \"You can only have one keyword-only argument due to parsing ambiguities.\"\nmsgstr \"解析が曖昧になるため、キーワード引数は一つまでしか扱えません。\"\n\n#: ../../ext/commands/commands.rst:164\nmsgid \"On the bot side, we do not need to quote input with spaces:\"\nmsgstr \"ボット側では、スペースを含む入力を引用符で囲む必要がありません:\"\n\n#: ../../ext/commands/commands.rst:168\nmsgid \"Do keep in mind that wrapping it in quotes leaves it as-is:\"\nmsgstr \"引用符で囲んだ場合、消えずに残るので注意してください:\"\n\n#: ../../ext/commands/commands.rst:172\nmsgid \"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.\"\nmsgstr \"通常、キーワード引数は利便性のために空白文字で分割されます。この動作はデコレータの引数として :attr:`.Command.rest_is_raw` を使うことで切り替えることが可能です。\"\n\n#: ../../ext/commands/commands.rst:178\nmsgid \"Invocation Context\"\nmsgstr \"呼び出しコンテキスト\"\n\n#: ../../ext/commands/commands.rst:180\nmsgid \"As seen earlier, every command must take at least a single parameter, called the :class:`~ext.commands.Context`.\"\nmsgstr \"前述の通り、すべてのコマンドは必ず :class:`~ext.commands.Context` と呼ばれるパラメータを受け取らなければいけません。\"\n\n#: ../../ext/commands/commands.rst:182\nmsgid \"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:\"\nmsgstr \"このパラメータにより、「呼び出しコンテキスト」というものにアクセスできます。言うなればコマンドがどのように実行されたのかを知るのに必要な基本的情報です。これにはたくさんの有用な情報が含まれています。\"\n\n#: ../../ext/commands/commands.rst:185\nmsgid \":attr:`.Context.guild` returns the :class:`Guild` of the command, if any.\"\nmsgstr \"存在する場合、:attr:`.Context.guild` は、コマンドの :class:`Guild` を返します。\"\n\n#: ../../ext/commands/commands.rst:186\nmsgid \":attr:`.Context.message` returns the :class:`Message` of the command.\"\nmsgstr \":attr:`.Context.message` は、コマンドの :class:`Message` を返します。\"\n\n#: ../../ext/commands/commands.rst:187\nmsgid \":attr:`.Context.author` returns the :class:`Member` or :class:`User` that called the command.\"\nmsgstr \":attr:`.Context.author` は、 コマンドを呼び出した :class:`Member` または :class:`User` を返します。\"\n\n#: ../../ext/commands/commands.rst:188\nmsgid \":meth:`.Context.send` to send a message to the channel the command was used in.\"\nmsgstr \":meth:`.Context.send` で、コマンドが実行されたチャンネルにメッセージを送信できます。\"\n\n#: ../../ext/commands/commands.rst:190\nmsgid \"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`.\"\nmsgstr \"コンテキストは :class:`abc.Messageable` インタフェースを実装しているため、 :class:`abc.Messageable` 上でできることは :class:`~ext.commands.Context` 上でも行うことが可能です。\"\n\n#: ../../ext/commands/commands.rst:194\nmsgid \"Converters\"\nmsgstr \"コンバーター\"\n\n#: ../../ext/commands/commands.rst:196\nmsgid \"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`.\"\nmsgstr \"ボットの引数を関数のパラメータとして設定するのは、ボットのコマンドインタフェースを定義する第一歩でしかありません。引数を実際に扱うには、大抵の場合、データを目的の型へとと変換する必要があります。私達はこれを :ref:`ext_commands_api_converters` と呼んでいます。\"\n\n#: ../../ext/commands/commands.rst:200\nmsgid \"Converters come in a few flavours:\"\nmsgstr \"コンバーターにはいくつかの種類があります:\"\n\n#: ../../ext/commands/commands.rst:202\nmsgid \"A regular callable object that takes an argument as a sole parameter and returns a different type.\"\nmsgstr \"引数を単独のパラメータとして受け取り、異なる型として返す、通常の呼び出し可能オブジェクト。\"\n\n#: ../../ext/commands/commands.rst:204\nmsgid \"These range from your own function, to something like :class:`bool` or :class:`int`.\"\nmsgstr \"これらにはあなたの作った関数、 :class:`bool` や :class:`int` といったものまで含まれます。\"\n\n#: ../../ext/commands/commands.rst:206\nmsgid \"A custom class that inherits from :class:`~ext.commands.Converter`.\"\nmsgstr \":class:`~ext.commands.Converter` を継承したカスタムクラス。\"\n\n#: ../../ext/commands/commands.rst:211\nmsgid \"Basic Converters\"\nmsgstr \"基本的なコンバーター\"\n\n#: ../../ext/commands/commands.rst:213\nmsgid \"At its core, a basic converter is a callable that takes in an argument and turns it into something else.\"\nmsgstr \"基本的なコンバーターは、中核をなすものであり、受け取った引数を別のものへと変換します。\"\n\n#: ../../ext/commands/commands.rst:215\nmsgid \"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:\"\nmsgstr \"例えば、二つの値を加算したい場合、コンバーターを指定することにより、受け取った値を整数型へ変換するように要求できます。\"\n\n#: ../../ext/commands/commands.rst:224\nmsgid \"We specify converters by using something called a **function annotation**. This is a Python 3 exclusive feature that was introduced in :pep:`3107`.\"\nmsgstr \"コンバーターの指定には関数アノテーションというもの用います。これは :pep:`3107` にて追加された Python 3 にのみ実装されている機能です。\"\n\n#: ../../ext/commands/commands.rst:227\nmsgid \"This works with any callable, such as a function that would convert a string to all upper-case:\"\nmsgstr \"これは、文字列をすべて大文字に変換する関数などといった、任意の呼び出し可能関数でも動作します。\"\n\n#: ../../ext/commands/commands.rst:239\nmsgid \"bool\"\nmsgstr \"論理型\"\n\n#: ../../ext/commands/commands.rst:241\nmsgid \"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:\"\nmsgstr \"他の基本的なコンバーターとは違って、 :class:`bool` のコンバーターは若干扱いが異なります。 :class:`bool` 型に直接キャストして、空でない引数を ``True`` と判断するのではなく、与えられた値に基づいて ``True`` か ``False`` かを評価します。\"\n\n#: ../../ext/commands/commands.rst:253\nmsgid \"Advanced Converters\"\nmsgstr \"応用的なコンバーター\"\n\n#: ../../ext/commands/commands.rst:255\nmsgid \"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.\"\nmsgstr \"場合によっては、基本的なコンバーターを動かすのに必要な情報が不足していることがあります。例えば、実行されたコマンドの :class:`Message` から情報を取得したい場合や、非同期処理を行いたい場合です。\"\n\n#: ../../ext/commands/commands.rst:258\nmsgid \"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`.\"\nmsgstr \"そういった用途のために、このライブラリは :class:`~ext.commands.Converter` インタフェースを提供します。これによって :class:`.Context` にアクセスが可能になり、また、呼び出し可能関数を非同期にもできるようになります。このインタフェースを使用して、カスタムコンバーターを定義したい場合は :meth:`.Converter.convert` をオーバーライドしてください。\"\n\n#: ../../ext/commands/commands.rst:262\nmsgid \"An example converter:\"\nmsgstr \"コンバーターの例\"\n\n#: ../../ext/commands/commands.rst:277\nmsgid \"The converter provided can either be constructed or not. Essentially these two are equivalent:\"\nmsgstr \"コンバーターはインスタンス化されていなくても構いません。以下の例の二つのは同じ処理になります。\"\n\n#: ../../ext/commands/commands.rst:291\nmsgid \"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`.\"\nmsgstr \"コンバーターをインスタンス化する可能性がある場合、コンバーターの調整を行うために ``__init__`` で何かしらの状態を設定することが出来ます。この例としてライブラリに実際に存在する :class:`~ext.commands.clean_content` があります。\"\n\n#: ../../ext/commands/commands.rst:307\nmsgid \"If a converter fails to convert an argument to its designated target type, the :exc:`.BadArgument` exception must be raised.\"\nmsgstr \"コンバーターが渡された引数を指定の型に変換できなかった場合は :exc:`.BadArgument` を送出しないといけません。\"\n\n#: ../../ext/commands/commands.rst:311\nmsgid \"Inline Advanced Converters\"\nmsgstr \"埋込み型の応用的なコンバーター\"\n\n#: ../../ext/commands/commands.rst:313\nmsgid \"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.\"\nmsgstr \":class:`~ext.commands.Converter` を継承したくない場合のために、応用的なコンバーターの高度な機能を備えたコンバーターを提供しています。これを使用することで２つのクラスを作成する必要がなくなります。\"\n\n#: ../../ext/commands/commands.rst:316\nmsgid \"For example, a common idiom would be to have a class and a converter for that class:\"\nmsgstr \"例えば、一般的な書き方だと、クラスとそのクラスへのコンバーターを定義します:\"\n\n#: ../../ext/commands/commands.rst:342\nmsgid \"This can get tedious, so an inline advanced converter is possible through a :func:`classmethod` inside the type:\"\nmsgstr \"これでは面倒なので、 :func:`classmethod` を使って組み込み型の応用的なコンバーターの実装が可能です。\"\n\n#: ../../ext/commands/commands.rst:369\nmsgid \"Discord Converters\"\nmsgstr \"Discord コンバーター\"\n\n#: ../../ext/commands/commands.rst:371\nmsgid \"Working with :ref:`discord_api_models` is a fairly common thing when defining commands, as a result the library makes working with them easy.\"\nmsgstr \":ref:`discord_api_models` を使用して作業を行うのは、コマンドを定義する際には一般的なことです。そのため、このライブラリでは簡単に作業が行えるようになっています。\"\n\n#: ../../ext/commands/commands.rst:374\nmsgid \"For example, to receive a :class:`Member` you can just pass it as a converter:\"\nmsgstr \"例えば、 :class:`Member` を受け取るには、これをコンバーターとして渡すだけです。\"\n\n#: ../../ext/commands/commands.rst:382\nmsgid \"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.\"\nmsgstr \"このコマンドが実行されると、与えられた文字列を :class:`Member` に変換して、それを関数のパラメーターとして渡します。これは文字列がメンション、ID、ニックネーム、ユーザー名 + Discordタグ、または普通のユーザー名かどうかをチェックすることで機能しています。デフォルトで定義されているコンバーターは、できるだけ簡単に使えるように作られています。\"\n\n#: ../../ext/commands/commands.rst:386\nmsgid \"A lot of discord models work out of the gate as a parameter:\"\nmsgstr \"Discordモデルの多くがコンバーターとして動作します。\"\n\n#: ../../ext/commands/commands.rst:388\nmsgid \":class:`Object` (since v2.0)\"\nmsgstr \":class:`Object` (v2.0から)\"\n\n#: ../../ext/commands/commands.rst:389\n#: ../../ext/commands/commands.rst:421\nmsgid \":class:`Member`\"\nmsgstr \":class:`Member`\"\n\n#: ../../ext/commands/commands.rst:390\n#: ../../ext/commands/commands.rst:423\nmsgid \":class:`User`\"\nmsgstr \":class:`User`\"\n\n#: ../../ext/commands/commands.rst:391\nmsgid \":class:`Message` (since v1.1)\"\nmsgstr \":class:`Message` (v1.1 から)\"\n\n#: ../../ext/commands/commands.rst:392\nmsgid \":class:`PartialMessage` (since v1.7)\"\nmsgstr \":class:`PartialMessage` (v1.7 から)\"\n\n#: ../../ext/commands/commands.rst:393\nmsgid \":class:`abc.GuildChannel` (since 2.0)\"\nmsgstr \":class:`abc.GuildChannel` (v2.0から)\"\n\n#: ../../ext/commands/commands.rst:394\n#: ../../ext/commands/commands.rst:431\nmsgid \":class:`TextChannel`\"\nmsgstr \":class:`TextChannel`\"\n\n#: ../../ext/commands/commands.rst:395\n#: ../../ext/commands/commands.rst:433\nmsgid \":class:`VoiceChannel`\"\nmsgstr \":class:`VoiceChannel`\"\n\n#: ../../ext/commands/commands.rst:396\nmsgid \":class:`StageChannel` (since v1.7)\"\nmsgstr \":class:`StageChannel` (v1.7から)\"\n\n#: ../../ext/commands/commands.rst:397\n#: ../../ext/commands/commands.rst:437\nmsgid \":class:`CategoryChannel`\"\nmsgstr \":class:`CategoryChannel`\"\n\n#: ../../ext/commands/commands.rst:398\nmsgid \":class:`ForumChannel` (since v2.0)\"\nmsgstr \":class:`ForumChannel` (v2.0から)\"\n\n#: ../../ext/commands/commands.rst:399\n#: ../../ext/commands/commands.rst:441\nmsgid \":class:`Invite`\"\nmsgstr \":class:`Invite`\"\n\n#: ../../ext/commands/commands.rst:400\nmsgid \":class:`Guild` (since v1.7)\"\nmsgstr \":class:`Guild` (v1.7 から)\"\n\n#: ../../ext/commands/commands.rst:401\n#: ../../ext/commands/commands.rst:445\nmsgid \":class:`Role`\"\nmsgstr \":class:`Role`\"\n\n#: ../../ext/commands/commands.rst:402\n#: ../../ext/commands/commands.rst:447\nmsgid \":class:`Game`\"\nmsgstr \":class:`Game`\"\n\n#: ../../ext/commands/commands.rst:403\n#: ../../ext/commands/commands.rst:449\nmsgid \":class:`Colour`\"\nmsgstr \":class:`Colour`\"\n\n#: ../../ext/commands/commands.rst:404\n#: ../../ext/commands/commands.rst:451\nmsgid \":class:`Emoji`\"\nmsgstr \":class:`Emoji`\"\n\n#: ../../ext/commands/commands.rst:405\n#: ../../ext/commands/commands.rst:453\nmsgid \":class:`PartialEmoji`\"\nmsgstr \":class:`PartialEmoji`\"\n\n#: ../../ext/commands/commands.rst:406\nmsgid \":class:`Thread` (since v2.0)\"\nmsgstr \":class:`Thread` (v2.0から)\"\n\n#: ../../ext/commands/commands.rst:407\nmsgid \":class:`GuildSticker` (since v2.0)\"\nmsgstr \":class:`GuildSticker` （v2.0から）\"\n\n#: ../../ext/commands/commands.rst:408\nmsgid \":class:`ScheduledEvent` (since v2.0)\"\nmsgstr \":class:`ScheduledEvent` （v2.0から）\"\n\n#: ../../ext/commands/commands.rst:410\nmsgid \"Having any of these set as the converter will intelligently convert the argument to the appropriate target type you specify.\"\nmsgstr \"これらをコンバーターとして設定すると、引数を指定した型へとインテリジェントに変換します。\"\n\n#: ../../ext/commands/commands.rst:413\nmsgid \"Under the hood, these are implemented by the :ref:`ext_commands_adv_converters` interface. A table of the equivalent converter is given below:\"\nmsgstr \"これらは :ref:`ext_commands_adv_converters` インタフェースによって実装されています。コンバーターとクラスの関係は以下の通りです。\"\n\n#: ../../ext/commands/commands.rst:417\nmsgid \"Discord Class\"\nmsgstr \"Discord クラス\"\n\n#: ../../ext/commands/commands.rst:417\nmsgid \"Converter\"\nmsgstr \"コンバーター\"\n\n#: ../../ext/commands/commands.rst:419\nmsgid \":class:`Object`\"\nmsgstr \":class:`Object`\"\n\n#: ../../ext/commands/commands.rst:419\nmsgid \":class:`~ext.commands.ObjectConverter`\"\nmsgstr \":class:`~ext.commands.ObjectConverter`\"\n\n#: ../../ext/commands/commands.rst:421\nmsgid \":class:`~ext.commands.MemberConverter`\"\nmsgstr \":class:`~ext.commands.MemberConverter`\"\n\n#: ../../ext/commands/commands.rst:423\nmsgid \":class:`~ext.commands.UserConverter`\"\nmsgstr \":class:`~ext.commands.UserConverter`\"\n\n#: ../../ext/commands/commands.rst:425\nmsgid \":class:`Message`\"\nmsgstr \":class:`Message`\"\n\n#: ../../ext/commands/commands.rst:425\nmsgid \":class:`~ext.commands.MessageConverter`\"\nmsgstr \":class:`~ext.commands.MessageConverter`\"\n\n#: ../../ext/commands/commands.rst:427\nmsgid \":class:`PartialMessage`\"\nmsgstr \":class:`PartialMessage`\"\n\n#: ../../ext/commands/commands.rst:427\nmsgid \":class:`~ext.commands.PartialMessageConverter`\"\nmsgstr \":class:`~ext.commands.PartialMessageConverter`\"\n\n#: ../../ext/commands/commands.rst:429\nmsgid \":class:`.GuildChannel`\"\nmsgstr \":class:`.GuildChannel`\"\n\n#: ../../ext/commands/commands.rst:429\nmsgid \":class:`~ext.commands.GuildChannelConverter`\"\nmsgstr \":class:`~ext.commands.GuildChannelConverter`\"\n\n#: ../../ext/commands/commands.rst:431\nmsgid \":class:`~ext.commands.TextChannelConverter`\"\nmsgstr \":class:`~ext.commands.TextChannelConverter`\"\n\n#: ../../ext/commands/commands.rst:433\nmsgid \":class:`~ext.commands.VoiceChannelConverter`\"\nmsgstr \":class:`~ext.commands.VoiceChannelConverter`\"\n\n#: ../../ext/commands/commands.rst:435\nmsgid \":class:`StageChannel`\"\nmsgstr \":class:`StageChannel`\"\n\n#: ../../ext/commands/commands.rst:435\nmsgid \":class:`~ext.commands.StageChannelConverter`\"\nmsgstr \":class:`~ext.commands.StageChannelConverter`\"\n\n#: ../../ext/commands/commands.rst:437\nmsgid \":class:`~ext.commands.CategoryChannelConverter`\"\nmsgstr \":class:`~ext.commands.CategoryChannelConverter`\"\n\n#: ../../ext/commands/commands.rst:439\nmsgid \":class:`ForumChannel`\"\nmsgstr \":class:`ForumChannel`\"\n\n#: ../../ext/commands/commands.rst:439\nmsgid \":class:`~ext.commands.ForumChannelConverter`\"\nmsgstr \":class:`~ext.commands.ForumChannelConverter`\"\n\n#: ../../ext/commands/commands.rst:441\nmsgid \":class:`~ext.commands.InviteConverter`\"\nmsgstr \":class:`~ext.commands.InviteConverter`\"\n\n#: ../../ext/commands/commands.rst:443\nmsgid \":class:`Guild`\"\nmsgstr \":class:`Guild`\"\n\n#: ../../ext/commands/commands.rst:443\nmsgid \":class:`~ext.commands.GuildConverter`\"\nmsgstr \":class:`~ext.commands.GuildConverter`\"\n\n#: ../../ext/commands/commands.rst:445\nmsgid \":class:`~ext.commands.RoleConverter`\"\nmsgstr \":class:`~ext.commands.RoleConverter`\"\n\n#: ../../ext/commands/commands.rst:447\nmsgid \":class:`~ext.commands.GameConverter`\"\nmsgstr \":class:`~ext.commands.GameConverter`\"\n\n#: ../../ext/commands/commands.rst:449\nmsgid \":class:`~ext.commands.ColourConverter`\"\nmsgstr \":class:`~ext.commands.ColourConverter`\"\n\n#: ../../ext/commands/commands.rst:451\nmsgid \":class:`~ext.commands.EmojiConverter`\"\nmsgstr \":class:`~ext.commands.EmojiConverter`\"\n\n#: ../../ext/commands/commands.rst:453\nmsgid \":class:`~ext.commands.PartialEmojiConverter`\"\nmsgstr \":class:`~ext.commands.PartialEmojiConverter`\"\n\n#: ../../ext/commands/commands.rst:455\nmsgid \":class:`Thread`\"\nmsgstr \":class:`Thread`\"\n\n#: ../../ext/commands/commands.rst:455\nmsgid \":class:`~ext.commands.ThreadConverter`\"\nmsgstr \":class:`~ext.commands.ThreadConverter`\"\n\n#: ../../ext/commands/commands.rst:457\nmsgid \":class:`GuildSticker`\"\nmsgstr \":class:`GuildSticker`\"\n\n#: ../../ext/commands/commands.rst:457\nmsgid \":class:`~ext.commands.GuildStickerConverter`\"\nmsgstr \":class:`~ext.commands.GuildStickerConverter`\"\n\n#: ../../ext/commands/commands.rst:459\nmsgid \":class:`ScheduledEvent`\"\nmsgstr \":class:`ScheduledEvent`\"\n\n#: ../../ext/commands/commands.rst:459\nmsgid \":class:`~ext.commands.ScheduledEventConverter`\"\nmsgstr \":class:`~ext.commands.ScheduledEventConverter`\"\n\n#: ../../ext/commands/commands.rst:462\nmsgid \"By providing the converter it allows us to use them as building blocks for another converter:\"\nmsgstr \"コンバーターを継承することで、他のコンバーターの一部として使うことができます:\"\n\n#: ../../ext/commands/commands.rst:479\nmsgid \"Special Converters\"\nmsgstr \"特殊なコンバーター\"\n\n#: ../../ext/commands/commands.rst:481\nmsgid \"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.\"\nmsgstr \"コマンド拡張機能は一般的な線形解析を超える、より高度で複雑な使用法に対応するため、特殊なコンバーターをサポートしています。これらのコンバーターは、簡単な方法でコマンドに更に容易で動的な文法の導入を可能にします。\"\n\n#: ../../ext/commands/commands.rst:486\nmsgid \"typing.Union\"\nmsgstr \"typing.Union\"\n\n#: ../../ext/commands/commands.rst:488\nmsgid \"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:\"\nmsgstr \":data:`typing.Union` はコマンドが単数の型の代わりに、複数の特定の型を取り込める特殊な型ヒントです。例えば:\"\n\n#: ../../ext/commands/commands.rst:500\nmsgid \"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`.\"\nmsgstr \"``what`` パラメータには :class:`discord.TextChannel` コンバーターか :class:`discord.Member` コンバーターのいずれかが用いられます。これは左から右の順で変換できるか試行することになります。最初に渡された値を :class:`discord.TextChannel` へ変換しようと試み、失敗した場合は :class:`discord.Member` に変換しようとします。すべてのコンバーターで失敗した場合は :exc:`~ext.commands.BadUnionArgument` というエラーが発生します。\"\n\n#: ../../ext/commands/commands.rst:505\nmsgid \"Note that any valid converter discussed above can be passed in to the argument list of a :data:`typing.Union`.\"\nmsgstr \"以前に説明した有効なコンバーターは、すべて :data:`typing.Union` にわたすことが可能です。\"\n\n#: ../../ext/commands/commands.rst:508\nmsgid \"typing.Optional\"\nmsgstr \"typing.Optional\"\n\n#: ../../ext/commands/commands.rst:510\nmsgid \"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.\"\nmsgstr \":data:`typing.Optional` は「後方参照」のような動作をする特殊な型ヒントです。コンバーターが指定された型へのパースに失敗した場合、パーサーは代わりに ``None`` または指定されたデフォルト値をパラメータに渡したあと、そのパラメータをスキップします。次のパラメータまたはコンバータがあれば、そちらに進みます。\"\n\n#: ../../ext/commands/commands.rst:514\n#: ../../ext/commands/commands.rst:588\n#: ../../ext/commands/commands.rst:655\nmsgid \"Consider the following example:\"\nmsgstr \"次の例をみてください:\"\n\n#: ../../ext/commands/commands.rst:527\nmsgid \"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.\"\nmsgstr \"この例では引数を ``int`` に変換することができなかったので、デフォルト値である ``99`` を代入し、パーサーは処理を続行しています。この場合、先程の変換に失敗した引数は ``liquid`` パラメータに渡されます。\"\n\n#: ../../ext/commands/commands.rst:532\nmsgid \"This converter only works in regular positional parameters, not variable parameters or keyword-only parameters.\"\nmsgstr \"このコンバーターは位置パラメータでのみ動作し、可変長パラメータやキーワードパラメータでは機能しません。\"\n\n#: ../../ext/commands/commands.rst:535\nmsgid \"typing.Literal\"\nmsgstr \"typing.Literal\"\n\n#: ../../ext/commands/commands.rst:539\nmsgid \"A :data:`typing.Literal` is a special type hint that requires the passed parameter to be equal to one of the listed values after being converted to the same type. For example, given the following:\"\nmsgstr \":data:`typing.Literal` は、渡されたパラメータが同じ型に変換された後にリストされた値のいずれかに等しいことを要求する特別な型ヒントです。 例えば、以下のように指定します。\"\n\n#: ../../ext/commands/commands.rst:551\nmsgid \"The ``buy_sell`` parameter must be either the literal string ``\\\"buy\\\"`` or ``\\\"sell\\\"`` and ``amount`` must convert to the ``int`` ``1`` or ``2``. If ``buy_sell`` or ``amount`` don't match any value, then a special error is raised, :exc:`~.ext.commands.BadLiteralArgument`. Any literal values can be mixed and matched within the same :data:`typing.Literal` converter.\"\nmsgstr \"``buy_sell`` パラメータはリテラル文字列の ``\\\"buy\\\"`` または ``\\\"sell\\\"`` のどちらかで、 ``amount`` は ``int`` の ``1`` または ``2`` に変換されなければなりません。 ``buy_sell`` または ``amount`` がどの値にも一致しない場合は、特別なエラー :exc:`~.ext.commands.BadLiteralArgument` が発生します。任意のリテラル値は、同じ :data:`typing.Literal` コンバーター内で混合してマッチさせることができます。\"\n\n#: ../../ext/commands/commands.rst:555\nmsgid \"Note that ``typing.Literal[True]`` and ``typing.Literal[False]`` still follow the :class:`bool` converter rules.\"\nmsgstr \"``typing.Literal[True]`` と ``typing.Literal[False]`` は :class:`bool` コンバーターのルールに従っていることに注意してください。\"\n\n#: ../../ext/commands/commands.rst:558\nmsgid \"typing.Annotated\"\nmsgstr \"typing.Annotated\"\n\n#: ../../ext/commands/commands.rst:562\nmsgid \"A :data:`typing.Annotated` is a special type introduced in Python 3.9 that allows the type checker to see one type, but allows the library to see another type. This is useful for appeasing the type checker for complicated converters. The second parameter of ``Annotated`` must be the converter that the library should use.\"\nmsgstr \":data:`typing.Annotated` は Python 3.9 で導入された特別な型です。 これを使用すると、型チェッカは1つのタイプを参照できますが、ライブラリは別のタイプを参照できます。 これは複雑なコンバータにて型チェッカを通すのに役立ちます。 ``Annotated`` の2番目のパラメータはライブラリが使用するコンバータでなければなりません。\"\n\n#: ../../ext/commands/commands.rst:564\nmsgid \"For example, given the following:\"\nmsgstr \"例えば、以下の例では:\"\n\n#: ../../ext/commands/commands.rst:574\nmsgid \"The type checker will see ``arg`` as a regular :class:`str` but the library will know you wanted to change the input into all upper-case.\"\nmsgstr \"型チェッカは ``arg`` を通常の :class:`str` として認識しますが、ライブラリは入力をすべて大文字に変更したいことを知っています。\"\n\n#: ../../ext/commands/commands.rst:578\nmsgid \"For Python versions below 3.9, it is recommended to install the ``typing_extensions`` library and import ``Annotated`` from there.\"\nmsgstr \"Python 3.9未満では、 ``typing_extensions`` ライブラリをインストールして ``Annotated`` をそこからインポートすることを推奨します。\"\n\n#: ../../ext/commands/commands.rst:582\nmsgid \"Greedy\"\nmsgstr \"Greedy\"\n\n#: ../../ext/commands/commands.rst:584\nmsgid \"The :class:`~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.\"\nmsgstr \":class:`~ext.commands.Greedy` コンバーターは引数にリストが適用される以外は :data:`typing.Optional` を一般化したものです。簡単に言うと、与えられた引数を変換ができなくなるまで指定の型に変換しようと試みます。\"\n\n#: ../../ext/commands/commands.rst:597\nmsgid \"When invoked, it allows for any number of members to be passed in:\"\nmsgstr \"これが呼び出されると、任意の数のメンバーを渡すことができます:\"\n\n#: ../../ext/commands/commands.rst:601\nmsgid \"The type passed when using this converter depends on the parameter type that it is being attached to:\"\nmsgstr \"このコンバータを利用した際に渡される型は、その対象となっているパラメータの種類によって異なります。\"\n\n#: ../../ext/commands/commands.rst:603\nmsgid \"Positional parameter types will receive either the default parameter or a :class:`list` of the converted values.\"\nmsgstr \"位置パラメータの場合、型はデフォルトのものか変換された値からなる :class:`list` になります。\"\n\n#: ../../ext/commands/commands.rst:604\nmsgid \"Variable parameter types will be a :class:`tuple` as usual.\"\nmsgstr \"可変長パラメータの場合、型は通常同様 :class:`tuple` になります。\"\n\n#: ../../ext/commands/commands.rst:605\nmsgid \"Keyword-only parameter types will be the same as if :class:`~ext.commands.Greedy` was not passed at all.\"\nmsgstr \"キーワードパラメータの場合、型は :class:`~ext.commands.Greedy` を使用していないときと同じになります。\"\n\n#: ../../ext/commands/commands.rst:607\nmsgid \":class:`~ext.commands.Greedy` parameters can also be made optional by specifying an optional value.\"\nmsgstr \":class:`~ext.commands.Greedy` パラメータはデフォルト値を指定することでオプションにすることもできます。\"\n\n#: ../../ext/commands/commands.rst:609\nmsgid \"When mixed with the :data:`typing.Optional` converter you can provide simple and expressive command invocation syntaxes:\"\nmsgstr \":data:`typing.Optional` コンバータと併用することで、シンプルかつ表現に富む呼び出し構文を提供できます。\"\n\n#: ../../ext/commands/commands.rst:625\nmsgid \"This command can be invoked any of the following ways:\"\nmsgstr \"このコマンドは以下のような方法で呼び出すことが可能です。\"\n\n#: ../../ext/commands/commands.rst:635\nmsgid \"The usage of :class:`~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.\"\nmsgstr \":class:`~ext.commands.Greedy` と :data:`typing.Optional` の利用は強力かつ便利である反面、その代償として一部の人が驚いてしまうような曖昧な構文解析を許容することとなります。\"\n\n#: ../../ext/commands/commands.rst:638\nmsgid \"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.\"\nmsgstr \"例えば、 :class:`discord.Member` の :data:`typing.Optional` の後に :class:`int` が続くようなシグネチャでは :class:`~ext.commands.MemberConverter` がメンバー取得のために様々な方法をとることが要因となり、名前が数字になっているメンバーを取得してしまう可能性があります。コードが意図しない曖昧な構文解析を引き起こさないよう注意してください。テクニックの一つとして、カスタムコンバーターを用いて予期される構文の許容を制限するか、このような衝突を最小限に抑えるために、パラメータを並び替えることなどが挙げられます。\"\n\n#: ../../ext/commands/commands.rst:644\nmsgid \"To help aid with some parsing ambiguities, :class:`str`, ``None``, :data:`typing.Optional` and :class:`~ext.commands.Greedy` are forbidden as parameters for the :class:`~ext.commands.Greedy` converter.\"\nmsgstr \"曖昧な構文解析を防ぐため、 :class:`str` 、 ``None`` 、 :data:`typing.Optional` 、そして :class:`~ext.commands.Greedy` を :class:`~ext.commands.Greedy` コンバーターのパラメーターにするのは禁止されています。\"\n\n#: ../../ext/commands/commands.rst:649\nmsgid \"discord.Attachment\"\nmsgstr \"discord.Attachment\"\n\n#: ../../ext/commands/commands.rst:653\nmsgid \"The :class:`discord.Attachment` converter is a special converter that retrieves an attachment from the uploaded attachments on a message. This converter *does not* look at the message content at all and just the uploaded attachments.\"\nmsgstr \":class:`discord.Attachment` コンバータはメッセージにアップロードされた添付ファイルから添付ファイルを一個取得する特別なコンバータです。このコンバータは、メッセージ内容は *確認せず* アップロードされた添付ファイルのみ確認します。\"\n\n#: ../../ext/commands/commands.rst:666\nmsgid \"When this command is invoked, the user must directly upload a file for the command body to be executed. When combined with the :data:`typing.Optional` converter, the user does not have to provide an attachment.\"\nmsgstr \"コマンドの呼び出し時に、ユーザーはコマンドを実行するときにはファイルを直接アップロードしないといけません。これを :data:`typing.Optional` コンバータと組み合わせた場合、添付ファイルを提供する必要はありません。\"\n\n#: ../../ext/commands/commands.rst:681\nmsgid \"This also works with multiple attachments:\"\nmsgstr \"これは複数の添付ファイルでも動作します：\"\n\n#: ../../ext/commands/commands.rst:702\nmsgid \"In this example the user must provide at least one file but the second one is optional.\"\nmsgstr \"この例では、ユーザーは少なくとも1つのファイルを提供する必要がありますが、2つ目のファイルはオプションです。\"\n\n#: ../../ext/commands/commands.rst:704\nmsgid \"As a special case, using :class:`~ext.commands.Greedy` will return the remaining attachments in the message, if any.\"\nmsgstr \"特別なケースとして、 :class:`~ext.commands.Greedy` を使用すると、存在する場合はメッセージ内の残りの添付ファイルが返されます。\"\n\n#: ../../ext/commands/commands.rst:722\nmsgid \"Note that using a :class:`discord.Attachment` converter after a :class:`~ext.commands.Greedy` of :class:`discord.Attachment` will always fail since the greedy had already consumed the remaining attachments.\"\nmsgstr \"なお、 :class:`discord.Attachment` の :class:`~ext.commands.Greedy` の後に :class:`discord.Attachment` コンバータを使用するのは、Greedyが残りの添付ファイルをすでに使用しているため、常に失敗します。\"\n\n#: ../../ext/commands/commands.rst:724\nmsgid \"If an attachment is expected but not given, then :exc:`~ext.commands.MissingRequiredAttachment` is raised to the error handlers.\"\nmsgstr \"添付ファイルが期待されているのに与えられていない場合、 :exc:`~ext.commands.MissingRequiredAttachment` がエラーハンドラに送出されます。\"\n\n#: ../../ext/commands/commands.rst:729\nmsgid \"FlagConverter\"\nmsgstr \"FlagConverter\"\n\n#: ../../ext/commands/commands.rst:733\nmsgid \"A :class:`~ext.commands.FlagConverter` allows the user to specify user-friendly \\\"flags\\\" using :pep:`526` type annotations or a syntax more reminiscent of the :mod:`py:dataclasses` module.\"\nmsgstr \":class:`~ext.commands.FlagConverter` を使用すると、型アノテーション :pep:`526` を使用してユーザーフレンドリーな「フラグ」を指定したり、 :mod:`py:dataclasses` モジュールを彷彿とさせる構文を使用できます。\"\n\n#: ../../ext/commands/commands.rst:736\nmsgid \"For example, the following code:\"\nmsgstr \"例えば、以下のコードです。\"\n\n#: ../../ext/commands/commands.rst:753\nmsgid \"Allows the user to invoke the command using a simple flag-like syntax:\"\nmsgstr \"フラグに似たシンプルな構文を使用してコマンドを呼び出すことができます：\"\n\n#: ../../ext/commands/commands.rst:757\nmsgid \"Flags use a syntax that allows the user to not require quotes when passing in values to the flag. The goal of the flag syntax is to be as user-friendly as possible. This makes flags a good choice for complicated commands that can have multiple knobs to turn or simulating keyword-only parameters in your external command interface. **It is recommended to use keyword-only parameters with the flag converter**. This ensures proper parsing and behaviour with quoting.\"\nmsgstr \"フラグは、フラグに値を渡す際に引用符を必要としない構文を使用しています。フラグ構文の目標は、できるだけユーザーフレンドリーにすることです。このため、複数のノブを使用する複雑なコマンドや、外部コマンド・インターフェースでキーワードのみのパラメータをシミュレートする場合、フラグを使用するのが適しています。 **フラグ・コンバータでは、キーワード専用パラメータを使用することをお勧めします。** これにより、適切な解析と引用符での動作が保証されます。\"\n\n#: ../../ext/commands/commands.rst:762\nmsgid \"Internally, the :class:`~ext.commands.FlagConverter` class examines the class to find flags. A flag can either be a class variable with a type annotation or a class variable that's been assigned the result of the :func:`~ext.commands.flag` function. These flags are then used to define the interface that your users will use. The annotations correspond to the converters that the flag arguments must adhere to.\"\nmsgstr \"内部的には、:class:`~ext.commands.FlagConverter` クラスがクラスを調べてフラグを見つけます。フラグには、型アノテーションが付いたクラス変数と、 :func:`~ext.commands.flag` 関数の結果が代入されたクラス変数があります。これらのフラグは、ユーザーが使用するインターフェースを定義するために使用されます。アノテーションは、フラグの引数が準拠しなければならないコンバーターに対応しています。\"\n\n#: ../../ext/commands/commands.rst:767\nmsgid \"For most use cases, no extra work is required to define flags. However, if customisation is needed to control the flag name or the default value then the :func:`~ext.commands.flag` function can come in handy:\"\nmsgstr \"ほとんどの場合、フラグを定義するために余分な作業は必要ありません。 しかし、フラグ名やデフォルト値を制御するためにカスタマイズが必要な場合は、 :func:`~ext.commands.flag` 関数が便利です：\"\n\n#: ../../ext/commands/commands.rst:777\nmsgid \"This tells the parser that the ``members`` attribute is mapped to a flag named ``member`` and that the default value is an empty list. For greater customisability, the default can either be a value or a callable that takes the :class:`~ext.commands.Context` as a sole parameter. This callable can either be a function or a coroutine.\"\nmsgstr \"これは ``members`` 属性が ``member`` というフラグにマップされ、デフォルト値が空のリストであることをパーサーに伝えます。 カスタマイズ性を向上させるために、デフォルトは値か呼び出し可能な値で、 :class:`~ext.commands.Context` を唯一のパラメータとして取ります。この呼び出し可能な値は関数またはコルーチンのいずれかを使用できます。\"\n\n#: ../../ext/commands/commands.rst:781\nmsgid \"In order to customise the flag syntax we also have a few options that can be passed to the class parameter list:\"\nmsgstr \"フラグ構文をカスタマイズするために、クラスのパラメーターリストに渡せるオプションもいくつか用意されています。\"\n\n#: ../../ext/commands/commands.rst:802\nmsgid \"Despite the similarities in these examples to command like arguments, the syntax and parser is not a command line parser. The syntax is mainly inspired by Discord's search bar input and as a result all flags need a corresponding value.\"\nmsgstr \"これらの例では引数のようにコマンドを実行するのと似ていますが、この構文と解析機はコマンドライン解析機ではありません。 この構文は主にDiscordの検索バー入力に触発されており、その結果、すべてのフラグに対応する値が必要になります。\"\n\n#: ../../ext/commands/commands.rst:806\nmsgid \"Flag converters will only raise :exc:`~ext.commands.FlagError` derived exceptions. If an error is raised while converting a flag, :exc:`~ext.commands.BadFlagArgument` is raised instead and the original exception can be accessed with the :attr:`~ext.commands.BadFlagArgument.original` attribute.\"\nmsgstr \"フラグコンバータは :exc:`~ext.commands.FlagError` 派生の例外のみ送出します。フラグ変換中にエラーが発生した場合、 :exc:`~ext.commands.BadFlagArgument` が代わりに送出され、元の例外は :attr:`~ext.commands.BadFlagArgument.original` 属性でアクセスできます。\"\n\n#: ../../ext/commands/commands.rst:810\nmsgid \"The flag converter is similar to regular commands and allows you to use most types of converters (with the exception of :class:`~ext.commands.Greedy`) as the type annotation. Some extra support is added for specific annotations as described below.\"\nmsgstr \"フラグコンバーターは通常のコマンドと似ており、ほとんどのタイプのコンバータを型アノテーションとして使用できます(例外は :class:`~ext.commands.Greedy`) 。以下で説明するように、特定のアノテーションに対する追加のサポートが追加されます。\"\n\n#: ../../ext/commands/commands.rst:815\nmsgid \"typing.List\"\nmsgstr \"typing.List\"\n\n#: ../../ext/commands/commands.rst:817\nmsgid \"If a list is given as a flag annotation it tells the parser that the argument can be passed multiple times.\"\nmsgstr \"リストがフラグアノテーションとして与えられた場合、引数が何回も渡せることをパーサーに知らせます。\"\n\n#: ../../ext/commands/commands.rst:819\nmsgid \"For example, augmenting the example above:\"\nmsgstr \"例えば、上記の例を拡張すると：\"\n\n#: ../../ext/commands/commands.rst:841\nmsgid \"This is called by repeatedly specifying the flag:\"\nmsgstr \"これはフラグを繰り返し指定することで呼び出されます：\"\n\n#: ../../ext/commands/commands.rst:846\nmsgid \"typing.Tuple\"\nmsgstr \"typing.Tuple\"\n\n#: ../../ext/commands/commands.rst:848\nmsgid \"Since the above syntax can be a bit repetitive when specifying a flag many times, the :class:`py:tuple` type annotation allows for \\\"greedy-like\\\" semantics using a variadic tuple:\"\nmsgstr \"フラグを何度も指定する場合、上記の構文は少し繰り返しになるので、 :class:`py:tuple` 型アノテーションを使用すると、可変タプルを使用した「欲張りな」セマンティクスを実現することができます。\"\n\n#: ../../ext/commands/commands.rst:862\nmsgid \"This allows the previous ``ban`` command to be called like this:\"\nmsgstr \"これにより、以前の ``ban`` コマンドを以下のように呼び出すことができます。\"\n\n#: ../../ext/commands/commands.rst:866\nmsgid \"The :class:`py:tuple` annotation also allows for parsing of pairs. For example, given the following code:\"\nmsgstr \":class:`py:tuple` アノテーションはペアの解析を可能にします。例えば、以下のコードがあります。\"\n\n#: ../../ext/commands/commands.rst:877\nmsgid \"Due to potential parsing ambiguities, the parser expects tuple arguments to be quoted if they require spaces. So if one of the inner types is :class:`str` and the argument requires spaces then quotes should be used to disambiguate it from the other element of the tuple.\"\nmsgstr \"解析が曖昧になってしまうため、パーサーはタプル引数がスペースを必要とする場合、引用符で囲むことを期待します。そのため、もし内部型のひとつが :class:`str` で、その引数がスペースを必要とする場合には、タプルの他の要素と区別するために引用符が使用されなければなりません。\"\n\n#: ../../ext/commands/commands.rst:882\nmsgid \"typing.Dict\"\nmsgstr \"typing.Dict\"\n\n#: ../../ext/commands/commands.rst:884\nmsgid \"A :class:`dict` annotation is functionally equivalent to ``List[Tuple[K, V]]`` except with the return type given as a :class:`dict` rather than a :class:`list`.\"\nmsgstr \":class:`dict` アノテーションは、:class:`list` ではなく、:class:`dict` として与えられた戻り値の値を除いて、``List[Tuple[K, V]]`` と同等です\"\n\n#: ../../ext/commands/commands.rst:889\nmsgid \"Hybrid Command Interaction\"\nmsgstr \"ハイブリッドコマンドでの動作\"\n\n#: ../../ext/commands/commands.rst:891\nmsgid \"When used as a hybrid command, the parameters are flattened into different parameters for the application command. For example, the following converter:\"\nmsgstr \"ハイブリッドコマンドとして使用された場合、パラメータはアプリケーションコマンドでは別々のものになります。例えば、次のコンバータは：\"\n\n#: ../../ext/commands/commands.rst:905\nmsgid \"Would be equivalent to an application command defined as this:\"\nmsgstr \"以下のように定義されたアプリケーションコマンドと同等です：\"\n\n#: ../../ext/commands/commands.rst:913\nmsgid \"This means that decorators that refer to a parameter by name will use the flag name instead:\"\nmsgstr \"これは、パラメータを名前で参照するデコレータはフラグ名を代わりに使用するということです。\"\n\n#: ../../ext/commands/commands.rst:932\nmsgid \"For ease of use, the :func:`~ext.commands.flag` function accepts a ``description`` keyword argument to allow you to pass descriptions inline:\"\nmsgstr \"使いやすいように、 :func:`~ext.commands.flag` 関数は ``description`` キーワード引数を受け取るので、説明をインラインで渡すことができます。\"\n\n#: ../../ext/commands/commands.rst:947\nmsgid \"Likewise, use of the ``name`` keyword argument allows you to pass renames for the parameter, similar to the :func:`~discord.app_commands.rename` decorator.\"\nmsgstr \"同様に、 ``name`` キーワード引数を使用すると、 :func:`~discord.app_commands.rename` デコレータと同様に、パラメータの改名ができます。\"\n\n#: ../../ext/commands/commands.rst:949\nmsgid \"Note that in hybrid command form, a few annotations are unsupported due to Discord limitations:\"\nmsgstr \"ハイブリッドコマンド形式では、Discordの制限によりいくつかのアノテーションがサポートされていないことに注意してください。\"\n\n#: ../../ext/commands/commands.rst:951\nmsgid \"``typing.Tuple``\"\nmsgstr \"``typing.Tuple``\"\n\n#: ../../ext/commands/commands.rst:952\nmsgid \"``typing.List``\"\nmsgstr \"``typing.List``\"\n\n#: ../../ext/commands/commands.rst:953\nmsgid \"``typing.Dict``\"\nmsgstr \"``typing.Dict``\"\n\n#: ../../ext/commands/commands.rst:957\nmsgid \"Only one flag converter is supported per hybrid command. Due to the flag converter's way of working, it is unlikely for a user to have two of them in one signature.\"\nmsgstr \"ハイブリッドコマンド1個ごとにフラグコンバータ1個までサポートされています。 フラグコンバーターの動作の仕組みのため、あるシグネチャに2個フラグコンバータが存在するのはまれです。\"\n\n#: ../../ext/commands/commands.rst:962\nmsgid \"Parameter Metadata\"\nmsgstr \"パラメータのメタデータ\"\n\n#: ../../ext/commands/commands.rst:964\nmsgid \":func:`~ext.commands.parameter` assigns custom metadata to a :class:`~ext.commands.Command`'s parameter.\"\nmsgstr \":func:`~ext.commands.parameter` はカスタムメタデータを :class:`~ext.commands.Command` のパラメータに割り当てます。\"\n\n#: ../../ext/commands/commands.rst:966\nmsgid \"This is useful for:\"\nmsgstr \"これは以下の場合に便利です:\"\n\n#: ../../ext/commands/commands.rst:968\nmsgid \"Custom converters as annotating a parameter with a custom converter works at runtime, type checkers don't like it because they can't understand what's going on.\"\nmsgstr \"パラメータのアノテーションにカスタムコンバーターを付するカスタムコンバーターはランタイムで動作するため、型チェッカが理解できず、問題が発生します。\"\n\n#: ../../ext/commands/commands.rst:983\nmsgid \"However, fear not we can use :func:`~ext.commands.parameter` to tell type checkers what's going on.\"\nmsgstr \"しかし、 :func:`~ext.commands.parameter` を使用すれば、型チェッカが何が起こっているかを理解できるようになります。\"\n\n#: ../../ext/commands/commands.rst:991\nmsgid \"Late binding behaviour\"\nmsgstr \"既定値の動的評価\"\n\n#: ../../ext/commands/commands.rst:999\nmsgid \"Because this is such a common use-case, the library provides :obj:`~.ext.commands.Author`, :obj:`~.ext.commands.CurrentChannel` and :obj:`~.ext.commands.CurrentGuild`, armed with this we can simplify ``wave`` to:\"\nmsgstr \"これが非常に一般的な使用法であることから、ライブラリは :obj:`~.ext.commands.Author` 、 :obj:`~.ext.commands.CurrentChannel` 、 :obj:`~.ext.commands.CurrentGuild` を提供します。これらを使用すると ``wave`` は以下のように簡素化できます：\"\n\n#: ../../ext/commands/commands.rst:1008\nmsgid \":obj:`~.ext.commands.Author` and co also have other benefits like having the displayed default being filled.\"\nmsgstr \":obj:`~.ext.commands.Author` などは、表示される既定値が事前に指定されているなど、他の利点もあります。\"\n\n#: ../../ext/commands/commands.rst:1014\nmsgid \"Error Handling\"\nmsgstr \"エラーハンドリング\"\n\n#: ../../ext/commands/commands.rst:1016\nmsgid \"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.\"\nmsgstr \"コマンドの解析に失敗すると、デフォルトではエラーの発生とそれが握り潰されたことを知らせるノイズのようなエラーがコンソールの ``stderr`` に出力されます。\"\n\n#: ../../ext/commands/commands.rst:1019\nmsgid \"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.\"\nmsgstr \"エラーを処理するには、エラーハンドラと呼ばれるものを利用する必要があります。\\n\"\n\":func:`.on_command_error` グローバルエラーハンドラが存在し、これは :ref:`discord-api-events` のイベントのように動作します。\\n\"\n\"このハンドラはエラーが発生するたびに呼び出されます。\"\n\n#: ../../ext/commands/commands.rst:1023\nmsgid \"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:`~discord.ext.commands.Command.error`:\"\nmsgstr \"しかし、ほとんどの場合においては、コマンド自体に対応するローカルなエラー処理を行いたいと考えるでしょう。幸いなことに、コマンドにはローカルエラーハンドラが存在するため、これを利用して実現することができます。まず、エラーハンドラとして利用する関数を :meth:`~discord.ext.commands.Command.error` でデコレートします。\"\n\n#: ../../ext/commands/commands.rst:1039\nmsgid \"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.\"\nmsgstr \"ハンドラの最初の引数には :class:`.Context` が渡され、２番目の引数には :exc:`~ext.commands.CommandError` が渡されます。 エラー一覧は :ref:`ext_commands_api_errors` から見ることができます。\"\n\n#: ../../ext/commands/commands.rst:1043\nmsgid \"Checks\"\nmsgstr \"チェック\"\n\n#: ../../ext/commands/commands.rst:1045\nmsgid \"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`.\"\nmsgstr \"コマンドをユーザーに使ってほしくない場合などがあります。例えば、使用者が権限を持っていない場合や、ボットによりブロックされている場合などです。コマンド拡張機能ではこのような機能を :ref:`ext_commands_api_checks` と呼び、完全にサポートしています。\"\n\n#: ../../ext/commands/commands.rst:1049\nmsgid \"A check is a basic predicate that can take in a :class:`.Context` as its sole parameter. Within it, you have the following options:\"\nmsgstr \"チェックは :class:`.Context` を引数とする関数です。関数はこれらの選択ができます：\"\n\n#: ../../ext/commands/commands.rst:1052\nmsgid \"Return ``True`` to signal that the person can run the command.\"\nmsgstr \"``True`` を返し、その人がコマンドを実行できることを示します。\"\n\n#: ../../ext/commands/commands.rst:1053\nmsgid \"Return ``False`` to signal that the person cannot run the command.\"\nmsgstr \"``False`` を返し、その人がコマンドを実行できないことを示します。\"\n\n#: ../../ext/commands/commands.rst:1054\nmsgid \"Raise a :exc:`~ext.commands.CommandError` derived exception to signal the person cannot run the command.\"\nmsgstr \":exc:`~ext.commands.CommandError` を継承する例外を発生させ、コマンドを実行できないことを示します。\"\n\n#: ../../ext/commands/commands.rst:1056\nmsgid \"This allows you to have custom error messages for you to handle in the :ref:`error handlers <ext_commands_error_handler>`.\"\nmsgstr \":ref:`エラーハンドラ <ext_commands_error_handler>` のように独自のエラーメッセージを使うことができます。\"\n\n#: ../../ext/commands/commands.rst:1059\nmsgid \"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:\"\nmsgstr \"チェックを登録するには２つの方法があります：１つ目は :meth:`~ext.commands.check` を使う方法です。\"\n\n#: ../../ext/commands/commands.rst:1073\nmsgid \"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:\"\nmsgstr \"例えば、この場合は ``is_owner`` が ``True`` だったときのみコマンドを実行します。しかし、チェックを使い回すために独自のデコレーターにしたくなることもあるでしょう。そうしたい場合は、\"\n\n#: ../../ext/commands/commands.rst:1090\nmsgid \"Since an owner check is so common, the library provides it for you (:func:`~ext.commands.is_owner`):\"\nmsgstr \"このようにすると独自のデコレーターになります。\\n\"\n\"このチェックはとてもよく使われるため、ライブラリに標準で実装されています（ :func:`~ext.commands.is_owner` ）。\"\n\n#: ../../ext/commands/commands.rst:1100\nmsgid \"When multiple checks are specified, **all** of them must be ``True``:\"\nmsgstr \"複数のチェックが渡されたときには、 **すべて** のチェックが ``True`` になる必要があります。\"\n\n#: ../../ext/commands/commands.rst:1116\nmsgid \"If any of those checks fail in the example above, then the command will not be run.\"\nmsgstr \"もしチェックのうちどれかが失敗した場合、コマンドは実行されません。\"\n\n#: ../../ext/commands/commands.rst:1118\nmsgid \"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:\"\nmsgstr \"もし例外が発生した場合、 :ref:`エラーハンドラ<ext_commands_error_handler>` によって例外が処理されます。もし :exc:`~ext.commands.CommandError` を継承しないエラーを発生させた場合、 :exc:`~ext.commands.CheckFailure` が発生します。\"\n\n#: ../../ext/commands/commands.rst:1136\nmsgid \"If you want a more robust error system, you can derive from the exception and raise it instead of returning ``False``:\"\nmsgstr \"もし強化されたエラーシステムが必要な場合は、例外を継承し、``False`` を返す代わりに例外を発生させることができます。\"\n\n#: ../../ext/commands/commands.rst:1162\nmsgid \"Since having a ``guild_only`` decorator is pretty common, it comes built-in via :func:`~ext.commands.guild_only`.\"\nmsgstr \"``guild_only`` デコレータはよく使われるため、標準で実装されています（ :func:`~ext.commands.guild_only` ）。\"\n\n#: ../../ext/commands/commands.rst:1165\nmsgid \"Global Checks\"\nmsgstr \"グローバルチェック\"\n\n#: ../../ext/commands/commands.rst:1167\nmsgid \"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.\"\nmsgstr \"**すべての** コマンドにチェックをかけたいこともあるでしょう。そうしたい場合は、ライブラリのグローバルチェックを使うことができます。\"\n\n#: ../../ext/commands/commands.rst:1170\nmsgid \"Global checks work similarly to regular checks except they are registered with the :meth:`.Bot.check` decorator.\"\nmsgstr \"グローバルチェックは、 :meth:`.Bot.check` デコレータで登録されることを除き、通常のチェックと同様に動作します。\"\n\n#: ../../ext/commands/commands.rst:1172\nmsgid \"For example, to block all DMs we could do the following:\"\nmsgstr \"例えば、全DMをブロックするには、次の操作を行います。\"\n\n#: ../../ext/commands/commands.rst:1182\nmsgid \"Be careful on how you write your global checks, as it could also lock you out of your own bot.\"\nmsgstr \"グローバルチェックを追加するときには注意して下さい。ボットを操作できなくなる可能性があります。\"\n\n#: ../../ext/commands/commands.rst:1188\nmsgid \"Hybrid Commands\"\nmsgstr \"ハイブリッドコマンド\"\n\n#: ../../ext/commands/commands.rst:1192\nmsgid \":class:`.commands.HybridCommand` is a command that can be invoked as both a text and a slash command. This allows you to define a command as both slash and text command without writing separate code for both counterparts.\"\nmsgstr \":class:`.commands.HybridCommand` は、テキストコマンドとしても、スラッシュコマンドとしても呼び出せるコマンドです。これを使用すれば、別々のコードを書かずにコマンドをスラッシュコマンドとテキストコマンドの両方として定義できます。\"\n\n#: ../../ext/commands/commands.rst:1197\nmsgid \"In order to define a hybrid command, The command callback should be decorated with :meth:`.Bot.hybrid_command` decorator.\"\nmsgstr \"ハイブリッドコマンドを定義するには、コマンドコールバックを :meth:`.Bot.hybrid_command` デコレータで装飾しないといけません。\"\n\n#: ../../ext/commands/commands.rst:1206\nmsgid \"The above command can be invoked as both text and slash command. Note that you have to manually sync your :class:`~app_commands.CommandTree` by calling :class:`~app_commands.CommandTree.sync` in order for slash commands to appear.\"\nmsgstr \"上のコマンドはテキストコマンドとスラッシュコマンドの両方として実行できます。なお、スラッシュコマンドを表示するには、 :class:`~app_commands.CommandTree.sync` を呼び出して :class:`~app_commands.CommandTree` を手動で同期しないといけません。\"\n\n#: ../../ext/commands/commands.rst:1213\nmsgid \"You can create hybrid command groups and sub-commands using the :meth:`.Bot.hybrid_group` decorator.\"\nmsgstr \":meth:`.Bot.hybrid_group` デコレータを使用して、ハイブリッドコマンドグループとサブコマンドを作成できます。\"\n\n#: ../../ext/commands/commands.rst:1226\nmsgid \"Due to a Discord limitation, slash command groups cannot be invoked directly so the ``fallback`` parameter allows you to create a sub-command that will be bound to callback of parent group.\"\nmsgstr \"Discordの制限により、 スラッシュコマンドグループは直接呼び出すことができないため、 ``fallback`` パラメータを使用して、親グループのコールバックを呼び出すサブコマンドを作成できます。\"\n\n#: ../../ext/commands/commands.rst:1232\nmsgid \"Due to certain limitations on slash commands, some features of text commands are not supported on hybrid commands. You can define a hybrid command as long as it meets the same subset that is supported for slash commands.\"\nmsgstr \"スラッシュコマンドには制限があるため、ハイブリッドコマンドではテキストコマンドの一部の機能がサポートされていません。スラッシュコマンドでサポートされている機能のみ使用している場合にハイブリッドコマンドを定義できます。\"\n\n#: ../../ext/commands/commands.rst:1236\nmsgid \"Following are currently **not supported** by hybrid commands:\"\nmsgstr \"以下は現時点でハイブリッドコマンドではサポート **されていません**:\"\n\n#: ../../ext/commands/commands.rst:1238\nmsgid \"Variable number of arguments. e.g. ``*arg: int``\"\nmsgstr \"可変長引数。例: ``*arg: int``\"\n\n#: ../../ext/commands/commands.rst:1239\nmsgid \"Group commands with a depth greater than 1.\"\nmsgstr \"深さが1より大きいグループコマンド。\"\n\n#: ../../ext/commands/commands.rst:1243\nmsgid \"Most :class:`typing.Union` types.\"\nmsgstr \"ほとんどの :class:`typing.Union` 型。\"\n\n#: ../../ext/commands/commands.rst:1241\nmsgid \"Unions of channel types are allowed\"\nmsgstr \"チャンネルの型のユニオン型は使用できます\"\n\n#: ../../ext/commands/commands.rst:1242\nmsgid \"Unions of user types are allowed\"\nmsgstr \"ユーザーの型のユニオン型は使用できます\"\n\n#: ../../ext/commands/commands.rst:1243\nmsgid \"Unions of user types with roles are allowed\"\nmsgstr \"チャンネルの型とロールの型のユニオン型は使用できます\"\n\n#: ../../ext/commands/commands.rst:1245\nmsgid \"Apart from that, all other features such as converters, checks, autocomplete, flags etc. are supported on hybrid commands. Note that due to a design constraint, decorators related to application commands such as :func:`discord.app_commands.autocomplete` should be placed below the :func:`~ext.commands.hybrid_command` decorator.\"\nmsgstr \"それ以外の、コンバーター、チェック、オートコンプリート、フラグ、その他はすべてハイブリッドコマンドで利用できます。なお、設計上の制限により、 :func:`discord.app_commands.autocomplete` といったアプリケーションコマンド関連のデコレータは :func:`~ext.commands.hybrid_command` デコレータの下に配置しないといけません。\"\n\n#: ../../ext/commands/commands.rst:1249\nmsgid \"For convenience and ease in writing code, The :class:`~ext.commands.Context` class implements some behavioural changes for various methods and attributes:\"\nmsgstr \"コードを簡単に書くために、 :class:`~ext.commands.Context` クラスのメソッドや属性の動作が変化します:\"\n\n#: ../../ext/commands/commands.rst:1252\nmsgid \":attr:`.Context.interaction` can be used to retrieve the slash command interaction.\"\nmsgstr \":attr:`.Context.interaction` を用いてスラッシュコマンドのインタラクションを取得できます。\"\n\n#: ../../ext/commands/commands.rst:1253\nmsgid \"Since interaction can only be responded to once, The :meth:`.Context.send` automatically determines whether to send an interaction response or a followup response.\"\nmsgstr \"インタラクションは一度しか応答できないため、 :meth:`.Context.send` は、インタラクション応答とフォローアップ応答のどちらを送信するかを自動的に決定します。\"\n\n#: ../../ext/commands/commands.rst:1255\nmsgid \":meth:`.Context.defer` defers the interaction response for slash commands but shows typing indicator for text commands.\"\nmsgstr \":meth:`.Context.defer` はスラッシュコマンドではインタラクション応答を遅らせ、テキストコマンドでは入力インジケーターを表示します。\"\n\n"
  },
  {
    "path": "docs/locale/ja/LC_MESSAGES/ext/commands/extensions.po",
    "content": "msgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: discordpy\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2023-06-21 01:17+0000\\n\"\n\"PO-Revision-Date: 2023-06-21 01:20\\n\"\n\"Last-Translator: \\n\"\n\"Language-Team: Japanese\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Plural-Forms: nplurals=1; plural=0;\\n\"\n\"X-Crowdin-Project: discordpy\\n\"\n\"X-Crowdin-Project-ID: 362783\\n\"\n\"X-Crowdin-Language: ja\\n\"\n\"X-Crowdin-File: /ext/commands/extensions.pot\\n\"\n\"X-Crowdin-File-ID: 68\\n\"\n\"Language: ja_JP\\n\"\n\n#: ../../ext/commands/extensions.rst:6\nmsgid \"Extensions\"\nmsgstr \"エクステンション\"\n\n#: ../../ext/commands/extensions.rst:8\nmsgid \"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**.\"\nmsgstr \"ボット開発ではボットを起動している間にコードを素早くアンロードし、再度ロードし直したい (ホットリロードとも呼ばれます) という時があります。コマンドフレームワークでは **エクステンション** と呼ばれる概念でこの機能が組み込まれています。\"\n\n#: ../../ext/commands/extensions.rst:11\nmsgid \"Primer\"\nmsgstr \"はじめに\"\n\n#: ../../ext/commands/extensions.rst:13\nmsgid \"An extension at its core is a python file with an entry point called ``setup``. This setup function must be a Python coroutine. It takes a single parameter -- the :class:`~.commands.Bot` that loads the extension.\"\nmsgstr \"その中核となるエクステンションは ``setup`` というエントリポイントを持つPythonファイルです。このsetupはPythonのコルーチンである必要があります。この関数はエクステンションをロードする :class:`~.commands.Bot` を受け取るための単一のパラメータを持ちます。\"\n\n#: ../../ext/commands/extensions.rst:15\nmsgid \"An example extension looks like this:\"\nmsgstr \"エクステンションの例は以下のとおりです:\"\n\n#: ../../ext/commands/extensions.rst:17\nmsgid \"hello.py\"\nmsgstr \"hello.py\"\n\n#: ../../ext/commands/extensions.rst:30\nmsgid \"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:`.Bot.load_extension`. To load this extension we call ``await bot.load_extension('hello')``.\"\nmsgstr \"この例では簡単なコマンドを定義し、エクステンションが読み込まれた際に、コマンドがボットに追加されるようにします。最後にエクステンションを読み込むために、 :meth:`.Bot.load_extension` を呼び出します。このエクステンションを読み込むためには、 ``await bot.load_extension('hello')`` を呼び出します。\"\n\n#: ../../ext/commands/extensions.rst:32\nmsgid \"Cogs\"\nmsgstr \"コグ\"\n\n#: ../../ext/commands/extensions.rst:35\nmsgid \"Extensions are usually used in conjunction with cogs. To read more about them, check out the documentation, :ref:`ext_commands_cogs`.\"\nmsgstr \"エクステンションは通常、コグと組み合わせて使用します。詳細については :ref:`ext_commands_cogs` のドキュメントを参照してください。\"\n\n#: ../../ext/commands/extensions.rst:39\nmsgid \"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``.\"\nmsgstr \"エクステンションのパスは究極的にはimportのメカニズムと似ています。これはフォルダ等がある場合、それをドットで区切らなければならないということです。例えば ``plugins/hello.py`` というエクステンションをロードする場合は、 ``plugins.hello`` という文字列を使います。\"\n\n#: ../../ext/commands/extensions.rst:42\nmsgid \"Reloading\"\nmsgstr \"リロード\"\n\n#: ../../ext/commands/extensions.rst:44\nmsgid \"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`.\"\nmsgstr \"エクステンションに変更を加えて、その変更を再読み込みしたい場合があります。このためにライブラリには :meth:`.Bot.reload_extension` という関数が用意されています。\"\n\n#: ../../ext/commands/extensions.rst:50\nmsgid \"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.\"\nmsgstr \"エクステンションを再読込みすると、その変更が適用されます。ボットを再起動せずに機能の追加や削除を行いたい場合に便利です。再読込処理中にエラーが発生した場合、ボットは再読込処理をする前の状態に戻ります。\"\n\n#: ../../ext/commands/extensions.rst:53\nmsgid \"Cleaning Up\"\nmsgstr \"クリーンアップ\"\n\n#: ../../ext/commands/extensions.rst:55\nmsgid \"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.\"\nmsgstr \"稀ではありますが、エクステンションにクリーンアップが必要だったり、いつアンロードするかを確認したい場合があります。このために ``setup`` に似たエクステンションがアンロードされるときに呼び出される ``teardown`` というエントリポイントが用意されています。\"\n\n#: ../../ext/commands/extensions.rst:57\nmsgid \"Exceptions raised in the ``teardown`` function are ignored, and the extension is still unloaded.\"\nmsgstr \"\"\n\n#: ../../ext/commands/extensions.rst:59\nmsgid \"basic_ext.py\"\nmsgstr \"basic_ext.py\"\n\n"
  },
  {
    "path": "docs/locale/ja/LC_MESSAGES/ext/commands/index.po",
    "content": "msgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: discordpy\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2023-06-21 01:17+0000\\n\"\n\"PO-Revision-Date: 2023-06-21 01:20\\n\"\n\"Last-Translator: \\n\"\n\"Language-Team: Japanese\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Plural-Forms: nplurals=1; plural=0;\\n\"\n\"X-Crowdin-Project: discordpy\\n\"\n\"X-Crowdin-Project-ID: 362783\\n\"\n\"X-Crowdin-Language: ja\\n\"\n\"X-Crowdin-File: /ext/commands/index.pot\\n\"\n\"X-Crowdin-File-ID: 66\\n\"\n\"Language: ja_JP\\n\"\n\n#: ../../ext/commands/index.rst:4\nmsgid \"``discord.ext.commands`` -- Bot commands framework\"\nmsgstr \"``discord.ext.commands`` -- ボットコマンドのフレームワーク\"\n\n#: ../../ext/commands/index.rst:6\nmsgid \"``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.\"\nmsgstr \"``discord.py`` は、Discordと連携するための低レベルな機能を提供します。多くの場合、このライブラリはBotの作成に用いられています。しかしこの作業を始めから正確に行うことは困難であり、混乱することもあるでしょう。拡張性が高く柔軟、そして強力なBotコマンドフレームワークは何度も繰り返し作成することになるでしょう。この理由から、 ``discord.py`` にはこれを扱う拡張ライブラリが付属しています。\"\n\n"
  },
  {
    "path": "docs/locale/ja/LC_MESSAGES/ext/tasks/index.po",
    "content": "msgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: discordpy\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2023-06-21 01:17+0000\\n\"\n\"PO-Revision-Date: 2024-04-17 02:43\\n\"\n\"Last-Translator: \\n\"\n\"Language-Team: Japanese\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Plural-Forms: nplurals=1; plural=0;\\n\"\n\"X-Crowdin-Project: discordpy\\n\"\n\"X-Crowdin-Project-ID: 362783\\n\"\n\"X-Crowdin-Language: ja\\n\"\n\"X-Crowdin-File: index.pot\\n\"\n\"X-Crowdin-File-ID: 82\\n\"\n\"Language: ja_JP\\n\"\n\n#: ../../index.rst:59\nmsgid \"discord.ext.commands API Reference\"\nmsgstr \"discord.ext.commands API リファレンス\"\n\n#: ../../index.rst:59\nmsgid \"discord.ext.tasks API Reference\"\nmsgstr \"discord.ext.tasks API リファレンス\"\n\n#: ../../index.rst:7\nmsgid \"Welcome to discord.py\"\nmsgstr \"discord.py へようこそ。\"\n\n#: ../../index.rst:12\nmsgid \"discord.py is a modern, easy to use, feature-rich, and async ready API wrapper for Discord.\"\nmsgstr \"discord.py は機能豊富かつモダンで使いやすい、非同期処理にも対応したDiscord用のAPIラッパーです。\"\n\n#: ../../index.rst:15\nmsgid \"**Features:**\"\nmsgstr \"**特徴:**\"\n\n#: ../../index.rst:17\nmsgid \"Modern Pythonic API using ``async``\\\\/``await`` syntax\"\nmsgstr \"``async``\\\\/``await`` 構文を使ったモダンなPythonらしいAPI\"\n\n#: ../../index.rst:18\nmsgid \"Sane rate limit handling that prevents 429s\"\nmsgstr \"429エラー防止の為のレート制限\"\n\n#: ../../index.rst:19\nmsgid \"Command extension to aid with bot creation\"\nmsgstr \"Bot作成に便利なコマンド拡張\"\n\n#: ../../index.rst:20\nmsgid \"Easy to use with an object oriented design\"\nmsgstr \"オブジェクト指向設計で使いやすい\"\n\n#: ../../index.rst:21\nmsgid \"Optimised for both speed and memory\"\nmsgstr \"メモリと速度の両方を最適化\"\n\n#: ../../index.rst:24\nmsgid \"Getting started\"\nmsgstr \"はじめに\"\n\n#: ../../index.rst:26\nmsgid \"Is this your first time using the library? This is the place to get started!\"\nmsgstr \"このライブラリを利用するのは初めてですか？ ここから始めてみましょう！\"\n\n#: ../../index.rst:28\nmsgid \"**First steps:** :doc:`intro` | :doc:`quickstart` | :doc:`logging`\"\nmsgstr \"**初めの一歩:** :doc:`intro` | :doc:`quickstart` | :doc:`logging`\"\n\n#: ../../index.rst:29\nmsgid \"**Working with Discord:** :doc:`discord` | :doc:`intents`\"\nmsgstr \"**Discordでの作業:** :doc:`discord` | :doc:`intents`\"\n\n#: ../../index.rst:30\nmsgid \"**Examples:** Many examples are available in the :resource:`repository <examples>`.\"\nmsgstr \"**サンプル:** :resource:`レポジトリ <examples>` にたくさんのサンプルが用意されています。\"\n\n#: ../../index.rst:33\nmsgid \"Getting help\"\nmsgstr \"ヘルプの参照\"\n\n#: ../../index.rst:35\nmsgid \"If you're having trouble with something, these resources might help.\"\nmsgstr \"何か困ることがあれば、次のリソースが役立つかもしれません。\"\n\n#: ../../index.rst:37\nmsgid \"Try the :doc:`faq` first, it's got answers to all common questions.\"\nmsgstr \"初めに :doc:`faq` を確認してみましょう。よくある質問に対する回答がまとめられています。\"\n\n#: ../../index.rst:38\nmsgid \"Ask us and hang out with us in our :resource:`Discord <discord>` server.\"\nmsgstr \":resource:`Discord <discord>` サーバーに参加し、質問してみましょう。\"\n\n#: ../../index.rst:39\nmsgid \"If you're looking for something specific, try the :ref:`index <genindex>` or :ref:`searching <search>`.\"\nmsgstr \"特定の何かを探している場合は :ref:`目次 <genindex>` か :ref:`検索 <search>` を利用してください。\"\n\n#: ../../index.rst:40\nmsgid \"Report bugs in the :resource:`issue tracker <issues>`.\"\nmsgstr \"バグは :resource:`issue tracker <issues>` で報告してください。\"\n\n#: ../../index.rst:41\nmsgid \"Ask in our :resource:`GitHub discussions page <discussions>`.\"\nmsgstr \":resource:`GitHubの議論ページ <discussions>` で質問してください。\"\n\n#: ../../index.rst:44\nmsgid \"Extensions\"\nmsgstr \"拡張機能\"\n\n#: ../../index.rst:46\nmsgid \"These extensions help you during development when it comes to common tasks.\"\nmsgstr \"この拡張機能は開発中におけるよくあるタスクを解決するのに役立ちます。\"\n\n#: ../../index.rst:55\nmsgid \"Manuals\"\nmsgstr \"マニュアル\"\n\n#: ../../index.rst:57\nmsgid \"These pages go into great detail about everything the API can do.\"\nmsgstr \"次のページではAPIができることすべてについて詳細に解説しています。\"\n\n#: ../../index.rst:68\nmsgid \"Meta\"\nmsgstr \"メタ情報\"\n\n#: ../../index.rst:70\nmsgid \"If you're looking for something related to the project itself, it's here.\"\nmsgstr \"プロジェクト自体に関連するものを探しているのであれば、こちらを参照してください。\"\n\n"
  },
  {
    "path": "docs/locale/ja/LC_MESSAGES/faq.po",
    "content": "msgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: discordpy\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2023-06-21 01:17+0000\\n\"\n\"PO-Revision-Date: 2024-04-17 02:43\\n\"\n\"Last-Translator: \\n\"\n\"Language-Team: Japanese\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Plural-Forms: nplurals=1; plural=0;\\n\"\n\"X-Crowdin-Project: discordpy\\n\"\n\"X-Crowdin-Project-ID: 362783\\n\"\n\"X-Crowdin-Language: ja\\n\"\n\"X-Crowdin-File: faq.pot\\n\"\n\"X-Crowdin-File-ID: 44\\n\"\n\"Language: ja_JP\\n\"\n\n#: ../../faq.rst:7\nmsgid \"Frequently Asked Questions\"\nmsgstr \"よくある質問\"\n\n#: ../../faq.rst:9\nmsgid \"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.\"\nmsgstr \"これは ``discord.py`` 及び拡張モジュールの利用に際し、よくある質問をまとめたものです。気兼ねなく質問やプルリクエストを提出してください。\"\n\n#: ../../faq.rst:13\nmsgid \"Questions\"\nmsgstr \"質問\"\n\n#: ../../faq.rst:16\nmsgid \"Coroutines\"\nmsgstr \"コルーチン\"\n\n#: ../../faq.rst:18\nmsgid \"Questions regarding coroutines and asyncio belong here.\"\nmsgstr \"コルーチンとasyncioに関する質問。\"\n\n#: ../../faq.rst:21\nmsgid \"What is a coroutine?\"\nmsgstr \"コルーチンとはなんですか。\"\n\n#: ../../faq.rst:23\nmsgid \"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.\"\nmsgstr \"|coroutine_link|_ とは ``await`` または ``yield from`` から呼び出さなければならない関数です。Pythonは ``await`` の付いた命令を処理する際、その時点で一度その関数の実行を停止し、他の作業を実行します。 これは `await` のついた命令の作業が終了し、再度停止したポイントに戻ってくるまで続きます。 これにより、スレッドや複雑なマルチプロセッシングを用いずに複数の処理を並列実行することができます。\"\n\n#: ../../faq.rst:28\nmsgid \"**If you forget to await a coroutine then the coroutine will not run. Never forget to await a coroutine.**\"\nmsgstr \"**コルーチンにawaitを記述し忘れた場合、コルーチンは実行されません。awaitの記述を忘れないように注意してください。**\"\n\n#: ../../faq.rst:31\nmsgid \"Where can I use ``await``\\\\?\"\nmsgstr \"``await`` はどこで使用することができますか。\"\n\n#: ../../faq.rst:33\nmsgid \"You can only use ``await`` inside ``async def`` functions and nowhere else.\"\nmsgstr \"``await`` は ``async def`` で定義される関数の中でのみ使用できます。\"\n\n#: ../../faq.rst:36\nmsgid \"What does \\\"blocking\\\" mean?\"\nmsgstr \"「ブロッキング」とはなんですか。\"\n\n#: ../../faq.rst:38\nmsgid \"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.\"\nmsgstr \"非同期プログラミングにおけるブロッキングとは、関数内の ``await`` 修飾子がないコードすべてを指します。 しかし、全てのブロッキングが悪いというわけではありません。ブロッキングを使用することは避けられませんが、ブロックの発生は出来るだけ少なくする必要があります。長時間のブロックが発生すると、関数の実行が停止せず他の命令を処理することができないため、長時間Botがフリーズすることになることを覚えておきましょう。\"\n\n#: ../../faq.rst:43\nmsgid \"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.\"\nmsgstr \"ログの出力を有効にしている場合、ライブラリはブロッキングが起きていることを ``Heartbeat blocked for more than N seconds.`` というメッセージで警告します。ログの出力を有効にするには、 :ref:`logging_setup` を参照してください。\"\n\n#: ../../faq.rst:47\nmsgid \"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: ::\"\nmsgstr \"長時間のブロッキングの原因として一般的なのは :func:`time.sleep` などです。 これは使用せず、下記の例のように :func:`asyncio.sleep` を使用してください。\"\n\n#: ../../faq.rst:56\nmsgid \"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.\"\nmsgstr \"また、これだけでなく、有名なモジュール :doc:`req:index` のHTTPリクエストも長時間ブロックの原因になります。 :doc:`req:index` モジュールは同期プログラミングにおいては素晴らしいモジュールですが、特定のリクエストがイベントループを長時間ブロックする可能性があるため、 :mod:`asyncio` には適していません。 代わりにこのライブラリと一緒にインストールされた :doc:`aiohttp <aio:index>` を使用してください。\"\n\n#: ../../faq.rst:61\nmsgid \"Consider the following example: ::\"\nmsgstr \"次の例を見てみましょう。\"\n\n#: ../../faq.rst:77\nmsgid \"General\"\nmsgstr \"一般\"\n\n#: ../../faq.rst:79\nmsgid \"General questions regarding library usage belong here.\"\nmsgstr \"ライブラリの使用に関する一般的な質問。\"\n\n#: ../../faq.rst:82\nmsgid \"Where can I find usage examples?\"\nmsgstr \"使用例はどこで確認できますか。\"\n\n#: ../../faq.rst:84\nmsgid \"Example code can be found in the `examples folder <https://github.com/Rapptz/discord.py/tree/master/examples>`_ in the repository.\"\nmsgstr \"サンプルコードはレポジトリの `examplesフォルダ <https://github.com/Rapptz/discord.py/tree/master/examples>`_ で確認できます。\"\n\n#: ../../faq.rst:88\nmsgid \"How do I set the \\\"Playing\\\" status?\"\nmsgstr \"「プレイ中」状態の設定をするにはどうすればいいですか。\"\n\n#: ../../faq.rst:90\nmsgid \"The ``activity`` keyword argument may be passed in the :class:`Client` constructor or :meth:`Client.change_presence`, given an :class:`Activity` object.\"\nmsgstr \"キーワード引数である ``activity`` は :class:`Client` のコンストラクタ、または :meth:`Client.change_presence` に :class:`Activity` を渡すことで設定できます。\"\n\n#: ../../faq.rst:92\nmsgid \"The constructor may be used for static activities, while :meth:`Client.change_presence` may be used to update the activity at runtime.\"\nmsgstr \"静的なアクティビティを設定する際はコンストラクタ、実行時にアクティビティを更新する際には :meth:`Client.change_presence` が利用できます。\"\n\n#: ../../faq.rst:96\nmsgid \"It is highly discouraged to use :meth:`Client.change_presence` or API calls in :func:`on_ready` as this event may be called many times while running, not just once.\"\nmsgstr \":func:`on_ready` で :meth:`Client.change_presence` やその他APIの呼び出しを行うことは推奨できません。このイベントは実行中に一度ではなく複数回呼び出される可能性があるためです。\"\n\n#: ../../faq.rst:98\nmsgid \"There is a high chance of disconnecting if presences are changed right after connecting.\"\nmsgstr \"また、接続後すぐにプレゼンスを変更すると高確率で切断されます。\"\n\n#: ../../faq.rst:100\nmsgid \"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:\"\nmsgstr \"ステータスタイプ(プレイ中、再生中、配信中、視聴中)は列挙型の :class:`ActivityType` を指定することで設定が可能です。メモリの最適化のため、一部のアクティビティはスリム化して提供しています。\"\n\n#: ../../faq.rst:103\nmsgid \":class:`Game`\"\nmsgstr \":class:`Game`\"\n\n#: ../../faq.rst:104\nmsgid \":class:`Streaming`\"\nmsgstr \":class:`Streaming`\"\n\n#: ../../faq.rst:106\nmsgid \"Putting both of these pieces of info together, you get the following: ::\"\nmsgstr \"これらの情報をまとめると以下のようになります。\"\n\n#: ../../faq.rst:115\nmsgid \"How do I send a message to a specific channel?\"\nmsgstr \"特定のチャンネルにメッセージを送るにはどうすればいいですか。\"\n\n#: ../../faq.rst:117\nmsgid \"You must fetch the channel directly and then call the appropriate method. Example: ::\"\nmsgstr \"チャンネルを直接取得してから、適切なメソッドの呼び出しを行う必要があります。以下がその例です。\"\n\n#: ../../faq.rst:123\nmsgid \"How do I send a DM?\"\nmsgstr \"DMを送るにはどうすればいいですか。\"\n\n#: ../../faq.rst:125\nmsgid \"Get the :class:`User` or :class:`Member` object and call :meth:`abc.Messageable.send`. For example: ::\"\nmsgstr \":class:`User` か :class:`Member` を取得し、 :meth:`abc.Messageable.send` を呼び出してください。以下は使用例です。 ::\"\n\n#: ../../faq.rst:130\nmsgid \"If you are responding to an event, such as :func:`on_message`, you already have the :class:`User` object via :attr:`Message.author`: ::\"\nmsgstr \":func:`on_message` などのイベントで応答を返したい場合は、 :attr:`Message.author` を介して :class:`User` オブジェクトが取得できます。 ::\"\n\n#: ../../faq.rst:135\nmsgid \"How do I get the ID of a sent message?\"\nmsgstr \"送信したメッセージのIDを取得するにはどうすればいいですか。\"\n\n#: ../../faq.rst:137\nmsgid \":meth:`abc.Messageable.send` returns the :class:`Message` that was sent. The ID of a message can be accessed via :attr:`Message.id`: ::\"\nmsgstr \":meth:`abc.Messageable.send` は送信したメッセージの :class:`Message` を返します。メッセージのIDには :attr:`Message.id` でアクセスできます。 ::\"\n\n#: ../../faq.rst:144\nmsgid \"How do I upload an image?\"\nmsgstr \"画像をアップロードするにはどうすればいいですか。\"\n\n#: ../../faq.rst:146\nmsgid \"To upload something to Discord you have to use the :class:`File` object.\"\nmsgstr \"Discordに何かをアップロードする際には :class:`File` オブジェクトを使用する必要があります。\"\n\n#: ../../faq.rst:148\nmsgid \"A :class:`File` accepts two parameters, the file-like object (or file path) and the filename to pass to Discord when uploading.\"\nmsgstr \":class:`File` は二つのパラメータがあり、ファイルライクなオブジェクト(または、そのファイルパス)と、ファイル名を渡すことができます。\"\n\n#: ../../faq.rst:151\nmsgid \"If you want to upload an image it's as simple as: ::\"\nmsgstr \"画像をアップロードするだけなら、以下のように簡単に行なえます。\"\n\n#: ../../faq.rst:155\nmsgid \"If you have a file-like object you can do as follows: ::\"\nmsgstr \"もし、ファイルライクなオブジェクトがあるなら、以下のような実装が可能です。\"\n\n#: ../../faq.rst:160\nmsgid \"To upload multiple files, you can use the ``files`` keyword argument instead of ``file``\\\\: ::\"\nmsgstr \"複数のファイルをアップロードするには、 ``file`` の代わりに ``files`` を使用しましょう。\"\n\n#: ../../faq.rst:168\nmsgid \"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:\"\nmsgstr \"URLから何かをアップロードする場合は、 :doc:`aiohttp <aio:index>` のHTTPリクエストを使用し、 :class:`io.BytesIO` インスタンスを :class:`File` に渡す必要があります。\"\n\n#: ../../faq.rst:185\nmsgid \"How can I add a reaction to a message?\"\nmsgstr \"メッセージにリアクションをつけるにはどうすればいいですか。\"\n\n#: ../../faq.rst:187\nmsgid \"You use the :meth:`Message.add_reaction` method.\"\nmsgstr \":meth:`Message.add_reaction` を使用してください。\"\n\n#: ../../faq.rst:189\nmsgid \"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:\"\nmsgstr \"Unicodeの絵文字を使用する場合は、文字列内の有効なUnicodeのコードポイントを渡す必要があります。 例を挙げると、このようになります。\"\n\n#: ../../faq.rst:191\nmsgid \"``'👍'``\"\nmsgstr \"``'👍'``\"\n\n#: ../../faq.rst:192\nmsgid \"``'\\\\U0001F44D'``\"\nmsgstr \"``'\\\\U0001F44D'``\"\n\n#: ../../faq.rst:193\nmsgid \"``'\\\\N{THUMBS UP SIGN}'``\"\nmsgstr \"``'\\\\N{THUMBS UP SIGN}'``\"\n\n#: ../../faq.rst:195\n#: ../../faq.rst:213\n#: ../../faq.rst:292\n#: ../../faq.rst:310\n#: ../../faq.rst:334\nmsgid \"Quick example:\"\nmsgstr \"簡単な例:\"\n\n#: ../../faq.rst:203\nmsgid \"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.\"\nmsgstr \"メッセージに含まれる絵文字を使用したい場合は、特になにをするでもなく、コンテンツ内のコードポイントを取得しています。また、 ``':thumbsup:'`` のような簡略化したものを送信することは **できません** 。\"\n\n#: ../../faq.rst:206\nmsgid \"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.\"\nmsgstr \"カスタム絵文字については、 :class:`Emoji` のインスタンスを渡してください。 ``'<:名前:ID>'`` 形式の文字列も渡せますが、その絵文字が使えるなら、 :meth:`Client.get_emoji` でIDから絵文字を取得したり、 :attr:`Client.emojis` や :attr:`Guild.emojis` に対して :func:`utils.find`/ :func:`utils.get` を利用することで取得ができるはずです。\"\n\n#: ../../faq.rst:210\nmsgid \"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>``.\"\nmsgstr \"カスタム絵文字の名前とIDをクライアント側で知るには、 ``:カスタム絵文字:`` の頭にバックスラッシュ(円記号)をつけます。たとえば、メッセージ ``\\\\:python3:`` を送信すると、結果は ``<:python3:232720527448342530>`` になります。\"\n\n#: ../../faq.rst:232\nmsgid \"How do I pass a coroutine to the player's \\\"after\\\" function?\"\nmsgstr \"音楽プレイヤーの「後処理」関数にコルーチンを渡すにはどうすればいいですか。\"\n\n#: ../../faq.rst:234\nmsgid \"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.\"\nmsgstr \"ライブラリの音楽プレーヤーは別のスレッドで起動するもので、コルーチン内で実行されるものではありません。しかし、 ``after`` にコルーチンが渡せないというわけではありません。コルーチンを渡すためには、いくつかの機能を包括した呼び出し可能コードで渡す必要があります。\"\n\n#: ../../faq.rst:238\nmsgid \"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.\"\nmsgstr \"コルーチンを呼び出すという動作はスレッドセーフなものではないということを最初に理解しておく必要があります。技術的に別スレッドなので、スレッドセーフに呼び出す際には注意が必要です。幸運にも、 :mod:`asyncio` には :func:`asyncio.run_coroutine_threadsafe` という関数があります。これを用いることで、別スレッドからコルーチンを呼び出すことが可能です。\"\n\n#: ../../faq.rst:243\nmsgid \"However, this function returns a :class:`~concurrent.futures.Future` and to actually call it we have to fetch its result. Putting all of this together we can do the following:\"\nmsgstr \"しかし、この関数は :class:`~concurrent.futures.Future` を返すので、実際にはそこから結果を読み出す必要があります。これをすべてまとめると、次のことができます。\"\n\n#: ../../faq.rst:260\nmsgid \"How do I run something in the background?\"\nmsgstr \"バックグラウンドで何かを動かすにはどうすればいいですか。\"\n\n#: ../../faq.rst:262\nmsgid \"`Check the background_task.py example. <https://github.com/Rapptz/discord.py/blob/master/examples/background_task.py>`_\"\nmsgstr \"`background_task.pyの例を参照してください。 <https://github.com/Rapptz/discord.py/blob/master/examples/background_task.py>`_\"\n\n#: ../../faq.rst:265\nmsgid \"How do I get a specific model?\"\nmsgstr \"特定のモデルを取得するにはどうすればいいですか。\"\n\n#: ../../faq.rst:267\nmsgid \"There are multiple ways of doing this. If you have a specific model's ID then you can use one of the following functions:\"\nmsgstr \"方法は複数ありますが、特定のモデルのIDがわかっていれば、以下の方法が使えます。\"\n\n#: ../../faq.rst:270\nmsgid \":meth:`Client.get_channel`\"\nmsgstr \":meth:`Client.get_channel`\"\n\n#: ../../faq.rst:271\nmsgid \":meth:`Client.get_guild`\"\nmsgstr \":meth:`Client.get_guild`\"\n\n#: ../../faq.rst:272\nmsgid \":meth:`Client.get_user`\"\nmsgstr \":meth:`Client.get_user`\"\n\n#: ../../faq.rst:273\nmsgid \":meth:`Client.get_emoji`\"\nmsgstr \":meth:`Client.get_emoji`\"\n\n#: ../../faq.rst:274\nmsgid \":meth:`Guild.get_member`\"\nmsgstr \":meth:`Guild.get_member`\"\n\n#: ../../faq.rst:275\nmsgid \":meth:`Guild.get_channel`\"\nmsgstr \":meth:`Guild.get_channel`\"\n\n#: ../../faq.rst:276\nmsgid \":meth:`Guild.get_role`\"\nmsgstr \":meth:`Guild.get_role`\"\n\n#: ../../faq.rst:278\nmsgid \"The following use an HTTP request:\"\nmsgstr \"以下はHTTPリクエストを使用します。\"\n\n#: ../../faq.rst:280\nmsgid \":meth:`abc.Messageable.fetch_message`\"\nmsgstr \":meth:`abc.Messageable.fetch_message`\"\n\n#: ../../faq.rst:281\nmsgid \":meth:`Client.fetch_user`\"\nmsgstr \":meth:`Client.fetch_user`\"\n\n#: ../../faq.rst:282\nmsgid \":meth:`Client.fetch_guilds`\"\nmsgstr \":meth:`Client.fetch_guilds`\"\n\n#: ../../faq.rst:283\nmsgid \":meth:`Client.fetch_guild`\"\nmsgstr \":meth:`Client.fetch_guild`\"\n\n#: ../../faq.rst:284\nmsgid \":meth:`Guild.fetch_emoji`\"\nmsgstr \":meth:`Guild.fetch_emoji`\"\n\n#: ../../faq.rst:285\nmsgid \":meth:`Guild.fetch_emojis`\"\nmsgstr \":meth:`Guild.fetch_emojis`\"\n\n#: ../../faq.rst:286\nmsgid \":meth:`Guild.fetch_member`\"\nmsgstr \":meth:`Guild.fetch_member`\"\n\n#: ../../faq.rst:289\nmsgid \"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.\"\nmsgstr \"上記の関数を使えない状況の場合、 :func:`utils.find` または :func:`utils.get` が役に立つでしょう。\"\n\n#: ../../faq.rst:305\nmsgid \"How do I make a web request?\"\nmsgstr \"Webリクエストはどうやって作ればよいですか。\"\n\n#: ../../faq.rst:307\nmsgid \"To make a request, you should use a non-blocking library. This library already uses and requires a 3rd party library for making requests, :doc:`aiohttp <aio:index>`.\"\nmsgstr \"リクエストを送るには、ノンブロッキングのライブラリを使わなければなりません。このライブラリは、リクエストを作成するのにサードパーティー製の :doc:`aiohttp <aio:index>` を必要とします。\"\n\n#: ../../faq.rst:319\nmsgid \"See `aiohttp's full documentation <http://aiohttp.readthedocs.io/en/stable/>`_ for more information.\"\nmsgstr \"詳細は `aiohttpの完全なドキュメント <http://aiohttp.readthedocs.io/en/stable/>`_ を参照してください。\"\n\n#: ../../faq.rst:324\nmsgid \"How do I use a local image file for an embed image?\"\nmsgstr \"Embedの画像にローカルの画像を使用するにはどうすればいいですか。\"\n\n#: ../../faq.rst:326\nmsgid \"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.\"\nmsgstr \"特殊なケースとして、画像が別々に表示されないようDiscordにembedを用いてアップロードする際、画像は代わりにembedのサムネイルや画像、フッター、製作者アイコンに表示されます。\"\n\n#: ../../faq.rst:329\nmsgid \"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.\"\nmsgstr \"これを行うには、通常通り :meth:`abc.Messageable.send` を用いて画像をアップロードし、Embedの画像URLに ``attachment://image.png`` を設定します。 ``image.png`` は送信する画像のファイル名になります。\"\n\n#: ../../faq.rst:344\nmsgid \"Is there an event for audit log entries being created?\"\nmsgstr \"監査ログのエントリが作成されるイベントはありますか。\"\n\n#: ../../faq.rst:346\nmsgid \"This event is now available in the library and Discord as of version 2.2. It can be found under :func:`on_audit_log_entry_create`.\"\nmsgstr \"このイベントはバージョン2.2の時期にDiscordで利用可能になりました。 :func:`on_audit_log_entry_create` にあります。\"\n\n#: ../../faq.rst:350\nmsgid \"Commands Extension\"\nmsgstr \"コマンド拡張\"\n\n#: ../../faq.rst:352\nmsgid \"Questions regarding ``discord.ext.commands`` belong here.\"\nmsgstr \"``discord.ext.commands`` に関する質問。\"\n\n#: ../../faq.rst:355\nmsgid \"Why does ``on_message`` make my commands stop working?\"\nmsgstr \"``on_message`` を使うとコマンドが動作しなくなります。どうしてですか。\"\n\n#: ../../faq.rst:357\nmsgid \"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: ::\"\nmsgstr \"デフォルトで提供されている ``on_message`` をオーバーライドすると、コマンドが実行されなくなります。これを修正するには ``on_message`` の最後に ``bot.process_commands(message)`` を追加してみてください。\"\n\n#: ../../faq.rst:366\nmsgid \"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::\"\nmsgstr \"別の方法として、 ``on_message`` に書きたい処理を **リスナー** として登録することもできます。この方法では ``bot.process_commands()`` を呼び出す必要はありません。また、この方法ではメッセージの受信に対して複数の処理を非同期に実行することができます。使用例::\"\n\n#: ../../faq.rst:376\nmsgid \"Why do my arguments require quotes?\"\nmsgstr \"コマンドの引数に引用符が必要なのはなぜですか。\"\n\n#: ../../faq.rst:378\nmsgid \"In a simple command defined as:\"\nmsgstr \"次の簡単なコマンドを見てみましょう。\"\n\n#: ../../faq.rst:386\nmsgid \"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:\"\nmsgstr \"このコマンドを ``?echo a b c`` のように実行したとき、コマンドに渡されるのは最初の引数だけです。その後の引数はすべて無視されます。これを正常に動かすためには ``?echo \\\"a b c\\\"`` のようにしてコマンドを実行するか、コマンドの引数を下記の例のようにしてみましょう。\"\n\n#: ../../faq.rst:395\nmsgid \"This will allow you to use ``?echo a b c`` without needing the quotes.\"\nmsgstr \"これにより、クォーテーションなしで ``?echo a b c`` を使用することができます。\"\n\n#: ../../faq.rst:398\nmsgid \"How do I get the original ``message``\\\\?\"\nmsgstr \"元の ``message`` を取得するにはどうすればよいですか。\"\n\n#: ../../faq.rst:400\nmsgid \"The :class:`~ext.commands.Context` contains an attribute, :attr:`~.Context.message` to get the original message.\"\nmsgstr \":class:`~ext.commands.Context` は元のメッセージを取得するための属性である :attr:`~.Context.message` を持っています。\"\n\n#: ../../faq.rst:403\n#: ../../faq.rst:417\nmsgid \"Example:\"\nmsgstr \"例:\"\n\n#: ../../faq.rst:412\nmsgid \"How do I make a subcommand?\"\nmsgstr \"サブコマンドを作るにはどうすればいいですか。\"\n\n#: ../../faq.rst:414\nmsgid \"Use the :func:`~ext.commands.group` decorator. This will transform the callback into a :class:`~ext.commands.Group` which will allow you to add commands into the group operating as \\\"subcommands\\\". These groups can be arbitrarily nested as well.\"\nmsgstr \":func:`~ext.commands.group` デコレータを使います。これにより、コールバックが :class:`~ext.commands.Group` に変換され、groupに「サブコマンド」として動作するコマンドを追加できます。これらのグループは、ネストすることもできます。\"\n\n#: ../../faq.rst:430\nmsgid \"This could then be used as ``?git push origin master``.\"\nmsgstr \"これは ``?git push origin master`` のように使うことができます。\"\n\n#: ../../faq.rst:433\nmsgid \"Views and Modals\"\nmsgstr \"ビューとモーダル\"\n\n#: ../../faq.rst:435\nmsgid \"Questions regarding :class:`discord.ui.View`, :class:`discord.ui.Modal`, and their components such as buttons, select menus, etc.\"\nmsgstr \":class:`discord.ui.View` 、 :class:`discord.ui.Modal` 、およびボタン、選択メニューなどそれらのコンポーネントに関する質問。\"\n\n#: ../../faq.rst:438\nmsgid \"How can I disable all items on timeout?\"\nmsgstr \"タイムアウト時にすべての項目を無効にするにはどうすればよいですか?\"\n\n#: ../../faq.rst:440\nmsgid \"This requires three steps.\"\nmsgstr \"これには3つのステップが必要です。\"\n\n#: ../../faq.rst:442\nmsgid \"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`.\"\nmsgstr \":meth:`~abc.Messageable.send` の戻り値の型を使用して、または :meth:`Interaction.original_response` から取得した :class:`~discord.ui.View` にメッセージを添付します。\"\n\n#: ../../faq.rst:443\nmsgid \"Inside :meth:`~ui.View.on_timeout`, loop over all items inside the view and mark them disabled.\"\nmsgstr \":meth:`~ui.View.on_timeout` 内で、ビュー内のすべての項目をループし無効にします。\"\n\n#: ../../faq.rst:444\nmsgid \"Edit the message we retrieved in step 1 with the newly modified view.\"\nmsgstr \"ステップ1で取得したメッセージを新しく変更したビューで編集します。\"\n\n#: ../../faq.rst:446\nmsgid \"Putting it all together, we can do this in a text command:\"\nmsgstr \"すべてをまとめると、テキストコマンドではこのように行うことができます。\"\n\n#: ../../faq.rst:470\nmsgid \"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`.\"\nmsgstr \"アプリケーションコマンドは :meth:`InteractionResponse.send_message` で応答したときメッセージを返さないため、信頼性の高い方法で行うには :meth:`Interaction.original_response` を使用してメッセージを取得すべきです。\"\n\n#: ../../faq.rst:472\nmsgid \"Putting it all together, using the previous view definition:\"\nmsgstr \"以前のビューの定義を使用して、すべてをまとめます。\"\n\n#: ../../faq.rst:487\nmsgid \"Application Commands\"\nmsgstr \"アプリケーションコマンド\"\n\n#: ../../faq.rst:489\nmsgid \"Questions regarding Discord's new application commands, commonly known as \\\"slash commands\\\" or \\\"context menu commands\\\".\"\nmsgstr \"一般的に「スラッシュコマンド」や「コンテキストメニューコマンド」と呼ばれている、Discordの新しいアプリケーションコマンドに関する質問。\"\n\n#: ../../faq.rst:492\nmsgid \"My bot's commands are not showing up!\"\nmsgstr \"私のボットのコマンドが一覧に表示されません！\"\n\n#: ../../faq.rst:494\nmsgid \"Did you :meth:`~.CommandTree.sync` your command? Commands need to be synced before they will appear.\"\nmsgstr \"コマンドを :meth:`~.CommandTree.sync` しましたか？コマンドが表示されるにはその前に同期する必要があります。\"\n\n#: ../../faq.rst:495\nmsgid \"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\\\"))``.\"\nmsgstr \"正しい権限でBotを招待しましたか？ ``bot`` スコープに加えて、 ``applications.commands`` スコープ付きでBotを招待する必要があります。例えば、以下の URL でBotを招待します: ``https://discord.com/oauth2/authorize?client_id=<client id>&scope=applications.commands+bot`` 。 あるいは、 :func:`utils.oauth_url` を使用している場合は、 ``oauth_url(<other options>, scopes=(\\\"bot\\\", \\\"applications.commands\\\"))`` のように関数を呼び出すことができます。\"\n\n"
  },
  {
    "path": "docs/locale/ja/LC_MESSAGES/index.po",
    "content": "msgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: discordpy\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2023-06-21 01:17+0000\\n\"\n\"PO-Revision-Date: 2023-06-21 01:20\\n\"\n\"Last-Translator: \\n\"\n\"Language-Team: Japanese\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Plural-Forms: nplurals=1; plural=0;\\n\"\n\"X-Crowdin-Project: discordpy\\n\"\n\"X-Crowdin-Project-ID: 362783\\n\"\n\"X-Crowdin-Language: ja\\n\"\n\"X-Crowdin-File: index.pot\\n\"\n\"X-Crowdin-File-ID: 82\\n\"\n\"Language: ja_JP\\n\"\n\n#: ../../index.rst:59\nmsgid \"discord.ext.commands API Reference\"\nmsgstr \"discord.ext.commands API リファレンス\"\n\n#: ../../index.rst:59\nmsgid \"discord.ext.tasks API Reference\"\nmsgstr \"discord.ext.tasks API リファレンス\"\n\n#: ../../index.rst:7\nmsgid \"Welcome to discord.py\"\nmsgstr \"discord.py へようこそ。\"\n\n#: ../../index.rst:12\nmsgid \"discord.py is a modern, easy to use, feature-rich, and async ready API wrapper for Discord.\"\nmsgstr \"discord.py は機能豊富かつモダンで使いやすい、非同期処理にも対応したDiscord用のAPIラッパーです。\"\n\n#: ../../index.rst:15\nmsgid \"**Features:**\"\nmsgstr \"**特徴:**\"\n\n#: ../../index.rst:17\nmsgid \"Modern Pythonic API using ``async``\\\\/``await`` syntax\"\nmsgstr \"``async``\\\\/``await`` 構文を使ったモダンなPythonらしいAPI\"\n\n#: ../../index.rst:18\nmsgid \"Sane rate limit handling that prevents 429s\"\nmsgstr \"429エラー防止の為のレート制限\"\n\n#: ../../index.rst:19\nmsgid \"Command extension to aid with bot creation\"\nmsgstr \"Bot作成に便利なコマンド拡張\"\n\n#: ../../index.rst:20\nmsgid \"Easy to use with an object oriented design\"\nmsgstr \"オブジェクト指向設計で使いやすい\"\n\n#: ../../index.rst:21\nmsgid \"Optimised for both speed and memory\"\nmsgstr \"メモリと速度の両方を最適化\"\n\n#: ../../index.rst:24\nmsgid \"Getting started\"\nmsgstr \"はじめに\"\n\n#: ../../index.rst:26\nmsgid \"Is this your first time using the library? This is the place to get started!\"\nmsgstr \"このライブラリを利用するのは初めてですか？ ここから始めてみましょう！\"\n\n#: ../../index.rst:28\nmsgid \"**First steps:** :doc:`intro` | :doc:`quickstart` | :doc:`logging`\"\nmsgstr \"**初めの一歩:** :doc:`intro` | :doc:`quickstart` | :doc:`logging`\"\n\n#: ../../index.rst:29\nmsgid \"**Working with Discord:** :doc:`discord` | :doc:`intents`\"\nmsgstr \"**Discordでの作業:** :doc:`discord` | :doc:`intents`\"\n\n#: ../../index.rst:30\nmsgid \"**Examples:** Many examples are available in the :resource:`repository <examples>`.\"\nmsgstr \"**サンプル:** :resource:`レポジトリ <examples>` にたくさんのサンプルが用意されています。\"\n\n#: ../../index.rst:33\nmsgid \"Getting help\"\nmsgstr \"ヘルプの参照\"\n\n#: ../../index.rst:35\nmsgid \"If you're having trouble with something, these resources might help.\"\nmsgstr \"何か困ることがあれば、次のリソースが役立つかもしれません。\"\n\n#: ../../index.rst:37\nmsgid \"Try the :doc:`faq` first, it's got answers to all common questions.\"\nmsgstr \"初めに :doc:`faq` を確認してみましょう。よくある質問に対する回答がまとめられています。\"\n\n#: ../../index.rst:38\nmsgid \"Ask us and hang out with us in our :resource:`Discord <discord>` server.\"\nmsgstr \":resource:`Discord <discord>` サーバーに参加し、質問してみましょう。\"\n\n#: ../../index.rst:39\nmsgid \"If you're looking for something specific, try the :ref:`index <genindex>` or :ref:`searching <search>`.\"\nmsgstr \"特定の何かを探している場合は :ref:`目次 <genindex>` か :ref:`検索 <search>` を利用してください。\"\n\n#: ../../index.rst:40\nmsgid \"Report bugs in the :resource:`issue tracker <issues>`.\"\nmsgstr \"バグは :resource:`issue tracker <issues>` で報告してください。\"\n\n#: ../../index.rst:41\nmsgid \"Ask in our :resource:`GitHub discussions page <discussions>`.\"\nmsgstr \":resource:`GitHubの議論ページ <discussions>` で質問してください。\"\n\n#: ../../index.rst:44\nmsgid \"Extensions\"\nmsgstr \"拡張機能\"\n\n#: ../../index.rst:46\nmsgid \"These extensions help you during development when it comes to common tasks.\"\nmsgstr \"この拡張機能は開発中におけるよくあるタスクを解決するのに役立ちます。\"\n\n#: ../../index.rst:55\nmsgid \"Manuals\"\nmsgstr \"マニュアル\"\n\n#: ../../index.rst:57\nmsgid \"These pages go into great detail about everything the API can do.\"\nmsgstr \"次のページではAPIができることすべてについて詳細に解説しています。\"\n\n#: ../../index.rst:68\nmsgid \"Meta\"\nmsgstr \"メタ情報\"\n\n#: ../../index.rst:70\nmsgid \"If you're looking for something related to the project itself, it's here.\"\nmsgstr \"プロジェクト自体に関連するものを探しているのであれば、こちらを参照してください。\"\n\n"
  },
  {
    "path": "docs/locale/ja/LC_MESSAGES/intents.po",
    "content": "msgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: discordpy\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2023-06-21 01:17+0000\\n\"\n\"PO-Revision-Date: 2024-04-17 02:43\\n\"\n\"Last-Translator: \\n\"\n\"Language-Team: Japanese\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Plural-Forms: nplurals=1; plural=0;\\n\"\n\"X-Crowdin-Project: discordpy\\n\"\n\"X-Crowdin-Project-ID: 362783\\n\"\n\"X-Crowdin-Language: ja\\n\"\n\"X-Crowdin-File: intents.pot\\n\"\n\"X-Crowdin-File-ID: 86\\n\"\n\"Language: ja_JP\\n\"\n\n#: ../../intents.rst:8\nmsgid \"A Primer to Gateway Intents\"\nmsgstr \"ゲートウェイインテント入門\"\n\n#: ../../intents.rst:10\nmsgid \"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 to specific buckets of events. The events that correspond to each intent is documented in the individual attribute of the :class:`Intents` documentation.\"\nmsgstr \"バージョン1.5では :class:`Intents` が導入されました。これにより、Botの書き方が根本的に変わります。基本的にインテントは、特定のイベント群をBotにサブスクライブさせるためのものです。各インテントに対応するイベントは、 :class:`Intents` のドキュメントに個別の属性として記載されています。\"\n\n#: ../../intents.rst:12\nmsgid \"These intents are passed to the constructor of :class:`Client` or its subclasses (:class:`AutoShardedClient`, :class:`~.AutoShardedBot`, :class:`~.Bot`) with the ``intents`` argument.\"\nmsgstr \"インテントは ``intents`` 引数を介して :class:`Client` またはそのサブクラス(:class:`AutoShardedClient`, :class:`~.AutoShardedBot`, :class:`~.Bot`)のコンストラクタに渡されます。\"\n\n#: ../../intents.rst:15\nmsgid \"What intents are needed?\"\nmsgstr \"どのインテントが必要でしょうか？\"\n\n#: ../../intents.rst:17\nmsgid \"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.\"\nmsgstr \"あなたのBotに必要なインテントは、あなたにしかわかりません。 :class:`Intents` クラスのドキュメントの各属性欄には、どの :ref:`events <discord-api-events>` に対応し、どのようなキャッシュを有効化するのか記述されています。\"\n\n#: ../../intents.rst:19\nmsgid \"For example, if you want a bot that functions without spammy events like presences or typing then we could do the following:\"\nmsgstr \"たとえば、プレゼンスやタイピングといったわずらわしいイベント抜きに動作するbotを書きたい場合、次のようにします。\"\n\n#: ../../intents.rst:35\nmsgid \"Note that this doesn't enable :attr:`Intents.members` since it's a privileged intent.\"\nmsgstr \"なお、特権インテントであるため、 :attr:`Intents.members` は有効になりません。\"\n\n#: ../../intents.rst:37\nmsgid \"Another example showing a bot that only deals with messages and guild information:\"\nmsgstr \"別の例: メッセージとギルド情報だけを扱うボット:\"\n\n#: ../../intents.rst:56\nmsgid \"Privileged Intents\"\nmsgstr \"特権インテント\"\n\n#: ../../intents.rst:58\nmsgid \"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**.\"\nmsgstr \"API変更に伴い、Bot製作者がインテントを指定する必要が生じました。いくつかのインテントはより制約され、手動での設定を必要とするようになりました。これらのインテントを **特権インテント** と呼びます。\"\n\n#: ../../intents.rst:60\nmsgid \"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:\"\nmsgstr \"特権インテントは、開発者ポータルで手動で有効にしなければならないインテントです。有効化の手順は以下のとおりです。\"\n\n#: ../../intents.rst:62\nmsgid \"Make sure you're logged on to the `Discord website <https://discord.com>`_.\"\nmsgstr \"まずは `Discordのウェブサイト <https://discord.com>`_ にログインしてください。\"\n\n#: ../../intents.rst:63\nmsgid \"Navigate to the `application page <https://discord.com/developers/applications>`_.\"\nmsgstr \"`アプリケーションページ <https://discord.com/developers/applications>`_ に移動します。\"\n\n#: ../../intents.rst:64\nmsgid \"Click on the bot you want to enable privileged intents for.\"\nmsgstr \"特権インテントを有効にしたいBotをクリックします。\"\n\n#: ../../intents.rst:65\nmsgid \"Navigate to the bot tab on the left side of the screen.\"\nmsgstr \"画面の左側にあるBotタブに移動します。\"\n\n#: ../../intents.rst:0\nmsgid \"The bot tab in the application page.\"\nmsgstr \"アプリケーションページの「bot」タブ\"\n\n#: ../../intents.rst:70\nmsgid \"Scroll down to the \\\"Privileged Gateway Intents\\\" section and enable the ones you want.\"\nmsgstr \"「特権ゲートウェイインテント」セクションまでスクロールし、必要なものを有効にします。\"\n\n#: ../../intents.rst:0\nmsgid \"The privileged gateway intents selector.\"\nmsgstr \"特権ゲートウェイのセレクタ\"\n\n#: ../../intents.rst:77\nmsgid \"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.\"\nmsgstr \"もしあなたのBotが100以上のギルドで利用されているなら、特権インテントを有効化するために `bot verification <https://support.discord.com/hc/en-us/articles/360040720412>`_ が必要です。すでに認証済みのBotで特権インテントを有効化したい場合、 `Discord support <https://dis.gd/contact>`_ で報告してください。\"\n\n#: ../../intents.rst:81\nmsgid \"Even if you enable intents through the developer portal, you still have to enable the intents through code as well.\"\nmsgstr \"開発者ポータルでインテントを有効化した後は、コード内でインテントを有効化しましょう。\"\n\n#: ../../intents.rst:85\nmsgid \"Do I need privileged intents?\"\nmsgstr \"特権インテントは必要ですか？\"\n\n#: ../../intents.rst:87\nmsgid \"This is a quick checklist to see if you need specific privileged intents.\"\nmsgstr \"それぞれの特権インテントが必要かどうかを確認する簡単なチェックリストを用意しました。\"\n\n#: ../../intents.rst:92\nmsgid \"Presence Intent\"\nmsgstr \"プレゼンスインテント\"\n\n#: ../../intents.rst:94\nmsgid \"Whether you use :attr:`Member.status` at all to track member statuses.\"\nmsgstr \"メンバーのステータスを追跡するために :attr:`Member.status` を使用するかどうか。\"\n\n#: ../../intents.rst:95\nmsgid \"Whether you use :attr:`Member.activity` or :attr:`Member.activities` to check member's activities.\"\nmsgstr \":attr:`Member.activity` か :attr:`Member.activities` を使用してメンバーのアクティビティを確認するかどうか。\"\n\n#: ../../intents.rst:100\nmsgid \"Member Intent\"\nmsgstr \"メンバーインテント\"\n\n#: ../../intents.rst:102\nmsgid \"Whether you track member joins or member leaves, corresponds to :func:`on_member_join` and :func:`on_member_remove` events.\"\nmsgstr \"メンバーの参加や退出を追跡するかどうか。それぞれ :func:`on_member_join` と :func:`on_member_remove` イベントが対応します。\"\n\n#: ../../intents.rst:103\nmsgid \"Whether you want to track member updates such as nickname or role changes.\"\nmsgstr \"ニックネームやロールの変更など、メンバーの更新を追跡するかどうか。\"\n\n#: ../../intents.rst:104\nmsgid \"Whether you want to track user updates such as usernames, avatars, discriminators, etc.\"\nmsgstr \"ユーザー名、アバター、識別子などのユーザーの更新を追跡するかどうか。\"\n\n#: ../../intents.rst:105\nmsgid \"Whether you want to request the guild member list through :meth:`Guild.chunk` or :meth:`Guild.fetch_members`.\"\nmsgstr \":meth:`Guild.chunk` か :meth:`Guild.fetch_members` でギルドメンバーリストをリクエストするかどうか。\"\n\n#: ../../intents.rst:106\nmsgid \"Whether you want high accuracy member cache under :attr:`Guild.members`.\"\nmsgstr \":attr:`Guild.members` で高精度メンバーキャッシュを使用するかどうか。\"\n\n#: ../../intents.rst:111\nmsgid \"Message Content\"\nmsgstr \"メッセージ内容のインテント\"\n\n#: ../../intents.rst:113\nmsgid \"Whether you use :attr:`Message.content` to check message content.\"\nmsgstr \"メッセージの内容を確認するために :attr:`Message.content` を使用するかどうか。\"\n\n#: ../../intents.rst:114\nmsgid \"Whether you use :attr:`Message.attachments` to check message attachments.\"\nmsgstr \"メッセージの添付ファイルを確認するために :attr:`Message.attachments` を使用するかどうか。\"\n\n#: ../../intents.rst:115\nmsgid \"Whether you use :attr:`Message.embeds` to check message embeds.\"\nmsgstr \"メッセージの埋め込みを確認するために :attr:`Message.embeds` を使用するかどうか。\"\n\n#: ../../intents.rst:116\nmsgid \"Whether you use :attr:`Message.components` to check message components.\"\nmsgstr \"メッセージコンポーネントをチェックするために :attr:`Message.components` を使用するかどうか。\"\n\n#: ../../intents.rst:117\nmsgid \"Whether you use the commands extension with a non-mentioning prefix.\"\nmsgstr \"コマンド拡張機能をメンションなしプレフィックスで使用するかどうか。\"\n\n#: ../../intents.rst:122\nmsgid \"Member Cache\"\nmsgstr \"メンバーキャッシュ\"\n\n#: ../../intents.rst:124\nmsgid \"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.\"\nmsgstr \"Discordは、インテントとともにメンバーをキャッシュする機能をさらに制限し、必要に応じてボット作成者がキャッシュできるようになりました。 しかし、退出したメンバーを追跡・退出させるには、適切にキャッシュを維持する :attr:`Intents.members` インテントが必要です。\"\n\n#: ../../intents.rst:126\nmsgid \"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.\"\nmsgstr \"キャッシュされる必要のないメンバーキャッシュを手伝うために、ライブラリにメンバーキャッシュを制御するための :class:`MemberCacheFlags` フラグが追加されました。クラスのドキュメントページではできる限り明確なポリシーを調べることができます。\"\n\n#: ../../intents.rst:128\nmsgid \"It should be noted that certain things do not need a member cache since Discord will provide full member information if possible. For example:\"\nmsgstr \"可能な限りDiscordがメンバー情報を提供するため、メンバーキャッシュを必要としないことがあります。例えば：\"\n\n#: ../../intents.rst:130\nmsgid \":func:`on_message` will have :attr:`Message.author` be a member even if cache is disabled.\"\nmsgstr \"キャッシュが無効になっていても、:func:`on_message` は :attr:`Message.author` がメンバーになります。\"\n\n#: ../../intents.rst:131\nmsgid \":func:`on_voice_state_update` will have the ``member`` parameter be a member even if cache is disabled.\"\nmsgstr \"キャッシュが無効の場合でも、:func:`on_voice_state_update` は ``member`` パラメータをメンバーにします。\"\n\n#: ../../intents.rst:132\nmsgid \":func:`on_reaction_add` will have the ``user`` parameter be a member when in a guild even if cache is disabled.\"\nmsgstr \":func:`on_reaction_add` は、キャッシュが無効になっている場合でもサーバー内であれば ``user`` パラメータをメンバーにします。\"\n\n#: ../../intents.rst:133\nmsgid \":func:`on_raw_reaction_add` will have :attr:`RawReactionActionEvent.member` be a member when in a guild even if cache is disabled.\"\nmsgstr \":func:`on_raw_reaction_add` は、キャッシュが無効になっていてもサーバー内にいれば :attr:`RawReactionActionEvent.member` がメンバーになります。\"\n\n#: ../../intents.rst:134\nmsgid \"The reaction add events do not contain additional information when in direct messages. This is a Discord limitation.\"\nmsgstr \"ダイレクトメッセージで追加されたリアクションは追加情報を含んでいません。これはDiscordの制限です。\"\n\n#: ../../intents.rst:135\nmsgid \"The reaction removal events do not have member information. This is a Discord limitation.\"\nmsgstr \"リアクション削除イベントにメンバー情報はありません。これはDiscordの制限です。\"\n\n#: ../../intents.rst:137\nmsgid \"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.\"\nmsgstr \":class:`Member` を取るその他のイベントでは、メンバーキャッシュの使用が必要になります。メンバーキャッシュの絶対的な精度が必要な場合は、 :attr:`Intents.members` インテントを有効にすることをお勧めします。\"\n\n#: ../../intents.rst:142\nmsgid \"Retrieving Members\"\nmsgstr \"メンバーの取得\"\n\n#: ../../intents.rst:144\nmsgid \"If the 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:\"\nmsgstr \"キャッシュが無効になっている場合、または起動時にサーバーのチャンキングを無効にしている場合でも、membersをロードする方法が必要になる場合があります。 ライブラリには、以下の方法が用意されています。\"\n\n#: ../../intents.rst:148\nmsgid \":meth:`Guild.query_members`\"\nmsgstr \":meth:`Guild.query_members`\"\n\n#: ../../intents.rst:147\nmsgid \"Used to query members by a prefix matching nickname or username.\"\nmsgstr \"ニックネームまたはユーザー名の一致でメンバーを照会するために使用されます。\"\n\n#: ../../intents.rst:148\nmsgid \"This can also be used to query members by their user ID.\"\nmsgstr \"これは、ユーザーIDによってメンバーを照会するためにも使用できます。\"\n\n#: ../../intents.rst:149\nmsgid \"This uses the gateway and not the HTTP.\"\nmsgstr \"これはHTTPではなくゲートウェイを使用します。\"\n\n#: ../../intents.rst:150\nmsgid \":meth:`Guild.chunk`\"\nmsgstr \":meth:`Guild.chunk`\"\n\n#: ../../intents.rst:151\nmsgid \"This can be used to fetch the entire member list through the gateway.\"\nmsgstr \"これはゲートウェイからメンバーリスト全体を取得するために使用できます。\"\n\n#: ../../intents.rst:152\nmsgid \":meth:`Guild.fetch_member`\"\nmsgstr \":meth:`Guild.fetch_member`\"\n\n#: ../../intents.rst:153\nmsgid \"Used to fetch a member by ID through the HTTP API.\"\nmsgstr \"HTTP APIを介してIDからメンバーを取得するために使用されます。\"\n\n#: ../../intents.rst:155\nmsgid \":meth:`Guild.fetch_members`\"\nmsgstr \":meth:`Guild.fetch_members`\"\n\n#: ../../intents.rst:155\nmsgid \"used to fetch a large number of members through the HTTP API.\"\nmsgstr \"HTTP APIを介して多数のメンバーを取得するために使用されます。\"\n\n#: ../../intents.rst:157\nmsgid \"It should be noted that the gateway has a strict rate limit of 120 requests per 60 seconds.\"\nmsgstr \"ゲートウェイには、60秒あたり120リクエストという厳格なレート制限があることに注意してください。\"\n\n#: ../../intents.rst:160\nmsgid \"Troubleshooting\"\nmsgstr \"トラブルシューティング\"\n\n#: ../../intents.rst:162\nmsgid \"Some common issues relating to the mandatory intent change.\"\nmsgstr \"強制的なインテントの変更に関連するいくつかの一般的な問題。\"\n\n#: ../../intents.rst:165\nmsgid \"Where'd my members go?\"\nmsgstr \"私のメンバーはどこに行ったのか？\"\n\n#: ../../intents.rst:167\nmsgid \"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.\"\nmsgstr \":ref:`APIの変更 <intents_member_cache>` に伴い、Discordはメンバーキャッシュを必要とする開発者に明示的なオプトインを求めるようになりました。これはDiscordが強制的に行っている変更で、これを回避する方法はありません。これを取り戻すためには、明示的に :ref:`メンバー特権インテント <privileged_intents>` を有効にして、 :attr:`Intents.members` 属性をtrueに変更する必要があります。\"\n\n#: ../../intents.rst:169\nmsgid \"For example:\"\nmsgstr \"例：\"\n\n#: ../../intents.rst:185\nmsgid \"Why does ``on_ready`` take so long to fire?\"\nmsgstr \"``on_ready`` が発火するまでに時間がかかるのはなぜか？\"\n\n#: ../../intents.rst:187\nmsgid \"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.\"\nmsgstr \"インテントに関するAPIの変更の一環として、Discordは起動時のメンバーの読み込み方法も変更しました。 もともとライブラリは 75 個のギルドを一度にリクエストでき、 :attr:`Guild.large` 属性が ``True`` になるサーバーのみのメンバーをリクエストしました。Intentが新しく変更された場合、Discordはリクエストごとに1つのサーバーしか送信できません。 これは75倍の減速を引き起こし、大規模なサーバーだけでなく*すべての*サーバーが要求されているという事実によってさらに複雑になります。\"\n\n#: ../../intents.rst:189\nmsgid \"There are a few solutions to fix this.\"\nmsgstr \"これを修正するためにいくつかの解決策があります。\"\n\n#: ../../intents.rst:191\nmsgid \"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.\"\nmsgstr \"最初の解決策は、presence intentとmember intentの両方を有効にすることです。 これにより、初期メンバーリストに以前のゲートウェイと同様にオンラインメンバーを含めることができます。 我々はまだリクエストごとに1つのギルドに制限されていることに注意してください。しかし、我々がリクエストするギルドの数は大幅に減少します。\"\n\n#: ../../intents.rst:193\nmsgid \"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>`.\"\nmsgstr \"二つ目の解決方法は、クライアントを構築する際に ``chunk_guilds_at_startup`` を ``False`` に設定することでメンバーのチャンクを無効にすることです。 サーバーのチャンキングが必要な場合は、 :ref:`メンバーの取得 <retrieving_members>` の様々なテクニックを使うことができます。\"\n\n#: ../../intents.rst:195\nmsgid \"To illustrate the slowdown caused by the API change, take a bot who is in 840 guilds and 95 of these guilds are \\\"large\\\" (over 250 members).\"\nmsgstr \"APIの変更によって引き起こされる減速を説明するために、840サーバーに参加していて、そのうち95サーバーは「大きい」(250人以上のメンバーがいる) というボットを使います。\"\n\n#: ../../intents.rst:197\nmsgid \"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.\"\nmsgstr \"元のシステムでは、メンバーリスト(75サーバーと、20サーバー)を取得するために2回のリクエストを行うと、およそ60秒かかります。 :attr:`Intents.presences` は使用せず :attr:`Intents.members` を使用した場合、840回のリクエストが必要となり、60秒あたり120回のリクエストというレート制限があるため、すべてのメンバーを取得するためにレート制限を待つ時間は合計で約7分となります。 :attr:`Intents.members` と :attr:`Intents.presences` の両方がある状況では、ほとんどが以前の動作になるので、大規模な95のギルドに対してのみリクエストする必要があることになります。これはレートリミットよりわずかに少ないので、元のシステムでメンバーリストを取得する時間と近くなります。\"\n\n#: ../../intents.rst:199\nmsgid \"Unfortunately due to this change being required from Discord there is nothing that the library can do to mitigate this.\"\nmsgstr \"申し訳ありませんが、この変更はDiscordから要求されているため、ライブラリがこれを軽減するためにできることはありません。\"\n\n#: ../../intents.rst:201\nmsgid \"If you truly dislike the direction Discord is going with their API, you can contact them via `support <https://dis.gd/contact>`_.\"\nmsgstr \"DiscordのAPIに関する方向性が本当に嫌いなら、`サポート <https://dis.gd/contact>`_ で連絡できます。\"\n\n"
  },
  {
    "path": "docs/locale/ja/LC_MESSAGES/interactions/api.po",
    "content": "msgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: discordpy\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2023-06-21 01:17+0000\\n\"\n\"PO-Revision-Date: 2023-06-21 01:20\\n\"\n\"Last-Translator: \\n\"\n\"Language-Team: Japanese\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Plural-Forms: nplurals=1; plural=0;\\n\"\n\"X-Crowdin-Project: discordpy\\n\"\n\"X-Crowdin-Project-ID: 362783\\n\"\n\"X-Crowdin-Language: ja\\n\"\n\"X-Crowdin-File: /interactions/api.pot\\n\"\n\"X-Crowdin-File-ID: 90\\n\"\n\"Language: ja_JP\\n\"\n\n#: ../../interactions/api.rst:4\nmsgid \"Interactions API Reference\"\nmsgstr \"インタラクションAPIリファレンス\"\n\n#: ../../interactions/api.rst:6\nmsgid \"The following section outlines the API of interactions, as implemented by the library.\"\nmsgstr \"次のセクションでは、ライブラリによって実装されたインタラクションの API について概説します。\"\n\n#: ../../interactions/api.rst:8\nmsgid \"For documentation about the rest of the library, check :doc:`/api`.\"\nmsgstr \"ライブラリの残りの部分のドキュメントについては、 :doc:`/api` を参照してください。\"\n\n#: ../../interactions/api.rst:11\nmsgid \"Models\"\nmsgstr \"モデル\"\n\n#: ../../interactions/api.rst:13\nmsgid \"Similar to :ref:`discord_api_models`, these are not meant to be constructed by the user.\"\nmsgstr \":ref:`discord_api_models` と同様に、これらはユーザーが構築するものではありません。\"\n\n#: ../../interactions/api.rst:16\nmsgid \"Interaction\"\nmsgstr \"Interaction\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.Interaction:1\nmsgid \"Represents a Discord interaction.\"\nmsgstr \"Discordのインタラクションを表します。\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.Interaction:3\nmsgid \"An interaction happens when a user does an action that needs to be notified. Current examples are slash commands and components.\"\nmsgstr \"インタラクションは、ユーザーに返信をする必要のあるアクションが行われた際に発生します。現在の例はスラッシュコマンドとコンポーネントです。\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.Interaction:10\nmsgid \"The interaction's ID.\"\nmsgstr \"インタラクションのID。\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.Interaction:0\n#: ../../../discord/interactions.py:docstring of discord.interactions.Interaction:0\n#: ../../../discord/interactions.py:docstring of discord.interactions.Interaction:0\n#: ../../../discord/interactions.py:docstring of discord.interactions.Interaction:0\n#: ../../../discord/interactions.py:docstring of discord.interactions.Interaction:0\nmsgid \"type\"\nmsgstr \"型\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.Interaction:12\n#: ../../../discord/interactions.py:docstring of discord.interactions.Interaction:38\n#: ../../../discord/message.py:docstring of discord.message.MessageInteraction:23\n#: ../../../discord/components.py:docstring of discord.components.SelectMenu:36\n#: ../../../discord/components.py:docstring of discord.components.SelectMenu:43\nmsgid \":class:`int`\"\nmsgstr \":class:`int`\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.Interaction:16\n#: ../../../discord/message.py:docstring of discord.message.MessageInteraction:27\nmsgid \"The interaction type.\"\nmsgstr \"インタラクションの種類。\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.Interaction:18\n#: ../../../discord/message.py:docstring of discord.message.MessageInteraction:29\nmsgid \":class:`InteractionType`\"\nmsgstr \":class:`InteractionType`\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.Interaction:22\nmsgid \"The guild ID the interaction was sent from.\"\nmsgstr \"インタラクションが送信されたギルドのID。\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.Interaction:24\n#: ../../../discord/interactions.py:docstring of discord.Interaction.channel_id:3\n#: ../../../discord/components.py:docstring of discord.components.TextInput:49\n#: ../../../discord/components.py:docstring of discord.components.TextInput:55\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommand:91\nmsgid \"Optional[:class:`int`]\"\nmsgstr \"Optional[:class:`int`]\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.Interaction:28\nmsgid \"The channel the interaction was sent from.\"\nmsgstr \"インタラクションが送信されたチャンネル。\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.Interaction:30\nmsgid \"Note that due to a Discord limitation, if sent from a DM channel :attr:`~DMChannel.recipient` is ``None``.\"\nmsgstr \"\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.Interaction:32\nmsgid \"Optional[Union[:class:`abc.GuildChannel`, :class:`abc.PrivateChannel`, :class:`Thread`]]\"\nmsgstr \"\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.Interaction:36\nmsgid \"The application ID that the interaction was for.\"\nmsgstr \"インタラクションの対象となったアプリケーションのID。\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.Interaction:42\nmsgid \"The user or member that sent the interaction.\"\nmsgstr \"インタラクションを送信したユーザーまたはメンバー。\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.Interaction:44\n#: ../../../discord/message.py:docstring of discord.message.MessageInteraction:41\nmsgid \"Union[:class:`User`, :class:`Member`]\"\nmsgstr \"Union[:class:`User`, :class:`Member`]\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.Interaction:48\nmsgid \"The message that sent this interaction.\"\nmsgstr \"このインタラクションを送信したメッセージ。\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.Interaction:50\nmsgid \"This is only available for :attr:`InteractionType.component` interactions.\"\nmsgstr \"これは :attr:`InteractionType.component` インタラクションの場合にのみ使用できます。\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.Interaction:52\nmsgid \"Optional[:class:`Message`]\"\nmsgstr \"Optional[:class:`Message`]\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.Interaction:56\nmsgid \"The token to continue the interaction. These are valid for 15 minutes.\"\nmsgstr \"インタラクションを続行するのに使うトークン。有効期限は15分です。\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.Interaction:59\n#: ../../docstring of discord.InteractionMessage.clean_content:15\n#: ../../../discord/interactions.py:docstring of discord.InteractionMessage.jump_url:3\n#: ../../docstring of discord.InteractionMessage.system_content:8\n#: ../../../discord/message.py:docstring of discord.message.MessageInteraction:35\nmsgid \":class:`str`\"\nmsgstr \":class:`str`\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.Interaction:63\nmsgid \"The raw interaction data.\"\nmsgstr \"生のインタラクションデータ。\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.Interaction:65\n#: ../../../discord/interactions.py:docstring of discord.interactions.Interaction:85\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Command:95\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.ContextMenu:80\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Group:105\nmsgid \":class:`dict`\"\nmsgstr \":class:`dict`\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.Interaction:69\nmsgid \"The locale of the user invoking the interaction.\"\nmsgstr \"インタラクションを呼び出したユーザーのロケール。\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.Interaction:71\nmsgid \":class:`Locale`\"\nmsgstr \":class:`Locale`\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.Interaction:75\nmsgid \"The preferred locale of the guild the interaction was sent from, if any.\"\nmsgstr \"インタラクションの送信元のギルドの優先ロケール。もし無ければ ``None`` となります。\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.Interaction:77\nmsgid \"Optional[:class:`Locale`]\"\nmsgstr \"Optional[:class:`Locale`]\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.Interaction:81\nmsgid \"A dictionary that can be used to store extraneous data for use during interaction processing. The library will not touch any values or keys within this dictionary.\"\nmsgstr \"インタラクションの処理中に使用する追加のデータを保管できる辞書型。ライブラリは辞書型の中のキーや値を一切操作しません。\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.Interaction:89\nmsgid \"Whether the command associated with this interaction failed to execute. This includes checks and execution.\"\nmsgstr \"このインタラクションに関連付けられたコマンドの実行に失敗したかどうか。これにはチェックとコマンドの実行が含まれます。\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.Interaction:92\n#: ../../../discord/components.py:docstring of discord.components.Button:35\n#: ../../../discord/components.py:docstring of discord.components.SelectMenu:55\n#: ../../../discord/components.py:docstring of discord.components.TextInput:43\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommand:84\nmsgid \":class:`bool`\"\nmsgstr \":class:`bool`\"\n\n#: ../../../discord/interactions.py:docstring of discord.Interaction.client:1\nmsgid \"The client that is handling this interaction.\"\nmsgstr \"このインタラクションを処理するクライアント。\"\n\n#: ../../../discord/interactions.py:docstring of discord.Interaction.client:3\nmsgid \"Note that :class:`AutoShardedClient`, :class:`~.commands.Bot`, and :class:`~.commands.AutoShardedBot` are all subclasses of client.\"\nmsgstr \"なお、 :class:`AutoShardedClient` 、 :class:`~.commands.Bot` 、 :class:`~.commands.AutoShardedBot` はすべてClientのサブクラスです。\"\n\n#: ../../../discord/interactions.py:docstring of discord.Interaction.client:6\nmsgid \":class:`Client`\"\nmsgstr \":class:`Client`\"\n\n#: ../../../discord/interactions.py:docstring of discord.Interaction.guild:1\nmsgid \"The guild the interaction was sent from.\"\nmsgstr \"インタラクションが送信されたギルド。\"\n\n#: ../../../discord/interactions.py:docstring of discord.Interaction.guild:3\nmsgid \"Optional[:class:`Guild`]\"\nmsgstr \"Optional[:class:`Guild`]\"\n\n#: ../../../discord/interactions.py:docstring of discord.Interaction.channel_id:1\nmsgid \"The ID of the channel the interaction was sent from.\"\nmsgstr \"\"\n\n#: ../../../discord/interactions.py:docstring of discord.Interaction.permissions:1\nmsgid \"The resolved permissions of the member in the channel, including overwrites.\"\nmsgstr \"権限の上書きを含むチャンネルでのメンバーの権限。\"\n\n#: ../../../discord/interactions.py:docstring of discord.Interaction.permissions:3\nmsgid \"In a non-guild context where this doesn't apply, an empty permissions object is returned.\"\nmsgstr \"ギルド以外の文脈では権限が適用されないため、空の権限オブジェクトが返されます。\"\n\n#: ../../../discord/interactions.py:docstring of discord.Interaction.permissions:5\n#: ../../../discord/interactions.py:docstring of discord.Interaction.app_permissions:3\nmsgid \":class:`Permissions`\"\nmsgstr \":class:`Permissions`\"\n\n#: ../../../discord/interactions.py:docstring of discord.Interaction.app_permissions:1\nmsgid \"The resolved permissions of the application or the bot, including overwrites.\"\nmsgstr \"権限の上書きを含む、アプリケーションまたはボットの解決された権限。\"\n\n#: ../../docstring of discord.Interaction.namespace:1\nmsgid \"The resolved namespace for this interaction.\"\nmsgstr \"このインタラクションの解決された名前空間。\"\n\n#: ../../docstring of discord.Interaction.namespace:3\nmsgid \"If the interaction is not an application command related interaction or the client does not have a tree attached to it then this returns an empty namespace.\"\nmsgstr \"アプリケーションコマンドに関連したインタラクションでない場合、またはクライアントにツリーが関連付けられていない場合は、空の名前空間を返します。\"\n\n#: ../../docstring of discord.Interaction.namespace:6\nmsgid \":class:`app_commands.Namespace`\"\nmsgstr \":class:`app_commands.Namespace`\"\n\n#: ../../docstring of discord.Interaction.command:1\nmsgid \"The command being called from this interaction.\"\nmsgstr \"このインタラクションから呼び出されるコマンド。\"\n\n#: ../../docstring of discord.Interaction.command:4\nmsgid \"If the interaction is not an application command related interaction or the command is not found in the client's attached tree then ``None`` is returned.\"\nmsgstr \"アプリケーションコマンドに関連したインタラクションでない場合、またはコマンドがクライアントのアタッチされたツリーにない場合は、 ``None`` が返されます。\"\n\n#: ../../docstring of discord.Interaction.command:7\nmsgid \"Optional[Union[:class:`app_commands.Command`, :class:`app_commands.ContextMenu`]]\"\nmsgstr \"Optional[Union[:class:`app_commands.Command`, :class:`app_commands.ContextMenu`]]\"\n\n#: ../../docstring of discord.Interaction.response:1\nmsgid \"Returns an object responsible for handling responding to the interaction.\"\nmsgstr \"インタラクションへの応答をするためのオブジェクトを返します。\"\n\n#: ../../docstring of discord.Interaction.response:3\nmsgid \"A response can only be done once. If secondary messages need to be sent, consider using :attr:`followup` instead.\"\nmsgstr \"応答は一度だけ行うことができます。複数回にわたってメッセージを送信する必要がある場合は、代わりに :attr:`followup` を使用することを検討してください。\"\n\n#: ../../docstring of discord.Interaction.response:6\nmsgid \":class:`InteractionResponse`\"\nmsgstr \":class:`InteractionResponse`\"\n\n#: ../../docstring of discord.Interaction.followup:1\nmsgid \"Returns the follow up webhook for follow up interactions.\"\nmsgstr \"フォローアップのインタラクションのためのフォローアップウェブフックを返します。\"\n\n#: ../../docstring of discord.Interaction.followup:3\nmsgid \":class:`Webhook`\"\nmsgstr \":class:`Webhook`\"\n\n#: ../../../discord/interactions.py:docstring of discord.Interaction.created_at:1\nmsgid \"When the interaction was created.\"\nmsgstr \"インタラクションが作成された時間を示します。\"\n\n#: ../../../discord/interactions.py:docstring of discord.Interaction.created_at:3\n#: ../../../discord/interactions.py:docstring of discord.Interaction.expires_at:3\n#: ../../../discord/interactions.py:docstring of discord.InteractionMessage.created_at:3\n#: ../../../discord/message.py:docstring of discord.MessageInteraction.created_at:3\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.AppCommandChannel.created_at:3\nmsgid \":class:`datetime.datetime`\"\nmsgstr \":class:`datetime.datetime`\"\n\n#: ../../../discord/interactions.py:docstring of discord.Interaction.expires_at:1\nmsgid \"When the interaction expires.\"\nmsgstr \"インタラクションが期限切れになった時の時間を示します。\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.Interaction.is_expired:1\nmsgid \":class:`bool`: Returns ``True`` if the interaction is expired.\"\nmsgstr \":class:`bool`：インタラクションが期限切れした場合には ``True`` を返します。\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.Interaction.original_response:1\n#: ../../../discord/interactions.py:docstring of discord.interactions.Interaction.edit_original_response:1\n#: ../../../discord/interactions.py:docstring of discord.interactions.Interaction.delete_original_response:1\n#: ../../../discord/interactions.py:docstring of discord.interactions.Interaction.translate:1\n#: ../../../discord/interactions.py:docstring of discord.interactions.InteractionResponse.defer:1\nmsgid \"|coro|\"\nmsgstr \"|coro|\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.Interaction.original_response:3\nmsgid \"Fetches the original interaction response message associated with the interaction.\"\nmsgstr \"インタラクションに関連付けられた元のメッセージを取得します。\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.Interaction.original_response:5\nmsgid \"If the interaction response was a newly created message (i.e. through :meth:`InteractionResponse.send_message` or :meth:`InteractionResponse.defer`, where ``thinking`` is ``True``) then this returns the message that was sent using that response. Otherwise, this returns the message that triggered the interaction (i.e. through a component).\"\nmsgstr \"もしインタラクションの応答が新しく作成されたメッセージである場合（ :meth:`InteractionResponse.send_message` や ``thinking`` が ``True`` の :meth:`InteractionResponse.defer` 等）はそのメッセージを返します。それ以外の場合は、インタラクションが作成されたメッセージを返します。（コンポーネント 等）\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.Interaction.original_response:10\nmsgid \"Repeated calls to this will return a cached value.\"\nmsgstr \"これを繰り返し呼び出すと、キャッシュされた値が返されます。\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.Interaction.original_response:0\n#: ../../../discord/interactions.py:docstring of discord.interactions.Interaction.edit_original_response:0\n#: ../../../discord/interactions.py:docstring of discord.interactions.Interaction.delete_original_response:0\n#: ../../../discord/interactions.py:docstring of discord.interactions.InteractionResponse.defer:0\n#: ../../../discord/interactions.py:docstring of discord.interactions.InteractionResponse.pong:0\nmsgid \"Raises\"\nmsgstr \"例外\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.Interaction.original_response:12\nmsgid \"Fetching the original response message failed.\"\nmsgstr \"元のインタラクションのメッセージの取得に失敗した場合。\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.Interaction.original_response:13\nmsgid \"The channel for the message could not be resolved.\"\nmsgstr \"メッセージのチャンネルの解決ができなかった場合。\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.Interaction.original_response:14\n#: ../../../discord/interactions.py:docstring of discord.interactions.Interaction.edit_original_response:33\nmsgid \"The interaction response message does not exist.\"\nmsgstr \"インタラクションの応答のメッセージが存在しなかった場合。\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.Interaction.original_response:0\n#: ../../../discord/interactions.py:docstring of discord.interactions.Interaction.edit_original_response:0\n#: ../../../discord/interactions.py:docstring of discord.interactions.Interaction.translate:0\n#: ../../../discord/interactions.py:docstring of discord.interactions.InteractionMessage.edit:0\n#: ../../../discord/interactions.py:docstring of discord.interactions.InteractionMessage.add_files:0\nmsgid \"Returns\"\nmsgstr \"戻り値\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.Interaction.original_response:16\nmsgid \"The original interaction response message.\"\nmsgstr \"元のインタラクションの応答メッセージ。\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.Interaction.original_response:0\n#: ../../../discord/interactions.py:docstring of discord.interactions.Interaction.edit_original_response:0\n#: ../../../discord/interactions.py:docstring of discord.interactions.Interaction.translate:0\n#: ../../../discord/interactions.py:docstring of discord.interactions.InteractionMessage.edit:0\n#: ../../../discord/interactions.py:docstring of discord.interactions.InteractionMessage.add_files:0\nmsgid \"Return type\"\nmsgstr \"戻り値の型\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.Interaction.edit_original_response:3\nmsgid \"Edits the original interaction response message.\"\nmsgstr \"元のインタラクションの応答メッセージを編集します。\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.Interaction.edit_original_response:5\nmsgid \"This is a lower level interface to :meth:`InteractionMessage.edit` in case you do not want to fetch the message and save an HTTP request.\"\nmsgstr \"これは :meth:`InteractionMessage.edit` の下位互換のインターフェースで、メッセージを取得及び、HTTPリクエストを保存することが必要でない場合に使用します。\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.Interaction.edit_original_response:8\nmsgid \"This method is also the only way to edit the original message if the message sent was ephemeral.\"\nmsgstr \"また、一時的なメッセージを送った場合、この方法でのみメッセージを編集することができます。\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.Interaction.edit_original_response:0\n#: ../../../discord/interactions.py:docstring of discord.interactions.Interaction.translate:0\n#: ../../../discord/interactions.py:docstring of discord.interactions.InteractionResponse.defer:0\n#: ../../../discord/interactions.py:docstring of discord.interactions.InteractionResponse.send_message:0\n#: ../../../discord/interactions.py:docstring of discord.interactions.InteractionResponse.edit_message:0\nmsgid \"Parameters\"\nmsgstr \"パラメータ\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.Interaction.edit_original_response:11\n#: ../../../discord/interactions.py:docstring of discord.interactions.InteractionMessage.edit:5\nmsgid \"The content to edit the message with or ``None`` to clear it.\"\nmsgstr \"メッセージの内容を編集する場合はそのメッセージを、内容を削除する際は、``None`` を指定します。\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.Interaction.edit_original_response:13\n#: ../../../discord/interactions.py:docstring of discord.interactions.InteractionResponse.edit_message:8\n#: ../../../discord/interactions.py:docstring of discord.interactions.InteractionMessage.edit:7\nmsgid \"A list of embeds to edit the message with.\"\nmsgstr \"メッセージを編集するための埋め込みのリスト。\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.Interaction.edit_original_response:15\n#: ../../../discord/interactions.py:docstring of discord.interactions.InteractionResponse.edit_message:10\n#: ../../../discord/interactions.py:docstring of discord.interactions.InteractionMessage.edit:9\nmsgid \"The embed to edit the message with. ``None`` suppresses the embeds. This should not be mixed with the ``embeds`` parameter.\"\nmsgstr \"メッセージを編集するための埋め込み。 ``None`` を渡すと埋め込みが除去されます。 ``embeds`` パラメータと同時に使用できません。\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.Interaction.edit_original_response:18\n#: ../../../discord/interactions.py:docstring of discord.interactions.InteractionResponse.edit_message:13\n#: ../../../discord/interactions.py:docstring of discord.interactions.InteractionMessage.edit:12\nmsgid \"A list of attachments to keep in the message as well as new files to upload. If ``[]`` is passed then all attachments are removed.\"\nmsgstr \"メッセージ内で残す添付ファイルと、新規にアップロードする添付ファイルのリスト。 ``[]`` が渡された場合すべての添付ファイルが除去されます。\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.Interaction.edit_original_response:23\n#: ../../../discord/interactions.py:docstring of discord.interactions.InteractionResponse.edit_message:18\n#: ../../../discord/interactions.py:docstring of discord.interactions.InteractionMessage.edit:17\nmsgid \"New files will always appear after current attachments.\"\nmsgstr \"新しいファイルは常に現在の添付ファイルのあとに表示されます。\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.Interaction.edit_original_response:25\n#: ../../../discord/interactions.py:docstring of discord.interactions.InteractionResponse.send_message:25\n#: ../../../discord/interactions.py:docstring of discord.interactions.InteractionMessage.edit:19\nmsgid \"Controls the mentions being processed in this message. See :meth:`.abc.Messageable.send` for more information.\"\nmsgstr \"このメッセージで処理されるメンションを制御します。詳細は :meth:`.abc.Messageable.send` を参照してください。\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.Interaction.edit_original_response:28\n#: ../../../discord/interactions.py:docstring of discord.interactions.InteractionResponse.edit_message:20\n#: ../../../discord/interactions.py:docstring of discord.interactions.InteractionMessage.edit:22\nmsgid \"The updated view to update this message with. If ``None`` is passed then the view is removed.\"\nmsgstr \"このメッセージを更新するために更新されたビュー。 ``None`` が渡された場合、ビューは削除されます。\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.Interaction.edit_original_response:32\n#: ../../../discord/interactions.py:docstring of discord.interactions.InteractionResponse.edit_message:33\n#: ../../../discord/interactions.py:docstring of discord.interactions.InteractionMessage.edit:32\n#: ../../../discord/interactions.py:docstring of discord.interactions.InteractionMessage.add_files:10\n#: ../../../discord/interactions.py:docstring of discord.interactions.InteractionMessage.remove_attachments:10\nmsgid \"Editing the message failed.\"\nmsgstr \"メッセージの編集に失敗した場合。\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.Interaction.edit_original_response:34\n#: ../../../discord/interactions.py:docstring of discord.interactions.InteractionMessage.edit:33\nmsgid \"Edited a message that is not yours.\"\nmsgstr \"自分以外のメッセージを編集しようとした場合。\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.Interaction.edit_original_response:35\n#: ../../../discord/interactions.py:docstring of discord.interactions.InteractionMessage.edit:34\nmsgid \"You specified both ``embed`` and ``embeds``\"\nmsgstr \"``embed`` と ``embeds`` の両方を指定した場合。\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.Interaction.edit_original_response:36\n#: ../../../discord/interactions.py:docstring of discord.interactions.InteractionResponse.send_message:44\n#: ../../../discord/interactions.py:docstring of discord.interactions.InteractionMessage.edit:35\nmsgid \"The length of ``embeds`` was invalid.\"\nmsgstr \"``embeds`` の長さが無効だった場合。\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.Interaction.edit_original_response:38\n#: ../../../discord/interactions.py:docstring of discord.interactions.InteractionMessage.edit:37\n#: ../../../discord/interactions.py:docstring of discord.interactions.InteractionMessage.add_files:13\n#: ../../../discord/interactions.py:docstring of discord.interactions.InteractionMessage.remove_attachments:13\nmsgid \"The newly edited message.\"\nmsgstr \"編集された新しいメッセージ。\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.Interaction.edit_original_response:39\n#: ../../../discord/interactions.py:docstring of discord.interactions.InteractionMessage.edit:38\n#: ../../../discord/interactions.py:docstring of discord.interactions.InteractionMessage.add_files:14\n#: ../../../discord/interactions.py:docstring of discord.interactions.InteractionMessage.remove_attachments:14\nmsgid \":class:`InteractionMessage`\"\nmsgstr \":class:`InteractionMessage`\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.Interaction.delete_original_response:3\nmsgid \"Deletes the original interaction response message.\"\nmsgstr \"元のインタラクション応答メッセージを削除します。\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.Interaction.delete_original_response:5\nmsgid \"This is a lower level interface to :meth:`InteractionMessage.delete` in case you do not want to fetch the message and save an HTTP request.\"\nmsgstr \"これは :meth:`InteractionMessage.delete` の下位互換のインターフェースで、メッセージを取得及び、HTTPリクエストを保存することが必要でない場合に使用します。\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.Interaction.delete_original_response:8\n#: ../../../discord/interactions.py:docstring of discord.interactions.InteractionMessage.delete:11\nmsgid \"Deleting the message failed.\"\nmsgstr \"メッセージの削除に失敗した場合。\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.Interaction.delete_original_response:9\nmsgid \"The interaction response message does not exist or has already been deleted.\"\nmsgstr \"インタラクションの応答のメッセージが存在しなかった場合、または既に削除されていた場合。\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.Interaction.delete_original_response:10\nmsgid \"Deleted a message that is not yours.\"\nmsgstr \"自分以外のメッセージを削除しようとした場合。\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.Interaction.translate:3\nmsgid \"Translates a string using the set :class:`~discord.app_commands.Translator`.\"\nmsgstr \":class:`~discord.app_commands.Translator` を使用して文字列を翻訳します。\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.Interaction.translate:7\nmsgid \"The string to translate. :class:`~discord.app_commands.locale_str` can be used to add more context, information, or any metadata necessary.\"\nmsgstr \"翻訳する文字列。 :class:`~discord.app_commands.locale_str` を使用して、文脈、情報、または必要なメタデータを追加できます。\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.Interaction.translate:11\nmsgid \"The locale to use, this is handy if you want the translation for a specific locale. Defaults to the user's :attr:`.locale`.\"\nmsgstr \"使用するロケール。特定のロケールの翻訳が必要な場合に便利です。既定値はユーザの :attr:`.locale` です。\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.Interaction.translate:15\nmsgid \"The extraneous data that is being translated. If not specified, either :attr:`.command` or :attr:`.message` will be passed, depending on which is available in the context.\"\nmsgstr \"翻訳される追加のデータ。指定されない場合は、 :attr:`.command` または :attr:`.message` のうち利用できるものが渡されます。\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.Interaction.translate:20\nmsgid \"The translated string, or ``None`` if a translator was not set.\"\nmsgstr \"翻訳された文字列、またはトランスレータが設定されていない場合 ``None`` 。\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.Interaction.translate:21\n#: ../../../discord/components.py:docstring of discord.components.Button:23\n#: ../../../discord/components.py:docstring of discord.components.Button:29\n#: ../../../discord/components.py:docstring of discord.components.Button:41\n#: ../../../discord/components.py:docstring of discord.components.SelectMenu:23\nmsgid \"Optional[:class:`str`]\"\nmsgstr \"Optional[:class:`str`]\"\n\n#: ../../interactions/api.rst:24\nmsgid \"InteractionResponse\"\nmsgstr \"InteractionResponse\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.InteractionResponse:1\nmsgid \"Represents a Discord interaction response.\"\nmsgstr \"Discordのインタラクション応答を表します。\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.InteractionResponse:3\nmsgid \"This type can be accessed through :attr:`Interaction.response`.\"\nmsgstr \"この型は :attr:`Interaction.response` からアクセスできます。\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.InteractionResponse.is_done:1\nmsgid \":class:`bool`: Indicates whether an interaction response has been done before.\"\nmsgstr \":class:`bool`: インタラクションに既に応答したか。\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.InteractionResponse.is_done:3\nmsgid \"An interaction can only be responded to once.\"\nmsgstr \"インタラクションは一度だけ応答できます。\"\n\n#: ../../../discord/interactions.py:docstring of discord.InteractionResponse.type:1\nmsgid \"The type of response that was sent, ``None`` if response is not done.\"\nmsgstr \"送信された応答の種類。まだ応答していない場合は ``None`` です。\"\n\n#: ../../../discord/interactions.py:docstring of discord.InteractionResponse.type:3\nmsgid \":class:`InteractionResponseType`\"\nmsgstr \":class:`InteractionResponseType`\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.InteractionResponse.defer:3\nmsgid \"Defers the interaction response.\"\nmsgstr \"インタラクションの応答を遅らせます。\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.InteractionResponse.defer:5\nmsgid \"This is typically used when the interaction is acknowledged and a secondary action will be done later.\"\nmsgstr \"これは通常、インタラクションを認識した後、後で他のことを実行する場合に使われます。\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.InteractionResponse.defer:8\nmsgid \"This is only supported with the following interaction types:\"\nmsgstr \"以下のインタラクションでのみサポートされています：\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.InteractionResponse.defer:10\nmsgid \":attr:`InteractionType.application_command`\"\nmsgstr \":attr:`InteractionType.application_command`\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.InteractionResponse.defer:11\nmsgid \":attr:`InteractionType.component`\"\nmsgstr \":attr:`InteractionType.component`\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.InteractionResponse.defer:12\nmsgid \":attr:`InteractionType.modal_submit`\"\nmsgstr \":attr:`InteractionType.modal_submit`\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.InteractionResponse.defer:14\nmsgid \"Indicates whether the deferred message will eventually be ephemeral. This only applies to :attr:`InteractionType.application_command` interactions, or if ``thinking`` is ``True``.\"\nmsgstr \"遅延メッセージが一時的かどうか。 :attr:`InteractionType.application_command` のインタラクション、または ``thinking`` が ``True`` の場合にのみ適用されます。\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.InteractionResponse.defer:17\nmsgid \"Indicates whether the deferred type should be :attr:`InteractionResponseType.deferred_channel_message` instead of the default :attr:`InteractionResponseType.deferred_message_update` if both are valid. In UI terms, this is represented as if the bot is thinking of a response. It is your responsibility to eventually send a followup message via :attr:`Interaction.followup` to make this thinking state go away. Application commands (AKA Slash commands) cannot use :attr:`InteractionResponseType.deferred_message_update`.\"\nmsgstr \"遅延の種類を両方が利用可能の場合にデフォルトの :attr:`InteractionResponseType.deferred_message_update` ではなく :attr:`InteractionResponseType.deferred_channel_message` にするか。Discordのアプリ上では考え中として表示されます。 :attr:`Interaction.followup` で考え中の表示を解除できます。アプリケーションコマンド（スラッシュコマンド）は :attr:`InteractionResponseType.deferred_message_update` を使えません。\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.InteractionResponse.defer:24\nmsgid \"Deferring the interaction failed.\"\nmsgstr \"インタラクションの遅延に失敗した場合。\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.InteractionResponse.defer:25\n#: ../../../discord/interactions.py:docstring of discord.interactions.InteractionResponse.pong:8\n#: ../../../discord/interactions.py:docstring of discord.interactions.InteractionResponse.send_message:45\n#: ../../../discord/interactions.py:docstring of discord.interactions.InteractionResponse.edit_message:35\n#: ../../../discord/interactions.py:docstring of discord.interactions.InteractionResponse.send_modal:9\nmsgid \"This interaction has already been responded to before.\"\nmsgstr \"既にインタラクションに応答していた場合。\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.InteractionResponse.pong:3\nmsgid \"Pongs the ping interaction.\"\nmsgstr \"Pingのインタラクションに応答します。\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.InteractionResponse.pong:5\nmsgid \"This should rarely be used.\"\nmsgstr \"ほとんどの場合使われません。\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.InteractionResponse.pong:7\nmsgid \"Ponging the interaction failed.\"\nmsgstr \"インタラクションの応答に失敗した場合。\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.InteractionResponse.send_message:3\nmsgid \"Responds to this interaction by sending a message.\"\nmsgstr \"インタラクションにメッセージで応答します。\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.InteractionResponse.send_message:5\nmsgid \"The content of the message to send.\"\nmsgstr \"送信するメッセージの内容。\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.InteractionResponse.send_message:7\nmsgid \"A list of embeds to send with the content. Maximum of 10. This cannot be mixed with the ``embed`` parameter.\"\nmsgstr \"送信するリッチな埋め込みのリスト。最大10個です。 ``embed`` パラメータと同時に使用できません。\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.InteractionResponse.send_message:10\nmsgid \"The rich embed for the content to send. This cannot be mixed with ``embeds`` parameter.\"\nmsgstr \"送信するリッチな埋め込み。 ``embeds`` パラメータと同時に使用できません。\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.InteractionResponse.send_message:13\nmsgid \"The file to upload.\"\nmsgstr \"アップロードするファイル。\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.InteractionResponse.send_message:15\nmsgid \"A list of files to upload. Must be a maximum of 10.\"\nmsgstr \"アップロードするファイルのリスト。ファイル数は最大で10個まででなくてはいけません。\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.InteractionResponse.send_message:17\nmsgid \"Indicates if the message should be sent using text-to-speech.\"\nmsgstr \"メッセージが音声合成で送信されるべきかどうかを示します。\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.InteractionResponse.send_message:19\nmsgid \"The view to send with the message.\"\nmsgstr \"送信するビュー。\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.InteractionResponse.send_message:21\nmsgid \"Indicates if the message should only be visible to the user who started the interaction. If a view is sent with an ephemeral message and it has no timeout set then the timeout is set to 15 minutes.\"\nmsgstr \"メッセージがインタラクションを開始したユーザーだけに表示されるかどうか。もしビューが一時的なメッセージで送信されている、かつタイムアウトが設定されていない場合、タイムアウトは15分に設定されます。\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.InteractionResponse.send_message:28\nmsgid \"Whether to suppress embeds for the message. This sends the message without any embeds if set to ``True``.\"\nmsgstr \"メッセージの埋め込みを抑制するかどうか。これが ``True`` に設定されている場合、埋め込みなしでメッセージを送信します。\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.InteractionResponse.send_message:30\nmsgid \"Whether to suppress push and desktop notifications for the message. This will increment the mention counter in the UI, but will not actually send a notification.\"\nmsgstr \"\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.InteractionResponse.send_message:35\n#: ../../../discord/interactions.py:docstring of discord.interactions.InteractionMessage.edit:25\nmsgid \"If provided, the number of seconds to wait in the background before deleting the message we just sent. If the deletion fails, then it is silently ignored.\"\nmsgstr \"指定すると、これはメッセージを送信したあと削除するまでにバックグラウンドで待機する秒数となります。もし削除が失敗しても、それは静かに無視されます。\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.InteractionResponse.send_message:42\n#: ../../../discord/interactions.py:docstring of discord.message.PartialMessage.reply:12\nmsgid \"Sending the message failed.\"\nmsgstr \"メッセージの送信に失敗した場合。\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.InteractionResponse.send_message:43\nmsgid \"You specified both ``embed`` and ``embeds`` or ``file`` and ``files``.\"\nmsgstr \"``embed`` と ``embeds`` または ``file`` と ``files`` の両方を指定した場合。\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.InteractionResponse.edit_message:3\nmsgid \"Responds to this interaction by editing the original message of a component or modal interaction.\"\nmsgstr \"コンポーネントまたはモーダルのインタラクションに編集で応答します。\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.InteractionResponse.edit_message:6\nmsgid \"The new content to replace the message with. ``None`` removes the content.\"\nmsgstr \"現在のメッセージと置き換える新しい内容。 ``None`` を指定すると内容が削除されます。\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.InteractionResponse.edit_message:23\nmsgid \"Controls the mentions being processed in this message. See :meth:`.Message.edit` for more information.\"\nmsgstr \"このメッセージで処理されるメンションを制御します。詳細は :meth:`.Message.edit` を参照してください。\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.InteractionResponse.edit_message:26\nmsgid \"If provided, the number of seconds to wait in the background before deleting the message we just edited. If the deletion fails, then it is silently ignored.\"\nmsgstr \"もし指定したなら、これはメッセージを編集したあと待機し削除するまでの秒数です。もし削除が失敗しても、それは静かに無視されます。\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.InteractionResponse.edit_message:34\nmsgid \"You specified both ``embed`` and ``embeds``.\"\nmsgstr \"``embed`` と ``embeds`` の両方を指定した場合。\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.InteractionResponse.send_modal:3\nmsgid \"Responds to this interaction by sending a modal.\"\nmsgstr \"インタラクションにモーダルで応答します。\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.InteractionResponse.send_modal:5\nmsgid \"The modal to send.\"\nmsgstr \"送信するモーダル。\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.InteractionResponse.send_modal:8\nmsgid \"Sending the modal failed.\"\nmsgstr \"モーダルの送信に失敗した場合。\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.InteractionResponse.autocomplete:3\nmsgid \"Responds to this interaction by giving the user the choices they can use.\"\nmsgstr \"ユーザーが使用できる選択肢を与えることにより、このインタラクションに応答します。\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.InteractionResponse.autocomplete:5\nmsgid \"The list of new choices as the user is typing.\"\nmsgstr \"応答する選択肢。\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.InteractionResponse.autocomplete:8\nmsgid \"Sending the choices failed.\"\nmsgstr \"選択肢の送信に失敗した場合。\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.InteractionResponse.autocomplete:9\nmsgid \"This interaction cannot respond with autocomplete.\"\nmsgstr \"このインタラクションに選択肢で応答できない場合。\"\n\n#: ../../interactions/api.rst:32\nmsgid \"InteractionMessage\"\nmsgstr \"InteractionMessage\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.InteractionMessage:1\nmsgid \"Represents the original interaction response message.\"\nmsgstr \"元のインタラクション応答メッセージを表します。\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.InteractionMessage:3\nmsgid \"This allows you to edit or delete the message associated with the interaction response. To retrieve this object see :meth:`Interaction.original_response`.\"\nmsgstr \"このオブジェクトでインタラクションの応答のメッセージを編集、または削除できます。このオブジェクトを生成するには :meth:`Interaction.original_response` を参照して下さい。\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.InteractionMessage:6\nmsgid \"This inherits from :class:`discord.Message` with changes to :meth:`edit` and :meth:`delete` to work.\"\nmsgstr \"これは :meth:`edit` と :meth:`delete` が機能するように変更された上で :class:`discord.Message` を継承しています。\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.InteractionMessage.edit:3\nmsgid \"Edits the message.\"\nmsgstr \"メッセージを編集します。\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.InteractionMessage.add_files:3\nmsgid \"Adds new files to the end of the message attachments.\"\nmsgstr \"メッセージの添付ファイルの末尾に新しいファイルを追加します。\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.InteractionMessage.add_files:7\nmsgid \"New files to add to the message.\"\nmsgstr \"メッセージに追加する新しいファイル。\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.InteractionMessage.add_files:11\n#: ../../../discord/interactions.py:docstring of discord.interactions.InteractionMessage.remove_attachments:11\nmsgid \"Tried to edit a message that isn't yours.\"\nmsgstr \"自分以外のメッセージを編集しようとした場合。\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.InteractionMessage.remove_attachments:3\nmsgid \"Removes attachments from the message.\"\nmsgstr \"メッセージの添付ファイルを削除します。\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.InteractionMessage.remove_attachments:7\nmsgid \"Attachments to remove from the message.\"\nmsgstr \"メッセージから削除する添付ファイル。\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.InteractionMessage.delete:3\nmsgid \"Deletes the message.\"\nmsgstr \"メッセージを削除します。\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.InteractionMessage.delete:5\nmsgid \"If provided, the number of seconds to wait before deleting the message. The waiting is done in the background and deletion failures are ignored.\"\nmsgstr \"指定された場合、メッセージを削除するまでの待機秒数。待機はバックグラウンドで行われ、削除の失敗は無視されます。\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.InteractionMessage.delete:9\nmsgid \"You do not have proper permissions to delete the message.\"\nmsgstr \"メッセージを削除するための適切な権限がない場合。\"\n\n#: ../../../discord/interactions.py:docstring of discord.interactions.InteractionMessage.delete:10\nmsgid \"The message was deleted already.\"\nmsgstr \"メッセージがすでに削除されている場合。\"\n\n#: ../../../discord/interactions.py:docstring of discord.message.PartialMessage.add_reaction:3\nmsgid \"Adds a reaction to the message.\"\nmsgstr \"メッセージにリアクションを追加します。\"\n\n#: ../../../discord/interactions.py:docstring of discord.message.PartialMessage.add_reaction:5\n#: ../../../discord/interactions.py:docstring of discord.message.PartialMessage.clear_reaction:5\n#: ../../../discord/interactions.py:docstring of discord.message.PartialMessage.remove_reaction:5\nmsgid \"The emoji may be a unicode emoji or a custom guild :class:`Emoji`.\"\nmsgstr \"絵文字はユニコード絵文字かカスタムギルド絵文字の :class:`Emoji` でないといけません。\"\n\n#: ../../../discord/interactions.py:docstring of discord.message.PartialMessage.add_reaction:7\nmsgid \"You must have :attr:`~Permissions.read_message_history` to do this. If nobody else has reacted to the message using this emoji, :attr:`~Permissions.add_reactions` is required.\"\nmsgstr \"これを行うためには、そのチャンネルにて :attr:`~Permissions.read_message_history` が必要です。 もし、他の人がその絵文字でリアクションしていない場合、さらに :attr:`~Permissions.add_reactions` が必要です。\"\n\n#: ../../../discord/interactions.py:docstring of discord.message.PartialMessage.add_reaction:13\nmsgid \"``emoji`` parameter is now positional-only.\"\nmsgstr \"``emoji`` 引数は位置限定引数になりました。\"\n\n#: ../../../discord/interactions.py:docstring of discord.message.PartialMessage.add_reaction:15\n#: ../../../discord/interactions.py:docstring of discord.message.PartialMessage.clear_reaction:11\n#: ../../../discord/interactions.py:docstring of discord.message.PartialMessage.remove_reaction:13\nmsgid \"This function will now raise :exc:`TypeError` instead of ``InvalidArgument``.\"\nmsgstr \"この関数は ``InvalidArgument`` の代わりに :exc:`TypeError` を送出します。\"\n\n#: ../../../discord/interactions.py:docstring of discord.message.PartialMessage.add_reaction:19\nmsgid \"The emoji to react with.\"\nmsgstr \"リアクションとして追加する絵文字。\"\n\n#: ../../../discord/interactions.py:docstring of discord.message.PartialMessage.add_reaction:22\nmsgid \"Adding the reaction failed.\"\nmsgstr \"リアクションの追加に失敗した場合。\"\n\n#: ../../../discord/interactions.py:docstring of discord.message.PartialMessage.add_reaction:23\nmsgid \"You do not have the proper permissions to react to the message.\"\nmsgstr \"メッセージにリアクションを付けるのに必要な権限がない場合。\"\n\n#: ../../../discord/interactions.py:docstring of discord.message.PartialMessage.add_reaction:24\n#: ../../../discord/interactions.py:docstring of discord.message.PartialMessage.clear_reaction:20\nmsgid \"The emoji you specified was not found.\"\nmsgstr \"指定された絵文字が見つからなかった場合。\"\n\n#: ../../../discord/interactions.py:docstring of discord.message.PartialMessage.add_reaction:25\n#: ../../../discord/interactions.py:docstring of discord.message.PartialMessage.clear_reaction:21\n#: ../../../discord/interactions.py:docstring of discord.message.PartialMessage.remove_reaction:25\nmsgid \"The emoji parameter is invalid.\"\nmsgstr \"emojiパラメータが無効の場合。\"\n\n#: ../../docstring of discord.InteractionMessage.clean_content:1\nmsgid \"A property that returns the content in a \\\"cleaned up\\\" manner. This basically means that mentions are transformed into the way the client shows it. e.g. ``<#id>`` will transform into ``#name``.\"\nmsgstr \"クリーンアップされたメッセージ内容を返すプロパティ。基本的に、これはメンションをクライアントが表示できるようにする、という意味です。例えば、 ``<#id>`` は ``#name`` に変換されます。\"\n\n#: ../../docstring of discord.InteractionMessage.clean_content:6\nmsgid \"This will also transform @everyone and @here mentions into non-mentions.\"\nmsgstr \"また、これは @everyone メンション や @here メンションを、メンション機能の無いメッセージに変換します。\"\n\n#: ../../docstring of discord.InteractionMessage.clean_content:11\nmsgid \"This *does not* affect markdown. If you want to escape or remove markdown then use :func:`utils.escape_markdown` or :func:`utils.remove_markdown` respectively, along with this function.\"\nmsgstr \"これはマークダウンには影響 *しません* 。マークダウンをエスケープまたは削除したい場合は、この関数とともに :func:`utils.escape_markdown` か :func:`utils.remove_markdown` を使用してください。\"\n\n#: ../../../discord/interactions.py:docstring of discord.message.PartialMessage.clear_reaction:3\nmsgid \"Clears a specific reaction from the message.\"\nmsgstr \"メッセージから特定のリアクションを消去します。\"\n\n#: ../../../discord/interactions.py:docstring of discord.message.PartialMessage.clear_reaction:7\n#: ../../../discord/interactions.py:docstring of discord.message.PartialMessage.clear_reactions:5\nmsgid \"You must have :attr:`~Permissions.manage_messages` to do this.\"\nmsgstr \"これを行うには、 :attr:`~Permissions.manage_messages` が必要です。\"\n\n#: ../../../discord/interactions.py:docstring of discord.message.PartialMessage.clear_reaction:15\nmsgid \"The emoji to clear.\"\nmsgstr \"消去された絵文字です。\"\n\n#: ../../../discord/interactions.py:docstring of discord.message.PartialMessage.clear_reaction:18\nmsgid \"Clearing the reaction failed.\"\nmsgstr \"リアクションの除去に失敗した場合。\"\n\n#: ../../../discord/interactions.py:docstring of discord.message.PartialMessage.clear_reaction:19\nmsgid \"You do not have the proper permissions to clear the reaction.\"\nmsgstr \"リアクションを除去するのに必要な権限がない場合。\"\n\n#: ../../../discord/interactions.py:docstring of discord.message.PartialMessage.clear_reactions:3\nmsgid \"Removes all the reactions from the message.\"\nmsgstr \"全てのリアクションをメッセージから消去します。\"\n\n#: ../../../discord/interactions.py:docstring of discord.message.PartialMessage.clear_reactions:7\nmsgid \"Removing the reactions failed.\"\nmsgstr \"リアクションの除去に失敗した場合。\"\n\n#: ../../../discord/interactions.py:docstring of discord.message.PartialMessage.clear_reactions:8\nmsgid \"You do not have the proper permissions to remove all the reactions.\"\nmsgstr \"リアクションの除去に必要な権限を持っていない場合。\"\n\n#: ../../../discord/interactions.py:docstring of discord.message.PartialMessage.create_thread:3\nmsgid \"Creates a public thread from this message.\"\nmsgstr \"メッセージからパブリックスレッドを作成します。\"\n\n#: ../../../discord/interactions.py:docstring of discord.message.PartialMessage.create_thread:5\nmsgid \"You must have :attr:`~discord.Permissions.create_public_threads` in order to create a public thread from a message.\"\nmsgstr \"メッセージから公開スレッドを作成するには、 :attr:`~discord.Permissions.create_public_threads` 権限が必要です。\"\n\n#: ../../../discord/interactions.py:docstring of discord.message.PartialMessage.create_thread:8\nmsgid \"The channel this message belongs in must be a :class:`TextChannel`.\"\nmsgstr \"このメッセージが属するチャンネルは、 :class:`TextChannel` でなければなりません。\"\n\n#: ../../../discord/interactions.py:docstring of discord.message.PartialMessage.create_thread:12\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommandThread:37\nmsgid \"The name of the thread.\"\nmsgstr \"スレッドの名前。\"\n\n#: ../../../discord/interactions.py:docstring of discord.message.PartialMessage.create_thread:14\nmsgid \"The duration in minutes before a thread is automatically hidden from the channel list. If not provided, the channel's default auto archive duration is used.  Must be one of ``60``, ``1440``, ``4320``, or ``10080``, if provided.\"\nmsgstr \"\"\n\n#: ../../../discord/interactions.py:docstring of discord.message.PartialMessage.create_thread:14\nmsgid \"The duration in minutes before a thread is automatically hidden from the channel list. If not provided, the channel's default auto archive duration is used.\"\nmsgstr \"\"\n\n#: ../../../discord/interactions.py:docstring of discord.message.PartialMessage.create_thread:17\nmsgid \"Must be one of ``60``, ``1440``, ``4320``, or ``10080``, if provided.\"\nmsgstr \"\"\n\n#: ../../../discord/interactions.py:docstring of discord.message.PartialMessage.create_thread:19\nmsgid \"Specifies the slowmode rate limit for user in this channel, in seconds. The maximum value possible is ``21600``. By default no slowmode rate limit if this is ``None``.\"\nmsgstr \"このチャンネルの秒単位での低速モードレート制限。 最大値は ``21600`` です。デフォルトは ``None`` でこの場合は低速モードレート制限が無しとなります。\"\n\n#: ../../../discord/interactions.py:docstring of discord.message.PartialMessage.create_thread:23\nmsgid \"The reason for creating a new thread. Shows up on the audit log.\"\nmsgstr \"スレッドを作成する理由。監査ログに表示されます。\"\n\n#: ../../../discord/interactions.py:docstring of discord.message.PartialMessage.create_thread:26\nmsgid \"You do not have permissions to create a thread.\"\nmsgstr \"スレッドを作成する権限を持っていない場合。\"\n\n#: ../../../discord/interactions.py:docstring of discord.message.PartialMessage.create_thread:27\nmsgid \"Creating the thread failed.\"\nmsgstr \"スレッドの作成に失敗した場合。\"\n\n#: ../../../discord/interactions.py:docstring of discord.message.PartialMessage.create_thread:28\nmsgid \"This message does not have guild info attached.\"\nmsgstr \"メッセージがギルド情報を持っていない場合。\"\n\n#: ../../../discord/interactions.py:docstring of discord.message.PartialMessage.create_thread:30\nmsgid \"The created thread.\"\nmsgstr \"作成されたスレッド\"\n\n#: ../../../discord/interactions.py:docstring of discord.message.PartialMessage.create_thread:31\nmsgid \":class:`.Thread`\"\nmsgstr \":class:`Thread`\"\n\n#: ../../../discord/interactions.py:docstring of discord.InteractionMessage.created_at:1\nmsgid \"The message's creation time in UTC.\"\nmsgstr \"UTCの、メッセージが作成された時刻。\"\n\n#: ../../../discord/interactions.py:docstring of discord.InteractionMessage.edited_at:1\nmsgid \"An aware UTC datetime object containing the edited time of the message.\"\nmsgstr \"メッセージの編集時刻を含む、aware UTC datetime オブジェクト。\"\n\n#: ../../../discord/interactions.py:docstring of discord.InteractionMessage.edited_at:3\nmsgid \"Optional[:class:`datetime.datetime`]\"\nmsgstr \"Optional[:class:`datetime.datetime`]\"\n\n#: ../../../discord/interactions.py:docstring of discord.message.PartialMessage.fetch:3\nmsgid \"Fetches the partial message to a full :class:`Message`.\"\nmsgstr \"部分的なメッセージを完全な :class:`Message` にフェッチします。\"\n\n#: ../../../discord/interactions.py:docstring of discord.message.PartialMessage.fetch:5\nmsgid \"The message was not found.\"\nmsgstr \"メッセージが見つからなかった場合。\"\n\n#: ../../../discord/interactions.py:docstring of discord.message.PartialMessage.fetch:6\nmsgid \"You do not have the permissions required to get a message.\"\nmsgstr \"メッセージを取得するために必要な権限がありません。\"\n\n#: ../../../discord/interactions.py:docstring of discord.message.PartialMessage.fetch:7\nmsgid \"Retrieving the message failed.\"\nmsgstr \"メッセージの取得に失敗しました。\"\n\n#: ../../../discord/interactions.py:docstring of discord.message.PartialMessage.fetch:9\nmsgid \"The full message.\"\nmsgstr \"完全なメッセージ。\"\n\n#: ../../../discord/interactions.py:docstring of discord.message.PartialMessage.fetch:10\nmsgid \":class:`Message`\"\nmsgstr \":class:`Message`\"\n\n#: ../../../discord/interactions.py:docstring of discord.message.Message.is_system:1\nmsgid \":class:`bool`: Whether the message is a system message.\"\nmsgstr \":class:`bool`: メッセージがシステムメッセージであるかどうか。\"\n\n#: ../../../discord/interactions.py:docstring of discord.message.Message.is_system:3\nmsgid \"A system message is a message that is constructed entirely by the Discord API in response to something.\"\nmsgstr \"システムメッセージは、何かの応答としてDiscord APIによって構築されるメッセージです。\"\n\n#: ../../../discord/interactions.py:docstring of discord.InteractionMessage.jump_url:1\nmsgid \"Returns a URL that allows the client to jump to this message.\"\nmsgstr \"クライアントがこのメッセージにジャンプすることのできるURLを返します。\"\n\n#: ../../../discord/interactions.py:docstring of discord.message.PartialMessage.pin:3\nmsgid \"Pins the message.\"\nmsgstr \"メッセージをピン留めします。\"\n\n#: ../../../discord/interactions.py:docstring of discord.message.PartialMessage.pin:5\n#: ../../../discord/interactions.py:docstring of discord.message.PartialMessage.unpin:5\nmsgid \"You must have :attr:`~Permissions.manage_messages` to do this in a non-private channel context.\"\nmsgstr \"プライベートチャンネルでない通常のチャンネルで行うには、 :attr:`~Permissions.manage_messages` が必要です。\"\n\n#: ../../../discord/interactions.py:docstring of discord.message.PartialMessage.pin:8\nmsgid \"The reason for pinning the message. Shows up on the audit log.\"\nmsgstr \"メッセージを固定した理由。監査ログに表示されます。\"\n\n#: ../../../discord/interactions.py:docstring of discord.message.PartialMessage.pin:13\nmsgid \"You do not have permissions to pin the message.\"\nmsgstr \"このメッセージをピン留めする権限を持っていない場合。\"\n\n#: ../../../discord/interactions.py:docstring of discord.message.PartialMessage.pin:14\n#: ../../../discord/interactions.py:docstring of discord.message.PartialMessage.unpin:14\nmsgid \"The message or channel was not found or deleted.\"\nmsgstr \"ピン留めするメッセージやチャンネルが見つからなかったか、既に削除されている場合。\"\n\n#: ../../../discord/interactions.py:docstring of discord.message.PartialMessage.pin:15\nmsgid \"Pinning the message failed, probably due to the channel     having more than 50 pinned messages.\"\nmsgstr \"チャンネルにすでに50個ピン留めされたメッセージがあるなどの理由で、メッセージのピン留めに失敗した場合。\"\n\n#: ../../../discord/interactions.py:docstring of discord.message.PartialMessage.publish:3\nmsgid \"Publishes this message to the channel's followers.\"\nmsgstr \"\"\n\n#: ../../../discord/interactions.py:docstring of discord.message.PartialMessage.publish:5\nmsgid \"The message must have been sent in a news channel. You must have :attr:`~Permissions.send_messages` to do this.\"\nmsgstr \"\"\n\n#: ../../../discord/interactions.py:docstring of discord.message.PartialMessage.publish:8\nmsgid \"If the message is not your own then :attr:`~Permissions.manage_messages` is also needed.\"\nmsgstr \"自身のメッセージ以外の場合は :attr:`~Permissions.manage_messages` も必要です。\"\n\n#: ../../../discord/interactions.py:docstring of discord.message.PartialMessage.publish:11\nmsgid \"You do not have the proper permissions to publish this message     or the channel is not a news channel.\"\nmsgstr \"\"\n\n#: ../../../discord/interactions.py:docstring of discord.message.PartialMessage.publish:12\nmsgid \"Publishing the message failed.\"\nmsgstr \"メッセージの公開に失敗した場合。\"\n\n#: ../../docstring of discord.InteractionMessage.raw_channel_mentions:1\nmsgid \"A property that returns an array of channel IDs matched with the syntax of ``<#channel_id>`` in the message content.\"\nmsgstr \"メッセージのコンテンツにある ``<#channel_id>`` の構文にマッチするチャンネル ID の配列を返すプロパティです。\"\n\n#: ../../docstring of discord.InteractionMessage.raw_channel_mentions:4\n#: ../../docstring of discord.InteractionMessage.raw_mentions:7\n#: ../../docstring of discord.InteractionMessage.raw_role_mentions:4\nmsgid \"List[:class:`int`]\"\nmsgstr \"List[:class:`int`]\"\n\n#: ../../docstring of discord.InteractionMessage.raw_mentions:1\nmsgid \"A property that returns an array of user IDs matched with the syntax of ``<@user_id>`` in the message content.\"\nmsgstr \"メッセージのコンテンツにある ``<#user_id>`` の構文にマッチするユーザ ID の配列を返すプロパティです。\"\n\n#: ../../docstring of discord.InteractionMessage.raw_mentions:4\nmsgid \"This allows you to receive the user IDs of mentioned users even in a private message context.\"\nmsgstr \"これによって、メッセージがプライベートチャンネル内のものであってもメンションされたユーザのIDを取得できます。\"\n\n#: ../../docstring of discord.InteractionMessage.raw_role_mentions:1\nmsgid \"A property that returns an array of role IDs matched with the syntax of ``<@&role_id>`` in the message content.\"\nmsgstr \"メッセージのコンテンツにある ``<#role_id>`` の構文にマッチするロール ID の配列を返すプロパティです。\"\n\n#: ../../../discord/interactions.py:docstring of discord.message.PartialMessage.remove_reaction:3\nmsgid \"Remove a reaction by the member from the message.\"\nmsgstr \"メッセージからメンバーによるリアクションを除去します。\"\n\n#: ../../../discord/interactions.py:docstring of discord.message.PartialMessage.remove_reaction:7\nmsgid \"If the reaction is not your own (i.e. ``member`` parameter is not you) then :attr:`~Permissions.manage_messages` is needed.\"\nmsgstr \"もしリアクションがあなたのものではなければ(つまり、 ``member`` パラメーターがあなたでないなら)、 :attr:`~Permissions.manage_messages` も必要になります。\"\n\n#: ../../../discord/interactions.py:docstring of discord.message.PartialMessage.remove_reaction:10\nmsgid \"The ``member`` parameter must represent a member and meet the :class:`abc.Snowflake` abc.\"\nmsgstr \"``member`` パラメータはメンバーを示し :class:`abc.Snowflake` 抽象基底クラスを満たす必要があります。\"\n\n#: ../../../discord/interactions.py:docstring of discord.message.PartialMessage.remove_reaction:17\nmsgid \"The emoji to remove.\"\nmsgstr \"除去する絵文字。\"\n\n#: ../../../discord/interactions.py:docstring of discord.message.PartialMessage.remove_reaction:19\nmsgid \"The member for which to remove the reaction.\"\nmsgstr \"リアクションを除去する対象のメンバー。\"\n\n#: ../../../discord/interactions.py:docstring of discord.message.PartialMessage.remove_reaction:22\nmsgid \"Removing the reaction failed.\"\nmsgstr \"リアクションの除去に失敗した場合。\"\n\n#: ../../../discord/interactions.py:docstring of discord.message.PartialMessage.remove_reaction:23\nmsgid \"You do not have the proper permissions to remove the reaction.\"\nmsgstr \"リアクションの除去に必要な権限を持っていない場合。\"\n\n#: ../../../discord/interactions.py:docstring of discord.message.PartialMessage.remove_reaction:24\nmsgid \"The member or emoji you specified was not found.\"\nmsgstr \"指定されたメンバーや絵文字が見つからなかった場合。\"\n\n#: ../../../discord/interactions.py:docstring of discord.message.PartialMessage.reply:3\nmsgid \"A shortcut method to :meth:`.abc.Messageable.send` to reply to the :class:`.Message`.\"\nmsgstr \":class:`.Message` に返信するための :meth:`.abc.Messageable.send` のショートカットメソッド。\"\n\n#: ../../../discord/interactions.py:docstring of discord.message.PartialMessage.reply:8\nmsgid \"This function will now raise :exc:`TypeError` or :exc:`ValueError` instead of ``InvalidArgument``.\"\nmsgstr \"この関数は ``InvalidArgument`` の代わりに :exc:`TypeError` または :exc:`ValueError` を送出するようになりました。\"\n\n#: ../../../discord/interactions.py:docstring of discord.message.PartialMessage.reply:13\nmsgid \"You do not have the proper permissions to send the message.\"\nmsgstr \"メッセージを送信する適切な権限がない場合。\"\n\n#: ../../../discord/interactions.py:docstring of discord.message.PartialMessage.reply:14\nmsgid \"The ``files`` list is not of the appropriate size\"\nmsgstr \"``files`` リストの大きさが適切でない場合。\"\n\n#: ../../../discord/interactions.py:docstring of discord.message.PartialMessage.reply:15\nmsgid \"You specified both ``file`` and ``files``.\"\nmsgstr \"``file`` と ``filess`` の両方を指定した場合。\"\n\n#: ../../../discord/interactions.py:docstring of discord.message.PartialMessage.reply:17\nmsgid \"The message that was sent.\"\nmsgstr \"送信されたメッセージ。\"\n\n#: ../../../discord/interactions.py:docstring of discord.message.PartialMessage.reply:18\nmsgid \":class:`.Message`\"\nmsgstr \":class:`.Message`\"\n\n#: ../../docstring of discord.InteractionMessage.system_content:1\nmsgid \"A property that returns the content that is rendered regardless of the :attr:`Message.type`.\"\nmsgstr \":attr:`Message.type` に関わらず、レンダリングされた際のメッセージ内容を返すプロパティ。\"\n\n#: ../../docstring of discord.InteractionMessage.system_content:4\nmsgid \"In the case of :attr:`MessageType.default` and :attr:`MessageType.reply`\\\\, this just returns the regular :attr:`Message.content`. Otherwise this returns an English message denoting the contents of the system message.\"\nmsgstr \":attr:`MessageType.default` と :attr:`MessageType.reply` の場合、これは :attr:`Message.content` と同じものを返すだけです。しかしそれ以外の場合は、システムメッセージの英語版を返します。\"\n\n#: ../../../discord/interactions.py:docstring of discord.message.PartialMessage.to_reference:1\nmsgid \"Creates a :class:`~discord.MessageReference` from the current message.\"\nmsgstr \"現在のメッセージから :class:`~discord.MessageReference` を作成します。\"\n\n#: ../../../discord/interactions.py:docstring of discord.message.PartialMessage.to_reference:5\nmsgid \"Whether replying using the message reference should raise :class:`HTTPException` if the message no longer exists or Discord could not fetch the message.\"\nmsgstr \"メッセージ参照を使用して返信するとき、メッセージが存在しなくなった場合、またはDiscordがメッセージを取得できなかった場合、 :class:`HTTPException` を送出させるかどうか。\"\n\n#: ../../../discord/interactions.py:docstring of discord.message.PartialMessage.to_reference:11\nmsgid \"The reference to this message.\"\nmsgstr \"メッセージへの参照。\"\n\n#: ../../../discord/interactions.py:docstring of discord.message.PartialMessage.to_reference:12\nmsgid \":class:`~discord.MessageReference`\"\nmsgstr \":class:`~discord.MessageReference`\"\n\n#: ../../../discord/interactions.py:docstring of discord.message.PartialMessage.unpin:3\nmsgid \"Unpins the message.\"\nmsgstr \"メッセージのピン留めを外します。\"\n\n#: ../../../discord/interactions.py:docstring of discord.message.PartialMessage.unpin:8\nmsgid \"The reason for unpinning the message. Shows up on the audit log.\"\nmsgstr \"メッセージのピン留めを解除した理由。監査ログに表示されます。\"\n\n#: ../../../discord/interactions.py:docstring of discord.message.PartialMessage.unpin:13\nmsgid \"You do not have permissions to unpin the message.\"\nmsgstr \"このメッセージのピン留めを外す権限を持っていない場合。\"\n\n#: ../../../discord/interactions.py:docstring of discord.message.PartialMessage.unpin:15\nmsgid \"Unpinning the message failed.\"\nmsgstr \"メッセージのピン留め解除に失敗した場合。\"\n\n#: ../../interactions/api.rst:41\nmsgid \"MessageInteraction\"\nmsgstr \"MessageInteraction\"\n\n#: ../../../discord/message.py:docstring of discord.message.MessageInteraction:1\nmsgid \"Represents the interaction that a :class:`Message` is a response to.\"\nmsgstr \":class:`Message` が応答したインタラクションを表します。\"\n\n#: ../../../discord/message.py:docstring of discord.message.MessageInteraction:9\nmsgid \"Checks if two message interactions are equal.\"\nmsgstr \"二つのメッセージインタラクションが等しいかを比較します。\"\n\n#: ../../../discord/message.py:docstring of discord.message.MessageInteraction:13\nmsgid \"Checks if two message interactions are not equal.\"\nmsgstr \"二つのメッセージインタラクションが等しくないかを比較します。\"\n\n#: ../../../discord/message.py:docstring of discord.message.MessageInteraction:17\nmsgid \"Returns the message interaction's hash.\"\nmsgstr \"メッセージインタラクションのハッシュ値を返します。\"\n\n#: ../../../discord/message.py:docstring of discord.message.MessageInteraction:21\nmsgid \"The interaction ID.\"\nmsgstr \"インタラクションのID。\"\n\n#: ../../../discord/message.py:docstring of discord.message.MessageInteraction:33\nmsgid \"The name of the interaction.\"\nmsgstr \"インタラクションの名前。\"\n\n#: ../../../discord/message.py:docstring of discord.message.MessageInteraction:39\nmsgid \"The user or member that invoked the interaction.\"\nmsgstr \"インタラクションを行ったユーザーまたはメンバー。\"\n\n#: ../../../discord/message.py:docstring of discord.MessageInteraction.created_at:1\nmsgid \"The interaction's creation time in UTC.\"\nmsgstr \"UTCの、インタラクションが作成された時刻。\"\n\n#: ../../interactions/api.rst:49\nmsgid \"Component\"\nmsgstr \"Component\"\n\n#: ../../../discord/components.py:docstring of discord.components.Component:1\nmsgid \"Represents a Discord Bot UI Kit Component.\"\nmsgstr \"Discord Bot UI Kitのコンポーネント。\"\n\n#: ../../../discord/components.py:docstring of discord.components.Component:3\nmsgid \"Currently, the only components supported by Discord are:\"\nmsgstr \"現在、Discordでサポートされているコンポーネントは次のとおりです：\"\n\n#: ../../../discord/components.py:docstring of discord.components.Component:5\nmsgid \":class:`ActionRow`\"\nmsgstr \":class:`ActionRow`\"\n\n#: ../../../discord/components.py:docstring of discord.components.Component:6\nmsgid \":class:`Button`\"\nmsgstr \":class:`Button`\"\n\n#: ../../../discord/components.py:docstring of discord.components.Component:7\nmsgid \":class:`SelectMenu`\"\nmsgstr \":class:`SelectMenu`\"\n\n#: ../../../discord/components.py:docstring of discord.components.Component:8\nmsgid \":class:`TextInput`\"\nmsgstr \":class:`TextInput`\"\n\n#: ../../../discord/components.py:docstring of discord.components.Component:10\nmsgid \"This class is abstract and cannot be instantiated.\"\nmsgstr \"これは抽象クラスでインスタンス化できません。\"\n\n#: ../../../discord/components.py:docstring of discord.Component.type:1\n#: ../../../discord/components.py:docstring of discord.ActionRow.type:1\n#: ../../../discord/components.py:docstring of discord.Button.type:1\n#: ../../../discord/components.py:docstring of discord.components.SelectMenu:15\n#: ../../../discord/components.py:docstring of discord.TextInput.type:1\nmsgid \"The type of component.\"\nmsgstr \"コンポーネントの種類。\"\n\n#: ../../../discord/components.py:docstring of discord.Component.type:3\n#: ../../../discord/components.py:docstring of discord.ActionRow.type:3\n#: ../../../discord/components.py:docstring of discord.Button.type:3\n#: ../../../discord/components.py:docstring of discord.components.SelectMenu:17\n#: ../../../discord/components.py:docstring of discord.TextInput.type:3\nmsgid \":class:`ComponentType`\"\nmsgstr \":class:`ComponentType`\"\n\n#: ../../interactions/api.rst:57\nmsgid \"ActionRow\"\nmsgstr \"ActionRow\"\n\n#: ../../../discord/components.py:docstring of discord.components.ActionRow:1\nmsgid \"Represents a Discord Bot UI Kit Action Row.\"\nmsgstr \"Discord Bot UI Kitのアクション行。\"\n\n#: ../../../discord/components.py:docstring of discord.components.ActionRow:3\nmsgid \"This is a component that holds up to 5 children components in a row.\"\nmsgstr \"これは、最大5個の子コンポーネントを並べて保持するコンポーネントです。\"\n\n#: ../../../discord/components.py:docstring of discord.components.ActionRow:5\n#: ../../../discord/components.py:docstring of discord.components.Button:3\nmsgid \"This inherits from :class:`Component`.\"\nmsgstr \"これは :class:`Component` から継承されます。\"\n\n#: ../../../discord/components.py:docstring of discord.components.ActionRow:11\nmsgid \"The children components that this holds, if any.\"\nmsgstr \"存在する場合、このコンポーネントの子コンポーネント。\"\n\n#: ../../../discord/components.py:docstring of discord.components.ActionRow:13\nmsgid \"List[Union[:class:`Button`, :class:`SelectMenu`, :class:`TextInput`]]\"\nmsgstr \"List[Union[:class:`Button`, :class:`SelectMenu`, :class:`TextInput`]]\"\n\n#: ../../interactions/api.rst:65\n#: ../../interactions/api.rst:447\nmsgid \"Button\"\nmsgstr \"Button\"\n\n#: ../../../discord/components.py:docstring of discord.components.Button:1\nmsgid \"Represents a button from the Discord Bot UI Kit.\"\nmsgstr \"Discord Bot UI Kitのボタン。\"\n\n#: ../../../discord/components.py:docstring of discord.components.Button:7\nmsgid \"The user constructible and usable type to create a button is :class:`discord.ui.Button` not this one.\"\nmsgstr \"ボタンを作成するためにユーザーが構築でき利用できる型はこれではなく :class:`discord.ui.Button` です。\"\n\n#: ../../../discord/components.py:docstring of discord.components.Button:14\n#: ../../../discord/ui/button.py:docstring of discord.ui.button.Button:5\n#: ../../../discord/ui/button.py:docstring of discord.ui.Button.style:1\nmsgid \"The style of the button.\"\nmsgstr \"ボタンのスタイル。\"\n\n#: ../../../discord/components.py:docstring of discord.components.Button:16\nmsgid \":class:`.ButtonStyle`\"\nmsgstr \":class:`.ButtonStyle`\"\n\n#: ../../../discord/components.py:docstring of discord.components.Button:20\n#: ../../../discord/ui/button.py:docstring of discord.ui.button.Button:7\nmsgid \"The ID of the button that gets received during an interaction. If this button is for a URL, it does not have a custom ID.\"\nmsgstr \"インタラクション中に受け取るボタンID。これがURLボタンの場合はカスタムIDは設定できません。\"\n\n#: ../../../discord/components.py:docstring of discord.components.Button:27\n#: ../../../discord/ui/button.py:docstring of discord.ui.button.Button:10\n#: ../../../discord/ui/button.py:docstring of discord.ui.Button.url:1\nmsgid \"The URL this button sends you to.\"\nmsgstr \"ボタンの行き先のURL。\"\n\n#: ../../../discord/components.py:docstring of discord.components.Button:33\n#: ../../../discord/ui/button.py:docstring of discord.ui.button.Button:12\n#: ../../../discord/ui/button.py:docstring of discord.ui.Button.disabled:1\nmsgid \"Whether the button is disabled or not.\"\nmsgstr \"ボタンが無効化されているかどうか。\"\n\n#: ../../../discord/components.py:docstring of discord.components.Button:39\n#: ../../../discord/ui/button.py:docstring of discord.ui.button.Button:14\n#: ../../../discord/ui/button.py:docstring of discord.ui.button.button:15\nmsgid \"The label of the button, if any.\"\nmsgstr \"存在する場合、ボタンのラベル。\"\n\n#: ../../../discord/components.py:docstring of discord.components.Button:45\n#: ../../../discord/ui/button.py:docstring of discord.ui.button.Button:16\n#: ../../../discord/ui/button.py:docstring of discord.ui.Button.emoji:1\nmsgid \"The emoji of the button, if available.\"\nmsgstr \"利用可能な場合、ボタンの絵文字。\"\n\n#: ../../../discord/components.py:docstring of discord.components.Button:47\nmsgid \"Optional[:class:`PartialEmoji`]\"\nmsgstr \"Optional[:class:`PartialEmoji`]\"\n\n#: ../../interactions/api.rst:74\nmsgid \"SelectMenu\"\nmsgstr \"SelectMenu\"\n\n#: ../../../discord/components.py:docstring of discord.components.SelectMenu:1\nmsgid \"Represents a select menu from the Discord Bot UI Kit.\"\nmsgstr \"Discord Bot UI Kitの選択メニュー。\"\n\n#: ../../../discord/components.py:docstring of discord.components.SelectMenu:3\nmsgid \"A select menu is functionally the same as a dropdown, however on mobile it renders a bit differently.\"\nmsgstr \"選択メニューは機能的にはドロップダウンと同じですが、モバイル端末では少し違ったレンダリングがされます。\"\n\n#: ../../../discord/components.py:docstring of discord.components.SelectMenu:8\nmsgid \"The user constructible and usable type to create a select menu is :class:`discord.ui.Select` not this one.\"\nmsgstr \"選択メニューを作成するためにユーザーが構築でき利用できる型はこれではなく :class:`discord.ui.Select` です。\"\n\n#: ../../../discord/components.py:docstring of discord.components.SelectMenu:21\n#: ../../../discord/ui/select.py:docstring of discord.ui.Select.custom_id:1\n#: ../../../discord/ui/select.py:docstring of discord.ui.ChannelSelect.custom_id:1\n#: ../../../discord/ui/select.py:docstring of discord.ui.RoleSelect.custom_id:1\n#: ../../../discord/ui/select.py:docstring of discord.ui.MentionableSelect.custom_id:1\nmsgid \"The ID of the select menu that gets received during an interaction.\"\nmsgstr \"インタラクション中に受け取る選択メニューID。\"\n\n#: ../../../discord/components.py:docstring of discord.components.SelectMenu:27\n#: ../../../discord/ui/select.py:docstring of discord.ui.select.Select:9\n#: ../../../discord/ui/select.py:docstring of discord.ui.Select.placeholder:1\n#: ../../../discord/ui/select.py:docstring of discord.ui.select.ChannelSelect:12\n#: ../../../discord/ui/select.py:docstring of discord.ui.ChannelSelect.placeholder:1\nmsgid \"The placeholder text that is shown if nothing is selected, if any.\"\nmsgstr \"存在する場合、何も選択されていないときに表示するプレースホルダーテキスト。\"\n\n#: ../../../discord/components.py:docstring of discord.components.SelectMenu:33\n#: ../../../discord/ui/select.py:docstring of discord.ui.select.Select:11\n#: ../../../discord/ui/select.py:docstring of discord.ui.select.ChannelSelect:14\n#: ../../../discord/ui/select.py:docstring of discord.ui.select.RoleSelect:12\n#: ../../../discord/ui/select.py:docstring of discord.ui.select.MentionableSelect:15\nmsgid \"The minimum number of items that must be chosen for this select menu. Defaults to 1 and must be between 0 and 25.\"\nmsgstr \"選択メニューにて選択しないといけない最小の項目数。デフォルトは1で、値は0以上25以下でないといけません。\"\n\n#: ../../../discord/components.py:docstring of discord.components.SelectMenu:40\n#: ../../../discord/ui/select.py:docstring of discord.ui.select.Select:14\n#: ../../../discord/ui/select.py:docstring of discord.ui.select.ChannelSelect:17\n#: ../../../discord/ui/select.py:docstring of discord.ui.select.RoleSelect:15\n#: ../../../discord/ui/select.py:docstring of discord.ui.select.MentionableSelect:18\nmsgid \"The maximum number of items that must be chosen for this select menu. Defaults to 1 and must be between 1 and 25.\"\nmsgstr \"選択メニューにて選択できる最大の項目数。デフォルトは1で、値は1以上25以下でないといけません。\"\n\n#: ../../../discord/components.py:docstring of discord.components.SelectMenu:47\n#: ../../../discord/ui/select.py:docstring of discord.ui.select.Select:17\n#: ../../../discord/ui/select.py:docstring of discord.ui.Select.options:1\nmsgid \"A list of options that can be selected in this menu.\"\nmsgstr \"このメニューで選択できるオプションのリスト。\"\n\n#: ../../../discord/components.py:docstring of discord.components.SelectMenu:49\nmsgid \"List[:class:`SelectOption`]\"\nmsgstr \"List[:class:`SelectOption`]\"\n\n#: ../../../discord/components.py:docstring of discord.components.SelectMenu:53\n#: ../../../discord/ui/select.py:docstring of discord.ui.select.Select:19\n#: ../../../discord/ui/select.py:docstring of discord.ui.Select.disabled:1\n#: ../../../discord/ui/select.py:docstring of discord.ui.select.ChannelSelect:20\n#: ../../../discord/ui/select.py:docstring of discord.ui.ChannelSelect.disabled:1\nmsgid \"Whether the select is disabled or not.\"\nmsgstr \"選択メニューが無効化されているかどうか。\"\n\n#: ../../../discord/components.py:docstring of discord.components.SelectMenu:59\nmsgid \"A list of channel types that are allowed to be chosen in this select menu.\"\nmsgstr \"この選択メニューで選択できるチャンネルの種類のリスト。\"\n\n#: ../../../discord/components.py:docstring of discord.components.SelectMenu:61\nmsgid \"List[:class:`.ChannelType`]\"\nmsgstr \"List[:class:`.ChannelType`]\"\n\n#: ../../interactions/api.rst:84\n#: ../../interactions/api.rst:515\nmsgid \"TextInput\"\nmsgstr \"TextInput\"\n\n#: ../../../discord/components.py:docstring of discord.components.TextInput:1\nmsgid \"Represents a text input from the Discord Bot UI Kit.\"\nmsgstr \"Discord Bot UI Kitのテキスト入力。\"\n\n#: ../../../discord/components.py:docstring of discord.components.TextInput:4\nmsgid \"The user constructible and usable type to create a text input is :class:`discord.ui.TextInput` not this one.\"\nmsgstr \"テキスト入力を作成するためにユーザーが構築でき利用できる型はこれではなく :class:`discord.ui.TextInput` です。\"\n\n#: ../../../discord/components.py:docstring of discord.components.TextInput:11\n#: ../../../discord/ui/text_input.py:docstring of discord.ui.TextInput.custom_id:1\nmsgid \"The ID of the text input that gets received during an interaction.\"\nmsgstr \"インタラクション中に受け取るテキスト入力ID。\"\n\n#: ../../../discord/components.py:docstring of discord.components.TextInput:17\n#: ../../../discord/ui/text_input.py:docstring of discord.ui.text_input.TextInput:11\nmsgid \"The label to display above the text input.\"\nmsgstr \"テキスト入力の上に表示するラベル。\"\n\n#: ../../../discord/components.py:docstring of discord.components.TextInput:23\n#: ../../../discord/ui/text_input.py:docstring of discord.ui.text_input.TextInput:16\n#: ../../../discord/ui/text_input.py:docstring of discord.ui.TextInput.style:1\nmsgid \"The style of the text input.\"\nmsgstr \"テキスト入力のスタイル。\"\n\n#: ../../../discord/components.py:docstring of discord.components.TextInput:25\nmsgid \":class:`TextStyle`\"\nmsgstr \":class:`TextStyle`\"\n\n#: ../../../discord/components.py:docstring of discord.components.TextInput:29\n#: ../../../discord/ui/text_input.py:docstring of discord.ui.text_input.TextInput:18\n#: ../../../discord/ui/text_input.py:docstring of discord.ui.TextInput.placeholder:1\nmsgid \"The placeholder text to display when the text input is empty.\"\nmsgstr \"テキスト入力が空の場合に表示されるプレースホルダーテキスト。\"\n\n#: ../../../discord/components.py:docstring of discord.components.TextInput:35\n#: ../../../discord/components.py:docstring of discord.TextInput.default:1\n#: ../../../discord/ui/text_input.py:docstring of discord.ui.text_input.TextInput:20\n#: ../../../discord/ui/text_input.py:docstring of discord.ui.TextInput.default:1\nmsgid \"The default value of the text input.\"\nmsgstr \"テキスト入力のデフォルト値。\"\n\n#: ../../../discord/components.py:docstring of discord.components.TextInput:41\n#: ../../../discord/ui/text_input.py:docstring of discord.ui.text_input.TextInput:22\n#: ../../../discord/ui/text_input.py:docstring of discord.ui.TextInput.required:1\nmsgid \"Whether the text input is required.\"\nmsgstr \"テキスト入力が必須かどうか。\"\n\n#: ../../../discord/components.py:docstring of discord.components.TextInput:47\n#: ../../../discord/ui/text_input.py:docstring of discord.ui.text_input.TextInput:24\n#: ../../../discord/ui/text_input.py:docstring of discord.ui.TextInput.min_length:1\nmsgid \"The minimum length of the text input.\"\nmsgstr \"テキスト入力の最小の長さ。\"\n\n#: ../../../discord/components.py:docstring of discord.components.TextInput:53\n#: ../../../discord/ui/text_input.py:docstring of discord.ui.text_input.TextInput:26\n#: ../../../discord/ui/text_input.py:docstring of discord.ui.TextInput.max_length:1\nmsgid \"The maximum length of the text input.\"\nmsgstr \"テキスト入力の最大の長さ。\"\n\n#: ../../../discord/components.py:docstring of discord.TextInput.default:3\nmsgid \"This is an alias to :attr:`value`.\"\nmsgstr \"これは :attr:`value` のエイリアスです。\"\n\n#: ../../interactions/api.rst:93\nmsgid \"AppCommand\"\nmsgstr \"AppCommand\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommand:1\nmsgid \"Represents an application command.\"\nmsgstr \"アプリケーションコマンドを表します。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommand:3\nmsgid \"In common parlance this is referred to as a \\\"Slash Command\\\" or a \\\"Context Menu Command\\\".\"\nmsgstr \"一般的な用語では、これは「スラッシュコマンド」または「コンテキストメニューコマンド」と呼ばれます。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommand:12\nmsgid \"Checks if two application commands are equal.\"\nmsgstr \"アプリケーションコマンドが等しいか確認します。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommand:16\nmsgid \"Checks if two application commands are not equal.\"\nmsgstr \"アプリケーションコマンドが等しくないか確認します。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommand:20\nmsgid \"Returns the application command's hash.\"\nmsgstr \"アプリケーションコマンドのハッシュを返します。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommand:24\nmsgid \"Returns the application command's name.\"\nmsgstr \"アプリケーションコマンドの名前を返します。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommand:28\nmsgid \"The application command's ID.\"\nmsgstr \"アプリケーションコマンドのID。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommand:34\nmsgid \"The application command's application's ID.\"\nmsgstr \"アプリケーションコマンドのアプリケーションのID。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommand:40\nmsgid \"The application command's type.\"\nmsgstr \"アプリケーションコマンドのタイプ。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommand:42\n#: ../../../discord/app_commands/errors.py:docstring of discord.app_commands.errors.CommandLimitReached:12\n#: ../../../discord/app_commands/errors.py:docstring of discord.app_commands.errors.CommandNotFound:24\nmsgid \":class:`~discord.AppCommandType`\"\nmsgstr \":class:`~discord.AppCommandType`\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommand:46\nmsgid \"The application command's name.\"\nmsgstr \"アプリケーションコマンドの名前。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommand:52\nmsgid \"The application command's description.\"\nmsgstr \"アプリケーションコマンドの説明。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommand:58\nmsgid \"The localised names of the application command. Used for display purposes.\"\nmsgstr \"アプリケーションコマンドのローカライズされた名前。表示用に使用されます。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommand:60\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommand:66\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommandGroup:27\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommandGroup:33\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.Argument:27\nmsgid \"Dict[:class:`~discord.Locale`, :class:`str`]\"\nmsgstr \"Dict[:class:`~discord.Locale`, :class:`str`]\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommand:64\nmsgid \"The localised descriptions of the application command. Used for display purposes.\"\nmsgstr \"アプリケーションコマンドのローカライズされた説明。表示用に使用されます。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommand:70\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommandGroup:37\nmsgid \"A list of options.\"\nmsgstr \"オプションのリスト。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommand:72\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommandGroup:39\nmsgid \"List[Union[:class:`Argument`, :class:`AppCommandGroup`]]\"\nmsgstr \"List[Union[:class:`Argument`, :class:`AppCommandGroup`]]\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommand:76\nmsgid \"The default member permissions that can run this command.\"\nmsgstr \"このコマンドを実行できるデフォルトのメンバー権限。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommand:78\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Command:66\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.ContextMenu:51\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Group:76\nmsgid \"Optional[:class:`~discord.Permissions`]\"\nmsgstr \"Optional[:class:`~discord.Permissions`]\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommand:82\nmsgid \"A boolean that indicates whether this command can be run in direct messages.\"\nmsgstr \"このコマンドがダイレクトメッセージで実行できるかどうかを示す真偽値。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommand:88\nmsgid \"The ID of the guild this command is registered in. A value of ``None`` denotes that it is a global command.\"\nmsgstr \"このコマンドが登録されているギルドのID。 ``None`` の値はグローバルコマンドであることを示します。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommand:95\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Command:78\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Group:88\nmsgid \"Whether the command is NSFW and should only work in NSFW channels.\"\nmsgstr \"コマンドに年齢制限をかけて、年齢制限つきチャンネルのみで利用できるようにすべきか。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.AppCommand.mention:1\nmsgid \"Returns a string that allows you to mention the given AppCommand.\"\nmsgstr \"アプリケーションコマンドをメンションすることのできる文字列を返します。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.AppCommand.guild:1\nmsgid \"Returns the guild this command is registered to if it exists.\"\nmsgstr \"存在する場合、このコマンドが登録されたギルドを返します。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.AppCommand.guild:4\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.AppCommandChannel.guild:3\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.AppCommandThread.guild:3\nmsgid \"Optional[:class:`~discord.Guild`]\"\nmsgstr \"Optional[:class:`~discord.Guild`]\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommand.delete:3\nmsgid \"Deletes the application command.\"\nmsgstr \"アプリケーションコマンドを削除します。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommand.delete:5\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommand.edit:17\nmsgid \"The application command was not found.\"\nmsgstr \"アプリケーションコマンドが見つからなかった場合。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommand.delete:6\nmsgid \"You do not have permission to delete this application command.\"\nmsgstr \"アプリケーションコマンドを削除する権限がない場合。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommand.delete:7\nmsgid \"Deleting the application command failed.\"\nmsgstr \"アプリケーションコマンドの削除に失敗した場合。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommand.delete:8\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommand.edit:20\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommand.fetch_permissions:10\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.sync:17\nmsgid \"The client does not have an application ID.\"\nmsgstr \"クライアントにアプリケーションIDがない場合。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommand.edit:3\nmsgid \"Edits the application command.\"\nmsgstr \"アプリケーションコマンドを編集します。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommand.edit:5\nmsgid \"The new name for the application command.\"\nmsgstr \"アプリケーションコマンドの新しい名前。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommand.edit:7\nmsgid \"The new description for the application command.\"\nmsgstr \"アプリケーションコマンドの新しい説明。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommand.edit:9\nmsgid \"The new default permissions needed to use this application command. Pass value of ``None`` to remove any permission requirements.\"\nmsgstr \"このアプリケーションコマンドを使用するために必要な新しいデフォルトの権限。権限要件を削除するには ``None`` の値を渡します。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommand.edit:12\nmsgid \"Indicates if the application command can be used in DMs.\"\nmsgstr \"アプリケーションコマンドがDMで使用できるかどうかを示します。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommand.edit:14\nmsgid \"List of new options for this application command.\"\nmsgstr \"このアプリケーションコマンドの新しいオプションのリスト。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommand.edit:18\nmsgid \"You do not have permission to edit this application command.\"\nmsgstr \"アプリケーションコマンドを編集する権限がない場合。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommand.edit:19\nmsgid \"Editing the application command failed.\"\nmsgstr \"アプリケーションコマンドの編集に失敗した場合。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommand.edit:22\nmsgid \"The newly edited application command.\"\nmsgstr \"新しく編集されたアプリケーションコマンド。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommand.edit:23\nmsgid \":class:`AppCommand`\"\nmsgstr \":class:`AppCommand`\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommand.fetch_permissions:3\nmsgid \"Retrieves this command's permission in the guild.\"\nmsgstr \"コマンドのギルド内の権限を取得します。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommand.fetch_permissions:5\nmsgid \"The guild to retrieve the permissions from.\"\nmsgstr \"権限を取得するギルド。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommand.fetch_permissions:8\nmsgid \"You do not have permission to fetch the application command's permissions.\"\nmsgstr \"アプリケーションコマンドの権限を取得する権限がない場合。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommand.fetch_permissions:9\nmsgid \"Fetching the application command's permissions failed.\"\nmsgstr \"アプリケーションコマンドの権限を取得するのに失敗した場合。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommand.fetch_permissions:11\nmsgid \"The application command's permissions could not be found.     This can also indicate that the permissions are synced with the guild     (i.e. they are unchanged from the default).\"\nmsgstr \"アプリケーションコマンドの権限が見つからなかった場合。これは、権限が同期されている(つまり、デフォルトのまま変わっていない)ことも示します。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommand.fetch_permissions:13\nmsgid \"An object representing the application command's permissions in the guild.\"\nmsgstr \"ギルド内のアプリケーションコマンドの権限を表すオブジェクト。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommand.fetch_permissions:14\nmsgid \":class:`GuildAppCommandPermissions`\"\nmsgstr \":class:`GuildAppCommandPermissions`\"\n\n#: ../../interactions/api.rst:101\nmsgid \"AppCommandGroup\"\nmsgstr \"AppCommandGroup\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommandGroup:1\nmsgid \"Represents an application command subcommand.\"\nmsgstr \"アプリケーションコマンドのサブコマンドを表します。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommandGroup:7\nmsgid \"The type of subcommand.\"\nmsgstr \"サブコマンドのタイプ。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommandGroup:9\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.Argument:9\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Parameter:57\n#: ../../../discord/app_commands/transformers.py:docstring of discord.app_commands.Transformer.type:7\n#: ../../../discord/app_commands/errors.py:docstring of discord.app_commands.errors.TransformerError:24\nmsgid \":class:`~discord.AppCommandOptionType`\"\nmsgstr \":class:`~discord.AppCommandOptionType`\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommandGroup:13\nmsgid \"The name of the subcommand.\"\nmsgstr \"サブコマンドの名前。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommandGroup:19\nmsgid \"The description of the subcommand.\"\nmsgstr \"サブコマンドの説明。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommandGroup:25\nmsgid \"The localised names of the subcommand. Used for display purposes.\"\nmsgstr \"サブコマンドのローカライズされた名前。表示用に使用されます。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommandGroup:31\nmsgid \"The localised descriptions of the subcommand. Used for display purposes.\"\nmsgstr \"サブコマンドのローカライズされた説明。表示用に使用されます。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommandGroup:43\nmsgid \"The parent application command.\"\nmsgstr \"親アプリケーションコマンド。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommandGroup:45\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.Argument:51\nmsgid \"Union[:class:`AppCommand`, :class:`AppCommandGroup`]\"\nmsgstr \"Union[:class:`AppCommand`, :class:`AppCommandGroup`]\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.AppCommandGroup.qualified_name:1\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.Command.qualified_name:1\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.ContextMenu.qualified_name:1\nmsgid \"Returns the fully qualified command name.\"\nmsgstr \"完全修飾されたコマンド名を返します。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.AppCommandGroup.qualified_name:3\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.Command.qualified_name:3\nmsgid \"The qualified name includes the parent name as well. For example, in a command like ``/foo bar`` the qualified name is ``foo bar``.\"\nmsgstr \"修飾名には親の名前も含まれています。例えば、 ``/foo bar`` のようなコマンドでは修飾名は ``foo bar`` です。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.AppCommandGroup.mention:1\nmsgid \"Returns a string that allows you to mention the given AppCommandGroup.\"\nmsgstr \"アプリケーションコマンドグループをメンションすることのできる文字列を返します。\"\n\n#: ../../interactions/api.rst:109\nmsgid \"AppCommandChannel\"\nmsgstr \"AppCommandChannel\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommandChannel:1\nmsgid \"Represents an application command partially resolved channel object.\"\nmsgstr \"アプリケーションコマンドの部分的に解決されたチャンネルオブジェクトを表します。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommandChannel:9\nmsgid \"Checks if two channels are equal.\"\nmsgstr \"二つのチャンネルが等しいかを比較します。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommandChannel:13\nmsgid \"Checks if two channels are not equal.\"\nmsgstr \"二つのチャンネルが等しいものではないか比較します。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommandChannel:17\nmsgid \"Returns the channel's hash.\"\nmsgstr \"チャンネルのハッシュ値を返します。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommandChannel:21\nmsgid \"Returns the channel's name.\"\nmsgstr \"チャンネルの名前を返します。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommandChannel:25\nmsgid \"The ID of the channel.\"\nmsgstr \"チャンネルのID。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommandChannel:31\nmsgid \"The type of channel.\"\nmsgstr \"チャンネルの種類。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommandChannel:33\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommandThread:33\nmsgid \":class:`~discord.ChannelType`\"\nmsgstr \":class:`~discord.ChannelType`\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommandChannel:37\nmsgid \"The name of the channel.\"\nmsgstr \"チャンネルの名前。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommandChannel:43\nmsgid \"The resolved permissions of the user who invoked the application command in that channel.\"\nmsgstr \"アプリケーションコマンドを呼び出したユーザーのチャンネル内の解決済み権限。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommandChannel:46\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommandThread:52\nmsgid \":class:`~discord.Permissions`\"\nmsgstr \":class:`~discord.Permissions`\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommandChannel:50\nmsgid \"The guild ID this channel belongs to.\"\nmsgstr \"このチャンネルが存在するギルドのID。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.AppCommandChannel.guild:1\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.AppCommandThread.guild:1\nmsgid \"The channel's guild, from cache, if found.\"\nmsgstr \"見つかった場合、キャッシュからのチャンネルのギルド。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommandChannel.resolve:1\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommandThread.resolve:1\nmsgid \"Resolves the application command channel to the appropriate channel from cache if found.\"\nmsgstr \"見つかった場合、アプリケーションコマンドチャンネルを適切なキャッシュからのチャンネルに解決します。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommandChannel.resolve:4\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommandThread.resolve:4\nmsgid \"The resolved guild channel or ``None`` if not found in cache.\"\nmsgstr \"解決したギルドチャンネル。キャッシュ内に見つからない場合は ``None`` が返されます。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommandChannel.resolve:5\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommandThread.resolve:5\nmsgid \"Optional[:class:`.abc.GuildChannel`]\"\nmsgstr \"Optional[:class:`.abc.GuildChannel`]\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommandChannel.fetch:3\nmsgid \"Fetches the partial channel to a full :class:`.abc.GuildChannel`.\"\nmsgstr \"部分的なチャンネルから :class:`.abc.GuildChannel` を取得します。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommandChannel.fetch:5\nmsgid \"The channel was not found.\"\nmsgstr \"チャンネルが見つからなかった場合。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommandChannel.fetch:6\nmsgid \"You do not have the permissions required to get a channel.\"\nmsgstr \"チャンネルを取得するために必要な権限がない場合。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommandChannel.fetch:7\nmsgid \"Retrieving the channel failed.\"\nmsgstr \"チャンネルの取得に失敗した時。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommandChannel.fetch:9\nmsgid \"The full channel.\"\nmsgstr \"完全なチャンネル。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommandChannel.fetch:10\nmsgid \":class:`.abc.GuildChannel`\"\nmsgstr \":class:`.abc.GuildChannel`\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.AppCommandChannel.mention:1\nmsgid \"The string that allows you to mention the channel.\"\nmsgstr \"チャンネルにメンションできる文字列。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.AppCommandChannel.created_at:1\nmsgid \"An aware timestamp of when this channel was created in UTC.\"\nmsgstr \"チャンネルが作成されたときのUTC aware タイムスタンプ。\"\n\n#: ../../interactions/api.rst:117\nmsgid \"AppCommandThread\"\nmsgstr \"AppCommandThread\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommandThread:1\nmsgid \"Represents an application command partially resolved thread object.\"\nmsgstr \"アプリケーションコマンドの部分的に解決されたスレッドオブジェクトを表します。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommandThread:9\nmsgid \"Checks if two thread are equal.\"\nmsgstr \"二つのスレッドが等しいかを比較します。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommandThread:13\nmsgid \"Checks if two thread are not equal.\"\nmsgstr \"二つのスレッドが等しいものではないか比較します。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommandThread:17\nmsgid \"Returns the thread's hash.\"\nmsgstr \"スレッドのハッシュを返します。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommandThread:21\nmsgid \"Returns the thread's name.\"\nmsgstr \"スレッドの名前を返します。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommandThread:25\nmsgid \"The ID of the thread.\"\nmsgstr \"スレッドのID。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommandThread:31\nmsgid \"The type of thread.\"\nmsgstr \"スレッドの種類。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommandThread:43\nmsgid \"The parent text channel ID this thread belongs to.\"\nmsgstr \"このスレッドが属する親テキストチャンネルのID。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommandThread:49\nmsgid \"The resolved permissions of the user who invoked the application command in that thread.\"\nmsgstr \"アプリケーションコマンドを呼び出したユーザーのスレッド内の解決済み権限。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommandThread:56\nmsgid \"The guild ID this thread belongs to.\"\nmsgstr \"このスレッドが属するギルドのID。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommandThread:62\nmsgid \"Whether the thread is archived.\"\nmsgstr \"スレッドがアーカイブされているかどうか。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommandThread:68\nmsgid \"Whether the thread is locked.\"\nmsgstr \"スレッドがロックされているかどうか。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommandThread:74\nmsgid \"Whether non-moderators can add other non-moderators to this thread. This is always ``True`` for public threads.\"\nmsgstr \"モデレータでないユーザーがこのスレッドに他のモデレータでないユーザーを追加できるかどうか。これは公開スレッドでは常に ``True`` です。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommandThread:81\nmsgid \"The user's ID that archived this thread.\"\nmsgstr \"このスレッドをアーカイブしたユーザーのID。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommandThread:87\nmsgid \"The duration in minutes until the thread is automatically hidden from the channel list. Usually a value of 60, 1440, 4320 and 10080.\"\nmsgstr \"\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommandThread:94\nmsgid \"An aware timestamp of when the thread's archived status was last updated in UTC.\"\nmsgstr \"スレッドのアーカイブ状態が最後に更新されたときのawareなタイムスタンプ。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.AppCommandThread.parent:1\nmsgid \"The parent channel this thread belongs to.\"\nmsgstr \"このスレッドが属する親チャンネル。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.AppCommandThread.parent:3\nmsgid \"Optional[:class:`~discord.TextChannel`]\"\nmsgstr \"Optional[:class:`~discord.TextChannel`]\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.AppCommandThread.mention:1\nmsgid \"The string that allows you to mention the thread.\"\nmsgstr \"スレッドに言及できるようにするための文字列。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.AppCommandThread.created_at:1\nmsgid \"An aware timestamp of when the thread was created in UTC.\"\nmsgstr \"UTCで表されたスレッドが作成されたときのタイムスタンプ。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.AppCommandThread.created_at:5\nmsgid \"This timestamp only exists for threads created after 9 January 2022, otherwise returns ``None``.\"\nmsgstr \"このタイムスタンプは、2022 年1 月 9 日以降に作成されたスレッドにのみ存在します。それ以外の場合は ``None`` を返します。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommandThread.fetch:3\nmsgid \"Fetches the partial channel to a full :class:`~discord.Thread`.\"\nmsgstr \"部分的なチャンネルから :class:`~discord.Thread` を取得します。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommandThread.fetch:5\nmsgid \"The thread was not found.\"\nmsgstr \"スレッドが見つからなかった場合。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommandThread.fetch:6\nmsgid \"You do not have the permissions required to get a thread.\"\nmsgstr \"スレッドの取得に必要な権限がない場合。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommandThread.fetch:7\nmsgid \"Retrieving the thread failed.\"\nmsgstr \"スレッドの取得に失敗した場合。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommandThread.fetch:9\nmsgid \"The full thread.\"\nmsgstr \"完全なスレッド。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommandThread.fetch:10\nmsgid \":class:`~discord.Thread`\"\nmsgstr \":class:`~discord.Thread`\"\n\n#: ../../interactions/api.rst:125\nmsgid \"AppCommandPermissions\"\nmsgstr \"AppCommandPermissions\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommandPermissions:1\nmsgid \"Represents the permissions for an application command.\"\nmsgstr \"アプリケーションコマンドの権限を表します。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommandPermissions:7\nmsgid \"The guild associated with this permission.\"\nmsgstr \"この権限に紐づけられたギルド。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommandPermissions:9\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.GuildAppCommandPermissions.guild:3\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AllChannels:9\nmsgid \":class:`~discord.Guild`\"\nmsgstr \":class:`~discord.Guild`\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommandPermissions:13\nmsgid \"The ID of the permission target, such as a role, channel, or guild. The special ``guild_id - 1`` sentinel is used to represent \\\"all channels\\\".\"\nmsgstr \"ロール、チャンネル、ギルドなど、権限の対象のID。すべてのチャンネルを示す ``guild_id - 1`` センチネルもあります。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommandPermissions:20\nmsgid \"The role, user, or channel associated with this permission. This could also be the :class:`AllChannels` sentinel type. Falls back to :class:`~discord.Object` if the target could not be found in the cache.\"\nmsgstr \"この権限に関連付けられたロール、ユーザー、またはチャンネル。これは :class:`AllChannels` センチネル型である可能性もあります。これは対象がキャッシュ内に見つからない場合は :class:`~discord.Object` となります。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommandPermissions:23\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Parameter:82\n#: ../../../discord/app_commands/translator.py:docstring of discord.app_commands.translator.TranslationContext:16\n#: ../../../discord/app_commands/errors.py:docstring of discord.app_commands.errors.TransformerError:18\nmsgid \"Any\"\nmsgstr \"Any\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommandPermissions:27\nmsgid \"The type of permission.\"\nmsgstr \"権限の種類。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommandPermissions:29\nmsgid \":class:`.AppCommandPermissionType`\"\nmsgstr \":class:`.AppCommandPermissionType`\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AppCommandPermissions:33\nmsgid \"The permission value. ``True`` for allow, ``False`` for deny.\"\nmsgstr \"権限の値。 ``True`` は許可を、 ``False`` は拒否を示します。\"\n\n#: ../../interactions/api.rst:133\nmsgid \"GuildAppCommandPermissions\"\nmsgstr \"GuildAppCommandPermissions\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.GuildAppCommandPermissions:1\nmsgid \"Represents the permissions for an application command in a guild.\"\nmsgstr \"ギルド内のアプリケーションコマンドの権限を示します。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.GuildAppCommandPermissions:7\nmsgid \"The application ID.\"\nmsgstr \"アプリケーションID。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.GuildAppCommandPermissions:13\nmsgid \"The application command associated with the permissions.\"\nmsgstr \"権限に紐づけられたアプリケーションコマンド。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.GuildAppCommandPermissions:15\nmsgid \":class:`.AppCommand`\"\nmsgstr \":class:`.AppCommand`\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.GuildAppCommandPermissions:19\nmsgid \"ID of the command or the application ID. When this is the application ID instead of a command ID, the permissions apply to all commands that do not contain explicit overwrites.\"\nmsgstr \"コマンドIDまたはアプリケーションID。これがコマンドIDではなくアプリケーションIDの場合、権限は明示的に上書きされていないすべてのコマンドに適用されます。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.GuildAppCommandPermissions:27\nmsgid \"The guild ID associated with the permissions.\"\nmsgstr \"この権限に関連付けられたギルドID。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.GuildAppCommandPermissions:33\nmsgid \"The permissions, this is a max of 100.\"\nmsgstr \"権限ら。最大で100個の制限があります。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.GuildAppCommandPermissions:35\nmsgid \"List[:class:`AppCommandPermissions`]\"\nmsgstr \"List[:class:`AppCommandPermissions`]\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.GuildAppCommandPermissions.guild:1\nmsgid \"The guild associated with the permissions.\"\nmsgstr \"権限に紐づけられたギルド。\"\n\n#: ../../interactions/api.rst:141\nmsgid \"Argument\"\nmsgstr \"Argument\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.Argument:1\nmsgid \"Represents an application command argument.\"\nmsgstr \"アプリケーションコマンドの引数を表します。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.Argument:7\nmsgid \"The type of argument.\"\nmsgstr \"引数のタイプ。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.Argument:13\nmsgid \"The name of the argument.\"\nmsgstr \"引数の名前。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.Argument:19\nmsgid \"The description of the argument.\"\nmsgstr \"引数の説明。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.Argument:25\nmsgid \"The localised names of the argument. Used for display purposes.\"\nmsgstr \"引数のローカライズされた名前。表示用に使用されます。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.Argument:31\nmsgid \"The localised descriptions of the argument. Used for display purposes.\"\nmsgstr \"引数のローカライズされた説明。表示用に使用されます。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.Argument:37\nmsgid \"Whether the argument is required.\"\nmsgstr \"引数が入力必須かどうか。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.Argument:43\nmsgid \"A list of choices for the command to choose from for this argument.\"\nmsgstr \"この引数の選択肢のリスト。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.Argument:45\nmsgid \"List[:class:`Choice`]\"\nmsgstr \"List[:class:`Choice`]\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.Argument:49\nmsgid \"The parent application command that has this argument.\"\nmsgstr \"この引数を持つ親アプリケーションコマンド。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.Argument:55\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Parameter:61\nmsgid \"The channel types that are allowed for this parameter.\"\nmsgstr \"このパラメータにて利用できるチャンネルの種類。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.Argument:57\n#: ../../../discord/ui/select.py:docstring of discord.ui.ChannelSelect.channel_types:3\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Parameter:63\n#: ../../../discord/app_commands/transformers.py:docstring of discord.app_commands.Transformer.channel_types:9\nmsgid \"List[:class:`~discord.ChannelType`]\"\nmsgstr \"List[:class:`~discord.ChannelType`]\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.Argument:61\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Parameter:67\n#: ../../../discord/app_commands/transformers.py:docstring of discord.app_commands.Transformer.min_value:1\nmsgid \"The minimum supported value for this parameter.\"\nmsgstr \"このパラメータがサポートする最小の値。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.Argument:63\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.Argument:69\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Parameter:69\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Parameter:75\nmsgid \"Optional[Union[:class:`int`, :class:`float`]]\"\nmsgstr \"Optional[Union[:class:`int`, :class:`float`]]\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.Argument:67\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Parameter:73\n#: ../../../discord/app_commands/transformers.py:docstring of discord.app_commands.Transformer.max_value:1\nmsgid \"The maximum supported value for this parameter.\"\nmsgstr \"このパラメータがサポートする最大の値。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.Argument:73\nmsgid \"The minimum allowed length for this parameter.\"\nmsgstr \"このパラメータが許容する最小の長さ。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.Argument:79\nmsgid \"The maximum allowed length for this parameter.\"\nmsgstr \"このパラメータが許容する最大の長さ。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.Argument:85\nmsgid \"Whether the argument has autocomplete.\"\nmsgstr \"この引数がオートコンプリートを有するか。\"\n\n#: ../../interactions/api.rst:149\nmsgid \"AllChannels\"\nmsgstr \"AllChannels\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AllChannels:1\nmsgid \"Represents all channels for application command permissions.\"\nmsgstr \"アプリケーションコマンド権限のすべてのチャンネルを表します。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.AllChannels:7\nmsgid \"The guild the application command permission is for.\"\nmsgstr \"アプリケーションコマンド権限の対象ギルド。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.AllChannels.id:1\nmsgid \"The ID sentinel used to represent all channels. Equivalent to the guild's ID minus 1.\"\nmsgstr \"すべてのチャンネルを表すために使用されるIDセンチネル。ギルドのIDから1を引いたものに相当します。\"\n\n#: ../../interactions/api.rst:157\nmsgid \"Data Classes\"\nmsgstr \"データクラス\"\n\n#: ../../interactions/api.rst:159\nmsgid \"Similar to :ref:`discord_api_data`, these can be received and constructed by users.\"\nmsgstr \":ref:`discord_api_data` と同様に、これらは受け取ることもあれば、ユーザーによって構築することもできます。\"\n\n#: ../../interactions/api.rst:162\nmsgid \"SelectOption\"\nmsgstr \"SelectOption\"\n\n#: ../../../discord/components.py:docstring of discord.components.SelectOption:1\nmsgid \"Represents a select menu's option.\"\nmsgstr \"選択メニューのオプションを表します。\"\n\n#: ../../../discord/components.py:docstring of discord.components.SelectOption:3\nmsgid \"These can be created by users.\"\nmsgstr \"これらはユーザーによって作成することができます。\"\n\n#: ../../../discord/components.py:docstring of discord.components.SelectOption:7\n#: ../../../discord/components.py:docstring of discord.components.SelectOption:24\n#: ../../../discord/ui/select.py:docstring of discord.ui.select.Select.add_option:6\nmsgid \"The label of the option. This is displayed to users. Can only be up to 100 characters.\"\nmsgstr \"オプションのラベル。これはユーザーに表示されます。最大 100 文字まで可能です。\"\n\n#: ../../../discord/components.py:docstring of discord.components.SelectOption:10\n#: ../../../discord/components.py:docstring of discord.components.SelectOption:31\nmsgid \"The value of the option. This is not displayed to users. If not provided when constructed then it defaults to the label. Can only be up to 100 characters.\"\nmsgstr \"オプションの値。これはユーザーには表示されません。 構築時に指定されていない場合は、ラベル値が既定で使用されます。最大 100 文字まで可能です。\"\n\n#: ../../../discord/components.py:docstring of discord.components.SelectOption:14\n#: ../../../discord/components.py:docstring of discord.components.SelectOption:39\n#: ../../../discord/ui/select.py:docstring of discord.ui.select.Select.add_option:12\nmsgid \"An additional description of the option, if any. Can only be up to 100 characters.\"\nmsgstr \"存在する場合、オプションの追加の説明。最大 100 文字まで可能です。\"\n\n#: ../../../discord/components.py:docstring of discord.components.SelectOption:17\n#: ../../../discord/components.py:docstring of discord.SelectOption.emoji:1\nmsgid \"The emoji of the option, if available.\"\nmsgstr \"利用可能な場合、オプションの絵文字。\"\n\n#: ../../../discord/components.py:docstring of discord.components.SelectOption:19\n#: ../../../discord/components.py:docstring of discord.components.SelectOption:46\n#: ../../../discord/ui/select.py:docstring of discord.ui.select.Select.add_option:18\nmsgid \"Whether this option is selected by default.\"\nmsgstr \"このオプションがデフォルトで選択されているかどうか。\"\n\n#: ../../../discord/components.py:docstring of discord.SelectOption.emoji:3\n#: ../../../discord/ui/button.py:docstring of discord.ui.Button.emoji:3\nmsgid \"Optional[:class:`.PartialEmoji`]\"\nmsgstr \"Optional[:class:`.PartialEmoji`]\"\n\n#: ../../interactions/api.rst:170\nmsgid \"Choice\"\nmsgstr \"Choice\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.Choice:1\nmsgid \"Represents an application command argument choice.\"\nmsgstr \"アプリケーションコマンドの引数の選択肢を表します。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.Choice:9\nmsgid \"Checks if two choices are equal.\"\nmsgstr \"二つの選択肢が等しいかを比較します。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.Choice:13\nmsgid \"Checks if two choices are not equal.\"\nmsgstr \"二つの選択肢が等しいものではないか比較します。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.Choice:17\nmsgid \"Returns the choice's hash.\"\nmsgstr \"選択肢のハッシュ値を返します。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.Choice:19\nmsgid \"The name of the choice. Used for display purposes. Can only be up to 100 characters.\"\nmsgstr \"選択肢の名前。表示用に使用されます。最大100文字まで可能です。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.Choice:22\nmsgid \"The localised names of the choice. Used for display purposes.\"\nmsgstr \"選択肢のローカライズされた名前。表示用に使用されます。\"\n\n#: ../../../discord/app_commands/models.py:docstring of discord.app_commands.models.Choice:24\nmsgid \"The value of the choice. If it's a string, it can only be up to 100 characters long.\"\nmsgstr \"選択肢の値。文字列の場合は、最大100文字まで使用できます。\"\n\n#: ../../interactions/api.rst:179\nmsgid \"Enumerations\"\nmsgstr \"列挙型\"\n\n#: ../../interactions/api.rst:183\nmsgid \"Specifies the type of :class:`Interaction`.\"\nmsgstr \":class:`Interaction` のタイプを指定します。\"\n\n#: ../../interactions/api.rst:189\nmsgid \"Represents Discord pinging to see if the interaction response server is alive.\"\nmsgstr \"インタラクション応答サーバーが利用可能かを確認するためのDiscordのping。\"\n\n#: ../../interactions/api.rst:192\nmsgid \"Represents a slash command interaction.\"\nmsgstr \"スラッシュコマンドのインタラクション。\"\n\n#: ../../interactions/api.rst:195\nmsgid \"Represents a component based interaction, i.e. using the Discord Bot UI Kit.\"\nmsgstr \"コンポーネントベースのインタラクション、つまり Discord Bot UI Kitの使用。\"\n\n#: ../../interactions/api.rst:198\nmsgid \"Represents an auto complete interaction.\"\nmsgstr \"オートコンプリートのインタラクション。\"\n\n#: ../../interactions/api.rst:201\nmsgid \"Represents submission of a modal interaction.\"\nmsgstr \"モーダル送信のインタラクション。\"\n\n#: ../../interactions/api.rst:205\nmsgid \"Specifies the response type for the interaction.\"\nmsgstr \"インタラクションの応答タイプを示します。\"\n\n#: ../../interactions/api.rst:211\nmsgid \"Pongs the interaction when given a ping.\"\nmsgstr \"pingインタラクションにpongします。\"\n\n#: ../../interactions/api.rst:213\nmsgid \"See also :meth:`InteractionResponse.pong`\"\nmsgstr \":meth:`InteractionResponse.pong` も参照してください。\"\n\n#: ../../interactions/api.rst:216\nmsgid \"Respond to the interaction with a message.\"\nmsgstr \"インタラクションにメッセージで応答します。\"\n\n#: ../../interactions/api.rst:218\nmsgid \"See also :meth:`InteractionResponse.send_message`\"\nmsgstr \":meth:`InteractionResponse.send_message` も参照してください。\"\n\n#: ../../interactions/api.rst:221\nmsgid \"Responds to the interaction with a message at a later time.\"\nmsgstr \"後でインタラクションにメッセージで応答します。\"\n\n#: ../../interactions/api.rst:223\n#: ../../interactions/api.rst:229\nmsgid \"See also :meth:`InteractionResponse.defer`\"\nmsgstr \":meth:`InteractionResponse.defer` も参照してください。\"\n\n#: ../../interactions/api.rst:226\nmsgid \"Acknowledges the component interaction with a promise that the message will update later (though there is no need to actually update the message).\"\nmsgstr \"メッセージが後で更新されると約束してコンポーネントインタラクションを確認します。（実際には、メッセージを更新する必要はありません。）\"\n\n#: ../../interactions/api.rst:232\nmsgid \"Responds to the interaction by editing the message.\"\nmsgstr \"インタラクションにメッセージを編集して応答します。\"\n\n#: ../../interactions/api.rst:234\nmsgid \"See also :meth:`InteractionResponse.edit_message`\"\nmsgstr \":meth:`InteractionResponse.edit_message` も参照してください。\"\n\n#: ../../interactions/api.rst:237\nmsgid \"Responds to the autocomplete interaction with suggested choices.\"\nmsgstr \"オートコンプリートインタラクションに対し提案された選択肢で応答します。\"\n\n#: ../../interactions/api.rst:239\nmsgid \"See also :meth:`InteractionResponse.autocomplete`\"\nmsgstr \":meth:`InteractionResponse.autocomplete` も参照してください。\"\n\n#: ../../interactions/api.rst:242\nmsgid \"Responds to the interaction with a modal.\"\nmsgstr \"インタラクションにモーダルで応答します。\"\n\n#: ../../interactions/api.rst:244\nmsgid \"See also :meth:`InteractionResponse.send_modal`\"\nmsgstr \":meth:`InteractionResponse.send_modal` も参照してください。\"\n\n#: ../../interactions/api.rst:248\nmsgid \"Represents the component type of a component.\"\nmsgstr \"コンポーネントのコンポーネントタイプを表します。\"\n\n#: ../../interactions/api.rst:254\nmsgid \"Represents the group component which holds different components in a row.\"\nmsgstr \"行内に異なるコンポーネントを保持するグループコンポーネント。\"\n\n#: ../../interactions/api.rst:258\nmsgid \"Represents a button component.\"\nmsgstr \"ボタンコンポーネント。\"\n\n#: ../../interactions/api.rst:262\nmsgid \"Represents a text box component.\"\nmsgstr \"テキストボックスコンポーネント。\"\n\n#: ../../interactions/api.rst:266\nmsgid \"Represents a select component.\"\nmsgstr \"選択メニューコンポーネント。\"\n\n#: ../../interactions/api.rst:270\nmsgid \"An alias to :attr:`select`. Represents a default select component.\"\nmsgstr \":attr:`select` のエイリアス。デフォルトの選択コンポーネントを表します。\"\n\n#: ../../interactions/api.rst:274\nmsgid \"Represents a user select component.\"\nmsgstr \"ユーザー選択メニューコンポーネント。\"\n\n#: ../../interactions/api.rst:278\nmsgid \"Represents a role select component.\"\nmsgstr \"ロール選択メニューコンポーネント。\"\n\n#: ../../interactions/api.rst:282\nmsgid \"Represents a select in which both users and roles can be selected.\"\nmsgstr \"ユーザとロールの両方を選択できる選択メニュー。\"\n\n#: ../../interactions/api.rst:286\nmsgid \"Represents the style of the button component.\"\nmsgstr \"ボタンコンポーネントのスタイルを表します。\"\n\n#: ../../interactions/api.rst:292\nmsgid \"Represents a blurple button for the primary action.\"\nmsgstr \"主なアクションのためのブループル色のボタンを表します。\"\n\n#: ../../interactions/api.rst:295\nmsgid \"Represents a grey button for the secondary action.\"\nmsgstr \"主でないアクションのための灰色のボタンを表します。\"\n\n#: ../../interactions/api.rst:298\nmsgid \"Represents a green button for a successful action.\"\nmsgstr \"成功したアクションを意味する緑色のボタンを表します。\"\n\n#: ../../interactions/api.rst:301\nmsgid \"Represents a red button for a dangerous action.\"\nmsgstr \"危険な操作を意味する赤いボタンを表します。\"\n\n#: ../../interactions/api.rst:304\nmsgid \"Represents a link button.\"\nmsgstr \"リンクボタンを表します。\"\n\n#: ../../interactions/api.rst:308\nmsgid \"An alias for :attr:`primary`.\"\nmsgstr \":attr:`primary` のエイリアス。\"\n\n#: ../../interactions/api.rst:311\n#: ../../interactions/api.rst:314\nmsgid \"An alias for :attr:`secondary`.\"\nmsgstr \":attr:`secondary` のエイリアス。\"\n\n#: ../../interactions/api.rst:317\nmsgid \"An alias for :attr:`success`.\"\nmsgstr \":attr:`success` のエイリアス。\"\n\n#: ../../interactions/api.rst:320\nmsgid \"An alias for :attr:`danger`.\"\nmsgstr \":attr:`danger` のエイリアス。\"\n\n#: ../../interactions/api.rst:323\nmsgid \"An alias for :attr:`link`.\"\nmsgstr \":attr:`link` のエイリアス。\"\n\n#: ../../interactions/api.rst:327\nmsgid \"Represents the style of the text box component.\"\nmsgstr \"テキストボックスコンポーネントのスタイルを表します。\"\n\n#: ../../interactions/api.rst:333\nmsgid \"Represents a short text box.\"\nmsgstr \"短いテキストボックスを表します。\"\n\n#: ../../interactions/api.rst:336\nmsgid \"Represents a long form text box.\"\nmsgstr \"長いフォームのテキストボックスを表します。\"\n\n#: ../../interactions/api.rst:339\nmsgid \"An alias for :attr:`paragraph`.\"\nmsgstr \":attr:`paragraph` のエイリアス。\"\n\n#: ../../interactions/api.rst:343\nmsgid \"The application command's option type. This is usually the type of parameter an application command takes.\"\nmsgstr \"アプリケーションコマンドのオプションタイプ。これは通常アプリケーションコマンドがとるパラメータの型です。\"\n\n#: ../../interactions/api.rst:349\nmsgid \"A subcommand.\"\nmsgstr \"サブコマンド。\"\n\n#: ../../interactions/api.rst:352\nmsgid \"A subcommand group.\"\nmsgstr \"サブコマンドグループ。\"\n\n#: ../../interactions/api.rst:355\nmsgid \"A string parameter.\"\nmsgstr \"文字列パラメータ。\"\n\n#: ../../interactions/api.rst:358\nmsgid \"A integer parameter.\"\nmsgstr \"整数パラメータ。\"\n\n#: ../../interactions/api.rst:361\nmsgid \"A boolean parameter.\"\nmsgstr \"真偽値パラメータ。\"\n\n#: ../../interactions/api.rst:364\nmsgid \"A user parameter.\"\nmsgstr \"ユーザーパラメータ。\"\n\n#: ../../interactions/api.rst:367\nmsgid \"A channel parameter.\"\nmsgstr \"チャンネルパラメータ。\"\n\n#: ../../interactions/api.rst:370\nmsgid \"A role parameter.\"\nmsgstr \"ロールパラメータ。\"\n\n#: ../../interactions/api.rst:373\nmsgid \"A mentionable parameter.\"\nmsgstr \"メンション可能なもののパラメータ。\"\n\n#: ../../interactions/api.rst:376\nmsgid \"A number parameter.\"\nmsgstr \"数値のパラメータ。\"\n\n#: ../../interactions/api.rst:379\nmsgid \"An attachment parameter.\"\nmsgstr \"添付ファイルのパラメータ。\"\n\n#: ../../interactions/api.rst:383\nmsgid \"The type of application command.\"\nmsgstr \"アプリケーションコマンドの種類。\"\n\n#: ../../interactions/api.rst:389\nmsgid \"A slash command.\"\nmsgstr \"スラッシュコマンド。\"\n\n#: ../../interactions/api.rst:392\nmsgid \"A user context menu command.\"\nmsgstr \"ユーザーコンテキストメニューコマンド。\"\n\n#: ../../interactions/api.rst:395\nmsgid \"A message context menu command.\"\nmsgstr \"メッセージコンテキストメニューコマンド。\"\n\n#: ../../interactions/api.rst:399\nmsgid \"The application command's permission type.\"\nmsgstr \"アプリケーションコマンドの権限タイプ。\"\n\n#: ../../interactions/api.rst:405\nmsgid \"The permission is for a role.\"\nmsgstr \"権限はロール用です。\"\n\n#: ../../interactions/api.rst:408\nmsgid \"The permission is for one or all channels.\"\nmsgstr \"権限は一つ、またはすべてのチャンネル用です。\"\n\n#: ../../interactions/api.rst:411\nmsgid \"The permission is for a user.\"\nmsgstr \"権限はユーザー用です。\"\n\n#: ../../interactions/api.rst:416\nmsgid \"Bot UI Kit\"\nmsgstr \"Bot UIキット\"\n\n#: ../../interactions/api.rst:418\nmsgid \"The library has helpers to aid in creating component-based UIs. These are all in the ``discord.ui`` package.\"\nmsgstr \"ライブラリにはコンポーネントベースの UI の作成を支援するヘルパーがあります。これらはすべて ``discord.ui`` パッケージにあります。\"\n\n#: ../../interactions/api.rst:422\nmsgid \"View\"\nmsgstr \"View\"\n\n#: ../../../discord/ui/view.py:docstring of discord.ui.view.View:1\nmsgid \"Represents a UI view.\"\nmsgstr \"UIビューを表します。\"\n\n#: ../../../discord/ui/view.py:docstring of discord.ui.view.View:3\nmsgid \"This object must be inherited to create a UI within Discord.\"\nmsgstr \"Discord内でUIを作成するには、このオブジェクトを継承する必要があります。\"\n\n#: ../../../discord/ui/view.py:docstring of discord.ui.view.View:7\n#: ../../../discord/ui/modal.py:docstring of discord.ui.modal.Modal:23\nmsgid \"Timeout in seconds from last interaction with the UI before no longer accepting input. If ``None`` then there is no timeout.\"\nmsgstr \"UIの最後のインタラクションから起算した、入力を受け付けなくなるまでの秒単位のタイムアウト。 ``None`` の場合タイムアウトはありません。\"\n\n#: ../../../discord/ui/view.py:docstring of discord.ui.View.timeout:1\n#: ../../../discord/ui/modal.py:docstring of discord.ui.Modal.timeout:1\nmsgid \"The timeout in seconds from last interaction with the UI before no longer accepting input. If ``None`` then there is no timeout.\"\nmsgstr \"UIの最後のインタラクションから起算した、入力を受け付けなくなるまでの秒単位のタイムアウト。 ``None`` の場合タイムアウトはありません。\"\n\n#: ../../../discord/ui/view.py:docstring of discord.ui.View.timeout:4\n#: ../../../discord/ui/modal.py:docstring of discord.ui.Modal.timeout:4\n#: ../../../discord/app_commands/checks.py:docstring of discord.app_commands.checks.Cooldown.update_rate_limit:10\nmsgid \"Optional[:class:`float`]\"\nmsgstr \"Optional[:class:`float`]\"\n\n#: ../../../discord/ui/view.py:docstring of discord.ui.View.children:1\n#: ../../../discord/ui/modal.py:docstring of discord.ui.Modal.children:1\nmsgid \"The list of children attached to this view.\"\nmsgstr \"このビューに添付された子のリスト。\"\n\n#: ../../../discord/ui/view.py:docstring of discord.ui.View.children:3\n#: ../../../discord/ui/modal.py:docstring of discord.ui.Modal.children:3\nmsgid \"List[:class:`Item`]\"\nmsgstr \"List[:class:`Item`]\"\n\n#: ../../../discord/ui/view.py:docstring of discord.ui.view.View.from_message:1\n#: ../../../discord/ui/modal.py:docstring of discord.ui.view.View.from_message:1\nmsgid \"Converts a message's components into a :class:`View`.\"\nmsgstr \"メッセージのコンポーネントを :class:`View` に変換します。\"\n\n#: ../../../discord/ui/view.py:docstring of discord.ui.view.View.from_message:3\n#: ../../../discord/ui/modal.py:docstring of discord.ui.view.View.from_message:3\nmsgid \"The :attr:`.Message.components` of a message are read-only and separate types from those in the ``discord.ui`` namespace. In order to modify and edit message components they must be converted into a :class:`View` first.\"\nmsgstr \"メッセージの :attr:`.Message.components` は読み取り専用で ``discord.ui`` 名前空間のものと異なる型を使用しています。メッセージコンポーネントを編集するためには最初に :class:`View` に変換しないといけません。\"\n\n#: ../../../discord/ui/view.py:docstring of discord.ui.view.View.from_message:8\n#: ../../../discord/ui/modal.py:docstring of discord.ui.view.View.from_message:8\nmsgid \"The message with components to convert into a view.\"\nmsgstr \"ビューに変換するコンポーネントを含むメッセージ。\"\n\n#: ../../../discord/ui/view.py:docstring of discord.ui.view.View.from_message:10\n#: ../../../discord/ui/modal.py:docstring of discord.ui.view.View.from_message:10\nmsgid \"The timeout of the converted view.\"\nmsgstr \"変換されたビューのタイムアウト。\"\n\n#: ../../../discord/ui/view.py:docstring of discord.ui.view.View.from_message:13\n#: ../../../discord/ui/modal.py:docstring of discord.ui.view.View.from_message:13\nmsgid \"The converted view. This always returns a :class:`View` and not one of its subclasses.\"\nmsgstr \"変換されたビュー。サブクラスではなく常に :class:`View` を返します。\"\n\n#: ../../../discord/ui/view.py:docstring of discord.ui.view.View.from_message:15\n#: ../../../discord/ui/modal.py:docstring of discord.ui.view.View.from_message:15\nmsgid \":class:`View`\"\nmsgstr \":class:`View`\"\n\n#: ../../../discord/ui/view.py:docstring of discord.ui.view.View.add_item:1\n#: ../../../discord/ui/modal.py:docstring of discord.ui.view.View.add_item:1\nmsgid \"Adds an item to the view.\"\nmsgstr \"ビューに項目を追加します。\"\n\n#: ../../../discord/ui/view.py:docstring of discord.ui.view.View.add_item:3\n#: ../../../discord/ui/view.py:docstring of discord.ui.view.View.remove_item:3\n#: ../../../discord/ui/view.py:docstring of discord.ui.view.View.clear_items:3\n#: ../../../discord/ui/modal.py:docstring of discord.ui.view.View.add_item:3\n#: ../../../discord/ui/modal.py:docstring of discord.ui.view.View.clear_items:3\nmsgid \"This function returns the class instance to allow for fluent-style chaining.\"\nmsgstr \"この関数は、流暢なスタイルのチェーンを可能にするため、クラスインスタンスを返します。\"\n\n#: ../../../discord/ui/view.py:docstring of discord.ui.view.View.add_item:6\n#: ../../../discord/ui/modal.py:docstring of discord.ui.view.View.add_item:6\nmsgid \"The item to add to the view.\"\nmsgstr \"ビューに追加する項目。\"\n\n#: ../../../discord/ui/view.py:docstring of discord.ui.view.View.add_item:9\n#: ../../../discord/ui/modal.py:docstring of discord.ui.view.View.add_item:9\nmsgid \"An :class:`Item` was not passed.\"\nmsgstr \":class:`Item` が渡されなかった場合。\"\n\n#: ../../../discord/ui/view.py:docstring of discord.ui.view.View.add_item:10\n#: ../../../discord/ui/modal.py:docstring of discord.ui.view.View.add_item:10\nmsgid \"Maximum number of children has been exceeded (25)     or the row the item is trying to be added to is full.\"\nmsgstr \"子の最大数 (25) を超過したか、項目を追加しようとした行がいっぱいの場合。\"\n\n#: ../../../discord/ui/view.py:docstring of discord.ui.view.View.remove_item:1\n#: ../../../discord/ui/modal.py:docstring of discord.ui.view.View.remove_item:1\nmsgid \"Removes an item from the view.\"\nmsgstr \"ビューから項目を除去します。\"\n\n#: ../../../discord/ui/view.py:docstring of discord.ui.view.View.remove_item:6\n#: ../../../discord/ui/modal.py:docstring of discord.ui.view.View.remove_item:6\nmsgid \"The item to remove from the view.\"\nmsgstr \"ビューから除去する項目。\"\n\n#: ../../../discord/ui/view.py:docstring of discord.ui.view.View.clear_items:1\n#: ../../../discord/ui/modal.py:docstring of discord.ui.view.View.clear_items:1\nmsgid \"Removes all items from the view.\"\nmsgstr \"ビューから項目をすべて除去します。\"\n\n#: ../../../discord/ui/view.py:docstring of discord.ui.view.View.interaction_check:3\n#: ../../../discord/ui/modal.py:docstring of discord.ui.view.View.interaction_check:3\nmsgid \"A callback that is called when an interaction happens within the view that checks whether the view should process item callbacks for the interaction.\"\nmsgstr \"ビュー内でインタラクションが発生したときに呼び出される、インタラクションのコールバックを処理すべきかを確認するコールバック。\"\n\n#: ../../../discord/ui/view.py:docstring of discord.ui.view.View.interaction_check:6\n#: ../../../discord/ui/modal.py:docstring of discord.ui.view.View.interaction_check:6\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Group.interaction_check:6\nmsgid \"This is useful to override if, for example, you want to ensure that the interaction author is a given user.\"\nmsgstr \"これは、インタラクションが特定のユーザーからかを確かめたい場合などに上書きすると便利です。\"\n\n#: ../../../discord/ui/view.py:docstring of discord.ui.view.View.interaction_check:9\n#: ../../../discord/ui/modal.py:docstring of discord.ui.view.View.interaction_check:9\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Group.interaction_check:9\nmsgid \"The default implementation of this returns ``True``.\"\nmsgstr \"デフォルトの実装は ``True`` を返します。\"\n\n#: ../../../discord/ui/view.py:docstring of discord.ui.view.View.interaction_check:13\n#: ../../../discord/ui/modal.py:docstring of discord.ui.view.View.interaction_check:13\nmsgid \"If an exception occurs within the body then the check is considered a failure and :meth:`on_error` is called.\"\nmsgstr \"この中で例外が発生した場合はチェックは失敗したとみなされ :meth:`on_error` が呼び出されます。\"\n\n#: ../../../discord/ui/view.py:docstring of discord.ui.view.View.interaction_check:16\n#: ../../../discord/ui/modal.py:docstring of discord.ui.view.View.interaction_check:16\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Group.interaction_check:18\nmsgid \"The interaction that occurred.\"\nmsgstr \"発生したインタラクション。\"\n\n#: ../../../discord/ui/view.py:docstring of discord.ui.view.View.interaction_check:19\n#: ../../../discord/ui/modal.py:docstring of discord.ui.view.View.interaction_check:19\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Group.interaction_check:21\nmsgid \"Whether the view children's callbacks should be called.\"\nmsgstr \"ビューの子のコールバックを呼び出すべきか。\"\n\n#: ../../../discord/ui/view.py:docstring of discord.ui.view.View.on_timeout:3\n#: ../../../discord/ui/modal.py:docstring of discord.ui.view.View.on_timeout:3\nmsgid \"A callback that is called when a view's timeout elapses without being explicitly stopped.\"\nmsgstr \"ビューが明示的に停止されずにそのタイムアウトが経過したときに呼び出されるコールバック。\"\n\n#: ../../../discord/ui/view.py:docstring of discord.ui.view.View.on_error:3\nmsgid \"A callback that is called when an item's callback or :meth:`interaction_check` fails with an error.\"\nmsgstr \"項目のコールバックや :meth:`interaction_check` がエラーで失敗したときに呼び出されるコールバック。\"\n\n#: ../../../discord/ui/view.py:docstring of discord.ui.view.View.on_error:6\n#: ../../../discord/ui/modal.py:docstring of discord.ui.modal.Modal.on_error:6\nmsgid \"The default implementation logs to the library logger.\"\nmsgstr \"デフォルトの実装はライブラリロガーに記録します。\"\n\n#: ../../../discord/ui/view.py:docstring of discord.ui.view.View.on_error:8\n#: ../../../discord/ui/modal.py:docstring of discord.ui.modal.Modal.on_error:8\nmsgid \"The interaction that led to the failure.\"\nmsgstr \"失敗したインタラクション。\"\n\n#: ../../../discord/ui/view.py:docstring of discord.ui.view.View.on_error:10\n#: ../../../discord/ui/modal.py:docstring of discord.ui.modal.Modal.on_error:10\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.on_error:13\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Group.on_error:11\nmsgid \"The exception that was raised.\"\nmsgstr \"発生した例外。\"\n\n#: ../../../discord/ui/view.py:docstring of discord.ui.view.View.on_error:12\nmsgid \"The item that failed the dispatch.\"\nmsgstr \"実行に失敗した項目。\"\n\n#: ../../../discord/ui/view.py:docstring of discord.ui.view.View.stop:1\n#: ../../../discord/ui/modal.py:docstring of discord.ui.view.View.stop:1\nmsgid \"Stops listening to interaction events from this view.\"\nmsgstr \"このビューのインタラクションイベントを受け取るのを止めます。\"\n\n#: ../../../discord/ui/view.py:docstring of discord.ui.view.View.stop:3\n#: ../../../discord/ui/modal.py:docstring of discord.ui.view.View.stop:3\nmsgid \"This operation cannot be undone.\"\nmsgstr \"この操作を元に戻すことはできません。\"\n\n#: ../../../discord/ui/view.py:docstring of discord.ui.view.View.is_finished:1\n#: ../../../discord/ui/modal.py:docstring of discord.ui.view.View.is_finished:1\nmsgid \":class:`bool`: Whether the view has finished interacting.\"\nmsgstr \":class:`bool`: ビューのインタラクションが終了したかどうか。\"\n\n#: ../../../discord/ui/view.py:docstring of discord.ui.view.View.is_dispatching:1\n#: ../../../discord/ui/modal.py:docstring of discord.ui.view.View.is_dispatching:1\nmsgid \":class:`bool`: Whether the view has been added for dispatching purposes.\"\nmsgstr \":class:`bool`: ビューがイベント受け取り用に追加されたか。\"\n\n#: ../../../discord/ui/view.py:docstring of discord.ui.view.View.is_persistent:1\n#: ../../../discord/ui/modal.py:docstring of discord.ui.view.View.is_persistent:1\nmsgid \":class:`bool`: Whether the view is set up as persistent.\"\nmsgstr \":class:`bool`: ビューが永続的と設定されているかどうか。\"\n\n#: ../../../discord/ui/view.py:docstring of discord.ui.view.View.is_persistent:3\n#: ../../../discord/ui/modal.py:docstring of discord.ui.view.View.is_persistent:3\nmsgid \"A persistent view has all their components with a set ``custom_id`` and a :attr:`timeout` set to ``None``.\"\nmsgstr \"永続的なビューは、すべてのコンポーネントに ``custom_id`` が設定されており、 :attr:`timeout` が ``None`` に設定されています。\"\n\n#: ../../../discord/ui/view.py:docstring of discord.ui.view.View.wait:3\n#: ../../../discord/ui/modal.py:docstring of discord.ui.view.View.wait:3\nmsgid \"Waits until the view has finished interacting.\"\nmsgstr \"ビューのインタラクションが終了するまで待ちます。\"\n\n#: ../../../discord/ui/view.py:docstring of discord.ui.view.View.wait:5\n#: ../../../discord/ui/modal.py:docstring of discord.ui.view.View.wait:5\nmsgid \"A view is considered finished when :meth:`stop` is called or it times out.\"\nmsgstr \"ビューは :meth:`stop` が呼び出されるかタイムアウトしたときに終了したとされます。\"\n\n#: ../../../discord/ui/view.py:docstring of discord.ui.view.View.wait:8\n#: ../../../discord/ui/modal.py:docstring of discord.ui.view.View.wait:8\nmsgid \"If ``True``, then the view timed out. If ``False`` then the view finished normally.\"\nmsgstr \"``True`` の場合、ビューがタイムアウトしました。 ``False`` の場合、ビューは正常に終了しました。\"\n\n#: ../../interactions/api.rst:430\nmsgid \"Modal\"\nmsgstr \"Modal\"\n\n#: ../../../discord/ui/modal.py:docstring of discord.ui.modal.Modal:1\nmsgid \"Represents a UI modal.\"\nmsgstr \"UIモーダルを表します。\"\n\n#: ../../../discord/ui/modal.py:docstring of discord.ui.modal.Modal:3\nmsgid \"This object must be inherited to create a modal popup window within discord.\"\nmsgstr \"Discord内でモーダルポップアップウィンドウを作成するには、このオブジェクトを継承する必要があります。\"\n\n#: ../../../discord/ui/modal.py:docstring of discord.ui.modal.Modal:8\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.context_menu:8\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.context_menu:8\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.guild_only:11\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.check:11\nmsgid \"Examples\"\nmsgstr \"例\"\n\n#: ../../../discord/ui/modal.py:docstring of discord.ui.modal.Modal:21\nmsgid \"The title of the modal. Can only be up to 45 characters.\"\nmsgstr \"モーダルのタイトル。最大45文字までです。\"\n\n#: ../../../discord/ui/modal.py:docstring of discord.ui.modal.Modal:26\nmsgid \"The ID of the modal that gets received during an interaction. If not given then one is generated for you. Can only be up to 100 characters.\"\nmsgstr \"インタラクション中に受け取るモーダルID。 指定されていない場合は、自動で生成されます。最大 100 文字までしか使用できません。\"\n\n#: ../../../discord/ui/modal.py:docstring of discord.ui.modal.Modal:33\nmsgid \"The title of the modal.\"\nmsgstr \"モーダルのタイトル。\"\n\n#: ../../../discord/ui/modal.py:docstring of discord.ui.modal.Modal:39\nmsgid \"The ID of the modal that gets received during an interaction.\"\nmsgstr \"インタラクション中に受け取るモーダルID。\"\n\n#: ../../../discord/ui/modal.py:docstring of discord.ui.modal.Modal.on_submit:3\nmsgid \"Called when the modal is submitted.\"\nmsgstr \"モーダルが送信されたときに呼び出されます。\"\n\n#: ../../../discord/ui/modal.py:docstring of discord.ui.modal.Modal.on_submit:5\nmsgid \"The interaction that submitted this modal.\"\nmsgstr \"このモーダルを送信したインタラクション。\"\n\n#: ../../../discord/ui/modal.py:docstring of discord.ui.modal.Modal.on_error:3\nmsgid \"A callback that is called when :meth:`on_submit` fails with an error.\"\nmsgstr \":meth:`on_submit` がエラーで失敗したときに呼び出されるコールバック。\"\n\n#: ../../interactions/api.rst:439\nmsgid \"Item\"\nmsgstr \"Item\"\n\n#: ../../../discord/ui/item.py:docstring of discord.ui.item.Item:1\nmsgid \"Represents the base UI item that all UI components inherit from.\"\nmsgstr \"すべての UI コンポーネントが継承する基本の UI 項目を表します。\"\n\n#: ../../../discord/ui/item.py:docstring of discord.ui.item.Item:3\nmsgid \"The current UI items supported are:\"\nmsgstr \"現在サポートされているUI項目は次のとおりです。\"\n\n#: ../../../discord/ui/item.py:docstring of discord.ui.item.Item:5\nmsgid \":class:`discord.ui.Button`\"\nmsgstr \":class:`discord.ui.Button`\"\n\n#: ../../../discord/ui/item.py:docstring of discord.ui.item.Item:6\n#: ../../../discord/ui/select.py:docstring of discord.ui.select.select:13\nmsgid \":class:`discord.ui.Select`\"\nmsgstr \":class:`discord.ui.Select`\"\n\n#: ../../../discord/ui/item.py:docstring of discord.ui.item.Item:7\nmsgid \":class:`discord.ui.TextInput`\"\nmsgstr \":class:`discord.ui.TextInput`\"\n\n#: ../../../discord/ui/item.py:docstring of discord.ui.Item.view:1\n#: ../../../discord/ui/button.py:docstring of discord.ui.Button.view:1\n#: ../../../discord/ui/select.py:docstring of discord.ui.Select.view:1\n#: ../../../discord/ui/select.py:docstring of discord.ui.ChannelSelect.view:1\n#: ../../../discord/ui/select.py:docstring of discord.ui.RoleSelect.view:1\nmsgid \"The underlying view for this item.\"\nmsgstr \"この項目が属するビュー。\"\n\n#: ../../../discord/ui/item.py:docstring of discord.ui.Item.view:3\n#: ../../../discord/ui/button.py:docstring of discord.ui.Button.view:3\n#: ../../../discord/ui/select.py:docstring of discord.ui.Select.view:3\n#: ../../../discord/ui/select.py:docstring of discord.ui.ChannelSelect.view:3\n#: ../../../discord/ui/select.py:docstring of discord.ui.RoleSelect.view:3\nmsgid \"Optional[:class:`View`]\"\nmsgstr \"Optional[:class:`View`]\"\n\n#: ../../../discord/ui/item.py:docstring of discord.ui.item.Item.callback:3\n#: ../../../discord/ui/button.py:docstring of discord.ui.item.Item.callback:3\n#: ../../../discord/ui/select.py:docstring of discord.ui.item.Item.callback:3\n#: ../../../discord/ui/select.py:docstring of discord.ui.item.Item.callback:3\n#: ../../../discord/ui/select.py:docstring of discord.ui.item.Item.callback:3\nmsgid \"The callback associated with this UI item.\"\nmsgstr \"このUI 項目に関連付けられたコールバック。\"\n\n#: ../../../discord/ui/item.py:docstring of discord.ui.item.Item.callback:5\n#: ../../../discord/ui/button.py:docstring of discord.ui.item.Item.callback:5\n#: ../../../discord/ui/select.py:docstring of discord.ui.item.Item.callback:5\n#: ../../../discord/ui/select.py:docstring of discord.ui.item.Item.callback:5\n#: ../../../discord/ui/select.py:docstring of discord.ui.item.Item.callback:5\nmsgid \"This can be overridden by subclasses.\"\nmsgstr \"これはサブクラスによって上書きできます。\"\n\n#: ../../../discord/ui/item.py:docstring of discord.ui.item.Item.callback:7\n#: ../../../discord/ui/button.py:docstring of discord.ui.item.Item.callback:7\n#: ../../../discord/ui/select.py:docstring of discord.ui.item.Item.callback:7\n#: ../../../discord/ui/select.py:docstring of discord.ui.item.Item.callback:7\n#: ../../../discord/ui/select.py:docstring of discord.ui.item.Item.callback:7\nmsgid \"The interaction that triggered this UI item.\"\nmsgstr \"このUI項目を呼び出したインタラクション。\"\n\n#: ../../../discord/ui/button.py:docstring of discord.ui.button.Button:1\nmsgid \"Represents a UI button.\"\nmsgstr \"UIボタンを表します。\"\n\n#: ../../../discord/ui/button.py:docstring of discord.ui.button.Button:18\n#: ../../../discord/ui/button.py:docstring of discord.ui.button.button:27\nmsgid \"The relative row this button belongs to. A Discord component can only have 5 rows. By default, items are arranged automatically into those 5 rows. If you'd like to control the relative positioning of the row then passing an index is advised. For example, row=1 will show up before row=2. Defaults to ``None``, which is automatic ordering. The row number must be between 0 and 4 (i.e. zero indexed).\"\nmsgstr \"このボタンが属する相対的な行。Discordコンポーネントは5行しか持てません。デフォルトでは、項目は自動的にこの5行に配置されます。 行の相対位置を制御したい場合は、インデックスを渡すことをお勧めします。 例えば、row=1 は row=2 の前に表示されます。デフォルトは ``None`` です。これは自動順序です。 行番号は 0 から 4 の間（つまり、0始まり）でなければなりません。\"\n\n#: ../../../discord/ui/button.py:docstring of discord.ui.Button.style:3\nmsgid \":class:`discord.ButtonStyle`\"\nmsgstr \":class:`discord.ButtonStyle`\"\n\n#: ../../../discord/ui/button.py:docstring of discord.ui.Button.custom_id:1\nmsgid \"The ID of the button that gets received during an interaction.\"\nmsgstr \"インタラクション中に受け取るボタンID。\"\n\n#: ../../../discord/ui/button.py:docstring of discord.ui.Button.custom_id:3\nmsgid \"If this button is for a URL, it does not have a custom ID.\"\nmsgstr \"このボタンが URL 用の場合、カスタム ID はありません。\"\n\n#: ../../../discord/ui/button.py:docstring of discord.ui.Button.label:1\nmsgid \"The label of the button, if available.\"\nmsgstr \"利用可能な場合、ボタンのラベル。\"\n\n#: ../../../discord/ui/button.py:docstring of discord.ui.button.button:1\nmsgid \"A decorator that attaches a button to a component.\"\nmsgstr \"コンポーネントにボタンを付属させるデコレータ。\"\n\n#: ../../../discord/ui/button.py:docstring of discord.ui.button.button:3\nmsgid \"The function being decorated should have three parameters, ``self`` representing the :class:`discord.ui.View`, the :class:`discord.Interaction` you receive and the :class:`discord.ui.Button` being pressed.\"\nmsgstr \"デコレートされる関数には、 :class:`discord.ui.View` を表す ``self`` 、受け取った :class:`discord.Interaction` と押された :class:`discord.ui.Button` の3つのパラメータが必要です。\"\n\n#: ../../../discord/ui/button.py:docstring of discord.ui.button.button:9\nmsgid \"Buttons with a URL cannot be created with this function. Consider creating a :class:`Button` manually instead. This is because buttons with a URL do not have a callback associated with them since Discord does not do any processing with it.\"\nmsgstr \"この関数ではURL付きのボタンは作成できません。代わりに :class:`Button` を手動で作成することを検討してください。 これは、Discordが処理を行わないため、URLのボタンに関連付けられたコールバックがないためです。\"\n\n#: ../../../discord/ui/button.py:docstring of discord.ui.button.button:17\nmsgid \"The ID of the button that gets received during an interaction. It is recommended not to set this parameter to prevent conflicts.\"\nmsgstr \"インタラクション中に受け取るボタンID。衝突を防ぐためこのパラメータを設定しないことをおすすめします。\"\n\n#: ../../../discord/ui/button.py:docstring of discord.ui.button.button:20\nmsgid \"The style of the button. Defaults to :attr:`.ButtonStyle.grey`.\"\nmsgstr \"ボタンのスタイル。デフォルトは :attr:`.ButtonStyle.grey` です。\"\n\n#: ../../../discord/ui/button.py:docstring of discord.ui.button.button:22\nmsgid \"Whether the button is disabled or not. Defaults to ``False``.\"\nmsgstr \"ボタンを無効にするかどうか。デフォルトは ``False`` です。\"\n\n#: ../../../discord/ui/button.py:docstring of discord.ui.button.button:24\nmsgid \"The emoji of the button. This can be in string form or a :class:`.PartialEmoji` or a full :class:`.Emoji`.\"\nmsgstr \"ボタンの絵文字。文字列形式または :class:`.PartialEmoji` または完全な :class:`.Emoji` が渡せます。\"\n\n#: ../../interactions/api.rst:459\nmsgid \"Select Menus\"\nmsgstr \"選択メニュー\"\n\n#: ../../interactions/api.rst:461\nmsgid \"The library provides classes to help create the different types of select menus.\"\nmsgstr \"ライブラリには、さまざまな種類の選択メニューを作成するのに役立つクラスが用意されています。\"\n\n#: ../../interactions/api.rst:464\nmsgid \"Select\"\nmsgstr \"Select\"\n\n#: ../../../discord/ui/select.py:docstring of discord.ui.select.Select:1\nmsgid \"Represents a UI select menu with a list of custom options. This is represented to the user as a dropdown menu.\"\nmsgstr \"カスタムのオプションから選択するUI選択メニューを表します。ユーザー側ではドロップダウンメニューとして表示されます。\"\n\n#: ../../../discord/ui/select.py:docstring of discord.ui.select.Select:6\n#: ../../../discord/ui/select.py:docstring of discord.ui.select.ChannelSelect:7\n#: ../../../discord/ui/select.py:docstring of discord.ui.select.RoleSelect:7\n#: ../../../discord/ui/select.py:docstring of discord.ui.select.MentionableSelect:10\n#: ../../../discord/ui/select.py:docstring of discord.ui.select.UserSelect:9\nmsgid \"The ID of the select menu that gets received during an interaction. If not given then one is generated for you.\"\nmsgstr \"インタラクション中に受け取る選択メニューID。指定されていない場合は、自動で生成されます。\"\n\n#: ../../../discord/ui/select.py:docstring of discord.ui.select.Select:21\n#: ../../../discord/ui/select.py:docstring of discord.ui.select.ChannelSelect:22\n#: ../../../discord/ui/select.py:docstring of discord.ui.select.RoleSelect:20\n#: ../../../discord/ui/select.py:docstring of discord.ui.select.MentionableSelect:23\n#: ../../../discord/ui/select.py:docstring of discord.ui.select.UserSelect:22\nmsgid \"The relative row this select menu belongs to. A Discord component can only have 5 rows. By default, items are arranged automatically into those 5 rows. If you'd like to control the relative positioning of the row then passing an index is advised. For example, row=1 will show up before row=2. Defaults to ``None``, which is automatic ordering. The row number must be between 0 and 4 (i.e. zero indexed).\"\nmsgstr \"この選択メニューが属する相対的な行。Discordコンポーネントは5行しか持てません。デフォルトでは、項目は自動的にこの5行に配置されます。 行の相対位置を制御したい場合は、インデックスを渡すことをお勧めします。 例えば、row=1 は row=2 の前に表示されます。デフォルトは ``None`` です。これは自動順序です。 行番号は 0 から 4 の間（つまり、0始まり）でなければなりません。\"\n\n#: ../../../discord/ui/select.py:docstring of discord.ui.Select.values:1\nmsgid \"A list of values that have been selected by the user.\"\nmsgstr \"ユーザーが選択した値のリスト。\"\n\n#: ../../../discord/ui/select.py:docstring of discord.ui.Select.values:3\n#: ../../../discord/ui/select.py:docstring of discord.ui.select.select:13\n#: ../../../discord/app_commands/errors.py:docstring of discord.app_commands.errors.MissingPermissions:12\n#: ../../../discord/app_commands/errors.py:docstring of discord.app_commands.errors.BotMissingPermissions:12\n#: ../../../discord/app_commands/errors.py:docstring of discord.app_commands.errors.CommandNotFound:18\nmsgid \"List[:class:`str`]\"\nmsgstr \"List[:class:`str`]\"\n\n#: ../../../discord/ui/select.py:docstring of discord.ui.Select.type:1\n#: ../../../discord/ui/select.py:docstring of discord.ui.ChannelSelect.type:1\n#: ../../../discord/ui/select.py:docstring of discord.ui.RoleSelect.type:1\n#: ../../../discord/ui/select.py:docstring of discord.ui.MentionableSelect.type:1\n#: ../../../discord/ui/select.py:docstring of discord.ui.UserSelect.type:1\nmsgid \"The type of this component.\"\nmsgstr \"このコンポーネントの種類。\"\n\n#: ../../../discord/ui/select.py:docstring of discord.ui.Select.type:3\n#: ../../../discord/ui/select.py:docstring of discord.ui.ChannelSelect.type:3\n#: ../../../discord/ui/select.py:docstring of discord.ui.RoleSelect.type:3\n#: ../../../discord/ui/select.py:docstring of discord.ui.MentionableSelect.type:3\n#: ../../../discord/ui/select.py:docstring of discord.ui.UserSelect.type:3\nmsgid \":class:`.ComponentType`\"\nmsgstr \":class:`.ComponentType`\"\n\n#: ../../../discord/ui/select.py:docstring of discord.ui.Select.options:3\nmsgid \"List[:class:`discord.SelectOption`]\"\nmsgstr \"List[:class:`discord.SelectOption`]\"\n\n#: ../../../discord/ui/select.py:docstring of discord.ui.select.Select.add_option:1\nmsgid \"Adds an option to the select menu.\"\nmsgstr \"選択メニューにオプションを追加します。\"\n\n#: ../../../discord/ui/select.py:docstring of discord.ui.select.Select.add_option:3\nmsgid \"To append a pre-existing :class:`discord.SelectOption` use the :meth:`append_option` method instead.\"\nmsgstr \"既存の :class:`discord.SelectOption` を追加するには、代わりに :meth:`append_option` メソッドを使用します。\"\n\n#: ../../../discord/ui/select.py:docstring of discord.ui.select.Select.add_option:9\nmsgid \"The value of the option. This is not displayed to users. If not given, defaults to the label. Can only be up to 100 characters.\"\nmsgstr \"オプションの値。これはユーザーには表示されません。渡されない場合は、ラベル値が既定で使用されます。最大 100 文字まで可能です。\"\n\n#: ../../../discord/ui/select.py:docstring of discord.ui.select.Select.add_option:15\nmsgid \"The emoji of the option, if available. This can either be a string representing the custom or unicode emoji or an instance of :class:`.PartialEmoji` or :class:`.Emoji`.\"\nmsgstr \"利用可能な場合、オプションの絵文字。これはカスタムまたはユニコード絵文字を表す文字列か :class:`.PartialEmoji` や :class:`.Emoji` のインスタンスのいずれかです。\"\n\n#: ../../../discord/ui/select.py:docstring of discord.ui.select.Select.add_option:21\n#: ../../../discord/ui/select.py:docstring of discord.ui.select.Select.append_option:6\nmsgid \"The number of options exceeds 25.\"\nmsgstr \"オプションの数が25を超えている場合。\"\n\n#: ../../../discord/ui/select.py:docstring of discord.ui.select.Select.append_option:1\nmsgid \"Appends an option to the select menu.\"\nmsgstr \"選択メニューにオプションを追加します。\"\n\n#: ../../../discord/ui/select.py:docstring of discord.ui.select.Select.append_option:3\nmsgid \"The option to append to the select menu.\"\nmsgstr \"選択メニューに追加するオプション。\"\n\n#: ../../../discord/ui/select.py:docstring of discord.ui.Select.max_values:1\n#: ../../../discord/ui/select.py:docstring of discord.ui.ChannelSelect.max_values:1\n#: ../../../discord/ui/select.py:docstring of discord.ui.RoleSelect.max_values:1\n#: ../../../discord/ui/select.py:docstring of discord.ui.MentionableSelect.max_values:1\n#: ../../../discord/ui/select.py:docstring of discord.ui.UserSelect.max_values:1\nmsgid \"The maximum number of items that can be chosen for this select menu.\"\nmsgstr \"選択メニューにて選択できる最大の項目数。\"\n\n#: ../../../discord/ui/select.py:docstring of discord.ui.Select.min_values:1\n#: ../../../discord/ui/select.py:docstring of discord.ui.ChannelSelect.min_values:1\n#: ../../../discord/ui/select.py:docstring of discord.ui.RoleSelect.min_values:1\n#: ../../../discord/ui/select.py:docstring of discord.ui.MentionableSelect.min_values:1\n#: ../../../discord/ui/select.py:docstring of discord.ui.UserSelect.min_values:1\nmsgid \"The minimum number of items that must be chosen for this select menu.\"\nmsgstr \"選択メニューにて選択しないといけない最小の項目数。\"\n\n#: ../../interactions/api.rst:473\nmsgid \"ChannelSelect\"\nmsgstr \"ChannelSelect\"\n\n#: ../../../discord/ui/select.py:docstring of discord.ui.select.ChannelSelect:1\nmsgid \"Represents a UI select menu with a list of predefined options with the current channels in the guild.\"\nmsgstr \"事前に指定されたギルド内のチャンネルから選択するUI選択メニューを表します。\"\n\n#: ../../../discord/ui/select.py:docstring of discord.ui.select.ChannelSelect:3\nmsgid \"Please note that if you use this in a private message with a user, no channels will be displayed to the user.\"\nmsgstr \"これをプライベートメッセージで使用すると、チャンネルの選択肢は表示されません。\"\n\n#: ../../../discord/ui/select.py:docstring of discord.ui.select.ChannelSelect:10\nmsgid \"The types of channels to show in the select menu. Defaults to all channels.\"\nmsgstr \"選択メニューに表示するチャンネルの種類。デフォルトはすべてのチャンネルです。\"\n\n#: ../../../discord/ui/select.py:docstring of discord.ui.ChannelSelect.channel_types:1\nmsgid \"A list of channel types that can be selected.\"\nmsgstr \"選択可能なチャンネルの種類のリスト。\"\n\n#: ../../../discord/ui/select.py:docstring of discord.ui.ChannelSelect.values:1\nmsgid \"A list of channels selected by the user.\"\nmsgstr \"ユーザーによって選択されたチャンネルのリスト。\"\n\n#: ../../../discord/ui/select.py:docstring of discord.ui.ChannelSelect.values:3\n#: ../../../discord/ui/select.py:docstring of discord.ui.select.select:21\nmsgid \"List[Union[:class:`~discord.app_commands.AppCommandChannel`, :class:`~discord.app_commands.AppCommandThread`]]\"\nmsgstr \"List[Union[:class:`~discord.app_commands.AppCommandChannel`, :class:`~discord.app_commands.AppCommandThread`]]\"\n\n#: ../../interactions/api.rst:482\nmsgid \"RoleSelect\"\nmsgstr \"RoleSelect\"\n\n#: ../../../discord/ui/select.py:docstring of discord.ui.select.RoleSelect:1\nmsgid \"Represents a UI select menu with a list of predefined options with the current roles of the guild.\"\nmsgstr \"事前に指定されたギルド内のロールから選択するUI選択メニューを表します。\"\n\n#: ../../../discord/ui/select.py:docstring of discord.ui.select.RoleSelect:3\nmsgid \"Please note that if you use this in a private message with a user, no roles will be displayed to the user.\"\nmsgstr \"これをプライベートメッセージで使用すると、ロールの選択肢は表示されません。\"\n\n#: ../../../discord/ui/select.py:docstring of discord.ui.RoleSelect.values:1\nmsgid \"A list of roles that have been selected by the user.\"\nmsgstr \"ユーザーが選択したロールのリスト。\"\n\n#: ../../../discord/ui/select.py:docstring of discord.ui.RoleSelect.values:3\n#: ../../../discord/ui/select.py:docstring of discord.ui.select.select:17\nmsgid \"List[:class:`discord.Role`]\"\nmsgstr \"List[:class:`discord.Role`]\"\n\n#: ../../interactions/api.rst:491\nmsgid \"MentionableSelect\"\nmsgstr \"MentionableSelect\"\n\n#: ../../../discord/ui/select.py:docstring of discord.ui.select.MentionableSelect:1\nmsgid \"Represents a UI select menu with a list of predefined options with the current members and roles in the guild.\"\nmsgstr \"事前に指定されたギルド内のメンバーとロールから選択するUI選択メニューを表します。\"\n\n#: ../../../discord/ui/select.py:docstring of discord.ui.select.MentionableSelect:3\nmsgid \"If this is sent in a private message, it will only allow the user to select the client or themselves. Every selected option in a private message will resolve to a :class:`discord.User`. It will not give the user any roles to select.\"\nmsgstr \"これがプライベートメッセージで送信された場合、ユーザーはこのクライアントまたは自分自身のみ選択できます。 プライベートメッセージ内で選択されたオプションは、すべて :class:`discord.User` に解決されます。ロールは選択できません。\"\n\n#: ../../../discord/ui/select.py:docstring of discord.ui.MentionableSelect.values:1\nmsgid \"A list of roles, members, and users that have been selected by the user.\"\nmsgstr \"ユーザーが選択したロール、メンバー、またはユーザーのリスト。\"\n\n#: ../../../discord/ui/select.py:docstring of discord.ui.MentionableSelect.values:4\n#: ../../../discord/ui/select.py:docstring of discord.ui.select.UserSelect:3\n#: ../../../discord/ui/select.py:docstring of discord.ui.UserSelect.values:4\nmsgid \"If this is sent a private message, it will only allow the user to select the client or themselves. Every selected option in a private message will resolve to a :class:`discord.User`.\"\nmsgstr \"これがプライベートメッセージで送信された場合、ユーザーはこのクライアントまたは自分自身のみ選択できます。 プライベートメッセージ内で選択されたオプションは、すべて :class:`discord.User` に解決されます。\"\n\n#: ../../../discord/ui/select.py:docstring of discord.ui.MentionableSelect.values:8\n#: ../../../discord/ui/select.py:docstring of discord.ui.UserSelect.values:8\nmsgid \"If invoked in a guild, the values will always resolve to :class:`discord.Member`.\"\nmsgstr \"ギルドで呼び出された場合、値は常に :class:`discord.Member` に解決されます。\"\n\n#: ../../../discord/ui/select.py:docstring of discord.ui.MentionableSelect.values:10\n#: ../../../discord/ui/select.py:docstring of discord.ui.select.select:19\nmsgid \"List[Union[:class:`discord.Role`, :class:`discord.Member`, :class:`discord.User`]]\"\nmsgstr \"List[Union[:class:`discord.Role`, :class:`discord.Member`, :class:`discord.User`]]\"\n\n#: ../../interactions/api.rst:500\nmsgid \"UserSelect\"\nmsgstr \"UserSelect\"\n\n#: ../../../discord/ui/select.py:docstring of discord.ui.select.UserSelect:1\nmsgid \"Represents a UI select menu with a list of predefined options with the current members of the guild.\"\nmsgstr \"事前に指定されたギルド内のメンバーから選択するUI選択メニューを表します。\"\n\n#: ../../../discord/ui/select.py:docstring of discord.ui.UserSelect.values:1\nmsgid \"A list of members and users that have been selected by the user.\"\nmsgstr \"ユーザーが選択したメンバーまたはユーザーのリスト。\"\n\n#: ../../../discord/ui/select.py:docstring of discord.ui.UserSelect.values:10\n#: ../../../discord/ui/select.py:docstring of discord.ui.select.select:15\nmsgid \"List[Union[:class:`discord.Member`, :class:`discord.User`]]\"\nmsgstr \"List[Union[:class:`discord.Member`, :class:`discord.User`]]\"\n\n#: ../../interactions/api.rst:509\nmsgid \"select\"\nmsgstr \"select\"\n\n#: ../../../discord/ui/select.py:docstring of discord.ui.select.select:1\nmsgid \"A decorator that attaches a select menu to a component.\"\nmsgstr \"コンポーネントに選択メニューを付属させるデコレータ。\"\n\n#: ../../../discord/ui/select.py:docstring of discord.ui.select.select:3\nmsgid \"The function being decorated should have three parameters, ``self`` representing the :class:`discord.ui.View`, the :class:`discord.Interaction` you receive and the chosen select class.\"\nmsgstr \"デコレートされる関数には、 :class:`discord.ui.View` を表す ``self`` 、受け取った :class:`discord.Interaction` と選択クラスの3つのパラメータが必要です。\"\n\n#: ../../../discord/ui/select.py:docstring of discord.ui.select.select:7\nmsgid \"To obtain the selected values inside the callback, you can use the ``values`` attribute of the chosen class in the callback. The list of values will depend on the type of select menu used. View the table below for more information.\"\nmsgstr \"コールバック内で選択した値を取得するには、コールバック内で選択したクラスの ``values`` 属性を使用します。 値のリストは、使用される選択メニューの種類によって異なります。詳細については、以下の表を参照してください。\"\n\n#: ../../../discord/ui/select.py:docstring of discord.ui.select.select:11\nmsgid \"Select Type\"\nmsgstr \"選択種類\"\n\n#: ../../../discord/ui/select.py:docstring of discord.ui.select.select:11\nmsgid \"Resolved Values\"\nmsgstr \"解決された値\"\n\n#: ../../../discord/ui/select.py:docstring of discord.ui.select.select:15\nmsgid \":class:`discord.ui.UserSelect`\"\nmsgstr \":class:`discord.ui.UserSelect`\"\n\n#: ../../../discord/ui/select.py:docstring of discord.ui.select.select:17\nmsgid \":class:`discord.ui.RoleSelect`\"\nmsgstr \":class:`discord.ui.RoleSelect`\"\n\n#: ../../../discord/ui/select.py:docstring of discord.ui.select.select:19\nmsgid \":class:`discord.ui.MentionableSelect`\"\nmsgstr \":class:`discord.ui.MentionableSelect`\"\n\n#: ../../../discord/ui/select.py:docstring of discord.ui.select.select:21\nmsgid \":class:`discord.ui.ChannelSelect`\"\nmsgstr \":class:`discord.ui.ChannelSelect`\"\n\n#: ../../../discord/ui/select.py:docstring of discord.ui.select.select:24\nmsgid \"Added the following keyword-arguments: ``cls``, ``channel_types``\"\nmsgstr \"次のキーワード引数を追加しました: ``cls``, ``channel_types``\"\n\n#: ../../../discord/ui/select.py:docstring of discord.ui.select.select:28\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.default_permissions:24\n#: ../../../discord/app_commands/checks.py:docstring of discord.app_commands.checks.has_any_role:23\n#: ../../../discord/app_commands/checks.py:docstring of discord.app_commands.checks.has_permissions:25\nmsgid \"Example\"\nmsgstr \"例\"\n\n#: ../../../discord/ui/select.py:docstring of discord.ui.select.select:37\nmsgid \"The class to use for the select menu. Defaults to :class:`discord.ui.Select`. You can use other select types to display different select menus to the user. See the table above for the different values you can get from each select type. Subclasses work as well, however the callback in the subclass will get overridden.\"\nmsgstr \"選択メニューに使用するクラス。デフォルトは :class:`discord.ui.Select` です。 他の選択メニューを使用して、ユーザーに対し異なる選択メニューを表示できます。 それぞれの選択メニューから得られる値については、上の表を参照してください。 サブクラスも同様に機能しますが、サブクラスのコールバックはオーバーライドされます。\"\n\n#: ../../../discord/ui/select.py:docstring of discord.ui.select.select:44\nmsgid \"The ID of the select menu that gets received during an interaction. It is recommended not to set this parameter to prevent conflicts.\"\nmsgstr \"インタラクション中に受け取る選択メニューID。衝突を防ぐためこのパラメータを設定しないことをおすすめします。\"\n\n#: ../../../discord/ui/select.py:docstring of discord.ui.select.select:59\nmsgid \"A list of options that can be selected in this menu. This can only be used with :class:`Select` instances.\"\nmsgstr \"このメニューで選択できるオプションのリスト。 :class:`Select` インスタンスでのみ使用できます。\"\n\n#: ../../../discord/ui/select.py:docstring of discord.ui.select.select:62\nmsgid \"The types of channels to show in the select menu. Defaults to all channels. This can only be used with :class:`ChannelSelect` instances.\"\nmsgstr \"選択メニューに表示するチャンネルの種類。デフォルトはすべてのチャンネルです。これは :class:`ChannelSelect` インスタンスでのみ使用できます。\"\n\n#: ../../../discord/ui/select.py:docstring of discord.ui.select.select:65\nmsgid \"Whether the select is disabled or not. Defaults to ``False``.\"\nmsgstr \"選択メニューを無効にするかどうか。デフォルトは ``False`` です。\"\n\n#: ../../../discord/ui/text_input.py:docstring of discord.ui.text_input.TextInput:1\nmsgid \"Represents a UI text input.\"\nmsgstr \"UI のテキスト入力を表します。\"\n\n#: ../../../discord/ui/text_input.py:docstring of discord.ui.text_input.TextInput:7\nmsgid \"Returns the value of the text input or an empty string if the value is ``None``.\"\nmsgstr \"テキスト入力の値、または ``None`` の場合空文字列を返します。\"\n\n#: ../../../discord/ui/text_input.py:docstring of discord.ui.text_input.TextInput:13\nmsgid \"The ID of the text input that gets received during an interaction. If not given then one is generated for you.\"\nmsgstr \"インタラクション中に受け取るテキスト入力ID。指定されていない場合は、自動で生成されます。\"\n\n#: ../../../discord/ui/text_input.py:docstring of discord.ui.text_input.TextInput:28\nmsgid \"The relative row this text input belongs to. A Discord component can only have 5 rows. By default, items are arranged automatically into those 5 rows. If you'd like to control the relative positioning of the row then passing an index is advised. For example, row=1 will show up before row=2. Defaults to ``None``, which is automatic ordering. The row number must be between 0 and 4 (i.e. zero indexed).\"\nmsgstr \"このテキスト入力が属する相対的な行。Discordコンポーネントは5行しか持てません。デフォルトでは、項目は自動的にこの5行に配置されます。 行の相対位置を制御したい場合は、インデックスを渡すことをお勧めします。 例えば、row=1 は row=2 の前に表示されます。デフォルトは ``None`` です。これは自動順序です。 行番号は 0 から 4 の間（つまり、0始まり）でなければなりません。\"\n\n#: ../../../discord/ui/text_input.py:docstring of discord.ui.TextInput.value:1\nmsgid \"The value of the text input.\"\nmsgstr \"テキスト入力の値。\"\n\n#: ../../../discord/ui/text_input.py:docstring of discord.ui.TextInput.label:1\nmsgid \"The label of the text input.\"\nmsgstr \"テキスト入力のラベル。\"\n\n#: ../../../discord/ui/text_input.py:docstring of discord.ui.TextInput.style:3\nmsgid \":class:`discord.TextStyle`\"\nmsgstr \":class:`discord.TextStyle`\"\n\n#: ../../interactions/api.rst:526\nmsgid \"Application Commands\"\nmsgstr \"アプリケーションコマンド\"\n\n#: ../../interactions/api.rst:528\nmsgid \"The library has helpers to aid in creation of application commands. These are all in the ``discord.app_commands`` package.\"\nmsgstr \"ライブラリにはアプリケーションコマンドの作成を支援するヘルパーがあります。これらはすべて ``discord.app_commands`` パッケージにあります。\"\n\n#: ../../interactions/api.rst:531\nmsgid \"CommandTree\"\nmsgstr \"CommandTree\"\n\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree:1\nmsgid \"Represents a container that holds application command information.\"\nmsgstr \"アプリケーションコマンド情報を持つコンテナ。\"\n\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree:3\nmsgid \"The client instance to get application command information from.\"\nmsgstr \"アプリケーションコマンドの情報を取得するためのクライアントインスタンス。\"\n\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree:5\nmsgid \"If a guild-specific command is not found when invoked, then try falling back into a global command in the tree. For example, if the tree locally has a ``/ping`` command under the global namespace but the guild has a guild-specific ``/ping``, instead of failing to find the guild-specific ``/ping`` command it will fall back to the global ``/ping`` command. This has the potential to raise more :exc:`~discord.app_commands.CommandSignatureMismatch` errors than usual. Defaults to ``True``.\"\nmsgstr \"ギルド固有のコマンドが呼び出されたときに見つからない場合は、ツリー内のグローバルコマンドを呼び出します。 例えば、ローカル環境でグローバル名前空間の下に ``/ping`` コマンドがあるが、ギルド本体ではギルド固有の ``/ping`` がある場合、ギルド固有の ``/ping`` コマンドを見つけるのに失敗せずに、グローバルの ``/ping`` コマンドをフォールバックとして使用します。 これは :exc:`~discord.app_commands.CommandSignatureMismatch` エラーを通常より多く引き起こす可能性があります。デフォルトは ``True`` です。\"\n\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.command:1\nmsgid \"A decorator that creates an application command from a regular function directly under this tree.\"\nmsgstr \"通常の関数からアプリケーションコマンドをこのツリーの下に直接作成するデコレータ。\"\n\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.command:3\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Group.command:3\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.command:3\nmsgid \"The name of the application command. If not given, it defaults to a lower-case version of the callback name.\"\nmsgstr \"アプリケーションコマンドの名前。指定しない場合は、コールバック名を小文字化したものになります。\"\n\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.command:6\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Group.command:6\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.command:6\nmsgid \"The description of the application command. This shows up in the UI to describe the application command. If not given, it defaults to the first line of the docstring of the callback shortened to 100 characters.\"\nmsgstr \"アプリケーションコマンドの説明。これは、アプリケーションコマンドを説明するためにUIに表示されます。 指定されていない場合は、コールバックの docstring の最初の行を 100 文字以内に短縮したものが使用されます。\"\n\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.command:10\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.context_menu:23\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Command:25\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Group:43\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.command:10\nmsgid \"Whether the command is NSFW and should only work in NSFW channels. Defaults to ``False``.  Due to a Discord limitation, this does not work on subcommands.\"\nmsgstr \"コマンドに年齢制限をかけて、年齢制限つきチャンネルでのみ利用できるようにすべきか。デフォルトでは ``False`` です。Discordの制限により、サブコマンドでは利用できません。\"\n\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.command:10\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.context_menu:23\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Command:25\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.ContextMenu:24\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.ContextMenu:62\nmsgid \"Whether the command is NSFW and should only work in NSFW channels. Defaults to ``False``.\"\nmsgstr \"コマンドに年齢制限をかけて、年齢制限つきチャンネルでのみ利用できるようにすべきか。\"\n\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.command:12\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.context_menu:25\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Command:28\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Command:64\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Command:72\nmsgid \"Due to a Discord limitation, this does not work on subcommands.\"\nmsgstr \"Discord側の制限のため、サブコマンドでは動作しません。\"\n\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.command:14\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.context_menu:27\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.add_command:10\nmsgid \"The guild to add the command to. If not given or ``None`` then it becomes a global command instead.\"\nmsgstr \"コマンドを追加するギルド。指定されていない場合や ``None`` の場合これはグローバルコマンドになります。\"\n\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.command:17\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.context_menu:30\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.add_command:13\nmsgid \"The list of guilds to add the command to. This cannot be mixed with the ``guild`` parameter. If no guilds are given at all then it becomes a global command instead.\"\nmsgstr \"コマンドを追加するギルドのリスト。 ``guild`` パラメータと併用できません。指定されていない場合これは代わりにグローバルコマンドになります。\"\n\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.command:21\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.context_menu:34\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Command:19\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.ContextMenu:18\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Group:25\nmsgid \"If this is set to ``True``, then all translatable strings will implicitly be wrapped into :class:`locale_str` rather than :class:`str`. This could avoid some repetition and be more ergonomic for certain defaults such as default command names, command descriptions, and parameter names. Defaults to ``True``.\"\nmsgstr \"これが ``True`` に設定されている場合、すべての翻訳可能な文字列が :class:`str` でなく:class:`locale_str` にラップされます。これを用いると、デフォルトのコマンド名、コマンド説明、パラメータ名などを繰り返し記述するのを避け、より使いやすくなるかもしれません。デフォルトは ``True`` です。\"\n\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.command:27\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.context_menu:40\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Command:32\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Command:92\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.ContextMenu:27\nmsgid \"A dictionary that can be used to store extraneous data. The library will not touch any values or keys within this dictionary.\"\nmsgstr \"追加のデータを保管できる辞書型。ライブラリは辞書型の中のキーや値を一切操作しません。\"\n\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.context_menu:1\nmsgid \"A decorator that creates an application command context menu from a regular function directly under this tree.\"\nmsgstr \"通常の関数からアプリケーションコマンドコンテキストメニューをこのツリーの下に直接作成するデコレータ。\"\n\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.context_menu:3\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.context_menu:3\nmsgid \"This function must have a signature of :class:`~discord.Interaction` as its first parameter and taking either a :class:`~discord.Member`, :class:`~discord.User`, or :class:`~discord.Message`, or a :obj:`typing.Union` of ``Member`` and ``User`` as its second parameter.\"\nmsgstr \"関数は第一パラメータとして :class:`~discord.Interaction` を取り、第二パラメータとして :class:`~discord.Member` 、 :class:`~discord.User` 、 :class:`~discord.Message` 、または ``Member`` と ``User`` の :obj:`typing.Union` を取らないといけません。\"\n\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.context_menu:19\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.context_menu:19\nmsgid \"The name of the context menu command. If not given, it defaults to a title-case version of the callback name. Note that unlike regular slash commands this can have spaces and upper case characters in the name.\"\nmsgstr \"コンテキストメニューコマンドの名前。指定しない場合はデフォルトでコールバック名をタイトルケース化したものになります。 通常のスラッシュコマンドとは異なり、名前にスペースと大文字を含めることができます。\"\n\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.error:1\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Command.error:1\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.ContextMenu.error:1\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Group.error:1\nmsgid \"A decorator that registers a coroutine as a local error handler.\"\nmsgstr \"コルーチンをローカルエラーハンドラとして登録するデコレータ。\"\n\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.error:3\nmsgid \"This must match the signature of the :meth:`on_error` callback.\"\nmsgstr \":meth:`on_error` コールバックのシグネチャと一致する必要があります。\"\n\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.error:5\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Command.error:7\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.ContextMenu.error:7\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Group.error:6\nmsgid \"The error passed will be derived from :exc:`AppCommandError`.\"\nmsgstr \"渡されたエラーは :exc:`AppCommandError` を継承しています。\"\n\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.error:7\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Command.error:9\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.ContextMenu.error:9\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Group.error:8\nmsgid \"The coroutine to register as the local error handler.\"\nmsgstr \"ローカルエラーハンドラとして登録するコルーチン。\"\n\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.error:10\nmsgid \"The coroutine passed is not actually a coroutine or does     not match the signature.\"\nmsgstr \"渡されたコルーチンが実際にはコルーチンでないか、シグネチャが一致しない場合。\"\n\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.fetch_command:3\nmsgid \"Fetches an application command from the application.\"\nmsgstr \"アプリケーションからアプリケーションコマンドを取得します。\"\n\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.fetch_command:5\nmsgid \"The ID of the command to fetch.\"\nmsgstr \"取得するコマンドのID。\"\n\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.fetch_command:7\nmsgid \"The guild to fetch the command from. If not passed then the global command is fetched instead.\"\nmsgstr \"コマンドを取得するギルド。渡されない場合は、代わりにグローバルコマンドが取得されます。\"\n\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.fetch_command:11\nmsgid \"Fetching the command failed.\"\nmsgstr \"コマンドの取得に失敗した場合。\"\n\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.fetch_command:12\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.fetch_commands:17\nmsgid \"The application ID could not be found.\"\nmsgstr \"アプリケーションコマンドが見つからなかった場合。\"\n\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.fetch_command:13\nmsgid \"The application command was not found.     This could also be because the command is a guild command     and the guild was not specified and vice versa.\"\nmsgstr \"アプリケーションコマンドが見つからなかった場合。 これは、コマンドがギルドコマンドであるのにギルドが指定されていない場合またはその逆を含みます。\"\n\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.fetch_command:15\nmsgid \"The application command.\"\nmsgstr \"アプリケーションコマンド。\"\n\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.fetch_command:16\nmsgid \":class:`~discord.app_commands.AppCommand`\"\nmsgstr \":class:`~discord.app_commands.AppCommand`\"\n\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.fetch_commands:3\nmsgid \"Fetches the application's current commands.\"\nmsgstr \"アプリケーションの現在のコマンドを取得します。\"\n\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.fetch_commands:5\nmsgid \"If no guild is passed then global commands are fetched, otherwise the guild's commands are fetched instead.\"\nmsgstr \"ギルドが渡されない場合、グローバルコマンドが取得されます。そうでなければ、代わりにギルドのコマンドが取得されます。\"\n\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.fetch_commands:10\nmsgid \"This includes context menu commands.\"\nmsgstr \"これにはコンテキストメニューコマンドが含まれます。\"\n\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.fetch_commands:12\nmsgid \"The guild to fetch the commands from. If not passed then global commands are fetched instead.\"\nmsgstr \"コマンドを取得するギルド。渡されない場合は、代わりにグローバルコマンドが取得されます。\"\n\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.fetch_commands:16\nmsgid \"Fetching the commands failed.\"\nmsgstr \"コマンドの取得に失敗した場合。\"\n\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.fetch_commands:19\nmsgid \"The application's commands.\"\nmsgstr \"アプリケーションコマンド。\"\n\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.fetch_commands:20\nmsgid \"List[:class:`~discord.app_commands.AppCommand`]\"\nmsgstr \"List[:class:`~discord.app_commands.AppCommand`]\"\n\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.copy_global_to:1\nmsgid \"Copies all global commands to the specified guild.\"\nmsgstr \"指定したギルドにグローバルコマンドをすべてコピーします。\"\n\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.copy_global_to:3\nmsgid \"This method is mainly available for development purposes, as it allows you to copy your global commands over to a testing guild easily.\"\nmsgstr \"これは、グローバルコマンドをテスト用のギルドにコピーできるので、主に開発のために提供されています。\"\n\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.copy_global_to:6\nmsgid \"Note that this method will *override* pre-existing guild commands that would conflict.\"\nmsgstr \"このメソッドは競合する既存のギルドコマンドを *上書き* することに注意してください。\"\n\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.copy_global_to:8\nmsgid \"The guild to copy the commands to.\"\nmsgstr \"コマンドをコピーするギルド。\"\n\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.copy_global_to:11\nmsgid \"The maximum number of commands was reached for that guild.     This is currently 100 for slash commands and 5 for context menu commands.\"\nmsgstr \"ギルドの最大コマンド数に達した場合。これはスラッシュコマンドでは100個で、コンテキストメニューコマンドでは5個です。\"\n\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.add_command:1\nmsgid \"Adds an application command to the tree.\"\nmsgstr \"ツリーにアプリケーションコマンドを追加します。\"\n\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.add_command:3\nmsgid \"This only adds the command locally -- in order to sync the commands and enable them in the client, :meth:`sync` must be called.\"\nmsgstr \"これはコマンドをローカルに追加するだけです -- コマンドを同期してクライアントで有効にするには、 :meth:`sync` を呼び出す必要があります。\"\n\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.add_command:6\nmsgid \"The root parent of the command is added regardless of the type passed.\"\nmsgstr \"渡された種類に関係なく、コマンドの親も追加されます。\"\n\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.add_command:8\nmsgid \"The application command or group to add.\"\nmsgstr \"追加するアプリケーションコマンドまたはグループ。\"\n\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.add_command:17\nmsgid \"Whether to override a command with the same name. If ``False`` an exception is raised. Default is ``False``.\"\nmsgstr \"同じ名前のコマンドを上書きするかどうか。 ``False`` の場合例外が発生します。デフォルトは ``False`` です。\"\n\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.add_command:21\nmsgid \"The command was already registered and no override was specified.\"\nmsgstr \"コマンドが既に登録されていて、上書きすると指定されていない場合。\"\n\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.add_command:22\nmsgid \"The application command passed is not a valid application command.     Or, ``guild`` and ``guilds`` were both given.\"\nmsgstr \"渡されたアプリケーションコマンドが有効でない場合、または ``guild`` と ``guilds`` の両方が与えられた場合。\"\n\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.add_command:23\nmsgid \"The maximum number of commands was reached globally or for that guild.     This is currently 100 for slash commands and 5 for context menu commands.\"\nmsgstr \"グローバルでの、またはギルドの最大コマンド数に達した場合。これはスラッシュコマンドでは100個で、コンテキストメニューコマンドでは5個です。\"\n\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.remove_command:1\nmsgid \"Removes an application command from the tree.\"\nmsgstr \"ツリーからアプリケーションコマンドを除去します。\"\n\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.remove_command:3\nmsgid \"This only removes the command locally -- in order to sync the commands and remove them in the client, :meth:`sync` must be called.\"\nmsgstr \"これはコマンドをローカルで除去するだけです -- コマンドを同期してクライアントで除去するには、 :meth:`sync` を呼び出す必要があります。\"\n\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.remove_command:6\nmsgid \"The name of the root command to remove.\"\nmsgstr \"除去するルートコマンドの名前。\"\n\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.remove_command:8\nmsgid \"The guild to remove the command from. If not given or ``None`` then it removes a global command instead.\"\nmsgstr \"コマンドを除去するギルド。指定されていない場合や ``None`` の場合グローバルコマンドを除去します。\"\n\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.remove_command:11\nmsgid \"The type of command to remove. Defaults to :attr:`~discord.AppCommandType.chat_input`, i.e. slash commands.\"\nmsgstr \"除去するコマンドの種類。デフォルトは :attr:`~discord.AppCommandType.chat_input` 、すなわちスラッシュコマンドです。\"\n\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.remove_command:15\nmsgid \"The application command that got removed. If nothing was removed then ``None`` is returned instead.\"\nmsgstr \"除去されたアプリケーションコマンド。何も除去されなかった場合は ``None`` が返ります。\"\n\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.remove_command:17\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.get_command:14\nmsgid \"Optional[Union[:class:`Command`, :class:`ContextMenu`, :class:`Group`]]\"\nmsgstr \"Optional[Union[:class:`Command`, :class:`ContextMenu`, :class:`Group`]]\"\n\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.clear_commands:1\nmsgid \"Clears all application commands from the tree.\"\nmsgstr \"ツリーからアプリケーションコマンドをすべて除去します。\"\n\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.clear_commands:3\nmsgid \"This only removes the commands locally -- in order to sync the commands and remove them in the client, :meth:`sync` must be called.\"\nmsgstr \"これはコマンドをローカルで除去するだけです -- コマンドを同期してクライアントで除去するには、 :meth:`sync` を呼び出す必要があります。\"\n\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.clear_commands:6\nmsgid \"The guild to remove the commands from. If ``None`` then it removes all global commands instead.\"\nmsgstr \"コマンドを除去するギルド。指定されていない場合や ``None`` の場合グローバルコマンドを除去します。\"\n\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.clear_commands:9\nmsgid \"The type of command to clear. If not given or ``None`` then it removes all commands regardless of the type.\"\nmsgstr \"除去するコマンドの種類。指定されていない場合や ``None`` の場合種類にかかわらず除去します。\"\n\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.get_command:1\nmsgid \"Gets an application command from the tree.\"\nmsgstr \"ツリーからアプリケーションコマンドを取得します。\"\n\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.get_command:3\nmsgid \"The name of the root command to get.\"\nmsgstr \"取得するルートコマンドの名前。\"\n\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.get_command:5\nmsgid \"The guild to get the command from. If not given or ``None`` then it gets a global command instead.\"\nmsgstr \"コマンドを取得するギルド。指定されていない場合や ``None`` の場合グローバルコマンドを取得します。\"\n\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.get_command:8\nmsgid \"The type of command to get. Defaults to :attr:`~discord.AppCommandType.chat_input`, i.e. slash commands.\"\nmsgstr \"取得するコマンドの種類。デフォルトは :attr:`~discord.AppCommandType.chat_input` 、すなわちスラッシュコマンドです。\"\n\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.get_command:12\nmsgid \"The application command that was found. If nothing was found then ``None`` is returned instead.\"\nmsgstr \"見つかったアプリケーションコマンド。存在しない場合は ``None`` が返ります。\"\n\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.get_commands:1\nmsgid \"Gets all application commands from the tree.\"\nmsgstr \"ツリーからアプリケーションコマンドをすべて取得します。\"\n\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.get_commands:3\nmsgid \"The guild to get the commands from, not including global commands. If not given or ``None`` then only global commands are returned.\"\nmsgstr \"グローバルコマンドを含まないコマンドを取得するギルド。指定されていない場合や ``None`` の場合はグローバルコマンドが返ります。\"\n\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.get_commands:6\nmsgid \"The type of commands to get. When not given or ``None``, then all command types are returned.\"\nmsgstr \"取得するコマンドの種類。指定されていない場合や ``None`` の場合はすべてのコマンドが返されます。\"\n\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.get_commands:10\nmsgid \"The application commands from the tree.\"\nmsgstr \"ツリーのアプリケーションコマンド。\"\n\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.get_commands:11\nmsgid \"List[Union[:class:`ContextMenu`, :class:`Command`, :class:`Group`]]\"\nmsgstr \"List[Union[:class:`ContextMenu`, :class:`Command`, :class:`Group`]]\"\n\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.walk_commands:1\nmsgid \"An iterator that recursively walks through all application commands and child commands from the tree.\"\nmsgstr \"ツリーのすべてのアプリケーションコマンドと子コマンドを再帰的に網羅するイテレータ。\"\n\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.walk_commands:3\nmsgid \"The guild to iterate the commands from, not including global commands. If not given or ``None`` then only global commands are iterated.\"\nmsgstr \"グローバルコマンドを含まないコマンドをイテレートするギルド。指定されていない場合や ``None`` の場合はグローバルコマンドがイテレートされます。\"\n\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.walk_commands:6\nmsgid \"The type of commands to iterate over. Defaults to :attr:`~discord.AppCommandType.chat_input`, i.e. slash commands.\"\nmsgstr \"イテレートするコマンドの種類。デフォルトは :attr:`~discord.AppCommandType.chat_input` 、すなわちスラッシュコマンドです。\"\n\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.walk_commands:0\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Group.walk_commands:0\nmsgid \"Yields\"\nmsgstr \"列挙\"\n\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.walk_commands:10\nmsgid \"Union[:class:`ContextMenu`, :class:`Command`, :class:`Group`] -- The application commands from the tree.\"\nmsgstr \"Union[:class:`ContextMenu`, :class:`Command`, :class:`Group`] -- ツリーのアプリケーションコマンド。\"\n\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.on_error:3\nmsgid \"A callback that is called when any command raises an :exc:`AppCommandError`.\"\nmsgstr \"どれかのコマンドが :exc:`AppCommandError` を送出したときに呼び出されるコールバック。\"\n\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.on_error:5\nmsgid \"The default implementation logs the exception using the library logger if the command does not have any error handlers attached to it.\"\nmsgstr \"デフォルトの実装ではコマンドにエラーハンドラーが付属したいない場合のみ例外をライブラリロガーを用いて記録します。\"\n\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.on_error:8\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Group.on_error:5\nmsgid \"To get the command that failed, :attr:`discord.Interaction.command` should be used.\"\nmsgstr \"失敗したコマンドを取得するには、 :attr:`discord.Interaction.command` を使用してください。\"\n\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.on_error:11\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Group.on_error:9\nmsgid \"The interaction that is being handled.\"\nmsgstr \"処理中のインタラクション。\"\n\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.CommandTree.translator:1\nmsgid \"The translator, if any, responsible for handling translation of commands.\"\nmsgstr \"存在する場合、コマンドの翻訳を担当するトランスレータ。\"\n\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.CommandTree.translator:3\nmsgid \"To change the translator, use :meth:`set_translator`.\"\nmsgstr \"トランスレータを変更するには、 :meth:`set_translator` を使用してください。\"\n\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.CommandTree.translator:5\nmsgid \"Optional[:class:`Translator`]\"\nmsgstr \"Optional[:class:`Translator`]\"\n\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.set_translator:3\nmsgid \"Sets the translator to use for translating commands.\"\nmsgstr \"コマンドの翻訳に使用するトランスレータを設定します。\"\n\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.set_translator:5\nmsgid \"If a translator was previously set, it will be unloaded using its :meth:`Translator.unload` method.\"\nmsgstr \"以前にトランスレータが設定されていた場合は、 :meth:`Translator.unload` メソッドを使用してアンロードされます。\"\n\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.set_translator:8\nmsgid \"When a translator is set, it will be loaded using its :meth:`Translator.load` method.\"\nmsgstr \"トランスレータが設定されると、 :meth:`Translator.load` メソッドを使用して読み込まれます。\"\n\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.set_translator:10\nmsgid \"The translator to use. If ``None`` then the translator is just removed and unloaded.\"\nmsgstr \"使用するトランスレータ。 ``None`` の場合、トランスレータは単に除去され、アンロードされます。\"\n\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.set_translator:13\nmsgid \"The translator was not ``None`` or a :class:`Translator` instance.\"\nmsgstr \"トランスレータが ``None`` または :class:`Translator` インスタンスでない場合。\"\n\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.sync:3\nmsgid \"Syncs the application commands to Discord.\"\nmsgstr \"アプリケーションコマンドをDiscordに同期します。\"\n\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.sync:5\nmsgid \"This also runs the translator to get the translated strings necessary for feeding back into Discord.\"\nmsgstr \"また、これは、トランスレータを実行し、Discordに提供する翻訳された文字列を取得します。\"\n\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.sync:8\nmsgid \"This must be called for the application commands to show up.\"\nmsgstr \"アプリケーションコマンドを表示するためには、これを呼び出さないといけません。\"\n\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.sync:10\nmsgid \"The guild to sync the commands to. If ``None`` then it syncs all global commands instead.\"\nmsgstr \"コマンドを同期するギルド。指定されていない場合や ``None`` の場合グローバルコマンドを同期します。\"\n\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.sync:14\nmsgid \"Syncing the commands failed.\"\nmsgstr \"コマンドの同期に失敗した場合。\"\n\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.sync:15\nmsgid \"Syncing the commands failed due to a user related error, typically because     the command has invalid data. This is equivalent to an HTTP status code of     400.\"\nmsgstr \"コマンドに不正なデータがあるなど、ユーザーによる誤りのためコマンドの同期が失敗した場合。これはHTTPステータスコード 400に相当します。\"\n\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.sync:16\nmsgid \"The client does not have the ``applications.commands`` scope in the guild.\"\nmsgstr \"クライアントがギルドで ``applications.commands`` スコープを有さない場合。\"\n\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.sync:18\nmsgid \"An error occurred while translating the commands.\"\nmsgstr \"コマンドの翻訳中にエラーが発生した場合。\"\n\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.sync:20\nmsgid \"The application's commands that got synced.\"\nmsgstr \"同期されたアプリケーションコマンド。\"\n\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.sync:21\nmsgid \"List[:class:`AppCommand`]\"\nmsgstr \"List[:class:`AppCommand`]\"\n\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.interaction_check:3\nmsgid \"A global check to determine if an :class:`~discord.Interaction` should be processed by the tree.\"\nmsgstr \":class:`~discord.Interaction` がツリーによって処理されるかどうかを判断するグローバルチェック。\"\n\n#: ../../../discord/app_commands/tree.py:docstring of discord.app_commands.tree.CommandTree.interaction_check:6\nmsgid \"The default implementation returns True (all interactions are processed), but can be overridden if custom behaviour is desired.\"\nmsgstr \"デフォルトの実装では、True が返されます （すべてのインタラクションが処理されます）が、カスタム動作が必要な場合は上書きできます。\"\n\n#: ../../interactions/api.rst:549\nmsgid \"Commands\"\nmsgstr \"コマンド\"\n\n#: ../../interactions/api.rst:552\nmsgid \"Command\"\nmsgstr \"Command\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Command:1\nmsgid \"A class that implements an application command.\"\nmsgstr \"アプリケーションコマンドを実装するクラス。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Command:3\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.ContextMenu:3\nmsgid \"These are usually not created manually, instead they are created using one of the following decorators:\"\nmsgstr \"これは通常手動で作成されず、代わりに以下のデコレータを使用して作成されます。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Command:6\nmsgid \":func:`~discord.app_commands.command`\"\nmsgstr \":func:`~discord.app_commands.command`\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Command:7\nmsgid \":meth:`Group.command <discord.app_commands.Group.command>`\"\nmsgstr \":meth:`Group.command <discord.app_commands.Group.command>`\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Command:8\nmsgid \":meth:`CommandTree.command <discord.app_commands.CommandTree.command>`\"\nmsgstr \":meth:`CommandTree.command <discord.app_commands.CommandTree.command>`\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Command:12\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Command:38\nmsgid \"The name of the application command.\"\nmsgstr \"アプリケーションコマンドの名前。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Command:14\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Command:44\nmsgid \"The description of the application command. This shows up in the UI to describe the application command.\"\nmsgstr \"アプリケーションコマンドの説明。これは、アプリケーションコマンドを説明するためのUIに表示されます。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Command:17\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.Command.callback:1\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.ContextMenu:13\nmsgid \"The coroutine that is executed when the command is called.\"\nmsgstr \"コマンドが呼び出されたときに実行されるコルーチン。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Command:30\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Command:86\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Group:48\nmsgid \"The parent application command. ``None`` if there isn't one.\"\nmsgstr \"親アプリケーションコマンド。存在しない場合は ``None`` 。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Command:51\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.ContextMenu:69\nmsgid \"A list of predicates that take a :class:`~discord.Interaction` parameter to indicate whether the command callback should be executed. If an exception is necessary to be thrown to signal failure, then one inherited from :exc:`AppCommandError` should be used. If all the checks fail without propagating an exception, :exc:`CheckFailure` is raised.\"\nmsgstr \"コマンドコールバックが実行されるべきかを示す :class:`~discord.Interaction` パラメータを取るチェック関数の一覧。もし失敗を示すために例外を送出しないといけない場合は、 :exc:`AppCommandError` を継承するものを使用すべきです。もしすべてのチェックが例外を送出せずに失敗した場合は :exc:`CheckFailure` が発生します。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Command:59\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.ContextMenu:46\nmsgid \"The default permissions that can execute this command on Discord. Note that server administrators can override this value in the client. Setting an empty permissions field will disallow anyone except server administrators from using the command in a guild.\"\nmsgstr \"Discordでこのコマンドを実行できるデフォルトの権限。サーバー管理者はクライアントでこの値を上書きすることができます。 空の権限フィールドを設定すると、サーバー管理者以外はギルド内でそのコマンドを使用できなくなります。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Command:70\nmsgid \"Whether the command should only be usable in guild contexts.\"\nmsgstr \"コマンドをギルド内でのみ使用できるようにするかどうか。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Command:88\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.Command.root_parent:3\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Group:98\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.Group.root_parent:3\nmsgid \"Optional[:class:`Group`]\"\nmsgstr \"Optional[:class:`Group`]\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Command.autocomplete:1\nmsgid \"A decorator that registers a coroutine as an autocomplete prompt for a parameter.\"\nmsgstr \"パラメータのオートコンプリートに使用されるコルーチンを登録するデコレータ。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Command.autocomplete:3\nmsgid \"The coroutine callback must have 2 parameters, the :class:`~discord.Interaction`, and the current value by the user (the string currently being typed by the user).\"\nmsgstr \"コルーチンのコールバックは、 :class:`~discord.Interaction` とユーザーが現在入力している値 (入力された文字列) の 2 つのパラメータを受け取らないといけません。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Command.autocomplete:6\nmsgid \"To get the values from other parameters that may be filled in, accessing :attr:`.Interaction.namespace` will give a :class:`Namespace` object with those values.\"\nmsgstr \"入力される可能性のある他のパラメータの値を取得するには、 :attr:`.Interaction.namespace` にアクセスして、これらの値を持つ :class:`Namespace` オブジェクトを取得できます。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Command.autocomplete:10\nmsgid \"Parent :func:`checks <check>` are ignored within an autocomplete. However, checks can be added to the autocomplete callback and the ones added will be called. If the checks fail for any reason then an empty list is sent as the interaction response.\"\nmsgstr \"親の :func:`チェック <check>` はオートコンプリート内で無視されます。 ただし、チェックはautocomplete コールバックに追加することができ、追加したものが呼び出されます。 何らかの理由でチェックに失敗した場合、インタラクションの応答として空のリストが送信されます。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Command.autocomplete:14\nmsgid \"The coroutine decorator **must** return a list of :class:`~discord.app_commands.Choice` objects. Only up to 25 objects are supported.\"\nmsgstr \"コルーチンのデコレータは :class:`~discord.app_commands.Choice` オブジェクトのリストを **返さないといけません** 。オブジェクトは25個まで返すことができます。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Command.autocomplete:18\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.autocomplete:13\nmsgid \"The choices returned from this coroutine are suggestions. The user may ignore them and input their own value.\"\nmsgstr \"このコルーチンから返される選択肢はあくまで提案であって、ユーザーはそれらを無視して自分の値を入力することができます。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Command.autocomplete:20\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.describe:4\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.describe:15\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.rename:7\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.choices:3\nmsgid \"Example:\"\nmsgstr \"例:\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Command.autocomplete:40\nmsgid \"The parameter name to register as autocomplete.\"\nmsgstr \"オートコンプリートに登録するパラメータ名。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Command.autocomplete:43\nmsgid \"The coroutine passed is not actually a coroutine or     the parameter is not found or of an invalid type.\"\nmsgstr \"渡されたコルーチンが実際にはコルーチンでない場合や、パラメータが見つからず、または無効な型であった場合。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Command.error:3\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.ContextMenu.error:3\nmsgid \"The local error handler is called whenever an exception is raised in the body of the command or during handling of the command. The error handler must take 2 parameters, the interaction and the error.\"\nmsgstr \"ローカルのエラーハンドラは、コマンドの本体やコマンドの処理中に例外が発生するたびに呼び出されます。 エラーハンドラは、インタラクションとエラーの2つのパラメータを取らないといけません。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Command.error:12\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.ContextMenu.error:12\nmsgid \"The coroutine passed is not actually a coroutine.\"\nmsgstr \"渡された関数がコルーチンではない場合。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.Command.callback:3\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.ContextMenu.callback:3\nmsgid \":ref:`coroutine <coroutine>`\"\nmsgstr \":ref:`coroutine <coroutine>`\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.Command.parameters:1\nmsgid \"Returns a list of parameters for this command.\"\nmsgstr \"このコマンドのパラメータのリストを返します。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.Command.parameters:3\nmsgid \"This does not include the ``self`` or ``interaction`` parameters.\"\nmsgstr \"これには ``self`` と ``interaction`` パラメータは含まれていません。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.Command.parameters:5\nmsgid \"The parameters of this command.\"\nmsgstr \"このコマンドのパラメータ。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.Command.parameters:6\nmsgid \"List[:class:`Parameter`]\"\nmsgstr \"List[:class:`Parameter`]\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Command.get_parameter:1\nmsgid \"Retrieves a parameter by its name.\"\nmsgstr \"名前からパラメータを取得します。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Command.get_parameter:3\nmsgid \"The name must be the Python identifier rather than the renamed one for display on Discord.\"\nmsgstr \"名前は Discordで表示される改名後のものではなく、Pythonの識別子でないといけません。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Command.get_parameter:6\nmsgid \"The parameter name in the callback function.\"\nmsgstr \"コールバック関数のパラメータ名。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Command.get_parameter:9\nmsgid \"The parameter or ``None`` if not found.\"\nmsgstr \"パラメータ、または該当するものが見つからない場合 ``None`` が返ります。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Command.get_parameter:10\nmsgid \"Optional[:class:`Parameter`]\"\nmsgstr \"Optional[:class:`Parameter`]\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.Command.root_parent:1\nmsgid \"The root parent of this command.\"\nmsgstr \"コマンドの大元の親。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Command.add_check:1\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.ContextMenu.add_check:1\nmsgid \"Adds a check to the command.\"\nmsgstr \"コマンドにチェックを追加します。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Command.add_check:3\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.ContextMenu.add_check:3\nmsgid \"This is the non-decorator interface to :func:`check`.\"\nmsgstr \"これは :func:`check` に対する非デコレーターインターフェイスです。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Command.add_check:5\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.ContextMenu.add_check:5\nmsgid \"The function that will be used as a check.\"\nmsgstr \"チェックとして使用される関数。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Command.remove_check:1\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.ContextMenu.remove_check:1\nmsgid \"Removes a check from the command.\"\nmsgstr \"コマンドからチェックを除去します。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Command.remove_check:3\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.ContextMenu.remove_check:3\nmsgid \"This function is idempotent and will not raise an exception if the function is not in the command's checks.\"\nmsgstr \"この関数は冪等性を保持しており、関数がコマンドのチェックに含まれていない場合でも例外が発生しません。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Command.remove_check:6\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.ContextMenu.remove_check:6\nmsgid \"The function to remove from the checks.\"\nmsgstr \"チェックから除去する関数。\"\n\n#: ../../interactions/api.rst:567\nmsgid \"Parameter\"\nmsgstr \"Parameter\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Parameter:1\nmsgid \"A class that contains the parameter information of a :class:`Command` callback.\"\nmsgstr \":class:`Command` コールバックのパラメータ情報を含むクラス。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Parameter:7\nmsgid \"The name of the parameter. This is the Python identifier for the parameter.\"\nmsgstr \"パラメータの名前。これはパラメータのPython識別子です。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Parameter:13\nmsgid \"The displayed name of the parameter on Discord.\"\nmsgstr \"Discordに表示されるパラメータの名前。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Parameter:19\nmsgid \"The description of the parameter.\"\nmsgstr \"パラメータの説明。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Parameter:25\nmsgid \"Whether the parameter has an autocomplete handler.\"\nmsgstr \"パラメータにオートコンプリートハンドラがあるかどうか。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Parameter:31\nmsgid \"The display name's locale string, if available.\"\nmsgstr \"利用可能な場合、表示名のローカライズ可能な文字列。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Parameter:33\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Parameter:39\nmsgid \"Optional[:class:`locale_str`]\"\nmsgstr \"Optional[:class:`locale_str`]\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Parameter:37\nmsgid \"The description's locale string, if available.\"\nmsgstr \"利用可能な場合、説明のローカライズ可能な文字列。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Parameter:43\nmsgid \"Whether the parameter is required\"\nmsgstr \"パラメータが必須かどうか。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Parameter:49\nmsgid \"A list of choices this parameter takes, if any.\"\nmsgstr \"存在する場合、このパラメータが取る選択肢のリスト。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Parameter:51\n#: ../../../discord/app_commands/transformers.py:docstring of discord.app_commands.transformers.Transformer.autocomplete:17\nmsgid \"List[:class:`~discord.app_commands.Choice`]\"\nmsgstr \"List[:class:`~discord.app_commands.Choice`]\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Parameter:55\nmsgid \"The underlying type of this parameter.\"\nmsgstr \"このパラメータの種類。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Parameter:79\nmsgid \"The default value of the parameter, if given. If not given then this is :data:`~discord.utils.MISSING`.\"\nmsgstr \"指定されている場合、パラメータの既定値。指定されていない場合は、 :data:`~discord.utils.MISSING` です。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Parameter:86\nmsgid \"The command this parameter is attached to.\"\nmsgstr \"このパラメータが属するコマンド。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Parameter:88\nmsgid \":class:`Command`\"\nmsgstr \":class:`Command`\"\n\n#: ../../interactions/api.rst:575\nmsgid \"ContextMenu\"\nmsgstr \"ContextMenu\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.ContextMenu:1\nmsgid \"A class that implements a context menu application command.\"\nmsgstr \"コンテキストメニューアプリケーションコマンドを実装するクラス。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.ContextMenu:6\nmsgid \":func:`~discord.app_commands.context_menu`\"\nmsgstr \":func:`~discord.app_commands.context_menu`\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.ContextMenu:7\nmsgid \":meth:`CommandTree.context_menu <discord.app_commands.CommandTree.context_menu>`\"\nmsgstr \":meth:`CommandTree.context_menu <discord.app_commands.CommandTree.context_menu>`\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.ContextMenu:11\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.ContextMenu:33\nmsgid \"The name of the context menu.\"\nmsgstr \"コンテキストメニューの名前。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.ContextMenu:15\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.ContextMenu:39\nmsgid \"The type of context menu application command. By default, this is inferred by the parameter of the callback.\"\nmsgstr \"コンテキストメニューアプリケーションコマンドの種類。デフォルトでは、コールバックのパラメータによって推定されます。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.ContextMenu:42\nmsgid \":class:`.AppCommandType`\"\nmsgstr \":class:`.AppCommandType`\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.ContextMenu:55\nmsgid \"Whether the command should only be usable in guild contexts. Defaults to ``False``.\"\nmsgstr \"コマンドをギルド内でのみ使用できるようにするかどうか。デフォルトは ``False`` です。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.ContextMenu.callback:1\nmsgid \"The coroutine that is executed when the context menu is called.\"\nmsgstr \"コンテキストメニューが呼び出されたときに実行されるコルーチン。\"\n\n#: ../../interactions/api.rst:587\nmsgid \"Group\"\nmsgstr \"Group\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Group:1\nmsgid \"A class that implements an application command group.\"\nmsgstr \"アプリケーションコマンドグループを実装するクラス。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Group:3\nmsgid \"These are usually inherited rather than created manually.\"\nmsgstr \"これらは通常、手動で作成するのではなく継承されます。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Group:5\nmsgid \"Decorators such as :func:`guild_only`, :func:`guilds`, and :func:`default_permissions` will apply to the group if used on top of a subclass. For example:\"\nmsgstr \":func:`guild_only` 、 :func:`guilds` 、 :func:`default_permissions` などのデコレータは、サブクラスの上に置かれている場合、グループに適用されます。例えば：\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Group:18\nmsgid \"The name of the group. If not given, it defaults to a lower-case kebab-case version of the class name.\"\nmsgstr \"グループ名。指定しない場合は、デフォルトでは小文字のケバブケース化したクラス名です。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Group:21\nmsgid \"The description of the group. This shows up in the UI to describe the group. If not given, it defaults to the docstring of the class shortened to 100 characters.\"\nmsgstr \"グループの説明。これは、グループを説明するためにUIに表示されます。 指定されていない場合は、クラスの docstring を 100 文字以内に短縮したものが使用されます。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Group:31\nmsgid \"The default permissions that can execute this group on Discord. Note that server administrators can override this value in the client. Setting an empty permissions field will disallow anyone except server administrators from using the command in a guild.  Due to a Discord limitation, this does not work on subcommands.\"\nmsgstr \"Discordでこのグループを実行できるデフォルトの権限。サーバー管理者はクライアントでこの値を上書きすることができます。 空の権限フィールドを設定すると、サーバー管理者以外はギルド内でそのコマンドを使用できなくなります。Discordの制限により、サブコマンドでは利用できません。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Group:31\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Group:69\nmsgid \"The default permissions that can execute this group on Discord. Note that server administrators can override this value in the client. Setting an empty permissions field will disallow anyone except server administrators from using the command in a guild.\"\nmsgstr \"Discordでこのグループを実行できるデフォルトの権限。サーバー管理者はクライアントでこの値を上書きすることができます。 空の権限フィールドを設定すると、サーバー管理者以外はギルド内でそのコマンドを使用できなくなります。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Group:38\nmsgid \"Whether the group should only be usable in guild contexts. Defaults to ``False``.  Due to a Discord limitation, this does not work on subcommands.\"\nmsgstr \"グループをギルド内でのみ使用できるようにするかどうか。デフォルトは ``False`` です。Discordの制限により、サブコマンドでは利用できません。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Group:38\nmsgid \"Whether the group should only be usable in guild contexts. Defaults to ``False``.\"\nmsgstr \"グループをギルド内でのみ使用できるようにするかどうか。デフォルトは ``False`` です。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Group:56\nmsgid \"The name of the group.\"\nmsgstr \"グループの名前。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Group:62\nmsgid \"The description of the group. This shows up in the UI to describe the group.\"\nmsgstr \"グループの説明。グループを説明するため、UIに表示されます。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Group:80\nmsgid \"Whether the group should only be usable in guild contexts.\"\nmsgstr \"グループをギルド内でのみ使用できるようにするかどうか。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Group:96\nmsgid \"The parent group. ``None`` if there isn't one.\"\nmsgstr \"親グループ。存在しない場合は ``None`` 。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Group.command:1\nmsgid \"A decorator that creates an application command from a regular function under this group.\"\nmsgstr \"通常の関数からアプリケーションコマンドをこのグループの下に作成するデコレータ。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Group.error:3\nmsgid \"The local error handler is called whenever an exception is raised in a child command. The error handler must take 2 parameters, the interaction and the error.\"\nmsgstr \"ローカルのエラーハンドラは、子コマンドで例外が発生するたびに呼び出されます。 エラーハンドラは、インタラクションとエラーの2つのパラメータを取らないといけません。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Group.error:11\nmsgid \"The coroutine passed is not actually a coroutine, or is an invalid coroutine.\"\nmsgstr \"渡されたコルーチンが実際にはコルーチンでないか、無効なコルーチンである場合。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.Group.root_parent:1\nmsgid \"The parent of this group.\"\nmsgstr \"このグループの親。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.Group.qualified_name:1\nmsgid \"Returns the fully qualified group name.\"\nmsgstr \"完全修飾されたグループ名を返します。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.Group.qualified_name:3\nmsgid \"The qualified name includes the parent name as well. For example, in a group like ``/foo bar`` the qualified name is ``foo bar``.\"\nmsgstr \"修飾名には親の名前も含まれています。例えば、 ``/foo bar`` のようなグループでは修飾名は ``foo bar`` です。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.Group.commands:1\nmsgid \"The commands that this group contains.\"\nmsgstr \"このグループに含まれるコマンド。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.Group.commands:3\nmsgid \"List[Union[:class:`Command`, :class:`Group`]]\"\nmsgstr \"List[Union[:class:`Command`, :class:`Group`]]\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Group.walk_commands:1\nmsgid \"An iterator that recursively walks through all commands that this group contains.\"\nmsgstr \"グループが含むすべてのコマンドを、再帰的に網羅するイテレータ。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Group.walk_commands:3\nmsgid \"Union[:class:`Command`, :class:`Group`] -- The commands in this group.\"\nmsgstr \"Union[:class:`Command`, :class:`Group`] -- グループ内のコマンド。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Group.on_error:3\nmsgid \"A callback that is called when a child's command raises an :exc:`AppCommandError`.\"\nmsgstr \"子コマンドが :exc:`AppCommandError` を送出したときに呼び出されるコールバック。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Group.on_error:7\n#: ../../../discord/app_commands/translator.py:docstring of discord.app_commands.translator.Translator.load:5\n#: ../../../discord/app_commands/translator.py:docstring of discord.app_commands.translator.Translator.unload:5\nmsgid \"The default implementation does nothing.\"\nmsgstr \"デフォルトの実装では何もしません。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Group.interaction_check:3\nmsgid \"A callback that is called when an interaction happens within the group that checks whether a command inside the group should be executed.\"\nmsgstr \"グループ内でインタラクションが発生したときに、グループ内のコマンドを実行すべきかを確認するコールバック。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Group.interaction_check:13\nmsgid \"If an exception occurs within the body then the check is considered a failure and error handlers such as :meth:`on_error` is called. See :exc:`AppCommandError` for more information.\"\nmsgstr \"この中で例外が発生した場合チェックが失敗したとみなされ :meth:`on_error` のようなエラーハンドラが呼び出されます。詳細は :exc:`AppCommandError` を参照してください。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Group.add_command:1\nmsgid \"Adds a command or group to this group's internal list of commands.\"\nmsgstr \"このグループの内部コマンドリストにコマンドまたはグループを追加します。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Group.add_command:3\nmsgid \"The command or group to add.\"\nmsgstr \"追加するコマンドまたはグループ。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Group.add_command:5\nmsgid \"Whether to override a pre-existing command or group with the same name. If ``False`` then an exception is raised.\"\nmsgstr \"既存の同名のコマンドまたはグループを上書きするかどうか。 ``False`` の場合は例外が発生します。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Group.add_command:9\nmsgid \"The command or group is already registered. Note that the :attr:`CommandAlreadyRegistered.guild_id`     attribute will always be ``None`` in this case.\"\nmsgstr \"コマンドやグループがすでに登録されている場合。なお、この場合 :attr:`CommandAlreadyRegistered.guild_id` は常に ``None`` になります。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Group.add_command:10\nmsgid \"There are too many commands already registered or the group is too     deeply nested.\"\nmsgstr \"登録されたコマンド数が多すぎるか、グループが深くネストされすぎている場合。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Group.add_command:11\nmsgid \"The wrong command type was passed.\"\nmsgstr \"間違った種類のコマンドが渡された場合。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Group.remove_command:1\nmsgid \"Removes a command or group from the internal list of commands.\"\nmsgstr \"内部のコマンドリストから該当するコマンドまたはグループを検索し、それを除去します。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Group.remove_command:3\nmsgid \"The name of the command or group to remove.\"\nmsgstr \"除去するコマンドまたはグループの名前。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Group.remove_command:6\nmsgid \"The command that was removed. If nothing was removed then ``None`` is returned instead.\"\nmsgstr \"除去されたコマンド。何も除去されなかった場合は ``None`` が返ります。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Group.remove_command:8\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Group.get_command:8\nmsgid \"Optional[Union[:class:`~discord.app_commands.Command`, :class:`~discord.app_commands.Group`]]\"\nmsgstr \"Optional[Union[:class:`~discord.app_commands.Command`, :class:`~discord.app_commands.Group`]]\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Group.get_command:1\nmsgid \"Retrieves a command or group from its name.\"\nmsgstr \"名前からコマンドまたはグループを取得します。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Group.get_command:3\nmsgid \"The name of the command or group to retrieve.\"\nmsgstr \"取得するコマンドまたはグループの名前。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.Group.get_command:6\nmsgid \"The command or group that was retrieved. If nothing was found then ``None`` is returned instead.\"\nmsgstr \"取得されたコマンドまたはグループ。何も見つからなかった場合は ``None`` が返ります。\"\n\n#: ../../interactions/api.rst:602\nmsgid \"Decorators\"\nmsgstr \"デコレータ\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.command:1\nmsgid \"Creates an application command from a regular function.\"\nmsgstr \"通常の関数からアプリケーションコマンドを作成します。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.context_menu:1\nmsgid \"Creates an application command context menu from a regular function.\"\nmsgstr \"通常の関数からアプリケーションコマンドコンテキストメニューを作成します。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.describe:1\nmsgid \"Describes the given parameters by their name using the key of the keyword argument as the name.\"\nmsgstr \"キーワード引数のキーを名前として使用して与えられたパラメータを説明します。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.describe:13\nmsgid \"Alternatively, you can describe parameters using Google, Sphinx, or Numpy style docstrings.\"\nmsgstr \"または、Google、Sphinx、Numpy スタイルのドキュメント文字列を使用してパラメータを記述することもできます。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.describe:30\nmsgid \"The description of the parameters.\"\nmsgstr \"パラメータの説明。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.describe:33\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.rename:20\nmsgid \"The parameter name is not found.\"\nmsgstr \"パラメータ名が見つからない場合。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.rename:1\nmsgid \"Renames the given parameters by their name using the key of the keyword argument as the name.\"\nmsgstr \"キーワード引数のキーを名前として使用して与えられたパラメータを改名します。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.rename:4\nmsgid \"This renames the parameter within the Discord UI. When referring to the parameter in other decorators, the parameter name used in the function is used instead of the renamed one.\"\nmsgstr \"これはDiscord UI内のパラメータの名前を変更します。 他のデコレータでパラメータを参照する場合、改名先のものではなく関数内で使用されるパラメータ名を使用しないといけません。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.rename:16\nmsgid \"The name of the parameters.\"\nmsgstr \"パラメータの名前。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.rename:19\nmsgid \"The parameter name is already used by another parameter.\"\nmsgstr \"パラメータ名がすでに他のパラメータによって使用されている場合。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.choices:1\nmsgid \"Instructs the given parameters by their name to use the given choices for their choices.\"\nmsgstr \"与えられたパラメータに、与えられた選択肢を使用するように名前で指示します。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.choices:19\nmsgid \"This is not the only way to provide choices to a command. There are two more ergonomic ways of doing this. The first one is to use a :obj:`typing.Literal` annotation:\"\nmsgstr \"これはコマンドに選択肢を提供する唯一の方法ではありません。より使いやすい方法が2つあります。 一つ目は、 :obj:`typing.Literal` アノテーションです。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.choices:29\nmsgid \"The second way is to use an :class:`enum.Enum`:\"\nmsgstr \"二つ目の方法は、 :class:`enum.Enum` を使用することです。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.choices:44\nmsgid \"The choices of the parameters.\"\nmsgstr \"パラメータの選択肢。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.choices:46\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.autocomplete:36\nmsgid \"The parameter name is not found or the parameter type was incorrect.\"\nmsgstr \"パラメータ名が見つからないか、パラメータの型が正しくない場合。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.autocomplete:1\nmsgid \"Associates the given parameters with the given autocomplete callback.\"\nmsgstr \"与えられたパラメータと与えられたオートコンプリートコールバックを関連付けます。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.autocomplete:3\nmsgid \"Autocomplete is only supported on types that have :class:`str`, :class:`int`, or :class:`float` values.\"\nmsgstr \"オートコンプリートは、 :class:`str` 、 :class:`int` 、または :class:`float` の値を持つ型でのみサポートされています。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.autocomplete:6\nmsgid \":func:`Checks <check>` are supported, however they must be attached to the autocomplete callback in order to work. Checks attached to the command are ignored when invoking the autocomplete callback.\"\nmsgstr \":func:`チェック <check>` はサポートされていますが、動作するためにはオートコンプリートコールバックに付属させる必要があります。 オートコンプリートコールバックを呼び出すと、コマンドに付属したチェックは無視されます。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.autocomplete:10\nmsgid \"For more information, see the :meth:`Command.autocomplete` documentation.\"\nmsgstr \"詳細については、 :meth:`Command.autocomplete` ドキュメントを参照してください。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.autocomplete:34\nmsgid \"The parameters to mark as autocomplete.\"\nmsgstr \"オートコンプリートに登録するパラメータ。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.guilds:1\nmsgid \"Associates the given guilds with the command.\"\nmsgstr \"与えられたギルドをコマンドに関連付けます。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.guilds:3\nmsgid \"When the command instance is added to a :class:`CommandTree`, the guilds that are specified by this decorator become the default guilds that it's added to rather than being a global command.\"\nmsgstr \":class:`CommandTree` にコマンドインスタンスが追加されたとき、 コマンドはデフォルトでグローバルコマンドではなく、このデコレータで指定されたギルドのコマンドとなります。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.guilds:9\nmsgid \"Due to an implementation quirk and Python limitation, if this is used in conjunction with the :meth:`CommandTree.command` or :meth:`CommandTree.context_menu` decorator then this must go below that decorator.\"\nmsgstr \"実装上の都合とPythonの制限のため、これを :meth:`CommandTree.command` や :meth:`CommandTree.context_menu` デコレータと同時に使用する場合はこれはそのデコレータの下に置かないといけません。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.guilds:24\nmsgid \"The guilds to associate this command with. The command tree will use this as the default when added rather than adding it as a global command.\"\nmsgstr \"このコマンドを関連付けるギルド。 コマンドツリーは、グローバルコマンドではなく、このギルドにデフォルトで追加します。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.guild_only:1\nmsgid \"A decorator that indicates this command can only be used in a guild context.\"\nmsgstr \"コマンドがギルド内でのみ利用できることを示すデコレータ。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.guild_only:3\nmsgid \"This is **not** implemented as a :func:`check`, and is instead verified by Discord server side. Therefore, there is no error handler called when a command is used within a private message.\"\nmsgstr \"これは :func:`check` として実装されて *おらず* 、代わりにDiscordサーバー側で検証されます。 そのため、プライベートメッセージ内でコマンドが使用されたときに呼び出されるエラーハンドラはありません。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.guild_only:6\nmsgid \"This decorator can be called with or without parentheses.\"\nmsgstr \"このデコレータは括弧の有無にかかわらず呼び出すことができます。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.guild_only:8\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.default_permissions:12\nmsgid \"Due to a Discord limitation, this decorator does nothing in subcommands and is ignored.\"\nmsgstr \"Discordの制限のため、このデコレータはサブコマンドでは動作せず無視されます。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.default_permissions:1\nmsgid \"A decorator that sets the default permissions needed to execute this command.\"\nmsgstr \"このコマンドを実行するために必要なデフォルトの権限を設定するデコレータ。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.default_permissions:3\nmsgid \"When this decorator is used, by default users must have these permissions to execute the command. However, an administrator can change the permissions needed to execute this command using the official client. Therefore, this only serves as a hint.\"\nmsgstr \"このデコレータを使用すると、デフォルトではユーザーはコマンドを実行するためにこれらの権限を持っている必要があります。 ただし、管理者は公式クライアントを使用してこのコマンドを実行するために必要な権限を変更することができます。したがって、これはヒントとしてのみ機能します。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.default_permissions:7\nmsgid \"Setting an empty permissions field, including via calling this with no arguments, will disallow anyone except server administrators from using the command in a guild.\"\nmsgstr \"引数なしで呼び出すなどして空の権限フィールドを設定した場合は、このコマンドはギルド内ではサーバー管理者以外使用できなくなります。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.default_permissions:10\nmsgid \"This is sent to Discord server side, and is not a :func:`check`. Therefore, error handlers are not called.\"\nmsgstr \"これはDiscordサーバー側に送信され、 :func:`check` ではないため、エラーハンドラは呼び出されません。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.default_permissions:16\nmsgid \"This serves as a *hint* and members are *not* required to have the permissions given to actually execute this command. If you want to ensure that members have the permissions needed, consider using :func:`~discord.app_commands.checks.has_permissions` instead.\"\nmsgstr \"これは *ヒント* として機能し、メンバーはこれらのコマンドを実際に実行するのに権限を持つ必要は *ありません* 。メンバーが必要な権限を有することを確かめたい場合は、代わりに :func:`~discord.app_commands.checks.has_permissions` を使用してみてください。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.default_permissions:20\nmsgid \"Keyword arguments denoting the permissions to set as the default.\"\nmsgstr \"デフォルトとして設定する権限を示すキーワード引数。\"\n\n#: ../../interactions/api.rst:632\nmsgid \"Checks\"\nmsgstr \"チェック\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.check:1\nmsgid \"A decorator that adds a check to an application command.\"\nmsgstr \"アプリケーションコマンドにチェックを追加するデコレータ。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.check:3\nmsgid \"These checks should be predicates that take in a single parameter taking a :class:`~discord.Interaction`. If the check returns a ``False``\\\\-like value then during invocation a :exc:`CheckFailure` exception is raised and sent to the appropriate error handlers.\"\nmsgstr \"これらのチェックは唯一の引数 :class:`~discord.Interaction` を取る関数であるべきです。もしチェックが ``False`` のような値を返せば、呼び出し中に :exc:`.CheckFailure` が発生され適切なエラーハンドラに送られます。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.check:8\nmsgid \"These checks can be either a coroutine or not.\"\nmsgstr \"これらのチェックはコルーチンであってもなくてもよいです。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.check:12\nmsgid \"Creating a basic check to see if the command invoker is you.\"\nmsgstr \"コマンドを呼び出したのがあなたであるかどうかを確認するための基本的なチェックの作成。\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.check:24\nmsgid \"Transforming common checks into its own decorator:\"\nmsgstr \"一般的なチェックを独自のデコレータに変換します:\"\n\n#: ../../../discord/app_commands/commands.py:docstring of discord.app_commands.commands.check:38\nmsgid \"The predicate to check if the command should be invoked.\"\nmsgstr \"コマンドが呼び出されるかどうかをチェックする関数。\"\n\n#: ../../../discord/app_commands/checks.py:docstring of discord.app_commands.checks.has_role:1\nmsgid \"A :func:`~discord.app_commands.check` that is added that checks if the member invoking the command has the role specified via the name or ID specified.\"\nmsgstr \"コマンドを呼び出したメンバーが、指定された名前またはIDのロールを持っているかどうかのチェックを追加する :func:`~discord.app_commands.check` 。\"\n\n#: ../../../discord/app_commands/checks.py:docstring of discord.app_commands.checks.has_role:4\nmsgid \"If a string is specified, you must give the exact name of the role, including caps and spelling.\"\nmsgstr \"文字列が指定された場合は、大文字やつづりを含めロールの名前を正確に指定する必要があります。\"\n\n#: ../../../discord/app_commands/checks.py:docstring of discord.app_commands.checks.has_role:7\nmsgid \"If an integer is specified, you must give the exact snowflake ID of the role.\"\nmsgstr \"整数が指定されている場合は、ロールの正確なsnowflake IDを指定する必要があります。\"\n\n#: ../../../discord/app_commands/checks.py:docstring of discord.app_commands.checks.has_role:9\nmsgid \"This check raises one of two special exceptions, :exc:`~discord.app_commands.MissingRole` if the user is missing a role, or :exc:`~discord.app_commands.NoPrivateMessage` if it is used in a private message. Both inherit from :exc:`~discord.app_commands.CheckFailure`.\"\nmsgstr \"このチェックは２つの特別な例外のうち１つ、もしユーザがロールを持っていないなら :exc:`~discord.app_commands.MissingRole` を、プライベートメッセージで使用されたなら :exc:`~discord.app_commands.NoPrivateMessage` を発生します。どちらも :exc:`~discord.app_commands.CheckFailure` を継承します。\"\n\n#: ../../../discord/app_commands/checks.py:docstring of discord.app_commands.checks.has_role:17\n#: ../../../discord/app_commands/checks.py:docstring of discord.app_commands.checks.has_any_role:15\n#: ../../../discord/app_commands/checks.py:docstring of discord.app_commands.checks.has_permissions:17\nmsgid \"This is different from the permission system that Discord provides for application commands. This is done entirely locally in the program rather than being handled by Discord.\"\nmsgstr \"これはDiscordがアプリケーションコマンドに提供する権限システムとは異なります。これはDiscord側で処理されるものではなく、完全にローカルのプログラム内で行われます。\"\n\n#: ../../../discord/app_commands/checks.py:docstring of discord.app_commands.checks.has_role:21\nmsgid \"The name or ID of the role to check.\"\nmsgstr \"チェックするロールの名前またはID。\"\n\n#: ../../../discord/app_commands/checks.py:docstring of discord.app_commands.checks.has_any_role:1\nmsgid \"A :func:`~discord.app_commands.check` that is added that checks if the member invoking the command has **any** of the roles specified. This means that if they have one out of the three roles specified, then this check will return ``True``.\"\nmsgstr \"コマンドを呼び出したメンバーが、指定された名前またはIDのロールのうちの **どれか** を持っているかをチェックを追加する :func:`~discord.app_commands.check` 。 これは、指定された3つのうちのどのロールが指定されていても、このチェックが ``True`` を返すことを意味します。\"\n\n#: ../../../discord/app_commands/checks.py:docstring of discord.app_commands.checks.has_any_role:5\nmsgid \"Similar to :func:`has_role`\\\\, the names or IDs passed in must be exact.\"\nmsgstr \":func:`has_role` と同様に、渡された名前やIDは正確でなければなりません。\"\n\n#: ../../../discord/app_commands/checks.py:docstring of discord.app_commands.checks.has_any_role:7\nmsgid \"This check raises one of two special exceptions, :exc:`~discord.app_commands.MissingAnyRole` if the user is missing all roles, or :exc:`~discord.app_commands.NoPrivateMessage` if it is used in a private message. Both inherit from :exc:`~discord.app_commands.CheckFailure`.\"\nmsgstr \"このチェックは２つの特別な例外のうち１つ、もしユーザがロールをすべて持っていないなら :exc:`~discord.app_commands.MissingAnyRole` を、プライベートメッセージで使用されたなら :exc:`~discord.app_commands.NoPrivateMessage` を発生します。どちらも :exc:`~discord.app_commands.CheckFailure` を継承します。\"\n\n#: ../../../discord/app_commands/checks.py:docstring of discord.app_commands.checks.has_any_role:19\nmsgid \"An argument list of names or IDs to check that the member has roles wise.\"\nmsgstr \"メンバーが割り当てられたロールを持っているかどうかをチェックする名前またはIDの引数リスト。\"\n\n#: ../../../discord/app_commands/checks.py:docstring of discord.app_commands.checks.has_permissions:1\nmsgid \"A :func:`~discord.app_commands.check` that is added that checks if the member has all of the permissions necessary.\"\nmsgstr \"メンバーが必要なすべての権限を持っているかどうかのチェックを追加する :func:`~discord.app_commands.check` 。\"\n\n#: ../../../discord/app_commands/checks.py:docstring of discord.app_commands.checks.has_permissions:4\nmsgid \"Note that this check operates on the permissions given by :attr:`discord.Interaction.permissions`.\"\nmsgstr \"このチェックは :attr:`discord.Interaction.permissions` によって与えられた権限で動作することに注意してください。\"\n\n#: ../../../discord/app_commands/checks.py:docstring of discord.app_commands.checks.has_permissions:7\nmsgid \"The permissions passed in must be exactly like the properties shown under :class:`discord.Permissions`.\"\nmsgstr \"渡された権限は、 :class:`discord.Permissions` のプロパティとまったく同じでなければなりません。\"\n\n#: ../../../discord/app_commands/checks.py:docstring of discord.app_commands.checks.has_permissions:10\nmsgid \"This check raises a special exception, :exc:`~discord.app_commands.MissingPermissions` that is inherited from :exc:`~discord.app_commands.CheckFailure`.\"\nmsgstr \"このチェックは特別な例外であり、 :exc:`~discord.app_commands.CheckFailure` から継承されている :exc:`~discord.app_commands.MissingPermissions` を発生します。\"\n\n#: ../../../discord/app_commands/checks.py:docstring of discord.app_commands.checks.has_permissions:21\nmsgid \"Keyword arguments denoting the permissions to check for.\"\nmsgstr \"確認する権限を示すキーワード引数。\"\n\n#: ../../../discord/app_commands/checks.py:docstring of discord.app_commands.checks.bot_has_permissions:1\nmsgid \"Similar to :func:`has_permissions` except checks if the bot itself has the permissions listed. This relies on :attr:`discord.Interaction.app_permissions`.\"\nmsgstr \":func:`has_permissions` と似ていますが、ボット自体に列挙された権限が存在するかを確認します。これは :attr:`discord.Interaction.app_permissions` を使用します。\"\n\n#: ../../../discord/app_commands/checks.py:docstring of discord.app_commands.checks.bot_has_permissions:4\nmsgid \"This check raises a special exception, :exc:`~discord.app_commands.BotMissingPermissions` that is inherited from :exc:`~discord.app_commands.CheckFailure`.\"\nmsgstr \"このチェックは特別な例外であり、 :exc:`~discord.app_commands.CheckFailure` から継承されている :exc:`~discord.app_commands.BotMissingPermissions` を発生します。\"\n\n#: ../../../discord/app_commands/checks.py:docstring of discord.app_commands.checks.cooldown:1\nmsgid \"A decorator that adds a cooldown to a command.\"\nmsgstr \"コマンドにクールダウンを追加するデコレータ。\"\n\n#: ../../../discord/app_commands/checks.py:docstring of discord.app_commands.checks.cooldown:3\n#: ../../../discord/app_commands/checks.py:docstring of discord.app_commands.checks.dynamic_cooldown:3\nmsgid \"A cooldown allows a command to only be used a specific amount of times in a specific time frame. These cooldowns are based off of the ``key`` function provided. If a ``key`` is not provided then it defaults to a user-level cooldown. The ``key`` function must take a single parameter, the :class:`discord.Interaction` and return a value that is used as a key to the internal cooldown mapping.\"\nmsgstr \"クールダウンを使用すると、特定の時間枠の中でコマンドが使用できる回数を制限できます。このクールダウンは渡された ``key`` 関数に基づきます。もし ``key`` 関数が渡されない場合はユーザーレベルのクールダウンとなります。 ``key`` 関数は単一のパラメータとして :class:`discord.Interaction` を取り、内部のクールダウンマッピングのキーとして使用される値を返さないといけません。\"\n\n#: ../../../discord/app_commands/checks.py:docstring of discord.app_commands.checks.cooldown:10\nmsgid \"The ``key`` function can optionally be a coroutine.\"\nmsgstr \"``key`` 関数は必要に応じてコルーチンにすることができます。\"\n\n#: ../../../discord/app_commands/checks.py:docstring of discord.app_commands.checks.cooldown:12\n#: ../../../discord/app_commands/checks.py:docstring of discord.app_commands.checks.dynamic_cooldown:17\nmsgid \"If a cooldown is triggered, then :exc:`~discord.app_commands.CommandOnCooldown` is raised to the error handlers.\"\nmsgstr \"クールダウンが発生した場合は、 :exc:`~discord.app_commands.CommandOnCooldown` がエラーハンドラに送出されます。\"\n\n#: ../../../discord/app_commands/checks.py:docstring of discord.app_commands.checks.cooldown:17\nmsgid \"Setting a one per 5 seconds per member cooldown on a command:\"\nmsgstr \"コマンドに1メンバーにつき5秒あたり1回のクールダウンを設定します:\"\n\n#: ../../../discord/app_commands/checks.py:docstring of discord.app_commands.checks.cooldown:31\nmsgid \"The number of times a command can be used before triggering a cooldown.\"\nmsgstr \"クールダウンを発生させる前にコマンドを使用できる回数。\"\n\n#: ../../../discord/app_commands/checks.py:docstring of discord.app_commands.checks.cooldown:33\nmsgid \"The amount of seconds to wait for a cooldown when it's been triggered.\"\nmsgstr \"トリガーされたときにクールダウンを待つ秒数。\"\n\n#: ../../../discord/app_commands/checks.py:docstring of discord.app_commands.checks.cooldown:35\n#: ../../../discord/app_commands/checks.py:docstring of discord.app_commands.checks.dynamic_cooldown:44\nmsgid \"A function that returns a key to the mapping denoting the type of cooldown. Can optionally be a coroutine. If not given then defaults to a user-level cooldown. If ``None`` is passed then it is interpreted as a \\\"global\\\" cooldown.\"\nmsgstr \"クールダウンの種類を示すキーを返す関数。これはコルーチンにすることもできます。もし渡されない場合既定でユーザーレベルのクールダウンとなります。 ``None`` が渡された場合「グローバル」クールダウンと解釈されます。\"\n\n#: ../../../discord/app_commands/checks.py:docstring of discord.app_commands.checks.dynamic_cooldown:1\nmsgid \"A decorator that adds a dynamic cooldown to a command.\"\nmsgstr \"コマンドに動的なクールダウンを追加するデコレータ。\"\n\n#: ../../../discord/app_commands/checks.py:docstring of discord.app_commands.checks.dynamic_cooldown:10\nmsgid \"If a ``factory`` function is given, it must be a function that accepts a single parameter of type :class:`discord.Interaction` and must return a :class:`~discord.app_commands.Cooldown` or ``None``. If ``None`` is returned then that cooldown is effectively bypassed.\"\nmsgstr \"``factory`` 関数が与えられた場合、それは単一のパラメータとして :class:`discord.Interaction` を取り、 :class:`~discord.app_commands.Cooldown` または ``None`` を返す関数でないといけません。もし ``None`` を返せば、クールダウンは事実上回避されます。\"\n\n#: ../../../discord/app_commands/checks.py:docstring of discord.app_commands.checks.dynamic_cooldown:15\nmsgid \"Both ``key`` and ``factory`` can optionally be coroutines.\"\nmsgstr \"必要に応じて、 ``key`` と ``factory`` の両方をコルーチンにできます。\"\n\n#: ../../../discord/app_commands/checks.py:docstring of discord.app_commands.checks.dynamic_cooldown:22\nmsgid \"Setting a cooldown for everyone but the owner.\"\nmsgstr \"所有者以外の全員にクールダウンを設定します。\"\n\n#: ../../../discord/app_commands/checks.py:docstring of discord.app_commands.checks.dynamic_cooldown:41\nmsgid \"A function that takes an interaction and returns a cooldown that will apply to that interaction or ``None`` if the interaction should not have a cooldown.\"\nmsgstr \"インタラクションを受け取り、このインタラクションに適用されるクールダウンまたはクールダウンを回避する場合 ``None`` を返す関数。\"\n\n#: ../../interactions/api.rst:656\nmsgid \"Cooldown\"\nmsgstr \"Cooldown\"\n\n#: ../../../discord/app_commands/checks.py:docstring of discord.app_commands.checks.Cooldown:1\nmsgid \"Represents a cooldown for a command.\"\nmsgstr \"コマンドのクールダウンを表します。\"\n\n#: ../../../discord/app_commands/checks.py:docstring of discord.app_commands.checks.Cooldown:7\nmsgid \"The total number of tokens available per :attr:`per` seconds.\"\nmsgstr \":attr:`per` 秒あたりのトークンの総数。\"\n\n#: ../../../discord/app_commands/checks.py:docstring of discord.app_commands.checks.Cooldown:9\n#: ../../../discord/app_commands/checks.py:docstring of discord.app_commands.checks.Cooldown:15\n#: ../../../discord/app_commands/checks.py:docstring of discord.app_commands.checks.Cooldown.get_retry_after:8\n#: ../../../discord/app_commands/namespace.py:docstring of discord.app_commands.namespace.Namespace:47\n#: ../../../discord/app_commands/errors.py:docstring of discord.app_commands.errors.CommandOnCooldown:17\nmsgid \":class:`float`\"\nmsgstr \":class:`float`\"\n\n#: ../../../discord/app_commands/checks.py:docstring of discord.app_commands.checks.Cooldown:13\nmsgid \"The length of the cooldown period in seconds.\"\nmsgstr \"秒単位のクールダウン期間の長さ。\"\n\n#: ../../../discord/app_commands/checks.py:docstring of discord.app_commands.checks.Cooldown.get_tokens:1\nmsgid \"Returns the number of available tokens before rate limiting is applied.\"\nmsgstr \"レート制限が適用される前に利用可能なトークンの数を返します。\"\n\n#: ../../../discord/app_commands/checks.py:docstring of discord.app_commands.checks.Cooldown.get_tokens:3\nmsgid \"The time in seconds since Unix epoch to calculate tokens at. If not supplied then :func:`time.time()` is used.\"\nmsgstr \"トークンを計算するためのUnixエポックからの秒数。指定されていない場合は :func:`time.time()` が使用されます。\"\n\n#: ../../../discord/app_commands/checks.py:docstring of discord.app_commands.checks.Cooldown.get_tokens:7\nmsgid \"The number of tokens available before the cooldown is to be applied.\"\nmsgstr \"クールダウン前に利用可能なトークンの数。\"\n\n#: ../../../discord/app_commands/checks.py:docstring of discord.app_commands.checks.Cooldown.get_retry_after:1\nmsgid \"Returns the time in seconds until the cooldown will be reset.\"\nmsgstr \"クールダウンがリセットされるまでの時間を秒単位で返します。\"\n\n#: ../../../discord/app_commands/checks.py:docstring of discord.app_commands.checks.Cooldown.get_retry_after:3\nmsgid \"The current time in seconds since Unix epoch. If not supplied, then :func:`time.time()` is used.\"\nmsgstr \"現在のUnixエポックからの秒数。指定されていない場合は :func:`time.time()` が使用されます。\"\n\n#: ../../../discord/app_commands/checks.py:docstring of discord.app_commands.checks.Cooldown.get_retry_after:7\nmsgid \"The number of seconds to wait before this cooldown will be reset.\"\nmsgstr \"クールダウンがリセットされるまで待たないといけない秒数。\"\n\n#: ../../../discord/app_commands/checks.py:docstring of discord.app_commands.checks.Cooldown.update_rate_limit:1\nmsgid \"Updates the cooldown rate limit.\"\nmsgstr \"クールダウンのレート制限を更新します。\"\n\n#: ../../../discord/app_commands/checks.py:docstring of discord.app_commands.checks.Cooldown.update_rate_limit:3\nmsgid \"The time in seconds since Unix epoch to update the rate limit at. If not supplied, then :func:`time.time()` is used.\"\nmsgstr \"レート制限を更新するためのUnixエポックからの秒数。指定されていない場合は :func:`time.time()` が使用されます。\"\n\n#: ../../../discord/app_commands/checks.py:docstring of discord.app_commands.checks.Cooldown.update_rate_limit:6\nmsgid \"The amount of tokens to deduct from the rate limit.\"\nmsgstr \"レート制限から差し引くトークンの量。\"\n\n#: ../../../discord/app_commands/checks.py:docstring of discord.app_commands.checks.Cooldown.update_rate_limit:9\nmsgid \"The retry-after time in seconds if rate limited.\"\nmsgstr \"レート制限中の場合の秒単位の再試行時間。\"\n\n#: ../../../discord/app_commands/checks.py:docstring of discord.app_commands.checks.Cooldown.reset:1\nmsgid \"Reset the cooldown to its initial state.\"\nmsgstr \"クールダウンを初期状態にリセットします。\"\n\n#: ../../../discord/app_commands/checks.py:docstring of discord.app_commands.checks.Cooldown.copy:1\nmsgid \"Creates a copy of this cooldown.\"\nmsgstr \"クールダウンのコピーを作成します。\"\n\n#: ../../../discord/app_commands/checks.py:docstring of discord.app_commands.checks.Cooldown.copy:3\nmsgid \"A new instance of this cooldown.\"\nmsgstr \"このクールダウンの新しいインスタンス。\"\n\n#: ../../../discord/app_commands/checks.py:docstring of discord.app_commands.checks.Cooldown.copy:4\nmsgid \":class:`Cooldown`\"\nmsgstr \":class:`Cooldown`\"\n\n#: ../../interactions/api.rst:665\nmsgid \"Namespace\"\nmsgstr \"Namespace\"\n\n#: ../../../discord/app_commands/namespace.py:docstring of discord.app_commands.namespace.Namespace:1\nmsgid \"An object that holds the parameters being passed to a command in a mostly raw state.\"\nmsgstr \"ほとんど生の状態でコマンドに渡されるパラメータを保持するオブジェクト。\"\n\n#: ../../../discord/app_commands/namespace.py:docstring of discord.app_commands.namespace.Namespace:3\nmsgid \"This class is deliberately simple and just holds the option name and resolved value as a simple key-pair mapping. These attributes can be accessed using dot notation. For example, an option with the name of ``example`` can be accessed using ``ns.example``. If an attribute is not found, then ``None`` is returned rather than an attribute error.\"\nmsgstr \"このクラスは意図的にシンプルで、オプション名と解決された値を単純なキーペアマッピングとして保持します。 これらの属性はドット表記を使用してアクセスできます。 例えば、 ``example`` という名前のオプションは ``ns.example`` を使ってアクセスできます。 属性が見つからない場合は、属性エラーではなく ``None`` が返されます。\"\n\n#: ../../../discord/app_commands/namespace.py:docstring of discord.app_commands.namespace.Namespace:10\nmsgid \"The key names come from the raw Discord data, which means that if a parameter was renamed then the renamed key is used instead of the function parameter name.\"\nmsgstr \"キー名はDiscordの生データから得られたものなので、パラメータの名前が変更された場合、関数のパラメータ名ではなく改名後のキーが使用されます。\"\n\n#: ../../../discord/app_commands/namespace.py:docstring of discord.app_commands.namespace.Namespace:19\nmsgid \"Checks if two namespaces are equal by checking if all attributes are equal.\"\nmsgstr \"二つの名前空間が等しいかを、すべての属性が等しいかによって確認します。\"\n\n#: ../../../discord/app_commands/namespace.py:docstring of discord.app_commands.namespace.Namespace:22\nmsgid \"Checks if two namespaces are not equal.\"\nmsgstr \"二つの名前空間が等しくないかを比較します。\"\n\n#: ../../../discord/app_commands/namespace.py:docstring of discord.app_commands.namespace.Namespace:25\nmsgid \"Returns an attribute if it is found, otherwise raises a :exc:`KeyError`.\"\nmsgstr \"見つかった場合は属性を返し、そうでなければ、 :exc:`KeyError` を送出します。\"\n\n#: ../../../discord/app_commands/namespace.py:docstring of discord.app_commands.namespace.Namespace:29\nmsgid \"Checks if the attribute is in the namespace.\"\nmsgstr \"属性が名前空間にあるかどうかを確認します。\"\n\n#: ../../../discord/app_commands/namespace.py:docstring of discord.app_commands.namespace.Namespace:32\nmsgid \"Returns an iterator of ``(name, value)`` pairs. This allows it to be, for example, constructed as a dict or a list of pairs.\"\nmsgstr \"``(name, value)`` ペアのイテレータを返します。これにより、例えば、辞書型やペアのリストに変換できます。\"\n\n#: ../../../discord/app_commands/namespace.py:docstring of discord.app_commands.namespace.Namespace:35\nmsgid \"This namespace object converts resolved objects into their appropriate form depending on their type. Consult the table below for conversion information.\"\nmsgstr \"この名前空間オブジェクトは、種類により解決されたオブジェクトを適切な形式に変換します。変換情報については、以下の表を参照してください。\"\n\n#: ../../../discord/app_commands/namespace.py:docstring of discord.app_commands.namespace.Namespace:39\nmsgid \"Option Type\"\nmsgstr \"オプションの種類\"\n\n#: ../../../discord/app_commands/namespace.py:docstring of discord.app_commands.namespace.Namespace:39\nmsgid \"Resolved Type\"\nmsgstr \"解決される型\"\n\n#: ../../../discord/app_commands/namespace.py:docstring of discord.app_commands.namespace.Namespace:41\nmsgid \":attr:`.AppCommandOptionType.string`\"\nmsgstr \":attr:`.AppCommandOptionType.string`\"\n\n#: ../../../discord/app_commands/namespace.py:docstring of discord.app_commands.namespace.Namespace:43\nmsgid \":attr:`.AppCommandOptionType.integer`\"\nmsgstr \":attr:`.AppCommandOptionType.integer`\"\n\n#: ../../../discord/app_commands/namespace.py:docstring of discord.app_commands.namespace.Namespace:45\nmsgid \":attr:`.AppCommandOptionType.boolean`\"\nmsgstr \":attr:`.AppCommandOptionType.boolean`\"\n\n#: ../../../discord/app_commands/namespace.py:docstring of discord.app_commands.namespace.Namespace:47\nmsgid \":attr:`.AppCommandOptionType.number`\"\nmsgstr \":attr:`.AppCommandOptionType.number`\"\n\n#: ../../../discord/app_commands/namespace.py:docstring of discord.app_commands.namespace.Namespace:49\nmsgid \":attr:`.AppCommandOptionType.user`\"\nmsgstr \":attr:`.AppCommandOptionType.user`\"\n\n#: ../../../discord/app_commands/namespace.py:docstring of discord.app_commands.namespace.Namespace:49\nmsgid \":class:`~discord.User` or :class:`~discord.Member`\"\nmsgstr \":class:`~discord.User` または :class:`~discord.Member`\"\n\n#: ../../../discord/app_commands/namespace.py:docstring of discord.app_commands.namespace.Namespace:51\nmsgid \":attr:`.AppCommandOptionType.channel`\"\nmsgstr \":attr:`.AppCommandOptionType.channel`\"\n\n#: ../../../discord/app_commands/namespace.py:docstring of discord.app_commands.namespace.Namespace:51\nmsgid \":class:`.AppCommandChannel` or :class:`.AppCommandThread`\"\nmsgstr \":class:`.AppCommandChannel` または :class:`.AppCommandThread`\"\n\n#: ../../../discord/app_commands/namespace.py:docstring of discord.app_commands.namespace.Namespace:53\nmsgid \":attr:`.AppCommandOptionType.role`\"\nmsgstr \":attr:`.AppCommandOptionType.role`\"\n\n#: ../../../discord/app_commands/namespace.py:docstring of discord.app_commands.namespace.Namespace:53\nmsgid \":class:`~discord.Role`\"\nmsgstr \":class:`~discord.Role`\"\n\n#: ../../../discord/app_commands/namespace.py:docstring of discord.app_commands.namespace.Namespace:55\nmsgid \":attr:`.AppCommandOptionType.mentionable`\"\nmsgstr \":attr:`.AppCommandOptionType.mentionable`\"\n\n#: ../../../discord/app_commands/namespace.py:docstring of discord.app_commands.namespace.Namespace:55\nmsgid \":class:`~discord.User` or :class:`~discord.Member`, or :class:`~discord.Role`\"\nmsgstr \":class:`~discord.User` または :class:`~discord.Member` または :class:`~discord.Role`\"\n\n#: ../../../discord/app_commands/namespace.py:docstring of discord.app_commands.namespace.Namespace:57\nmsgid \":attr:`.AppCommandOptionType.attachment`\"\nmsgstr \":attr:`.AppCommandOptionType.attachment`\"\n\n#: ../../../discord/app_commands/namespace.py:docstring of discord.app_commands.namespace.Namespace:57\nmsgid \":class:`~discord.Attachment`\"\nmsgstr \":class:`~discord.Attachment`\"\n\n#: ../../../discord/app_commands/namespace.py:docstring of discord.app_commands.namespace.Namespace:62\nmsgid \"In autocomplete interactions, the namespace might not be validated or filled in. Discord does not send the resolved data as well, so this means that certain fields end up just as IDs rather than the resolved data. In these cases, a :class:`discord.Object` is returned instead.\"\nmsgstr \"オートコンプリートのインタラクションでは、名前空間が検証されていないか、入力されていない可能性があります。 Discordは解決されたデータも送信しません。このため、特定のフィールドには解決されたデータではなくIDが存在することがあります。 この場合、代わりに :class:`discord.Object` が返されます。\"\n\n#: ../../../discord/app_commands/namespace.py:docstring of discord.app_commands.namespace.Namespace:66\nmsgid \"This is a Discord limitation.\"\nmsgstr \"これはDiscordの制限です。\"\n\n#: ../../interactions/api.rst:673\nmsgid \"Transformers\"\nmsgstr \"トランスフォーマー\"\n\n#: ../../interactions/api.rst:676\nmsgid \"Transformer\"\nmsgstr \"Transformer\"\n\n#: ../../../discord/app_commands/transformers.py:docstring of discord.app_commands.transformers.Transformer:1\nmsgid \"The base class that allows a type annotation in an application command parameter to map into a :class:`~discord.AppCommandOptionType` and transform the raw value into one from this type.\"\nmsgstr \"アプリケーションコマンドのパラメータの型アノテーションを :class:`~discord.AppCommandOptionType` に対応させ、生の値をその型の値に変換する基底クラス。\"\n\n#: ../../../discord/app_commands/transformers.py:docstring of discord.app_commands.transformers.Transformer:5\nmsgid \"This class is customisable through the overriding of methods and properties in the class and by using it as the second type parameter of the :class:`~discord.app_commands.Transform` class. For example, to convert a string into a custom pair type:\"\nmsgstr \"このクラスは、クラス内のメソッドとプロパティを上書きして :class:`~discord.app_commands.Transform` クラスの第二型パラメータとして渡すことによってカスタマイズできます。たとえば、文字列をカスタムのペア型に変換するには:\"\n\n#: ../../../discord/app_commands/transformers.py:docstring of discord.app_commands.transformers.Transformer:27\nmsgid \"If a class is passed instead of an instance to the second type parameter, then it is constructed with no arguments passed to the ``__init__`` method.\"\nmsgstr \"二番目の型パラメータにインスタンスの代わりにクラスが渡された場合、それが ``__init__`` メソッドに何も渡さずに構築されます。\"\n\n#: ../../../discord/app_commands/transformers.py:docstring of discord.app_commands.Transformer.type:1\nmsgid \"The option type associated with this transformer.\"\nmsgstr \"このトランスフォーマーに関連付けられたオプションタイプ。\"\n\n#: ../../../discord/app_commands/transformers.py:docstring of discord.app_commands.Transformer.type:3\n#: ../../../discord/app_commands/transformers.py:docstring of discord.app_commands.Transformer.channel_types:5\n#: ../../../discord/app_commands/transformers.py:docstring of discord.app_commands.Transformer.min_value:6\n#: ../../../discord/app_commands/transformers.py:docstring of discord.app_commands.Transformer.max_value:6\n#: ../../../discord/app_commands/transformers.py:docstring of discord.app_commands.Transformer.choices:6\nmsgid \"This must be a :obj:`property`.\"\nmsgstr \"これは :obj:`property` でなければなりません。\"\n\n#: ../../../discord/app_commands/transformers.py:docstring of discord.app_commands.Transformer.type:5\nmsgid \"Defaults to :attr:`~discord.AppCommandOptionType.string`.\"\nmsgstr \"デフォルトは :attr:`~discord.AppCommandOptionType.string` です。\"\n\n#: ../../../discord/app_commands/transformers.py:docstring of discord.app_commands.Transformer.channel_types:1\nmsgid \"A list of channel types that are allowed to this parameter.\"\nmsgstr \"このパラメータにて利用できるチャンネルの種類のリスト。\"\n\n#: ../../../discord/app_commands/transformers.py:docstring of discord.app_commands.Transformer.channel_types:3\nmsgid \"Only valid if the :meth:`type` returns :attr:`~discord.AppCommandOptionType.channel`.\"\nmsgstr \":meth:`type` が :attr:`~discord.AppCommandOptionType.channel` を返す場合にのみ有効です。\"\n\n#: ../../../discord/app_commands/transformers.py:docstring of discord.app_commands.Transformer.channel_types:7\nmsgid \"Defaults to an empty list.\"\nmsgstr \"既定値は空のリストです。\"\n\n#: ../../../discord/app_commands/transformers.py:docstring of discord.app_commands.Transformer.min_value:3\n#: ../../../discord/app_commands/transformers.py:docstring of discord.app_commands.Transformer.max_value:3\n#: ../../../discord/app_commands/transformers.py:docstring of discord.app_commands.Transformer.choices:3\nmsgid \"Only valid if the :meth:`type` returns :attr:`~discord.AppCommandOptionType.number` :attr:`~discord.AppCommandOptionType.integer`, or :attr:`~discord.AppCommandOptionType.string`.\"\nmsgstr \":meth:`type` が :attr:`~discord.AppCommandOptionType.number` 、 :attr:`~discord.AppCommandOptionType.integer` または :attr:`~discord.AppCommandOptionType.string` を返す場合にのみ有効です。\"\n\n#: ../../../discord/app_commands/transformers.py:docstring of discord.app_commands.Transformer.min_value:8\n#: ../../../discord/app_commands/transformers.py:docstring of discord.app_commands.Transformer.max_value:8\n#: ../../../discord/app_commands/transformers.py:docstring of discord.app_commands.Transformer.choices:8\nmsgid \"Defaults to ``None``.\"\nmsgstr \"既定値は ``None`` です。\"\n\n#: ../../../discord/app_commands/transformers.py:docstring of discord.app_commands.Transformer.choices:1\nmsgid \"A list of up to 25 choices that are allowed to this parameter.\"\nmsgstr \"このパラメータにて利用できる最大25個の選択肢のリスト。\"\n\n#: ../../../discord/app_commands/transformers.py:docstring of discord.app_commands.Transformer.choices:10\nmsgid \"Optional[List[:class:`~discord.app_commands.Choice`]]\"\nmsgstr \"Optional[List[:class:`~discord.app_commands.Choice`]]\"\n\n#: ../../../discord/app_commands/transformers.py:docstring of discord.app_commands.transformers.Transformer.transform:1\nmsgid \"|maybecoro|\"\nmsgstr \"|maybecoro|\"\n\n#: ../../../discord/app_commands/transformers.py:docstring of discord.app_commands.transformers.Transformer.transform:3\nmsgid \"Transforms the converted option value into another value.\"\nmsgstr \"解決されたオプション値を別の値に変換します。\"\n\n#: ../../../discord/app_commands/transformers.py:docstring of discord.app_commands.transformers.Transformer.transform:5\nmsgid \"The value passed into this transform function is the same as the one in the :class:`conversion table <discord.app_commands.Namespace>`.\"\nmsgstr \"この変換関数に渡される値は、 :class:`変換対応表 <discord.app_commands.Namespace>` の値と同じです。\"\n\n#: ../../../discord/app_commands/transformers.py:docstring of discord.app_commands.transformers.Transformer.transform:8\nmsgid \"The interaction being handled.\"\nmsgstr \"処理中のインタラクション。\"\n\n#: ../../../discord/app_commands/transformers.py:docstring of discord.app_commands.transformers.Transformer.transform:10\nmsgid \"The value of the given argument after being resolved. See the :class:`conversion table <discord.app_commands.Namespace>` for how certain option types correspond to certain values.\"\nmsgstr \"解決された引数値。どのオプションの種類がどの値に対応するかについては :class:`変換対応表 <discord.app_commands.Namespace>` を参照してください。\"\n\n#: ../../../discord/app_commands/transformers.py:docstring of discord.app_commands.transformers.Transformer.autocomplete:3\nmsgid \"An autocomplete prompt handler to be automatically used by options using this transformer.\"\nmsgstr \"このトランスフォーマーを使用するオプションによって自動的に使用されるオートコンプリートプロンプトのハンドラ。\"\n\n#: ../../../discord/app_commands/transformers.py:docstring of discord.app_commands.transformers.Transformer.autocomplete:7\nmsgid \"Autocomplete is only supported for options with a :meth:`~discord.app_commands.Transformer.type` of :attr:`~discord.AppCommandOptionType.string`, :attr:`~discord.AppCommandOptionType.integer`, or :attr:`~discord.AppCommandOptionType.number`.\"\nmsgstr \"オートコンプリートは :meth:`~discord.app_commands.Transformer.type` が :attr:`~discord.AppCommandOptionType.string` 、 :attr:`~discord.AppCommandOptionType.integer` または :attr:`~discord.AppCommandOptionType.number` であるオプションでのみサポートされています。\"\n\n#: ../../../discord/app_commands/transformers.py:docstring of discord.app_commands.transformers.Transformer.autocomplete:11\nmsgid \"The autocomplete interaction being handled.\"\nmsgstr \"処理中のオートコンプリートのインタラクション。\"\n\n#: ../../../discord/app_commands/transformers.py:docstring of discord.app_commands.transformers.Transformer.autocomplete:13\nmsgid \"The current value entered by the user.\"\nmsgstr \"ユーザーが入力した現在の値。\"\n\n#: ../../../discord/app_commands/transformers.py:docstring of discord.app_commands.transformers.Transformer.autocomplete:16\nmsgid \"A list of choices to be displayed to the user, a maximum of 25.\"\nmsgstr \"ユーザーに表示される選択肢のリスト、最大25個です。\"\n\n#: ../../interactions/api.rst:684\nmsgid \"Transform\"\nmsgstr \"Transform\"\n\n#: ../../../discord/app_commands/transformers.py:docstring of discord.app_commands.transformers.Transform:1\nmsgid \"A type annotation that can be applied to a parameter to customise the behaviour of an option type by transforming with the given :class:`Transformer`. This requires the usage of two generic parameters, the first one is the type you're converting to and the second one is the type of the :class:`Transformer` actually doing the transformation.\"\nmsgstr \"パラメータに適用して与えられた特定の種類のオプションを :class:`Transformer` で変換するようその動作を変更できる型アノテーション。これを使用するときには二つのジェネリックパラメータが必要で、一つ目には変換先の型を、二つ目には実際に変換を行う :class:`Transformer` の型を指定しないといけません。\"\n\n#: ../../../discord/app_commands/transformers.py:docstring of discord.app_commands.transformers.Transform:6\n#: ../../../discord/app_commands/transformers.py:docstring of discord.app_commands.transformers.Range:4\nmsgid \"During type checking time this is equivalent to :obj:`typing.Annotated` so type checkers understand the intent of the code.\"\nmsgstr \"型チェック時には型チェッカがコードの意図を理解できるよう :obj:`typing.Annotated` と同様になります。\"\n\n#: ../../../discord/app_commands/transformers.py:docstring of discord.app_commands.transformers.Transform:9\nmsgid \"For example usage, check :class:`Transformer`.\"\nmsgstr \"使用例は、 :class:`Transformer` を確認してください。\"\n\n#: ../../interactions/api.rst:692\nmsgid \"Range\"\nmsgstr \"Range\"\n\n#: ../../../discord/app_commands/transformers.py:docstring of discord.app_commands.transformers.Range:1\nmsgid \"A type annotation that can be applied to a parameter to require a numeric or string type to fit within the range provided.\"\nmsgstr \"与えられた範囲内に収まる数値または文字列型を必要とするパラメータに適用できる型アノテーション。\"\n\n#: ../../../discord/app_commands/transformers.py:docstring of discord.app_commands.transformers.Range:7\nmsgid \"Some example ranges:\"\nmsgstr \"範囲の例:\"\n\n#: ../../../discord/app_commands/transformers.py:docstring of discord.app_commands.transformers.Range:9\nmsgid \"``Range[int, 10]`` means the minimum is 10 with no maximum.\"\nmsgstr \"``Range[int, 10]`` は最小値10、最大値なしを意味します。\"\n\n#: ../../../discord/app_commands/transformers.py:docstring of discord.app_commands.transformers.Range:10\nmsgid \"``Range[int, None, 10]`` means the maximum is 10 with no minimum.\"\nmsgstr \"``Range[int, None, 10]`` は最小値なし、最大値10を意味します。\"\n\n#: ../../../discord/app_commands/transformers.py:docstring of discord.app_commands.transformers.Range:11\nmsgid \"``Range[int, 1, 10]`` means the minimum is 1 and the maximum is 10.\"\nmsgstr \"``Range[int, 1, 10]`` は最小値1、最大値10を意味します。\"\n\n#: ../../../discord/app_commands/transformers.py:docstring of discord.app_commands.transformers.Range:12\nmsgid \"``Range[float, 1.0, 5.0]`` means the minimum is 1.0 and the maximum is 5.0.\"\nmsgstr \"``Range[float, 1.0, 5.0]`` は最小値1.0、最大値5.0を意味します。\"\n\n#: ../../../discord/app_commands/transformers.py:docstring of discord.app_commands.transformers.Range:13\nmsgid \"``Range[str, 1, 10]`` means the minimum length is 1 and the maximum length is 10.\"\nmsgstr \"``Range[str, 1, 10]`` は最小1文字、最大10文字を意味します。\"\n\n#: ../../interactions/api.rst:700\nmsgid \"Translations\"\nmsgstr \"翻訳\"\n\n#: ../../interactions/api.rst:703\nmsgid \"Translator\"\nmsgstr \"Translator\"\n\n#: ../../../discord/app_commands/translator.py:docstring of discord.app_commands.translator.Translator:1\nmsgid \"A class that handles translations for commands, parameters, and choices.\"\nmsgstr \"コマンド、パラメータ、および選択肢の翻訳を処理するクラス。\"\n\n#: ../../../discord/app_commands/translator.py:docstring of discord.app_commands.translator.Translator:3\nmsgid \"Translations are done lazily in order to allow for async enabled translations as well as supporting a wide array of translation systems such as :mod:`gettext` and `Project Fluent <https://projectfluent.org>`_.\"\nmsgstr \"非同期対応の翻訳を可能にし、また :mod:`gettext` や `Project Fluent <https://projectfluent.org>`_ のような幅広い翻訳システムをサポートするために、翻訳は遅延して行われます。\"\n\n#: ../../../discord/app_commands/translator.py:docstring of discord.app_commands.translator.Translator:7\nmsgid \"In order for a translator to be used, it must be set using the :meth:`CommandTree.set_translator` method. The translation flow for a string is as follows:\"\nmsgstr \"トランスレータを使用するには、 :meth:`CommandTree.set_translator` メソッドを使用して設定する必要があります。文字列の翻訳フローは次のとおりです。\"\n\n#: ../../../discord/app_commands/translator.py:docstring of discord.app_commands.translator.Translator:11\nmsgid \"Use :class:`locale_str` instead of :class:`str` in areas of a command you want to be translated.\"\nmsgstr \"翻訳したいコマンドで :class:`str` の代わりに :class:`locale_str` を使用します。\"\n\n#: ../../../discord/app_commands/translator.py:docstring of discord.app_commands.translator.Translator:11\nmsgid \"Currently, these are command names, command descriptions, parameter names, parameter descriptions, and choice names.\"\nmsgstr \"現在、これらはコマンド名、コマンド説明、パラメータ名、パラメータ説明、選択肢名です。\"\n\n#: ../../../discord/app_commands/translator.py:docstring of discord.app_commands.translator.Translator:12\nmsgid \"This can also be used inside the :func:`~discord.app_commands.describe` decorator.\"\nmsgstr \"これは :func:`~discord.app_commands.describe` デコレータ内でも使用できます。\"\n\n#: ../../../discord/app_commands/translator.py:docstring of discord.app_commands.translator.Translator:13\nmsgid \"Call :meth:`CommandTree.set_translator` to the translator instance that will handle the translations.\"\nmsgstr \"翻訳を処理するトランスレータインスタンスに対し :meth:`CommandTree.set_translator` を呼び出します。\"\n\n#: ../../../discord/app_commands/translator.py:docstring of discord.app_commands.translator.Translator:14\nmsgid \"Call :meth:`CommandTree.sync`\"\nmsgstr \":meth:`CommandTree.sync` を呼び出します。\"\n\n#: ../../../discord/app_commands/translator.py:docstring of discord.app_commands.translator.Translator:15\nmsgid \"The library will call :meth:`Translator.translate` on all the relevant strings being translated.\"\nmsgstr \"ライブラリは翻訳可能なすべての対応する文字列に対し :meth:`Translator.translate` を呼び出します。\"\n\n#: ../../../discord/app_commands/translator.py:docstring of discord.app_commands.translator.Translator.load:3\nmsgid \"An asynchronous setup function for loading the translation system.\"\nmsgstr \"翻訳システムを読み込むための非同期セットアップ関数。\"\n\n#: ../../../discord/app_commands/translator.py:docstring of discord.app_commands.translator.Translator.load:7\nmsgid \"This is invoked when :meth:`CommandTree.set_translator` is called.\"\nmsgstr \":meth:`CommandTree.set_translator` が呼び出されたときに呼び出されます。\"\n\n#: ../../../discord/app_commands/translator.py:docstring of discord.app_commands.translator.Translator.unload:3\nmsgid \"An asynchronous teardown function for unloading the translation system.\"\nmsgstr \"翻訳システムをアンロードするための非同期関数。\"\n\n#: ../../../discord/app_commands/translator.py:docstring of discord.app_commands.translator.Translator.unload:7\nmsgid \"This is invoked when :meth:`CommandTree.set_translator` is called if a tree already has a translator or when :meth:`discord.Client.close` is called.\"\nmsgstr \"これは、すでにツリーにトランスレータが存在する状態で :meth:`CommandTree.set_translator` を呼び出すか、 :meth:`discord.Client.close` が呼び出されたときに呼び出されます。\"\n\n#: ../../../discord/app_commands/translator.py:docstring of discord.app_commands.translator.Translator.translate:3\nmsgid \"Translates the given string to the specified locale.\"\nmsgstr \"指定した文字列を指定したロケールに翻訳します。\"\n\n#: ../../../discord/app_commands/translator.py:docstring of discord.app_commands.translator.Translator.translate:5\nmsgid \"If the string cannot be translated, ``None`` should be returned.\"\nmsgstr \"文字列を翻訳できない場合は、 ``None`` を返すべきです。\"\n\n#: ../../../discord/app_commands/translator.py:docstring of discord.app_commands.translator.Translator.translate:7\nmsgid \"The default implementation returns ``None``.\"\nmsgstr \"デフォルトの実装では ``None`` を返します。\"\n\n#: ../../../discord/app_commands/translator.py:docstring of discord.app_commands.translator.Translator.translate:9\nmsgid \"If an exception is raised in this method, it should inherit from :exc:`TranslationError`. If it doesn't, then when this is called the exception will be chained with it instead.\"\nmsgstr \"このメソッドで送出される例外は、 :exc:`TranslationError` から継承すべきです。 そうでない場合は、これが呼び出されたときに例外が代わりにチェーンされます。\"\n\n#: ../../../discord/app_commands/translator.py:docstring of discord.app_commands.translator.Translator.translate:12\nmsgid \"The string being translated.\"\nmsgstr \"翻訳すべき文字列。\"\n\n#: ../../../discord/app_commands/translator.py:docstring of discord.app_commands.translator.Translator.translate:14\nmsgid \"The locale being requested for translation.\"\nmsgstr \"翻訳先のローケル。\"\n\n#: ../../../discord/app_commands/translator.py:docstring of discord.app_commands.translator.Translator.translate:16\nmsgid \"The translation context where the string originated from. For better type checking ergonomics, the ``TranslationContextTypes`` type can be used instead to aid with type narrowing. It is functionally equivalent to :class:`TranslationContext`.\"\nmsgstr \"文字列を翻訳するときの文脈。より良い型チェックのために、 ``TranslationContextTypes`` 型を使用して型の絞り込みを行うことができます。これは :class:`TranslationContext` と機能的に同じです。\"\n\n#: ../../interactions/api.rst:711\nmsgid \"locale_str\"\nmsgstr \"locale_str\"\n\n#: ../../../discord/app_commands/translator.py:docstring of discord.app_commands.translator.locale_str:1\nmsgid \"Marks a string as ready for translation.\"\nmsgstr \"文字列を翻訳できるものとマークします。\"\n\n#: ../../../discord/app_commands/translator.py:docstring of discord.app_commands.translator.locale_str:3\nmsgid \"This is done lazily and is not actually translated until :meth:`CommandTree.sync` is called.\"\nmsgstr \"これは遅延して行われ、実際には :meth:`CommandTree.sync` が呼び出されるまで翻訳されません。\"\n\n#: ../../../discord/app_commands/translator.py:docstring of discord.app_commands.translator.locale_str:5\nmsgid \"The sync method then ultimately defers the responsibility of translating to the :class:`Translator` instance used by the :class:`CommandTree`. For more information on the translation flow, see the :class:`Translator` documentation.\"\nmsgstr \"syncメソッドは、翻訳を :class:`CommandTree` が使用する :class:`Translator` インスタンスに委任します。翻訳フローに関する詳細に関しては、 :class:`Translator` のドキュメントを参照してください。\"\n\n#: ../../../discord/app_commands/translator.py:docstring of discord.app_commands.translator.locale_str:13\nmsgid \"Returns the message passed to the string.\"\nmsgstr \"文字列に渡されたメッセージを返します。\"\n\n#: ../../../discord/app_commands/translator.py:docstring of discord.app_commands.translator.locale_str:17\nmsgid \"Checks if the string is equal to another string.\"\nmsgstr \"文字列が他の文字列と等しいか確認します。\"\n\n#: ../../../discord/app_commands/translator.py:docstring of discord.app_commands.translator.locale_str:21\nmsgid \"Checks if the string is not equal to another string.\"\nmsgstr \"文字列が他の文字列と等しくないか確認します。\"\n\n#: ../../../discord/app_commands/translator.py:docstring of discord.app_commands.translator.locale_str:25\nmsgid \"Returns the hash of the string.\"\nmsgstr \"文字列の ハッシュを返します。\"\n\n#: ../../../discord/app_commands/translator.py:docstring of discord.app_commands.translator.locale_str:31\nmsgid \"The message being translated. Once set, this cannot be changed.\"\nmsgstr \"翻訳すべきメッセージ。一度設定したら変更できません。\"\n\n#: ../../../discord/app_commands/translator.py:docstring of discord.app_commands.translator.locale_str:35\nmsgid \"This must be the default \\\"message\\\" that you send to Discord. Discord sends this message back to the library and the library uses it to access the data in order to dispatch commands.\"\nmsgstr \"これはDiscordに送信するデフォルトの「メッセージ」でなければなりません。 Discordはこのメッセージをライブラリに送信し、ライブラリはコマンドを実行するためのデータにアクセスするために使用します。\"\n\n#: ../../../discord/app_commands/translator.py:docstring of discord.app_commands.translator.locale_str:39\nmsgid \"For example, in a command name context, if the command name is ``foo`` then the message *must* also be ``foo``. For other translation systems that require a message ID such as Fluent, consider using a keyword argument to pass it in.\"\nmsgstr \"例えば、コマンド名の文脈において、コマンド名が ``foo`` の場合、メッセージは ``foo`` でないと **いけません** 。 FluentのようなメッセージIDが必要な他の翻訳システムでは、キーワード引数を使用して渡すことを検討してください。\"\n\n#: ../../../discord/app_commands/translator.py:docstring of discord.app_commands.translator.locale_str:48\nmsgid \"A dict of user provided extras to attach to the translated string. This can be used to add more context, information, or any metadata necessary to aid in actually translating the string.\"\nmsgstr \"翻訳する文字列についての追加のデータを保管できる辞書型。これは、文字列の実際の翻訳に必要な文脈、情報、その他メタデータを追加するのに利用できます。\"\n\n#: ../../../discord/app_commands/translator.py:docstring of discord.app_commands.translator.locale_str:52\nmsgid \"Since these are passed via keyword arguments, the keys are strings.\"\nmsgstr \"これらはキーワード引数で渡されるので、キーは文字列です。\"\n\n#: ../../interactions/api.rst:719\nmsgid \"TranslationContext\"\nmsgstr \"TranslationContext\"\n\n#: ../../../discord/app_commands/translator.py:docstring of discord.app_commands.translator.TranslationContext:1\nmsgid \"A class that provides context for the :class:`locale_str` being translated.\"\nmsgstr \"翻訳される :class:`locale_str` の文脈を提供するクラス。\"\n\n#: ../../../discord/app_commands/translator.py:docstring of discord.app_commands.translator.TranslationContext:3\nmsgid \"This is useful to determine where exactly the string is located and aid in looking up the actual translation.\"\nmsgstr \"これは、文字列がどこにあるかを正確に特定し、実際の翻訳を取得するのに役立ちます。\"\n\n#: ../../../discord/app_commands/translator.py:docstring of discord.app_commands.translator.TranslationContext:8\nmsgid \"The location where this string is located.\"\nmsgstr \"この文字列が存在する場所。\"\n\n#: ../../../discord/app_commands/translator.py:docstring of discord.app_commands.translator.TranslationContext:10\nmsgid \":class:`TranslationContextLocation`\"\nmsgstr \":class:`TranslationContextLocation`\"\n\n#: ../../../discord/app_commands/translator.py:docstring of discord.app_commands.translator.TranslationContext:14\nmsgid \"The extraneous data that is being translated.\"\nmsgstr \"翻訳されている追加のデータ。\"\n\n#: ../../interactions/api.rst:727\nmsgid \"TranslationContextLocation\"\nmsgstr \"TranslationContextLocation\"\n\n#: ../../interactions/api.rst:732\nmsgid \"An enum representing the location context that the translation occurs in when requested for translation.\"\nmsgstr \"翻訳が要求されたときに、翻訳すべき場所を示す列挙型。\"\n\n#: ../../interactions/api.rst:738\nmsgid \"The translation involved a command name.\"\nmsgstr \"コマンド名の翻訳。\"\n\n#: ../../interactions/api.rst:741\nmsgid \"The translation involved a command description.\"\nmsgstr \"コマンドの説明の翻訳。\"\n\n#: ../../interactions/api.rst:745\nmsgid \"The translation involved a group name.\"\nmsgstr \"グループ名の翻訳。\"\n\n#: ../../interactions/api.rst:748\nmsgid \"The translation involved a group description.\"\nmsgstr \"グループの説明の翻訳。\"\n\n#: ../../interactions/api.rst:751\nmsgid \"The translation involved a parameter name.\"\nmsgstr \"パラメータ名の翻訳。\"\n\n#: ../../interactions/api.rst:754\nmsgid \"The translation involved a parameter description.\"\nmsgstr \"パラメータの説明の翻訳。\"\n\n#: ../../interactions/api.rst:757\nmsgid \"The translation involved a choice name.\"\nmsgstr \"選択肢名の翻訳。\"\n\n#: ../../interactions/api.rst:760\nmsgid \"The translation involved something else entirely. This is useful for running :meth:`Translator.translate` for custom usage.\"\nmsgstr \"その他の翻訳。これは他の目的で :meth:`Translator.translate` を実行するときに役立ちます。\"\n\n#: ../../interactions/api.rst:764\nmsgid \"Exceptions\"\nmsgstr \"例外\"\n\n#: ../../../discord/app_commands/errors.py:docstring of discord.app_commands.errors.AppCommandError:1\nmsgid \"The base exception type for all application command related errors.\"\nmsgstr \"アプリケーションコマンドに関連するエラーすべての基礎となる例外。\"\n\n#: ../../../discord/app_commands/errors.py:docstring of discord.app_commands.errors.AppCommandError:3\nmsgid \"This inherits from :exc:`discord.DiscordException`.\"\nmsgstr \"これは :exc:`discord.DiscordException` を継承しています。\"\n\n#: ../../../discord/app_commands/errors.py:docstring of discord.app_commands.errors.AppCommandError:5\nmsgid \"This exception and exceptions inherited from it are handled in a special way as they are caught and passed into various error handlers in this order:\"\nmsgstr \"この例外及び、ここから継承された例外は、以下の順で捕捉され様々なエラーハンドラに渡されるなど、特別な方法で処理されます。\"\n\n#: ../../../discord/app_commands/errors.py:docstring of discord.app_commands.errors.AppCommandError:9\nmsgid \":meth:`Command.error <discord.app_commands.Command.error>`\"\nmsgstr \":meth:`Command.error <discord.app_commands.Command.error>`\"\n\n#: ../../../discord/app_commands/errors.py:docstring of discord.app_commands.errors.AppCommandError:10\nmsgid \":meth:`Group.on_error <discord.app_commands.Group.on_error>`\"\nmsgstr \":meth:`Group.on_error <discord.app_commands.Group.on_error>`\"\n\n#: ../../../discord/app_commands/errors.py:docstring of discord.app_commands.errors.AppCommandError:11\nmsgid \":meth:`CommandTree.on_error <discord.app_commands.CommandTree.on_error>`\"\nmsgstr \":meth:`CommandTree.on_error <discord.app_commands.CommandTree.on_error>`\"\n\n#: ../../../discord/app_commands/errors.py:docstring of discord.app_commands.errors.CommandInvokeError:1\nmsgid \"An exception raised when the command being invoked raised an exception.\"\nmsgstr \"呼び出そうとしたコマンドが例外を送出した場合に発生する例外。\"\n\n#: ../../../discord/app_commands/errors.py:docstring of discord.app_commands.errors.CommandInvokeError:3\n#: ../../../discord/app_commands/errors.py:docstring of discord.app_commands.errors.TransformerError:4\n#: ../../../discord/app_commands/errors.py:docstring of discord.app_commands.errors.TranslationError:3\n#: ../../../discord/app_commands/errors.py:docstring of discord.app_commands.errors.CheckFailure:3\n#: ../../../discord/app_commands/errors.py:docstring of discord.app_commands.errors.CommandLimitReached:4\nmsgid \"This inherits from :exc:`~discord.app_commands.AppCommandError`.\"\nmsgstr \":exc:`~discord.app_commands.AppCommandError` を継承します。\"\n\n#: ../../../discord/app_commands/errors.py:docstring of discord.app_commands.errors.CommandInvokeError:9\nmsgid \"The original exception that was raised. You can also get this via the ``__cause__`` attribute.\"\nmsgstr \"送出された元の例外。 ``__cause__`` 属性からも取得できます。\"\n\n#: ../../../discord/app_commands/errors.py:docstring of discord.app_commands.errors.CommandInvokeError:12\nmsgid \":exc:`Exception`\"\nmsgstr \":exc:`Exception`\"\n\n#: ../../../discord/app_commands/errors.py:docstring of discord.app_commands.errors.CommandInvokeError:16\nmsgid \"The command that failed.\"\nmsgstr \"失敗したコマンド。\"\n\n#: ../../../discord/app_commands/errors.py:docstring of discord.app_commands.errors.CommandInvokeError:18\nmsgid \"Union[:class:`Command`, :class:`ContextMenu`]\"\nmsgstr \"Union[:class:`Command`, :class:`ContextMenu`]\"\n\n#: ../../../discord/app_commands/errors.py:docstring of discord.app_commands.errors.TransformerError:1\nmsgid \"An exception raised when a :class:`Transformer` or type annotation fails to convert to its target type.\"\nmsgstr \":class:`Transformer` または型アノテーションがターゲット型に変換できない場合に発生する例外。\"\n\n#: ../../../discord/app_commands/errors.py:docstring of discord.app_commands.errors.TransformerError:6\nmsgid \"If an exception occurs while converting that does not subclass :exc:`AppCommandError` then the exception is wrapped into this exception. The original exception can be retrieved using the ``__cause__`` attribute. Otherwise if the exception derives from :exc:`AppCommandError` then it will be propagated as-is.\"\nmsgstr \"もし :exc:`AppCommandError` を継承しない例外が変換中に送出された場合その例外はこれに包まれます。元の例外は ``__cause__`` 属性から取得できます。もし例外が :exc:`AppCommandError` から派生したものであればそのまま伝播されます。\"\n\n#: ../../../discord/app_commands/errors.py:docstring of discord.app_commands.errors.TransformerError:16\nmsgid \"The value that failed to convert.\"\nmsgstr \"変換に失敗した値。\"\n\n#: ../../../discord/app_commands/errors.py:docstring of discord.app_commands.errors.TransformerError:22\nmsgid \"The type of argument that failed to convert.\"\nmsgstr \"変換に失敗した引数の型。\"\n\n#: ../../../discord/app_commands/errors.py:docstring of discord.app_commands.errors.TransformerError:28\nmsgid \"The transformer that failed the conversion.\"\nmsgstr \"変換に失敗したトランスフォーマー。\"\n\n#: ../../../discord/app_commands/errors.py:docstring of discord.app_commands.errors.TransformerError:30\nmsgid \":class:`Transformer`\"\nmsgstr \":class:`Transformer`\"\n\n#: ../../../discord/app_commands/errors.py:docstring of discord.app_commands.errors.TranslationError:1\nmsgid \"An exception raised when the library fails to translate a string.\"\nmsgstr \"ライブラリが文字列の翻訳に失敗したときに発生する例外。\"\n\n#: ../../../discord/app_commands/errors.py:docstring of discord.app_commands.errors.TranslationError:5\nmsgid \"If an exception occurs while calling :meth:`Translator.translate` that does not subclass this then the exception is wrapped into this exception. The original exception can be retrieved using the ``__cause__`` attribute. Otherwise it will be propagated as-is.\"\nmsgstr \"もしこれを継承しない例外が :meth:`Translator.translate` の実行中に送出された場合その例外はこれに包まれます。元の例外は ``__cause__`` 属性から取得できます。そうでなければ、例外はそのまま伝播されます。\"\n\n#: ../../../discord/app_commands/errors.py:docstring of discord.app_commands.errors.TranslationError:14\nmsgid \"The string that caused the error, if any.\"\nmsgstr \"存在する場合、エラーの原因となった文字列。\"\n\n#: ../../../discord/app_commands/errors.py:docstring of discord.app_commands.errors.TranslationError:16\nmsgid \"Optional[Union[:class:`str`, :class:`locale_str`]]\"\nmsgstr \"Optional[Union[:class:`str`, :class:`locale_str`]]\"\n\n#: ../../../discord/app_commands/errors.py:docstring of discord.app_commands.errors.TranslationError:20\nmsgid \"The locale that caused the error, if any.\"\nmsgstr \"存在する場合、エラーの原因となったローケル。\"\n\n#: ../../../discord/app_commands/errors.py:docstring of discord.app_commands.errors.TranslationError:22\nmsgid \"Optional[:class:`~discord.Locale`]\"\nmsgstr \"Optional[:class:`~discord.Locale`]\"\n\n#: ../../../discord/app_commands/errors.py:docstring of discord.app_commands.errors.TranslationError:26\nmsgid \"The context of the translation that triggered the error.\"\nmsgstr \"エラーを引き起こした翻訳の文脈。\"\n\n#: ../../../discord/app_commands/errors.py:docstring of discord.app_commands.errors.TranslationError:28\nmsgid \":class:`~discord.app_commands.TranslationContext`\"\nmsgstr \":class:`~discord.app_commands.TranslationContext`\"\n\n#: ../../../discord/app_commands/errors.py:docstring of discord.app_commands.errors.CheckFailure:1\nmsgid \"An exception raised when check predicates in a command have failed.\"\nmsgstr \"コマンドのチェック関数が失敗した場合に発生する例外。\"\n\n#: ../../../discord/app_commands/errors.py:docstring of discord.app_commands.errors.NoPrivateMessage:1\nmsgid \"An exception raised when a command does not work in a direct message.\"\nmsgstr \"コマンドがダイレクトメッセージで動作しない場合に発生する例外。\"\n\n#: ../../../discord/app_commands/errors.py:docstring of discord.app_commands.errors.NoPrivateMessage:3\n#: ../../../discord/app_commands/errors.py:docstring of discord.app_commands.errors.MissingRole:3\n#: ../../../discord/app_commands/errors.py:docstring of discord.app_commands.errors.MissingAnyRole:4\n#: ../../../discord/app_commands/errors.py:docstring of discord.app_commands.errors.MissingPermissions:4\n#: ../../../discord/app_commands/errors.py:docstring of discord.app_commands.errors.BotMissingPermissions:4\nmsgid \"This inherits from :exc:`~discord.app_commands.CheckFailure`.\"\nmsgstr \":exc:`~discord.app_commands.CheckFailure` を継承します。\"\n\n#: ../../../discord/app_commands/errors.py:docstring of discord.app_commands.errors.MissingRole:1\nmsgid \"An exception raised when the command invoker lacks a role to run a command.\"\nmsgstr \"コマンド実行者がコマンドを実行するためのロールを持っていない場合に発生する例外。\"\n\n#: ../../../discord/app_commands/errors.py:docstring of discord.app_commands.errors.MissingRole:9\nmsgid \"The required role that is missing. This is the parameter passed to :func:`~discord.app_commands.checks.has_role`.\"\nmsgstr \"見つからなかった必須のロール。これは :func:`~discord.app_commands.checks.has_role` に渡されたパラメータと同一です。\"\n\n#: ../../../discord/app_commands/errors.py:docstring of discord.app_commands.errors.MissingRole:12\nmsgid \"Union[:class:`str`, :class:`int`]\"\nmsgstr \"Union[:class:`str`, :class:`int`]\"\n\n#: ../../../discord/app_commands/errors.py:docstring of discord.app_commands.errors.MissingAnyRole:1\nmsgid \"An exception raised when the command invoker lacks any of the roles specified to run a command.\"\nmsgstr \"コマンド実行者がコマンドを実行するためのロールをどれも持っていない場合に発生する例外。\"\n\n#: ../../../discord/app_commands/errors.py:docstring of discord.app_commands.errors.MissingAnyRole:10\nmsgid \"The roles that the invoker is missing. These are the parameters passed to :func:`~discord.app_commands.checks.has_any_role`.\"\nmsgstr \"見つからなかったロール。これは :func:`~discord.app_commands.checks.has_any_role` に渡されたパラメータと同一です。\"\n\n#: ../../../discord/app_commands/errors.py:docstring of discord.app_commands.errors.MissingAnyRole:13\nmsgid \"List[Union[:class:`str`, :class:`int`]]\"\nmsgstr \"List[Union[:class:`str`, :class:`int`]]\"\n\n#: ../../../discord/app_commands/errors.py:docstring of discord.app_commands.errors.MissingPermissions:1\nmsgid \"An exception raised when the command invoker lacks permissions to run a command.\"\nmsgstr \"コマンド実行者がコマンドを実行する権限を持っていない場合に発生する例外。\"\n\n#: ../../../discord/app_commands/errors.py:docstring of discord.app_commands.errors.MissingPermissions:10\n#: ../../../discord/app_commands/errors.py:docstring of discord.app_commands.errors.BotMissingPermissions:10\nmsgid \"The required permissions that are missing.\"\nmsgstr \"有していない必要な権限。\"\n\n#: ../../../discord/app_commands/errors.py:docstring of discord.app_commands.errors.BotMissingPermissions:1\nmsgid \"An exception raised when the bot's member lacks permissions to run a command.\"\nmsgstr \"ボットのメンバーがコマンドを実行する権限を持っていない場合に発生する例外。\"\n\n#: ../../../discord/app_commands/errors.py:docstring of discord.app_commands.errors.CommandOnCooldown:1\nmsgid \"An exception raised when the command being invoked is on cooldown.\"\nmsgstr \"呼び出そうとしたコマンドがクールダウン中の場合に発生する例外。\"\n\n#: ../../../discord/app_commands/errors.py:docstring of discord.app_commands.errors.CommandOnCooldown:9\nmsgid \"The cooldown that was triggered.\"\nmsgstr \"トリガーされたクールダウン。\"\n\n#: ../../../discord/app_commands/errors.py:docstring of discord.app_commands.errors.CommandOnCooldown:11\nmsgid \":class:`~discord.app_commands.Cooldown`\"\nmsgstr \":class:`~discord.app_commands.Cooldown`\"\n\n#: ../../../discord/app_commands/errors.py:docstring of discord.app_commands.errors.CommandOnCooldown:15\nmsgid \"The amount of seconds to wait before you can retry again.\"\nmsgstr \"再試行する前に待たないといけない秒数。\"\n\n#: ../../../discord/app_commands/errors.py:docstring of discord.app_commands.errors.CommandLimitReached:1\nmsgid \"An exception raised when the maximum number of application commands was reached either globally or in a guild.\"\nmsgstr \"グローバルまたはギルド内でアプリケーションコマンドの最大登録数に達したときに発生する例外。\"\n\n#: ../../../discord/app_commands/errors.py:docstring of discord.app_commands.errors.CommandLimitReached:10\nmsgid \"The type of command that reached the limit.\"\nmsgstr \"制限に達したコマンドの種類。\"\n\n#: ../../../discord/app_commands/errors.py:docstring of discord.app_commands.errors.CommandLimitReached:16\nmsgid \"The guild ID that reached the limit or ``None`` if it was global.\"\nmsgstr \"制限に達したギルドのIDか、グローバルの場合 ``None`` 。\"\n\n#: ../../../discord/app_commands/errors.py:docstring of discord.app_commands.errors.CommandLimitReached:22\nmsgid \"The limit that was hit.\"\nmsgstr \"達した制限。\"\n\n#: ../../../discord/app_commands/errors.py:docstring of discord.app_commands.errors.CommandAlreadyRegistered:1\nmsgid \"An exception raised when a command is already registered.\"\nmsgstr \"コマンドがすでに登録されている場合に発生する例外。\"\n\n#: ../../../discord/app_commands/errors.py:docstring of discord.app_commands.errors.CommandAlreadyRegistered:9\nmsgid \"The name of the command already registered.\"\nmsgstr \"すでに登録されているコマンドの名前。\"\n\n#: ../../../discord/app_commands/errors.py:docstring of discord.app_commands.errors.CommandAlreadyRegistered:15\nmsgid \"The guild ID this command was already registered at. If ``None`` then it was a global command.\"\nmsgstr \"コマンドがすでに登録されているギルドのID。グローバルコマンドの場合 ``None`` 。\"\n\n#: ../../../discord/app_commands/errors.py:docstring of discord.app_commands.errors.CommandSignatureMismatch:1\nmsgid \"An exception raised when an application command from Discord has a different signature from the one provided in the code. This happens because your command definition differs from the command definition you provided Discord. Either your code is out of date or the data from Discord is out of sync.\"\nmsgstr \"Discordからのアプリケーションコマンドがコード内のものとは異なるシグネチャを持つ場合に発生する例外。 これは、Discordに渡したコマンド定義と現在のコマンド定義が異なるときに発生します。 つまり、あなたのコードが古いものであるか、Discordのデータが同期されていません。\"\n\n#: ../../../discord/app_commands/errors.py:docstring of discord.app_commands.errors.CommandSignatureMismatch:12\nmsgid \"The command that had the signature mismatch.\"\nmsgstr \"シグネチャが一致しないコマンド。\"\n\n#: ../../../discord/app_commands/errors.py:docstring of discord.app_commands.errors.CommandSignatureMismatch:14\nmsgid \"Union[:class:`~.app_commands.Command`, :class:`~.app_commands.ContextMenu`, :class:`~.app_commands.Group`]\"\nmsgstr \"Union[:class:`~.app_commands.Command`, :class:`~.app_commands.ContextMenu`, :class:`~.app_commands.Group`]\"\n\n#: ../../../discord/app_commands/errors.py:docstring of discord.app_commands.errors.CommandNotFound:1\nmsgid \"An exception raised when an application command could not be found.\"\nmsgstr \"アプリケーションコマンドが見つからなかった場合に発生する例外。\"\n\n#: ../../../discord/app_commands/errors.py:docstring of discord.app_commands.errors.CommandNotFound:9\nmsgid \"The name of the application command not found.\"\nmsgstr \"見つからなかったアプリケーションコマンドの名前。\"\n\n#: ../../../discord/app_commands/errors.py:docstring of discord.app_commands.errors.CommandNotFound:15\nmsgid \"A list of parent command names that were previously found prior to the application command not being found.\"\nmsgstr \"見つからなかったアプリケーションコマンドの前に見つかった親コマンド名のリスト。\"\n\n#: ../../../discord/app_commands/errors.py:docstring of discord.app_commands.errors.CommandNotFound:22\nmsgid \"The type of command that was not found.\"\nmsgstr \"見つからなかったコマンドの種類。\"\n\n#: ../../../discord/app_commands/errors.py:docstring of discord.app_commands.errors.MissingApplicationID:1\nmsgid \"An exception raised when the client does not have an application ID set. An application ID is required for syncing application commands.\"\nmsgstr \"クライアントにアプリケーションIDが設定されていない場合に発生する例外。アプリケーションコマンドの同期にはアプリケーションIDが必要です。\"\n\n#: ../../../discord/app_commands/errors.py:docstring of discord.app_commands.errors.CommandSyncFailure:1\nmsgid \"An exception raised when :meth:`CommandTree.sync` failed.\"\nmsgstr \":meth:`CommandTree.sync` が失敗したときに発生する例外。\"\n\n#: ../../../discord/app_commands/errors.py:docstring of discord.app_commands.errors.CommandSyncFailure:3\nmsgid \"This provides syncing failures in a slightly more readable format.\"\nmsgstr \"これにより、同期の失敗に関する情報が少し読みやすい形式で提供されます。\"\n\n#: ../../../discord/app_commands/errors.py:docstring of discord.app_commands.errors.CommandSyncFailure:5\nmsgid \"This inherits from :exc:`~discord.app_commands.AppCommandError` and :exc:`~discord.HTTPException`.\"\nmsgstr \"これは :exc:`~discord.app_commands.AppCommandError` と :exc:`~discord.HTTPException` を継承します。\"\n\n#: ../../interactions/api.rst:818\nmsgid \"Exception Hierarchy\"\nmsgstr \"例外の階層構造\"\n\n#: ../../interactions/api.rst:840\nmsgid \":exc:`~discord.DiscordException`\"\nmsgstr \":exc:`~discord.DiscordException`\"\n\n#: ../../interactions/api.rst:838\nmsgid \":exc:`~discord.app_commands.AppCommandError`\"\nmsgstr \":exc:`~discord.app_commands.AppCommandError`\"\n\n#: ../../interactions/api.rst:824\nmsgid \":exc:`~discord.app_commands.CommandInvokeError`\"\nmsgstr \":exc:`~discord.app_commands.CommandInvokeError`\"\n\n#: ../../interactions/api.rst:825\nmsgid \":exc:`~discord.app_commands.TransformerError`\"\nmsgstr \":exc:`~discord.app_commands.TransformerError`\"\n\n#: ../../interactions/api.rst:826\nmsgid \":exc:`~discord.app_commands.TranslationError`\"\nmsgstr \":exc:`~discord.app_commands.TranslationError`\"\n\n#: ../../interactions/api.rst:832\nmsgid \":exc:`~discord.app_commands.CheckFailure`\"\nmsgstr \":exc:`~discord.app_commands.CheckFailure`\"\n\n#: ../../interactions/api.rst:828\nmsgid \":exc:`~discord.app_commands.NoPrivateMessage`\"\nmsgstr \":exc:`~discord.app_commands.NoPrivateMessage`\"\n\n#: ../../interactions/api.rst:829\nmsgid \":exc:`~discord.app_commands.MissingRole`\"\nmsgstr \":exc:`~discord.app_commands.MissingRole`\"\n\n#: ../../interactions/api.rst:830\nmsgid \":exc:`~discord.app_commands.MissingAnyRole`\"\nmsgstr \":exc:`~discord.app_commands.MissingAnyRole`\"\n\n#: ../../interactions/api.rst:831\nmsgid \":exc:`~discord.app_commands.MissingPermissions`\"\nmsgstr \":exc:`~discord.app_commands.MissingPermissions`\"\n\n#: ../../interactions/api.rst:832\nmsgid \":exc:`~discord.app_commands.BotMissingPermissions`\"\nmsgstr \":exc:`~discord.app_commands.BotMissingPermissions`\"\n\n#: ../../interactions/api.rst:833\nmsgid \":exc:`~discord.app_commands.CommandOnCooldown`\"\nmsgstr \":exc:`~discord.app_commands.CommandOnCooldown`\"\n\n#: ../../interactions/api.rst:834\nmsgid \":exc:`~discord.app_commands.CommandLimitReached`\"\nmsgstr \":exc:`~discord.app_commands.CommandLimitReached`\"\n\n#: ../../interactions/api.rst:835\nmsgid \":exc:`~discord.app_commands.CommandAlreadyRegistered`\"\nmsgstr \":exc:`~discord.app_commands.CommandAlreadyRegistered`\"\n\n#: ../../interactions/api.rst:836\nmsgid \":exc:`~discord.app_commands.CommandSignatureMismatch`\"\nmsgstr \":exc:`~discord.app_commands.CommandSignatureMismatch`\"\n\n#: ../../interactions/api.rst:837\nmsgid \":exc:`~discord.app_commands.CommandNotFound`\"\nmsgstr \":exc:`~discord.app_commands.CommandNotFound`\"\n\n#: ../../interactions/api.rst:838\nmsgid \":exc:`~discord.app_commands.MissingApplicationID`\"\nmsgstr \":exc:`~discord.app_commands.MissingApplicationID`\"\n\n#: ../../interactions/api.rst:839\n#: ../../interactions/api.rst:841\nmsgid \":exc:`~discord.app_commands.CommandSyncFailure`\"\nmsgstr \":exc:`~discord.app_commands.CommandSyncFailure`\"\n\n#: ../../interactions/api.rst:840\nmsgid \":exc:`~discord.HTTPException`\"\nmsgstr \":exc:`~discord.HTTPException`\"\n\n"
  },
  {
    "path": "docs/locale/ja/LC_MESSAGES/intro.po",
    "content": "msgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: discordpy\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2023-06-21 01:17+0000\\n\"\n\"PO-Revision-Date: 2024-04-17 02:43\\n\"\n\"Last-Translator: \\n\"\n\"Language-Team: Japanese\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Plural-Forms: nplurals=1; plural=0;\\n\"\n\"X-Crowdin-Project: discordpy\\n\"\n\"X-Crowdin-Project-ID: 362783\\n\"\n\"X-Crowdin-Language: ja\\n\"\n\"X-Crowdin-File: intro.pot\\n\"\n\"X-Crowdin-File-ID: 80\\n\"\n\"Language: ja_JP\\n\"\n\n#: ../../intro.rst:8\nmsgid \"Introduction\"\nmsgstr \"はじめに\"\n\n#: ../../intro.rst:10\nmsgid \"This is the documentation for discord.py, a library for Python to aid in creating applications that utilise the Discord API.\"\nmsgstr \"これはDiscord APIを利用したアプリケーションを作成するのに便利なPythonライブラリ、discord.pyのドキュメントです。\"\n\n#: ../../intro.rst:14\nmsgid \"Prerequisites\"\nmsgstr \"前提\"\n\n#: ../../intro.rst:16\nmsgid \"discord.py works with Python 3.8 or higher. Support for earlier versions of Python is not provided. Python 2.7 or lower is not supported. Python 3.7 or lower is not supported.\"\nmsgstr \"discord.py は Python 3.8 以降で動作します。それ以前のPython に対するサポートは提供されていません。 Python 2.7 以下はサポートされていません。Python 3.7 以下はサポートされていません。\"\n\n#: ../../intro.rst:23\nmsgid \"Installing\"\nmsgstr \"インストール\"\n\n#: ../../intro.rst:25\nmsgid \"You can get the library directly from PyPI: ::\"\nmsgstr \"PyPIから直接ライブラリをインストールできます。\"\n\n#: ../../intro.rst:29\nmsgid \"If you are using Windows, then the following should be used instead: ::\"\nmsgstr \"Windowsを使用している場合は、以下のコマンドで実行してください。\"\n\n#: ../../intro.rst:34\nmsgid \"To get voice support, you should use ``discord.py[voice]`` instead of ``discord.py``, e.g. ::\"\nmsgstr \"音声のサポートが必要な場合は、 ``discord.py`` ではなく、以下の例のように ``discord.py[voice]`` を使うべきです。\"\n\n#: ../../intro.rst:38\nmsgid \"On Linux environments, installing voice requires getting the following dependencies:\"\nmsgstr \"Linux環境では、依存関係にある以下のライブラリが必要になるので注意してください。\"\n\n#: ../../intro.rst:40\nmsgid \"`libffi <https://github.com/libffi/libffi>`_\"\nmsgstr \"`libffi <https://github.com/libffi/libffi>`_\"\n\n#: ../../intro.rst:41\nmsgid \"`libnacl <https://github.com/saltstack/libnacl>`_\"\nmsgstr \"`libnacl <https://github.com/saltstack/libnacl>`_\"\n\n#: ../../intro.rst:42\nmsgid \"`python3-dev <https://packages.debian.org/python3-dev>`_\"\nmsgstr \"`python3-dev <https://packages.debian.org/python3-dev>`_\"\n\n#: ../../intro.rst:44\nmsgid \"For a Debian-based system, the following command will get these dependencies:\"\nmsgstr \"Debianベースのシステムでは、次のコマンドで依存関係にあるライブラリを取得できます。\"\n\n#: ../../intro.rst:50\nmsgid \"Remember to check your permissions!\"\nmsgstr \"自分の権限の確認は忘れないようにしてください！\"\n\n#: ../../intro.rst:53\nmsgid \"Virtual Environments\"\nmsgstr \"仮想環境\"\n\n#: ../../intro.rst:55\nmsgid \"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 libraries 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.\"\nmsgstr \"システムにインストールされている環境をライブラリで汚したくない場合や、現在システムにインストールされているものとは別のバージョンのライブラリを利用したい場合があると思います。システムへライブラリをインストールする権限がない場合などもです。こういった要望に応えるため、Python3.3の標準ライブラリには異なるバージョンの管理を補助する「仮想環境」と呼ばれる概念が追加されました。\"\n\n#: ../../intro.rst:60\nmsgid \"A more in-depth tutorial is found on :doc:`py:tutorial/venv`.\"\nmsgstr \"より詳しいチュートリアルは :doc:`py:tutorial/venv` にあります。\"\n\n#: ../../intro.rst:62\nmsgid \"However, for the quick and dirty:\"\nmsgstr \"簡単に仮想環境を構築する方法。\"\n\n#: ../../intro.rst:64\nmsgid \"Go to your project's working directory:\"\nmsgstr \"プロジェクトの作業ディレクトリに移動してください。\"\n\n#: ../../intro.rst:71\nmsgid \"Activate the virtual environment:\"\nmsgstr \"下記コマンドで仮想環境を有効化します。\"\n\n#: ../../intro.rst:77\nmsgid \"On Windows you activate it with:\"\nmsgstr \"Windowsの場合は、こちらを使ってください。\"\n\n#: ../../intro.rst:83\nmsgid \"Use pip like usual:\"\nmsgstr \"いつものようにpipインストールを実行します。\"\n\n#: ../../intro.rst:89\nmsgid \"Congratulations. You now have a virtual environment all set up.\"\nmsgstr \"おめでとうございます。これで仮想環境のセットアップができました。\"\n\n#: ../../intro.rst:93\nmsgid \"Scripts executed with ``py -3`` will ignore any currently active virtual environment, as the ``-3`` specifies a global scope.\"\nmsgstr \"``py -3`` で実行されるスクリプトは、グローバルスコープを指定するため、現在アクティブな仮想環境を無視します。\"\n\n#: ../../intro.rst:97\nmsgid \"Basic Concepts\"\nmsgstr \"基本概念\"\n\n#: ../../intro.rst:99\nmsgid \"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.\"\nmsgstr \"discord.pyは :ref:`イベント <discord-api-events>` の概念を中心としています。イベントは何かを受け取り、それに対する応答を行います。例えば、メッセージが発生すると、メッセージの発生に関連するイベントを受け取り、そのイベントに対して応答を返すことができます。\"\n\n#: ../../intro.rst:103\nmsgid \"A quick example to showcase how events work:\"\nmsgstr \"以下はイベントの仕組みを紹介する簡単な例です。\"\n\n"
  },
  {
    "path": "docs/locale/ja/LC_MESSAGES/logging.po",
    "content": "msgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: discordpy\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2024-03-26 03:41+0000\\n\"\n\"PO-Revision-Date: 2024-04-17 02:43\\n\"\n\"Last-Translator: \\n\"\n\"Language-Team: Japanese\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Plural-Forms: nplurals=1; plural=0;\\n\"\n\"X-Crowdin-Project: discordpy\\n\"\n\"X-Crowdin-Project-ID: 362783\\n\"\n\"X-Crowdin-Language: ja\\n\"\n\"X-Crowdin-File: logging.pot\\n\"\n\"X-Crowdin-File-ID: 84\\n\"\n\"Language: ja_JP\\n\"\n\n#: ../../logging.rst:8\nmsgid \"Setting Up Logging\"\nmsgstr \"ログの設定\"\n\n#: ../../logging.rst:10\nmsgid \"*discord.py* logs errors and debug information via the :mod:`logging` python module. In order to streamline this process, the library provides default configuration for the ``discord`` logger when using :meth:`Client.run`. It is strongly recommended that the logging module is configured, as no errors or warnings will be output if it is not set up.\"\nmsgstr \"*discord.py* は、エラーとデバッグ情報を :mod:`logging` Python モジュールを用いて出力します。このプロセスを容易にするため、ライブラリは :meth:`Client.run` を使用したときに ``discord`` ロガーのデフォルト構成を提供します。設定されていないとエラーや警告は一切出力されないため、 logging モジュールを設定することを強く推奨します。\"\n\n#: ../../logging.rst:13\nmsgid \"The default logging configuration provided by the library will print to :data:`sys.stderr` using coloured output. You can configure it to send to a file instead by using one of the built-in :mod:`logging.handlers`, such as :class:`logging.FileHandler`.\"\nmsgstr \"ライブラリが提供するデフォルトの logging 構成は色付きの出力を :data:`sys.stderr` に出力します。 :class:`logging.FileHandler` などのビルトイン :mod:`logging.handlers` を使用すると、ファイルに出力するようにできます。\"\n\n#: ../../logging.rst:15\nmsgid \"This can be done by passing it through :meth:`Client.run`:\"\nmsgstr \"これは、 :meth:`Client.run` に渡してください:\"\n\n#: ../../logging.rst:26\nmsgid \"You can also disable the library's logging configuration completely by passing ``None``:\"\nmsgstr \"``None`` を渡して、ライブラリの logging 構成を完全に無効化することもできます。\"\n\n#: ../../logging.rst:33\nmsgid \"Likewise, configuring the log level to ``logging.DEBUG`` is also possible:\"\nmsgstr \"ログレベルを ``logging.DEBUG`` に設定することも可能です:\"\n\n#: ../../logging.rst:44\nmsgid \"This is recommended, especially at verbose levels such as ``DEBUG``, as there are a lot of events logged and it would clog the stderr of your program.\"\nmsgstr \"特に、 ``DEBUG`` といった冗長なイベントレベルを設定している場合、プログラムの標準エラー出力をつまらせてしまう原因になるため、ファイルへの出力が推奨されます。\"\n\n#: ../../logging.rst:46\nmsgid \"If you want the logging configuration the library provides to affect all loggers rather than just the ``discord`` logger, you can pass ``root_logger=True`` inside :meth:`Client.run`:\"\nmsgstr \"\"\n\n#: ../../logging.rst:52\nmsgid \"If you want to setup logging using the library provided configuration without using :meth:`Client.run`, you can use :func:`discord.utils.setup_logging`:\"\nmsgstr \":meth:`Client.run` を使用せずにライブラリ提供の構成を使用して logging を設定したい場合は、 :func:`discord.utils.setup_logging` を使用できます。\"\n\n#: ../../logging.rst:63\nmsgid \"More advanced setups are possible with the :mod:`logging` module. The example below configures a rotating file handler that outputs DEBUG output for everything the library outputs, except for HTTP requests:\"\nmsgstr \":mod:`logging` モジュールを使用するとより高度なセットアップが行えます。以下の例では、HTTPリクエスト以外のすべてのライブラリの出力に対しDEBUG出力を使用するローテーションを行うファイルハンドラを構成します。\"\n\n#: ../../logging.rst:91\nmsgid \"For more information, check the documentation and tutorial of the :mod:`logging` module.\"\nmsgstr \"詳細は、:mod:`logging` モジュールのドキュメントを参照してください。\"\n\n#: ../../logging.rst:95\nmsgid \"The library now provides a default logging configuration.\"\nmsgstr \"ライブラリがデフォルト logging 構成を提供するようになりました。\"\n\n"
  },
  {
    "path": "docs/locale/ja/LC_MESSAGES/migrating.po",
    "content": "msgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: discordpy\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2023-06-21 01:17+0000\\n\"\n\"PO-Revision-Date: 2024-04-17 02:43\\n\"\n\"Last-Translator: \\n\"\n\"Language-Team: Japanese\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Plural-Forms: nplurals=1; plural=0;\\n\"\n\"X-Crowdin-Project: discordpy\\n\"\n\"X-Crowdin-Project-ID: 362783\\n\"\n\"X-Crowdin-Language: ja\\n\"\n\"X-Crowdin-File: migrating.pot\\n\"\n\"X-Crowdin-File-ID: 78\\n\"\n\"Language: ja_JP\\n\"\n\n#: ../../migrating.rst:6\nmsgid \"Migrating to v2.0\"\nmsgstr \"V2.0への移行\"\n\n#: ../../migrating.rst:8\nmsgid \"Compared to v1.0, v2.0 mostly has breaking changes related to better developer experience and API coverage. While the changes aren't as massive to require an entire rewrite, there are still many changes that need to be accounted for.\"\nmsgstr \"v1.0と比較して、v2.0は主に開発のしやすさとAPIの対応に関連する破壊的変更があります。変更はコードすべての書き換えを必要とするほどの大規模なものではありませんが、少し書き換えが必要になる変更は多くあります。\"\n\n#: ../../migrating.rst:12\nmsgid \"Python Version Change\"\nmsgstr \"Pythonのバージョンの変更\"\n\n#: ../../migrating.rst:14\nmsgid \"In order to ease development, maintain security updates, and use newer features **v2.0 drops support for Python 3.7 and earlier**.\"\nmsgstr \"開発を容易にするために、セキュリティ関連の更新を維持するために、また新しい機能を使用するために **v2.0はPython 3.7以前をサポートしなくなりました** 。\"\n\n#: ../../migrating.rst:19\nmsgid \"Removal of Support For User Accounts\"\nmsgstr \"ユーザーアカウント（セルフボット）のサポートの削除\"\n\n#: ../../migrating.rst:21\nmsgid \"Logging on with a user token is against the Discord `Terms of Service <https://support.discord.com/hc/en-us/articles/115002192352>`_ and as such all support for user-only endpoints has been removed.\"\nmsgstr \"ユーザートークンを用いてのログインはDiscordの `利用規約 <https://support.discord.com/hc/en-us/articles/115002192352>`_ に反しているため、ユーザーのみのエンドポイントに対するサポートはすべて削除されました。\"\n\n#: ../../migrating.rst:24\n#: ../../migrating.rst:1165\nmsgid \"The following have been removed:\"\nmsgstr \"以下の機能は削除されました。\"\n\n#: ../../migrating.rst:26\nmsgid \"``bot`` parameter to :meth:`Client.login` and :meth:`Client.start`\"\nmsgstr \":meth:`Client.login` と :meth:`Client.start` の ``bot`` パラメータ\"\n\n#: ../../migrating.rst:27\nmsgid \"``afk`` parameter to :meth:`Client.change_presence`\"\nmsgstr \":meth:`Client.change_presence` の ``afk`` パラメータ\"\n\n#: ../../migrating.rst:28\nmsgid \"``password``, ``new_password``, ``email``, and ``house`` parameters to :meth:`ClientUser.edit`\"\nmsgstr \":meth:`ClientUser.edit` の ``password``, ``new_password``, ``email``, ``house`` パラメータ\"\n\n#: ../../migrating.rst:29\nmsgid \"``CallMessage`` model\"\nmsgstr \"``CallMessage`` モデル\"\n\n#: ../../migrating.rst:30\nmsgid \"``GroupCall`` model\"\nmsgstr \"``GroupCall`` モデル\"\n\n#: ../../migrating.rst:31\nmsgid \"``Profile`` model\"\nmsgstr \"``Profile`` モデル\"\n\n#: ../../migrating.rst:32\nmsgid \"``Relationship`` model\"\nmsgstr \"``Relationship`` モデル\"\n\n#: ../../migrating.rst:33\nmsgid \"``RelationshipType`` enumeration\"\nmsgstr \"列挙型 ``RelationshipType``\"\n\n#: ../../migrating.rst:34\nmsgid \"``HypeSquadHouse`` enumeration\"\nmsgstr \"列挙型 ``HypeSquadHouse``\"\n\n#: ../../migrating.rst:35\nmsgid \"``PremiumType`` enumeration\"\nmsgstr \"列挙型 ``PremiumType``\"\n\n#: ../../migrating.rst:36\nmsgid \"``UserContentFilter`` enumeration\"\nmsgstr \"列挙型 ``UserContentFilter``\"\n\n#: ../../migrating.rst:37\nmsgid \"``FriendFlags`` enumeration\"\nmsgstr \"列挙型 ``FriendFlags``\"\n\n#: ../../migrating.rst:38\nmsgid \"``Theme`` enumeration\"\nmsgstr \"列挙型 ``Theme``\"\n\n#: ../../migrating.rst:39\nmsgid \"``on_relationship_add`` event\"\nmsgstr \"``on_relationship_add`` イベント\"\n\n#: ../../migrating.rst:40\nmsgid \"``on_relationship_remove`` event\"\nmsgstr \"``on_relationship_remove`` イベント\"\n\n#: ../../migrating.rst:41\nmsgid \"``on_relationship_update`` event\"\nmsgstr \"``on_relationship_update`` イベント\"\n\n#: ../../migrating.rst:42\nmsgid \"``Client.fetch_user_profile`` method\"\nmsgstr \"``Client.fetch_user_profile`` メソッド\"\n\n#: ../../migrating.rst:43\nmsgid \"``ClientUser.create_group`` method\"\nmsgstr \"``ClientUser.create_group`` メソッド\"\n\n#: ../../migrating.rst:44\nmsgid \"``ClientUser.edit_settings`` method\"\nmsgstr \"``ClientUser.edit_settings`` メソッド\"\n\n#: ../../migrating.rst:45\nmsgid \"``ClientUser.get_relationship`` method\"\nmsgstr \"``ClientUser.get_relationship`` メソッド\"\n\n#: ../../migrating.rst:46\nmsgid \"``GroupChannel.add_recipients`` method\"\nmsgstr \"``GroupChannel.add_recipients`` メソッド\"\n\n#: ../../migrating.rst:47\nmsgid \"``GroupChannel.remove_recipients`` method\"\nmsgstr \"``GroupChannel.remove_recipients`` メソッド\"\n\n#: ../../migrating.rst:48\nmsgid \"``GroupChannel.edit`` method\"\nmsgstr \"``GroupChannel.edit`` メソッド\"\n\n#: ../../migrating.rst:49\nmsgid \"``Guild.ack`` method\"\nmsgstr \"``Guild.ack`` メソッド\"\n\n#: ../../migrating.rst:50\nmsgid \"``Message.ack`` method\"\nmsgstr \"``Message.ack`` メソッド\"\n\n#: ../../migrating.rst:51\nmsgid \"``User.block`` method\"\nmsgstr \"``User.block`` メソッド\"\n\n#: ../../migrating.rst:52\nmsgid \"``User.is_blocked`` method\"\nmsgstr \"``User.is_blocked`` メソッド\"\n\n#: ../../migrating.rst:53\nmsgid \"``User.is_friend`` method\"\nmsgstr \"``User.is_friend`` メソッド\"\n\n#: ../../migrating.rst:54\nmsgid \"``User.profile`` method\"\nmsgstr \"``User.profile`` メソッド\"\n\n#: ../../migrating.rst:55\nmsgid \"``User.remove_friend`` method\"\nmsgstr \"``User.remove_friend`` メソッド\"\n\n#: ../../migrating.rst:56\nmsgid \"``User.send_friend_request`` method\"\nmsgstr \"``User.send_friend_request`` メソッド\"\n\n#: ../../migrating.rst:57\nmsgid \"``User.unblock`` method\"\nmsgstr \"``User.unblock`` メソッド\"\n\n#: ../../migrating.rst:58\nmsgid \"``ClientUser.blocked`` attribute\"\nmsgstr \"``ClientUser.blocked`` 属性\"\n\n#: ../../migrating.rst:59\nmsgid \"``ClientUser.email`` attribute\"\nmsgstr \"``ClientUser.email`` 属性\"\n\n#: ../../migrating.rst:60\nmsgid \"``ClientUser.friends`` attribute\"\nmsgstr \"``ClientUser.friends`` 属性\"\n\n#: ../../migrating.rst:61\nmsgid \"``ClientUser.premium`` attribute\"\nmsgstr \"``ClientUser.premium`` 属性\"\n\n#: ../../migrating.rst:62\nmsgid \"``ClientUser.premium_type`` attribute\"\nmsgstr \"``ClientUser.premium_type`` 属性\"\n\n#: ../../migrating.rst:63\nmsgid \"``ClientUser.relationships`` attribute\"\nmsgstr \"``ClientUser.relationships`` 属性\"\n\n#: ../../migrating.rst:64\nmsgid \"``Message.call`` attribute\"\nmsgstr \"``Message.call`` 属性\"\n\n#: ../../migrating.rst:65\nmsgid \"``User.mutual_friends`` attribute\"\nmsgstr \"``User.mutual_friends`` 属性\"\n\n#: ../../migrating.rst:66\nmsgid \"``User.relationship`` attribute\"\nmsgstr \"``User.relationship`` 属性\"\n\n#: ../../migrating.rst:71\nmsgid \"asyncio Event Loop Changes\"\nmsgstr \"asyncio イベントループの変更\"\n\n#: ../../migrating.rst:73\nmsgid \"Python 3.7 introduced a new helper function :func:`asyncio.run` which automatically creates and destroys the asynchronous event loop.\"\nmsgstr \"Python 3.7で、自動的に非同期のイベントループを作成し破壊する :func:`asyncio.run` ヘルパー関数が導入されました。\"\n\n#: ../../migrating.rst:75\nmsgid \"In order to support this, the way discord.py handles the :mod:`asyncio` event loop has changed.\"\nmsgstr \"これをサポートするために、discord.pyの :mod:`asyncio` のイベントループの扱い方が変更されました。\"\n\n#: ../../migrating.rst:77\nmsgid \"This allows you to rather than using :meth:`Client.run` create your own asynchronous loop to setup other asynchronous code as needed.\"\nmsgstr \"このため、 :meth:`Client.run` を使用せずに、自分で非同期ループを作成して他の非同期のコードを準備できるようになります。\"\n\n#: ../../migrating.rst:79\n#: ../../migrating.rst:102\n#: ../../migrating.rst:184\n#: ../../migrating.rst:618\n#: ../../migrating.rst:707\nmsgid \"Quick example:\"\nmsgstr \"簡単な例:\"\n\n#: ../../migrating.rst:95\nmsgid \"A new :meth:`~Client.setup_hook` method has also been added to the :class:`Client` class. This method is called after login but before connecting to the discord gateway.\"\nmsgstr \":class:`Client` クラスに :meth:`~Client.setup_hook` メソッドが追加されました。このメソッドはログイン後、Discordゲートウェイに接続前に呼び出されます。\"\n\n#: ../../migrating.rst:98\nmsgid \"It is intended to be used to setup various bot features in an asynchronous context.\"\nmsgstr \"これは、非同期コンテキストで様々なボットの機能を準備するために使用することを意図しています。\"\n\n#: ../../migrating.rst:100\nmsgid \":meth:`~Client.setup_hook` can be defined by subclassing the :class:`Client` class.\"\nmsgstr \":meth:`~Client.setup_hook` は :class:`Client` をサブクラス化して定義できます。\"\n\n#: ../../migrating.rst:113\nmsgid \"With this change, constructor of :class:`Client` no longer accepts ``connector`` and ``loop`` parameters.\"\nmsgstr \"この変更により、 :class:`Client` のコンストラクタは ``connector`` と ``loop`` パラメータを受け付けなくなりました。\"\n\n#: ../../migrating.rst:115\nmsgid \"In parallel with this change, changes were made to loading and unloading of commands extension extensions and cogs, see :ref:`migrating_2_0_commands_extension_cog_async` for more information.\"\nmsgstr \"これらとともに、コマンド拡張機能のエクステンションやコグの読み込みと読み込み解除にも変更がありました。 :ref:`migrating_2_0_commands_extension_cog_async` を参照してください。\"\n\n#: ../../migrating.rst:119\nmsgid \"Intents Are Now Required\"\nmsgstr \"インテントの必須化\"\n\n#: ../../migrating.rst:121\nmsgid \"In earlier versions, the ``intents`` keyword argument was optional and defaulted to :meth:`Intents.default`. In order to better educate users on their intents and to also make it more explicit, this parameter is now required to pass in.\"\nmsgstr \"以前のバージョンでは、``intents`` キーワード引数は省略可能で、デフォルトで :meth:`Intents.default` に指定されていました。 ユーザーにインテントを教え、より明示的にするために、このパラメータを必須にしました。\"\n\n#: ../../migrating.rst:123\nmsgid \"For example:\"\nmsgstr \"例：\"\n\n#: ../../migrating.rst:134\nmsgid \"This change applies to **all** subclasses of :class:`Client`.\"\nmsgstr \"この変更は、 :class:`Client` の **すべての** サブクラスに適用されます。\"\n\n#: ../../migrating.rst:136\nmsgid \":class:`AutoShardedClient`\"\nmsgstr \":class:`AutoShardedClient`\"\n\n#: ../../migrating.rst:137\nmsgid \":class:`~discord.ext.commands.Bot`\"\nmsgstr \":class:`~discord.ext.commands.Bot`\"\n\n#: ../../migrating.rst:138\nmsgid \":class:`~discord.ext.commands.AutoShardedBot`\"\nmsgstr \":class:`~discord.ext.commands.AutoShardedBot`\"\n\n#: ../../migrating.rst:142\nmsgid \"Abstract Base Classes Changes\"\nmsgstr \"抽象基底クラスの変更\"\n\n#: ../../migrating.rst:144\nmsgid \":ref:`discord_api_abcs` that inherited from :class:`abc.ABCMeta` now inherit from :class:`typing.Protocol`.\"\nmsgstr \":ref:`discord_api_abcs` は :class:`abc.ABCMeta` を継承していましたが、 :class:`typing.Protocol` を継承するようになりました。\"\n\n#: ../../migrating.rst:146\nmsgid \"This results in a change of the base metaclass used by these classes but this should generally be completely transparent to the user.\"\nmsgstr \"これにより、これらのクラスが使用する基幹メタクラスが変更されますが、一般的にこの変更はユーザーに対して完全に透過的であるべきです。\"\n\n#: ../../migrating.rst:149\nmsgid \"All of the classes are either :func:`runtime-checkable <typing.runtime_checkable>` protocols or explicitly inherited from and as such usage with :func:`isinstance` and :func:`issubclass` is not affected.\"\nmsgstr \"すべてのクラスは :func:`runtime-checkable <typing.runtime_checkable>` プロトコルであるか明示的に継承されているので、 :func:`isinstance` や :func:`issubclass` の使用には影響を与えません。\"\n\n#: ../../migrating.rst:152\nmsgid \"The following have been changed to :func:`runtime-checkable <typing.runtime_checkable>` :class:`~typing.Protocol`\\\\s:\"\nmsgstr \"以下のクラスは :func:`runtime-checkable <typing.runtime_checkable>` な :class:`~typing.Protocol` に変更されました:\"\n\n#: ../../migrating.rst:154\nmsgid \":class:`abc.Snowflake`\"\nmsgstr \":class:`abc.Snowflake`\"\n\n#: ../../migrating.rst:155\nmsgid \":class:`abc.User`\"\nmsgstr \":class:`abc.User`\"\n\n#: ../../migrating.rst:157\nmsgid \"The following have been changed to subclass :class:`~typing.Protocol`:\"\nmsgstr \"以下のクラスは :class:`~typing.Protocol` のサブクラスに変更されました:\"\n\n#: ../../migrating.rst:159\nmsgid \":class:`abc.GuildChannel`\"\nmsgstr \":class:`abc.GuildChannel`\"\n\n#: ../../migrating.rst:160\nmsgid \":class:`abc.Connectable`\"\nmsgstr \":class:`abc.Connectable`\"\n\n#: ../../migrating.rst:162\nmsgid \"The following have been changed to use the default metaclass instead of :class:`abc.ABCMeta`:\"\nmsgstr \"以下のクラスは :class:`abc.ABCMeta` の代わりにデフォルトのメタクラスを使用するよう変更されました:\"\n\n#: ../../migrating.rst:164\nmsgid \":class:`abc.Messageable`\"\nmsgstr \":class:`abc.Messageable`\"\n\n#: ../../migrating.rst:165\nmsgid \":class:`abc.PrivateChannel`\"\nmsgstr \":class:`abc.PrivateChannel`\"\n\n#: ../../migrating.rst:168\nmsgid \"``datetime`` Objects Are Now UTC-Aware\"\nmsgstr \"``datetime`` オブジェクトはUTC-Awareに\"\n\n#: ../../migrating.rst:170\nmsgid \"All usage of naive :class:`datetime.datetime` objects in the library has been replaced with aware objects using UTC timezone. Methods that accepted naive :class:`~datetime.datetime` objects now also accept timezone-aware objects. To keep behavior inline with :class:`~datetime.datetime`'s methods, this library's methods now assume that naive :class:`~datetime.datetime` objects are local time (note that some of the methods may not accept naive :class:`~datetime.datetime`, such exceptions are listed below).\"\nmsgstr \"ライブラリ内でのnaiveな :class:`datetime.datetime` オブジェクトはUTCタイムゾーンを使用したawareなものへ置き換えられました。naiveな :class:`~datetime.datetime` オブジェクトを受け取るメソッドは、 timezone-awareなオブジェクトも受け取るようになりました。 :class:`~datetime.datetime` のメソッドと同じように動作するよう、このライブラリのメソッドは naiveな :class:`~datetime.datetime` オブジェクトがローカルタイムを表すものと仮定するようになりました。（いくつかのメソッドは naiveな :class:`~datetime.datetime` を受け入れないことに注意してください。そのような例外は下に記載してあります。）\"\n\n#: ../../migrating.rst:176\nmsgid \"Because naive :class:`~datetime.datetime` objects are treated by many of its methods as local times, the previous behavior was more likely to result in programming errors with their usage.\"\nmsgstr \"naiveな :class:`~datetime.datetime` が多くのメソッドからローカルタイムを表すものとして扱われるため、従来の動作では使用時にプログラムのエラーを引き起こす可能性が高かったのです。\"\n\n#: ../../migrating.rst:179\nmsgid \"To ease the migration, :func:`utils.utcnow` helper function has been added.\"\nmsgstr \"移行を用意にするため、 :func:`utils.utcnow` ヘルパー関数が追加されました。\"\n\n#: ../../migrating.rst:182\nmsgid \"Using :meth:`datetime.datetime.utcnow` can be problematic since it returns a naive UTC ``datetime`` object.\"\nmsgstr \":meth:`datetime.datetime.utcnow` を使用するとnaiveな UTC ``datetime`` オブジェクトが返されるため、問題が発生します。\"\n\n#: ../../migrating.rst:201\nmsgid \"The following have been changed from naive to aware :class:`~datetime.datetime` objects in UTC:\"\nmsgstr \"以下はnaiveな :class:`~datetime.datetime` から UTC-awareなものへ変更されました:\"\n\n#: ../../migrating.rst:203\nmsgid \":attr:`AuditLogEntry.created_at` attribute\"\nmsgstr \":attr:`AuditLogEntry.created_at` 属性\"\n\n#: ../../migrating.rst:204\nmsgid \":attr:`BaseActivity.created_at` attribute\"\nmsgstr \":attr:`BaseActivity.created_at` 属性\"\n\n#: ../../migrating.rst:205\nmsgid \":attr:`ClientUser.created_at` attribute\"\nmsgstr \":attr:`ClientUser.created_at` 属性\"\n\n#: ../../migrating.rst:206\nmsgid \":attr:`DMChannel.created_at` attribute\"\nmsgstr \":attr:`DMChannel.created_at` 属性\"\n\n#: ../../migrating.rst:207\nmsgid \":attr:`Emoji.created_at` attribute\"\nmsgstr \":attr:`Emoji.created_at` 属性\"\n\n#: ../../migrating.rst:208\nmsgid \":attr:`GroupChannel.created_at` attribute\"\nmsgstr \":attr:`GroupChannel.created_at` 属性\"\n\n#: ../../migrating.rst:209\nmsgid \":attr:`Guild.created_at` attribute\"\nmsgstr \":attr:`Guild.created_at` 属性\"\n\n#: ../../migrating.rst:210\nmsgid \":attr:`abc.GuildChannel.created_at` attribute\"\nmsgstr \":attr:`abc.GuildChannel.created_at` 属性\"\n\n#: ../../migrating.rst:211\nmsgid \":attr:`Invite.created_at` attribute\"\nmsgstr \":attr:`Invite.created_at` 属性\"\n\n#: ../../migrating.rst:212\nmsgid \":attr:`Object.created_at` attribute\"\nmsgstr \":attr:`Object.created_at` 属性\"\n\n#: ../../migrating.rst:213\nmsgid \":attr:`Member.created_at` attribute\"\nmsgstr \":attr:`Member.created_at` 属性\"\n\n#: ../../migrating.rst:214\nmsgid \":attr:`Message.created_at` attribute\"\nmsgstr \":attr:`Message.created_at` 属性\"\n\n#: ../../migrating.rst:215\nmsgid \":attr:`PartialEmoji.created_at` attribute\"\nmsgstr \":attr:`PartialEmoji.created_at` 属性\"\n\n#: ../../migrating.rst:216\nmsgid \":attr:`PartialInviteChannel.created_at` attribute\"\nmsgstr \":attr:`PartialInviteChannel.created_at` 属性\"\n\n#: ../../migrating.rst:217\nmsgid \":attr:`PartialInviteGuild.created_at` attribute\"\nmsgstr \":attr:`PartialInviteGuild.created_at` 属性\"\n\n#: ../../migrating.rst:218\nmsgid \":attr:`PartialMessage.created_at` attribute\"\nmsgstr \":attr:`PartialMessage.created_at` 属性\"\n\n#: ../../migrating.rst:219\nmsgid \":attr:`Role.created_at` attribute\"\nmsgstr \":attr:`Role.created_at` 属性\"\n\n#: ../../migrating.rst:220\nmsgid \":attr:`Spotify.created_at` attribute\"\nmsgstr \":attr:`Spotify.created_at` 属性\"\n\n#: ../../migrating.rst:221\nmsgid \":attr:`Sticker.created_at` attribute\"\nmsgstr \":attr:`Sticker.created_at` 属性\"\n\n#: ../../migrating.rst:222\nmsgid \":attr:`TeamMember.created_at` attribute\"\nmsgstr \":attr:`TeamMember.created_at` 属性\"\n\n#: ../../migrating.rst:223\nmsgid \":attr:`Template.created_at` attribute\"\nmsgstr \":attr:`Template.created_at` 属性\"\n\n#: ../../migrating.rst:224\nmsgid \":attr:`User.created_at` attribute\"\nmsgstr \":attr:`User.created_at` 属性\"\n\n#: ../../migrating.rst:225\nmsgid \":attr:`Webhook.created_at` attribute\"\nmsgstr \":attr:`Webhook.created_at` 属性\"\n\n#: ../../migrating.rst:226\nmsgid \":attr:`Widget.created_at` attribute\"\nmsgstr \":attr:`Widget.created_at` 属性\"\n\n#: ../../migrating.rst:227\nmsgid \":attr:`WidgetChannel.created_at` attribute\"\nmsgstr \":attr:`WidgetChannel.created_at` 属性\"\n\n#: ../../migrating.rst:228\nmsgid \":attr:`WidgetMember.created_at` attribute\"\nmsgstr \":attr:`WidgetMember.created_at` 属性\"\n\n#: ../../migrating.rst:229\nmsgid \":attr:`Message.edited_at` attribute\"\nmsgstr \":attr:`Message.edited_at` 属性\"\n\n#: ../../migrating.rst:230\nmsgid \":attr:`Invite.expires_at` attribute\"\nmsgstr \":attr:`Invite.expires_at` 属性\"\n\n#: ../../migrating.rst:231\nmsgid \":attr:`Activity.end` attribute\"\nmsgstr \":attr:`Activity.end` 属性\"\n\n#: ../../migrating.rst:232\nmsgid \":attr:`Game.end` attribute\"\nmsgstr \":attr:`Game.end` 属性\"\n\n#: ../../migrating.rst:233\nmsgid \":attr:`Spotify.end` attribute\"\nmsgstr \":attr:`Spotify.end` 属性\"\n\n#: ../../migrating.rst:234\nmsgid \":attr:`Member.joined_at` attribute\"\nmsgstr \":attr:`Member.joined_at` 属性\"\n\n#: ../../migrating.rst:235\nmsgid \":attr:`Member.premium_since` attribute\"\nmsgstr \":attr:`Member.premium_since` 属性\"\n\n#: ../../migrating.rst:236\nmsgid \":attr:`VoiceState.requested_to_speak_at` attribute\"\nmsgstr \":attr:`VoiceState.requested_to_speak_at` 属性\"\n\n#: ../../migrating.rst:237\nmsgid \":attr:`Activity.start` attribute\"\nmsgstr \":attr:`Activity.start` 属性\"\n\n#: ../../migrating.rst:238\nmsgid \":attr:`Game.start` attribute\"\nmsgstr \":attr:`Game.start` 属性\"\n\n#: ../../migrating.rst:239\nmsgid \":attr:`Spotify.start` attribute\"\nmsgstr \":attr:`Spotify.start` 属性\"\n\n#: ../../migrating.rst:240\nmsgid \":attr:`StreamIntegration.synced_at` attribute\"\nmsgstr \":attr:`StreamIntegration.synced_at` 属性\"\n\n#: ../../migrating.rst:241\nmsgid \":attr:`Embed.timestamp` attribute\"\nmsgstr \":attr:`Embed.timestamp` 属性\"\n\n#: ../../migrating.rst:242\nmsgid \":attr:`Template.updated_at` attribute\"\nmsgstr \":attr:`Template.updated_at` 属性\"\n\n#: ../../migrating.rst:243\nmsgid \"``timestamp`` parameter in :func:`on_typing` event\"\nmsgstr \":func:`on_typing` イベントの ``timestamp`` 引数\"\n\n#: ../../migrating.rst:244\nmsgid \"``last_pin`` parameter in :func:`on_private_channel_pins_update` event\"\nmsgstr \":func:`on_private_channel_pins_update` イベントの ``last_pin`` 引数\"\n\n#: ../../migrating.rst:245\nmsgid \"``last_pin`` parameter in :func:`on_guild_channel_pins_update` event\"\nmsgstr \":func:`on_guild_channel_pins_update` イベントの ``last_pin`` 引数\"\n\n#: ../../migrating.rst:246\nmsgid \"Return type of :func:`utils.snowflake_time`\"\nmsgstr \":func:`utils.snowflake_time` の戻り値\"\n\n#: ../../migrating.rst:248\nmsgid \"The following now accept aware :class:`~datetime.datetime` and assume that if the passed :class:`~datetime.datetime` is naive, it is a local time:\"\nmsgstr \"以下はawareな :class:`~datetime.datetime` を受け入れ、渡された :class:`~datetime.datetime` がnaiveであればそれをローカルタイムを表すものと仮定するようになりました:\"\n\n#: ../../migrating.rst:250\nmsgid \":meth:`abc.Messageable.history` method\"\nmsgstr \":meth:`abc.Messageable.history` メソッド\"\n\n#: ../../migrating.rst:251\nmsgid \":meth:`Client.fetch_guilds` method\"\nmsgstr \":meth:`Client.fetch_guilds` メソッド\"\n\n#: ../../migrating.rst:252\nmsgid \":meth:`Guild.audit_logs` method\"\nmsgstr \":meth:`Guild.audit_logs` メソッド\"\n\n#: ../../migrating.rst:253\nmsgid \":meth:`Guild.fetch_members` method\"\nmsgstr \":meth:`Guild.fetch_members` メソッド\"\n\n#: ../../migrating.rst:254\nmsgid \":meth:`TextChannel.purge` method\"\nmsgstr \":meth:`TextChannel.purge` メソッド\"\n\n#: ../../migrating.rst:255\nmsgid \":attr:`Embed` constructor\"\nmsgstr \":attr:`Embed` のコンストラクタ\"\n\n#: ../../migrating.rst:256\nmsgid \":attr:`Embed.timestamp` property setter\"\nmsgstr \":attr:`Embed.timestamp` プロパティのセッター\"\n\n#: ../../migrating.rst:257\nmsgid \":func:`utils.sleep_until` function\"\nmsgstr \":func:`utils.sleep_until` 関数\"\n\n#: ../../migrating.rst:258\nmsgid \":func:`utils.time_snowflake` function\"\nmsgstr \":func:`utils.time_snowflake` 関数\"\n\n#: ../../migrating.rst:260\nmsgid \"Currently, there's only one place in this library that doesn't accept naive :class:`datetime.datetime` objects:\"\nmsgstr \"今のところ、このライブラリにはnaiveな :class:`datetime.datetime` オブジェクトを受け入れない場所は１つしかありません:\"\n\n#: ../../migrating.rst:262\nmsgid \"``timed_out_until`` parameter in :meth:`Member.edit`\"\nmsgstr \":meth:`Member.edit` の ``timed_out_until`` 引数\"\n\n#: ../../migrating.rst:264\nmsgid \"This has been done to prevent users from mistakenly applying incorrect timeouts to guild members.\"\nmsgstr \"これはユーザーがギルドメンバーに誤ったタイムアウトを適用することを防ぐために行われました。\"\n\n#: ../../migrating.rst:267\nmsgid \"Major Webhook Changes\"\nmsgstr \"主なWebhookの変更\"\n\n#: ../../migrating.rst:269\nmsgid \"Webhook support has been rewritten to work better with typings and rate limits.\"\nmsgstr \"Webhookのサポートは、タイピングとレート制限でより良い動作をするように書き換えられています。\"\n\n#: ../../migrating.rst:271\nmsgid \"As a result, synchronous functionality has been split to separate classes.\"\nmsgstr \"その結果、同期的な機能は個別のクラスへと分割されました。\"\n\n#: ../../migrating.rst:273\nmsgid \"Quick example for asynchronous webhooks:\"\nmsgstr \"非同期的なWebhookの簡単な例:\"\n\n#: ../../migrating.rst:287\nmsgid \"Quick example for synchronous webhooks:\"\nmsgstr \"同期的なWebhookの簡単な例:\"\n\n#: ../../migrating.rst:299\n#: ../../migrating.rst:668\n#: ../../migrating.rst:692\nmsgid \"The following breaking changes have been made:\"\nmsgstr \"以下の破壊的変更が行われました。\"\n\n#: ../../migrating.rst:301\nmsgid \"Synchronous functionality of :class:`Webhook` and :class:`WebhookMessage` has been split to :class:`SyncWebhook` and :class:`SyncWebhookMessage`.\"\nmsgstr \":class:`Webhook` と :class:`WebhookMessage` の同期的な機能が :class:`Webhook` と :class:`WebhookMessage` に分離されました。\"\n\n#: ../../migrating.rst:303\nmsgid \"``WebhookAdapter`` class has been removed and the interfaces based on it (``AsyncWebhookAdapter`` and ``RequestsWebhookAdapter``) are now considered implementation detail and should not be depended on.\"\nmsgstr \"``WebhookAdapter`` クラスが削除され、それに基づくインターフェイス（ ``WebhookAdapter`` と ``RequestsWebhookAdapter`` ）は実装の詳細とみなされるようになりました。これらに依存してはいけません。\"\n\n#: ../../migrating.rst:305\nmsgid \"``execute`` alias for :meth:`Webhook.send`/:meth:`SyncWebhook.send` has been removed.\"\nmsgstr \":meth:`Webhook.send` / :meth:`SyncWebhook.send` の ``execute`` エイリアスが削除されました。\"\n\n#: ../../migrating.rst:308\nmsgid \"Asset Redesign and Changes\"\nmsgstr \"Assetのリデザインと変更\"\n\n#: ../../migrating.rst:310\nmsgid \"The :class:`Asset` object now encompasses all of the methods and attributes related to a CDN asset.\"\nmsgstr \":class:`Asset` オブジェクトにCDNアセットに関連する全てのメソッドと属性が含まれるようになりました。\"\n\n#: ../../migrating.rst:312\nmsgid \"This means that all models with asset-related attribute and methods have been transformed to use this new design. As an example, here's how these changes look for :attr:`Guild.icon` (of :class:`Asset` type):\"\nmsgstr \"これはアセット関連の属性とメソッドを持つ全てのモデルがこの新しいデザインを使用するように変えられたことを意味します。例として、（ :class:`Asset` 型の） :attr:`Guild.icon` がどのように変更されたかを以下に示します:\"\n\n#: ../../migrating.rst:315\nmsgid \"``Guild.icon`` (of :class:`str` type) has been replaced with :attr:`Guild.icon.key <Asset.key>`.\"\nmsgstr \"``Guild.icon`` （ :class:`str` 型）は :attr:`Guild.icon.key <Asset.key>` に置き換えられました。\"\n\n#: ../../migrating.rst:316\nmsgid \"``Guild.is_icon_animated`` has been replaced with :meth:`Guild.icon.is_animated <Asset.is_animated>`.\"\nmsgstr \"``Guild.is_icon_animated`` は :meth:`Guild.icon.is_animated <Asset.is_animated>` に置き換えられました。\"\n\n#: ../../migrating.rst:317\nmsgid \"``Guild.icon_url`` has been replaced with :attr:`Guild.icon`.\"\nmsgstr \"``Guild.icon_url`` は :attr:`Guild.icon` に置き換えられました。\"\n\n#: ../../migrating.rst:318\nmsgid \"``Guild.icon_url_as`` has been replaced with :meth:`Guild.icon.replace <Asset.replace>`.\"\nmsgstr \"``Guild.icon_url_as`` は :meth:`Guild.icon.replace <Asset.replace>` に置き換えられました。\"\n\n#: ../../migrating.rst:320\nmsgid \"Helper methods :meth:`Asset.with_size`, :meth:`Asset.with_format`, and :meth:`Asset.with_static_format` have also been added.\"\nmsgstr \":meth:`Asset.with_size` 、 :meth:`Asset.with_format` 、 :meth:`Asset.with_static_format` ヘルパーメソッドも追加されました。\"\n\n#: ../../migrating.rst:322\nmsgid \"In addition to this, :class:`Emoji` and :class:`PartialEmoji` now also share an interface similar to :class:`Asset`'s:\"\nmsgstr \"これに加えて、 :class:`Emoji` と :class:`PartialEmoji` も :class:`Asset` のようなインターフェイスを共有するようになりました。\"\n\n#: ../../migrating.rst:324\n#: ../../migrating.rst:363\nmsgid \":attr:`Emoji.url` is now of :class:`str` type.\"\nmsgstr \":attr:`Emoji.url` は :class:`str` 型になりました。\"\n\n#: ../../migrating.rst:325\n#: ../../migrating.rst:364\nmsgid \"``Emoji.url_as`` has been removed.\"\nmsgstr \"``Emoji.url_as`` は削除されました。\"\n\n#: ../../migrating.rst:326\nmsgid \"``Emoji.url.read`` has been replaced with :meth:`Emoji.read`.\"\nmsgstr \"``Emoji.url.read`` は :meth:`Emoji.read` に置き換えられました。\"\n\n#: ../../migrating.rst:327\nmsgid \"``Emoji.url.save`` has been replaced with :meth:`Emoji.save`.\"\nmsgstr \"``Emoji.url.save`` は :meth:`Emoji.save` に置き換えられました。\"\n\n#: ../../migrating.rst:329\nmsgid \":class:`Asset` now always represent an actually existing CDN asset. This means that:\"\nmsgstr \":class:`Asset` は実際に存在するCDNアセットを常に表すようになりました。 つまり:\"\n\n#: ../../migrating.rst:331\nmsgid \"``str(x)`` on an :class:`Asset` can no longer return an empty string.\"\nmsgstr \":class:`Asset` の ``str(x)`` は空の文字列を返せなくなりました。\"\n\n#: ../../migrating.rst:332\nmsgid \"``bool(x)`` on an :class:`Asset` can no longer return ``False``.\"\nmsgstr \":class:`Asset` の ``bool(x)`` は ``False`` を返せなくなりました。\"\n\n#: ../../migrating.rst:333\nmsgid \"Attributes containing an optional :class:`Asset` can now be ``None``.\"\nmsgstr \"Optionalな :class:`Asset` を含む属性は ``None`` になることがあります。\"\n\n#: ../../migrating.rst:335\nmsgid \"The following were affected by this change:\"\nmsgstr \"以下がこの影響を受けました:\"\n\n#: ../../migrating.rst:337\nmsgid \":attr:`AppInfo.cover_image`\"\nmsgstr \":attr:`AppInfo.cover_image`\"\n\n#: ../../migrating.rst:339\nmsgid \"``AppInfo.cover_image`` (replaced by :attr:`AppInfo.cover_image.key <Asset.key>`)\"\nmsgstr \"``AppInfo.cover_image`` （ :attr:`AppInfo.cover_image.key <Asset.key>` に置き換えられました）\"\n\n#: ../../migrating.rst:340\nmsgid \"``AppInfo.cover_image_url`` (replaced by :attr:`AppInfo.cover_image`)\"\nmsgstr \"``AppInfo.cover_image_url`` （ :attr:`AppInfo.cover_image` に置き換えられました）\"\n\n#: ../../migrating.rst:342\n#: ../../migrating.rst:351\n#: ../../migrating.rst:373\n#: ../../migrating.rst:382\n#: ../../migrating.rst:391\nmsgid \"The new attribute may now be ``None``.\"\nmsgstr \"新しい属性は ``None`` になることがあります。\"\n\n#: ../../migrating.rst:344\nmsgid \"``AppInfo.cover_image_url_as`` (replaced by :meth:`AppInfo.cover_image.replace <Asset.replace>`)\"\nmsgstr \"``AppInfo.cover_image_url_as`` （ :meth:`AppInfo.cover_image.replace <Asset.replace>` へ置き換えられました）\"\n\n#: ../../migrating.rst:346\nmsgid \":attr:`AppInfo.icon`\"\nmsgstr \":attr:`AppInfo.icon`\"\n\n#: ../../migrating.rst:348\nmsgid \"``AppInfo.icon`` (replaced by :attr:`AppInfo.icon.key <Asset.key>`)\"\nmsgstr \"``AppInfo.icon`` （ :attr:`AppInfo.icon.key <Asset.key>` に置き換えられました）\"\n\n#: ../../migrating.rst:349\nmsgid \"``AppInfo.icon_url`` (replaced by :attr:`AppInfo.icon`)\"\nmsgstr \"``AppInfo.icon_url`` （ :attr:`AppInfo.icon` に置き換えられました）\"\n\n#: ../../migrating.rst:353\nmsgid \"``AppInfo.icon_url_as`` (replaced by :meth:`AppInfo.icon.replace <Asset.replace>`)\"\nmsgstr \"``AppInfo.icon_url_as`` （ :meth:`AppInfo.icon.replace <Asset.replace>` に置き換えられました）\"\n\n#: ../../migrating.rst:355\nmsgid \":class:`AuditLogDiff`\"\nmsgstr \":class:`AuditLogDiff`\"\n\n#: ../../migrating.rst:357\nmsgid \":attr:`AuditLogDiff.avatar` is now of :class:`Asset` type.\"\nmsgstr \":attr:`AuditLogDiff.avatar` は :class:`Asset` 型になりました。\"\n\n#: ../../migrating.rst:358\nmsgid \":attr:`AuditLogDiff.icon` is now of :class:`Asset` type.\"\nmsgstr \":attr:`AuditLogDiff.icon` は :class:`Asset` 型になりました。\"\n\n#: ../../migrating.rst:359\nmsgid \":attr:`AuditLogDiff.splash` is now of :class:`Asset` type.\"\nmsgstr \":attr:`AuditLogDiff.splash` は :class:`Asset` 型になりました。\"\n\n#: ../../migrating.rst:361\nmsgid \":attr:`Emoji.url`\"\nmsgstr \":attr:`Emoji.url`\"\n\n#: ../../migrating.rst:365\nmsgid \"``Emoji.url.read`` (replaced by :meth:`Emoji.read`)\"\nmsgstr \"``Emoji.url.read`` （ :meth:`Emoji.read` に置き換えられました）\"\n\n#: ../../migrating.rst:366\nmsgid \"``Emoji.url.save`` (replaced by :meth:`Emoji.save`)\"\nmsgstr \"``Emoji.url.save`` （ :meth:`Emoji.save` に置き換えられました）\"\n\n#: ../../migrating.rst:368\nmsgid \":attr:`GroupChannel.icon`\"\nmsgstr \":attr:`GroupChannel.icon`\"\n\n#: ../../migrating.rst:370\nmsgid \"``GroupChannel.icon`` (replaced by :attr:`GroupChannel.icon.key <Asset.key>`)\"\nmsgstr \"``GroupChannel.icon`` （ :attr:`GroupChannel.icon.key <Asset.key>` に置き換えられました）\"\n\n#: ../../migrating.rst:371\nmsgid \"``GroupChannel.icon_url`` (replaced by :attr:`GroupChannel.icon`)\"\nmsgstr \"``GroupChannel.icon_url`` （ :attr:`GroupChannel.icon` に置き換えられました）\"\n\n#: ../../migrating.rst:375\nmsgid \"``GroupChannel.icon_url_as`` (replaced by :meth:`GroupChannel.icon.replace <Asset.replace>`)\"\nmsgstr \"``GroupChannel.icon_url_as`` （ :meth:`GroupChannel.icon.replace <Asset.replace>` に置き換えられました）\"\n\n#: ../../migrating.rst:377\nmsgid \":attr:`Guild.banner`\"\nmsgstr \":attr:`Guild.banner`\"\n\n#: ../../migrating.rst:379\nmsgid \"``Guild.banner`` (replaced by :attr:`Guild.banner.key <Asset.key>`)\"\nmsgstr \"``Guild.banner`` （ :attr:`Guild.banner.key <Asset.key>` に置き換えられました）\"\n\n#: ../../migrating.rst:380\nmsgid \"``Guild.banner_url`` (replaced by :attr:`Guild.banner`)\"\nmsgstr \"``Guild.banner_url`` （ :attr:`Guild.banner` に置き換えられました）\"\n\n#: ../../migrating.rst:384\nmsgid \"``Guild.banner_url_as`` (replaced by :meth:`Guild.banner.replace <Asset.replace>`)\"\nmsgstr \"``Guild.banner_url_as`` （ :meth:`Guild.banner.replace <Asset.replace>` に置き換えられました）\"\n\n#: ../../migrating.rst:386\nmsgid \":attr:`Guild.discovery_splash`\"\nmsgstr \":attr:`Guild.discovery_splash`\"\n\n#: ../../migrating.rst:388\nmsgid \"``Guild.discovery_splash`` (replaced by :attr:`Guild.discovery_splash.key <Asset.key>`)\"\nmsgstr \"``Guild.discovery_splash`` （ :attr:`Guild.discovery_splash.key <Asset.key>` に置き換えられました）\"\n\n#: ../../migrating.rst:389\nmsgid \"``Guild.discovery_splash_url`` (replaced by :attr:`Guild.discovery_splash`)\"\nmsgstr \"``Guild.discovery_splash_url`` （ :attr:`Guild.discovery_splash` に置き換えられました）\"\n\n#: ../../migrating.rst:393\nmsgid \"``Guild.discovery_splash_url_as`` (replaced by :meth:`Guild.discovery_splash.replace <Asset.replace>`)\"\nmsgstr \"``Guild.discovery_splash_url_as`` （ :meth:`Guild.discovery_splash.replace <Asset.replace>` に置き換えられました）\"\n\n#: ../../migrating.rst:395\nmsgid \":attr:`Guild.icon`\"\nmsgstr \":attr:`Guild.icon`\"\n\n#: ../../migrating.rst:397\nmsgid \"``Guild.icon`` (replaced by :attr:`Guild.icon.key <Asset.key>`)\"\nmsgstr \"``Guild.icon`` （ :attr:`Guild.icon.key <Asset.key>` に置き換えられました）\"\n\n#: ../../migrating.rst:398\nmsgid \"``Guild.is_icon_animated`` (replaced by :meth:`Guild.icon.is_animated <Asset.is_animated>`)\"\nmsgstr \"``Guild.is_icon_animated`` （ :meth:`Guild.icon.is_animated <Asset.is_animated>` に置き換えられました）\"\n\n#: ../../migrating.rst:399\nmsgid \"``Guild.icon_url`` (replaced by :attr:`Guild.icon`)\"\nmsgstr \"``Guild.icon_url`` （ :attr:`Guild.icon` に置き換えられました）\"\n\n#: ../../migrating.rst:403\nmsgid \"``Guild.icon_url_as`` (replaced by :meth:`Guild.icon.replace <Asset.replace>`)\"\nmsgstr \"``Guild.icon_url_as`` （ :meth:`Guild.icon.replace <Asset.replace>` に置き換えられました）\"\n\n#: ../../migrating.rst:405\nmsgid \":attr:`Guild.splash`\"\nmsgstr \":attr:`Guild.splash`\"\n\n#: ../../migrating.rst:407\nmsgid \"``Guild.splash`` (replaced by :attr:`Guild.splash.key <Asset.key>`)\"\nmsgstr \"``Guild.splash`` （ :attr:`Guild.splash.key <Asset.key>` に置き換えられました）\"\n\n#: ../../migrating.rst:408\nmsgid \"``Guild.splash_url`` (replaced by :attr:`Guild.splash`)\"\nmsgstr \"``Guild.splash_url`` （ :attr:`Guild.splash` に置き換えられました）\"\n\n#: ../../migrating.rst:412\nmsgid \"``Guild.splash_url_as`` (replaced by :meth:`Guild.splash.replace <Asset.replace>`)\"\nmsgstr \"``Guild.splash_url_as`` （ :meth:`Guild.splash.replace <Asset.replace>` に置き換えられました）\"\n\n#: ../../migrating.rst:414\nmsgid \":attr:`Member.avatar`\"\nmsgstr \":attr:`Member.avatar`\"\n\n#: ../../migrating.rst:416\nmsgid \"``Member.avatar`` (replaced by :attr:`Member.avatar.key <Asset.key>`)\"\nmsgstr \"``Member.avatar`` （ :attr:`Member.avatar.key <Asset.key>` に置き換えられました）\"\n\n#: ../../migrating.rst:417\nmsgid \"``Member.is_avatar_animated`` (replaced by :meth:`Member.avatar.is_animated <Asset.is_animated>`)\"\nmsgstr \"``Member.is_avatar_animated`` （ :meth:`Member.avatar.is_animated <Asset.is_animated>` に置き換えられました）\"\n\n#: ../../migrating.rst:418\nmsgid \"``Member.avatar_url`` (replaced by :attr:`Member.avatar`)\"\nmsgstr \"``Member.avatar_url`` （ :attr:`Member.avatar` に置き換えられました）\"\n\n#: ../../migrating.rst:422\nmsgid \"``Member.avatar_url_as`` (replaced by :meth:`Member.avatar.replace <Asset.replace>`)\"\nmsgstr \"``Member.avatar_url_as`` （ :meth:`Member.avatar.replace <Asset.replace>` に置き換えられました）\"\n\n#: ../../migrating.rst:424\nmsgid \":attr:`Member.default_avatar`\"\nmsgstr \":attr:`Member.default_avatar`\"\n\n#: ../../migrating.rst:426\nmsgid \"``Member.default_avatar`` (replaced by :attr:`Member.default_avatar.key <Asset.key>`)\"\nmsgstr \"``Member.default_avatar`` （ :attr:`Member.default_avatar.key <Asset.key>` に置き換えられました）\"\n\n#: ../../migrating.rst:427\nmsgid \"``Member.default_avatar_url`` (replaced by :attr:`Member.default_avatar`)\"\nmsgstr \"``Member.default_avatar_url`` （ :attr:`Member.default_avatar` に置き換えられました）\"\n\n#: ../../migrating.rst:428\nmsgid \"``Member.default_avatar_url_as`` (replaced by :meth:`Member.default_avatar.replace <Asset.replace>`)\"\nmsgstr \"``Member.default_avatar_url_as`` （ :meth:`Member.default_avatar.replace <Asset.replace>` に置き換えられました）\"\n\n#: ../../migrating.rst:430\nmsgid \":attr:`PartialEmoji.url`\"\nmsgstr \":attr:`PartialEmoji.url`\"\n\n#: ../../migrating.rst:432\nmsgid \":attr:`PartialEmoji.url` is now of :class:`str` type.\"\nmsgstr \":attr:`PartialEmoji.url` は :class:`str` 型になりました。\"\n\n#: ../../migrating.rst:433\nmsgid \"``PartialEmoji.url_as`` has been removed.\"\nmsgstr \"``PartialEmoji.url_as`` は削除されました。\"\n\n#: ../../migrating.rst:434\nmsgid \"``PartialEmoji.url.read`` (replaced by :meth:`PartialEmoji.read`)\"\nmsgstr \"``PartialEmoji.url.read`` （ :meth:`PartialEmoji.read` に置き換えられました）\"\n\n#: ../../migrating.rst:435\nmsgid \"``PartialEmoji.url.save`` (replaced by :meth:`PartialEmoji.save`)\"\nmsgstr \"``PartialEmoji.url.save`` （ :meth:`PartialEmoji.save` に置き換えられました）\"\n\n#: ../../migrating.rst:437\nmsgid \":attr:`PartialInviteGuild.banner`\"\nmsgstr \":attr:`PartialInviteGuild.banner`\"\n\n#: ../../migrating.rst:439\nmsgid \"``PartialInviteGuild.banner`` (replaced by :attr:`PartialInviteGuild.banner.key <Asset.key>`)\"\nmsgstr \"``PartialInviteGuild.banner`` （ :attr:`PartialInviteGuild.banner.key <Asset.key>` に置き換えられました）\"\n\n#: ../../migrating.rst:440\nmsgid \"``PartialInviteGuild.banner_url`` (replaced by :attr:`PartialInviteGuild.banner`)\"\nmsgstr \"``PartialInviteGuild.banner_url`` （ :attr:`PartialInviteGuild.banner` に置き換えられました）\"\n\n#: ../../migrating.rst:444\nmsgid \"``PartialInviteGuild.banner_url_as`` (replaced by :meth:`PartialInviteGuild.banner.replace <Asset.replace>`)\"\nmsgstr \"``PartialInviteGuild.banner_url_as`` （ :meth:`PartialInviteGuild.banner.replace <Asset.replace>` に置き換えられました）\"\n\n#: ../../migrating.rst:446\nmsgid \":attr:`PartialInviteGuild.icon`\"\nmsgstr \":attr:`PartialInviteGuild.icon`\"\n\n#: ../../migrating.rst:448\nmsgid \"``PartialInviteGuild.icon`` (replaced by :attr:`PartialInviteGuild.icon.key <Asset.key>`)\"\nmsgstr \"``PartialInviteGuild.icon`` （ :attr:`PartialInviteGuild.icon.key <Asset.key>` に置き換えられました）\"\n\n#: ../../migrating.rst:449\nmsgid \"``PartialInviteGuild.is_icon_animated`` (replaced by :meth:`PartialInviteGuild.icon.is_animated <Asset.is_animated>`)\"\nmsgstr \"``PartialInviteGuild.is_icon_animated`` （ :meth:`PartialInviteGuild.icon.is_animated <Asset.is_animated>` に置き換えられました）\"\n\n#: ../../migrating.rst:450\nmsgid \"``PartialInviteGuild.icon_url`` (replaced by :attr:`PartialInviteGuild.icon`)\"\nmsgstr \"``PartialInviteGuild.icon_url`` （ :attr:`PartialInviteGuild.icon` に置き換えられました）\"\n\n#: ../../migrating.rst:454\nmsgid \"``PartialInviteGuild.icon_url_as`` (replaced by :meth:`PartialInviteGuild.icon.replace <Asset.replace>`)\"\nmsgstr \"``PartialInviteGuild.icon_url_as`` （ :meth:`PartialInviteGuild.icon.replace <Asset.replace>` に置き換えられました）\"\n\n#: ../../migrating.rst:456\nmsgid \":attr:`PartialInviteGuild.splash`\"\nmsgstr \":attr:`PartialInviteGuild.splash`\"\n\n#: ../../migrating.rst:458\nmsgid \"``PartialInviteGuild.splash`` (replaced by :attr:`PartialInviteGuild.splash.key <Asset.key>`)\"\nmsgstr \"``PartialInviteGuild.splash`` （ :attr:`PartialInviteGuild.splash.key <Asset.key>` に置き換えられました）\"\n\n#: ../../migrating.rst:459\nmsgid \"``PartialInviteGuild.splash_url`` (replaced by :attr:`PartialInviteGuild.splash`)\"\nmsgstr \"``PartialInviteGuild.splash_url`` （ :attr:`PartialInviteGuild.splash` に置き換えられました）\"\n\n#: ../../migrating.rst:463\nmsgid \"``PartialInviteGuild.splash_url_as`` (replaced by :meth:`PartialInviteGuild.splash.replace <Asset.replace>`)\"\nmsgstr \"``PartialInviteGuild.splash_url_as`` （ :meth:`PartialInviteGuild.splash.replace <Asset.replace>` に置き換えられました）\"\n\n#: ../../migrating.rst:465\nmsgid \":attr:`Team.icon`\"\nmsgstr \":attr:`Team.icon`\"\n\n#: ../../migrating.rst:467\nmsgid \"``Team.icon`` (replaced by :attr:`Team.icon.key <Asset.key>`)\"\nmsgstr \"``Team.icon`` （ :attr:`Team.icon.key <Asset.key>` に置き換えられました）\"\n\n#: ../../migrating.rst:468\nmsgid \"``Team.icon_url`` (replaced by :attr:`Team.icon`)\"\nmsgstr \"``Team.icon_url`` （ :attr:`Team.icon` に置き換えられました）\"\n\n#: ../../migrating.rst:472\nmsgid \"``Team.icon_url_as`` (replaced by :meth:`Team.icon.replace <Asset.replace>`)\"\nmsgstr \"``Team.icon_url_as`` （ :meth:`Team.icon.replace <Asset.replace>` に置き換えられました）\"\n\n#: ../../migrating.rst:474\nmsgid \":attr:`User.avatar`\"\nmsgstr \":attr:`User.avatar`\"\n\n#: ../../migrating.rst:476\nmsgid \"``User.avatar`` (replaced by :attr:`User.avatar.key <Asset.key>`)\"\nmsgstr \"``User.avatar`` （ :attr:`User.avatar.key <Asset.key>` に置き換えられました）\"\n\n#: ../../migrating.rst:477\nmsgid \"``User.is_avatar_animated`` (replaced by :meth:`User.avatar.is_animated <Asset.is_animated>`)\"\nmsgstr \"``User.is_avatar_animated`` （ :meth:`User.avatar.is_animated <Asset.is_animated>` に置き換えられました）\"\n\n#: ../../migrating.rst:478\nmsgid \"``User.avatar_url`` (replaced by :attr:`User.avatar`)\"\nmsgstr \"``User.avatar_url`` （ :attr:`User.avatar` に置き換えられました）\"\n\n#: ../../migrating.rst:482\nmsgid \"``User.avatar_url_as`` (replaced by :meth:`User.avatar.replace <Asset.replace>`)\"\nmsgstr \"``User.avatar_url_as`` （ :meth:`User.avatar.replace <Asset.replace>` に置き換えられました）\"\n\n#: ../../migrating.rst:484\nmsgid \":attr:`User.default_avatar`\"\nmsgstr \":attr:`User.default_avatar`\"\n\n#: ../../migrating.rst:486\nmsgid \"``User.default_avatar`` (replaced by :attr:`User.default_avatar.key <Asset.key>`)\"\nmsgstr \"``User.default_avatar`` （ :attr:`User.default_avatar.key <Asset.key>` に置き換えられました）\"\n\n#: ../../migrating.rst:487\nmsgid \"``User.default_avatar_url`` (replaced by :attr:`User.default_avatar`)\"\nmsgstr \"``User.default_avatar_url`` （ :attr:`User.default_avatar` に置き換えられました）\"\n\n#: ../../migrating.rst:488\nmsgid \"``User.default_avatar_url_as`` (replaced by :meth:`User.default_avatar.replace <Asset.replace>`)\"\nmsgstr \"``User.default_avatar_url_as`` （ :meth:`User.default_avatar.replace <Asset.replace>` に置き換えられました）\"\n\n#: ../../migrating.rst:490\nmsgid \":attr:`Webhook.avatar`\"\nmsgstr \":attr:`Webhook.avatar`\"\n\n#: ../../migrating.rst:492\nmsgid \"``Webhook.avatar`` (replaced by :attr:`Webhook.avatar.key <Asset.key>`)\"\nmsgstr \"``Webhook.avatar`` （ :attr:`Webhook.avatar.key <Asset.key>` に置き換えられました）\"\n\n#: ../../migrating.rst:493\nmsgid \"``Webhook.avatar_url`` (replaced by :attr:`Webhook.avatar`)\"\nmsgstr \"``Webhook.avatar_url`` （ :attr:`Webhook.avatar` に置き換えられました）\"\n\n#: ../../migrating.rst:497\nmsgid \"``Webhook.avatar_url_as`` (replaced by :meth:`Webhook.avatar.replace <Asset.replace>`)\"\nmsgstr \"``Webhook.avatar_url_as`` （ :meth:`Webhook.avatar.replace <Asset.replace>` に置き換えられました）\"\n\n#: ../../migrating.rst:502\nmsgid \"Thread Support\"\nmsgstr \"スレッドのサポート\"\n\n#: ../../migrating.rst:504\nmsgid \"v2.0 has been updated to use a newer API gateway version which supports threads and as a result of this had to make few breaking changes. Most notably messages sent in guilds can, in addition to a :class:`TextChannel`, be sent in a :class:`Thread`.\"\nmsgstr \"スレッドをサポートする新しいAPIゲートウェイバージョンを使用するためにv2.0が更新され、その結果いくつかの破壊的変更が必要になりました。最も注目すべきは、 ギルド内で送信されるメッセージは :class:`TextChannel` に加えて :class:`Thread` でも送信できる点です。\"\n\n#: ../../migrating.rst:506\nmsgid \"The main differences between text channels and threads are:\"\nmsgstr \"テキストチャンネルとスレッドの主な違いは以下の通りです:\"\n\n#: ../../migrating.rst:508\nmsgid \"Threads do not have their own permissions, they inherit the permissions of their parent channel.\"\nmsgstr \"スレッドには固有の権限はありません。親チャンネルの権限を継承します。\"\n\n#: ../../migrating.rst:510\nmsgid \"This means that threads do not have these attributes:\"\nmsgstr \"これはスレッドにこれらの属性がないことを意味します:\"\n\n#: ../../migrating.rst:512\nmsgid \"``changed_roles``\"\nmsgstr \"``changed_roles``\"\n\n#: ../../migrating.rst:513\nmsgid \"``overwrites``\"\nmsgstr \"``overwrites``\"\n\n#: ../../migrating.rst:514\nmsgid \"``permissions_synced``\"\nmsgstr \"``permissions_synced``\"\n\n#: ../../migrating.rst:518\nmsgid \"Text channels have a few dedicated permissions for threads:\"\nmsgstr \"テキストチャンネルにはスレッド専用の権限がいくつかあります:\"\n\n#: ../../migrating.rst:520\nmsgid \":attr:`Permissions.manage_threads`\"\nmsgstr \":attr:`Permissions.manage_threads`\"\n\n#: ../../migrating.rst:521\nmsgid \":attr:`Permissions.create_public_threads`\"\nmsgstr \":attr:`Permissions.create_public_threads`\"\n\n#: ../../migrating.rst:522\nmsgid \":attr:`Permissions.create_private_threads`\"\nmsgstr \":attr:`Permissions.create_private_threads`\"\n\n#: ../../migrating.rst:523\nmsgid \":attr:`Permissions.send_messages_in_threads`\"\nmsgstr \":attr:`Permissions.send_messages_in_threads`\"\n\n#: ../../migrating.rst:525\nmsgid \"Threads do not have their own NSFW status, they inherit it from their parent channel.\"\nmsgstr \"スレッドは固有の年齢制限ステータスを持っていません。親チャンネルを継承します。\"\n\n#: ../../migrating.rst:527\nmsgid \"This means that :class:`Thread` does not have an ``nsfw`` attribute.\"\nmsgstr \"これは :class:`Thread` に ``nsfw`` 属性がないことを意味します。\"\n\n#: ../../migrating.rst:529\nmsgid \"Threads do not have their own topic.\"\nmsgstr \"スレッドには固有のトピックがありません。\"\n\n#: ../../migrating.rst:531\nmsgid \"This means that :class:`Thread` does not have a ``topic`` attribute.\"\nmsgstr \"これは :class:`Thread` に ``topic`` 属性がないことを意味します。\"\n\n#: ../../migrating.rst:533\nmsgid \"Threads do not have their own position in the channel list.\"\nmsgstr \"スレッドはチャンネルリストに固有の位置を持っていません。\"\n\n#: ../../migrating.rst:535\nmsgid \"This means that :class:`Thread` does not have a ``position`` attribute.\"\nmsgstr \"これは :class:`Thread` に ``position`` 属性がないことを意味します。\"\n\n#: ../../migrating.rst:537\nmsgid \":attr:`Thread.created_at` of threads created before 10 January 2022 is ``None``.\"\nmsgstr \"2022年1月10日より前に作成されたスレッドの :attr:`Thread.created_at` は ``None`` です。\"\n\n#: ../../migrating.rst:538\nmsgid \":attr:`Thread.members` is of type List[:class:`ThreadMember`] rather than List[:class:`Member`]\"\nmsgstr \":attr:`Thread.members` は List[:class:`Member`] ではなく、 List[:class:`ThreadMember`] 型です。\"\n\n#: ../../migrating.rst:540\nmsgid \"Most of the time, this data is not provided and a call to :meth:`Thread.fetch_members` is needed.\"\nmsgstr \"ほとんどの場合このデータは提供されず、 :meth:`Thread.fetch_members` の呼び出しが必要になります。\"\n\n#: ../../migrating.rst:542\nmsgid \"For convenience, :class:`Thread` has a set of properties and methods that return the information about the parent channel:\"\nmsgstr \"便宜上、 :class:`Thread` には親チャンネルに関する情報を返す一連のプロパティとメソッドがあります。\"\n\n#: ../../migrating.rst:544\nmsgid \":attr:`Thread.category`\"\nmsgstr \":attr:`Thread.category`\"\n\n#: ../../migrating.rst:545\nmsgid \":attr:`Thread.category_id`\"\nmsgstr \":attr:`Thread.category_id`\"\n\n#: ../../migrating.rst:546\nmsgid \":meth:`Thread.is_news`\"\nmsgstr \":meth:`Thread.is_news`\"\n\n#: ../../migrating.rst:547\nmsgid \":meth:`Thread.is_nsfw`\"\nmsgstr \":meth:`Thread.is_nsfw`\"\n\n#: ../../migrating.rst:548\nmsgid \":meth:`Thread.permissions_for`\"\nmsgstr \":meth:`Thread.permissions_for`\"\n\n#: ../../migrating.rst:550\nmsgid \"Note that this outputs the permissions of the parent channel and you might need to check for different permissions when trying to determine if a member can do something.\"\nmsgstr \"これは親チャンネルの権限を出力し、メンバーがなにかできるかどうかを判断するときに異なる権限をチェックする必要があるかもしれないことに注意してください。\"\n\n#: ../../migrating.rst:553\nmsgid \"Here are some notable examples:\"\nmsgstr \"次にいくつかの注目すべき例を示します:\"\n\n#: ../../migrating.rst:555\nmsgid \"A guild member can send messages in a text channel if they have :attr:`~Permissions.send_messages` permission in it.\"\nmsgstr \"ギルドメンバーは :attr:`~Permissions.send_messages` 権限を持っている場合にテキストチャンネルでメッセージを送信できます。\"\n\n#: ../../migrating.rst:559\nmsgid \"A guild member can send messages in a public thread if:\"\nmsgstr \"ギルドメンバーは以下の場合に公開スレッドでメッセージを送信できます:\"\n\n#: ../../migrating.rst:558\n#: ../../migrating.rst:562\nmsgid \"They have :attr:`~Permissions.send_messages_in_threads` permission in its parent channel.\"\nmsgstr \"親チャンネルで :attr:`~Permissions.send_messages_in_threads` 権限がある場合。\"\n\n#: ../../migrating.rst:559\n#: ../../migrating.rst:565\nmsgid \"The thread is not :attr:`~Thread.locked`.\"\nmsgstr \"スレッドが :attr:`~Thread.locked` でない場合。\"\n\n#: ../../migrating.rst:565\nmsgid \"A guild member can send messages in a private thread if:\"\nmsgstr \"ギルドメンバーは以下の場合にプライベートスレッドでメッセージを送信できます:\"\n\n#: ../../migrating.rst:563\n#: ../../migrating.rst:589\nmsgid \"They're either already a member of the thread or have a :attr:`~Permissions.manage_threads` permission in its parent channel.\"\nmsgstr \"すでにスレッドのメンバーであるか、 親チャンネルで :attr:`~Permissions.manage_threads` 権限を持っている場合。\"\n\n#: ../../migrating.rst:567\nmsgid \"A guild member can edit a text channel if they have :attr:`~Permissions.manage_channels` permission in it.\"\nmsgstr \"ギルドメンバーは :attr:`~Permissions.manage_channels` 権限を持っている場合テキストチャンネルを編集できます。\"\n\n#: ../../migrating.rst:569\nmsgid \"A guild member can edit a thread if they have :attr:`~Permissions.manage_threads` permission in its parent channel.\"\nmsgstr \"ギルドメンバーは、親チャンネルで :attr:`~Permissions.manage_threads` 権限がある場合スレッドを編集できます。\"\n\n#: ../../migrating.rst:573\nmsgid \"A thread's :attr:`~Thread.owner` can archive a (not-locked) thread and edit its :attr:`~Thread.name` and :attr:`~Thread.auto_archive_duration` without :attr:`~Permissions.manage_threads` permission.\"\nmsgstr \"スレッドの :attr:`~Thread.owner` は（ロックされていない）スレッドをアーカイブし、 :attr:`~Thread.name` と :attr:`~Thread.auto_archive_duration` を :attr:`~Permissions.manage_threads` 権限なしで編集できます。\"\n\n#: ../../migrating.rst:578\nmsgid \"A guild member can react with an emoji to messages in a text channel if:\"\nmsgstr \"ギルドメンバーは、以下の場合にテキストチャンネル内のメッセージに絵文字でリアクションすることができます:\"\n\n#: ../../migrating.rst:577\nmsgid \"They have :attr:`~Permissions.read_message_history` permission in it.\"\nmsgstr \":attr:`~Permissions.read_message_history` 権限を持っているとき。\"\n\n#: ../../migrating.rst:578\nmsgid \"They have :attr:`~Permissions.add_reactions` permission in it or the message already has that emoji reaction.\"\nmsgstr \":attr:`~Permissions.add_reactions` 権限を持っているか、またはメッセージにすでにその絵文字のリアクションがついているとき。\"\n\n#: ../../migrating.rst:584\nmsgid \"A guild member can react with an emoji to messages in a public thread if:\"\nmsgstr \"ギルドメンバーは以下の場合に公開スレッドのメッセージに絵文字でリアクションすることができます:\"\n\n#: ../../migrating.rst:581\n#: ../../migrating.rst:587\nmsgid \"They have :attr:`~Permissions.read_message_history` permission in its parent channel.\"\nmsgstr \":attr:`~Permissions.read_message_history` 権限を親チャンネルで持っているとき。\"\n\n#: ../../migrating.rst:582\n#: ../../migrating.rst:588\nmsgid \"They have :attr:`~Permissions.add_reactions` permission in its parent channel or the message already has that emoji reaction.\"\nmsgstr \"親チャンネルで :attr:`~Permissions.add_reactions` 権限を持っているか、メッセージにすでにその絵文字のリアクションがついているとき。\"\n\n#: ../../migrating.rst:583\n#: ../../migrating.rst:591\nmsgid \"The thread is not :attr:`~Thread.archived`. Note that the guild member can unarchive a thread (if it's not :attr:`~Thread.locked`) to react to a message.\"\nmsgstr \"スレッドが :attr:`~Thread.archived` でないとき。ギルドメンバーはメッセージにリアクションするためにスレッドを（ :attr:`~Thread.locked` でない場合） アーカイブ解除することができます。\"\n\n#: ../../migrating.rst:592\nmsgid \"A guild member can react with an emoji to messages in a private thread if:\"\nmsgstr \"ギルドメンバーは以下の場合にプライベートスレッドのメッセージにリアクションをつけることができます:\"\n\n#: ../../migrating.rst:594\n#: ../../migrating.rst:1107\n#: ../../migrating.rst:1226\nmsgid \"The following changes have been made:\"\nmsgstr \"以下のように変更されました:\"\n\n#: ../../migrating.rst:596\nmsgid \":attr:`Message.channel` may now be a :class:`Thread`.\"\nmsgstr \":attr:`Message.channel` は :class:`Thread` になるかもしれません。\"\n\n#: ../../migrating.rst:597\nmsgid \":attr:`Message.channel_mentions` list may now contain a :class:`Thread`.\"\nmsgstr \":attr:`Message.channel_mentions` に :class:`Thread` が含まれるかもしれません。\"\n\n#: ../../migrating.rst:598\nmsgid \":attr:`AuditLogEntry.target` may now be a :class:`Thread`.\"\nmsgstr \":attr:`AuditLogEntry.target` が :class:`Thread` になりうるようになりました。\"\n\n#: ../../migrating.rst:599\nmsgid \":attr:`PartialMessage.channel` may now be a :class:`Thread`.\"\nmsgstr \":attr:`PartialMessage.channel` が :class:`Thread` になるようになりました。\"\n\n#: ../../migrating.rst:600\nmsgid \":attr:`Guild.get_channel` does not return :class:`Thread`\\\\s.\"\nmsgstr \":attr:`Guild.get_channel` は :class:`Thread` を返しません。\"\n\n#: ../../migrating.rst:602\nmsgid \"If you're looking to get a channel or thread, use :attr:`Guild.get_channel_or_thread` instead.\"\nmsgstr \"チャンネルやスレッドを取得したい場合は、代わりに :attr:`Guild.get_channel_or_thread` を使用してください。\"\n\n#: ../../migrating.rst:603\nmsgid \"If you're only looking to get threads, use :attr:`Guild.get_thread` or :attr:`TextChannel.get_thread` instead.\"\nmsgstr \"スレッドを取得したい場合は、 :attr:`Guild.get_thread` または :attr:`TextChannel.get_thread` を代わりに使用してください。\"\n\n#: ../../migrating.rst:605\nmsgid \"``channel`` parameter in :func:`on_guild_channel_pins_update` may now be a :class:`Thread`.\"\nmsgstr \":func:`on_guild_channel_pins_update` のパラメータ ``channel`` は :class:`Thread` になるかもしれません。\"\n\n#: ../../migrating.rst:606\nmsgid \"``channel`` parameter in :func:`on_typing` may now be a :class:`Thread`.\"\nmsgstr \":func:`on_typing` のパラメータ ``channel`` は :class:`Thread` になるかもしれません。\"\n\n#: ../../migrating.rst:607\nmsgid \":meth:`Client.fetch_channel` may now return :class:`Thread`.\"\nmsgstr \":meth:`Client.fetch_channel` が :class:`Thread` も返すようになりました。\"\n\n#: ../../migrating.rst:608\nmsgid \":meth:`Client.get_channel` may now return :class:`Thread`.\"\nmsgstr \":meth:`Client.get_channel` が :class:`Thread` も返すようになりました。\"\n\n#: ../../migrating.rst:609\nmsgid \":meth:`Guild.fetch_channel` may now return :class:`Thread`.\"\nmsgstr \":meth:`Guild.fetch_channel` が :class:`Thread` も返すようになりました。\"\n\n#: ../../migrating.rst:612\nmsgid \"Removing In-Place Edits\"\nmsgstr \"編集時の置換を廃止\"\n\n#: ../../migrating.rst:614\nmsgid \"Most of the model methods that previously edited the model in-place have been updated to no longer do this. Instead, these methods will now return a new instance of the newly updated model. This has been done to avoid the library running into race conditions between in-place edits and gateway events on model updates. See :issue:`4098` for more information.\"\nmsgstr \"モデル内のデータを直接置き換えて編集していたメソッドのほとんどが、そうしないよう更新されました。代わりに、こうしたメソッドは更新された新しいモデルを返すように変更されました。これは、置換編集とモデル更新のゲートウェイイベントの競合を解消するために行われました。詳細については、 :issue:`4098` を確認してください。\"\n\n#: ../../migrating.rst:630\nmsgid \"The following have been changed:\"\nmsgstr \"以下のように変更されました。\"\n\n#: ../../migrating.rst:632\n#: ../../migrating.rst:936\nmsgid \":meth:`CategoryChannel.edit`\"\nmsgstr \":meth:`CategoryChannel.edit`\"\n\n#: ../../migrating.rst:634\nmsgid \"Note that this method will return ``None`` instead of :class:`CategoryChannel` if the edit was only positional.\"\nmsgstr \"編集が位置のみの場合、 :class:`CategoryChannel` の代わりに ``None`` を返すことに注意してください。\"\n\n#: ../../migrating.rst:636\nmsgid \":meth:`Member.edit`\"\nmsgstr \":meth:`Member.edit`\"\n\n#: ../../migrating.rst:638\nmsgid \"Note that this method only returns the updated :class:`Member` when certain fields are updated.\"\nmsgstr \"特定の属性が更新された場合にのみ、更新された :class:`Member` を返すことに注意してください。\"\n\n#: ../../migrating.rst:640\n#: ../../migrating.rst:941\nmsgid \":meth:`StageChannel.edit`\"\nmsgstr \":meth:`StageChannel.edit`\"\n\n#: ../../migrating.rst:642\nmsgid \"Note that this method will return ``None`` instead of :class:`StageChannel` if the edit was only positional.\"\nmsgstr \"編集が位置のみの場合、 :class:`StageChannel` の代わりに ``None`` を返すことに注意してください。\"\n\n#: ../../migrating.rst:644\n#: ../../migrating.rst:944\nmsgid \":meth:`TextChannel.edit`\"\nmsgstr \":meth:`TextChannel.edit`\"\n\n#: ../../migrating.rst:646\nmsgid \"Note that this method will return ``None`` instead of :class:`TextChannel` if the edit was only positional.\"\nmsgstr \"編集が位置のみの場合、 :class:`TextChannel` の代わりに ``None`` を返すことに注意してください。\"\n\n#: ../../migrating.rst:648\n#: ../../migrating.rst:945\nmsgid \":meth:`VoiceChannel.edit`\"\nmsgstr \":meth:`VoiceChannel.edit`\"\n\n#: ../../migrating.rst:650\nmsgid \"Note that this method will return ``None`` instead of :class:`VoiceChannel` if the edit was only positional.\"\nmsgstr \"編集が位置のみの場合、 :class:`VoiceChannel` の代わりに ``None`` を返すことに注意してください。\"\n\n#: ../../migrating.rst:652\n#: ../../migrating.rst:937\nmsgid \":meth:`ClientUser.edit`\"\nmsgstr \":meth:`ClientUser.edit`\"\n\n#: ../../migrating.rst:653\nmsgid \":meth:`Emoji.edit`\"\nmsgstr \":meth:`Emoji.edit`\"\n\n#: ../../migrating.rst:654\n#: ../../migrating.rst:938\nmsgid \":meth:`Guild.edit`\"\nmsgstr \":meth:`Guild.edit`\"\n\n#: ../../migrating.rst:655\n#: ../../migrating.rst:939\nmsgid \":meth:`Message.edit`\"\nmsgstr \":meth:`Message.edit`\"\n\n#: ../../migrating.rst:656\n#: ../../migrating.rst:940\nmsgid \":meth:`Role.edit`\"\nmsgstr \":meth:`Role.edit`\"\n\n#: ../../migrating.rst:657\nmsgid \":meth:`Template.edit`\"\nmsgstr \":meth:`Template.edit`\"\n\n#: ../../migrating.rst:658\nmsgid \":meth:`Template.sync`\"\nmsgstr \":meth:`Template.sync`\"\n\n#: ../../migrating.rst:659\n#: ../../migrating.rst:946\nmsgid \":meth:`Webhook.edit`\"\nmsgstr \":meth:`Webhook.edit`\"\n\n#: ../../migrating.rst:660\n#: ../../migrating.rst:948\nmsgid \":meth:`Webhook.edit_message`\"\nmsgstr \":meth:`Webhook.edit_message`\"\n\n#: ../../migrating.rst:661\n#: ../../migrating.rst:947\nmsgid \":meth:`WebhookMessage.edit`\"\nmsgstr \":meth:`WebhookMessage.edit`\"\n\n#: ../../migrating.rst:664\nmsgid \"Sticker Changes\"\nmsgstr \"スタンプの変更\"\n\n#: ../../migrating.rst:666\nmsgid \"Discord has changed how their stickers work and as such, sticker support has been reworked.\"\nmsgstr \"Discordがスタンプの動作を変更したため、スタンプのサポートが見直されました。\"\n\n#: ../../migrating.rst:670\nmsgid \"Type of :attr:`Message.stickers` changed to List[:class:`StickerItem`].\"\nmsgstr \":attr:`Message.stickers` の型は List[:class:`StickerItem`]に変更されました。\"\n\n#: ../../migrating.rst:672\nmsgid \"To get the :class:`Sticker` from :class:`StickerItem`, use :meth:`StickerItem.fetch` or (only for stickers from guilds the bot is in) :meth:`Client.get_sticker`.\"\nmsgstr \":class:`StickerItem` から :class:`Sticker` を取得するには、 :meth:`StickerItem.fetch` または (ボットが参加しているギルドのスタンプのみ) :meth:`Client.get_sticker` を使用します。\"\n\n#: ../../migrating.rst:675\nmsgid \":attr:`Sticker.format` is now of :class:`StickerFormatType` type.\"\nmsgstr \":attr:`Sticker.format` は :class:`StickerFormatType` 型になりました。\"\n\n#: ../../migrating.rst:676\nmsgid \"``Sticker.tags`` has been removed.\"\nmsgstr \"``Sticker.tags`` は削除されました。\"\n\n#: ../../migrating.rst:678\nmsgid \"Depending on type of the sticker, :attr:`StandardSticker.tags` or :attr:`GuildSticker.emoji` can be used instead.\"\nmsgstr \"スタンプの種類に応じて、:attr:`StandardSticker.tags` または :attr:`GuildSticker.emoji` を使用できます。\"\n\n#: ../../migrating.rst:680\nmsgid \"``Sticker.image`` and related methods have been removed.\"\nmsgstr \"``Sticker.image`` と関連するメソッドは削除されました。\"\n\n#: ../../migrating.rst:681\nmsgid \"``Sticker.preview_image`` and related methods have been removed.\"\nmsgstr \"``Sticker.preview_image`` と関連するメソッドは削除されました。\"\n\n#: ../../migrating.rst:682\nmsgid \":attr:`AuditLogDiff.type` is now of Union[:class:`ChannelType`, :class:`StickerType`] type.\"\nmsgstr \":attr:`AuditLogDiff.type` は Union[:class:`ChannelType`, :class:`StickerType`] 型になりました。\"\n\n#: ../../migrating.rst:683\nmsgid \"The old ``StickerType`` enum has been renamed to :class:`StickerFormatType`.\"\nmsgstr \"旧 ``StickerType`` 列挙型は :class:`StickerFormatType` に改名されました。\"\n\n#: ../../migrating.rst:685\nmsgid \":class:`StickerType` now refers to a sticker type (official sticker vs guild-uploaded sticker) rather than its format type.\"\nmsgstr \":class:`StickerType` は、今後はフォーマットではなく、スタンプのタイプ (公式のスタンプか、ギルドごとにアップロードされたスタンプか) を示します。\"\n\n#: ../../migrating.rst:688\nmsgid \"Integrations Changes\"\nmsgstr \"連携サービスの変更\"\n\n#: ../../migrating.rst:690\nmsgid \"To support the new integration types, integration support has been reworked.\"\nmsgstr \"新しいインテグレーションの種類をサポートするため、インテグレーションのサポートがやり直されました。\"\n\n#: ../../migrating.rst:694\nmsgid \"The old ``Integration`` class has been renamed to :class:`StreamIntegration`.\"\nmsgstr \"以前の ``Integration`` クラスは :class:`StreamIntegration` に改名されました。\"\n\n#: ../../migrating.rst:695\nmsgid \":meth:`Guild.integrations` now returns subclasses of the new :class:`Integration` class.\"\nmsgstr \":meth:`Guild.integrations` は、新しい :class:`Integration` クラスのサブクラスを返すようになりました。\"\n\n#: ../../migrating.rst:698\nmsgid \"Presence Updates Now Have A Separate Event\"\nmsgstr \"プレゼンスのアップデートが個別のイベントに変更\"\n\n#: ../../migrating.rst:700\nmsgid \"Presence updates (changes in member's status and activity) now have a separate :func:`on_presence_update` event. :func:`on_member_update` event is now only called on member updates (changes in nickname, role, pending status, etc.).\"\nmsgstr \"プレゼンスのアップデート (メンバーのステータスとアクティビティの変化) は、 :func:`on_presence_update` という別のイベントで扱われるようになりました。 :func:`on_member_update` イベントは、今後はメンバーのアップデート (ニックネーム、ロール、ペンディング状態の変化) の場合のみ呼び出されます。\"\n\n#: ../../migrating.rst:703\nmsgid \"From API perspective, these are separate events and as such, this change improves library's consistency with the API. Presence updates usually are 90% of all handled events so splitting these should benefit listeners that were only interested in member updates.\"\nmsgstr \"APIからすると、これらは個別のイベントなので、この変更はAPIとライブラリーとの一致度を改善します。プレゼンスのアップデートは多くの場合扱われるイベントの90%を占めているので、分割は、メンバーアップデートのみ必要なリスナーに利益をもたらすはずです。\"\n\n#: ../../migrating.rst:731\nmsgid \"Moving Away From Custom AsyncIterator\"\nmsgstr \"カスタム AsyncIterator からの移行\"\n\n#: ../../migrating.rst:733\nmsgid \"Asynchronous iterators in v1.0 were implemented using a special class named ``AsyncIterator``. v2.0 instead provides regular asynchronous iterators with no added utility methods.\"\nmsgstr \"v1.0の非同期イテレータは、``AsyncIterator`` というクラスを使用して実装されました。\\n\"\n\"v2.0は代わりに、ユーティリティメソッドを追加しない通常の非同期イテレータを提供します\"\n\n#: ../../migrating.rst:736\nmsgid \"This means that usage of the following utility methods is no longer possible:\"\nmsgstr \"つまり、以下のユーティリティメソッドを使用することはできなくなります。\"\n\n#: ../../migrating.rst:738\nmsgid \"``AsyncIterator.next()``\"\nmsgstr \"``AsyncIterator.next()``\"\n\n#: ../../migrating.rst:740\nmsgid \"Usage of an explicit ``async for`` loop should generally be preferred:\"\nmsgstr \"明示的な ``async for`` ループの使用が一般的に推奨されます。\"\n\n#: ../../migrating.rst:757\nmsgid \"If you need to get next item from an iterator without a loop, you can use :func:`anext` (new in Python 3.10) or :meth:`~object.__anext__` instead:\"\nmsgstr \"ループなしにイテレータから次のアイテムを取得する必要がある場合には、 :func:`anext` (Python 3.10で追加) か :meth:`~object.__anext__` を代わりに使用できます。\"\n\n#: ../../migrating.rst:778\nmsgid \"``AsyncIterator.get()``\"\nmsgstr \"``AsyncIterator.get()``\"\n\n#: ../../migrating.rst:788\nmsgid \"``AsyncIterator.find()``\"\nmsgstr \"``AsyncIterator.find()``\"\n\n#: ../../migrating.rst:801\nmsgid \"``AsyncIterator.flatten()``\"\nmsgstr \"``AsyncIterator.flatten()``\"\n\n#: ../../migrating.rst:811\nmsgid \"``AsyncIterator.chunk()``\"\nmsgstr \"``AsyncIterator.chunk()``\"\n\n#: ../../migrating.rst:823\nmsgid \"``AsyncIterator.map()``\"\nmsgstr \"``AsyncIterator.map()``\"\n\n#: ../../migrating.rst:835\nmsgid \"``AsyncIterator.filter()``\"\nmsgstr \"``AsyncIterator.filter()``\"\n\n#: ../../migrating.rst:850\nmsgid \"To ease this transition, these changes have been made:\"\nmsgstr \"この移行を容易にするために、次の変更が行われました：\"\n\n#: ../../migrating.rst:852\nmsgid \"Added :func:`utils.as_chunks` as an alternative for ``AsyncIter.chunk``.\"\nmsgstr \"``AsyncIter.chunk`` の代わりとして :func:`utils.as_chunks` が追加されました。\"\n\n#: ../../migrating.rst:853\nmsgid \"Added support for :term:`asynchronous iterator` to :func:`utils.find`.\"\nmsgstr \":func:`utils.find` に :term:`asynchronous iterator` がサポートされました。\"\n\n#: ../../migrating.rst:854\nmsgid \"Added support for :term:`asynchronous iterator` to :func:`utils.get`.\"\nmsgstr \":func:`utils.get` に :term:`asynchronous iterator` がサポートされました。\"\n\n#: ../../migrating.rst:856\nmsgid \"The return type of the following methods has been changed to an :term:`asynchronous iterator`:\"\nmsgstr \"以下のメソッドの戻り値の型が :term:`asynchronous iterator` に変更されました。\"\n\n#: ../../migrating.rst:858\nmsgid \":meth:`abc.Messageable.history`\"\nmsgstr \":meth:`abc.Messageable.history`\"\n\n#: ../../migrating.rst:859\nmsgid \":meth:`Client.fetch_guilds`\"\nmsgstr \":meth:`Client.fetch_guilds`\"\n\n#: ../../migrating.rst:860\nmsgid \":meth:`Guild.audit_logs`\"\nmsgstr \":meth:`Guild.audit_logs`\"\n\n#: ../../migrating.rst:861\nmsgid \":meth:`Guild.fetch_members`\"\nmsgstr \":meth:`Guild.fetch_members`\"\n\n#: ../../migrating.rst:862\nmsgid \":meth:`Reaction.users`\"\nmsgstr \":meth:`Reaction.users`\"\n\n#: ../../migrating.rst:864\nmsgid \"The ``NoMoreItems`` exception was removed as calling :func:`anext` or :meth:`~object.__anext__` on an :term:`asynchronous iterator` will now raise :class:`StopAsyncIteration`.\"\nmsgstr \"変更によって :term:`asynchronous iterator` に対して :func:`anext` や :meth:`~object.__anext__` を呼び出すと :class:`StopAsyncIteration` が発生するようになったため、 ``NoMoreItems`` 例外は削除されました。\"\n\n#: ../../migrating.rst:868\nmsgid \"Changing certain lists to be lazy sequences instead\"\nmsgstr \"特定のリストを遅延評価シーケンスに変更\"\n\n#: ../../migrating.rst:870\nmsgid \"In order to improve performance when calculating the length of certain lists, certain attributes were changed to return a sequence rather than a :class:`list`.\"\nmsgstr \"リストの長さを計算するときのパフォーマンスを向上させるために、特定の属性が :class:`list` ではなくシーケンスを返すように変更されました。\"\n\n#: ../../migrating.rst:872\nmsgid \"A sequence is similar to a :class:`list` except it is read-only. In order to get a list again you can call :class:`list` on the resulting sequence.\"\nmsgstr \"シーケンスは :class:`list` と似ていますが読み込み専用です。これをリストに戻すには返されたシーケンスに対し :class:`list` を呼び出せばよいです。\"\n\n#: ../../migrating.rst:874\nmsgid \"The following properties were changed to return a sequence instead of a list:\"\nmsgstr \"以下のプロパティは、リストの代わりにシーケンスを返すように変更されました:\"\n\n#: ../../migrating.rst:876\nmsgid \":attr:`Client.guilds`\"\nmsgstr \":attr:`Client.guilds`\"\n\n#: ../../migrating.rst:877\nmsgid \":attr:`Client.emojis`\"\nmsgstr \":attr:`Client.emojis`\"\n\n#: ../../migrating.rst:878\nmsgid \":attr:`Client.private_channels`\"\nmsgstr \":attr:`Client.private_channels`\"\n\n#: ../../migrating.rst:879\nmsgid \":attr:`Guild.roles`\"\nmsgstr \":attr:`Guild.roles`\"\n\n#: ../../migrating.rst:880\nmsgid \":attr:`Guild.channels`\"\nmsgstr \":attr:`Guild.channels`\"\n\n#: ../../migrating.rst:881\nmsgid \":attr:`Guild.members`\"\nmsgstr \":attr:`Guild.members`\"\n\n#: ../../migrating.rst:883\nmsgid \"This change should be transparent, unless you are modifying the sequence by doing things such as ``list.append``.\"\nmsgstr \"``list.append`` のようにシーケンスを変更しない限り、この変更は影響を与えないでしょう。\"\n\n#: ../../migrating.rst:887\nmsgid \"Embed Changes\"\nmsgstr \"埋め込みの変更\"\n\n#: ../../migrating.rst:889\nmsgid \"Originally, embeds used a special sentinel to denote emptiness or remove an attribute from display. The ``Embed.Empty`` sentinel was made when Discord's embed design was in a nebulous state of flux. Since then, the embed design has stabilised and thus the sentinel is seen as legacy.\"\nmsgstr \"以前は、埋め込みは属性が空であったり、属性の表示を除去することを示すのに、特別なセンチネルを使用していました。この ``Embed.Empty`` センチネルはDiscordの埋め込みの設計が漠然とし変化していた状態にあったときにできました。その後、埋め込みの設計は安定化したため、このセンチネルは過去のものとされてきました。\"\n\n#: ../../migrating.rst:891\nmsgid \"Therefore, ``Embed.Empty`` has been removed in favour of ``None``.\"\nmsgstr \"このため、 ``Embed.Empty`` は、 ``None`` に置き換えられ削除されました。\"\n\n#: ../../migrating.rst:893\nmsgid \"Additionally, ``Embed.__eq__`` has been implemented thus embeds becoming unhashable (e.g. using them in sets or dict keys).\"\nmsgstr \"さらに、 ``Embed.__eq__`` が実装されたため、埋め込みがハッシュ化できなくなりました。 (例えば、集合型や辞書型キーで使用できなくなりました)\"\n\n#: ../../migrating.rst:911\nmsgid \"Removal of ``InvalidArgument`` Exception\"\nmsgstr \"``InvalidArgument`` 例外の削除\"\n\n#: ../../migrating.rst:913\nmsgid \"The custom ``InvalidArgument`` exception has been removed and functions and methods that raised it are now raising :class:`TypeError` and/or :class:`ValueError` instead.\"\nmsgstr \"カスタム例外 ``InvalidArgument`` は削除され、これを発生させていた関数やメソッドは、代わりに :class:`TypeError` や :class:`ValueError` を発生させるようになりました。\"\n\n#: ../../migrating.rst:916\nmsgid \"The following methods have been changed:\"\nmsgstr \"以下のメソッドが変更されました:\"\n\n#: ../../migrating.rst:918\n#: ../../migrating.rst:1047\nmsgid \":meth:`Message.add_reaction`\"\nmsgstr \":meth:`Message.add_reaction`\"\n\n#: ../../migrating.rst:919\nmsgid \":meth:`AutoShardedClient.change_presence`\"\nmsgstr \":meth:`AutoShardedClient.change_presence`\"\n\n#: ../../migrating.rst:920\nmsgid \":meth:`Client.change_presence`\"\nmsgstr \":meth:`Client.change_presence`\"\n\n#: ../../migrating.rst:921\nmsgid \":meth:`Reaction.clear`\"\nmsgstr \":meth:`Reaction.clear`\"\n\n#: ../../migrating.rst:922\nmsgid \":meth:`Message.clear_reaction`\"\nmsgstr \":meth:`Message.clear_reaction`\"\n\n#: ../../migrating.rst:923\nmsgid \":meth:`Guild.create_category`\"\nmsgstr \":meth:`Guild.create_category`\"\n\n#: ../../migrating.rst:924\nmsgid \":meth:`Guild.create_custom_emoji`\"\nmsgstr \":meth:`Guild.create_custom_emoji`\"\n\n#: ../../migrating.rst:925\nmsgid \":meth:`Client.create_guild`\"\nmsgstr \":meth:`Client.create_guild`\"\n\n#: ../../migrating.rst:926\nmsgid \":meth:`Template.create_guild`\"\nmsgstr \":meth:`Template.create_guild`\"\n\n#: ../../migrating.rst:927\nmsgid \":meth:`StageChannel.create_instance`\"\nmsgstr \":meth:`StageChannel.create_instance`\"\n\n#: ../../migrating.rst:928\nmsgid \":meth:`Guild.create_role`\"\nmsgstr \":meth:`Guild.create_role`\"\n\n#: ../../migrating.rst:929\nmsgid \":meth:`Guild.create_stage_channel`\"\nmsgstr \":meth:`Guild.create_stage_channel`\"\n\n#: ../../migrating.rst:930\nmsgid \":meth:`Guild.create_text_channel`\"\nmsgstr \":meth:`Guild.create_text_channel`\"\n\n#: ../../migrating.rst:931\nmsgid \":meth:`Guild.create_voice_channel`\"\nmsgstr \":meth:`Guild.create_voice_channel`\"\n\n#: ../../migrating.rst:932\nmsgid \":meth:`TextChannel.create_webhook`\"\nmsgstr \":meth:`TextChannel.create_webhook`\"\n\n#: ../../migrating.rst:933\nmsgid \":meth:`Webhook.delete`\"\nmsgstr \":meth:`Webhook.delete`\"\n\n#: ../../migrating.rst:934\nmsgid \":meth:`WebhookMessage.delete`\"\nmsgstr \":meth:`WebhookMessage.delete`\"\n\n#: ../../migrating.rst:935\n#: ../../migrating.rst:1054\nmsgid \":meth:`Webhook.delete_message`\"\nmsgstr \":meth:`Webhook.delete_message`\"\n\n#: ../../migrating.rst:942\nmsgid \":meth:`StageInstance.edit`\"\nmsgstr \":meth:`StageInstance.edit`\"\n\n#: ../../migrating.rst:943\nmsgid \":meth:`StreamIntegration.edit`\"\nmsgstr \":meth:`StreamIntegration.edit`\"\n\n#: ../../migrating.rst:949\nmsgid \":meth:`Guild.edit_role_positions`\"\nmsgstr \":meth:`Guild.edit_role_positions`\"\n\n#: ../../migrating.rst:950\nmsgid \":meth:`Guild.estimate_pruned_members`\"\nmsgstr \":meth:`Guild.estimate_pruned_members`\"\n\n#: ../../migrating.rst:951\nmsgid \":meth:`TextChannel.follow`\"\nmsgstr \":meth:`TextChannel.follow`\"\n\n#: ../../migrating.rst:952\nmsgid \":meth:`Webhook.from_url`\"\nmsgstr \":meth:`Webhook.from_url`\"\n\n#: ../../migrating.rst:953\nmsgid \":meth:`abc.GuildChannel.move`\"\nmsgstr \":meth:`abc.GuildChannel.move`\"\n\n#: ../../migrating.rst:954\nmsgid \":meth:`Guild.prune_members`\"\nmsgstr \":meth:`Guild.prune_members`\"\n\n#: ../../migrating.rst:955\nmsgid \":meth:`Message.remove_reaction`\"\nmsgstr \":meth:`Message.remove_reaction`\"\n\n#: ../../migrating.rst:956\nmsgid \":meth:`Message.reply`\"\nmsgstr \":meth:`Message.reply`\"\n\n#: ../../migrating.rst:957\nmsgid \":meth:`abc.Messageable.send`\"\nmsgstr \":meth:`abc.Messageable.send`\"\n\n#: ../../migrating.rst:958\nmsgid \":meth:`Webhook.send`\"\nmsgstr \":meth:`Webhook.send`\"\n\n#: ../../migrating.rst:959\nmsgid \":meth:`abc.GuildChannel.set_permissions`\"\nmsgstr \":meth:`abc.GuildChannel.set_permissions`\"\n\n#: ../../migrating.rst:962\nmsgid \"Logging Changes\"\nmsgstr \"ログの変更\"\n\n#: ../../migrating.rst:964\nmsgid \"The library now provides a default logging configuration if using :meth:`Client.run`. To disable it, pass ``None`` to the ``log_handler`` keyword parameter. Since the library now provides a default logging configuration, certain methods were changed to no longer print to :data:`sys.stderr` but use the logger instead:\"\nmsgstr \"ライブラリは :meth:`Client.run` を使用した場合にデフォルトの logging 構成を提供するようになりました。無効化するには、 ``log_handler`` キーワード引数に ``None`` を渡してください。ライブラリがデフォルトでログ設定を提供するようになったため、次のメソッドは :data:`sys.stderr` に出力せず、ロガーを使用するように変更されました。\"\n\n#: ../../migrating.rst:966\n#: ../../migrating.rst:1048\nmsgid \":meth:`Client.on_error`\"\nmsgstr \":meth:`Client.on_error`\"\n\n#: ../../migrating.rst:967\nmsgid \":meth:`discord.ext.tasks.Loop.error`\"\nmsgstr \":meth:`discord.ext.tasks.Loop.error`\"\n\n#: ../../migrating.rst:968\nmsgid \":meth:`discord.ext.commands.Bot.on_command_error`\"\nmsgstr \":meth:`discord.ext.commands.Bot.on_command_error`\"\n\n#: ../../migrating.rst:969\nmsgid \":meth:`VoiceClient.play`\"\nmsgstr \":meth:`VoiceClient.play`\"\n\n#: ../../migrating.rst:971\nmsgid \"For more information, check :doc:`logging`.\"\nmsgstr \"詳しくは、 :doc:`logging` を確認してください。\"\n\n#: ../../migrating.rst:974\nmsgid \"Text in Voice\"\nmsgstr \"ボイスチャンネル チャット\"\n\n#: ../../migrating.rst:976\nmsgid \"In order to support text in voice functionality, a few changes had to be made:\"\nmsgstr \"ボイスチャンネル チャット機能に対応するために、いくつかの変更が行われました:\"\n\n#: ../../migrating.rst:978\nmsgid \":class:`VoiceChannel` is now :class:`abc.Messageable` so it can have messages sent and received.\"\nmsgstr \":class:`VoiceChannel` が :class:`abc.Messageable` になり、メッセージの送受信ができるようになりました。\"\n\n#: ../../migrating.rst:979\nmsgid \":attr:`Message.channel` can now be :class:`VoiceChannel`.\"\nmsgstr \":attr:`Message.channel` は :class:`VoiceChannel` になるかもしれません。\"\n\n#: ../../migrating.rst:981\nmsgid \"In the future this may include :class:`StageChannel` when Discord implements it.\"\nmsgstr \"将来的には、Discordが実装する際に、 :class:`StageChannel` でも同様の変更が行われるかもしれません。\"\n\n#: ../../migrating.rst:984\nmsgid \"Removal of ``StoreChannel``\"\nmsgstr \"``StoreChannel`` の削除\"\n\n#: ../../migrating.rst:986\nmsgid \"Discord's API has removed store channels as of `March 10th, 2022 <https://support-dev.discord.com/hc/en-us/articles/6309018858647>`_. Therefore, the library has removed support for it as well.\"\nmsgstr \"DiscordのAPIは、 `2022年3月10日 <https://support-dev.discord.com/hc/ja/articles/6309018858647>`_ をもって、ストアチャンネルを削除しました。そのため、ライブラリもそれに対するサポートを削除しました。\"\n\n#: ../../migrating.rst:988\nmsgid \"This removes the following:\"\nmsgstr \"これにより、以下が削除されます。\"\n\n#: ../../migrating.rst:990\nmsgid \"``StoreChannel``\"\nmsgstr \"``StoreChannel``\"\n\n#: ../../migrating.rst:991\nmsgid \"``commands.StoreChannelConverter``\"\nmsgstr \"``commands.StoreChannelConverter``\"\n\n#: ../../migrating.rst:992\nmsgid \"``ChannelType.store``\"\nmsgstr \"``ChannelType.store``\"\n\n#: ../../migrating.rst:995\nmsgid \"Change in ``Guild.bans`` endpoint\"\nmsgstr \"``Guild.bans`` エンドポイントの変更\"\n\n#: ../../migrating.rst:997\nmsgid \"Due to a breaking API change by Discord, :meth:`Guild.bans` no longer returns a list of every ban in the guild but instead is paginated using an asynchronous iterator.\"\nmsgstr \"Discord APIの破壊的変更のため、 :meth:`Guild.bans` はギルドのすべてのBANのリストを返さなくなり、代わりに非同期イテレータを用いてページ化されるようになりました。\"\n\n#: ../../migrating.rst:1010\nmsgid \"Flag classes now have a custom ``bool()`` implementation\"\nmsgstr \"フラグのクラスにカスタムの ``bool()`` 実装を追加\"\n\n#: ../../migrating.rst:1012\nmsgid \"To allow library users to easily check whether an instance of a flag class has any flags enabled, using `bool` on them will now only return ``True`` if at least one flag is enabled.\"\nmsgstr \"ライブラリユーザーがフラグクラスのインスタンスに何らかのフラグが立っているかどうかを確認しやすくするために、 ``bool`` を使用するとフラグが最低一個有効の場合に ``True`` を返すようにしました。\"\n\n#: ../../migrating.rst:1015\nmsgid \"This means that evaluating instances of the following classes in a bool context (such as ``if obj:``) may no longer return ``True``:\"\nmsgstr \"つまり、 真偽値の文脈 (例えば ``if obj:``) で次のクラスのインスタンスを評価するとき、 ``True`` が返されない可能性があります:\"\n\n#: ../../migrating.rst:1017\nmsgid \":class:`Intents`\"\nmsgstr \":class:`Intents`\"\n\n#: ../../migrating.rst:1018\nmsgid \":class:`MemberCacheFlags`\"\nmsgstr \":class:`MemberCacheFlags`\"\n\n#: ../../migrating.rst:1019\nmsgid \":class:`MessageFlags`\"\nmsgstr \":class:`MessageFlags`\"\n\n#: ../../migrating.rst:1020\nmsgid \":class:`Permissions`\"\nmsgstr \":class:`Permissions`\"\n\n#: ../../migrating.rst:1021\nmsgid \":class:`PublicUserFlags`\"\nmsgstr \":class:`PublicUserFlags`\"\n\n#: ../../migrating.rst:1022\nmsgid \":class:`SystemChannelFlags`\"\nmsgstr \":class:`SystemChannelFlags`\"\n\n#: ../../migrating.rst:1025\n#: ../../migrating.rst:1378\nmsgid \"Function Signature Changes\"\nmsgstr \"関数シグネチャの変更\"\n\n#: ../../migrating.rst:1027\n#: ../../migrating.rst:1380\nmsgid \"Parameters in the following methods are now all positional-only:\"\nmsgstr \"以下のメソッドの引数は全て位置限定になりました:\"\n\n#: ../../migrating.rst:1029\nmsgid \":meth:`AutoShardedClient.get_shard`\"\nmsgstr \":meth:`AutoShardedClient.get_shard`\"\n\n#: ../../migrating.rst:1030\nmsgid \":meth:`Client.get_channel`\"\nmsgstr \":meth:`Client.get_channel`\"\n\n#: ../../migrating.rst:1031\nmsgid \":meth:`Client.fetch_channel`\"\nmsgstr \":meth:`Client.fetch_channel`\"\n\n#: ../../migrating.rst:1032\nmsgid \":meth:`Guild.get_channel`\"\nmsgstr \":meth:`Guild.get_channel`\"\n\n#: ../../migrating.rst:1033\nmsgid \":meth:`Guild.fetch_channel`\"\nmsgstr \":meth:`Guild.fetch_channel`\"\n\n#: ../../migrating.rst:1034\nmsgid \":meth:`Client.get_emoji`\"\nmsgstr \":meth:`Client.get_emoji`\"\n\n#: ../../migrating.rst:1035\nmsgid \":meth:`Guild.fetch_emoji`\"\nmsgstr \":meth:`Guild.fetch_emoji`\"\n\n#: ../../migrating.rst:1036\nmsgid \":meth:`Client.get_guild`\"\nmsgstr \":meth:`Client.get_guild`\"\n\n#: ../../migrating.rst:1037\nmsgid \":meth:`Client.fetch_guild`\"\nmsgstr \":meth:`Client.fetch_guild`\"\n\n#: ../../migrating.rst:1038\nmsgid \":meth:`Client.delete_invite`\"\nmsgstr \":meth:`Client.delete_invite`\"\n\n#: ../../migrating.rst:1039\nmsgid \":meth:`Guild.get_member`\"\nmsgstr \":meth:`Guild.get_member`\"\n\n#: ../../migrating.rst:1040\nmsgid \":meth:`Guild.get_member_named`\"\nmsgstr \":meth:`Guild.get_member_named`\"\n\n#: ../../migrating.rst:1041\nmsgid \":meth:`Guild.fetch_member`\"\nmsgstr \":meth:`Guild.fetch_member`\"\n\n#: ../../migrating.rst:1042\nmsgid \":meth:`Client.get_user`\"\nmsgstr \":meth:`Client.get_user`\"\n\n#: ../../migrating.rst:1043\nmsgid \":meth:`Client.fetch_user`\"\nmsgstr \":meth:`Client.fetch_user`\"\n\n#: ../../migrating.rst:1044\nmsgid \":meth:`Guild.get_role`\"\nmsgstr \":meth:`Guild.get_role`\"\n\n#: ../../migrating.rst:1045\nmsgid \":meth:`Client.fetch_webhook`\"\nmsgstr \":meth:`Client.fetch_webhook`\"\n\n#: ../../migrating.rst:1046\nmsgid \":meth:`Client.fetch_widget`\"\nmsgstr \":meth:`Client.fetch_widget`\"\n\n#: ../../migrating.rst:1049\nmsgid \":meth:`abc.Messageable.fetch_message`\"\nmsgstr \":meth:`abc.Messageable.fetch_message`\"\n\n#: ../../migrating.rst:1050\nmsgid \":meth:`abc.GuildChannel.permissions_for`\"\nmsgstr \":meth:`abc.GuildChannel.permissions_for`\"\n\n#: ../../migrating.rst:1051\nmsgid \":meth:`DMChannel.get_partial_message`\"\nmsgstr \":meth:`DMChannel.get_partial_message`\"\n\n#: ../../migrating.rst:1052\nmsgid \":meth:`TextChannel.get_partial_message`\"\nmsgstr \":meth:`TextChannel.get_partial_message`\"\n\n#: ../../migrating.rst:1053\nmsgid \":meth:`TextChannel.delete_messages`\"\nmsgstr \":meth:`TextChannel.delete_messages`\"\n\n#: ../../migrating.rst:1055\nmsgid \":func:`utils.find`\"\nmsgstr \":func:`utils.find`\"\n\n#: ../../migrating.rst:1056\nmsgid \":func:`utils.snowflake_time`\"\nmsgstr \":func:`utils.snowflake_time`\"\n\n#: ../../migrating.rst:1058\n#: ../../migrating.rst:1424\nmsgid \"The following parameters are now positional-only:\"\nmsgstr \"以下の引数が位置限定になりました:\"\n\n#: ../../migrating.rst:1060\nmsgid \"``iterable`` in :func:`utils.get`\"\nmsgstr \":func:`utils.get` の ``iterable``\"\n\n#: ../../migrating.rst:1061\nmsgid \"``event_method`` in :meth:`Client.on_error`\"\nmsgstr \":meth:`Client.on_error` の ``event_method``\"\n\n#: ../../migrating.rst:1062\nmsgid \"``event`` in :meth:`Client.wait_for`\"\nmsgstr \":meth:`Client.wait_for` の ``event``\"\n\n#: ../../migrating.rst:1063\nmsgid \"``dt`` in :func:`utils.time_snowflake`\"\nmsgstr \":func:`utils.time_snowflake` の ``dt``\"\n\n#: ../../migrating.rst:1065\nmsgid \"The following are now keyword-only:\"\nmsgstr \"以下はキーワード限定になりました:\"\n\n#: ../../migrating.rst:1067\nmsgid \"Parameters in :meth:`Reaction.users`\"\nmsgstr \":meth:`Reaction.users` の引数\"\n\n#: ../../migrating.rst:1068\nmsgid \"Parameters in :meth:`Client.create_guild`\"\nmsgstr \":meth:`Client.create_guild` の引数\"\n\n#: ../../migrating.rst:1069\nmsgid \"``permissions``, ``guild``, ``redirect_uri``, and ``scopes`` parameters in :func:`utils.oauth_url`\"\nmsgstr \":func:`utils.oauth_url` の ``permissions``, ``guild``, ``redirect_uri``, ``scopes`` 引数\"\n\n#: ../../migrating.rst:1070\nmsgid \"``high`` in :func:`utils.snowflake_time`\"\nmsgstr \":func:`utils.snowflake_time` の ``high`` 引数\"\n\n#: ../../migrating.rst:1072\n#: ../../migrating.rst:1455\nmsgid \"The library now less often uses ``None`` as the default value for function/method parameters.\"\nmsgstr \"ライブラリは関数/メソッドの引数のデフォルト値として ``None`` を使用することが少なくなりました。\"\n\n#: ../../migrating.rst:1074\n#: ../../migrating.rst:1457\nmsgid \"As a result, these parameters can no longer be ``None``:\"\nmsgstr \"その結果、 これらの引数は ``None`` にはならなくなりました:\"\n\n#: ../../migrating.rst:1076\nmsgid \"``size``, ``format``, and ``static_format`` in :meth:`Asset.replace`\"\nmsgstr \":meth:`Asset.replace` の ``size``, ``format``, ``static_format``\"\n\n#: ../../migrating.rst:1077\nmsgid \"``check`` in :meth:`TextChannel.purge`\"\nmsgstr \":meth:`TextChannel.purge` の ``check``\"\n\n#: ../../migrating.rst:1078\nmsgid \"``icon`` and ``code`` in :meth:`Client.create_guild`\"\nmsgstr \":meth:`Client.create_guild` の ``icon`` と ``code``\"\n\n#: ../../migrating.rst:1079\nmsgid \"``roles`` in :meth:`Emoji.edit`\"\nmsgstr \":meth:`Emoji.edit` の ``roles``\"\n\n#: ../../migrating.rst:1080\nmsgid \"``topic``, ``position`` and ``overwrites`` in :meth:`Guild.create_text_channel`\"\nmsgstr \":meth:`Guild.create_text_channel` の ``topic``, ``position``, ``overwrites``\"\n\n#: ../../migrating.rst:1081\nmsgid \"``position`` and ``overwrites`` in :meth:`Guild.create_voice_channel`\"\nmsgstr \":meth:`Guild.create_voice_channel` の ``position`` と ``overwrites``\"\n\n#: ../../migrating.rst:1082\nmsgid \"``topic``, ``position`` and ``overwrites`` in :meth:`Guild.create_stage_channel`\"\nmsgstr \":meth:`Guild.create_voice_channel` の ``topic``, ``position``, ``overwrites``\"\n\n#: ../../migrating.rst:1083\nmsgid \"``position`` and ``overwrites`` in :meth:`Guild.create_category`\"\nmsgstr \":meth:`Guild.create_category` の ``position`` と ``overwrites``\"\n\n#: ../../migrating.rst:1084\nmsgid \"``roles`` in :meth:`Guild.prune_members`\"\nmsgstr \":meth:`Guild.prune_members` の ``roles``\"\n\n#: ../../migrating.rst:1085\nmsgid \"``roles`` in :meth:`Guild.estimate_pruned_members`\"\nmsgstr \":meth:`Guild.estimate_pruned_members` の ``roles``\"\n\n#: ../../migrating.rst:1086\nmsgid \"``description`` in :meth:`Guild.create_template`\"\nmsgstr \":meth:`Guild.create_template` の ``description``\"\n\n#: ../../migrating.rst:1087\nmsgid \"``roles`` in :meth:`Guild.create_custom_emoji`\"\nmsgstr \":meth:`Guild.create_custom_emoji` の ``roles``\"\n\n#: ../../migrating.rst:1088\nmsgid \"``before``, ``after``, ``oldest_first``, ``user``, and ``action`` in :meth:`Guild.audit_logs`\"\nmsgstr \":meth:`Guild.audit_logs` の ``before``, ``after``, ``oldest_first``, ``user``, ``action``\"\n\n#: ../../migrating.rst:1089\nmsgid \"``enable_emoticons`` in :meth:`StreamIntegration.edit`\"\nmsgstr \":meth:`StreamIntegration.edit` の ``enable_emoticons``\"\n\n#: ../../migrating.rst:1090\nmsgid \"``mute``, ``deafen``, ``suppress``, and ``roles`` in :meth:`Member.edit`\"\nmsgstr \":meth:`Member.edit` の ``mute``, ``deafen``, ``suppress``, ``roles``\"\n\n#: ../../migrating.rst:1091\nmsgid \"``position`` in :meth:`Role.edit`\"\nmsgstr \":meth:`Role.edit` の ``position``\"\n\n#: ../../migrating.rst:1092\nmsgid \"``icon`` in :meth:`Template.create_guild`\"\nmsgstr \":meth:`Template.create_guild` の ``icon``\"\n\n#: ../../migrating.rst:1093\nmsgid \"``name`` in :meth:`Template.edit`\"\nmsgstr \":meth:`Template.edit` の ``name``\"\n\n#: ../../migrating.rst:1094\nmsgid \"``permissions``, ``guild``, ``redirect_uri``, ``scopes`` in :meth:`utils.oauth_url`\"\nmsgstr \":meth:`utils.oauth_url` の ``permissions``, ``guild``, ``redirect_uri``, ``scopes``\"\n\n#: ../../migrating.rst:1095\nmsgid \"``content``, ``username``, ``avatar_url``, ``tts``, ``file``, ``files``, ``embed``, ``embeds``, and ``allowed_mentions`` in :meth:`Webhook.send`\"\nmsgstr \":meth:`Webhook.send` の ``content``, ``username``, ``avatar_url``, ``tts``, ``file``, ``files``, ``embed``, ``embeds``, ``allowed_mentions``\"\n\n#: ../../migrating.rst:1097\nmsgid \"Allowed types for the following parameters have been changed:\"\nmsgstr \"以下の引数で受け取られる型が変更されました:\"\n\n#: ../../migrating.rst:1099\nmsgid \"``rtc_region`` in :meth:`Guild.create_voice_channel` is now of type Optional[:class:`str`].\"\nmsgstr \":meth:`Guild.create_voice_channel` の ``rtc_region`` は Optional[:class:`str`] 型になりました。\"\n\n#: ../../migrating.rst:1100\nmsgid \"``rtc_region`` in :meth:`StageChannel.edit` is now of type Optional[:class:`str`].\"\nmsgstr \":meth:`StageChannel.edit` の ``rtc_region`` は Optional[:class:`str`] 型になりました。\"\n\n#: ../../migrating.rst:1101\nmsgid \"``rtc_region`` in :meth:`VoiceChannel.edit` is now of type Optional[:class:`str`].\"\nmsgstr \":meth:`VoiceChannel.edit` の ``rtc_region`` は Optional[:class:`str`] 型になりました。\"\n\n#: ../../migrating.rst:1102\nmsgid \"``preferred_locale`` in :meth:`Guild.edit` is now of type :class:`Locale`.\"\nmsgstr \":meth:`Guild.edit` の ``preferred_locale`` は :class:`Locale` 型になりました。\"\n\n#: ../../migrating.rst:1105\nmsgid \"Attribute Type Changes\"\nmsgstr \"属性の型の変更\"\n\n#: ../../migrating.rst:1109\nmsgid \":attr:`DMChannel.recipient` may now be ``None``.\"\nmsgstr \":attr:`DMChannel.recipient` が ``None`` になりうるようになりました。\"\n\n#: ../../migrating.rst:1110\nmsgid \":meth:`Guild.vanity_invite` may now be ``None``. This has been done to fix an issue with the method returning a broken :class:`Invite` object.\"\nmsgstr \":meth:`Guild.vanity_invite` が ``None`` を返しうるようになりました。これはこのメソッドが壊れた :class:`Invite` オブジェクトを返す問題を解決するために行われました。\"\n\n#: ../../migrating.rst:1111\nmsgid \":meth:`Widget.fetch_invite` may now be ``None``.\"\nmsgstr \":meth:`Widget.fetch_invite` が ``None`` を返しうるようになりました。\"\n\n#: ../../migrating.rst:1112\nmsgid \":attr:`Guild.shard_id` is now ``0`` instead of ``None`` if :class:`AutoShardedClient` is not used.\"\nmsgstr \":class:`AutoShardedClient` が使われていない場合、 :attr:`Guild.shard_id` は ``None`` の代わりに ``0`` になるようになりました。\"\n\n#: ../../migrating.rst:1113\nmsgid \":attr:`Guild.mfa_level` is now of type :class:`MFALevel`.\"\nmsgstr \":attr:`Guild.mfa_level` は :class:`MFALevel` 型に変更されました。\"\n\n#: ../../migrating.rst:1114\nmsgid \":attr:`Guild.member_count` is now of type Optional[:class:`int`].\"\nmsgstr \":attr:`Guild.member_count` の型が Optional[:class:`int`] に変更されました。\"\n\n#: ../../migrating.rst:1115\nmsgid \":attr:`AuditLogDiff.mfa_level` is now of type :class:`MFALevel`.\"\nmsgstr \":attr:`AuditLogDiff.mfa_level` は :class:`MFALevel` 型に変更されました。\"\n\n#: ../../migrating.rst:1116\nmsgid \":attr:`AuditLogDiff.rtc_region` is now of type :class:`str`.\"\nmsgstr \":attr:`AuditLogDiff.rtc_region` は :class:`str` 型に変更されました。\"\n\n#: ../../migrating.rst:1117\nmsgid \":attr:`StageChannel.rtc_region` is now of type :class:`str`.\"\nmsgstr \":attr:`StageChannel.rtc_region` は :class:`str` 型に変更されました。\"\n\n#: ../../migrating.rst:1118\nmsgid \":attr:`VoiceChannel.rtc_region` is now of type :class:`str`.\"\nmsgstr \":attr:`VoiceChannel.rtc_region` は :class:`str` 型になりました。\"\n\n#: ../../migrating.rst:1119\nmsgid \":attr:`ClientUser.avatar` is now ``None`` when the default avatar is used.\"\nmsgstr \":attr:`ClientUser.avatar` は、デフォルトのアバターが利用されている場合は ``None`` に変更されました。\"\n\n#: ../../migrating.rst:1121\nmsgid \"If you want the avatar that a user has displayed, consider :attr:`ClientUser.display_avatar`.\"\nmsgstr \"ユーザーの表示されているアバターを取得したい場合は、 :attr:`ClientUser.display_avatar` を検討してください。\"\n\n#: ../../migrating.rst:1123\nmsgid \":attr:`Member.avatar` is now ``None`` when the default avatar is used.\"\nmsgstr \":attr:`Member.avatar` は、デフォルトのアバターが使用されている場合は ``None`` に変更されました。\"\n\n#: ../../migrating.rst:1125\nmsgid \"If you want the avatar that a member or user has displayed, consider :attr:`Member.display_avatar` or :attr:`User.display_avatar`.\"\nmsgstr \"メンバーやユーザーが表示しているアバターを取得したい場合は、 :attr:`Member.display_avatar` または :attr:`User.display_avatar` を検討してください。\"\n\n#: ../../migrating.rst:1128\nmsgid \":attr:`User.avatar` is now ``None`` when the default avatar is used.\"\nmsgstr \":attr:`User.avatar` は、デフォルトのアバターが利用されている場合は ``None`` に変更されました。\"\n\n#: ../../migrating.rst:1130\nmsgid \"If you want the avatar that a user has displayed, consider :attr:`User.display_avatar`.\"\nmsgstr \"ユーザーが表示しているアバターを取得したい場合は、 :attr:`User.display_avatar` を検討してください。\"\n\n#: ../../migrating.rst:1132\nmsgid \":attr:`Webhook.avatar` is now ``None`` when the default avatar is used.\"\nmsgstr \":attr:`Webhook.avatar` は、デフォルトのアバターが利用されている場合は ``None`` に変更されました。\"\n\n#: ../../migrating.rst:1134\nmsgid \"If you want the avatar that a webhook has displayed, consider :attr:`Webhook.display_avatar`.\"\nmsgstr \"Webhookに表示されるアバターを取得したい場合は、 :attr:`Webhook.display_avatar` を検討してください。\"\n\n#: ../../migrating.rst:1136\nmsgid \":attr:`AuditLogEntry.target` may now be a :class:`PartialMessageable`.\"\nmsgstr \":attr:`AuditLogEntry.target` が :class:`PartialMessageable` になりうるようになりました。\"\n\n#: ../../migrating.rst:1137\nmsgid \":attr:`PartialMessage.channel` may now be a :class:`PartialMessageable`.\"\nmsgstr \":attr:`PartialMessage.channel` が :class:`PartialMessageable` になりうるようになりました。\"\n\n#: ../../migrating.rst:1138\nmsgid \":attr:`Guild.preferred_locale` is now of type :class:`Locale`.\"\nmsgstr \":attr:`Guild.preferred_locale` の型が :class:`Locale` になりました。\"\n\n#: ../../migrating.rst:1139\nmsgid \":attr:`abc.GuildChannel.overwrites` keys can now have :class:`Object` in them.\"\nmsgstr \":attr:`abc.GuildChannel.overwrites` のキーが :class:`Object` になりうるようになりました。\"\n\n#: ../../migrating.rst:1142\n#: ../../migrating.rst:1468\nmsgid \"Removals\"\nmsgstr \"削除\"\n\n#: ../../migrating.rst:1144\nmsgid \"The following deprecated functionality have been removed:\"\nmsgstr \"以下の非推奨の機能は削除されました。\"\n\n#: ../../migrating.rst:1146\nmsgid \"``Client.request_offline_members``\"\nmsgstr \"``Client.request_offline_members``\"\n\n#: ../../migrating.rst:1148\n#: ../../migrating.rst:1152\nmsgid \"Use :meth:`Guild.chunk` instead.\"\nmsgstr \"代わりに :meth:`Guild.chunk` を使用してください。\"\n\n#: ../../migrating.rst:1150\nmsgid \"``AutoShardedClient.request_offline_members``\"\nmsgstr \"``AutoShardedClient.request_offline_members``\"\n\n#: ../../migrating.rst:1154\nmsgid \"``Client.logout``\"\nmsgstr \"``Client.logout``\"\n\n#: ../../migrating.rst:1156\nmsgid \"Use :meth:`Client.close` instead.\"\nmsgstr \"代わりに :meth:`Client.close` を使用してください。\"\n\n#: ../../migrating.rst:1158\nmsgid \"``fetch_offline_members`` parameter from :class:`Client` constructor\"\nmsgstr \":class:`Client` コンストラクタの ``fetch_offline_members`` パラメータ\"\n\n#: ../../migrating.rst:1160\nmsgid \"Use ``chunk_guild_at_startup`` instead.\"\nmsgstr \"代わりに ``chunk_guild_at_startup`` を使用してください。\"\n\n#: ../../migrating.rst:1163\nmsgid \"``Permissions.use_slash_commands`` and ``PermissionOverwrite.use_slash_commands``\"\nmsgstr \"``Permissions.use_slash_commands`` と ``PermissionOverwrite.use_slash_commands``\"\n\n#: ../../migrating.rst:1163\nmsgid \"Use :attr:`Permissions.use_application_commands` and ``PermissionOverwrite.use_application_commands`` instead.\"\nmsgstr \"代わりに :attr:`Permissions.use_application_commands` と ``PermissionOverwrite.use_application_commands`` を使用してください。\"\n\n#: ../../migrating.rst:1167\nmsgid \"``MemberCacheFlags.online``\"\nmsgstr \"``MemberCacheFlags.online``\"\n\n#: ../../migrating.rst:1169\nmsgid \"There is no replacement for this one. The current API version no longer provides enough data for this to be possible.\"\nmsgstr \"置換先はありません。現在のAPIバージョンは、このために必要な十分なデータを提供しません。\"\n\n#: ../../migrating.rst:1171\nmsgid \"``AppInfo.summary``\"\nmsgstr \"``AppInfo.summary``\"\n\n#: ../../migrating.rst:1173\nmsgid \"There is no replacement for this one. The current API version no longer provides this field.\"\nmsgstr \"この項目を置き換えることはできません。現在の API バージョンではこの項目は提供されません。\"\n\n#: ../../migrating.rst:1175\nmsgid \"``User.permissions_in`` and ``Member.permissions_in``\"\nmsgstr \"``User.permissions_in`` と ``Member.permissions_in``\"\n\n#: ../../migrating.rst:1177\nmsgid \"Use :meth:`abc.GuildChannel.permissions_for` instead.\"\nmsgstr \"代わりに :meth:`abc.GuildChannel.permissions_for` を使用してください。\"\n\n#: ../../migrating.rst:1179\nmsgid \"``guild_subscriptions`` parameter from :class:`Client` constructor\"\nmsgstr \":class:`Client` コンストラクタの ``guild_subscriptions`` パラメータ\"\n\n#: ../../migrating.rst:1181\nmsgid \"The current API version no longer provides this functionality. Use ``intents`` parameter instead.\"\nmsgstr \"現在の API バージョンはこの機能を提供していません。代わりに ``intents`` パラメーターを使用してください。\"\n\n#: ../../migrating.rst:1183\nmsgid \":class:`VerificationLevel` aliases:\"\nmsgstr \":class:`VerificationLevel` のエイリアス\"\n\n#: ../../migrating.rst:1185\nmsgid \"``VerificationLevel.table_flip`` - use :attr:`VerificationLevel.high` instead.\"\nmsgstr \"``VerificationLevel.table_flip`` - 代わりに :attr:`VerificationLevel.high` を使用してください。\"\n\n#: ../../migrating.rst:1186\nmsgid \"``VerificationLevel.extreme`` - use :attr:`VerificationLevel.highest` instead.\"\nmsgstr \"``VerificationLevel.extreme`` - 代わりに :attr:`VerificationLevel.highest` を使用してください。\"\n\n#: ../../migrating.rst:1187\nmsgid \"``VerificationLevel.double_table_flip`` - use :attr:`VerificationLevel.highest` instead.\"\nmsgstr \"``VerificationLevel.double_table_flip`` - 代わりに :attr:`VerificationLevel.highest` を使用してください。\"\n\n#: ../../migrating.rst:1188\nmsgid \"``VerificationLevel.very_high`` - use :attr:`VerificationLevel.highest` instead.\"\nmsgstr \"``VerificationLevel.very_high`` - 代わりに :attr:`VerificationLevel.highest` を利用してください。\"\n\n#: ../../migrating.rst:1190\nmsgid \"``topic`` parameter from :meth:`StageChannel.edit`\"\nmsgstr \":meth:`StageChannel.edit` の ``topic`` パラメータ\"\n\n#: ../../migrating.rst:1192\nmsgid \"The ``topic`` parameter must now be set via :meth:`StageChannel.create_instance`.\"\nmsgstr \"``topic`` パラメーターは :meth:`StageChannel.create_instance` で設定する必要があります。\"\n\n#: ../../migrating.rst:1194\nmsgid \"``Reaction.custom_emoji``\"\nmsgstr \"``Reaction.custom_emoji``\"\n\n#: ../../migrating.rst:1196\nmsgid \"Use :meth:`Reaction.is_custom_emoji` instead.\"\nmsgstr \"代わりに :meth:`Reaction.is_custom_emoji` を使用してください。\"\n\n#: ../../migrating.rst:1198\nmsgid \"``AuditLogDiff.region``\"\nmsgstr \"``AuditLogDiff.region``\"\n\n#: ../../migrating.rst:1199\nmsgid \"``Guild.region``\"\nmsgstr \"``Guild.region``\"\n\n#: ../../migrating.rst:1200\nmsgid \"``VoiceRegion``\"\nmsgstr \"``VoiceRegion``\"\n\n#: ../../migrating.rst:1202\nmsgid \"This has been marked deprecated by Discord and it was usually more or less out of date due to the pace they added them anyway.\"\nmsgstr \"これはDiscordより非推奨とされていて、また追加されたペースが速いため多くの場合で反映するのが遅れていました。\"\n\n#: ../../migrating.rst:1204\nmsgid \"``region`` parameter from :meth:`Client.create_guild`\"\nmsgstr \":meth:`Client.create_guild` の ``region`` パラメータ\"\n\n#: ../../migrating.rst:1205\nmsgid \"``region`` parameter from :meth:`Template.create_guild`\"\nmsgstr \":meth:`Template.create_guild` の ``region`` パラメータ\"\n\n#: ../../migrating.rst:1206\nmsgid \"``region`` parameter from :meth:`Guild.edit`\"\nmsgstr \":meth:`Guild.edit` の ``region`` パラメータ\"\n\n#: ../../migrating.rst:1207\nmsgid \"``on_private_channel_create`` event\"\nmsgstr \"``on_private_channel_create`` イベント\"\n\n#: ../../migrating.rst:1209\n#: ../../migrating.rst:1213\nmsgid \"Discord API no longer sends channel create event for DMs.\"\nmsgstr \"Discord APIは、DMにはチャンネル作成イベントを送信しないようになりました。\"\n\n#: ../../migrating.rst:1211\nmsgid \"``on_private_channel_delete`` event\"\nmsgstr \"``on_private_channel_delete`` イベント\"\n\n#: ../../migrating.rst:1215\nmsgid \"The undocumented private ``on_socket_response`` event\"\nmsgstr \"文書化されていないプライベートな ``on_socket_response`` イベント\"\n\n#: ../../migrating.rst:1217\nmsgid \"Consider using the newer documented :func:`on_socket_event_type` event instead.\"\nmsgstr \"代わりに、より新しくドキュメント化された :func:`on_socket_event_type` イベントを使用することを検討してください。\"\n\n#: ../../migrating.rst:1219\nmsgid \"``abc.Messageable.trigger_typing``\"\nmsgstr \"``abc.Messageable.trigger_typing``\"\n\n#: ../../migrating.rst:1221\nmsgid \"Use :meth:`abc.Messageable.typing` with ``await`` instead.\"\nmsgstr \"代わりに :meth:`abc.Messageable.typing` を ``await`` してください。\"\n\n#: ../../migrating.rst:1224\n#: ../../migrating.rst:1483\nmsgid \"Miscellaneous Changes\"\nmsgstr \"その他の変更点\"\n\n#: ../../migrating.rst:1228\nmsgid \":func:`on_socket_raw_receive` is now only called if ``enable_debug_events`` is set on :class:`Client`.\"\nmsgstr \":class:`Client` に ``enable_debug_events`` が設定されている場合にのみ :func:`on_socket_raw_receive` が呼び出されるようになりました。\"\n\n#: ../../migrating.rst:1229\nmsgid \":func:`on_socket_raw_receive` is now only called once the **complete** message is received and decompressed. The passed ``msg`` parameter is now always :class:`str`.\"\nmsgstr \":func:`on_socket_raw_receive` は **完全な** メッセージを受信して解凍した後にのみ呼び出されるようになりました。渡された ``msg`` パラメータは 常に :class:`str` になりました。\"\n\n#: ../../migrating.rst:1230\nmsgid \":func:`on_socket_raw_send` is now only called if ``enable_debug_events`` is set on :class:`Client`.\"\nmsgstr \":class:`Client` に ``enable_debug_events`` が設定されている場合にのみ :func:`on_socket_raw_send` が呼び出されるようになりました。\"\n\n#: ../../migrating.rst:1231\nmsgid \"The documented return type for :meth:`Guild.fetch_channels` changed to Sequence[:class:`abc.GuildChannel`].\"\nmsgstr \"文書化された :meth:`Guild.fetch_channels` の戻り値の型は Sequence[:class:`abc.GuildChannel`] に変更されました。\"\n\n#: ../../migrating.rst:1232\nmsgid \":func:`utils.resolve_invite` now returns a :class:`ResolvedInvite` class.\"\nmsgstr \":func:`utils.resolve_invite` が :class:`ResolvedInvite` クラスを返すようになりました。\"\n\n#: ../../migrating.rst:1233\nmsgid \":func:`utils.oauth_url` now defaults to ``bot`` and ``applications.commands`` scopes when not given instead of just ``bot``.\"\nmsgstr \":func:`utils.oauth_url` のスコープが与えられていない場合の初期値が ``bot`` から ``bot`` と ``applications.commands`` に変更されました。\"\n\n#: ../../migrating.rst:1234\nmsgid \":meth:`abc.Messageable.typing` can no longer be used as a regular (non-async) context manager.\"\nmsgstr \":meth:`abc.Messageable.typing` は、通常の(非同期でない)コンテキストマネージャーとしては使用できなくなりました。\"\n\n#: ../../migrating.rst:1235\nmsgid \":attr:`Intents.emojis` is now an alias of :attr:`Intents.emojis_and_stickers`.\"\nmsgstr \":attr:`Intents.emojis` が :attr:`Intents.emojis_and_stickers` のエイリアスになりました。\"\n\n#: ../../migrating.rst:1237\nmsgid \"This may affect code that iterates through ``(name, value)`` pairs in an instance of this class:\"\nmsgstr \"これは、このクラスのインスタンス内の ``(name, value)`` ペアをイテレートするコードに影響を与える可能性があります。\"\n\n#: ../../migrating.rst:1259\nmsgid \"``created_at`` is no longer part of :class:`abc.Snowflake`.\"\nmsgstr \"``created_at`` は :class:`abc.Snowflake` の一部ではなくなりました。\"\n\n#: ../../migrating.rst:1261\nmsgid \"All of the existing classes still keep this attribute. It is just no longer part of this protocol. This has been done because Discord reuses IDs (snowflakes) of some models in other models. For example, if :class:`Thread` is created from a message, its :attr:`Thread.id` is equivalent to the ID of that message and as such it doesn't contain information about creation time of the thread and :attr:`Thread.created_at` cannot be based on it.\"\nmsgstr \"既存のすべてのクラスは、この属性を保持します。ただ、このプロトコルの一部ではなくなりました。これは、DiscordがいくつかのモデルのID(snowflake)を他のモデルで再利用するために行われました。例えば、あるメッセージから :class:`Thread` が作成された場合、その :attr:`Thread.id` はそのメッセージの ID と同じで、スレッドの作成時刻に関する情報は含まれず、 :attr:`Thread.created_at` に基づいて作成することはできません。\"\n\n#: ../../migrating.rst:1266\nmsgid \":class:`Embed`'s bool implementation now returns ``True`` when embed has any data set.\"\nmsgstr \":class:`Embed` の bool 実装では、埋め込みに何らかのデータが設定されていれば ``True`` が返されるようになりました。\"\n\n#: ../../migrating.rst:1267\nmsgid \"Calling :meth:`Emoji.edit` without ``roles`` argument no longer makes the emoji available to everyone.\"\nmsgstr \":meth:`Emoji.edit` を ``roles`` 引数なしで呼び出したときに、絵文字が全員に利用できるようにならなくなりました。\"\n\n#: ../../migrating.rst:1269\nmsgid \"To make the emoji available to everyone, pass an empty list to ``roles`` instead.\"\nmsgstr \"絵文字を誰でも利用できるようにするには、空のリストを ``roles`` に渡してください。\"\n\n#: ../../migrating.rst:1271\nmsgid \"The old ``Colour.blurple`` has been renamed to :attr:`Colour.og_blurple`.\"\nmsgstr \"古い ``Colour.blurple`` は :attr:`Colour.og_blurple` に改名されました。\"\n\n#: ../../migrating.rst:1273\nmsgid \":attr:`Colour.blurple` refers to a different colour now.\"\nmsgstr \":attr:`Colour.blurple` は別の色を参照するようになりました。\"\n\n#: ../../migrating.rst:1275\nmsgid \":attr:`Message.type` is now set to :attr:`MessageType.reply` when a message is a reply.\"\nmsgstr \"メッセージが返信である場合、 :attr:`Message.type` が :attr:`MessageType.reply` に設定されるようになりました。\"\n\n#: ../../migrating.rst:1277\nmsgid \"This is caused by a difference in behavior in the current Discord API version.\"\nmsgstr \"これは、現在のDiscordAPIバージョンでの動作の違いによって引き起こされます。\"\n\n#: ../../migrating.rst:1279\nmsgid \":meth:`Message.edit` now merges object passed in ``allowed_mentions`` parameter with :attr:`Client.allowed_mentions`. If the parameter isn't provided, the defaults given by :attr:`Client.allowed_mentions` are used instead.\"\nmsgstr \":meth:`Message.edit` は ``allowed_mentions`` パラメータで渡されたオブジェクトを :attr:`Client.allowed_mentions` と合わせるようになりました。このパラメータが指定されていない場合は、代わりに :attr:`Client.allowed_mentions` で指定されたデフォルト値が使用されます。\"\n\n#: ../../migrating.rst:1282\nmsgid \":meth:`Permissions.stage_moderator` now includes the :attr:`Permissions.manage_channels` permission and the :attr:`Permissions.request_to_speak` permission is no longer included.\"\nmsgstr \":meth:`Permissions.stage_moderator` に :attr:`Permissions.manage_channels` 権限が含まれるようになり、 :attr:`Permissions.request_to_speak` 権限が含まれなくなりました。\"\n\n#: ../../migrating.rst:1284\nmsgid \":attr:`File.filename` will no longer be ``None``, in situations where previously this was the case the filename is set to ``'untitled'``.\"\nmsgstr \":attr:`File.filename` が ``None`` になることはなくなりました。以前そうなった場合ではファイル名は ``'untitled'`` になります。\"\n\n#: ../../migrating.rst:1286\nmsgid \":attr:`Message.application` will no longer be a raw :class:`dict` of the API payload and now returns an instance of :class:`MessageApplication`.\"\nmsgstr \":attr:`Message.application` が生のAPIペイロードの :class:`dict` ではなくなり、 :class:`MessageApplication` インスタンスを返すようになりました。\"\n\n#: ../../migrating.rst:1289\nmsgid \":meth:`VoiceProtocol.connect` signature changes.\"\nmsgstr \":meth:`VoiceProtocol.connect` のシグネチャ変更\"\n\n#: ../../migrating.rst:1291\nmsgid \":meth:`VoiceProtocol.connect` will now be passed 2 keyword only arguments, ``self_deaf`` and ``self_mute``. These indicate whether or not the client should join the voice chat being deafened or muted.\"\nmsgstr \":meth:`VoiceProtocol.connect` に、 ``self_deaf`` と ``self_mute`` キーワード引数が渡されるようになりました。これはクライアントがボイスチャットに参加する際にスピーカーミュートし、またはミュートすべきかを示します。\"\n\n#: ../../migrating.rst:1297\nmsgid \"Command Extension Changes\"\nmsgstr \"コマンド拡張の変更\"\n\n#: ../../migrating.rst:1302\nmsgid \"Extension and Cog Loading / Unloading is Now Asynchronous\"\nmsgstr \"エクステンションとコグの読み込み・解除の非同期化\"\n\n#: ../../migrating.rst:1304\nmsgid \"As an extension to the :ref:`asyncio changes <migrating_2_0_client_async_setup>` the loading and unloading of extensions and cogs is now asynchronous.\"\nmsgstr \":ref:`asyncio の変更 <migrating_2_0_client_async_setup>` に伴い、エクステンションとコグの読み込みや読み込み解除が非同期処理となりました。\"\n\n#: ../../migrating.rst:1306\nmsgid \"To accommodate this, the following changes have been made:\"\nmsgstr \"これに対応するために、以下のように変更が行われました：\"\n\n#: ../../migrating.rst:1308\nmsgid \"The ``setup`` and ``teardown`` functions in extensions must now be coroutines.\"\nmsgstr \"エクステンションの ``setup`` と ``teardown`` 関数はコルーチンでないといけません。\"\n\n#: ../../migrating.rst:1309\nmsgid \":meth:`ext.commands.Bot.load_extension` must now be awaited.\"\nmsgstr \":meth:`ext.commands.Bot.load_extension` を呼び出すときには await が必要です。\"\n\n#: ../../migrating.rst:1310\nmsgid \":meth:`ext.commands.Bot.unload_extension` must now be awaited.\"\nmsgstr \":meth:`ext.commands.Bot.unload_extension` を呼び出すときには await が必要です。\"\n\n#: ../../migrating.rst:1311\nmsgid \":meth:`ext.commands.Bot.reload_extension` must now be awaited.\"\nmsgstr \":meth:`ext.commands.Bot.reload_extension` を呼び出すときには await が必要です。\"\n\n#: ../../migrating.rst:1312\nmsgid \":meth:`ext.commands.Bot.add_cog` must now be awaited.\"\nmsgstr \":meth:`ext.commands.Bot.add_cog` を呼び出すときには await が必要です。\"\n\n#: ../../migrating.rst:1313\nmsgid \":meth:`ext.commands.Bot.remove_cog` must now be awaited.\"\nmsgstr \":meth:`ext.commands.Bot.remove_cog` を呼び出すときには await が必要です。\"\n\n#: ../../migrating.rst:1315\nmsgid \"Quick example of an extension setup function:\"\nmsgstr \"エクステンションのセットアップの簡単な例：\"\n\n#: ../../migrating.rst:1327\nmsgid \"Quick example of loading an extension:\"\nmsgstr \"エクステンションの読み込みの簡単な例：\"\n\n#: ../../migrating.rst:1349\nmsgid \"Converters Are Now Generic Runtime Protocols\"\nmsgstr \"コンバータの汎用ランタイムプロトコル化\"\n\n#: ../../migrating.rst:1351\nmsgid \":class:`~ext.commands.Converter` is now a :func:`runtime-checkable <typing.runtime_checkable>` :class:`typing.Protocol`.\"\nmsgstr \":class:`~ext.commands.Converter` が :func:`runtime-checkable <typing.runtime_checkable>` な :class:`typing.Protocol` になりました。\"\n\n#: ../../migrating.rst:1353\nmsgid \"This results in a change of the base metaclass used by these classes which may affect user-created classes that inherit from :class:`~ext.commands.Converter`.\"\nmsgstr \"その結果、これらのクラスで使用されるベースメタクラスが変更され、 :class:`~ext.commands.Converter` を継承するユーザーが作成したクラスに影響を与える可能性があります。\"\n\n#: ../../migrating.rst:1374\nmsgid \"In addition, :class:`~ext.commands.Converter` is now a :class:`typing.Generic` which (optionally) allows the users to define their type hints more accurately.\"\nmsgstr \"さらに、 :class:`~ext.commands.Converter` は :class:`typing.Generic` になり、ユーザーは(自己判断で)型ヒントをより正確に定義することができます。\"\n\n#: ../../migrating.rst:1382\nmsgid \":meth:`ext.commands.when_mentioned`\"\nmsgstr \":meth:`ext.commands.when_mentioned`\"\n\n#: ../../migrating.rst:1383\nmsgid \":meth:`ext.commands.Bot.on_command_error`\"\nmsgstr \":meth:`ext.commands.Bot.on_command_error`\"\n\n#: ../../migrating.rst:1384\nmsgid \":meth:`ext.commands.Bot.check`\"\nmsgstr \":meth:`ext.commands.Bot.check`\"\n\n#: ../../migrating.rst:1385\nmsgid \":meth:`ext.commands.Bot.check_once`\"\nmsgstr \":meth:`ext.commands.Bot.check_once`\"\n\n#: ../../migrating.rst:1386\nmsgid \":meth:`ext.commands.Bot.is_owner`\"\nmsgstr \":meth:`ext.commands.Bot.is_owner`\"\n\n#: ../../migrating.rst:1387\nmsgid \":meth:`ext.commands.Bot.before_invoke`\"\nmsgstr \":meth:`ext.commands.Bot.before_invoke`\"\n\n#: ../../migrating.rst:1388\nmsgid \":meth:`ext.commands.Bot.after_invoke`\"\nmsgstr \":meth:`ext.commands.Bot.after_invoke`\"\n\n#: ../../migrating.rst:1389\nmsgid \":meth:`ext.commands.Bot.get_prefix`\"\nmsgstr \":meth:`ext.commands.Bot.get_prefix`\"\n\n#: ../../migrating.rst:1390\nmsgid \":meth:`ext.commands.Bot.invoke`\"\nmsgstr \":meth:`ext.commands.Bot.invoke`\"\n\n#: ../../migrating.rst:1391\nmsgid \":meth:`ext.commands.Bot.process_commands`\"\nmsgstr \":meth:`ext.commands.Bot.process_commands`\"\n\n#: ../../migrating.rst:1392\nmsgid \":meth:`ext.commands.Command.is_on_cooldown`\"\nmsgstr \":meth:`ext.commands.Command.is_on_cooldown`\"\n\n#: ../../migrating.rst:1393\nmsgid \":meth:`ext.commands.Command.reset_cooldown`\"\nmsgstr \":meth:`ext.commands.Command.reset_cooldown`\"\n\n#: ../../migrating.rst:1394\nmsgid \":meth:`ext.commands.Command.get_cooldown_retry_after`\"\nmsgstr \":meth:`ext.commands.Command.get_cooldown_retry_after`\"\n\n#: ../../migrating.rst:1395\nmsgid \":meth:`ext.commands.Command.error`\"\nmsgstr \":meth:`ext.commands.Command.error`\"\n\n#: ../../migrating.rst:1396\nmsgid \":meth:`ext.commands.Command.before_invoke`\"\nmsgstr \":meth:`ext.commands.Command.before_invoke`\"\n\n#: ../../migrating.rst:1397\nmsgid \":meth:`ext.commands.Command.after_invoke`\"\nmsgstr \":meth:`ext.commands.Command.after_invoke`\"\n\n#: ../../migrating.rst:1398\nmsgid \":meth:`ext.commands.Command.can_run`\"\nmsgstr \":meth:`ext.commands.Command.can_run`\"\n\n#: ../../migrating.rst:1399\nmsgid \":meth:`ext.commands.check`\"\nmsgstr \":meth:`ext.commands.check`\"\n\n#: ../../migrating.rst:1400\nmsgid \":meth:`ext.commands.has_role`\"\nmsgstr \":meth:`ext.commands.has_role`\"\n\n#: ../../migrating.rst:1401\nmsgid \":meth:`ext.commands.bot_has_role`\"\nmsgstr \":meth:`ext.commands.bot_has_role`\"\n\n#: ../../migrating.rst:1402\nmsgid \":meth:`ext.commands.before_invoke`\"\nmsgstr \":meth:`ext.commands.before_invoke`\"\n\n#: ../../migrating.rst:1403\nmsgid \":meth:`ext.commands.after_invoke`\"\nmsgstr \":meth:`ext.commands.after_invoke`\"\n\n#: ../../migrating.rst:1404\nmsgid \":meth:`ext.commands.HelpCommand.get_command_signature`\"\nmsgstr \":meth:`ext.commands.HelpCommand.get_command_signature`\"\n\n#: ../../migrating.rst:1405\nmsgid \":meth:`ext.commands.HelpCommand.remove_mentions`\"\nmsgstr \":meth:`ext.commands.HelpCommand.remove_mentions`\"\n\n#: ../../migrating.rst:1406\nmsgid \":meth:`ext.commands.HelpCommand.command_not_found`\"\nmsgstr \":meth:`ext.commands.HelpCommand.command_not_found`\"\n\n#: ../../migrating.rst:1407\nmsgid \":meth:`ext.commands.HelpCommand.subcommand_not_found`\"\nmsgstr \":meth:`ext.commands.HelpCommand.subcommand_not_found`\"\n\n#: ../../migrating.rst:1408\nmsgid \":meth:`ext.commands.HelpCommand.get_max_size`\"\nmsgstr \":meth:`ext.commands.HelpCommand.get_max_size`\"\n\n#: ../../migrating.rst:1409\nmsgid \":meth:`ext.commands.HelpCommand.send_error_message`\"\nmsgstr \":meth:`ext.commands.HelpCommand.send_error_message`\"\n\n#: ../../migrating.rst:1410\nmsgid \":meth:`ext.commands.HelpCommand.on_help_command_error`\"\nmsgstr \":meth:`ext.commands.HelpCommand.on_help_command_error`\"\n\n#: ../../migrating.rst:1411\nmsgid \":meth:`ext.commands.HelpCommand.send_bot_help`\"\nmsgstr \":meth:`ext.commands.HelpCommand.send_bot_help`\"\n\n#: ../../migrating.rst:1412\nmsgid \":meth:`ext.commands.HelpCommand.send_cog_help`\"\nmsgstr \":meth:`ext.commands.HelpCommand.send_cog_help`\"\n\n#: ../../migrating.rst:1413\nmsgid \":meth:`ext.commands.HelpCommand.send_group_help`\"\nmsgstr \":meth:`ext.commands.HelpCommand.send_group_help`\"\n\n#: ../../migrating.rst:1414\nmsgid \":meth:`ext.commands.HelpCommand.send_command_help`\"\nmsgstr \":meth:`ext.commands.HelpCommand.send_command_help`\"\n\n#: ../../migrating.rst:1415\nmsgid \":meth:`ext.commands.HelpCommand.prepare_help_command`\"\nmsgstr \":meth:`ext.commands.HelpCommand.prepare_help_command`\"\n\n#: ../../migrating.rst:1416\nmsgid \":meth:`ext.commands.DefaultHelpCommand.shorten_text`\"\nmsgstr \":meth:`ext.commands.DefaultHelpCommand.shorten_text`\"\n\n#: ../../migrating.rst:1417\nmsgid \":meth:`ext.commands.DefaultHelpCommand.add_command_formatting`\"\nmsgstr \":meth:`ext.commands.DefaultHelpCommand.add_command_formatting`\"\n\n#: ../../migrating.rst:1418\nmsgid \":meth:`ext.commands.MinimalHelpCommand.get_command_signature`\"\nmsgstr \":meth:`ext.commands.MinimalHelpCommand.get_command_signature`\"\n\n#: ../../migrating.rst:1419\nmsgid \":meth:`ext.commands.MinimalHelpCommand.add_bot_commands_formatting`\"\nmsgstr \":meth:`ext.commands.MinimalHelpCommand.add_bot_commands_formatting`\"\n\n#: ../../migrating.rst:1420\nmsgid \":meth:`ext.commands.MinimalHelpCommand.add_subcommand_formatting`\"\nmsgstr \":meth:`ext.commands.MinimalHelpCommand.add_subcommand_formatting`\"\n\n#: ../../migrating.rst:1421\nmsgid \":meth:`ext.commands.MinimalHelpCommand.add_aliases_formatting`\"\nmsgstr \":meth:`ext.commands.MinimalHelpCommand.add_aliases_formatting`\"\n\n#: ../../migrating.rst:1422\nmsgid \":meth:`ext.commands.MinimalHelpCommand.add_command_formatting`\"\nmsgstr \":meth:`ext.commands.MinimalHelpCommand.add_command_formatting`\"\n\n#: ../../migrating.rst:1426\nmsgid \"``func`` in :meth:`ext.commands.Bot.check`\"\nmsgstr \":meth:`ext.commands.Bot.check` の ``func``\"\n\n#: ../../migrating.rst:1427\nmsgid \"``func`` in :meth:`ext.commands.Bot.add_check`\"\nmsgstr \":meth:`ext.commands.Bot.add_check` の ``func``\"\n\n#: ../../migrating.rst:1428\nmsgid \"``func`` in :meth:`ext.commands.Bot.remove_check`\"\nmsgstr \":meth:`ext.commands.Bot.remove_check` の ``func``\"\n\n#: ../../migrating.rst:1429\nmsgid \"``func`` in :meth:`ext.commands.Bot.check_once`\"\nmsgstr \":meth:`ext.commands.Bot.check_once` の ``func``\"\n\n#: ../../migrating.rst:1430\nmsgid \"``func`` in :meth:`ext.commands.Bot.add_listener`\"\nmsgstr \":meth:`ext.commands.Bot.add_listener` の ``func``\"\n\n#: ../../migrating.rst:1431\nmsgid \"``func`` in :meth:`ext.commands.Bot.remove_listener`\"\nmsgstr \":meth:`ext.commands.Bot.remove_listener` の ``func``\"\n\n#: ../../migrating.rst:1432\nmsgid \"``message`` in :meth:`ext.commands.Bot.get_context`\"\nmsgstr \":meth:`ext.commands.Bot.get_context` の ``message``\"\n\n#: ../../migrating.rst:1433\nmsgid \"``func`` in :meth:`ext.commands.Command.add_check`\"\nmsgstr \":meth:`ext.commands.Command.add_check` の ``func``\"\n\n#: ../../migrating.rst:1434\nmsgid \"``func`` in :meth:`ext.commands.Command.remove_check`\"\nmsgstr \":meth:`ext.commands.Command.remove_check` の ``func``\"\n\n#: ../../migrating.rst:1435\nmsgid \"``context`` in :meth:`ext.commands.Command.__call__`\"\nmsgstr \":meth:`ext.commands.Command.__call__` の ``context``\"\n\n#: ../../migrating.rst:1436\nmsgid \"``commands`` in :meth:`ext.commands.HelpCommand.filter_commands`\"\nmsgstr \":meth:`ext.commands.HelpCommand.filter_commands` の ``commands``\"\n\n#: ../../migrating.rst:1437\nmsgid \"``ctx`` in :meth:`ext.commands.HelpCommand.command_callback`\"\nmsgstr \":meth:`ext.commands.HelpCommand.command_callback` の ``ctx``\"\n\n#: ../../migrating.rst:1438\nmsgid \"``func`` in :meth:`ext.commands.HelpCommand.add_check`\"\nmsgstr \":meth:`ext.commands.HelpCommand.add_check` の ``func``\"\n\n#: ../../migrating.rst:1439\nmsgid \"``func`` in :meth:`ext.commands.HelpCommand.remove_check`\"\nmsgstr \":meth:`ext.commands.HelpCommand.remove_check` の ``func``\"\n\n#: ../../migrating.rst:1440\nmsgid \"``commands`` in :meth:`ext.commands.DefaultHelpCommand.add_indented_commands`\"\nmsgstr \":meth:`ext.commands.DefaultHelpCommand.add_indented_commands` の ``commands``\"\n\n#: ../../migrating.rst:1441\nmsgid \"``cog`` in :meth:`ext.commands.Bot.add_cog`\"\nmsgstr \":meth:`ext.commands.Bot.add_cog` の ``cog``\"\n\n#: ../../migrating.rst:1442\nmsgid \"``name`` in :meth:`ext.commands.Bot.get_cog`\"\nmsgstr \":meth:`ext.commands.Bot.get_cog` の ``name``\"\n\n#: ../../migrating.rst:1443\nmsgid \"``name`` in :meth:`ext.commands.Bot.remove_cog`\"\nmsgstr \":meth:`ext.commands.Bot.remove_cog` の ``name``\"\n\n#: ../../migrating.rst:1444\nmsgid \"``command`` in :meth:`ext.commands.Context.invoke`\"\nmsgstr \":meth:`ext.commands.Context.invoke` の ``command``\"\n\n#: ../../migrating.rst:1445\nmsgid \"``command`` in :meth:`ext.commands.GroupMixin.add_command`\"\nmsgstr \":meth:`ext.commands.GroupMixin.add_command` の ``command``\"\n\n#: ../../migrating.rst:1446\nmsgid \"``name`` in :meth:`ext.commands.GroupMixin.get_command`\"\nmsgstr \":meth:`ext.commands.GroupMixin.get_command` の ``name``\"\n\n#: ../../migrating.rst:1447\nmsgid \"``name`` in :meth:`ext.commands.GroupMixin.remove_command`\"\nmsgstr \":meth:`ext.commands.GroupMixin.remove_command` の ``name``\"\n\n#: ../../migrating.rst:1449\nmsgid \"The following parameters have been removed:\"\nmsgstr \"以下のパラメータは削除されました。\"\n\n#: ../../migrating.rst:1451\nmsgid \"``self_bot`` from :class:`~ext.commands.Bot`\"\nmsgstr \":class:`~ext.commands.Bot` の ``self_bot``\"\n\n#: ../../migrating.rst:1453\nmsgid \"This has been done due to the :ref:`migrating_2_0_userbot_removal` changes.\"\nmsgstr \"これは :ref:`migrating_2_0_userbot_removal` の変更によって行われました。\"\n\n#: ../../migrating.rst:1459\nmsgid \"``name`` in :meth:`ext.commands.Bot.add_listener`\"\nmsgstr \":meth:`ext.commands.Bot.add_listener` の ``name``\"\n\n#: ../../migrating.rst:1460\nmsgid \"``name`` in :meth:`ext.commands.Bot.remove_listener`\"\nmsgstr \":meth:`ext.commands.Bot.remove_listener` の ``name``\"\n\n#: ../../migrating.rst:1461\nmsgid \"``name`` in :meth:`ext.commands.Bot.listen`\"\nmsgstr \":meth:`ext.commands.Bot.listen` の ``name``\"\n\n#: ../../migrating.rst:1462\nmsgid \"``name`` in :meth:`ext.commands.Cog.listener`\"\nmsgstr \":meth:`ext.commands.Cog.listener` の ``name``\"\n\n#: ../../migrating.rst:1463\nmsgid \"``name`` in :meth:`ext.commands.Command`\"\nmsgstr \":meth:`ext.commands.Command` の ``name``\"\n\n#: ../../migrating.rst:1464\nmsgid \"``name`` and ``cls`` in :meth:`ext.commands.command`\"\nmsgstr \":meth:`ext.commands.command` の ``name`` と ``cls``\"\n\n#: ../../migrating.rst:1465\nmsgid \"``name`` and ``cls`` in :meth:`ext.commands.group`\"\nmsgstr \":meth:`ext.commands.group` の ``name`` と ``cls``\"\n\n#: ../../migrating.rst:1470\nmsgid \"The following attributes have been removed:\"\nmsgstr \"以下の属性が削除されました：\"\n\n#: ../../migrating.rst:1472\nmsgid \"``original`` from the :exc:`~ext.commands.ExtensionNotFound`\"\nmsgstr \":exc:`~ext.commands.ExtensionNotFound` の ``original``\"\n\n#: ../../migrating.rst:1473\nmsgid \"``type`` from the :class:`~ext.commands.Cooldown` class that was provided by the :attr:`ext.commands.CommandOnCooldown.cooldown` attribute\"\nmsgstr \":attr:`ext.commands.CommandOnCooldown.cooldown` から提供されていた :class:`~ext.commands.Cooldown` クラスの ``type``\"\n\n#: ../../migrating.rst:1476\nmsgid \"Use :attr:`ext.commands.CommandOnCooldown.type` instead.\"\nmsgstr \"代わりに :attr:`ext.commands.CommandOnCooldown.type` を使用してください。\"\n\n#: ../../migrating.rst:1478\nmsgid \"``clean_prefix`` from the :class:`~ext.commands.HelpCommand`\"\nmsgstr \":class:`~ext.commands.HelpCommand` の ``clean_prefix``\"\n\n#: ../../migrating.rst:1480\nmsgid \"Use :attr:`ext.commands.Context.clean_prefix` instead.\"\nmsgstr \"代わりに :attr:`ext.commands.Context.clean_prefix` を使用してください。\"\n\n#: ../../migrating.rst:1485\nmsgid \":meth:`ext.commands.Bot.add_cog` is now raising :exc:`ClientException` when a cog with the same name is already loaded.\"\nmsgstr \":meth:`ext.commands.Bot.add_cog` は、同名のコグがすでに読み込まれている場合には :exc:`ClientException` を送出するようになりました。\"\n\n#: ../../migrating.rst:1487\nmsgid \"To override a cog, the new ``override`` parameter can be used.\"\nmsgstr \"コグを上書きするには、新しい ``override`` パラメータが使用できます。\"\n\n#: ../../migrating.rst:1489\nmsgid \"When passing a callable to ``type`` argument of :meth:`~ext.commands.cooldown`, it now needs to accept :class:`~ext.commands.Context` rather than :class:`Message` as its only argument.\"\nmsgstr \":meth:`~ext.commands.cooldown` の ``type`` 引数に呼び出し可能な引数を渡す場合、 :class:`Message` ではなく、 :class:`~ext.commands.Context` を引数として受け付けないといけないようになりました。\"\n\n#: ../../migrating.rst:1491\nmsgid \"Metaclass of :class:`~ext.commands.Context` changed from :class:`abc.ABCMeta` to :class:`type`.\"\nmsgstr \":class:`~ext.commands.Context` のメタクラスが :class:`abc.ABCMeta` から :class:`type` へと変更されました。\"\n\n#: ../../migrating.rst:1492\nmsgid \"Changed type of :attr:`ext.commands.Command.clean_params` from :class:`collections.OrderedDict` to :class:`dict`. As the latter is guaranteed to preserve insertion order since Python 3.7.\"\nmsgstr \":attr:`ext.commands.Command.clean_params` の型を :class:`collections.OrderedDict` からPython 3.7以降で追加順が必ず保持される :class:`dict` に変更しました。\"\n\n#: ../../migrating.rst:1494\nmsgid \":attr:`ext.commands.ChannelNotReadable.argument` may now be a :class:`Thread` due to the :ref:`migrating_2_0_thread_support` changes.\"\nmsgstr \":ref:`migrating_2_0_thread_support` の変更により、 :attr:`ext.commands.ChannelNotReadable.argument` は :class:`Thread` になる可能性があります。\"\n\n#: ../../migrating.rst:1495\nmsgid \":attr:`ext.commands.NSFWChannelRequired.channel` may now be a :class:`Thread` due to the :ref:`migrating_2_0_thread_support` changes.\"\nmsgstr \":ref:`migrating_2_0_thread_support` の変更により、 :attr:`ext.commands.NSFWChannelRequired.channel` は :class:`Thread` になる可能性があります。\"\n\n#: ../../migrating.rst:1496\nmsgid \":attr:`ext.commands.Context.channel` may now be a :class:`Thread` due to the :ref:`migrating_2_0_thread_support` changes.\"\nmsgstr \":ref:`migrating_2_0_thread_support` の変更により、 :attr:`ext.commands.Context.channel` は :class:`Thread` になる可能性があります。\"\n\n#: ../../migrating.rst:1497\nmsgid \":attr:`ext.commands.Context.channel` may now be a :class:`PartialMessageable`.\"\nmsgstr \":attr:`ext.commands.Context.channel` が :class:`PartialMessageable` になりうるようになりました。\"\n\n#: ../../migrating.rst:1498\nmsgid \"``MissingPermissions.missing_perms`` has been renamed to :attr:`ext.commands.MissingPermissions.missing_permissions`.\"\nmsgstr \"``MissingPermissions.missing_perms`` は :attr:`ext.commands.MissingPermissions.missing_permissions` へと名前が変更されました。\"\n\n#: ../../migrating.rst:1499\nmsgid \"``BotMissingPermissions.missing_perms`` has been renamed to :attr:`ext.commands.BotMissingPermissions.missing_permissions`.\"\nmsgstr \"``BotMissingPermissions.missing_perms`` は :attr:`ext.commands.BotMissingPermissions.missing_permissions` へと名前が変更されました。\"\n\n#: ../../migrating.rst:1500\nmsgid \":meth:`ext.commands.Cog.cog_load` has been added as part of the :ref:`migrating_2_0_commands_extension_cog_async` changes.\"\nmsgstr \":meth:`ext.commands.Cog.cog_load` が、 :ref:`migrating_2_0_commands_extension_cog_async` の変更に伴って追加されました。\"\n\n#: ../../migrating.rst:1501\nmsgid \":meth:`ext.commands.Cog.cog_unload` may now be a :term:`coroutine` due to the :ref:`migrating_2_0_commands_extension_cog_async` changes.\"\nmsgstr \":meth:`ext.commands.Cog.cog_unload` は、 :ref:`migrating_2_0_commands_extension_cog_async` のため :term:`coroutine` になることができるようになりました。\"\n\n#: ../../migrating.rst:1502\nmsgid \":attr:`ext.commands.Command.clean_params` type now uses a custom :class:`inspect.Parameter` to handle defaults.\"\nmsgstr \":attr:`ext.commands.Command.clean_params` 型は既定値を扱うためカスタム :class:`inspect.Parameter` を使用するようになりました。\"\n\n#: ../../migrating.rst:1507\nmsgid \"Tasks Extension Changes\"\nmsgstr \"タスク拡張機能の変更\"\n\n#: ../../migrating.rst:1509\nmsgid \"Calling :meth:`ext.tasks.Loop.stop` in :meth:`~ext.tasks.Loop.before_loop` now stops the first iteration from running.\"\nmsgstr \":meth:`~ext.tasks.Loop.stop` を :meth:`~ext.tasks.Loop.before_loop` で呼び出すと、最初のイテレーションが実行されなくなりました。\"\n\n#: ../../migrating.rst:1510\nmsgid \"Calling :meth:`ext.tasks.Loop.change_interval` now changes the interval for the sleep time right away, rather than on the next loop iteration.\"\nmsgstr \":meth:`ext.tasks.Loop.change_interval` を呼び出すと、次のループの繰り返しの時ではなく、直ちにスリープ時間の間隔が変更されるようになりました。\"\n\n#: ../../migrating.rst:1512\nmsgid \"``loop`` parameter in :func:`ext.tasks.loop` can no longer be ``None``.\"\nmsgstr \":func:`ext.tasks.loop` のパラメーター ``loop`` に ``None`` を渡せなくなりました。\"\n\n#: ../../migrating.rst:1515\nmsgid \"Migrating to v1.0\"\nmsgstr \"v1.0への移行\"\n\n#: ../../migrating.rst:1517\nmsgid \"The contents of that migration has been moved to :ref:`migrating_1_0`.\"\nmsgstr \"この移行に関する内容は :ref:`migrating_1_0` に移動されました。\"\n\n"
  },
  {
    "path": "docs/locale/ja/LC_MESSAGES/migrating_to_async.po",
    "content": "msgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: discordpy\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2023-06-21 01:17+0000\\n\"\n\"PO-Revision-Date: 2024-04-17 02:43\\n\"\n\"Last-Translator: \\n\"\n\"Language-Team: Japanese\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Plural-Forms: nplurals=1; plural=0;\\n\"\n\"X-Crowdin-Project: discordpy\\n\"\n\"X-Crowdin-Project-ID: 362783\\n\"\n\"X-Crowdin-Language: ja\\n\"\n\"X-Crowdin-File: migrating_to_async.pot\\n\"\n\"X-Crowdin-File-ID: 48\\n\"\n\"Language: ja_JP\\n\"\n\n#: ../../migrating_to_async.rst:8\nmsgid \"Migrating to v0.10.0\"\nmsgstr \"v0.10.0への移行\"\n\n#: ../../migrating_to_async.rst:10\nmsgid \"v0.10.0 is one of the biggest breaking changes in the library due to massive fundamental changes in how the library operates.\"\nmsgstr \"v0.10.0は、ライブラリの根本的動作が大幅に変更された、ライブラリの中でも大きな更新の一つです。\"\n\n#: ../../migrating_to_async.rst:13\nmsgid \"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**.\"\nmsgstr \"最大の大きな変更点はPython 3.4.2以前のすべてのバージョンのサポートが打ち切られたことです。これは :mod:`asyncio` をサポートするためで、対応する :issue:`in the corresponding issue <50>` で詳細が見られます。繰り返しになりますが、 **Python 2.7及びPython3.3は、既にサポートされていません** 。\"\n\n#: ../../migrating_to_async.rst:18\nmsgid \"Below are all the other major changes from v0.9.0 to v0.10.0.\"\nmsgstr \"以下は、v0.9.0からv0.10.0までのその他の主要な変更点です。\"\n\n#: ../../migrating_to_async.rst:21\nmsgid \"Event Registration\"\nmsgstr \"イベント登録\"\n\n#: ../../migrating_to_async.rst:23\nmsgid \"All events before were registered using :meth:`Client.event`. While this is still possible, the events must be decorated with ``@asyncio.coroutine``.\"\nmsgstr \"以前まではすべてのイベントが :meth:`Client.event` を使用して登録されていました。このやり方はまだ可能ですが、 ``@asyncio.coroutine`` で修飾が必要です。\"\n\n#: ../../migrating_to_async.rst:26\n#: ../../migrating_to_async.rst:71\n#: ../../migrating_to_async.rst:105\n#: ../../migrating_to_async.rst:166\nmsgid \"Before:\"\nmsgstr \"更新前:\"\n\n#: ../../migrating_to_async.rst:34\n#: ../../migrating_to_async.rst:83\n#: ../../migrating_to_async.rst:111\n#: ../../migrating_to_async.rst:174\n#: ../../migrating_to_async.rst:284\nmsgid \"After:\"\nmsgstr \"更新後:\"\n\n#: ../../migrating_to_async.rst:43\nmsgid \"Or in Python 3.5+:\"\nmsgstr \"Python 3.5以降の場合:\"\n\n#: ../../migrating_to_async.rst:51\nmsgid \"Because there is a lot of typing, a utility decorator (:meth:`Client.async_event`) is provided for easier registration. For example:\"\nmsgstr \"多くの型付けがあるため、登録を簡単にするためにユーティリティデコレータ (:meth:`Client.async_event`) が用意されています。例:\"\n\n#: ../../migrating_to_async.rst:61\nmsgid \"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``.\"\nmsgstr \"しかし、これはまだコルーチンであり、コルーチンである関数には ``@asyncio.coroutine`` あるいは ``async def`` での修飾が必要であることに注意してください。\"\n\n#: ../../migrating_to_async.rst:65\nmsgid \"Event Changes\"\nmsgstr \"イベントの変更\"\n\n#: ../../migrating_to_async.rst:67\nmsgid \"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.\"\nmsgstr \"v0.9.0でいくつかのイベントは、別の状態を持たないために、役に立たないと考えられていました。変更された主なイベントは、更新前と更新後の二つの状態を持つ ``_update`` イベントです。\"\n\n#: ../../migrating_to_async.rst:93\nmsgid \"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``.\"\nmsgstr \"``on_status`` が削除されていることに注意してください。似たような機能が使いたい場合は、 :func:`on_member_update` を使用します。詳細は :ref:`discord-api-events` を参照してください。他に、 ``on_socket_closed`` 、 ``on_socket_receive`` や ``on_socket_opened`` も削除されています。\"\n\n#: ../../migrating_to_async.rst:98\nmsgid \"Coroutines\"\nmsgstr \"コルーチン\"\n\n#: ../../migrating_to_async.rst:100\nmsgid \"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...\"\nmsgstr \"ライブラリの最大の変更点は :class:`Client` を使用していたほとんどの関数が `コルーチン <py:library/asyncio-task.html>`_ へと変更されたことです。ドキュメントのコルーチンとして定義された関数は、処理の終了を待機します。例えば、\"\n\n#: ../../migrating_to_async.rst:120\nmsgid \"In order for you to ``yield from`` or ``await`` a coroutine then your function must be decorated with ``@asyncio.coroutine`` or ``async def``.\"\nmsgstr \"``yield from`` あるいは ``await`` を使用するには、関数が ``@asyncio.coroutine`` または ``async def`` で修飾されている必要があります。\"\n\n#: ../../migrating_to_async.rst:124\nmsgid \"Iterables\"\nmsgstr \"イテラブル\"\n\n#: ../../migrating_to_async.rst:126\nmsgid \"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.\"\nmsgstr \"パフォーマンス上の理由から、より高速な情報の取得を可能とするため、多くの内部データ構造が辞書に変更されました。結果として、これはAPIを介して公開された一部リストが、シーケンスではなくイテラブルに変更されたことを意味します。つまるところ、現在、特定の属性はイテラブルのみをサポートしており、シーケンスを扱うことができないことを意味しています。\"\n\n#: ../../migrating_to_async.rst:131\nmsgid \"The affected attributes are as follows:\"\nmsgstr \"影響を受ける属性は以下のとおりです。\"\n\n#: ../../migrating_to_async.rst:133\nmsgid \":attr:`Client.servers`\"\nmsgstr \":attr:`Client.servers`\"\n\n#: ../../migrating_to_async.rst:134\nmsgid \":attr:`Client.private_channels`\"\nmsgstr \":attr:`Client.private_channels`\"\n\n#: ../../migrating_to_async.rst:135\nmsgid \":attr:`Server.channels`\"\nmsgstr \":attr:`Server.channels`\"\n\n#: ../../migrating_to_async.rst:136\nmsgid \":attr:`Server.members`\"\nmsgstr \":attr:`Server.members`\"\n\n#: ../../migrating_to_async.rst:138\nmsgid \"Some examples of previously valid behaviour that is now invalid\"\nmsgstr \"以前は有効であったが、現在は無効である操作の例。\"\n\n#: ../../migrating_to_async.rst:145\nmsgid \"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.\"\nmsgstr \"これらは、既に :obj:`list` ではないため、インデックスや反復処理以外の操作はサポートされなくなりました。以前の動作で処理を行うには、listに明示的にキャストする必要があります。\"\n\n#: ../../migrating_to_async.rst:155\nmsgid \"Due to internal changes of the structure, the order you receive the data in is not in a guaranteed order.\"\nmsgstr \"構造の内部的な変更のため、データを受け取った順序は保証されません。\"\n\n#: ../../migrating_to_async.rst:159\nmsgid \"Enumerations\"\nmsgstr \"列挙型\"\n\n#: ../../migrating_to_async.rst:161\nmsgid \"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.\"\nmsgstr \"Python 3.4.2以前のバージョンのサポートを打ち切ったため、ライブラリは理にかなった場所での :doc:`py:library/enum` の使用が可能になりました。\"\n\n#: ../../migrating_to_async.rst:164\nmsgid \"The common places where this was changed was in the server region, member status, and channel type.\"\nmsgstr \"変更された主な場所は、サーバーリージョン、メンバーのステータス、およびチャンネルタイプです。\"\n\n#: ../../migrating_to_async.rst:182\nmsgid \"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.\"\nmsgstr \"この変更の主な理由は、APIでの厄介な文字列の使用を削減することでした。ユーザーに誤った感覚を与える可能性があったためです。詳細は :ref:`discord-api-enums` を参照してください。\"\n\n#: ../../migrating_to_async.rst:186\nmsgid \"Properties\"\nmsgstr \"プロパティ\"\n\n#: ../../migrating_to_async.rst:188\nmsgid \"A lot of function calls that returned constant values were changed into Python properties for ease of use in format strings.\"\nmsgstr \"定数値を返す関数呼び出しの多くは、書式化した文字列での使いやすさ向上を図るため、Pythonのプロパティに変更されました。\"\n\n#: ../../migrating_to_async.rst:191\nmsgid \"The following functions were changed into properties:\"\nmsgstr \"以下はプロパティに変更された関数です。\"\n\n#: ../../migrating_to_async.rst:194\n#: ../../migrating_to_async.rst:223\n#: ../../migrating_to_async.rst:238\nmsgid \"Before\"\nmsgstr \"変更前\"\n\n#: ../../migrating_to_async.rst:194\n#: ../../migrating_to_async.rst:223\n#: ../../migrating_to_async.rst:238\nmsgid \"After\"\nmsgstr \"変更後\"\n\n#: ../../migrating_to_async.rst:196\nmsgid \"``User.avatar_url()``\"\nmsgstr \"``User.avatar_url()``\"\n\n#: ../../migrating_to_async.rst:196\nmsgid \":attr:`User.avatar_url`\"\nmsgstr \":attr:`User.avatar_url`\"\n\n#: ../../migrating_to_async.rst:198\nmsgid \"``User.mention()``\"\nmsgstr \"``User.mention()``\"\n\n#: ../../migrating_to_async.rst:198\nmsgid \":attr:`User.mention`\"\nmsgstr \":attr:`User.mention`\"\n\n#: ../../migrating_to_async.rst:200\nmsgid \"``Channel.mention()``\"\nmsgstr \"``Channel.mention()``\"\n\n#: ../../migrating_to_async.rst:200\nmsgid \":attr:`Channel.mention`\"\nmsgstr \":attr:`Channel.mention`\"\n\n#: ../../migrating_to_async.rst:202\nmsgid \"``Channel.is_default_channel()``\"\nmsgstr \"``Channel.is_default_channel()``\"\n\n#: ../../migrating_to_async.rst:202\nmsgid \":attr:`Channel.is_default`\"\nmsgstr \":attr:`Channel.is_default`\"\n\n#: ../../migrating_to_async.rst:204\nmsgid \"``Role.is_everyone()``\"\nmsgstr \"``Role.is_everyone()``\"\n\n#: ../../migrating_to_async.rst:204\nmsgid \":attr:`Role.is_everyone`\"\nmsgstr \":attr:`Role.is_everyone`\"\n\n#: ../../migrating_to_async.rst:206\nmsgid \"``Server.get_default_role()``\"\nmsgstr \"``Server.get_default_role()``\"\n\n#: ../../migrating_to_async.rst:206\nmsgid \":attr:`Server.default_role`\"\nmsgstr \":attr:`Server.default_role`\"\n\n#: ../../migrating_to_async.rst:208\nmsgid \"``Server.icon_url()``\"\nmsgstr \"``Server.icon_url()``\"\n\n#: ../../migrating_to_async.rst:208\nmsgid \":attr:`Server.icon_url`\"\nmsgstr \":attr:`Server.icon_url`\"\n\n#: ../../migrating_to_async.rst:210\nmsgid \"``Server.get_default_channel()``\"\nmsgstr \"``Server.get_default_channel()``\"\n\n#: ../../migrating_to_async.rst:210\nmsgid \":attr:`Server.default_channel`\"\nmsgstr \":attr:`Server.default_channel`\"\n\n#: ../../migrating_to_async.rst:212\nmsgid \"``Message.get_raw_mentions()``\"\nmsgstr \"``Message.get_raw_mentions()``\"\n\n#: ../../migrating_to_async.rst:212\nmsgid \":attr:`Message.raw_mentions`\"\nmsgstr \":attr:`Message.raw_mentions`\"\n\n#: ../../migrating_to_async.rst:214\nmsgid \"``Message.get_raw_channel_mentions()``\"\nmsgstr \"``Message.get_raw_channel_mentions()``\"\n\n#: ../../migrating_to_async.rst:214\nmsgid \":attr:`Message.raw_channel_mentions`\"\nmsgstr \":attr:`Message.raw_channel_mentions`\"\n\n#: ../../migrating_to_async.rst:218\nmsgid \"Member Management\"\nmsgstr \"メンバー管理\"\n\n#: ../../migrating_to_async.rst:220\nmsgid \"Functions that involved banning and kicking were changed.\"\nmsgstr \"BANやキックを含む関数が追加されました。\"\n\n#: ../../migrating_to_async.rst:225\nmsgid \"``Client.ban(server, user)``\"\nmsgstr \"``Client.ban(server, user)``\"\n\n#: ../../migrating_to_async.rst:225\nmsgid \"``Client.ban(member)``\"\nmsgstr \"``Client.ban(member)``\"\n\n#: ../../migrating_to_async.rst:227\nmsgid \"``Client.kick(server, user)``\"\nmsgstr \"``Client.kick(server, user)``\"\n\n#: ../../migrating_to_async.rst:227\nmsgid \"``Client.kick(member)``\"\nmsgstr \"``Client.kick(member)``\"\n\n#: ../../migrating_to_async.rst:233\nmsgid \"Renamed Functions\"\nmsgstr \"関数の改名\"\n\n#: ../../migrating_to_async.rst:235\nmsgid \"Functions have been renamed.\"\nmsgstr \"いくつかの関数名が変更されました。\"\n\n#: ../../migrating_to_async.rst:240\nmsgid \"``Client.set_channel_permissions``\"\nmsgstr \"``Client.set_channel_permissions``\"\n\n#: ../../migrating_to_async.rst:240\n#: ../../migrating_to_async.rst:263\nmsgid \":meth:`Client.edit_channel_permissions`\"\nmsgstr \":meth:`Client.edit_channel_permissions`\"\n\n#: ../../migrating_to_async.rst:243\nmsgid \"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``.\"\nmsgstr \"すべての :class:`Permissions` 関連の属性の名称が変更され、 接頭詞であった `can_` が削除されました。例を挙げると ``can_manage_messages`` が ``manage_messages`` になりました。\"\n\n#: ../../migrating_to_async.rst:247\nmsgid \"Forced Keyword Arguments\"\nmsgstr \"強制キーワード引数\"\n\n#: ../../migrating_to_async.rst:249\nmsgid \"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.\"\nmsgstr \"Python 3.0以降では、強制的にキーワード引数をとるようにすることができるようになりました。キーワード引数は、変数の名前を明示的に指定してそれに割り当てることで、例えば ``foo(name='test')`` などです。このサポートにより、ライブラリ内のいくつかの関数が変更され、キーワード引数を取るようになりました。これは引数の順序が誤っていることが原因で発生するエラーを減らすためです。\"\n\n#: ../../migrating_to_async.rst:254\nmsgid \"The following parameters are now exclusively keyword arguments:\"\nmsgstr \"次のパラメータは、現在、排他的なキーワード引数です。\"\n\n#: ../../migrating_to_async.rst:256\nmsgid \":meth:`Client.send_message`\"\nmsgstr \":meth:`Client.send_message`\"\n\n#: ../../migrating_to_async.rst:257\nmsgid \"``tts``\"\nmsgstr \"``tts``\"\n\n#: ../../migrating_to_async.rst:259\nmsgid \":meth:`Client.logs_from`\"\nmsgstr \":meth:`Client.logs_from`\"\n\n#: ../../migrating_to_async.rst:259\nmsgid \"``before``\"\nmsgstr \"``before``\"\n\n#: ../../migrating_to_async.rst:260\nmsgid \"``after``\"\nmsgstr \"``after``\"\n\n#: ../../migrating_to_async.rst:262\nmsgid \"``allow``\"\nmsgstr \"``allow``\"\n\n#: ../../migrating_to_async.rst:263\nmsgid \"``deny``\"\nmsgstr \"``deny``\"\n\n#: ../../migrating_to_async.rst:265\nmsgid \"In the documentation you can tell if a function parameter is a forced keyword argument if it is after ``\\\\*,`` in the function signature.\"\nmsgstr \"ドキュメントでは、関数シグネチャ内の ``\\\\*,`` の後に引数があるかどうかで、関数の引数が強制的なキーワード引数であるかを知ることができます。\"\n\n#: ../../migrating_to_async.rst:271\nmsgid \"Running the Client\"\nmsgstr \"クライアントの実行\"\n\n#: ../../migrating_to_async.rst:273\nmsgid \"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`.\"\nmsgstr \"以前のバージョンのdiscord.pyでは ``client.run()`` は呼び出したメインスレッドをブロッキングするブロック付き呼び出しでした。v0.10.0でも未だブロック付き呼び出しですが、イベントループで処理を行います。ただし、それを行うためには認証情報を :meth:`Client.run` に渡す必要があります。\"\n\n#: ../../migrating_to_async.rst:277\nmsgid \"Basically, before:\"\nmsgstr \"以前:\"\n\n#: ../../migrating_to_async.rst:292\nmsgid \"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.\"\nmsgstr \"以前の ``Client.run`` 同様、新しくなった関数も最後に呼び出す必要があります。これは関数がブロッキングを行うためです。 :meth:`Client.run` の後に何かを定義しても、この関数が終了するまで、それらの処理は行われません。\"\n\n#: ../../migrating_to_async.rst:297\nmsgid \"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:\"\nmsgstr \"これはイベントループを抽象化するユーティリティ関数です。 実行呼び出しがブロックされ、コントロールから外れる必要はありません。実際に、イベントループを制御したい場合、この方法では非常に簡単です。\"\n\n"
  },
  {
    "path": "docs/locale/ja/LC_MESSAGES/migrating_to_v1.po",
    "content": "msgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: discordpy\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2023-06-21 01:17+0000\\n\"\n\"PO-Revision-Date: 2024-04-17 02:43\\n\"\n\"Last-Translator: \\n\"\n\"Language-Team: Japanese\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Plural-Forms: nplurals=1; plural=0;\\n\"\n\"X-Crowdin-Project: discordpy\\n\"\n\"X-Crowdin-Project-ID: 362783\\n\"\n\"X-Crowdin-Language: ja\\n\"\n\"X-Crowdin-File: migrating_to_v1.pot\\n\"\n\"X-Crowdin-File-ID: 92\\n\"\n\"Language: ja_JP\\n\"\n\n#: ../../migrating_to_v1.rst:8\nmsgid \"Migrating to v1.0\"\nmsgstr \"v1.0への移行\"\n\n#: ../../migrating_to_v1.rst:10\nmsgid \"v1.0 is one of the biggest breaking changes in the library due to a complete redesign.\"\nmsgstr \"v1.0 は完全な書き直しによる、ライブラリの中で最大の破壊的な変更の1つです。\"\n\n#: ../../migrating_to_v1.rst:13\nmsgid \"The amount of changes are so massive and long that for all intents and purposes, it is a completely new library.\"\nmsgstr \"変更量が膨大かつ長く、どこからどう見ても完全に新しいライブラリです。\"\n\n#: ../../migrating_to_v1.rst:16\nmsgid \"Part of the redesign involves making things more easy to use and natural. Things are done on the :ref:`models <discord_api_models>` instead of requiring a :class:`Client` instance to do any work.\"\nmsgstr \"再設計の一部は、物事をより使いやすく、自然にすることです。 :ref:`models <discord_api_models>` では、 :class:`Client` インスタンスを動作させる代わりに行われます。\"\n\n#: ../../migrating_to_v1.rst:20\nmsgid \"Python Version Change\"\nmsgstr \"Pythonのバージョンの変更\"\n\n#: ../../migrating_to_v1.rst:22\nmsgid \"In order to make development easier and also to allow for our dependencies to upgrade to allow usage of 3.7 or higher, the library had to remove support for Python versions lower than 3.5.3, which essentially means that **support for Python 3.4 is dropped**.\"\nmsgstr \"discord.py の開発をより簡単にし、またその依存関係にあるライブラリをアップグレードして Python 3.7 以上を使えるようにするために、 discord. py は Python 3.5.3 より古いバージョンに対するサポートを諦めざるを得ませんでした。これはつまり **Python 3.4 に対するサポートは打ち切られた** ということです。\"\n\n#: ../../migrating_to_v1.rst:27\nmsgid \"Major Model Changes\"\nmsgstr \"主要なモデルの変更\"\n\n#: ../../migrating_to_v1.rst:29\nmsgid \"Below are major model changes that have happened in v1.0\"\nmsgstr \"以下は、v1.0における主なモデルの変更点です。\"\n\n#: ../../migrating_to_v1.rst:32\nmsgid \"Snowflakes are int\"\nmsgstr \"Snowflakeのint型への変更\"\n\n#: ../../migrating_to_v1.rst:34\nmsgid \"Before v1.0, all snowflakes (the ``id`` attribute) were strings. This has been changed to :class:`int`.\"\nmsgstr \"v1.0以前は、全てのsnowflakes ( ``id`` 属性) が文字列でしたが、 :class:`int` に変更されました。\"\n\n#: ../../migrating_to_v1.rst:36\n#: ../../migrating_to_v1.rst:256\nmsgid \"Quick example: ::\"\nmsgstr \"簡単な例：\"\n\n#: ../../migrating_to_v1.rst:48\nmsgid \"This change allows for fewer errors when using the Copy ID feature in the official client since you no longer have to wrap it in quotes and allows for optimisation opportunities by allowing ETF to be used instead of JSON internally.\"\nmsgstr \"この変更により，公式クライアントの「 ID をコピー」機能を使用した際に間違いがより起こりにくくなりました。もはや取得した ID をクォーテーションマークで囲う必要はありませんし，内部で JSON の代わりに ETF を用いることで最適化の機会を得ることにもなります。\"\n\n#: ../../migrating_to_v1.rst:52\nmsgid \"Server is now Guild\"\nmsgstr \"Server から Guild に変更。\"\n\n#: ../../migrating_to_v1.rst:54\nmsgid \"The official API documentation calls the \\\"Server\\\" concept a \\\"Guild\\\" instead. In order to be more consistent with the API documentation when necessary, the model has been renamed to :class:`Guild` and all instances referring to it has been changed as well.\"\nmsgstr \"公式APIドキュメントでは「Server」は「Guild」と呼ばれています。APIドキュメントとの一貫性を保つために、モデルの名称が :class:`Guild` に変更され、それを参照するすべてのインスタンスも変更されました。\"\n\n#: ../../migrating_to_v1.rst:58\nmsgid \"A list of changes is as follows:\"\nmsgstr \"変更の一覧は以下の通りです。\"\n\n#: ../../migrating_to_v1.rst:61\n#: ../../migrating_to_v1.rst:97\n#: ../../migrating_to_v1.rst:871\nmsgid \"Before\"\nmsgstr \"変更前\"\n\n#: ../../migrating_to_v1.rst:61\n#: ../../migrating_to_v1.rst:97\n#: ../../migrating_to_v1.rst:871\nmsgid \"After\"\nmsgstr \"変更後\"\n\n#: ../../migrating_to_v1.rst:63\nmsgid \"``Message.server``\"\nmsgstr \"``Message.server``\"\n\n#: ../../migrating_to_v1.rst:63\nmsgid \":attr:`Message.guild`\"\nmsgstr \":attr:`Message.guild`\"\n\n#: ../../migrating_to_v1.rst:65\nmsgid \"``Channel.server``\"\nmsgstr \"``Channel.server``\"\n\n#: ../../migrating_to_v1.rst:65\nmsgid \":attr:`.GuildChannel.guild`\"\nmsgstr \":attr:`.GuildChannel.guild`\"\n\n#: ../../migrating_to_v1.rst:67\nmsgid \"``Client.servers``\"\nmsgstr \"``Client.servers``\"\n\n#: ../../migrating_to_v1.rst:67\n#: ../../migrating_to_v1.rst:235\nmsgid \":attr:`Client.guilds`\"\nmsgstr \":attr:`Client.guilds`\"\n\n#: ../../migrating_to_v1.rst:69\nmsgid \"``Client.get_server``\"\nmsgstr \"``Client.get_server``\"\n\n#: ../../migrating_to_v1.rst:69\nmsgid \":meth:`Client.get_guild`\"\nmsgstr \":meth:`Client.get_guild`\"\n\n#: ../../migrating_to_v1.rst:71\nmsgid \"``Emoji.server``\"\nmsgstr \"``Emoji.server``\"\n\n#: ../../migrating_to_v1.rst:71\nmsgid \":attr:`Emoji.guild`\"\nmsgstr \":attr:`Emoji.guild`\"\n\n#: ../../migrating_to_v1.rst:73\nmsgid \"``Role.server``\"\nmsgstr \"``Role.server``\"\n\n#: ../../migrating_to_v1.rst:73\nmsgid \":attr:`Role.guild`\"\nmsgstr \":attr:`Role.guild`\"\n\n#: ../../migrating_to_v1.rst:75\nmsgid \"``Invite.server``\"\nmsgstr \"``Invite.server``\"\n\n#: ../../migrating_to_v1.rst:75\nmsgid \":attr:`Invite.guild`\"\nmsgstr \":attr:`Invite.guild`\"\n\n#: ../../migrating_to_v1.rst:77\nmsgid \"``Member.server``\"\nmsgstr \"``Member.server``\"\n\n#: ../../migrating_to_v1.rst:77\nmsgid \":attr:`Member.guild`\"\nmsgstr \":attr:`Member.guild`\"\n\n#: ../../migrating_to_v1.rst:79\nmsgid \"``Permissions.manage_server``\"\nmsgstr \"``Permissions.manage_server``\"\n\n#: ../../migrating_to_v1.rst:79\nmsgid \":attr:`Permissions.manage_guild`\"\nmsgstr \":attr:`Permissions.manage_guild`\"\n\n#: ../../migrating_to_v1.rst:81\nmsgid \"``VoiceClient.server``\"\nmsgstr \"``VoiceClient.server``\"\n\n#: ../../migrating_to_v1.rst:81\nmsgid \":attr:`VoiceClient.guild`\"\nmsgstr \":attr:`VoiceClient.guild`\"\n\n#: ../../migrating_to_v1.rst:83\nmsgid \"``Client.create_server``\"\nmsgstr \"``Client.create_server``\"\n\n#: ../../migrating_to_v1.rst:83\nmsgid \":meth:`Client.create_guild`\"\nmsgstr \":meth:`Client.create_guild`\"\n\n#: ../../migrating_to_v1.rst:89\nmsgid \"Models are Stateful\"\nmsgstr \"モデルのステートフル化\"\n\n#: ../../migrating_to_v1.rst:91\nmsgid \"As mentioned earlier, a lot of functionality was moved out of :class:`Client` and put into their respective :ref:`model <discord_api_models>`.\"\nmsgstr \"前述したように、多くの機能が :class:`Client` からそれぞれの :ref:`model <discord_api_models>` へと移されました。\"\n\n#: ../../migrating_to_v1.rst:94\nmsgid \"A list of these changes is enumerated below.\"\nmsgstr \"これらの変更点の一覧は以下の通りです。\"\n\n#: ../../migrating_to_v1.rst:99\nmsgid \"``Client.add_reaction``\"\nmsgstr \"``Client.add_reaction``\"\n\n#: ../../migrating_to_v1.rst:99\nmsgid \":meth:`Message.add_reaction`\"\nmsgstr \":meth:`Message.add_reaction`\"\n\n#: ../../migrating_to_v1.rst:101\nmsgid \"``Client.add_roles``\"\nmsgstr \"``Client.add_roles``\"\n\n#: ../../migrating_to_v1.rst:101\nmsgid \":meth:`Member.add_roles`\"\nmsgstr \":meth:`Member.add_roles`\"\n\n#: ../../migrating_to_v1.rst:103\nmsgid \"``Client.ban``\"\nmsgstr \"``Client.ban``\"\n\n#: ../../migrating_to_v1.rst:103\nmsgid \":meth:`Member.ban` or :meth:`Guild.ban`\"\nmsgstr \":meth:`Member.ban` または :meth:`Guild.ban`\"\n\n#: ../../migrating_to_v1.rst:105\nmsgid \"``Client.change_nickname``\"\nmsgstr \"``Client.change_nickname``\"\n\n#: ../../migrating_to_v1.rst:105\n#: ../../migrating_to_v1.rst:173\n#: ../../migrating_to_v1.rst:189\n#: ../../migrating_to_v1.rst:197\nmsgid \":meth:`Member.edit`\"\nmsgstr \":meth:`Member.edit`\"\n\n#: ../../migrating_to_v1.rst:107\nmsgid \"``Client.clear_reactions``\"\nmsgstr \"``Client.clear_reactions``\"\n\n#: ../../migrating_to_v1.rst:107\nmsgid \":meth:`Message.clear_reactions`\"\nmsgstr \":meth:`Message.clear_reactions`\"\n\n#: ../../migrating_to_v1.rst:109\nmsgid \"``Client.create_channel``\"\nmsgstr \"``Client.create_channel``\"\n\n#: ../../migrating_to_v1.rst:109\nmsgid \":meth:`Guild.create_text_channel` and :meth:`Guild.create_voice_channel`\"\nmsgstr \":meth:`Guild.create_text_channel` と :meth:`Guild.create_voice_channel`\"\n\n#: ../../migrating_to_v1.rst:111\nmsgid \"``Client.create_custom_emoji``\"\nmsgstr \"``Client.create_custom_emoji``\"\n\n#: ../../migrating_to_v1.rst:111\nmsgid \":meth:`Guild.create_custom_emoji`\"\nmsgstr \":meth:`Guild.create_custom_emoji`\"\n\n#: ../../migrating_to_v1.rst:113\nmsgid \"``Client.create_invite``\"\nmsgstr \"``Client.create_invite``\"\n\n#: ../../migrating_to_v1.rst:113\nmsgid \":meth:`abc.GuildChannel.create_invite`\"\nmsgstr \":meth:`abc.GuildChannel.create_invite`\"\n\n#: ../../migrating_to_v1.rst:115\nmsgid \"``Client.create_role``\"\nmsgstr \"``Client.create_role``\"\n\n#: ../../migrating_to_v1.rst:115\nmsgid \":meth:`Guild.create_role`\"\nmsgstr \":meth:`Guild.create_role`\"\n\n#: ../../migrating_to_v1.rst:117\nmsgid \"``Client.delete_channel``\"\nmsgstr \"``Client.delete_channel``\"\n\n#: ../../migrating_to_v1.rst:117\nmsgid \":meth:`abc.GuildChannel.delete`\"\nmsgstr \":meth:`abc.GuildChannel.delete`\"\n\n#: ../../migrating_to_v1.rst:119\nmsgid \"``Client.delete_channel_permissions``\"\nmsgstr \"``Client.delete_channel_permissions``\"\n\n#: ../../migrating_to_v1.rst:119\nmsgid \":meth:`abc.GuildChannel.set_permissions` with ``overwrite`` set to ``None``\"\nmsgstr \":meth:`abc.GuildChannel.set_permissions` の ``overwrite`` を ``None`` に設定しました。\"\n\n#: ../../migrating_to_v1.rst:121\nmsgid \"``Client.delete_custom_emoji``\"\nmsgstr \"``Client.delete_custom_emoji``\"\n\n#: ../../migrating_to_v1.rst:121\nmsgid \":meth:`Emoji.delete`\"\nmsgstr \":meth:`Emoji.delete`\"\n\n#: ../../migrating_to_v1.rst:123\nmsgid \"``Client.delete_invite``\"\nmsgstr \"``Client.delete_invite``\"\n\n#: ../../migrating_to_v1.rst:123\nmsgid \":meth:`Invite.delete` or :meth:`Client.delete_invite`\"\nmsgstr \":meth:`Invite.delete` または :meth:`Client.delete_invite`\"\n\n#: ../../migrating_to_v1.rst:125\nmsgid \"``Client.delete_message``\"\nmsgstr \"``Client.delete_message``\"\n\n#: ../../migrating_to_v1.rst:125\nmsgid \":meth:`Message.delete`\"\nmsgstr \":meth:`Message.delete`\"\n\n#: ../../migrating_to_v1.rst:127\nmsgid \"``Client.delete_messages``\"\nmsgstr \"``Client.delete_messages``\"\n\n#: ../../migrating_to_v1.rst:127\nmsgid \":meth:`TextChannel.delete_messages`\"\nmsgstr \":meth:`TextChannel.delete_messages`\"\n\n#: ../../migrating_to_v1.rst:129\nmsgid \"``Client.delete_role``\"\nmsgstr \"``Client.delete_role``\"\n\n#: ../../migrating_to_v1.rst:129\nmsgid \":meth:`Role.delete`\"\nmsgstr \":meth:`Role.delete`\"\n\n#: ../../migrating_to_v1.rst:131\nmsgid \"``Client.delete_server``\"\nmsgstr \"``Client.delete_server``\"\n\n#: ../../migrating_to_v1.rst:131\nmsgid \":meth:`Guild.delete`\"\nmsgstr \":meth:`Guild.delete`\"\n\n#: ../../migrating_to_v1.rst:133\nmsgid \"``Client.edit_channel``\"\nmsgstr \"``Client.edit_channel``\"\n\n#: ../../migrating_to_v1.rst:133\n#: ../../migrating_to_v1.rst:171\nmsgid \":meth:`TextChannel.edit` or :meth:`VoiceChannel.edit`\"\nmsgstr \":meth:`TextChannel.edit` または :meth:`VoiceChannel.edit`\"\n\n#: ../../migrating_to_v1.rst:135\nmsgid \"``Client.edit_channel_permissions``\"\nmsgstr \"``Client.edit_channel_permissions``\"\n\n#: ../../migrating_to_v1.rst:135\nmsgid \":meth:`abc.GuildChannel.set_permissions`\"\nmsgstr \":meth:`abc.GuildChannel.set_permissions`\"\n\n#: ../../migrating_to_v1.rst:137\nmsgid \"``Client.edit_custom_emoji``\"\nmsgstr \"``Client.edit_custom_emoji``\"\n\n#: ../../migrating_to_v1.rst:137\nmsgid \":meth:`Emoji.edit`\"\nmsgstr \":meth:`Emoji.edit`\"\n\n#: ../../migrating_to_v1.rst:139\nmsgid \"``Client.edit_message``\"\nmsgstr \"``Client.edit_message``\"\n\n#: ../../migrating_to_v1.rst:139\nmsgid \":meth:`Message.edit`\"\nmsgstr \":meth:`Message.edit`\"\n\n#: ../../migrating_to_v1.rst:141\nmsgid \"``Client.edit_profile``\"\nmsgstr \"``Client.edit_profile``\"\n\n#: ../../migrating_to_v1.rst:141\nmsgid \":meth:`ClientUser.edit` (you get this from :attr:`Client.user`)\"\nmsgstr \":meth:`ClientUser.edit` ( :attr:`Client.user` から取得可能)\"\n\n#: ../../migrating_to_v1.rst:143\nmsgid \"``Client.edit_role``\"\nmsgstr \"``Client.edit_role``\"\n\n#: ../../migrating_to_v1.rst:143\n#: ../../migrating_to_v1.rst:175\nmsgid \":meth:`Role.edit`\"\nmsgstr \":meth:`Role.edit`\"\n\n#: ../../migrating_to_v1.rst:145\nmsgid \"``Client.edit_server``\"\nmsgstr \"``Client.edit_server``\"\n\n#: ../../migrating_to_v1.rst:145\nmsgid \":meth:`Guild.edit`\"\nmsgstr \":meth:`Guild.edit`\"\n\n#: ../../migrating_to_v1.rst:147\nmsgid \"``Client.estimate_pruned_members``\"\nmsgstr \"``Client.estimate_pruned_members``\"\n\n#: ../../migrating_to_v1.rst:147\nmsgid \":meth:`Guild.estimate_pruned_members`\"\nmsgstr \":meth:`Guild.estimate_pruned_members`\"\n\n#: ../../migrating_to_v1.rst:149\n#: ../../migrating_to_v1.rst:329\nmsgid \"``Client.get_all_emojis``\"\nmsgstr \"``Client.get_all_emojis``\"\n\n#: ../../migrating_to_v1.rst:149\nmsgid \":attr:`Client.emojis`\"\nmsgstr \":attr:`Client.emojis`\"\n\n#: ../../migrating_to_v1.rst:151\nmsgid \"``Client.get_bans``\"\nmsgstr \"``Client.get_bans``\"\n\n#: ../../migrating_to_v1.rst:151\nmsgid \":meth:`Guild.bans`\"\nmsgstr \":meth:`Guild.bans`\"\n\n#: ../../migrating_to_v1.rst:153\nmsgid \"``Client.get_invite``\"\nmsgstr \"``Client.get_invite``\"\n\n#: ../../migrating_to_v1.rst:153\nmsgid \":meth:`Client.fetch_invite`\"\nmsgstr \":meth:`Client.fetch_invite`\"\n\n#: ../../migrating_to_v1.rst:155\nmsgid \"``Client.get_message``\"\nmsgstr \"``Client.get_message``\"\n\n#: ../../migrating_to_v1.rst:155\nmsgid \":meth:`abc.Messageable.fetch_message`\"\nmsgstr \":meth:`abc.Messageable.fetch_message`\"\n\n#: ../../migrating_to_v1.rst:157\nmsgid \"``Client.get_reaction_users``\"\nmsgstr \"``Client.get_reaction_users``\"\n\n#: ../../migrating_to_v1.rst:157\n#: ../../migrating_to_v1.rst:495\nmsgid \":meth:`Reaction.users`\"\nmsgstr \":meth:`Reaction.users`\"\n\n#: ../../migrating_to_v1.rst:159\nmsgid \"``Client.get_user_info``\"\nmsgstr \"``Client.get_user_info``\"\n\n#: ../../migrating_to_v1.rst:159\nmsgid \":meth:`Client.fetch_user`\"\nmsgstr \":meth:`Client.fetch_user`\"\n\n#: ../../migrating_to_v1.rst:161\nmsgid \"``Client.invites_from``\"\nmsgstr \"``Client.invites_from``\"\n\n#: ../../migrating_to_v1.rst:161\nmsgid \":meth:`abc.GuildChannel.invites` or :meth:`Guild.invites`\"\nmsgstr \":meth:`abc.GuildChannel.invites` または :meth:`Guild.invites`\"\n\n#: ../../migrating_to_v1.rst:163\nmsgid \"``Client.join_voice_channel``\"\nmsgstr \"``Client.join_voice_channel``\"\n\n#: ../../migrating_to_v1.rst:163\nmsgid \":meth:`VoiceChannel.connect` (see :ref:`migrating_1_0_voice`)\"\nmsgstr \":meth:`VoiceChannel.connect` ( :ref:`migrating_1_0_voice` を参照)\"\n\n#: ../../migrating_to_v1.rst:165\nmsgid \"``Client.kick``\"\nmsgstr \"``Client.kick``\"\n\n#: ../../migrating_to_v1.rst:165\nmsgid \":meth:`Guild.kick` or :meth:`Member.kick`\"\nmsgstr \":meth:`Guild.kick` または :meth:`Member.kick`\"\n\n#: ../../migrating_to_v1.rst:167\nmsgid \"``Client.leave_server``\"\nmsgstr \"``Client.leave_server``\"\n\n#: ../../migrating_to_v1.rst:167\nmsgid \":meth:`Guild.leave`\"\nmsgstr \":meth:`Guild.leave`\"\n\n#: ../../migrating_to_v1.rst:169\nmsgid \"``Client.logs_from``\"\nmsgstr \"``Client.logs_from``\"\n\n#: ../../migrating_to_v1.rst:169\nmsgid \":meth:`abc.Messageable.history` (see :ref:`migrating_1_0_async_iter`)\"\nmsgstr \":meth:`abc.Messageable.history` ( :ref:`migrating_1_0_async_iter` を参照)\"\n\n#: ../../migrating_to_v1.rst:171\nmsgid \"``Client.move_channel``\"\nmsgstr \"``Client.move_channel``\"\n\n#: ../../migrating_to_v1.rst:173\nmsgid \"``Client.move_member``\"\nmsgstr \"``Client.move_member``\"\n\n#: ../../migrating_to_v1.rst:175\nmsgid \"``Client.move_role``\"\nmsgstr \"``Client.move_role``\"\n\n#: ../../migrating_to_v1.rst:177\nmsgid \"``Client.pin_message``\"\nmsgstr \"``Client.pin_message``\"\n\n#: ../../migrating_to_v1.rst:177\nmsgid \":meth:`Message.pin`\"\nmsgstr \":meth:`Message.pin`\"\n\n#: ../../migrating_to_v1.rst:179\nmsgid \"``Client.pins_from``\"\nmsgstr \"``Client.pins_from``\"\n\n#: ../../migrating_to_v1.rst:179\nmsgid \":meth:`abc.Messageable.pins`\"\nmsgstr \":meth:`abc.Messageable.pins`\"\n\n#: ../../migrating_to_v1.rst:181\nmsgid \"``Client.prune_members``\"\nmsgstr \"``Client.prune_members``\"\n\n#: ../../migrating_to_v1.rst:181\nmsgid \":meth:`Guild.prune_members`\"\nmsgstr \":meth:`Guild.prune_members`\"\n\n#: ../../migrating_to_v1.rst:183\nmsgid \"``Client.purge_from``\"\nmsgstr \"``Client.purge_from``\"\n\n#: ../../migrating_to_v1.rst:183\nmsgid \":meth:`TextChannel.purge`\"\nmsgstr \":meth:`TextChannel.purge`\"\n\n#: ../../migrating_to_v1.rst:185\nmsgid \"``Client.remove_reaction``\"\nmsgstr \"``Client.remove_reaction``\"\n\n#: ../../migrating_to_v1.rst:185\nmsgid \":meth:`Message.remove_reaction`\"\nmsgstr \":meth:`Message.remove_reaction`\"\n\n#: ../../migrating_to_v1.rst:187\nmsgid \"``Client.remove_roles``\"\nmsgstr \"``Client.remove_roles``\"\n\n#: ../../migrating_to_v1.rst:187\nmsgid \":meth:`Member.remove_roles`\"\nmsgstr \":meth:`Member.remove_roles`\"\n\n#: ../../migrating_to_v1.rst:189\nmsgid \"``Client.replace_roles``\"\nmsgstr \"``Client.replace_roles``\"\n\n#: ../../migrating_to_v1.rst:191\nmsgid \"``Client.send_file``\"\nmsgstr \"``Client.send_file``\"\n\n#: ../../migrating_to_v1.rst:191\n#: ../../migrating_to_v1.rst:193\nmsgid \":meth:`abc.Messageable.send` (see :ref:`migrating_1_0_sending_messages`)\"\nmsgstr \":meth:`abc.Messageable.send` ( :ref:`migrating_1_0_sending_messages` を参照)\"\n\n#: ../../migrating_to_v1.rst:193\nmsgid \"``Client.send_message``\"\nmsgstr \"``Client.send_message``\"\n\n#: ../../migrating_to_v1.rst:195\nmsgid \"``Client.send_typing``\"\nmsgstr \"``Client.send_typing``\"\n\n#: ../../migrating_to_v1.rst:195\nmsgid \":meth:`abc.Messageable.trigger_typing` (use :meth:`abc.Messageable.typing`)\"\nmsgstr \":meth:`abc.Messageable.trigger_typing` ( :meth:`abc.Messageable.typing` を使用してください)\"\n\n#: ../../migrating_to_v1.rst:197\nmsgid \"``Client.server_voice_state``\"\nmsgstr \"``Client.server_voice_state``\"\n\n#: ../../migrating_to_v1.rst:199\nmsgid \"``Client.start_private_message``\"\nmsgstr \"``Client.start_private_message``\"\n\n#: ../../migrating_to_v1.rst:199\nmsgid \":meth:`User.create_dm`\"\nmsgstr \":meth:`User.create_dm`\"\n\n#: ../../migrating_to_v1.rst:201\nmsgid \"``Client.unban``\"\nmsgstr \"``Client.unban``\"\n\n#: ../../migrating_to_v1.rst:201\nmsgid \":meth:`Guild.unban` or :meth:`Member.unban`\"\nmsgstr \":meth:`Guild.unban` または :meth:`Member.unban`\"\n\n#: ../../migrating_to_v1.rst:203\nmsgid \"``Client.unpin_message``\"\nmsgstr \"``Client.unpin_message``\"\n\n#: ../../migrating_to_v1.rst:203\nmsgid \":meth:`Message.unpin`\"\nmsgstr \":meth:`Message.unpin`\"\n\n#: ../../migrating_to_v1.rst:205\nmsgid \"``Client.wait_for_message``\"\nmsgstr \"``Client.wait_for_message``\"\n\n#: ../../migrating_to_v1.rst:205\n#: ../../migrating_to_v1.rst:207\nmsgid \":meth:`Client.wait_for` (see :ref:`migrating_1_0_wait_for`)\"\nmsgstr \":meth:`Client.wait_for` ( :ref:`migrating_1_0_wait_for` を参照)\"\n\n#: ../../migrating_to_v1.rst:207\nmsgid \"``Client.wait_for_reaction``\"\nmsgstr \"``Client.wait_for_reaction``\"\n\n#: ../../migrating_to_v1.rst:209\nmsgid \"``Client.wait_until_login``\"\nmsgstr \"``Client.wait_until_login``\"\n\n#: ../../migrating_to_v1.rst:209\nmsgid \"Removed\"\nmsgstr \"削除済\"\n\n#: ../../migrating_to_v1.rst:211\nmsgid \"``Client.wait_until_ready``\"\nmsgstr \"``Client.wait_until_ready``\"\n\n#: ../../migrating_to_v1.rst:211\nmsgid \"No change\"\nmsgstr \"変更なし\"\n\n#: ../../migrating_to_v1.rst:215\nmsgid \"Property Changes\"\nmsgstr \"プロパティの変更\"\n\n#: ../../migrating_to_v1.rst:217\nmsgid \"In order to be a bit more consistent, certain things that were properties were changed to methods instead.\"\nmsgstr \"一貫性を持たせるために、いくつかのプロパティがメソッドに変更されました。\"\n\n#: ../../migrating_to_v1.rst:219\nmsgid \"The following are now methods instead of properties (requires parentheses):\"\nmsgstr \"プロパティの代わりに追加されたメソッドは以下のとおりです。(使用の際にはカッコが必要です)\"\n\n#: ../../migrating_to_v1.rst:221\nmsgid \":meth:`Role.is_default`\"\nmsgstr \":meth:`Role.is_default`\"\n\n#: ../../migrating_to_v1.rst:222\nmsgid \":meth:`Client.is_ready`\"\nmsgstr \":meth:`Client.is_ready`\"\n\n#: ../../migrating_to_v1.rst:223\nmsgid \":meth:`Client.is_closed`\"\nmsgstr \":meth:`Client.is_closed`\"\n\n#: ../../migrating_to_v1.rst:226\nmsgid \"Dict Value Change\"\nmsgstr \"辞書の値の変更\"\n\n#: ../../migrating_to_v1.rst:228\nmsgid \"Prior to v1.0 some aggregating properties that retrieved models would return \\\"dict view\\\" objects.\"\nmsgstr \"v1.0以前では、複数のモデルを集約して取得するプロパティは「辞書ビュー」オブジェクトで結果を返していました。\"\n\n#: ../../migrating_to_v1.rst:230\nmsgid \"As a consequence, when the dict would change size while you would iterate over it, a RuntimeError would be raised and crash the task. To alleviate this, the \\\"dict view\\\" objects were changed into lists.\"\nmsgstr \"これは、オブジェクトを用いて繰り返し処理を行っている間に、辞書サイズが変更されたとき、RuntimeErrorを発生させてタスクをクラッシュさせていました。これを軽減させるため「辞書ビュー」オブジェクトはリストに変更されました。\"\n\n#: ../../migrating_to_v1.rst:233\nmsgid \"The following views were changed to a list:\"\nmsgstr \"以下のビューがリストへ変更されています。\"\n\n#: ../../migrating_to_v1.rst:236\nmsgid \":attr:`Client.users` (new in v1.0)\"\nmsgstr \":attr:`Client.users` (v1.0で新規追加)\"\n\n#: ../../migrating_to_v1.rst:237\nmsgid \":attr:`Client.emojis` (new in v1.0)\"\nmsgstr \":attr:`Client.emojis` (v1.0にて追加)\"\n\n#: ../../migrating_to_v1.rst:238\nmsgid \":attr:`Guild.channels`\"\nmsgstr \":attr:`Guild.channels`\"\n\n#: ../../migrating_to_v1.rst:239\nmsgid \":attr:`Guild.text_channels` (new in v1.0)\"\nmsgstr \":attr:`Guild.text_channels` (v1.0にて追加)\"\n\n#: ../../migrating_to_v1.rst:240\nmsgid \":attr:`Guild.voice_channels` (new in v1.0)\"\nmsgstr \":attr:`Guild.voice_channels` (v1.0にて追加)\"\n\n#: ../../migrating_to_v1.rst:241\nmsgid \":attr:`Guild.emojis`\"\nmsgstr \":attr:`Guild.emojis`\"\n\n#: ../../migrating_to_v1.rst:242\nmsgid \":attr:`Guild.members`\"\nmsgstr \":attr:`Guild.members`\"\n\n#: ../../migrating_to_v1.rst:245\nmsgid \"Voice State Changes\"\nmsgstr \"ボイスステートの変更\"\n\n#: ../../migrating_to_v1.rst:247\nmsgid \"Earlier, in v0.11.0 a :class:`VoiceState` class was added to refer to voice states along with a :attr:`Member.voice` attribute to refer to it.\"\nmsgstr \"v0.11.0では、ボイスステートを参照するために :class:`VoiceState` が追加され、このクラスを参照するために :attr:`Member.voice` が使われていました。\"\n\n#: ../../migrating_to_v1.rst:250\nmsgid \"However, it was transparent to the user. In an effort to make the library save more memory, the voice state change is now more visible.\"\nmsgstr \"これはユーザーにとって透過的なものでしたが、ライブラリがメモリを節約できるようボイスステートの変化が可視的になりました。\"\n\n#: ../../migrating_to_v1.rst:253\nmsgid \"The only way to access voice attributes is via the :attr:`Member.voice` attribute. Note that if the member does not have a voice state this attribute can be ``None``.\"\nmsgstr \"ボイスの属性にアクセスするには :attr:`Member.voice` を用いる方法しか存在しません。メンバーがボイスステートを持たない場合は ``None`` が返ることに注意してください。\"\n\n#: ../../migrating_to_v1.rst:269\nmsgid \"User and Member Type Split\"\nmsgstr \"ユーザーとメンバーの分離\"\n\n#: ../../migrating_to_v1.rst:271\nmsgid \"In v1.0 to save memory, :class:`User` and :class:`Member` are no longer inherited. Instead, they are \\\"flattened\\\" by having equivalent properties that map out to the functional underlying :class:`User`. Thus, there is no functional change in how they are used. However this breaks :func:`isinstance` checks and thus is something to keep in mind.\"\nmsgstr \"v1.0では、メモリの節約のため、 :class:`Member` は :class:`User` のサブクラスではなくなりました。代わりに、 :class:`User` に記述されたものと同等のプロパティを実装することで、この二つのクラスはフラット化されています。そのため、使用方法に機能的変更はありません。ただし、 :func:`isinstance` が使えなくなってしまったことは留意しておくべきです。\"\n\n#: ../../migrating_to_v1.rst:275\nmsgid \"These memory savings were accomplished by having a global :class:`User` cache, and as a positive consequence you can now easily fetch a :class:`User` by their ID by using the new :meth:`Client.get_user`. You can also get a list of all :class:`User` your client can see with :attr:`Client.users`.\"\nmsgstr \"メモリの節約は、グローバルな :class:`User` のキャッシュを持つことで実現しました。これによって :meth:`Client.get_user` を使ってIDから簡単に :class:`User` を取得できます。また、あなたのクライアントが見ることができる :class:`User` を :attr:`Client.users` ですべて取得できるようにもなりました。\"\n\n#: ../../migrating_to_v1.rst:282\nmsgid \"Channel Type Split\"\nmsgstr \"チャンネルタイプの分割\"\n\n#: ../../migrating_to_v1.rst:284\nmsgid \"Prior to v1.0, channels were two different types, ``Channel`` and ``PrivateChannel`` with a ``is_private`` property to help differentiate between them.\"\nmsgstr \"v1.0以前のバージョンでは、チャンネルは ``is_private`` で判別する ``Channel`` と ``PrivateChannel`` の二通りしかありませんでした。\"\n\n#: ../../migrating_to_v1.rst:287\nmsgid \"In order to save memory the channels have been split into 4 different types:\"\nmsgstr \"メモリ使用量を削減するため、チャンネルを4つのタイプへ分割しました。\"\n\n#: ../../migrating_to_v1.rst:289\nmsgid \":class:`TextChannel` for guild text channels.\"\nmsgstr \"ギルドのテキストチャンネル用である :class:`TextChannel` 。\"\n\n#: ../../migrating_to_v1.rst:290\nmsgid \":class:`VoiceChannel` for guild voice channels.\"\nmsgstr \"ギルドのボイスチャンネル用である :class:`VoiceChannel` 。\"\n\n#: ../../migrating_to_v1.rst:291\nmsgid \":class:`DMChannel` for DM channels with members.\"\nmsgstr \"メンバーのDMチャンネル用である :class:`DMChannel` 。\"\n\n#: ../../migrating_to_v1.rst:292\nmsgid \":class:`GroupChannel` for Group DM channels with members.\"\nmsgstr \"メンバーが参加するグループDMチャンネル用である :class:`GroupChannel` 。\"\n\n#: ../../migrating_to_v1.rst:294\nmsgid \"With this split came the removal of the ``is_private`` attribute. You should now use :func:`isinstance`.\"\nmsgstr \"これらに分割されたことにより、 ``is_private`` は削除されました。v1.0では :func:`isinstance` を使うべきでしょう。\"\n\n#: ../../migrating_to_v1.rst:296\nmsgid \"The types are split into two different :ref:`discord_api_abcs`:\"\nmsgstr \"型は二通りの :ref:`discord_api_abcs` に分けられます。\"\n\n#: ../../migrating_to_v1.rst:298\nmsgid \":class:`abc.GuildChannel` for guild channels.\"\nmsgstr \"ギルドのチャンネルを表す :class:`abc.GuildChannel` 。\"\n\n#: ../../migrating_to_v1.rst:299\nmsgid \":class:`abc.PrivateChannel` for private channels (DMs and group DMs).\"\nmsgstr \"プライベートチャンネル(DMやグループDM)を表す :class:`abc.PrivateChannel` 。\"\n\n#: ../../migrating_to_v1.rst:301\nmsgid \"So to check if something is a guild channel you would do: ::\"\nmsgstr \"チャンネルがギルドチャンネルであるかをチェックしたい場合:\"\n\n#: ../../migrating_to_v1.rst:305\nmsgid \"And to check if it's a private channel you would do: ::\"\nmsgstr \"チャンネルがプライベートチャンネルであるかをチェックしたい場合:\"\n\n#: ../../migrating_to_v1.rst:309\nmsgid \"Of course, if you're looking for only a specific type you can pass that too, e.g. ::\"\nmsgstr \"もちろん、特定のチャンネルタイプを探したい場合、そのチャンネルタイプを渡すことも可能です。\"\n\n#: ../../migrating_to_v1.rst:313\nmsgid \"With this type split also came event changes, which are enumerated in :ref:`migrating_1_0_event_changes`.\"\nmsgstr \"この型の分割により、イベントにも変更がありました。これについては、 :ref:`migrating_1_0_event_changes` で列挙されています。\"\n\n#: ../../migrating_to_v1.rst:317\nmsgid \"Miscellaneous Model Changes\"\nmsgstr \"その他のモデルの変更点\"\n\n#: ../../migrating_to_v1.rst:319\nmsgid \"There were lots of other things added or removed in the models in general.\"\nmsgstr \"その他にも、モデルに追加または削除されたものが多くあります。\"\n\n#: ../../migrating_to_v1.rst:321\nmsgid \"They will be enumerated here.\"\nmsgstr \"以下がその一覧です。\"\n\n#: ../../migrating_to_v1.rst:323\nmsgid \"**Removed**\"\nmsgstr \"**削除済**\"\n\n#: ../../migrating_to_v1.rst:325\nmsgid \":meth:`Client.login` no longer accepts email and password logins.\"\nmsgstr \":meth:`Client.login` はメールとパスワードによるログインを受け付けなくなりました。\"\n\n#: ../../migrating_to_v1.rst:327\nmsgid \"Use a token and ``bot=False``.\"\nmsgstr \"トークンと ``bot=False`` を使用してください。\"\n\n#: ../../migrating_to_v1.rst:331\nmsgid \"Use :attr:`Client.emojis` instead.\"\nmsgstr \"代わりに :attr:`Client.emojis` を使用してください。\"\n\n#: ../../migrating_to_v1.rst:333\nmsgid \"``Client.messages``\"\nmsgstr \"``Client.messages``\"\n\n#: ../../migrating_to_v1.rst:335\nmsgid \"Use read-only :attr:`Client.cached_messages` instead.\"\nmsgstr \"読み取り専用の :attr:`Client.cached_messages` を代わりに使用してください。\"\n\n#: ../../migrating_to_v1.rst:337\nmsgid \"``Client.wait_for_message`` and ``Client.wait_for_reaction`` are gone.\"\nmsgstr \"``Client.wait_for_message`` と ``Client.wait_for_reaction`` は削除されました。\"\n\n#: ../../migrating_to_v1.rst:339\nmsgid \"Use :meth:`Client.wait_for` instead.\"\nmsgstr \"代わりに :meth:`Client.wait_for` を使用してください。\"\n\n#: ../../migrating_to_v1.rst:341\nmsgid \"``Channel.voice_members``\"\nmsgstr \"``Channel.voice_members``\"\n\n#: ../../migrating_to_v1.rst:343\nmsgid \"Use :attr:`VoiceChannel.members` instead.\"\nmsgstr \"代わりに :attr:`VoiceChannel.members` を使用してください。\"\n\n#: ../../migrating_to_v1.rst:345\nmsgid \"``Channel.is_private``\"\nmsgstr \"``Channel.is_private``\"\n\n#: ../../migrating_to_v1.rst:347\nmsgid \"Use ``isinstance`` instead with one of the :ref:`discord_api_abcs` instead.\"\nmsgstr \"代わりに :ref:`discord_api_abcs` のいずれかを使って、 ``isinstance`` を使用してください。\"\n\n#: ../../migrating_to_v1.rst:348\nmsgid \"e.g. ``isinstance(channel, discord.abc.GuildChannel)`` will check if it isn't a private channel.\"\nmsgstr \"例: ``isinstance(channel, discord.abc.GuildChannel)`` はプライベートチャンネルでないことを確認します。\"\n\n#: ../../migrating_to_v1.rst:350\nmsgid \"``Client.accept_invite``\"\nmsgstr \"``Client.accept_invite``\"\n\n#: ../../migrating_to_v1.rst:352\nmsgid \"There is no replacement for this one. This functionality is deprecated API wise.\"\nmsgstr \"これに代わるものはありません。この機能はAPI的に非推奨です。\"\n\n#: ../../migrating_to_v1.rst:354\nmsgid \"``Guild.default_channel`` / ``Server.default_channel`` and ``Channel.is_default``\"\nmsgstr \"``Guild.default_channel`` / ``Server.default_channel`` と ``Channel.is_default``\"\n\n#: ../../migrating_to_v1.rst:356\nmsgid \"The concept of a default channel was removed from Discord. See `#329 <https://github.com/hammerandchisel/discord-api-docs/pull/329>`_.\"\nmsgstr \"デフォルトチャンネルの概念はDiscordから削除されました。 `#329 <https://github.com/hammerandchisel/discord-api-docs/pull/329>`_ を参照してください。\"\n\n#: ../../migrating_to_v1.rst:359\nmsgid \"``Message.edited_timestamp``\"\nmsgstr \"``Message.edited_timestamp``\"\n\n#: ../../migrating_to_v1.rst:361\nmsgid \"Use :attr:`Message.edited_at` instead.\"\nmsgstr \"代わりに :attr:`Message.edited_at` を使用してください。\"\n\n#: ../../migrating_to_v1.rst:363\nmsgid \"``Message.timestamp``\"\nmsgstr \"``Message.timestamp``\"\n\n#: ../../migrating_to_v1.rst:365\nmsgid \"Use :attr:`Message.created_at` instead.\"\nmsgstr \"代わりに :attr:`Message.created_at` を使用してください。\"\n\n#: ../../migrating_to_v1.rst:367\nmsgid \"``Colour.to_tuple()``\"\nmsgstr \"``Colour.to_tuple()``\"\n\n#: ../../migrating_to_v1.rst:369\nmsgid \"Use :meth:`Colour.to_rgb` instead.\"\nmsgstr \"代わりに :meth:`Colour.to_rgb` を使用してください。\"\n\n#: ../../migrating_to_v1.rst:371\nmsgid \"``Permissions.view_audit_logs``\"\nmsgstr \"``Permissions.view_audit_logs``\"\n\n#: ../../migrating_to_v1.rst:373\nmsgid \"Use :attr:`Permissions.view_audit_log` instead.\"\nmsgstr \"代わりに :attr:`Permissions.view_audit_log` 使用してください。\"\n\n#: ../../migrating_to_v1.rst:375\nmsgid \"``Member.game``\"\nmsgstr \"``Member.game``\"\n\n#: ../../migrating_to_v1.rst:377\nmsgid \"Use :attr:`Member.activities` instead.\"\nmsgstr \"代わりに :attr:`Member.activities` 使用してください。\"\n\n#: ../../migrating_to_v1.rst:379\nmsgid \"``Guild.role_hierarchy`` / ``Server.role_hierarchy``\"\nmsgstr \"``Guild.role_hierarchy`` / ``Server.role_hierarchy``\"\n\n#: ../../migrating_to_v1.rst:381\nmsgid \"Use :attr:`Guild.roles` instead. Note that while sorted, it is in the opposite order of what the old ``Guild.role_hierarchy`` used to be.\"\nmsgstr \"代わりに :attr:`Guild.roles` を使用してください。ソート順が以前の ``Guild.role_hierarchy`` とは逆になっていることに注意してください。\"\n\n#: ../../migrating_to_v1.rst:384\nmsgid \"**Changed**\"\nmsgstr \"**変更**\"\n\n#: ../../migrating_to_v1.rst:386\nmsgid \":attr:`Member.avatar_url` and :attr:`User.avatar_url` now return the default avatar if a custom one is not set.\"\nmsgstr \":attr:`Member.avatar_url` と :attr:`User.avatar_url` はアバターが設定されていなければ、デフォルトアバターが返るようになりました。\"\n\n#: ../../migrating_to_v1.rst:387\nmsgid \":attr:`Message.embeds` is now a list of :class:`Embed` instead of :class:`dict` objects.\"\nmsgstr \":attr:`Message.embeds` は :class:`dict` オブジェクトから :class:`Embed` のリストに変更されました。\"\n\n#: ../../migrating_to_v1.rst:388\nmsgid \":attr:`Message.attachments` is now a list of :class:`Attachment` instead of :class:`dict` object.\"\nmsgstr \":attr:`Message.attachments` は :class:`dict` オブジェクトから :class:`Attachment` のリストに変更されました。\"\n\n#: ../../migrating_to_v1.rst:389\nmsgid \":attr:`Guild.roles` is now sorted through hierarchy. The first element is always the ``@everyone`` role.\"\nmsgstr \":attr:`Guild.roles` はヒエラルキー順にソートされるようになりました。先頭には必ず ``@everyone`` が格納されます。\"\n\n#: ../../migrating_to_v1.rst:391\nmsgid \"**Added**\"\nmsgstr \"**追加**\"\n\n#: ../../migrating_to_v1.rst:393\nmsgid \":class:`Attachment` to represent a discord attachment.\"\nmsgstr \"Discordのアタッチメントを表す :class:`Attachment` 。\"\n\n#: ../../migrating_to_v1.rst:394\nmsgid \":class:`CategoryChannel` to represent a channel category.\"\nmsgstr \"チャンネルのカテゴリを表す :class:`CategoryChannel` 。\"\n\n#: ../../migrating_to_v1.rst:395\nmsgid \":attr:`VoiceChannel.members` for fetching members connected to a voice channel.\"\nmsgstr \"ボイスチャンネルに接続しているメンバーを取得する :attr:`VoiceChannel.members` 。\"\n\n#: ../../migrating_to_v1.rst:396\nmsgid \":attr:`TextChannel.members` for fetching members that can see the channel.\"\nmsgstr \"テキストチャンネルを閲覧可能なメンバーを取得する :attr:`TextChannel.members` 。\"\n\n#: ../../migrating_to_v1.rst:397\nmsgid \":attr:`Role.members` for fetching members that have the role.\"\nmsgstr \"役割を持っているメンバーを取得する :attr:`Role.members` 。\"\n\n#: ../../migrating_to_v1.rst:398\nmsgid \":attr:`Guild.text_channels` for fetching text channels only.\"\nmsgstr \"テキストチャンネルのみを取得する :attr:`Guild.text_channels` 。\"\n\n#: ../../migrating_to_v1.rst:399\nmsgid \":attr:`Guild.voice_channels` for fetching voice channels only.\"\nmsgstr \"ボイスチャンネルのみを取得する :attr:`Guild.voice_channels` 。\"\n\n#: ../../migrating_to_v1.rst:400\nmsgid \":attr:`Guild.categories` for fetching channel categories only.\"\nmsgstr \"チャンネルのカテゴリのみを取得する :attr:`Guild.categories` 。\"\n\n#: ../../migrating_to_v1.rst:401\nmsgid \":attr:`TextChannel.category` and :attr:`VoiceChannel.category` to get the category a channel belongs to.\"\nmsgstr \"チャンネルが属するカテゴリを取得する :attr:`TextChannel.category` と :attr:`VoiceChannel.category` 。\"\n\n#: ../../migrating_to_v1.rst:402\nmsgid \":meth:`Guild.by_category` to get channels grouped by their category.\"\nmsgstr \"カテゴリによってグループ化されたチャンネルを取得する :meth:`Guild.by_category` 。\"\n\n#: ../../migrating_to_v1.rst:403\nmsgid \":attr:`Guild.chunked` to check member chunking status.\"\nmsgstr \"メンバーのチャンク状態を確認する :attr:`Guild.chunked` 。\"\n\n#: ../../migrating_to_v1.rst:404\nmsgid \":attr:`Guild.explicit_content_filter` to fetch the content filter.\"\nmsgstr \"不適切な表現のフィルターを取得する :attr:`Guild.explicit_content_filter` 。\"\n\n#: ../../migrating_to_v1.rst:405\nmsgid \":attr:`Guild.shard_id` to get a guild's Shard ID if you're sharding.\"\nmsgstr \"シャードを使用している場合にて、ギルドのシャード IDを取得する :attr:`Guild.shard_id` 。\"\n\n#: ../../migrating_to_v1.rst:406\nmsgid \":attr:`Client.users` to get all visible :class:`User` instances.\"\nmsgstr \"Botによって取得できる :class:`User` インスタンスをすべて返す :attr:`Client.users` 。\"\n\n#: ../../migrating_to_v1.rst:407\nmsgid \":meth:`Client.get_user` to get a :class:`User` by ID.\"\nmsgstr \":meth:`Client.get_user` はIDから :class:`User` を取得します。\"\n\n#: ../../migrating_to_v1.rst:408\nmsgid \":meth:`User.avatar_url_as` to get an avatar in a specific size or format.\"\nmsgstr \"特定のサイズ、あるいはフォーマットのアバターを取得する :meth:`User.avatar_url_as` 。\"\n\n#: ../../migrating_to_v1.rst:409\nmsgid \":meth:`Guild.vanity_invite` to fetch the guild's vanity invite.\"\nmsgstr \"ギルドのカスタム招待URLを取得する :meth:`Guild.vanity_invite` 。\"\n\n#: ../../migrating_to_v1.rst:410\nmsgid \":meth:`Guild.audit_logs` to fetch the guild's audit logs.\"\nmsgstr \"ギルドのサーバーログを取得する :meth:`Guild.audit_logs` 。\"\n\n#: ../../migrating_to_v1.rst:411\nmsgid \":attr:`Message.webhook_id` to fetch the message's webhook ID.\"\nmsgstr \"メッセージのWebhook IDを取得する :attr:`Message.webhook_id` 。\"\n\n#: ../../migrating_to_v1.rst:412\nmsgid \":attr:`Message.activity` and :attr:`Message.application` for Rich Presence related information.\"\nmsgstr \"リッチプレゼンスに関する情報を取得する :attr:`Message.activity` および :attr:`Message.application` 。\"\n\n#: ../../migrating_to_v1.rst:413\nmsgid \":meth:`TextChannel.is_nsfw` to check if a text channel is NSFW.\"\nmsgstr \"テキストチャンネルがNSFWであるかを確認する :meth:`TextChannel.is_nsfw` 。\"\n\n#: ../../migrating_to_v1.rst:414\nmsgid \":meth:`Colour.from_rgb` to construct a :class:`Colour` from RGB tuple.\"\nmsgstr \"RGBのタプルから :class:`Colour` を作成する :meth:`Colour.from_rgb` 。\"\n\n#: ../../migrating_to_v1.rst:415\nmsgid \":meth:`Guild.get_role` to get a role by its ID.\"\nmsgstr \"IDからロールを取得する :meth:`Guild.get_role` 。\"\n\n#: ../../migrating_to_v1.rst:420\nmsgid \"Sending Messages\"\nmsgstr \"メッセージの送信\"\n\n#: ../../migrating_to_v1.rst:422\nmsgid \"One of the changes that were done was the merger of the previous ``Client.send_message`` and ``Client.send_file`` functionality into a single method, :meth:`~abc.Messageable.send`.\"\nmsgstr \"変更点の一つは、以前の ``Client.send_message`` と ``Client.send_file`` の機能を単一のメソッド :meth:`~abc.Messageable.send` に統合したことです。\"\n\n#: ../../migrating_to_v1.rst:425\n#: ../../migrating_to_v1.rst:1079\nmsgid \"Basically: ::\"\nmsgstr \"基本的には以下のとおりです: ::\"\n\n#: ../../migrating_to_v1.rst:433\nmsgid \"This supports everything that the old ``send_message`` supported such as embeds: ::\"\nmsgstr \"これは埋め込みメッセージなどといった、従来の ``send_message`` が持っていた機能を全てサポートしています。\"\n\n#: ../../migrating_to_v1.rst:438\nmsgid \"There is a caveat with sending files however, as this functionality was expanded to support multiple file attachments, you must now use a :class:`File` pseudo-namedtuple to upload a single file. ::\"\nmsgstr \"これはファイルの送信に対応できるように拡張されましたが、複数のファイルを送信する際には、 :class:`File` の擬似的な名前付きタプルでファイルを渡す必要があります。\"\n\n#: ../../migrating_to_v1.rst:447\nmsgid \"This change was to facilitate multiple file uploads: ::\"\nmsgstr \"この変更は、複数の添付ファイルの送信を容易にするために行われました。\"\n\n#: ../../migrating_to_v1.rst:459\nmsgid \"Asynchronous Iterators\"\nmsgstr \"非同期のイテレータ\"\n\n#: ../../migrating_to_v1.rst:461\nmsgid \"Prior to v1.0, certain functions like ``Client.logs_from`` would return a different type if done in Python 3.4 or 3.5+.\"\nmsgstr \"v1.0以前のバージョンは、Python 3.4 または 3.5以上の環境において ``Client.logs_from`` のような特定の関数で、処理終了時に異なった型を返していました。\"\n\n#: ../../migrating_to_v1.rst:463\nmsgid \"In v1.0, this change has been reverted and will now return a singular type meeting an abstract concept called :class:`AsyncIterator`.\"\nmsgstr \"これはv1.0で元に戻り、 :class:`AsyncIterator` という抽象概念を満たす特異な型を返します。\"\n\n#: ../../migrating_to_v1.rst:466\nmsgid \"This allows you to iterate over it like normal: ::\"\nmsgstr \"これは通常のイテレータと同様の処理が行なえます。\"\n\n#: ../../migrating_to_v1.rst:471\nmsgid \"Or turn it into a list: ::\"\nmsgstr \"またはリストにできます。\"\n\n#: ../../migrating_to_v1.rst:477\nmsgid \"A handy aspect of returning :class:`AsyncIterator` is that it allows you to chain functions together such as :meth:`AsyncIterator.map` or :meth:`AsyncIterator.filter`: ::\"\nmsgstr \":class:`AsyncIterator` を返すことで便利な点は :meth:`AsyncIterator.map` や :meth:`AsyncIterator.filter` といった関数をチェーンできることです: ::\"\n\n#: ../../migrating_to_v1.rst:483\nmsgid \"The functions passed to :meth:`AsyncIterator.map` or :meth:`AsyncIterator.filter` can be either coroutines or regular functions.\"\nmsgstr \":meth:`AsyncIterator.map` または :meth:`AsyncIterator.filter` に渡される関数はコルーチンか通常の関数です。\"\n\n#: ../../migrating_to_v1.rst:486\nmsgid \"You can also get single elements a la :func:`discord.utils.find` or :func:`discord.utils.get` via :meth:`AsyncIterator.get` or :meth:`AsyncIterator.find`: ::\"\nmsgstr \":meth:`AsyncIterator.get` または :meth:`AsyncIterator.find` を介して :func:`discord.utils.get` または :func:`discord.utils.find` で単一の要素を取得することもできます。\"\n\n#: ../../migrating_to_v1.rst:491\nmsgid \"The following return :class:`AsyncIterator`:\"\nmsgstr \":class:`AsyncIterator` を返すのは以下のとおりです:\"\n\n#: ../../migrating_to_v1.rst:493\nmsgid \":meth:`abc.Messageable.history`\"\nmsgstr \":meth:`abc.Messageable.history`\"\n\n#: ../../migrating_to_v1.rst:494\nmsgid \":meth:`Guild.audit_logs`\"\nmsgstr \":meth:`Guild.audit_logs`\"\n\n#: ../../migrating_to_v1.rst:500\n#: ../../migrating_to_v1.rst:926\nmsgid \"Event Changes\"\nmsgstr \"イベントの変更点\"\n\n#: ../../migrating_to_v1.rst:502\nmsgid \"A lot of events have gone through some changes.\"\nmsgstr \"多くのイベントに変更がありました。\"\n\n#: ../../migrating_to_v1.rst:504\nmsgid \"Many events with ``server`` in the name were changed to use ``guild`` instead.\"\nmsgstr \"名前に ``server`` が含まれていたイベントのほとんどが、 ``guild`` を使った名前に変更されました。\"\n\n#: ../../migrating_to_v1.rst:506\n#: ../../migrating_to_v1.rst:570\nmsgid \"Before:\"\nmsgstr \"変更前：\"\n\n#: ../../migrating_to_v1.rst:508\nmsgid \"``on_server_join``\"\nmsgstr \"``on_server_join``\"\n\n#: ../../migrating_to_v1.rst:509\nmsgid \"``on_server_remove``\"\nmsgstr \"``on_server_remove``\"\n\n#: ../../migrating_to_v1.rst:510\nmsgid \"``on_server_update``\"\nmsgstr \"``on_server_update``\"\n\n#: ../../migrating_to_v1.rst:511\nmsgid \"``on_server_role_create``\"\nmsgstr \"``on_server_role_create``\"\n\n#: ../../migrating_to_v1.rst:512\nmsgid \"``on_server_role_delete``\"\nmsgstr \"``on_server_role_delete``\"\n\n#: ../../migrating_to_v1.rst:513\nmsgid \"``on_server_role_update``\"\nmsgstr \"``on_server_role_update``\"\n\n#: ../../migrating_to_v1.rst:514\nmsgid \"``on_server_emojis_update``\"\nmsgstr \"``on_server_emojis_update``\"\n\n#: ../../migrating_to_v1.rst:515\nmsgid \"``on_server_available``\"\nmsgstr \"``on_server_available``\"\n\n#: ../../migrating_to_v1.rst:516\nmsgid \"``on_server_unavailable``\"\nmsgstr \"``on_server_unavailable``\"\n\n#: ../../migrating_to_v1.rst:518\n#: ../../migrating_to_v1.rst:576\nmsgid \"After:\"\nmsgstr \"変更後：\"\n\n#: ../../migrating_to_v1.rst:520\nmsgid \":func:`on_guild_join`\"\nmsgstr \":func:`on_guild_join`\"\n\n#: ../../migrating_to_v1.rst:521\nmsgid \":func:`on_guild_remove`\"\nmsgstr \":func:`on_guild_remove`\"\n\n#: ../../migrating_to_v1.rst:522\nmsgid \":func:`on_guild_update`\"\nmsgstr \":func:`on_guild_update`\"\n\n#: ../../migrating_to_v1.rst:523\nmsgid \":func:`on_guild_role_create`\"\nmsgstr \":func:`on_guild_role_create`\"\n\n#: ../../migrating_to_v1.rst:524\nmsgid \":func:`on_guild_role_delete`\"\nmsgstr \":func:`on_guild_role_delete`\"\n\n#: ../../migrating_to_v1.rst:525\nmsgid \":func:`on_guild_role_update`\"\nmsgstr \":func:`on_guild_role_update`\"\n\n#: ../../migrating_to_v1.rst:526\nmsgid \":func:`on_guild_emojis_update`\"\nmsgstr \":func:`on_guild_emojis_update`\"\n\n#: ../../migrating_to_v1.rst:527\nmsgid \":func:`on_guild_available`\"\nmsgstr \":func:`on_guild_available`\"\n\n#: ../../migrating_to_v1.rst:528\nmsgid \":func:`on_guild_unavailable`\"\nmsgstr \":func:`on_guild_unavailable`\"\n\n#: ../../migrating_to_v1.rst:531\nmsgid \"The :func:`on_voice_state_update` event has received an argument change.\"\nmsgstr \":func:`on_voice_state_update` イベントの引数が変更されました。\"\n\n#: ../../migrating_to_v1.rst:533\n#: ../../migrating_to_v1.rst:545\n#: ../../migrating_to_v1.rst:557\n#: ../../migrating_to_v1.rst:617\n#: ../../migrating_to_v1.rst:930\nmsgid \"Before: ::\"\nmsgstr \"変更前：\"\n\n#: ../../migrating_to_v1.rst:537\n#: ../../migrating_to_v1.rst:549\n#: ../../migrating_to_v1.rst:561\n#: ../../migrating_to_v1.rst:629\n#: ../../migrating_to_v1.rst:936\nmsgid \"After: ::\"\nmsgstr \"変更後：\"\n\n#: ../../migrating_to_v1.rst:541\nmsgid \"Instead of two :class:`Member` objects, the new event takes one :class:`Member` object and two :class:`VoiceState` objects.\"\nmsgstr \"新しくなったイベントは、二つの :class:`Member` の代わりに、 一つの :class:`Member` と二つの :class:`VoiceState` を受け取るようになりました。\"\n\n#: ../../migrating_to_v1.rst:543\nmsgid \"The :func:`on_guild_emojis_update` event has received an argument change.\"\nmsgstr \":func:`on_guild_emojis_update` イベントの引数が変更されました。\"\n\n#: ../../migrating_to_v1.rst:553\nmsgid \"The first argument is now the :class:`Guild` that the emojis were updated from.\"\nmsgstr \"最初の引数は絵文字の更新が行われた :class:`Guild` です。\"\n\n#: ../../migrating_to_v1.rst:555\nmsgid \"The :func:`on_member_ban` event has received an argument change as well:\"\nmsgstr \":func:`on_member_ban` も引数が変更されました。\"\n\n#: ../../migrating_to_v1.rst:565\nmsgid \"As part of the change, the event can either receive a :class:`User` or :class:`Member`. To help in the cases that have :class:`User`, the :class:`Guild` is provided as the first parameter.\"\nmsgstr \"変更の一つは、イベントが :class:`Member` または :class:`User` のどちらかを受け取れるようになったことです。 :class:`User` で受け取る場合には第一引数として :class:`Guild` が渡されます。\"\n\n#: ../../migrating_to_v1.rst:568\nmsgid \"The ``on_channel_`` events have received a type level split (see :ref:`migrating_1_0_channel_split`).\"\nmsgstr \"``on_channel_`` のようなイベントは、チャンネルタイプにより分割されました ( :ref:`migrating_1_0_channel_split` を参照)。\"\n\n#: ../../migrating_to_v1.rst:572\nmsgid \"``on_channel_delete``\"\nmsgstr \"``on_channel_delete``\"\n\n#: ../../migrating_to_v1.rst:573\nmsgid \"``on_channel_create``\"\nmsgstr \"``on_channel_create``\"\n\n#: ../../migrating_to_v1.rst:574\nmsgid \"``on_channel_update``\"\nmsgstr \"``on_channel_update``\"\n\n#: ../../migrating_to_v1.rst:578\nmsgid \":func:`on_guild_channel_delete`\"\nmsgstr \":func:`on_guild_channel_delete`\"\n\n#: ../../migrating_to_v1.rst:579\nmsgid \":func:`on_guild_channel_create`\"\nmsgstr \":func:`on_guild_channel_create`\"\n\n#: ../../migrating_to_v1.rst:580\nmsgid \":func:`on_guild_channel_update`\"\nmsgstr \":func:`on_guild_channel_update`\"\n\n#: ../../migrating_to_v1.rst:581\nmsgid \":func:`on_private_channel_delete`\"\nmsgstr \":func:`on_private_channel_delete`\"\n\n#: ../../migrating_to_v1.rst:582\nmsgid \":func:`on_private_channel_create`\"\nmsgstr \":func:`on_private_channel_create`\"\n\n#: ../../migrating_to_v1.rst:583\nmsgid \":func:`on_private_channel_update`\"\nmsgstr \":func:`on_private_channel_update`\"\n\n#: ../../migrating_to_v1.rst:585\nmsgid \"The ``on_guild_channel_`` events correspond to :class:`abc.GuildChannel` being updated (i.e. :class:`TextChannel` and :class:`VoiceChannel`) and the ``on_private_channel_`` events correspond to :class:`abc.PrivateChannel` being updated (i.e. :class:`DMChannel` and :class:`GroupChannel`).\"\nmsgstr \"``on_guild_channel_`` イベントは更新される :class:`abc.GuildChannel` (:class:`TextChannel` および :class:`VoiceChannel`)に対応しており、 ``on_private_channel_`` イベントは更新される :class:`abc.PrivateChannel` (:class:`DMChannel` および :class:`GroupChannel`)に対応しています。\"\n\n#: ../../migrating_to_v1.rst:592\nmsgid \"Voice Changes\"\nmsgstr \"ボイスの変更\"\n\n#: ../../migrating_to_v1.rst:594\nmsgid \"Voice sending has gone through a complete redesign.\"\nmsgstr \"ボイスの送信が完全に再構成されました。\"\n\n#: ../../migrating_to_v1.rst:596\nmsgid \"In particular:\"\nmsgstr \"主な変更点は以下のとおりです。\"\n\n#: ../../migrating_to_v1.rst:598\nmsgid \"Connection is done through :meth:`VoiceChannel.connect` instead of ``Client.join_voice_channel``.\"\nmsgstr \"ボイスチャンネルへの接続は ``Client.join_voice_channel`` に代わって :meth:`VoiceChannel.connect` になりました。\"\n\n#: ../../migrating_to_v1.rst:599\nmsgid \"You no longer create players and operate on them (you no longer store them).\"\nmsgstr \"プレイヤーを作成せずに操作が可能になりました。(プレイヤーの保存の必要もありません)\"\n\n#: ../../migrating_to_v1.rst:600\nmsgid \"You instead request :class:`VoiceClient` to play an :class:`AudioSource` via :meth:`VoiceClient.play`.\"\nmsgstr \"代わりに :class:`VoiceClient` の :meth:`VoiceClient.play` を介して :class:`AudioSource` の再生を要求します。\"\n\n#: ../../migrating_to_v1.rst:601\nmsgid \"There are different built-in :class:`AudioSource`\\\\s.\"\nmsgstr \"様々な組み込み :class:`AudioSource` があります。\"\n\n#: ../../migrating_to_v1.rst:603\nmsgid \":class:`FFmpegPCMAudio` is the equivalent of ``create_ffmpeg_player``\"\nmsgstr \":class:`FFmpegPCMAudio` は ``create_ffmpeg_player`` と同等です。\"\n\n#: ../../migrating_to_v1.rst:605\nmsgid \"create_ffmpeg_player/create_stream_player/create_ytdl_player have all been removed.\"\nmsgstr \"create_ffmpeg_player/create_stream_player/create_ytdl_player はすべて削除されました。\"\n\n#: ../../migrating_to_v1.rst:607\nmsgid \"The goal is to create :class:`AudioSource` instead.\"\nmsgstr \"代わりに :class:`AudioSource` を作成してください。\"\n\n#: ../../migrating_to_v1.rst:609\nmsgid \"Using :meth:`VoiceClient.play` will not return an ``AudioPlayer``.\"\nmsgstr \":meth:`VoiceClient.play` を呼び出しても ``AudioPlayer`` は返ってきません。\"\n\n#: ../../migrating_to_v1.rst:611\nmsgid \"Instead, it's \\\"flattened\\\" like :class:`User` -> :class:`Member` is.\"\nmsgstr \"代わりに、:class:`User` と :class:`Member` のように、「フラット化」されています。\"\n\n#: ../../migrating_to_v1.rst:613\nmsgid \"The ``after`` parameter now takes a single parameter (the error).\"\nmsgstr \"``after`` パラメータの関数は、ひとつの引数 (エラー) を取ります。\"\n\n#: ../../migrating_to_v1.rst:615\nmsgid \"Basically:\"\nmsgstr \"基本的には以下のとおりです。\"\n\n#: ../../migrating_to_v1.rst:639\nmsgid \"With the changed :class:`AudioSource` design, you can now change the source that the :class:`VoiceClient` is playing at runtime via :attr:`VoiceClient.source`.\"\nmsgstr \":class:`AudioSource` の再設計により、 :attr:`VoiceClient.source` を介して実行中の :class:`VoiceClient` のソースを変更できるようになりました。\"\n\n#: ../../migrating_to_v1.rst:642\nmsgid \"For example, you can add a :class:`PCMVolumeTransformer` to allow changing the volume: ::\"\nmsgstr \"例えば、 :class:`PCMVolumeTransformer` を追加すると、ボリュームの変更ができるようになります。\"\n\n#: ../../migrating_to_v1.rst:647\nmsgid \"An added benefit of the redesign is that it will be much more resilient towards reconnections:\"\nmsgstr \"再設計によるさらなる利点は、再接続において遥かに柔軟性を持ったことです。\"\n\n#: ../../migrating_to_v1.rst:649\nmsgid \"The voice websocket will now automatically re-connect and re-do the handshake when disconnected.\"\nmsgstr \"音声ウェブソケットは、切断された際に自動的に再接続し、ハンドシェイクを再実行します。\"\n\n#: ../../migrating_to_v1.rst:650\nmsgid \"The initial connect handshake will now retry up to 5 times so you no longer get as many ``asyncio.TimeoutError``.\"\nmsgstr \"初期接続のハンドシェイクは、最大5回までの再試行となったので、大量の ``asyncio.TimeoutError`` に悩まされることはなくなりました。\"\n\n#: ../../migrating_to_v1.rst:651\nmsgid \"Audio will now stop and resume when a disconnect is found.\"\nmsgstr \"VCの切断を検知すると、オーディオは停止し、再開しようとします。\"\n\n#: ../../migrating_to_v1.rst:653\nmsgid \"This includes changing voice regions etc.\"\nmsgstr \"これはサーバーリージョンの変更も含まれます。\"\n\n#: ../../migrating_to_v1.rst:659\nmsgid \"Waiting For Events\"\nmsgstr \"イベントの待機\"\n\n#: ../../migrating_to_v1.rst:661\nmsgid \"Prior to v1.0, the machinery for waiting for an event outside of the event itself was done through two different functions, ``Client.wait_for_message`` and ``Client.wait_for_reaction``. One problem with one such approach is that it did not allow you to wait for events outside of the ones provided by the library.\"\nmsgstr \"v1.0以前のバージョンでは、イベントの発生を待つ方法として ``Client.wait_for_message`` と ``Client.wait_for_reaction`` の二つの関数が用意されていました。このアプローチの欠点はライブラリが提供するイベント以外の発生を待つことが出来ない点です。\"\n\n#: ../../migrating_to_v1.rst:665\nmsgid \"In v1.0 the concept of waiting for another event has been generalised to work with any event as :meth:`Client.wait_for`.\"\nmsgstr \"v1.0では別のイベントを待つ概念が :meth:`Client.wait_for` として一般化され、どのイベントでも動くようになりました。\"\n\n#: ../../migrating_to_v1.rst:667\nmsgid \"For example, to wait for a message: ::\"\nmsgstr \"例えば、メッセージを待つ処理は以下のようになります。\"\n\n#: ../../migrating_to_v1.rst:678\nmsgid \"To facilitate multiple returns, :meth:`Client.wait_for` returns either a single argument, no arguments, or a tuple of arguments.\"\nmsgstr \"複数の返り値に対応するため、 :meth:`Client.wait_for` は単一の引数、引数なし、あるいは引数のタプルを返すようになっています。\"\n\n#: ../../migrating_to_v1.rst:681\nmsgid \"For example, to wait for a reaction: ::\"\nmsgstr \"例えば、リアクションを待つ処理は以下のようになります。\"\n\n#: ../../migrating_to_v1.rst:687\nmsgid \"Since this function now can return multiple arguments, the ``timeout`` parameter will now raise a :exc:`asyncio.TimeoutError` when reached instead of setting the return to ``None``. For example:\"\nmsgstr \"この関数は複数の引数を返すため、 ``timeout`` に設定した時間経過すると、 ``None`` を返すのではなく、 :exc:`asyncio.TimeoutError` を発生させるようになりました。以下はその例になります。\"\n\n#: ../../migrating_to_v1.rst:704\nmsgid \"Upgraded Dependencies\"\nmsgstr \"依存関係のアップグレード\"\n\n#: ../../migrating_to_v1.rst:706\nmsgid \"Following v1.0 of the library, we've updated our requirements to :doc:`aiohttp <aio:index>` v2.0 or higher.\"\nmsgstr \"ライブラリのv1.0への更新に伴い、要件が :doc:`aiohttp <aio:index>` v2.0以上へと変更されました。\"\n\n#: ../../migrating_to_v1.rst:708\nmsgid \"Since this is a backwards incompatible change, it is recommended that you see the `changes <http://aiohttp.readthedocs.io/en/stable/changes.html#rc1-2017-03-15>`_ and the :doc:`aio:migration_to_2xx` pages for details on the breaking changes in :doc:`aiohttp <aio:index>`.\"\nmsgstr \"これは後方互換性のない変更となるため、 :doc:`aiohttp <aio:index>` の変更点の詳細について `changes <http://aiohttp.readthedocs.io/en/stable/changes.html#rc1-2017-03-15>`_ と :doc:`aio:migration_to_2xx` ページを参照すべきです。\"\n\n#: ../../migrating_to_v1.rst:713\nmsgid \"Of the most significant for common users is the removal of helper functions such as:\"\nmsgstr \"ユーザーにとって最も重要な変更点は、以下のヘルパー関数の削除です。\"\n\n#: ../../migrating_to_v1.rst:715\nmsgid \"``aiohttp.get``\"\nmsgstr \"``aiohttp.get``\"\n\n#: ../../migrating_to_v1.rst:716\nmsgid \"``aiohttp.post``\"\nmsgstr \"``aiohttp.post``\"\n\n#: ../../migrating_to_v1.rst:717\nmsgid \"``aiohttp.delete``\"\nmsgstr \"``aiohttp.delete``\"\n\n#: ../../migrating_to_v1.rst:718\nmsgid \"``aiohttp.patch``\"\nmsgstr \"``aiohttp.patch``\"\n\n#: ../../migrating_to_v1.rst:719\nmsgid \"``aiohttp.head``\"\nmsgstr \"``aiohttp.head``\"\n\n#: ../../migrating_to_v1.rst:720\nmsgid \"``aiohttp.put``\"\nmsgstr \"``aiohttp.put``\"\n\n#: ../../migrating_to_v1.rst:721\nmsgid \"``aiohttp.request``\"\nmsgstr \"``aiohttp.request``\"\n\n#: ../../migrating_to_v1.rst:723\nmsgid \"It is recommended that you create a session instead: ::\"\nmsgstr \"代わりにセッションを作成することをお勧めします。\"\n\n#: ../../migrating_to_v1.rst:729\nmsgid \"Since it is better to not create a session for every request, you should store it in a variable and then call ``session.close`` on it when it needs to be disposed.\"\nmsgstr \"リクエストごとにセッションを作成するのは良いとは言えないため、変数に格納しておき、破棄しなければならない時に ``session.close`` を呼び出すのが良いでしょう。\"\n\n#: ../../migrating_to_v1.rst:733\nmsgid \"Sharding\"\nmsgstr \"シャーディング\"\n\n#: ../../migrating_to_v1.rst:735\nmsgid \"The library has received significant changes on how it handles sharding and now has sharding as a first-class citizen.\"\nmsgstr \"シャーディングの扱いに対して大きな変更があり、現在、シャーディングは第一級オブジェクトとして扱われています。\"\n\n#: ../../migrating_to_v1.rst:737\nmsgid \"If using a Bot account and you want to shard your bot in a single process then you can use the :class:`AutoShardedClient`.\"\nmsgstr \"Botアカウントを使用していて、かつ一つのプロセスでBotをシャーディングしたい場合は、 :class:`AutoShardedClient` を使用してください。\"\n\n#: ../../migrating_to_v1.rst:739\nmsgid \"This class allows you to use sharding without having to launch multiple processes or deal with complicated IPC.\"\nmsgstr \"このクラスは複数のプロセスを起動したり、IPCを処理することなくシャーディングが行えます。\"\n\n#: ../../migrating_to_v1.rst:741\nmsgid \"It should be noted that **the sharded client does not support user accounts**. This is due to the changes in connection logic and state handling.\"\nmsgstr \"シャーディングしたクライアントはユーザーアカウントをサポートしないことを覚えておきましょう。これは、接続の形態と状態処理の変更によるものです。\"\n\n#: ../../migrating_to_v1.rst:744\nmsgid \"Usage is as simple as doing: ::\"\nmsgstr \"使い方は簡単です。\"\n\n#: ../../migrating_to_v1.rst:748\nmsgid \"instead of using :class:`Client`.\"\nmsgstr \":class:`Client` の代わりに上記のようにしてください。\"\n\n#: ../../migrating_to_v1.rst:750\nmsgid \"This will launch as many shards as your bot needs using the ``/gateway/bot`` endpoint, which allocates about 1000 guilds per shard.\"\nmsgstr \"これは ``/gateway/bot`` エンドポイントを使って、あなたのBotに必要な数のシャードを起動します。このエンドポイントはシャードごとに1000ギルドを割り当てます。\"\n\n#: ../../migrating_to_v1.rst:753\nmsgid \"If you want more control over the sharding you can specify ``shard_count`` and ``shard_ids``. ::\"\nmsgstr \"シャードをより詳細に制御したい場合は、 ``shard_count`` と ``shard_ids`` を利用してください。\"\n\n#: ../../migrating_to_v1.rst:761\nmsgid \"For users of the command extension, there is also :class:`~ext.commands.AutoShardedBot` which behaves similarly.\"\nmsgstr \"コマンド拡張を利用しているユーザーのために、同様に動作する :class:`~ext.commands.AutoShardedBot` が用意されています。\"\n\n#: ../../migrating_to_v1.rst:764\nmsgid \"Connection Improvements\"\nmsgstr \"接続の改善\"\n\n#: ../../migrating_to_v1.rst:766\nmsgid \"In v1.0, the auto reconnection logic has been powered up significantly.\"\nmsgstr \"v1.0では、自動再接続機能が大幅に強化されました。\"\n\n#: ../../migrating_to_v1.rst:768\nmsgid \":meth:`Client.connect` has gained a new keyword argument, ``reconnect`` that defaults to ``True`` which controls the reconnect logic. When enabled, the client will automatically reconnect in all instances of your internet going offline or Discord going offline with exponential back-off.\"\nmsgstr \":meth:`Client.connect` には新しいキーワード引数が追加されました。再接続機能の設定を行う ``reconnect`` はデフォルトで ``True`` に設定されています。有効にすると、クライアントは全インターネットのインスタンスがオフラインになった際や、Discordが指数関数的後退によってオフラインになった際に自動で再接続を試みます。\"\n\n#: ../../migrating_to_v1.rst:772\nmsgid \":meth:`Client.run` and :meth:`Client.start` gains this keyword argument as well, but for most cases you will not need to specify it unless turning it off.\"\nmsgstr \":meth:`Client.run` や :meth:`Client.start` にも同様のキーワード引数が追加されていますが、このさい接続機能をオフにする場合以外は指定する必要はありません。\"\n\n#: ../../migrating_to_v1.rst:778\nmsgid \"Command Extension Changes\"\nmsgstr \"コマンド拡張の変更\"\n\n#: ../../migrating_to_v1.rst:780\nmsgid \"Due to the :ref:`migrating_1_0_model_state` changes, some of the design of the extension module had to undergo some design changes as well.\"\nmsgstr \":ref:`migrating_1_0_model_state` により、拡張モジュールの設計にもいくつかの変更があります。\"\n\n#: ../../migrating_to_v1.rst:784\nmsgid \"Context Changes\"\nmsgstr \"コンテキストの変更\"\n\n#: ../../migrating_to_v1.rst:786\nmsgid \"In v1.0, the :class:`.Context` has received a lot of changes with how it's retrieved and used.\"\nmsgstr \"v1.0において、 :class:`.Context` は取得と利用の面において、多くの変更があります。\"\n\n#: ../../migrating_to_v1.rst:788\nmsgid \"The biggest change is that ``pass_context=True`` no longer exists, :class:`.Context` is always passed. Ergo:\"\nmsgstr \"最も大きな変更点は ``pass_context=True`` が廃止され、常に :class:`.Context` が渡されるようになったことです。そのため以下のようになります。\"\n\n#: ../../migrating_to_v1.rst:802\nmsgid \"The reason for this is because :class:`~ext.commands.Context` now meets the requirements of :class:`abc.Messageable`. This makes it have similar functionality to :class:`TextChannel` or :class:`DMChannel`. Using :meth:`~.Context.send` will either DM the user in a DM context or send a message in the channel it was in, similar to the old ``bot.say`` functionality. The old helpers have been removed in favour of the new :class:`abc.Messageable` interface. See :ref:`migrating_1_0_removed_helpers` for more information.\"\nmsgstr \"その理由として、 :class:`~ext.commands.Context` が :class:`abc.Messageable` の要件を満たしていることが挙げられます。 これは :class:`TextChannel` や :class:`DMChannel` と同等の機能を持っており、 :meth:`~.Context.send` を用いることで、従来の ``bot.say`` のようにDMまたはテキストチャンネルにメッセージを送信することが出来ます。古いヘルパー関数は新しい :class:`abc.Messageable` インタフェースの実装に伴い削除されました。詳細は :ref:`migrating_1_0_removed_helpers` を参照してください。\"\n\n#: ../../migrating_to_v1.rst:808\nmsgid \"Since the :class:`~ext.commands.Context` is now passed by default, several shortcuts have been added:\"\nmsgstr \":class:`~ext.commands.Context` がデフォルトで渡されるので、ショートカットが追加されました:\"\n\n#: ../../migrating_to_v1.rst:810\nmsgid \"**New Shortcuts**\"\nmsgstr \"**新しいショートカット**\"\n\n#: ../../migrating_to_v1.rst:812\nmsgid \":attr:`ctx.author <ext.commands.Context.author>` is a shortcut for ``ctx.message.author``.\"\nmsgstr \":attr:`ctx.author <ext.commands.Context.author>` は ``ctx.message.author`` のショートカットです。\"\n\n#: ../../migrating_to_v1.rst:813\nmsgid \":attr:`ctx.guild <ext.commands.Context.guild>` is a shortcut for ``ctx.message.guild``.\"\nmsgstr \":attr:`ctx.guild <ext.commands.Context.guild>` は ``ctx.message.guild`` のショートカットです。\"\n\n#: ../../migrating_to_v1.rst:814\nmsgid \":attr:`ctx.channel <ext.commands.Context.channel>` is a shortcut for ``ctx.message.channel``.\"\nmsgstr \":attr:`ctx.channel <ext.commands.Context.channel>` は ``ctx.message.channel`` のショートカットです。\"\n\n#: ../../migrating_to_v1.rst:815\nmsgid \":attr:`ctx.me <ext.commands.Context.me>` is a shortcut for ``ctx.message.guild.me`` or ``ctx.bot.user``.\"\nmsgstr \":attr:`ctx.me <ext.commands.Context.me>` は ``ctx.message.guild.me`` のショートカットです。\"\n\n#: ../../migrating_to_v1.rst:816\nmsgid \":attr:`ctx.voice_client <ext.commands.Context.voice_client>` is a shortcut for ``ctx.message.guild.voice_client``.\"\nmsgstr \":attr:`ctx.voice_client <ext.commands.Context.voice_client>` は ``ctx.message.guild.voice_client`` のショートカットです。\"\n\n#: ../../migrating_to_v1.rst:818\nmsgid \"**New Functionality**\"\nmsgstr \"**新しい機能**\"\n\n#: ../../migrating_to_v1.rst:820\nmsgid \":meth:`.Context.reinvoke` to invoke a command again.\"\nmsgstr \":meth:`.Context.reinvoke` はコマンドを再度呼び出します。\"\n\n#: ../../migrating_to_v1.rst:822\nmsgid \"This is useful for bypassing cooldowns.\"\nmsgstr \"クールダウンの回避に利用できます。\"\n\n#: ../../migrating_to_v1.rst:823\nmsgid \":attr:`.Context.valid` to check if a context can be invoked with :meth:`.Bot.invoke`.\"\nmsgstr \":attr:`.Context.valid` で、:meth:`.Bot.invoke` で呼びだせるか確認します。\"\n\n#: ../../migrating_to_v1.rst:824\nmsgid \":meth:`.Context.send_help` to show the help command for an entity using the new :class:`~.ext.commands.HelpCommand` system.\"\nmsgstr \":meth:`.Context.send_help` を使うと、新しい :class:`~.ext.commands.HelpCommand` システムである項目のヘルプを出力できます。\"\n\n#: ../../migrating_to_v1.rst:826\nmsgid \"This is useful if you want to show the user help if they misused a command.\"\nmsgstr \"コマンドの使用法を誤ったときにヘルプを表示させたい場合に便利です。\"\n\n#: ../../migrating_to_v1.rst:829\nmsgid \"Subclassing Context\"\nmsgstr \"コンテキストのサブクラス\"\n\n#: ../../migrating_to_v1.rst:831\nmsgid \"In v1.0, there is now the ability to subclass :class:`~ext.commands.Context` and use it instead of the default provided one.\"\nmsgstr \"v1.0では、 :class:`~ext.commands.Context` を継承したサブクラスを作成し、デフォルトで実装されているものの代わりに使うことが出来ます。\"\n\n#: ../../migrating_to_v1.rst:834\nmsgid \"For example, if you want to add some functionality to the context:\"\nmsgstr \"例えば、コンテキストに機能の追加を行いたい場合は以下のように実装が出来ます。\"\n\n#: ../../migrating_to_v1.rst:843\nmsgid \"Then you can use :meth:`~ext.commands.Bot.get_context` inside :func:`on_message` with combination with :meth:`~ext.commands.Bot.invoke` to use your custom context:\"\nmsgstr \"また、 :func:`on_message` 内で :meth:`~ext.commands.Bot.get_context` と :meth:`~ext.commands.Bot.invoke` を組み合わせることであなたのカスタムコンテキストを使用できます。\"\n\n#: ../../migrating_to_v1.rst:853\nmsgid \"Now inside your commands you will have access to your custom context:\"\nmsgstr \"これにより、コマンドからあなたのカスタムコンテキストにアクセスすることが可能です。\"\n\n#: ../../migrating_to_v1.rst:864\nmsgid \"Removed Helpers\"\nmsgstr \"ヘルパー関数の削除\"\n\n#: ../../migrating_to_v1.rst:866\nmsgid \"With the new :class:`.Context` changes, a lot of message sending helpers have been removed.\"\nmsgstr \"新しい :class:`.Context` の変更によって、たくさんのメッセージ送信用のヘルパー関数が削除されました。\"\n\n#: ../../migrating_to_v1.rst:868\nmsgid \"For a full list of changes, see below:\"\nmsgstr \"以下が削除された関数のリストです。\"\n\n#: ../../migrating_to_v1.rst:873\nmsgid \"``Bot.say``\"\nmsgstr \"``Bot.say``\"\n\n#: ../../migrating_to_v1.rst:873\n#: ../../migrating_to_v1.rst:875\nmsgid \":meth:`.Context.send`\"\nmsgstr \":meth:`.Context.send`\"\n\n#: ../../migrating_to_v1.rst:875\nmsgid \"``Bot.upload``\"\nmsgstr \"``Bot.upload``\"\n\n#: ../../migrating_to_v1.rst:877\nmsgid \"``Bot.whisper``\"\nmsgstr \"``Bot.whisper``\"\n\n#: ../../migrating_to_v1.rst:877\nmsgid \"``ctx.author.send``\"\nmsgstr \"``ctx.author.send``\"\n\n#: ../../migrating_to_v1.rst:879\nmsgid \"``Bot.type``\"\nmsgstr \"``Bot.type``\"\n\n#: ../../migrating_to_v1.rst:879\nmsgid \":meth:`.Context.typing` or :meth:`.Context.trigger_typing`\"\nmsgstr \":meth:`.Context.typing` または :meth:`.Context.trigger_typing`\"\n\n#: ../../migrating_to_v1.rst:881\nmsgid \"``Bot.reply``\"\nmsgstr \"``Bot.reply``\"\n\n#: ../../migrating_to_v1.rst:881\nmsgid \"No replacement.\"\nmsgstr \"代替となるものはありません。\"\n\n#: ../../migrating_to_v1.rst:885\nmsgid \"Command Changes\"\nmsgstr \"コマンドの変更\"\n\n#: ../../migrating_to_v1.rst:887\nmsgid \"As mentioned earlier, the first command change is that ``pass_context=True`` no longer exists, so there is no need to pass this as a parameter.\"\nmsgstr \"前述の通り、 ``pass_context=True`` は削除されたため、これをパラメータとして渡す必要はありません。\"\n\n#: ../../migrating_to_v1.rst:890\nmsgid \"Another change is the removal of ``no_pm=True``. Instead, use the new :func:`~ext.commands.guild_only` built-in check.\"\nmsgstr \"他に ``no_pm=True`` も削除されました。代わりに新しい組み込みチェックである :func:`~ext.commands.guild_only` を使用してください。\"\n\n#: ../../migrating_to_v1.rst:893\nmsgid \"The ``commands`` attribute of :class:`~ext.commands.Bot` and :class:`~ext.commands.Group` have been changed from a dictionary to a set that does not have aliases. To retrieve the previous dictionary behaviour, use ``all_commands`` instead.\"\nmsgstr \":class:`~ext.commands.Bot` と :class:`~ext.commands.Group` の ``commands`` 属性は辞書からエイリアスを持たないsetに変更されました。以前のような辞書を取得するには ``all_commands`` を使用してください。\"\n\n#: ../../migrating_to_v1.rst:896\nmsgid \"Command instances have gained new attributes and properties:\"\nmsgstr \"コマンドインスタンスには新たな属性とプロパティが追加されました。\"\n\n#: ../../migrating_to_v1.rst:898\nmsgid \":attr:`~ext.commands.Command.signature` to get the signature of the command.\"\nmsgstr \"コマンドのシグネチャを取得する :attr:`~ext.commands.Command.signature` 。\"\n\n#: ../../migrating_to_v1.rst:899\nmsgid \":attr:`~ext.commands.Command.usage`, an attribute to override the default signature.\"\nmsgstr \":attr:`~ext.commands.Command.usage` はデフォルトのシグネチャをオーバーライドする属性です\"\n\n#: ../../migrating_to_v1.rst:900\nmsgid \":attr:`~ext.commands.Command.root_parent` to get the root parent group of a subcommand.\"\nmsgstr \":attr:`~ext.commands.Command.root_parent` はサブコマンドのルートである、親グループを取得します\"\n\n#: ../../migrating_to_v1.rst:902\nmsgid \"For :class:`~ext.commands.Group` and :class:`~ext.commands.Bot` the following changed:\"\nmsgstr \":class:`~ext.commands.Group` と :class:`~ext.commands.Bot` は次のように変更されました。\"\n\n#: ../../migrating_to_v1.rst:904\nmsgid \"Changed :attr:`~.GroupMixin.commands` to be a :class:`set` without aliases.\"\nmsgstr \":attr:`~.GroupMixin.commands` は エイリアスなしの :class:`set` に変更されました。\"\n\n#: ../../migrating_to_v1.rst:906\nmsgid \"Use :attr:`~.GroupMixin.all_commands` to get the old :class:`dict` with all commands.\"\nmsgstr \"すべてのコマンドを従来の :class:`dict` で取得するには :attr:`~.GroupMixin.all_commands` を使用してください。\"\n\n#: ../../migrating_to_v1.rst:909\nmsgid \"Check Changes\"\nmsgstr \"チェックの変更\"\n\n#: ../../migrating_to_v1.rst:911\nmsgid \"Prior to v1.0, :func:`~ext.commands.check`\\\\s could only be synchronous. As of v1.0 checks can now be coroutines.\"\nmsgstr \"v1.0以前のバージョンでは :func:`~ext.commands.check` は同期関数でしたが、 v1.0のチェックはコルーチンにもなれます。\"\n\n#: ../../migrating_to_v1.rst:913\nmsgid \"Along with this change, a couple new checks were added.\"\nmsgstr \"この変更に加え、新たなチェックが二つ追加されました。\"\n\n#: ../../migrating_to_v1.rst:915\nmsgid \":func:`~ext.commands.guild_only` replaces the old ``no_pm=True`` functionality.\"\nmsgstr \":func:`~ext.commands.guild_only` が以前の ``no_pm=True`` 機能を置き換えました。\"\n\n#: ../../migrating_to_v1.rst:916\nmsgid \":func:`~ext.commands.is_owner` uses the :meth:`Client.application_info` endpoint by default to fetch owner ID.\"\nmsgstr \":func:`~ext.commands.is_owner` は :meth:`Client.application_info` のエンドポイントを使用してオーナーIDを取得します。\"\n\n#: ../../migrating_to_v1.rst:918\nmsgid \"This is actually powered by a different function, :meth:`~ext.commands.Bot.is_owner`.\"\nmsgstr \"実際には :meth:`~ext.commands.Bot.is_owner` という別の関数を使用して実行されます。\"\n\n#: ../../migrating_to_v1.rst:919\nmsgid \"You can set the owner ID yourself by setting :attr:`.Bot.owner_id`.\"\nmsgstr \":attr:`.Bot.owner_id` に値を指定することで自分でオーナーIDの設定ができます。\"\n\n#: ../../migrating_to_v1.rst:921\nmsgid \":func:`~ext.commands.is_nsfw` checks if the channel the command is in is a NSFW channel.\"\nmsgstr \":func:`~ext.commands.is_nsfw` はコマンドが実行されたチャンネルがNSFWチャンネルかどうかをチェックします。\"\n\n#: ../../migrating_to_v1.rst:923\nmsgid \"This is powered by the new :meth:`TextChannel.is_nsfw` method.\"\nmsgstr \"これは新しく追加された :meth:`TextChannel.is_nsfw` メソッドにより実行されています。\"\n\n#: ../../migrating_to_v1.rst:928\nmsgid \"All command extension events have changed.\"\nmsgstr \"すべてのコマンド拡張のイベントが変更されました。\"\n\n#: ../../migrating_to_v1.rst:942\nmsgid \"The extraneous ``command`` parameter in :func:`.on_command` and :func:`.on_command_completion` have been removed. The :class:`~ext.commands.Command` instance was not kept up-to date so it was incorrect. In order to get the up to date :class:`~ext.commands.Command` instance, use the :attr:`.Context.command` attribute.\"\nmsgstr \":func:`.on_command` と :func:`.on_command_completion` の ``command`` パラメータが削除されました。 :class:`~ext.commands.Command` インスタンスは更新されておらず、正しいものではありませんでした。最新の :class:`~ext.commands.Command` インスタンスを取得するには :attr:`.Context.command` 属性を使用してください。\"\n\n#: ../../migrating_to_v1.rst:947\nmsgid \"The error handlers, either :meth:`~ext.commands.Command.error` or :func:`.on_command_error`, have been re-ordered to use the :class:`~ext.commands.Context` as its first parameter to be consistent with other events and commands.\"\nmsgstr \":meth:`~ext.commands.Command.error` や :func:`.on_command_error` のようなエラーハンドラは他のイベント及びコマンドとの一貫性を保つため、最初のパラメータとして :class:`~ext.commands.Context` を使用するよう変更されました。\"\n\n#: ../../migrating_to_v1.rst:952\nmsgid \"HelpFormatter and Help Command Changes\"\nmsgstr \"HelpFormatter および Help Command の変更\"\n\n#: ../../migrating_to_v1.rst:954\nmsgid \"The ``HelpFormatter`` class has been removed. It has been replaced with a :class:`~.commands.HelpCommand` class. This class now stores all the command handling and processing of the help command.\"\nmsgstr \"``HelpFormatter`` クラスは削除され、 :class:`~.commands.HelpCommand` に置き換えられました。このクラスはヘルプコマンドのコマンドハンドリングや処理などといったすべてが格納されています。\"\n\n#: ../../migrating_to_v1.rst:956\nmsgid \"The help command is now stored in the :attr:`.Bot.help_command` attribute. As an added extension, you can disable the help command completely by assigning the attribute to ``None`` or passing it at ``__init__`` as ``help_command=None``.\"\nmsgstr \"ヘルプコマンドは属性である :attr:`.Bot.help_command` に格納されています。追加の機能として、この属性に ``None`` を代入するか、 ``help_command=None`` のようにして ``__init__`` にわたすことでヘルプコマンドを完全に無効化できます。\"\n\n#: ../../migrating_to_v1.rst:958\nmsgid \"The new interface allows the help command to be customised through special methods that can be overridden.\"\nmsgstr \"新しいインタフェースでは特殊なメソッドをオーバーライドすることでヘルプコマンドをカスタマイズすることができます。\"\n\n#: ../../migrating_to_v1.rst:960\nmsgid \":meth:`.HelpCommand.send_bot_help`\"\nmsgstr \":meth:`.HelpCommand.send_bot_help`\"\n\n#: ../../migrating_to_v1.rst:961\nmsgid \"Called when the user requested for help with the entire bot.\"\nmsgstr \"ユーザーが ボット全体のヘルプを要求した時に呼び出されます。\"\n\n#: ../../migrating_to_v1.rst:962\nmsgid \":meth:`.HelpCommand.send_cog_help`\"\nmsgstr \":meth:`.HelpCommand.send_cog_help`\"\n\n#: ../../migrating_to_v1.rst:963\nmsgid \"Called when the user requested for help with a specific cog.\"\nmsgstr \"ユーザーが特定のコグについてのヘルプを要求した時に呼び出されます。\"\n\n#: ../../migrating_to_v1.rst:964\nmsgid \":meth:`.HelpCommand.send_group_help`\"\nmsgstr \":meth:`.HelpCommand.send_group_help`\"\n\n#: ../../migrating_to_v1.rst:965\nmsgid \"Called when the user requested for help with a :class:`~.commands.Group`\"\nmsgstr \"ユーザーが :class:`~.commands.Group` についてのヘルプを要求した時に呼び出されます。\"\n\n#: ../../migrating_to_v1.rst:966\nmsgid \":meth:`.HelpCommand.send_command_help`\"\nmsgstr \":meth:`.HelpCommand.send_command_help`\"\n\n#: ../../migrating_to_v1.rst:967\nmsgid \"Called when the user requested for help with a :class:`~.commands.Command`\"\nmsgstr \"ユーザーが :class:`~.commands.Command` のヘルプを要求した時に呼び出されます。\"\n\n#: ../../migrating_to_v1.rst:968\nmsgid \":meth:`.HelpCommand.get_destination`\"\nmsgstr \":meth:`.HelpCommand.get_destination`\"\n\n#: ../../migrating_to_v1.rst:969\nmsgid \"Called to know where to send the help messages. Useful for deciding whether to DM or not.\"\nmsgstr \"ヘルプメッセージの送信先を知るために呼び出されます。DMとして送るかどうかを決める際に役立ちます。\"\n\n#: ../../migrating_to_v1.rst:970\nmsgid \":meth:`.HelpCommand.command_not_found`\"\nmsgstr \":meth:`.HelpCommand.command_not_found`\"\n\n#: ../../migrating_to_v1.rst:971\nmsgid \"A function (or coroutine) that returns a presentable no command found string.\"\nmsgstr \"コマンドが見つからなかったときに文字列を返す関数(またはコルーチン)。\"\n\n#: ../../migrating_to_v1.rst:972\nmsgid \":meth:`.HelpCommand.subcommand_not_found`\"\nmsgstr \":meth:`.HelpCommand.subcommand_not_found`\"\n\n#: ../../migrating_to_v1.rst:973\nmsgid \"A function (or coroutine) that returns a string when a subcommand is not found.\"\nmsgstr \"サブコマンドが見つからなかったときに文字列を返す関数(またはコルーチン)。\"\n\n#: ../../migrating_to_v1.rst:975\nmsgid \":meth:`.HelpCommand.send_error_message`\"\nmsgstr \":meth:`.HelpCommand.send_error_message`\"\n\n#: ../../migrating_to_v1.rst:975\nmsgid \"A coroutine that gets passed the result of :meth:`.HelpCommand.command_not_found` and :meth:`.HelpCommand.subcommand_not_found`.\"\nmsgstr \":meth:`.HelpCommand.command_not_found` と :meth:`.HelpCommand.subcommand_not_found` の結果が渡されるコルーチン。\"\n\n#: ../../migrating_to_v1.rst:976\nmsgid \"By default it just sends the message. But you can, for example, override it to put it in an embed.\"\nmsgstr \"デフォルトではメッセージの送信のみを行いますが、たとえば、そのメッセージを埋め込み化したい場合などにオーバーライドして使うことができます。\"\n\n#: ../../migrating_to_v1.rst:977\nmsgid \":meth:`.HelpCommand.on_help_command_error`\"\nmsgstr \":meth:`.HelpCommand.on_help_command_error`\"\n\n#: ../../migrating_to_v1.rst:978\nmsgid \"The :ref:`error handler <ext_commands_error_handler>` for the help command if you want to add one.\"\nmsgstr \"ヘルプコマンドの :ref:`エラーハンドラ <ext_commands_error_handler>` 。追加したい場合のみ使用してください。\"\n\n#: ../../migrating_to_v1.rst:980\nmsgid \":meth:`.HelpCommand.prepare_help_command`\"\nmsgstr \":meth:`.HelpCommand.prepare_help_command`\"\n\n#: ../../migrating_to_v1.rst:980\nmsgid \"A coroutine that is called right before the help command processing is done.\"\nmsgstr \"ヘルプコマンドの処理が行われる前に呼び出されるコルーチン。\"\n\n#: ../../migrating_to_v1.rst:982\nmsgid \"Certain subclasses can implement more customisable methods.\"\nmsgstr \"特定のサブクラスはさらにカスタマイズ可能なメソッドを実装できます。\"\n\n#: ../../migrating_to_v1.rst:984\nmsgid \"The old ``HelpFormatter`` was replaced with :class:`~.commands.DefaultHelpCommand`\\\\, which implements all of the logic of the old help command. The customisable methods can be found in the accompanying documentation.\"\nmsgstr \"以前の ``HelpFormatter`` はその機能を全て実装した :class:`~.commands.DefaultHelpCommand` に置き換えられました。カスタマイズメソッドは添付のドキュメントで確認することができます。\"\n\n#: ../../migrating_to_v1.rst:986\nmsgid \"The library now provides a new more minimalistic :class:`~.commands.HelpCommand` implementation that doesn't take as much space, :class:`~.commands.MinimalHelpCommand`. The customisable methods can also be found in the accompanying documentation.\"\nmsgstr \"このライブラリは多くのスペースをとらない、より小規模化した :class:`~.commands.HelpCommand` の実装である :class:`~.commands.MinimalHelpCommand` を提供します。カスタマイズ可能なメソッドは付随のドキュメントから確認することが可能です。\"\n\n#: ../../migrating_to_v1.rst:988\nmsgid \"A frequent request was if you could associate a help command with a cog. The new design allows for dynamically changing of cog through binding it to the :attr:`.HelpCommand.cog` attribute. After this assignment the help command will pretend to be part of the cog and everything should work as expected. When the cog is unloaded then the help command will be \\\"unbound\\\" from the cog.\"\nmsgstr \"ヘルプコマンドをコグに関連付けることはできないのかという要望が多くありました。この新しい設計では :attr:`.HelpCommand.cog` にバインドすることでコグを動的に変更することが可能です。この割当をおこなった後、ヘルプコマンドはコグの一部として、期待通りの動きをするでしょう。コグがアンロードされると、ヘルプコマンドはコグから「バインド解除」されます。\"\n\n#: ../../migrating_to_v1.rst:990\nmsgid \"For example, to implement a :class:`~.commands.HelpCommand` in a cog, the following snippet can be used.\"\nmsgstr \"例えば、 :class:`~.commands.HelpCommand` をコグに実装するには、次のコードが役立つでしょう。\"\n\n#: ../../migrating_to_v1.rst:1007\nmsgid \"For more information, check out the relevant :ref:`documentation <ext_commands_help_command>`.\"\nmsgstr \"詳しくは、:ref:`こちらの説明 <ext_commands_help_command>` をご覧ください。\"\n\n#: ../../migrating_to_v1.rst:1010\nmsgid \"Cog Changes\"\nmsgstr \"コグの変更\"\n\n#: ../../migrating_to_v1.rst:1012\nmsgid \"Cogs have completely been revamped. They are documented in :ref:`ext_commands_cogs` as well.\"\nmsgstr \"コグは完全に刷新されました。これは :ref:`ext_commands_cogs` としてドキュメント化されています。\"\n\n#: ../../migrating_to_v1.rst:1014\nmsgid \"Cogs are now required to have a base class, :class:`~.commands.Cog` for future proofing purposes. This comes with special methods to customise some behaviour.\"\nmsgstr \"コグは将来的な校正のためのクラスである :class:`~.commands.Cog` を基底クラスとして持つ必要があります。このクラスには動作のカスタマイズのために、特別なメソッドが用意されています。\"\n\n#: ../../migrating_to_v1.rst:1016\nmsgid \":meth:`.Cog.cog_unload`\"\nmsgstr \":meth:`.Cog.cog_unload`\"\n\n#: ../../migrating_to_v1.rst:1017\nmsgid \"This is called when a cog needs to do some cleanup, such as cancelling a task.\"\nmsgstr \"これはタスクのキャンセルのような、コグに何らかのクリーンアップが必要なときに呼び出されます。\"\n\n#: ../../migrating_to_v1.rst:1018\nmsgid \":meth:`.Cog.bot_check_once`\"\nmsgstr \":meth:`.Cog.bot_check_once`\"\n\n#: ../../migrating_to_v1.rst:1019\nmsgid \"This registers a :meth:`.Bot.check_once` check.\"\nmsgstr \"これは :meth:`.Bot.check_once` チェックを登録します。\"\n\n#: ../../migrating_to_v1.rst:1020\nmsgid \":meth:`.Cog.bot_check`\"\nmsgstr \":meth:`.Cog.bot_check`\"\n\n#: ../../migrating_to_v1.rst:1021\nmsgid \"This registers a regular :meth:`.Bot.check` check.\"\nmsgstr \"これは普通の :meth:`.Bot.check` チェックを登録します。\"\n\n#: ../../migrating_to_v1.rst:1022\nmsgid \":meth:`.Cog.cog_check`\"\nmsgstr \":meth:`.Cog.cog_check`\"\n\n#: ../../migrating_to_v1.rst:1023\nmsgid \"This registers a check that applies to every command in the cog.\"\nmsgstr \"これはコグのすべてのコマンドに適用されるチェックを登録します。\"\n\n#: ../../migrating_to_v1.rst:1024\nmsgid \":meth:`.Cog.cog_command_error`\"\nmsgstr \":meth:`.Cog.cog_command_error`\"\n\n#: ../../migrating_to_v1.rst:1025\nmsgid \"This is a special error handler that is called whenever an error happens inside the cog.\"\nmsgstr \"これは特別なエラーハンドラで、コグ内でエラーが発生するたびに呼び出されます。\"\n\n#: ../../migrating_to_v1.rst:1027\nmsgid \":meth:`.Cog.cog_before_invoke` and :meth:`.Cog.cog_after_invoke`\"\nmsgstr \":meth:`.Cog.cog_before_invoke` と :meth:`.Cog.cog_after_invoke`\"\n\n#: ../../migrating_to_v1.rst:1027\nmsgid \"A special method that registers a cog before and after invoke hook. More information can be found in :ref:`migrating_1_0_before_after_hook`.\"\nmsgstr \"コグの前後に呼び出されるフックを登録する特別なメソッドです。詳細は :ref:`migrating_1_0_before_after_hook` に記載されています。\"\n\n#: ../../migrating_to_v1.rst:1029\nmsgid \"Those that were using listeners, such as ``on_message`` inside a cog will now have to explicitly mark them as such using the :meth:`.commands.Cog.listener` decorator.\"\nmsgstr \"コグ内で ``on_message`` のようなリスナーを使用していた人は、 :meth:`.commands.Cog.listener` デコレータを用いて、リスナーを明示する必要があります。\"\n\n#: ../../migrating_to_v1.rst:1031\nmsgid \"Along with that, cogs have gained the ability to have custom names through specifying it in the class definition line. More options can be found in the metaclass that facilitates all this, :class:`.commands.CogMeta`.\"\nmsgstr \"それによって、コグはクラス定義の行で指定することによって、独自の名前を持てるようになりました。オプションはこれらを容易にするメタクラス、:class:`.commands.CogMeta` で見つかります。\"\n\n#: ../../migrating_to_v1.rst:1033\nmsgid \"An example cog with every special method registered and a custom name is as follows:\"\nmsgstr \"すべての特別なメソッドを使用し、そして名前を指定したコグの例が以下のようになります:\"\n\n#: ../../migrating_to_v1.rst:1070\nmsgid \"Before and After Invocation Hooks\"\nmsgstr \"前後処理のフック\"\n\n#: ../../migrating_to_v1.rst:1072\nmsgid \"Commands have gained new before and after invocation hooks that allow you to do an action before and after a command is run.\"\nmsgstr \"コマンドに、コマンドの実行前および実行後に処理が行えるようにするフックが新たに追加されました。\"\n\n#: ../../migrating_to_v1.rst:1075\nmsgid \"They take a single parameter, :class:`~ext.commands.Context` and they must be a coroutine.\"\nmsgstr \"これは単一のパラメータとして :class:`~ext.commands.Context` を受け取り、かつコルーチンである必要があります。\"\n\n#: ../../migrating_to_v1.rst:1077\nmsgid \"They are on a global, per-cog, or per-command basis.\"\nmsgstr \"また、このフックは全体、コグごと、あるいはコマンドごとに設定することが可能です。\"\n\n#: ../../migrating_to_v1.rst:1094\nmsgid \"The after invocation is hook always called, **regardless of an error in the command**. This makes it ideal for some error handling or clean up of certain resources such a database connection.\"\nmsgstr \"後処理のフックは **コマンドのエラー発生に関わらず** 必ず呼び出されます。そのため、データベース接続のようなリソースのクリーンアップやエラー処理に最適です。\"\n\n#: ../../migrating_to_v1.rst:1097\nmsgid \"The per-command registration is as follows: ::\"\nmsgstr \"コマンドごとに設定する方法は以下のとおりです。\"\n\n#: ../../migrating_to_v1.rst:1113\nmsgid \"The special cog method for these is :meth:`.Cog.cog_before_invoke` and :meth:`.Cog.cog_after_invoke`, e.g.:\"\nmsgstr \"これらのコグ用の特別なメソッドは :meth:`.Cog.cog_before_invoke` と :meth:`.Cog.cog_after_invoke` です。例:\"\n\n#: ../../migrating_to_v1.rst:1128\nmsgid \"To check if a command failed in the after invocation hook, you can use :attr:`.Context.command_failed`.\"\nmsgstr \":attr:`.Context.command_failed` を使うことで、後処理でコマンドがエラーになったかを確認する事ができます。\"\n\n#: ../../migrating_to_v1.rst:1131\nmsgid \"The invocation order is as follows:\"\nmsgstr \"呼び出される順序は以下のとおりです。\"\n\n#: ../../migrating_to_v1.rst:1133\nmsgid \"Command local before invocation hook\"\nmsgstr \"コマンドごとの前処理。\"\n\n#: ../../migrating_to_v1.rst:1134\nmsgid \"Cog local before invocation hook\"\nmsgstr \"コグごとの前処理。\"\n\n#: ../../migrating_to_v1.rst:1135\nmsgid \"Global before invocation hook\"\nmsgstr \"全体での前処理。\"\n\n#: ../../migrating_to_v1.rst:1136\nmsgid \"The actual command\"\nmsgstr \"実行されたコマンド。\"\n\n#: ../../migrating_to_v1.rst:1137\nmsgid \"Command local after invocation hook\"\nmsgstr \"コマンドごとの後処理。\"\n\n#: ../../migrating_to_v1.rst:1138\nmsgid \"Cog local after invocation hook\"\nmsgstr \"コグごとの後処理。\"\n\n#: ../../migrating_to_v1.rst:1139\nmsgid \"Global after invocation hook\"\nmsgstr \"全体での後処理。\"\n\n#: ../../migrating_to_v1.rst:1142\nmsgid \"Converter Changes\"\nmsgstr \"コンバーターの変更\"\n\n#: ../../migrating_to_v1.rst:1144\nmsgid \"Prior to v1.0, a converter was a type hint that could be a callable that could be invoked with a singular argument denoting the argument passed by the user as a string.\"\nmsgstr \"v1.0以前では、コンバーターはユーザーにより渡された引数を、文字列の単独引数として呼び出す型ヒントでした。\"\n\n#: ../../migrating_to_v1.rst:1147\nmsgid \"This system was eventually expanded to support a :class:`~ext.commands.Converter` system to allow plugging in the :class:`~ext.commands.Context` and do more complicated conversions such as the built-in \\\"discord\\\" converters.\"\nmsgstr \"このシステムは最終的に :class:`~ext.commands.Context` が組み込み可能な :class:`~ext.commands.Converter` システムをサポートするために拡張され、ビルトインの「discord」コンバータのようにより複雑な変換が行なえるようになりました。\"\n\n#: ../../migrating_to_v1.rst:1151\nmsgid \"In v1.0 this converter system was revamped to allow instances of :class:`~ext.commands.Converter` derived classes to be passed. For consistency, the :meth:`~ext.commands.Converter.convert` method was changed to always be a coroutine and will now take the two arguments as parameters.\"\nmsgstr \"v1.0ではこのコンバーターシステムは :class:`~ext.commands.Converter` 派生のクラスを使用できるよう変更されました。一貫性を保つため、 :meth:`~ext.commands.Converter.convert` は常にコルーチンとなるよう変更され、二つのパラメータを受け取ります。\"\n\n#: ../../migrating_to_v1.rst:1155\nmsgid \"Essentially, before: ::\"\nmsgstr \"更新前: ::\"\n\n#: ../../migrating_to_v1.rst:1167\nmsgid \"The command framework also got a couple new converters:\"\nmsgstr \"コマンドフレームワークにも二つのコンバーターが追加されました。\"\n\n#: ../../migrating_to_v1.rst:1169\nmsgid \":class:`~ext.commands.clean_content` this is akin to :attr:`Message.clean_content` which scrubs mentions.\"\nmsgstr \":class:`~ext.commands.clean_content` はメンションなどを取り除く :attr:`Message.clean_content` と同じものです。\"\n\n#: ../../migrating_to_v1.rst:1170\nmsgid \":class:`~ext.commands.UserConverter` will now appropriately convert :class:`User` only.\"\nmsgstr \":class:`~ext.commands.UserConverter` は :class:`User` だけを適切に変換します。\"\n\n#: ../../migrating_to_v1.rst:1171\nmsgid \"``ChannelConverter`` is now split into two different converters.\"\nmsgstr \"``ChannelConverter`` は、2 つの異なるコンバーターに分割されました。\"\n\n#: ../../migrating_to_v1.rst:1173\nmsgid \":class:`~ext.commands.TextChannelConverter` for :class:`TextChannel`.\"\nmsgstr \":class:`TextChannel` 用の :class:`~ext.commands.TextChannelConverter` 。\"\n\n#: ../../migrating_to_v1.rst:1174\nmsgid \":class:`~ext.commands.VoiceChannelConverter` for :class:`VoiceChannel`.\"\nmsgstr \":class:`VoiceChannel` 用の :class:`~ext.commands.VoiceChannelConverter`。\"\n\n"
  },
  {
    "path": "docs/locale/ja/LC_MESSAGES/quickstart.po",
    "content": "msgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: discordpy\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2023-06-21 01:17+0000\\n\"\n\"PO-Revision-Date: 2024-04-17 02:43\\n\"\n\"Last-Translator: \\n\"\n\"Language-Team: Japanese\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Plural-Forms: nplurals=1; plural=0;\\n\"\n\"X-Crowdin-Project: discordpy\\n\"\n\"X-Crowdin-Project-ID: 362783\\n\"\n\"X-Crowdin-Language: ja\\n\"\n\"X-Crowdin-File: quickstart.pot\\n\"\n\"X-Crowdin-File-ID: 50\\n\"\n\"Language: ja_JP\\n\"\n\n#: ../../quickstart.rst:8\nmsgid \"Quickstart\"\nmsgstr \"クイックスタート\"\n\n#: ../../quickstart.rst:10\nmsgid \"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.\"\nmsgstr \"ここでは、ライブラリの概要を説明します。ライブラリがインストールされていることを前提としているので、インストールを終えていない人は :ref:`installing` を参照してください。\"\n\n#: ../../quickstart.rst:14\nmsgid \"A Minimal Bot\"\nmsgstr \"最小限のBot\"\n\n#: ../../quickstart.rst:16\nmsgid \"Let's make a bot that responds to a specific message and walk you through it.\"\nmsgstr \"特定のメッセージに対して返事をするBotを作ってみましょう。一通り説明していきます。\"\n\n#: ../../quickstart.rst:18\nmsgid \"It looks something like this:\"\nmsgstr \"結論から書くと、このように書くことができます。\"\n\n#: ../../quickstart.rst:45\nmsgid \"Let's name this file ``example_bot.py``. Make sure not to name it ``discord.py`` as that'll conflict with the library.\"\nmsgstr \"ファイルの名前を ``example_bot.py`` としましょう。ライブラリと競合してしまうので、 ``discord.py`` というファイル名にはしないでください。\"\n\n#: ../../quickstart.rst:48\nmsgid \"There's a lot going on here, so let's walk you through it step by step.\"\nmsgstr \"さて、では順を追って一つづつ説明していきます。\"\n\n#: ../../quickstart.rst:50\nmsgid \"The first line just imports the library, if this raises a :exc:`ModuleNotFoundError` or :exc:`ImportError` then head on over to :ref:`installing` section to properly install.\"\nmsgstr \"最初の行は、ただライブラリをインポートしただけです。 :exc:`ModuleNotFoundError` や :exc:`ImportError` が発生した場合は :ref:`installing` を見て、ライブラリをきちんとインストールしましょう。\"\n\n#: ../../quickstart.rst:52\nmsgid \"Next, we create an instance of a :class:`Client`. This client is our connection to Discord.\"\nmsgstr \"次に、 :class:`Client` のインスタンスを作成します。クライアントはDiscordへの接続を行います。\"\n\n#: ../../quickstart.rst:53\nmsgid \"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.\"\nmsgstr \"続いて、 :meth:`Client.event` デコレータを使用してイベントを登録します。ライブラリにはたくさんのイベントが用意されています。このライブラリは非同期のため、「コールバック」のスタイルで処理を行います。\"\n\n#: ../../quickstart.rst:56\nmsgid \"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.\"\nmsgstr \"コールバックは基本的に、何かが発生した場合に呼び出される関数です。今回の場合だと、Botがログインして、設定などを終えたときに :func:`on_ready` が、メッセージを受信したときに :func:`on_message` が呼び出されます。\"\n\n#: ../../quickstart.rst:59\nmsgid \"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`.\"\nmsgstr \":func:`on_message` イベントは受信したメッセージすべてに対して呼び出されるため、Bot自身からのメッセージは無視するように設定する必要があります。これは、メッセージの送信者である :attr:`Message.author` と、Bot自身を表す :attr:`Client.user` が等しいか比較することで実装できます。\"\n\n#: ../../quickstart.rst:62\nmsgid \"Afterwards, we check if the :class:`Message.content` starts with ``'$hello'``. If it does, then we send a message in the channel it was used in with ``'Hello!'``. This is a basic way of handling commands, which can be later automated with the :doc:`./ext/commands/index` framework.\"\nmsgstr \"その後、 :class:`Message.content` が ``'$hello'`` から始まるかどうかを確認し、当てはまればそのチャンネルに ``'Hello!'`` という返事を送信します。これはコマンドを処理する基本的な方法であり、後で :doc:`./ext/commands/index` フレームワークを使用して自動化できます。\"\n\n#: ../../quickstart.rst:65\nmsgid \"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.\"\nmsgstr \"最後に、ログイン用トークンを用いてBotを起動します。トークンの取得やBotの作成について分からないことがあれば、 :ref:`discord-intro` を参照してください。\"\n\n#: ../../quickstart.rst:69\nmsgid \"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.\"\nmsgstr \"さて、これでBotは完成なので、Botを *実行* してみましょう。幸いにも、これはただのPythonスクリプトなので実行は簡単です。直接実行が可能です。\"\n\n#: ../../quickstart.rst:72\nmsgid \"On Windows:\"\nmsgstr \"Windowsの場合:\"\n\n#: ../../quickstart.rst:78\nmsgid \"On other systems:\"\nmsgstr \"その他のシステムの場合:\"\n\n#: ../../quickstart.rst:84\nmsgid \"Now you can try playing around with your basic bot.\"\nmsgstr \"これで、あなたが作ったBotと遊ぶことができます。\"\n\n"
  },
  {
    "path": "docs/locale/ja/LC_MESSAGES/sphinx.po",
    "content": "msgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: discordpy\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2023-06-21 01:17+0000\\n\"\n\"PO-Revision-Date: 2024-04-17 02:43\\n\"\n\"Last-Translator: \\n\"\n\"Language-Team: Japanese\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Plural-Forms: nplurals=1; plural=0;\\n\"\n\"X-Crowdin-Project: discordpy\\n\"\n\"X-Crowdin-Project-ID: 362783\\n\"\n\"X-Crowdin-Language: ja\\n\"\n\"X-Crowdin-File: sphinx.pot\\n\"\n\"X-Crowdin-File-ID: 70\\n\"\n\"Language: ja_JP\\n\"\n\n#: ../../_templates/layout.html:30\nmsgid \"Copy Code\"\nmsgstr \"コードをコピー\"\n\n#: ../../_templates/layout.html:31\nmsgid \"Could not copy codeblock:\"\nmsgstr \"コードブロックをコピーできませんでした:\"\n\n#: ../../_templates/layout.html:46\nmsgid \"About these documents\"\nmsgstr \"ドキュメントについて\"\n\n#: ../../_templates/layout.html:49\nmsgid \"Index\"\nmsgstr \"目次\"\n\n#: ../../_templates/layout.html:52\n#: ../../_templates/layout.html:76\nmsgid \"Search\"\nmsgstr \"検索\"\n\n#: ../../_templates/layout.html:55\nmsgid \"Copyright\"\nmsgstr \"コピーライト\"\n\n#: ../../_templates/layout.html:73\nmsgid \"Discord\"\nmsgstr \"Discord\"\n\n#: ../../_templates/layout.html:74\nmsgid \"FAQ\"\nmsgstr \"よくある質問\"\n\n#: ../../_templates/layout.html:77\n#: ../../_templates/layout.html:170\nmsgid \"Close\"\nmsgstr \"閉じる\"\n\n#: ../../_templates/layout.html:82\n#: ../../_templates/layout.html:105\n#: ../../_templates/layout.html:126\nmsgid \"Search documentation\"\nmsgstr \"ドキュメントを検索\"\n\n#: ../../_templates/layout.html:92\nmsgid \"View Documentation For\"\nmsgstr \"表示ドキュメント\"\n\n#: ../../_templates/layout.html:143\nmsgid \"&#169; <a href=\\\"%(path)s\\\">Copyright</a> %(copyright)s.\"\nmsgstr \"&#169; <a href=\\\"%(path)s\\\">Copyright</a> %(copyright)s.\"\n\n#: ../../_templates/layout.html:145\nmsgid \"&#169; Copyright %(copyright)s.\"\nmsgstr \"&#169; Copyright %(copyright)s.\"\n\n#: ../../_templates/layout.html:149\nmsgid \"Last updated on %(last_updated)s.\"\nmsgstr \"最終更新日: %(last_updated)s\"\n\n#: ../../_templates/layout.html:152\nmsgid \"Created using <a href=\\\"https://www.sphinx-doc.org/\\\">Sphinx</a> %(sphinx_version)s.\"\nmsgstr \"<a href=\\\"https://www.sphinx-doc.org/\\\">Sphinx</a> %(sphinx_version)s にて作成。\"\n\n#: ../../_templates/layout.html:173\nmsgid \"Settings\"\nmsgstr \"設定\"\n\n#: ../../_templates/layout.html:175\nmsgid \"Font\"\nmsgstr \"フォント\"\n\n#: ../../_templates/layout.html:177\nmsgid \"Use a serif font:\"\nmsgstr \"セリフフォントを使用:\"\n\n#: ../../_templates/layout.html:179\nmsgid \"Use a serif font? Your system font will be used, falling back to serif.\"\nmsgstr \"セリフフォントを使用しますか？ フォールバックフォントとしてシステムのフォントが使用されます。\"\n\n#: ../../_templates/layout.html:186\nmsgid \"Theme\"\nmsgstr \"テーマ\"\n\n#: ../../_templates/layout.html:189\nmsgid \"Set your theme based on your system preferences\"\nmsgstr \"システム設定に基づいてテーマを設定します。\"\n\n#: ../../_templates/layout.html:192\nmsgid \"Automatic\"\nmsgstr \"自動\"\n\n#: ../../_templates/layout.html:195\nmsgid \"Set your theme to light theme\"\nmsgstr \"テーマをライトテーマに設定します。\"\n\n#: ../../_templates/layout.html:198\nmsgid \"Light\"\nmsgstr \"ライト\"\n\n#: ../../_templates/layout.html:201\nmsgid \"Set your theme to dark theme\"\nmsgstr \"テーマをダークテーマに設定します。\"\n\n#: ../../_templates/layout.html:204\nmsgid \"Dark\"\nmsgstr \"ダーク\"\n\n#: ../../_templates/layout.html:212\nmsgid \"to top\"\nmsgstr \"先頭へ\"\n\n"
  },
  {
    "path": "docs/locale/ja/LC_MESSAGES/version_guarantees.po",
    "content": "msgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: discordpy\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2023-06-21 01:17+0000\\n\"\n\"PO-Revision-Date: 2024-04-17 02:43\\n\"\n\"Last-Translator: \\n\"\n\"Language-Team: Japanese\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Plural-Forms: nplurals=1; plural=0;\\n\"\n\"X-Crowdin-Project: discordpy\\n\"\n\"X-Crowdin-Project-ID: 362783\\n\"\n\"X-Crowdin-Language: ja\\n\"\n\"X-Crowdin-File: version_guarantees.pot\\n\"\n\"X-Crowdin-File-ID: 46\\n\"\n\"Language: ja_JP\\n\"\n\n#: ../../version_guarantees.rst:4\nmsgid \"Version Guarantees\"\nmsgstr \"バージョン保証\"\n\n#: ../../version_guarantees.rst:6\nmsgid \"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.\"\nmsgstr \"このライブラリは `セマンティック バージョニングの原則 <https://semver.org/>`_ に従います。それが意味するのは、互換性のないAPIの変更が行われるたびにメジャーバージョンが更新されるということです。しかしながら、Discord側にはPythonの非常に動的な性質とともに破壊的変更を行う際の保証がないため、破壊的変更とみなされるもの、そうでないものを区別するのは困難です。\"\n\n#: ../../version_guarantees.rst:8\nmsgid \"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.\"\nmsgstr \"最初に覚えておくべきことは、破壊的変更は **公開ドキュメント化してある関数とクラス** のみに適用されるということです。ドキュメントにないものはパブリックAPIの一部ではないため、変更される可能性があります。これにはドキュメントに載っていないアンダースコアから始まる関数や、通常の関数が含まれます。\"\n\n#: ../../version_guarantees.rst:12\nmsgid \"The examples below are non-exhaustive.\"\nmsgstr \"以下の例は網羅的なものではありません。\"\n\n#: ../../version_guarantees.rst:15\nmsgid \"Examples of Breaking Changes\"\nmsgstr \"破壊的変更の例\"\n\n#: ../../version_guarantees.rst:17\nmsgid \"Changing the default parameter value to something else.\"\nmsgstr \"デフォルトのパラメータ値を別のものに変更。\"\n\n#: ../../version_guarantees.rst:18\nmsgid \"Renaming a function without an alias to an old function.\"\nmsgstr \"古い関数へのエイリアスのない関数の名称を変更。\"\n\n#: ../../version_guarantees.rst:19\nmsgid \"Adding or removing parameters to an event.\"\nmsgstr \"イベントへのパラメータの追加、あるいは削除。\"\n\n#: ../../version_guarantees.rst:22\nmsgid \"Examples of Non-Breaking Changes\"\nmsgstr \"破壊的変更ではないものの例\"\n\n#: ../../version_guarantees.rst:24\nmsgid \"Adding or removing private underscored attributes.\"\nmsgstr \"アンダースコア付きのプライベート関数の追加、あるいは削除。\"\n\n#: ../../version_guarantees.rst:25\nmsgid \"Adding an element into the ``__slots__`` of a data class.\"\nmsgstr \"データクラスの ``__slots__`` への要素の追加。\"\n\n#: ../../version_guarantees.rst:26\nmsgid \"Changing the behaviour of a function to fix a bug.\"\nmsgstr \"バグ修正のための関数の動作の変更。\"\n\n#: ../../version_guarantees.rst:27\nmsgid \"Changes in the typing behaviour of the library\"\nmsgstr \"ライブラリの型の動作の変更\"\n\n#: ../../version_guarantees.rst:28\nmsgid \"Changes in the calling convention of functions that are primarily meant as callbacks\"\nmsgstr \"主にコールバックとして使用される関数の呼び出し方法の変更\"\n\n#: ../../version_guarantees.rst:29\nmsgid \"Changes in the documentation.\"\nmsgstr \"ドキュメントの変更。\"\n\n#: ../../version_guarantees.rst:30\nmsgid \"Modifying the internal HTTP handling.\"\nmsgstr \"内部HTTP処理の変更。\"\n\n#: ../../version_guarantees.rst:31\nmsgid \"Upgrading the dependencies to a new version, major or otherwise.\"\nmsgstr \"依存関係をメジャー、またはそれ以外の新しいバージョンへアップグレード。\"\n\n"
  },
  {
    "path": "docs/locale/ja/LC_MESSAGES/whats_new.po",
    "content": "msgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: discordpy\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2024-03-26 03:41+0000\\n\"\n\"PO-Revision-Date: 2024-04-17 02:43\\n\"\n\"Last-Translator: \\n\"\n\"Language-Team: Japanese\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Plural-Forms: nplurals=1; plural=0;\\n\"\n\"X-Crowdin-Project: discordpy\\n\"\n\"X-Crowdin-Project-ID: 362783\\n\"\n\"X-Crowdin-Language: ja\\n\"\n\"X-Crowdin-File: whats_new.pot\\n\"\n\"X-Crowdin-File-ID: 74\\n\"\n\"Language: ja_JP\\n\"\n\n#: ../../whats_new.rst:9\nmsgid \"Changelog\"\nmsgstr \"変更履歴\"\n\n#: ../../whats_new.rst:11\nmsgid \"This page keeps a detailed human friendly rendering of what's new and changed in specific versions.\"\nmsgstr \"このページでは、特定のバージョンの新機能や変更された機能をわかりやすい形で詳細に記載しています。\"\n\n#: ../../whats_new.rst:17\nmsgid \"v2.3.2\"\nmsgstr \"\"\n\n#: ../../whats_new.rst:20\n#: ../../whats_new.rst:37\n#: ../../whats_new.rst:91\n#: ../../whats_new.rst:125\n#: ../../whats_new.rst:139\nmsgid \"Bug Fixes\"\nmsgstr \"バグ修正\"\n\n#: ../../whats_new.rst:22\nmsgid \"Fix the ``name`` parameter not being respected when sending a :class:`CustomActivity`.\"\nmsgstr \"\"\n\n#: ../../whats_new.rst:23\nmsgid \"Fix :attr:`Intents.emoji` and :attr:`Intents.emojis_and_stickers` having swapped alias values (:issue:`9471`).\"\nmsgstr \"\"\n\n#: ../../whats_new.rst:24\nmsgid \"Fix ``NameError`` when using :meth:`abc.GuildChannel.create_invite` (:issue:`9505`).\"\nmsgstr \"\"\n\n#: ../../whats_new.rst:25\nmsgid \"Fix crash when disconnecting during the middle of a ``HELLO`` packet when using :class:`AutoShardedClient`.\"\nmsgstr \"\"\n\n#: ../../whats_new.rst:26\nmsgid \"Fix overly eager escape behaviour for lists and header markdown in :func:`utils.escape_markdown` (:issue:`9516`).\"\nmsgstr \"\"\n\n#: ../../whats_new.rst:27\nmsgid \"Fix voice websocket not being closed before being replaced by a new one (:issue:`9518`).\"\nmsgstr \"\"\n\n#: ../../whats_new.rst:28\nmsgid \"|commands| Fix the wrong :meth:`~ext.commands.HelpCommand.on_help_command_error` being called when ejected from a cog.\"\nmsgstr \"\"\n\n#: ../../whats_new.rst:29\nmsgid \"|commands| Fix ``=None`` being displayed in :attr:`~ext.commands.Command.signature`.\"\nmsgstr \"\"\n\n#: ../../whats_new.rst:34\nmsgid \"v2.3.1\"\nmsgstr \"\"\n\n#: ../../whats_new.rst:39\nmsgid \"Fix username lookup in :meth:`Guild.get_member_named` (:issue:`9451`).\"\nmsgstr \"\"\n\n#: ../../whats_new.rst:41\nmsgid \"Use cache data first for :attr:`Interaction.channel` instead of API data.\"\nmsgstr \"\"\n\n#: ../../whats_new.rst:41\nmsgid \"This bug usually manifested in incomplete channel objects (e.g. no ``overwrites``) because Discord does not provide this data.\"\nmsgstr \"\"\n\n#: ../../whats_new.rst:43\nmsgid \"Fix false positives in :meth:`PartialEmoji.from_str` inappropriately setting ``animated`` to ``True`` (:issue:`9456`, :issue:`9457`).\"\nmsgstr \"\"\n\n#: ../../whats_new.rst:44\nmsgid \"Fix certain select types not appearing in :attr:`Message.components` (:issue:`9462`).\"\nmsgstr \"\"\n\n#: ../../whats_new.rst:45\nmsgid \"|commands| Change lookup order for :class:`~ext.commands.MemberConverter` and :class:`~ext.commands.UserConverter` to prioritise usernames instead of nicknames.\"\nmsgstr \"\"\n\n#: ../../whats_new.rst:50\nmsgid \"v2.3.0\"\nmsgstr \"v2.3.0\"\n\n#: ../../whats_new.rst:53\n#: ../../whats_new.rst:149\n#: ../../whats_new.rst:239\n#: ../../whats_new.rst:360\n#: ../../whats_new.rst:439\nmsgid \"New Features\"\nmsgstr \"新機能\"\n\n#: ../../whats_new.rst:61\nmsgid \"Add support for the new username system (also known as \\\"pomelo\\\").\"\nmsgstr \"新しいユーザー名システム (\\\"pomelo\\\"とも呼ばれます) のサポートを追加しました。\"\n\n#: ../../whats_new.rst:56\nmsgid \"Add :attr:`User.global_name` to get their global nickname or \\\"display name\\\".\"\nmsgstr \"グローバルのニックネーム、つまり「表示名」を取得する :attr:`User.global_name` を追加しました。\"\n\n#: ../../whats_new.rst:57\nmsgid \"Update :attr:`User.display_name` and :attr:`Member.display_name` to understand global nicknames.\"\nmsgstr \":attr:`User.display_name` と :attr:`Member.display_name` を、グローバルのニックネームを使用するように変更しました。\"\n\n#: ../../whats_new.rst:58\nmsgid \"Update ``__str__`` for :class:`User` to drop discriminators if the user has been migrated.\"\nmsgstr \":class:`User` の ``__str__`` が、移行したユーザーのタグを含まないよう、変更しました。\"\n\n#: ../../whats_new.rst:59\nmsgid \"Update :meth:`Guild.get_member_named` to work with migrated users.\"\nmsgstr \"移行したユーザーでも動くよう :meth:`Guild.get_member_named` を変更しました。\"\n\n#: ../../whats_new.rst:60\nmsgid \"Update :attr:`User.default_avatar` to work with migrated users.\"\nmsgstr \"移行したユーザーでも動くよう :attr:`User.default_avatar` を変更しました。\"\n\n#: ../../whats_new.rst:61\nmsgid \"|commands| Update user and member converters to understand migrated users.\"\nmsgstr \"|commands| 移行したユーザーを解釈するよう、ユーザーとメンバーコンバータを変更しました。\"\n\n#: ../../whats_new.rst:63\nmsgid \"Add :attr:`DefaultAvatar.pink` for new pink default avatars.\"\nmsgstr \"新しいピンクのデフォルトアバタ―用の :attr:`DefaultAvatar.pink` を追加しました。\"\n\n#: ../../whats_new.rst:64\nmsgid \"Add :meth:`Colour.pink` to get the pink default avatar colour.\"\nmsgstr \"ピンクのデフォルトアバターの色を取得する :meth:`Colour.pink` を追加しました。\"\n\n#: ../../whats_new.rst:69\nmsgid \"Add support for voice messages (:issue:`9358`)\"\nmsgstr \"ボイスメッセージのサポートを追加しました。 (:issue:`9358`)\"\n\n#: ../../whats_new.rst:66\nmsgid \"Add :attr:`MessageFlags.voice`\"\nmsgstr \":attr:`MessageFlags.voice` を追加しました。\"\n\n#: ../../whats_new.rst:67\nmsgid \"Add :attr:`Attachment.duration` and :attr:`Attachment.waveform`\"\nmsgstr \":attr:`Attachment.duration` と :attr:`Attachment.waveform` を追加しました。\"\n\n#: ../../whats_new.rst:68\nmsgid \"Add :meth:`Attachment.is_voice_message`\"\nmsgstr \":meth:`Attachment.is_voice_message` を追加しました。\"\n\n#: ../../whats_new.rst:69\nmsgid \"This does not support *sending* voice messages because this is currently unsupported by the API.\"\nmsgstr \"ボイスメッセージの *送信* は現在APIで対応していないため、サポートされていません。\"\n\n#: ../../whats_new.rst:71\nmsgid \"Add support for new :attr:`Interaction.channel` attribute from the API update (:issue:`9339`).\"\nmsgstr \"API更新で追加された :attr:`Interaction.channel` 属性のサポートを追加しました。 (:issue:`9339`)\"\n\n#: ../../whats_new.rst:72\nmsgid \"Add support for :attr:`TextChannel.default_thread_slowmode_delay` (:issue:`9291`).\"\nmsgstr \":attr:`TextChannel.default_thread_slowmode_delay` のサポートを追加しました。 (:issue:`9291`)\"\n\n#: ../../whats_new.rst:73\nmsgid \"Add support for :attr:`ForumChannel.default_sort_order` (:issue:`9290`).\"\nmsgstr \":attr:`ForumChannel.default_sort_order` のサポートを追加しました。 (:issue:`9290`)\"\n\n#: ../../whats_new.rst:74\nmsgid \"Add support for ``default_reaction_emoji`` and ``default_forum_layout`` in :meth:`Guild.create_forum` (:issue:`9300`).\"\nmsgstr \":meth:`Guild.create_forum` にて、 ``default_reaction_emoji`` と ``default_forum_layout`` のサポートを追加しました。 (:issue:`9300`)\"\n\n#: ../../whats_new.rst:75\nmsgid \"Add support for ``widget_channel``, ``widget_enabled``, and ``mfa_level`` in :meth:`Guild.edit` (:issue:`9302`, :issue:`9303`).\"\nmsgstr \":meth:`Guild.edit` にて、 ``widget_channel`` 、 ``widget_enabled`` 、 ``mfa_level`` のサポートを追加しました。(:issue:`9302` 、 :issue:`9303`)\"\n\n#: ../../whats_new.rst:78\nmsgid \"Add various new :class:`Permissions` and changes (:issue:`9312`, :issue:`9325`, :issue:`9358`, :issue:`9378`)\"\nmsgstr \"新しい :class:`Permissions` を追加しました。 (:issue:`9312` 、 :issue:`9325` 、 :issue:`9358` 、 :issue:`9378`)\"\n\n#: ../../whats_new.rst:77\nmsgid \"Add new :attr:`~Permissions.manage_expressions`, :attr:`~Permissions.use_external_sounds`, :attr:`~Permissions.use_soundboard`, :attr:`~Permissions.send_voice_messages`, :attr:`~Permissions.create_expressions` permissions.\"\nmsgstr \"新しい :attr:`~Permissions.manage_expressions` 、 :attr:`~Permissions.use_external_sounds` 、 :attr:`~Permissions.use_soundboard` 、 :attr:`~Permissions.send_voice_messages` 、 :attr:`~Permissions.create_expressions` 権限を追加しました。\"\n\n#: ../../whats_new.rst:78\nmsgid \"Change :attr:`Permissions.manage_emojis` to be an alias of :attr:`~Permissions.manage_expressions`.\"\nmsgstr \":attr:`Permissions.manage_emojis` を :attr:`~Permissions.manage_expressions` のエイリアスに変更しました。\"\n\n#: ../../whats_new.rst:80\nmsgid \"Add various new properties to :class:`PartialAppInfo` and :class:`AppInfo` (:issue:`9298`).\"\nmsgstr \":class:`PartialAppInfo` と :class:`AppInfo` にさまざまな新しいプロパティを追加しました。 (:issue:`9298`)\"\n\n#: ../../whats_new.rst:81\nmsgid \"Add support for ``with_counts`` parameter to :meth:`Client.fetch_guilds` (:issue:`9369`).\"\nmsgstr \":meth:`Client.fetch_guilds` に ``with_counts`` 引数のサポートを追加しました。 (:issue:`9369`)\"\n\n#: ../../whats_new.rst:82\nmsgid \"Add new :meth:`Guild.get_emoji` helper (:issue:`9296`).\"\nmsgstr \"新しく :meth:`Guild.get_emoji` ヘルパーを追加しました。 (:issue:`9296`)\"\n\n#: ../../whats_new.rst:83\nmsgid \"Add :attr:`ApplicationFlags.auto_mod_badge` (:issue:`9313`).\"\nmsgstr \":attr:`ApplicationFlags.auto_mod_badge` を追加しました。 (:issue:`9313`)\"\n\n#: ../../whats_new.rst:84\nmsgid \"Add :attr:`Guild.max_stage_video_users` and :attr:`Guild.safety_alerts_channel` (:issue:`9318`).\"\nmsgstr \":attr:`Guild.max_stage_video_users` と :attr:`Guild.safety_alerts_channel` を追加しました。 (:issue:`9318`)\"\n\n#: ../../whats_new.rst:85\nmsgid \"Add support for ``raid_alerts_disabled`` and ``safety_alerts_channel`` in :meth:`Guild.edit` (:issue:`9318`).\"\nmsgstr \":meth:`Guild.edit` にて ``raid_alerts_disabled`` と ``safety_alerts_channel`` のサポートを追加しました。 (:issue:`9318`)\"\n\n#: ../../whats_new.rst:86\nmsgid \"|commands| Add :attr:`BadLiteralArgument.argument <ext.commands.BadLiteralArgument.argument>` to get the failed argument's value (:issue:`9283`).\"\nmsgstr \"|commands| 失敗した引数の値を取得するための :attr:`BadLiteralArgument.argument <ext.commands.BadLiteralArgument.argument>` を追加しました。 (:issue:`9283`)\"\n\n#: ../../whats_new.rst:87\nmsgid \"|commands| Add :attr:`Context.filesize_limit <ext.commands.Context.filesize_limit>` property (:issue:`9416`).\"\nmsgstr \"|commands| :attr:`Context.filesize_limit <ext.commands.Context.filesize_limit>` 属性を追加しました。 (:issue:`9416`)\"\n\n#: ../../whats_new.rst:88\nmsgid \"|commands| Add support for :attr:`Parameter.displayed_name <ext.commands.Parameter.displayed_name>` (:issue:`9427`).\"\nmsgstr \"|commands| :attr:`Parameter.displayed_name <ext.commands.Parameter.displayed_name>` のサポートを追加しました。 (:issue:`9427`)\"\n\n#: ../../whats_new.rst:94\nmsgid \"Fix ``FileHandler`` handlers being written ANSI characters when the bot is executed inside PyCharm.\"\nmsgstr \"PyCharm 内でボットが実行された場合、 ``FileHandler`` ハンドラにANSI 文字が出力されるのを修正しました。\"\n\n#: ../../whats_new.rst:94\nmsgid \"This has the side effect of removing coloured logs from the PyCharm terminal due an upstream bug involving TTY detection. This issue is tracked under `PY-43798 <https://youtrack.jetbrains.com/issue/PY-43798>`_.\"\nmsgstr \"PyCharmのTTY検出のバグの影響により、PyCharm ターミナル内でログに色が付かなくなる副作用があります。このバグは `PY-43798 <https://youtrack.jetbrains.com/issue/PY-43798>`_ で追跡されています。\"\n\n#: ../../whats_new.rst:96\nmsgid \"Fix channel edits with :meth:`Webhook.edit` sending two requests instead of one.\"\nmsgstr \":meth:`Webhook.edit` でチャンネルを編集するときに2回リクエストが行われるバグを修正しました。\"\n\n#: ../../whats_new.rst:97\nmsgid \"Fix :attr:`StageChannel.last_message_id` always being ``None`` (:issue:`9422`).\"\nmsgstr \":attr:`StageChannel.last_message_id` が常に ``None`` となるのを修正しました。 (:issue:`9422`)\"\n\n#: ../../whats_new.rst:98\nmsgid \"Fix piped audio input ending prematurely (:issue:`9001`, :issue:`9380`).\"\nmsgstr \"パイプによるオーディオ入力が終了するのが早すぎる問題を修正しました。 (:issue:`9001` 、 :issue:`9380`)\"\n\n#: ../../whats_new.rst:99\nmsgid \"Fix persistent detection for :class:`ui.TextInput` being incorrect if the ``custom_id`` is set later (:issue:`9438`).\"\nmsgstr \"``custom_id`` が後で設定された場合、 :class:`ui.TextInput` の永続的な検出が正しくない問題を修正しました。 (:issue:`9438`)\"\n\n#: ../../whats_new.rst:100\nmsgid \"Fix custom attributes not being copied over when inheriting from :class:`app_commands.Group` (:issue:`9383`).\"\nmsgstr \":class:`app_commands.Group` から継承するときにカスタム属性がコピーされない問題を修正しました。 (:issue:`9383`)\"\n\n#: ../../whats_new.rst:101\nmsgid \"Fix AutoMod audit log entry error due to empty channel_id (:issue:`9384`).\"\nmsgstr \"空の channel_id により自動管理の監査ログ項目でエラーが発生するのを修正しました。 (:issue:`9384`)\"\n\n#: ../../whats_new.rst:102\nmsgid \"Fix handling of ``around`` parameter in :meth:`abc.Messageable.history` (:issue:`9388`).\"\nmsgstr \":meth:`abc.Messageable.history` の ``around`` 引数の扱いを修正しました。 (:issue:`9388`)\"\n\n#: ../../whats_new.rst:103\nmsgid \"Fix occasional :exc:`AttributeError` when accessing the :attr:`ClientUser.mutual_guilds` property (:issue:`9387`).\"\nmsgstr \":attr:`ClientUser.mutual_guilds` プロパティにアクセスするとき時々 :exc:`AttributeError` が発生する問題を修正しました。 (:issue:`9387`)\"\n\n#: ../../whats_new.rst:104\nmsgid \"Fix :func:`utils.escape_markdown` not escaping the new markdown (:issue:`9361`).\"\nmsgstr \":func:`utils.escape_markdown` が新しいマークダウンを正しくエスケープしない問題を修正しました。 (:issue:`9361`)\"\n\n#: ../../whats_new.rst:105\nmsgid \"Fix webhook targets not being converted in audit logs (:issue:`9332`).\"\nmsgstr \"監査ログでWebhookターゲットが変換されない問題を修正しました。 (:issue:`9332`)\"\n\n#: ../../whats_new.rst:106\nmsgid \"Fix error when not passing ``enabled`` in :meth:`Guild.create_automod_rule` (:issue:`9292`).\"\nmsgstr \":meth:`Guild.create_automod_rule` で ``enabled`` を渡さないときに生じるエラーを修正しました。 (:issue:`9292`)\"\n\n#: ../../whats_new.rst:107\nmsgid \"Fix how various parameters are handled in :meth:`Guild.create_scheduled_event` (:issue:`9275`).\"\nmsgstr \":meth:`Guild.create_scheduled_event` のパラメータの扱いを修正しました。 (:issue:`9275`)\"\n\n#: ../../whats_new.rst:108\nmsgid \"Fix not sending the ``ssrc`` parameter when sending the SPEAKING payload (:issue:`9301`).\"\nmsgstr \"SPEAKING ペイロードの送信時に ``ssrc`` パラメータを送信しない問題を修正しました。 (:issue:`9301`)\"\n\n#: ../../whats_new.rst:109\nmsgid \"Fix :attr:`Message.guild` being ``None`` sometimes when received via an interaction.\"\nmsgstr \"インタラクションで受け取った :attr:`Message.guild` が時々 ``None`` になる問題を修正しました。\"\n\n#: ../../whats_new.rst:110\nmsgid \"Fix :attr:`Message.system_content` for :attr:`MessageType.channel_icon_change` (:issue:`9410`).\"\nmsgstr \":attr:`MessageType.channel_icon_change` の :attr:`Message.system_content` を修正しました。 (:issue:`9410`)\"\n\n#: ../../whats_new.rst:113\n#: ../../whats_new.rst:213\n#: ../../whats_new.rst:283\n#: ../../whats_new.rst:425\n#: ../../whats_new.rst:492\nmsgid \"Miscellaneous\"\nmsgstr \"その他\"\n\n#: ../../whats_new.rst:115\nmsgid \"Update the base :attr:`Guild.filesize_limit` to 25MiB (:issue:`9353`).\"\nmsgstr \"基本の :attr:`Guild.filesize_limit` を 25MiB に更新しました。 (:issue:`9353`)\"\n\n#: ../../whats_new.rst:116\nmsgid \"Allow Interaction webhook URLs to be used in :meth:`Webhook.from_url`.\"\nmsgstr \":meth:`Webhook.from_url` でインタラクション Webhook URLを使用できるようになりました。\"\n\n#: ../../whats_new.rst:117\nmsgid \"Set the socket family of internal connector to ``AF_INET`` to prevent IPv6 connections (:issue:`9442`, :issue:`9443`).\"\nmsgstr \"IPv6 接続を防ぐために、内部コネクタのソケットファミリを ``AF_INET`` に設定するようにしました。 (:issue:`9442` 、 :issue:`9443`)\"\n\n#: ../../whats_new.rst:122\nmsgid \"v2.2.3\"\nmsgstr \"v2.2.3\"\n\n#: ../../whats_new.rst:127\nmsgid \"Fix crash from Discord sending null ``channel_id`` for automod audit logs.\"\nmsgstr \"Discordが自動管理の監査ログに関し null の ``channel_id`` を送ることによって生じたクラッシュを修正しました。\"\n\n#: ../../whats_new.rst:128\nmsgid \"Fix ``channel`` edits when using :meth:`Webhook.edit` sending two requests.\"\nmsgstr \":meth:`Webhook.edit` を使用して ``channel`` を変更するときに2回リクエストが送信されるバグを修正しました。\"\n\n#: ../../whats_new.rst:129\nmsgid \"Fix :attr:`AuditLogEntry.target` being ``None`` for invites (:issue:`9336`).\"\nmsgstr \"招待に関し :attr:`AuditLogEntry.target` が ``None`` となるのを修正しました。 (:issue:`9336`)\"\n\n#: ../../whats_new.rst:130\nmsgid \"Fix :exc:`KeyError` when accessing data for :class:`GuildSticker` (:issue:`9324`).\"\nmsgstr \":class:`GuildSticker` のデータにアクセスするときの :exc:`KeyError` を修正しました。 (:issue:`9324`)\"\n\n#: ../../whats_new.rst:136\nmsgid \"v2.2.2\"\nmsgstr \"v2.2.2\"\n\n#: ../../whats_new.rst:141\nmsgid \"Fix UDP discovery in voice not using new 74 byte layout which caused voice to break (:issue:`9277`, :issue:`9278`)\"\nmsgstr \"ボイスのUDP検出が、新しい74バイトレイアウトを使用していないため、ボイスが使用できない問題を修正しました。 (:issue:`9277` 、 :issue:`9278`)\"\n\n#: ../../whats_new.rst:146\nmsgid \"v2.2.0\"\nmsgstr \"v2.2.0\"\n\n#: ../../whats_new.rst:151\nmsgid \"Add support for new :func:`on_audit_log_entry_create` event\"\nmsgstr \"新しい :func:`on_audit_log_entry_create` イベントのサポートを追加しました。\"\n\n#: ../../whats_new.rst:153\nmsgid \"Add support for silent messages via ``silent`` parameter in :meth:`abc.Messageable.send`\"\nmsgstr \"サイレントメッセージを送信する :meth:`abc.Messageable.send` の ``silent`` パラメータのサポートを追加しました。\"\n\n#: ../../whats_new.rst:153\nmsgid \"This is queryable via :attr:`MessageFlags.suppress_notifications`\"\nmsgstr \"これは :attr:`MessageFlags.suppress_notifications` から確認できます。\"\n\n#: ../../whats_new.rst:155\nmsgid \"Implement :class:`abc.Messageable` for :class:`StageChannel` (:issue:`9248`)\"\nmsgstr \":class:`StageChannel` が :class:`abc.Messageable` を実装するようにしました。 (:issue:`9248`)\"\n\n#: ../../whats_new.rst:156\nmsgid \"Add setter for :attr:`discord.ui.ChannelSelect.channel_types` (:issue:`9068`)\"\nmsgstr \":attr:`discord.ui.ChannelSelect.channel_types` のセッターを追加しました。 (:issue:`9068`)\"\n\n#: ../../whats_new.rst:157\nmsgid \"Add support for custom messages in automod via :attr:`AutoModRuleAction.custom_message` (:issue:`9267`)\"\nmsgstr \":attr:`AutoModRuleAction.custom_message` で、自動管理のカスタムメッセージのサポートを追加しました。 (:issue:`9267`)\"\n\n#: ../../whats_new.rst:158\nmsgid \"Add :meth:`ForumChannel.get_thread` (:issue:`9106`)\"\nmsgstr \":meth:`ForumChannel.get_thread` を追加しました。 (:issue:`9106`)\"\n\n#: ../../whats_new.rst:159\nmsgid \"Add :attr:`StageChannel.slowmode_delay` and :attr:`VoiceChannel.slowmode_delay` (:issue:`9111`)\"\nmsgstr \":attr:`StageChannel.slowmode_delay` と :attr:`VoiceChannel.slowmode_delay` を追加しました。 (:issue:`9111`)\"\n\n#: ../../whats_new.rst:160\nmsgid \"Add support for editing the slowmode for :class:`StageChannel` and :class:`VoiceChannel` (:issue:`9111`)\"\nmsgstr \":class:`StageChannel` と :class:`VoiceChannel` の低速モードの変更のサポートを追加しました。 (:issue:`9111`)\"\n\n#: ../../whats_new.rst:161\nmsgid \"Add :attr:`Locale.indonesian`\"\nmsgstr \":attr:`Locale.indonesian` を追加しました。\"\n\n#: ../../whats_new.rst:162\nmsgid \"Add ``delete_after`` keyword argument to :meth:`Interaction.edit_message` (:issue:`9415`)\"\nmsgstr \":meth:`Interaction.edit_message` に ``delete_after`` キーワード引数を追加しました。 (:issue:`9415`)\"\n\n#: ../../whats_new.rst:163\nmsgid \"Add ``delete_after`` keyword argument to :meth:`InteractionMessage.edit` (:issue:`9206`)\"\nmsgstr \":meth:`InteractionMessage.edit` に ``delete_after`` キーワード引数を追加しました。 (:issue:`9206`)\"\n\n#: ../../whats_new.rst:166\nmsgid \"Add support for member flags (:issue:`9204`)\"\nmsgstr \"メンバーフラグのサポートを追加しました。 (:issue:`9204`)\"\n\n#: ../../whats_new.rst:165\nmsgid \"Accessible via :attr:`Member.flags` and has a type of :class:`MemberFlags`\"\nmsgstr \":attr:`Member.flags` でアクセスでき、型は :class:`MemberFlags` です。\"\n\n#: ../../whats_new.rst:166\nmsgid \"Support ``bypass_verification`` within :meth:`Member.edit`\"\nmsgstr \":meth:`Member.edit` にて ``bypass_verification`` のサポートを追加しました。\"\n\n#: ../../whats_new.rst:169\nmsgid \"Add support for passing a client to :meth:`Webhook.from_url` and :meth:`Webhook.partial`\"\nmsgstr \":meth:`Webhook.from_url` と :meth:`Webhook.partial` にクライアントを渡せるようにしました。\"\n\n#: ../../whats_new.rst:169\nmsgid \"This allows them to use views (assuming they are \\\"bot owned\\\" webhooks)\"\nmsgstr \"これにより、ビューを使用することができます (「ボット所有」Webhookである場合は)。\"\n\n#: ../../whats_new.rst:171\nmsgid \"Add :meth:`Colour.dark_embed` and :meth:`Colour.light_embed` (:issue:`9219`)\"\nmsgstr \":meth:`Colour.dark_embed` と :meth:`Colour.light_embed` を追加しました。 (:issue:`9219`)\"\n\n#: ../../whats_new.rst:172\nmsgid \"Add support for many more parameters within :meth:`Guild.create_stage_channel` (:issue:`9245`)\"\nmsgstr \":meth:`Guild.create_stage_channel` で対応するパラメータを追加しました。 (:issue:`9245`)\"\n\n#: ../../whats_new.rst:173\nmsgid \"Add :attr:`AppInfo.role_connections_verification_url`\"\nmsgstr \":attr:`AppInfo.role_connections_verification_url` を追加しました。\"\n\n#: ../../whats_new.rst:174\nmsgid \"Add support for :attr:`ForumChannel.default_layout`\"\nmsgstr \":attr:`ForumChannel.default_layout` のサポートを追加しました。\"\n\n#: ../../whats_new.rst:175\nmsgid \"Add various new :class:`MessageType` values such as ones related to stage channel and role subscriptions\"\nmsgstr \"ステージチャンネルやロールサブスクリプションに関連するものなど、新しい :class:`MessageType` 値を追加しました。\"\n\n#: ../../whats_new.rst:182\nmsgid \"Add support for role subscription related attributes\"\nmsgstr \"ロールサブスクリプション関連属性のサポートを追加しました。\"\n\n#: ../../whats_new.rst:177\nmsgid \":class:`RoleSubscriptionInfo` within :attr:`Message.role_subscription`\"\nmsgstr \":attr:`Message.role_subscription` と :class:`RoleSubscriptionInfo` 。\"\n\n#: ../../whats_new.rst:178\nmsgid \":attr:`MessageType.role_subscription_purchase`\"\nmsgstr \":attr:`MessageType.role_subscription_purchase`\"\n\n#: ../../whats_new.rst:179\nmsgid \":attr:`SystemChannelFlags.role_subscription_purchase_notifications`\"\nmsgstr \":attr:`SystemChannelFlags.role_subscription_purchase_notifications`\"\n\n#: ../../whats_new.rst:180\nmsgid \":attr:`SystemChannelFlags.role_subscription_purchase_notification_replies`\"\nmsgstr \":attr:`SystemChannelFlags.role_subscription_purchase_notification_replies`\"\n\n#: ../../whats_new.rst:181\nmsgid \":attr:`RoleTags.subscription_listing_id`\"\nmsgstr \":attr:`RoleTags.subscription_listing_id`\"\n\n#: ../../whats_new.rst:182\nmsgid \":meth:`RoleTags.is_available_for_purchase`\"\nmsgstr \":meth:`RoleTags.is_available_for_purchase`\"\n\n#: ../../whats_new.rst:184\nmsgid \"Add support for checking if a role is a linked role under :meth:`RoleTags.is_guild_connection`\"\nmsgstr \":meth:`RoleTags.is_guild_connection` で、ロールが紐づいたロールかの確認のサポートを追加しました。\"\n\n#: ../../whats_new.rst:185\nmsgid \"Add support for GIF sticker type\"\nmsgstr \"GIFスタンプタイプのサポートを追加しました。\"\n\n#: ../../whats_new.rst:186\nmsgid \"Add support for :attr:`Message.application_id` and :attr:`Message.position`\"\nmsgstr \":attr:`Message.application_id` と :attr:`Message.position` のサポートを追加しました。\"\n\n#: ../../whats_new.rst:187\nmsgid \"Add :func:`utils.maybe_coroutine` helper\"\nmsgstr \":func:`utils.maybe_coroutine` ヘルパーを追加しました。\"\n\n#: ../../whats_new.rst:188\nmsgid \"Add :attr:`ScheduledEvent.creator_id` attribute\"\nmsgstr \":attr:`ScheduledEvent.creator_id` 属性を追加しました。\"\n\n#: ../../whats_new.rst:189\nmsgid \"|commands| Add support for :meth:`~ext.commands.Cog.interaction_check` for :class:`~ext.commands.GroupCog` (:issue:`9189`)\"\nmsgstr \"|commands| :class:`~ext.commands.GroupCog` にて :meth:`~ext.commands.Cog.interaction_check` のサポートを追加しました。 (:issue:`9189`)\"\n\n#: ../../whats_new.rst:194\nmsgid \"Fix views not being removed from message store backing leading to a memory leak when used from an application command context\"\nmsgstr \"アプリケーションコマンドから使用されたビューがメッセージストアから除去されず、メモリリークを引き起こすバグを修正しました。\"\n\n#: ../../whats_new.rst:195\nmsgid \"Fix async iterators requesting past their bounds when using ``oldest_first`` and ``after`` or ``before`` (:issue:`9093`)\"\nmsgstr \"非同期イテレータが ``oldest_first`` と ``after`` または ``before`` を指定した場合に境界を越えてリクエストをするのを修正しました。 (:issue:`9093`)\"\n\n#: ../../whats_new.rst:196\nmsgid \"Fix :meth:`Guild.audit_logs` pagination logic being buggy when using ``after`` (:issue:`9269`)\"\nmsgstr \":meth:`Guild.audit_logs` にて、 ``after`` を使用したときにページネーションで発生するバグを修正しました。 (:issue:`9269`)\"\n\n#: ../../whats_new.rst:197\nmsgid \"Fix :attr:`Message.channel` sometimes being :class:`Object` instead of :class:`PartialMessageable`\"\nmsgstr \":attr:`Message.channel` が時々 :class:`PartialMessageable` ではなく :class:`Object` となるバグを修正しました。\"\n\n#: ../../whats_new.rst:198\nmsgid \"Fix :class:`ui.View` not properly calling ``super().__init_subclass__`` (:issue:`9231`)\"\nmsgstr \":class:`ui.View` が ``super().__init_subclass__`` を適切に呼び出さないのを修正しました。 (:issue:`9231`)\"\n\n#: ../../whats_new.rst:199\nmsgid \"Fix ``available_tags`` and ``default_thread_slowmode_delay`` not being respected in :meth:`Guild.create_forum`\"\nmsgstr \":meth:`Guild.create_forum` で渡された ``available_tags`` と ``default_thread_slowmode_delay`` が使用されない問題を修正しました。\"\n\n#: ../../whats_new.rst:200\nmsgid \"Fix :class:`AutoModTrigger` ignoring ``allow_list`` with type keyword (:issue:`9107`)\"\nmsgstr \":class:`AutoModTrigger` が type キーワードのある ``allow_list`` を無視するバグを修正しました。 (:issue:`9107`)\"\n\n#: ../../whats_new.rst:201\nmsgid \"Fix implicit permission resolution for :class:`Thread` (:issue:`9153`)\"\nmsgstr \":class:`Thread` の暗黙的な権限の解決を修正しました。 (:issue:`9153`)\"\n\n#: ../../whats_new.rst:202\nmsgid \"Fix :meth:`AutoModRule.edit` to work with actual snowflake types such as :class:`Object` (:issue:`9159`)\"\nmsgstr \":meth:`AutoModRule.edit` を、 :class:`Object` のようなスノウフレーク型で動くよう修正しました。 (:issue:`9159`)\"\n\n#: ../../whats_new.rst:203\nmsgid \"Fix :meth:`Webhook.send` returning :class:`ForumChannel` for :attr:`WebhookMessage.channel`\"\nmsgstr \":meth:`Webhook.send` が :attr:`WebhookMessage.channel` に関し :class:`ForumChannel` を返すのを修正しました。\"\n\n#: ../../whats_new.rst:204\nmsgid \"When a lookup for :attr:`AuditLogEntry.target` fails, it will fallback to :class:`Object` with the appropriate :attr:`Object.type` (:issue:`9171`)\"\nmsgstr \":attr:`AuditLogEntry.target` の検索が失敗したとき、適切な :attr:`Object.type` をもつ :class:`Object` にフォールバックするようにしました。 (:issue:`9171`)\"\n\n#: ../../whats_new.rst:205\nmsgid \"Fix :attr:`AuditLogDiff.type` for integrations returning :class:`ChannelType` instead of :class:`str` (:issue:`9200`)\"\nmsgstr \"インテグレーションの :attr:`AuditLogDiff.type` が :class:`str` ではなく :class:`ChannelType` を返すのを修正しました。 (:issue:`9200`)\"\n\n#: ../../whats_new.rst:206\nmsgid \"Fix :attr:`AuditLogDiff.type` for webhooks returning :class:`ChannelType` instead of :class:`WebhookType` (:issue:`9251`)\"\nmsgstr \"Webhookの :attr:`AuditLogDiff.type` が :class:`WebhookType` ではなく :class:`ChannelType` を返すのを修正しました。 (:issue:`9251`)\"\n\n#: ../../whats_new.rst:207\nmsgid \"Fix webhooks and interactions not properly closing files after the request has completed\"\nmsgstr \"Webhookとインタラクションが、リクエストが完了した後にファイルを正しく閉じないバグを修正しました。\"\n\n#: ../../whats_new.rst:208\nmsgid \"Fix :exc:`NameError` in audit log target for app commands\"\nmsgstr \"アプリケーションコマンドの監査ログターゲットでの :exc:`NameError` を修正しました。\"\n\n#: ../../whats_new.rst:209\nmsgid \"Fix :meth:`ScheduledEvent.edit` requiring some arguments to be passed in when unnecessary (:issue:`9261`, :issue:`9268`)\"\nmsgstr \":meth:`ScheduledEvent.edit` にて不必要な引数が必須とされるバグを修正しました。 (:issue:`9261` 、 :issue:`9268`)\"\n\n#: ../../whats_new.rst:210\nmsgid \"|commands| Explicit set a traceback for hybrid command invocations (:issue:`9205`)\"\nmsgstr \"|commands| ハイブリッドコマンドを呼び出すとき、明示的にトレースバックを設定するようにしました。 (:issue:`9205`)\"\n\n#: ../../whats_new.rst:215\nmsgid \"Add colour preview for the colours predefined in :class:`Colour`\"\nmsgstr \":class:`Colour` で定義された色のプレビューを追加しました。\"\n\n#: ../../whats_new.rst:216\nmsgid \"Finished views are no longer stored by the library when sending them (:issue:`9235`)\"\nmsgstr \"終了したビューは送信時にライブラリで保管されないようになりました。 (:issue:`9235`)\"\n\n#: ../../whats_new.rst:217\nmsgid \"Force enable colour logging for the default logging handler when run under Docker.\"\nmsgstr \"Docker下で実行するときに、デフォルトの logging ハンドラで色のついたログを常に有効にするようにしました。\"\n\n#: ../../whats_new.rst:218\nmsgid \"Add various overloads for :meth:`Client.wait_for` to aid in static analysis (:issue:`9184`)\"\nmsgstr \"静的解析のために、 :meth:`Client.wait_for` のオーバーロードを追加しました。 (:issue:`9184`)\"\n\n#: ../../whats_new.rst:219\nmsgid \":class:`Interaction` can now optionally take a generic parameter, ``ClientT`` to represent the type for :attr:`Interaction.client`\"\nmsgstr \":class:`Interaction` は、オプションでジェネリックのパラメータ ``ClientT`` をとり、 :attr:`Interaction.client` の型を指定できるようになりました。\"\n\n#: ../../whats_new.rst:220\nmsgid \"|commands| Respect :attr:`~ext.commands.Command.ignore_extra` for :class:`~discord.ext.commands.FlagConverter` keyword-only parameters\"\nmsgstr \"|commands| :class:`~discord.ext.commands.FlagConverter` キーワードのみのパラメータでも、 :attr:`~ext.commands.Command.ignore_extra` に従うようにしました。\"\n\n#: ../../whats_new.rst:221\nmsgid \"|commands| Change :attr:`Paginator.pages <ext.commands.Paginator.pages>` to not prematurely close (:issue:`9257`)\"\nmsgstr \"|commands| :attr:`Paginator.pages <ext.commands.Paginator.pages>` を早期に閉じないように変更しました。 (:issue:`9257`)\"\n\n#: ../../whats_new.rst:226\nmsgid \"v2.1.1\"\nmsgstr \"v2.1.1\"\n\n#: ../../whats_new.rst:231\nmsgid \"Fix crash involving GIF stickers when looking up their filename extension.\"\nmsgstr \"GIF スタンプのファイル名の拡張子を検索するときのクラッシュを修正しました。\"\n\n#: ../../whats_new.rst:236\nmsgid \"v2.1.0\"\nmsgstr \"v2.1.0\"\n\n#: ../../whats_new.rst:241\nmsgid \"Add support for ``delete_message_seconds`` in :meth:`Guild.ban` (:issue:`8391`)\"\nmsgstr \":meth:`Guild.ban` に ``delete_message_seconds`` へのサポートを追加しました。 (:issue:`8391`)\"\n\n#: ../../whats_new.rst:242\nmsgid \"Add support for automod related audit log actions (:issue:`8389`)\"\nmsgstr \"AutoMod関連の監査ログアクションのサポートを追加しました。 (:issue:`8389`)\"\n\n#: ../../whats_new.rst:243\nmsgid \"Add support for :class:`ForumChannel` annotations in app commands\"\nmsgstr \"アプリケーションコマンドで :class:`ForumChannel` アノテーションのサポートを追加しました。\"\n\n#: ../../whats_new.rst:244\nmsgid \"Add support for :attr:`ForumChannel.default_thread_slowmode_delay`.\"\nmsgstr \":attr:`ForumChannel.default_thread_slowmode_delay` のサポートを追加しました。\"\n\n#: ../../whats_new.rst:245\nmsgid \"Add support for :attr:`ForumChannel.default_reaction_emoji`.\"\nmsgstr \":attr:`ForumChannel.default_reaction_emoji` のサポートを追加しました。\"\n\n#: ../../whats_new.rst:248\nmsgid \"Add support for forum tags under :class:`ForumTag`.\"\nmsgstr \":class:`ForumTag` にて、フォーラムタグのサポートを追加しました。\"\n\n#: ../../whats_new.rst:247\nmsgid \"Tags can be obtained using :attr:`ForumChannel.available_tags` or :meth:`ForumChannel.get_tag`.\"\nmsgstr \"タグは :attr:`ForumChannel.available_tags` または :meth:`ForumChannel.get_tag` で取得できます。\"\n\n#: ../../whats_new.rst:248\nmsgid \"See :meth:`Thread.edit` and :meth:`ForumChannel.edit` for modifying tags and their usage.\"\nmsgstr \"タグの変更方法や使い方については :meth:`Thread.edit` と :meth:`ForumChannel.edit` を参照してください。\"\n\n#: ../../whats_new.rst:252\nmsgid \"Add support for new select types (:issue:`9013`, :issue:`9003`).\"\nmsgstr \"新しい選択メニューの種類のサポートを追加しました。 (:issue:`9013`, :issue:`9003`)\"\n\n#: ../../whats_new.rst:251\nmsgid \"These are split into separate classes, :class:`~discord.ui.ChannelSelect`, :class:`~discord.ui.RoleSelect`, :class:`~discord.ui.UserSelect`, :class:`~discord.ui.MentionableSelect`.\"\nmsgstr \"これらは、 :class:`~discord.ui.ChannelSelect` 、 :class:`~discord.ui.RoleSelect` 、 :class:`~discord.ui.UserSelect` 、 :class:`~discord.ui.MentionableSelect` に分割されています。\"\n\n#: ../../whats_new.rst:252\nmsgid \"The decorator still uses a single function, :meth:`~discord.ui.select`. Changing the select type is done by the ``cls`` keyword parameter.\"\nmsgstr \"デコレータはこれまで通り単一の関数 :meth:`~discord.ui.select` を使用しています。選択メニューの種類の変更は ``cls`` キーワード引数によって行われます。\"\n\n#: ../../whats_new.rst:254\nmsgid \"Add support for toggling discoverable and invites_disabled features in :meth:`Guild.edit` (:issue:`8390`).\"\nmsgstr \":meth:`Guild.edit` で、discoverable と invites_disabled 機能を切り替えるためのサポートを追加しました。 (:issue:`8390`)\"\n\n#: ../../whats_new.rst:255\nmsgid \"Add :meth:`Interaction.translate` helper method (:issue:`8425`).\"\nmsgstr \":meth:`Interaction.translate` ヘルパーメソッドを追加しました。 (:issue:`8425`)\"\n\n#: ../../whats_new.rst:256\nmsgid \"Add :meth:`Forum.archived_threads` (:issue:`8476`).\"\nmsgstr \":meth:`Forum.archived_threads` を追加しました。 (:issue:`8476`)\"\n\n#: ../../whats_new.rst:257\nmsgid \"Add :attr:`ApplicationFlags.active`, :attr:`UserFlags.active_developer`, and :attr:`PublicUserFlags.active_developer`.\"\nmsgstr \":attr:`ApplicationFlags.active` 、 :attr:`UserFlags.active_developer` 、および :attr:`PublicUserFlags.active_developer` を追加しました。\"\n\n#: ../../whats_new.rst:258\nmsgid \"Add ``delete_after`` to :meth:`InteractionResponse.send_message` (:issue:`9022`).\"\nmsgstr \":meth:`InteractionResponse.send_message` に ``delete_after`` を追加しました。 (:issue:`9022`)\"\n\n#: ../../whats_new.rst:259\nmsgid \"Add support for :attr:`AutoModTrigger.regex_patterns`.\"\nmsgstr \":attr:`AutoModTrigger.regex_patterns` のサポートを追加しました。\"\n\n#: ../../whats_new.rst:260\nmsgid \"|commands| Add :attr:`GroupCog.group_extras <discord.ext.commands.GroupCog.group_extras>` to set :attr:`app_commands.Group.extras` (:issue:`8405`).\"\nmsgstr \"|commands| :attr:`app_commands.Group.extras` を設定できる :attr:`GroupCog.group_extras <discord.ext.commands.GroupCog.group_extras>` を追加しました。 (:issue:`8405`)\"\n\n#: ../../whats_new.rst:261\nmsgid \"|commands| Add support for NumPy style docstrings for regular commands to set parameter descriptions.\"\nmsgstr \"|commands| 通常のコマンドでパラメータの説明を設定するのに NumPy スタイルの docstring が利用できるようになりました。\"\n\n#: ../../whats_new.rst:262\nmsgid \"|commands| Allow :class:`~discord.ext.commands.Greedy` to potentially maintain state between calls.\"\nmsgstr \"|commands| :class:`~discord.ext.commands.Greedy` が呼び出し間で状態を維持できるようにしました。\"\n\n#: ../../whats_new.rst:263\nmsgid \"|commands| Add :meth:`Cog.has_app_command_error_handler <discord.ext.commands.Cog.has_app_command_error_handler>` (:issue:`8991`).\"\nmsgstr \"|commands| :meth:`Cog.has_app_command_error_handler <discord.ext.commands.Cog.has_app_command_error_handler>` を追加しました。 (:issue:`8991`)\"\n\n#: ../../whats_new.rst:264\nmsgid \"|commands| Allow ``delete_after`` in :meth:`Context.send <discord.ext.commands.Context.send>` on ephemeral messages (:issue:`9021`).\"\nmsgstr \"|commands| :meth:`Context.send <discord.ext.commands.Context.send>` で ``delete_after`` が利用できるようになりました。 (:issue:`9021`)\"\n\n#: ../../whats_new.rst:269\nmsgid \"Fix an :exc:`KeyError` being raised when constructing :class:`app_commands.Group` with no module (:issue:`8411`).\"\nmsgstr \":exc:`app_commands.Group` をモジュールなしで構築したときに :class:`KeyError` が発生する問題を修正しました。 (:issue:`8411`)\"\n\n#: ../../whats_new.rst:270\nmsgid \"Fix unescaped period in webhook URL regex (:issue:`8443`).\"\nmsgstr \"Webhook URLの正規表現でピリオドがエスケープされていない問題を修正しました。 (:issue:`8443`)\"\n\n#: ../../whats_new.rst:271\nmsgid \"Fix :exc:`app_commands.CommandSyncFailure` raising for other 400 status code errors.\"\nmsgstr \"他の400ステータスコードエラーで :exc:`app_commands.CommandSyncFailure` が送出される問題を修正しました。\"\n\n#: ../../whats_new.rst:272\nmsgid \"Fix potential formatting issues showing `_errors` in :exc:`app_commands.CommandSyncFailure`.\"\nmsgstr \":exc:`app_commands.CommandSyncFailure` で ``_errors`` を表示するかもしれないフォーマットの問題を修正しました。\"\n\n#: ../../whats_new.rst:273\nmsgid \"Fix :attr:`Guild.stage_instances` and :attr:`Guild.schedule_events` clearing on ``GUILD_UPDATE``.\"\nmsgstr \":attr:`Guild.stage_instances` と :attr:`Guild.schedule_events` が ``GUILD_UPDATE`` 時に空になる問題を修正しました。\"\n\n#: ../../whats_new.rst:274\nmsgid \"Fix detection of overriden :meth:`app_commands.Group.on_error`\"\nmsgstr \"オーバーライドされた :meth:`app_commands.Group.on_error` の検出を修正しました。\"\n\n#: ../../whats_new.rst:275\nmsgid \"Fix :meth:`app_commands.CommandTree.on_error` still being called when a bound error handler is set.\"\nmsgstr \"エラーハンドラが設定されている場合にも、 :meth:`app_commands.CommandTree.on_error` が呼び出されているのを修正しました。\"\n\n#: ../../whats_new.rst:276\nmsgid \"Fix thread permissions being set to ``True`` in :meth:`DMChannel.permissions_for` (:issue:`8965`).\"\nmsgstr \":meth:`DMChannel.permissions_for` でスレッドの権限が ``True`` に設定されている問題を修正しました。 (:issue:`8965`)\"\n\n#: ../../whats_new.rst:277\nmsgid \"Fix ``on_scheduled_event_delete`` occasionally dispatching with too many parameters (:issue:`9019`).\"\nmsgstr \"``on_scheduled_event_delete`` に渡されるパラメータが多すぎる場合がある問題を修正しました。 (:issue:`9019`)\"\n\n#: ../../whats_new.rst:278\nmsgid \"|commands| Fix :meth:`Context.from_interaction <discord.ext.commands.Context.from_interaction>` ignoring :attr:`~discord.ext.commands.Context.command_failed`.\"\nmsgstr \"|commands| :meth:`Context.from_interaction <discord.ext.commands.Context.from_interaction>` が :attr:`~discord.ext.commands.Context.command_failed` を無視する問題を修正しました。\"\n\n#: ../../whats_new.rst:279\nmsgid \"|commands| Fix :class:`~discord.ext.commands.Range` to allow 3.10 Union syntax (:issue:`8446`).\"\nmsgstr \"|commands| :class:`~discord.ext.commands.Range` で 3.10 Union 構文が利用できるようになりました。 (:issue:`8446`).\"\n\n#: ../../whats_new.rst:280\nmsgid \"|commands| Fix ``before_invoke`` not triggering for fallback commands in a hybrid group command (:issue:`8461`, :issue:`8462`).\"\nmsgstr \"|commands| HybridGroupコマンドでfallbackコマンドがトリガーされない問題を修正しました(:issue:`8461`, :issue:`8462`)。\"\n\n#: ../../whats_new.rst:285\nmsgid \"Change error message for unbound callbacks in :class:`app_commands.ContextMenu` to make it clearer that bound methods are not allowed.\"\nmsgstr \":class:`app_commands.ContextMenu` でバインドされていないコールバックのエラーメッセージを変更し、バインドされているメソッドは使用できないことを明確にしました。\"\n\n#: ../../whats_new.rst:286\nmsgid \"Normalize type formatting in TypeError exceptions (:issue:`8453`).\"\nmsgstr \"TypeError 例外で型のフォーマットを標準化しました。 (:issue:`8453`)\"\n\n#: ../../whats_new.rst:287\nmsgid \"Change :meth:`VoiceProtocol.on_voice_state_update` and :meth:`VoiceProtocol.on_voice_server_update` parameters to be positional only (:issue:`8463`).\"\nmsgstr \":meth:`VoiceProtocol.on_voice_state_update` と :meth:`VoiceProtocol.on_voice_server_update` パラメータを位置指定専用に変更しました。 (:issue:`8463` )\"\n\n#: ../../whats_new.rst:288\nmsgid \"Add support for PyCharm when using the default coloured logger (:issue:`9015`).\"\nmsgstr \"デフォルトの色付きロガーに、 PyCharm 対応を追加しました。 (:issue:`9015`)\"\n\n#: ../../whats_new.rst:293\nmsgid \"v2.0.1\"\nmsgstr \"v2.0.1\"\n\n#: ../../whats_new.rst:298\nmsgid \"Fix ``cchardet`` being installed on Python >=3.10 when using the ``speed`` extras.\"\nmsgstr \"Python 3.10 以降で ``speed`` extrasを使用した場合に ``cchardet`` がインストールされる問題を修正しました。\"\n\n#: ../../whats_new.rst:299\nmsgid \"Fix :class:`ui.View` timeout updating when the :meth:`ui.View.interaction_check` failed.\"\nmsgstr \":meth:`ui.View.interaction_check` に失敗したときにも :class:`ui.View` のタイムアウトが更新される問題を修正しました。\"\n\n#: ../../whats_new.rst:300\nmsgid \"Fix :meth:`app_commands.CommandTree.on_error` not triggering if :meth:`~app_commands.CommandTree.interaction_check` raises.\"\nmsgstr \":meth:`~app_commands.CommandTree.interaction_check` が例外を送出したときに :meth:`app_commands.CommandTree.on_error` が実行されない問題を修正しました。\"\n\n#: ../../whats_new.rst:301\nmsgid \"Fix ``__main__`` script to use ``importlib.metadata`` instead of the deprecated ``pkg_resources``.\"\nmsgstr \"非推奨の ``pkg_resources`` の代わりに ``importlib.metadata`` を使用するよう ``__main__`` スクリプトを修正しました。\"\n\n#: ../../whats_new.rst:303\nmsgid \"Fix library callbacks triggering a type checking error if the parameter names were different.\"\nmsgstr \"ライブラリコールバックのパラメータ名が異なる場合に型チェックエラーが検出される問題を修正しました。\"\n\n#: ../../whats_new.rst:303\nmsgid \"This required a change in the :ref:`version_guarantees`\"\nmsgstr \"これに伴い :ref:`version_guarantees` が改訂されました。\"\n\n#: ../../whats_new.rst:305\nmsgid \"|commands| Fix Python 3.10 union types not working with :class:`commands.Greedy <discord.ext.commands.Greedy>`.\"\nmsgstr \"|commands| Python 3.10 のユニオン型が :class:`commands.Greedy <discord.ext.commands.Greedy>` で動作しない問題を修正しました。\"\n\n#: ../../whats_new.rst:310\nmsgid \"v2.0.0\"\nmsgstr \"v2.0.0\"\n\n#: ../../whats_new.rst:312\nmsgid \"The changeset for this version are too big to be listed here, for more information please see :ref:`the migrating page <migrating_2_0>`.\"\nmsgstr \"このバージョンの変更は大きすぎるため、この場所に収まりきりません。詳細については :ref:`移行についてのページ <migrating_2_0>` を参照してください。\"\n\n#: ../../whats_new.rst:318\nmsgid \"v1.7.3\"\nmsgstr \"v1.7.3\"\n\n#: ../../whats_new.rst:323\nmsgid \"Fix a crash involving guild uploaded stickers\"\nmsgstr \"ギルドでアップロードされたスタンプに関するクラッシュを修正しました。\"\n\n#: ../../whats_new.rst:324\nmsgid \"Fix :meth:`DMChannel.permissions_for` not having :attr:`Permissions.read_messages` set.\"\nmsgstr \":meth:`DMChannel.permissions_for` に :attr:`Permissions.read_messages` が設定されていない問題を修正しました。\"\n\n#: ../../whats_new.rst:329\nmsgid \"v1.7.2\"\nmsgstr \"v1.7.2\"\n\n#: ../../whats_new.rst:334\nmsgid \"Fix ``fail_if_not_exists`` causing certain message references to not be usable within :meth:`abc.Messageable.send` and :meth:`Message.reply` (:issue:`6726`)\"\nmsgstr \"``fail_if_not_exists`` により、特定のメッセージ参照が :meth:`abc.Messageable.send` および :meth:`Message.reply` 内で使用できない問題を修正しました。 (:issue:`6726`)\"\n\n#: ../../whats_new.rst:335\nmsgid \"Fix :meth:`Guild.chunk` hanging when the user left the guild. (:issue:`6730`)\"\nmsgstr \"ギルドからユーザーが脱退した際に :meth:`Guild.chunk` がハングするのを修正しました。 (:issue:`6730`)\"\n\n#: ../../whats_new.rst:336\nmsgid \"Fix loop sleeping after final iteration rather than before (:issue:`6744`)\"\nmsgstr \"最終反復の前ではなく後にループがスリープするのを修正しました。 (:issue:`6744`)\"\n\n#: ../../whats_new.rst:341\nmsgid \"v1.7.1\"\nmsgstr \"v1.7.1\"\n\n#: ../../whats_new.rst:346\nmsgid \"|commands| Fix :meth:`Cog.has_error_handler <ext.commands.Cog.has_error_handler>` not working as intended.\"\nmsgstr \"|commands| :meth:`Cog.has_error_handler <ext.commands.Cog.has_error_handler>` が正常に動作しない問題を修正しました。\"\n\n#: ../../whats_new.rst:351\nmsgid \"v1.7.0\"\nmsgstr \"v1.7.0\"\n\n#: ../../whats_new.rst:353\nmsgid \"This version is mainly for improvements and bug fixes. This is more than likely the last major version in the 1.x series. Work after this will be spent on v2.0. As a result, **this is the last version to support Python 3.5**. Likewise, **this is the last version to support user bots**.\"\nmsgstr \"このバージョンは、主にバグ修正と、機能改善が含まれています。 おそらくこのバージョンが、1.xシリーズの最後のメジャーバージョンとなる予定です。これ以降の作業は、主にv2.0に費やされます。 結果として、**このバージョンが、Python 3.5をサポートする最後のバージョンになります**。 同様に、**このバージョンがユーザーボットをサポートする最後のバージョンです**。\"\n\n#: ../../whats_new.rst:357\nmsgid \"Development of v2.0 will have breaking changes and support for newer API features.\"\nmsgstr \"v2.0の開発には、破壊的更新と、新しいAPI機能の変更が含まれるでしょう。\"\n\n#: ../../whats_new.rst:362\nmsgid \"Add support for stage channels via :class:`StageChannel` (:issue:`6602`, :issue:`6608`)\"\nmsgstr \":class:`StageChannel` のサポートを追加しました。 (:issue:`6602`, :issue:`6608`)\"\n\n#: ../../whats_new.rst:365\nmsgid \"Add support for :attr:`MessageReference.fail_if_not_exists` (:issue:`6484`)\"\nmsgstr \":attr:`MessageReference.fail_if_not_exists` のサポートを追加しました。 (:issue:`6484`)\"\n\n#: ../../whats_new.rst:364\nmsgid \"By default, if the message you're replying to doesn't exist then the API errors out. This attribute tells the Discord API that it's okay for that message to be missing.\"\nmsgstr \"デフォルトでは、もし返信するメッセージが存在しない場合、APIエラーが発生します。この属性は、Discord APIにメッセージが存在していない場合でも、問題がないことを伝えます。\"\n\n#: ../../whats_new.rst:367\nmsgid \"Add support for Discord's new permission serialisation scheme.\"\nmsgstr \"Discordの新しい権限シリアライゼーションスキームのサポートを追加しました。\"\n\n#: ../../whats_new.rst:368\nmsgid \"Add an easier way to move channels using :meth:`abc.GuildChannel.move`\"\nmsgstr \"簡単にチャンネルの移動をする :meth:`abc.GuildChannel.move` を追加しました。\"\n\n#: ../../whats_new.rst:369\nmsgid \"Add :attr:`Permissions.use_slash_commands`\"\nmsgstr \"新しい権限 :attr:`Permissions.use_slash_commands` を追加しました。\"\n\n#: ../../whats_new.rst:370\nmsgid \"Add :attr:`Permissions.request_to_speak`\"\nmsgstr \"新しい権限 :attr:`Permissions.request_to_speak` を追加しました。\"\n\n#: ../../whats_new.rst:371\nmsgid \"Add support for voice regions in voice channels via :attr:`VoiceChannel.rtc_region` (:issue:`6606`)\"\nmsgstr \":attr:`VoiceChannel.rtc_region` によるボイスチャンネルの、ボイスリージョンのサポートを追加しました。 (:issue:`6606`)\"\n\n#: ../../whats_new.rst:372\nmsgid \"Add support for :meth:`PartialEmoji.url_as` (:issue:`6341`)\"\nmsgstr \":meth:`PartialEmoji.url_as` のサポートを追加しました。 (:issue:`6341`)\"\n\n#: ../../whats_new.rst:373\nmsgid \"Add :attr:`MessageReference.jump_url` (:issue:`6318`)\"\nmsgstr \":attr:`MessageReference.jump_url` を追加しました。(:issue:`6318`)\"\n\n#: ../../whats_new.rst:374\nmsgid \"Add :attr:`File.spoiler` (:issue:`6317`)\"\nmsgstr \":attr:`File.spoiler` を追加しました。 (:issue:`6317`)\"\n\n#: ../../whats_new.rst:375\nmsgid \"Add support for passing ``roles`` to :meth:`Guild.estimate_pruned_members` (:issue:`6538`)\"\nmsgstr \"``roles`` を :meth:`Guild.estimate_pruned_members` に渡すことができるようになりました。(:issue:`6538`)\"\n\n#: ../../whats_new.rst:376\nmsgid \"Allow callable class factories to be used in :meth:`abc.Connectable.connect` (:issue:`6478`)\"\nmsgstr \":meth:`abc.Connectable.connect` において、クラスを生成する呼び出し可能オブジェクトを使用できるようになりました。( :issue:`6478` )\"\n\n#: ../../whats_new.rst:377\nmsgid \"Add a way to get mutual guilds from the client's cache via :attr:`User.mutual_guilds` (:issue:`2539`, :issue:`6444`)\"\nmsgstr \"クライアントのキャッシュから共通のギルドを取得する :attr:`User.mutual_guilds` を追加しました。 (:issue:`2539`, :issue:`6444`)\"\n\n#: ../../whats_new.rst:378\nmsgid \":meth:`PartialMessage.edit` now returns a full :class:`Message` upon success (:issue:`6309`)\"\nmsgstr \":meth:`PartialMessage.edit` が成功時に完全な :class:`Message` を返すようになりました。 (:issue:`6309`)\"\n\n#: ../../whats_new.rst:379\nmsgid \"Add :attr:`RawMessageUpdateEvent.guild_id` (:issue:`6489`)\"\nmsgstr \":attr:`RawMessageUpdateEvent.guild_id` を追加しました。(:issue:`6489`)\"\n\n#: ../../whats_new.rst:380\nmsgid \":class:`AuditLogEntry` is now hashable (:issue:`6495`)\"\nmsgstr \":class:`AuditLogEntry` がハッシュ可能になりました。 (:issue:`6495`)\"\n\n#: ../../whats_new.rst:381\nmsgid \":class:`Attachment` is now hashable\"\nmsgstr \":class:`Attachment` がハッシュ可能になりました。\"\n\n#: ../../whats_new.rst:382\nmsgid \"Add :attr:`Attachment.content_type` attribute (:issue:`6618`)\"\nmsgstr \":attr:`Attachment.content_type` 属性を追加しました。 (:issue:`6618`)\"\n\n#: ../../whats_new.rst:383\nmsgid \"Add support for casting :class:`Attachment` to :class:`str` to get the URL.\"\nmsgstr \"URLを取得するために :class:`Atachment` を :class:`str` へキャストできるようになりました。\"\n\n#: ../../whats_new.rst:385\nmsgid \"Add ``seed`` parameter for :class:`Colour.random` (:issue:`6562`)\"\nmsgstr \":class:`Colour.random` に ``seed`` パラメータを追加しました。 (:issue:`6562`)\"\n\n#: ../../whats_new.rst:385\nmsgid \"This only seeds it for one call. If seeding for multiple calls is desirable, use :func:`random.seed`.\"\nmsgstr \"これは1つの呼び出しに対してのみシードします。複数の呼び出しに対するシードが望ましい場合は、 :func:`random.seed` を使用してください。\"\n\n#: ../../whats_new.rst:387\nmsgid \"Add a :func:`utils.remove_markdown` helper function (:issue:`6573`)\"\nmsgstr \":func:`utils.remove_markdown` ヘルパー関数を追加しました。 (:issue:`6573`)\"\n\n#: ../../whats_new.rst:388\nmsgid \"Add support for passing scopes to :func:`utils.oauth_url` (:issue:`6568`)\"\nmsgstr \":func:`utils.oauth_url` にスコープを渡すことが可能になりました。 (:issue:`6568`)\"\n\n#: ../../whats_new.rst:389\nmsgid \"|commands| Add support for ``rgb`` CSS function as a parameter to :class:`ColourConverter <ext.commands.ColourConverter>` (:issue:`6374`)\"\nmsgstr \"|commands| :class:`ColourConverter <ext.commands.ColourConverter>` において、 ``rgb`` CSS関数の文字列を変換できるようになりました。 (:issue:`6374`)\"\n\n#: ../../whats_new.rst:390\nmsgid \"|commands| Add support for converting :class:`StoreChannel` via :class:`StoreChannelConverter <ext.commands.StoreChannelConverter>` (:issue:`6603`)\"\nmsgstr \"|commands| :class:`StoreChannel` を :class:`StoreChannelConverter <ext.commands.StoreChannelConverter>` によって変換できるようになりました。 (:issue:`6603`)\"\n\n#: ../../whats_new.rst:391\nmsgid \"|commands| Add support for stripping whitespace after the prefix is encountered using the ``strip_after_prefix`` :class:`~ext.commands.Bot` constructor parameter.\"\nmsgstr \"|commands| :class:`~ext.commands.Bot` の ``strip_after_prefix`` 初期化パラメーターを指定することで、プレフィックスのあとの空白を取り除けるようになりました。\"\n\n#: ../../whats_new.rst:392\nmsgid \"|commands| Add :attr:`Context.invoked_parents <ext.commands.Context.invoked_parents>` to get the aliases a command's parent was invoked with (:issue:`1874`, :issue:`6462`)\"\nmsgstr \"|commands| :attr:`Context.invoked_parents <ext.commands.Context.invoked_parents>` で、呼び出されたときのコマンドの親のエイリアスを取得できるようになりました。 (:issue:`1874`, :issue:`6462`)\"\n\n#: ../../whats_new.rst:393\nmsgid \"|commands| Add a converter for :class:`PartialMessage` under :class:`ext.commands.PartialMessageConverter` (:issue:`6308`)\"\nmsgstr \"|commands| :class:`PartialMessage` 用のコンバーター :class:`ext.commands.PartialMessageConverter` を追加しました。 (:issue:`6308`)\"\n\n#: ../../whats_new.rst:394\nmsgid \"|commands| Add a converter for :class:`Guild` under :class:`ext.commands.GuildConverter` (:issue:`6016`, :issue:`6365`)\"\nmsgstr \"|commands| :class:`Guild` 用のコンバーター :class:`ext.commands.GuildConverter` を追加しました。 (:issue:`6016`, :issue:`6365`)\"\n\n#: ../../whats_new.rst:395\nmsgid \"|commands| Add :meth:`Command.has_error_handler <ext.commands.Command.has_error_handler>`\"\nmsgstr \"|commands| :meth:`Command.has_error_handler <ext.commands.Command.has_error_handler>` を追加しました。\"\n\n#: ../../whats_new.rst:396\nmsgid \"This is also adds :meth:`Cog.has_error_handler <ext.commands.Cog.has_error_handler>`\"\nmsgstr \":meth:`Cog.has_error_handler <ext.commands.Cog.has_error_handler>` も追加されました。\"\n\n#: ../../whats_new.rst:397\nmsgid \"|commands| Allow callable types to act as a bucket key for cooldowns (:issue:`6563`)\"\nmsgstr \"|commands| 呼び出し可能オブジェクトをクールダウンのバケットキーとして使用できるようになりました。 (:issue:`6563`)\"\n\n#: ../../whats_new.rst:398\nmsgid \"|commands| Add ``linesep`` keyword argument to :class:`Paginator <ext.commands.Paginator>` (:issue:`5975`)\"\nmsgstr \"|commands| :class:`Paginator <ext.commands.Paginator>` に ``linesep`` キーワード引数を追加しました。 (:issue:`5975`)\"\n\n#: ../../whats_new.rst:399\nmsgid \"|commands| Allow ``None`` to be passed to :attr:`HelpCommand.verify_checks <ext.commands.HelpCommand.verify_checks>` to only verify in a guild context (:issue:`2008`, :issue:`6446`)\"\nmsgstr \"|commands| :attr:`HelpCommand.verify_checks <ext.commands.HelpCommand.verify_checks>` に ``None`` を指定することで、サーバー内でのみチェックを確認するようにできるようにしました。 (:issue:`2008`, :issue:`6446`)\"\n\n#: ../../whats_new.rst:400\nmsgid \"|commands| Allow relative paths when loading extensions via a ``package`` keyword argument (:issue:`2465`, :issue:`6445`)\"\nmsgstr \"|commands| ``package`` キーワード引数で、エクステンションをロードするときの相対パスを指定できるようになりました。 (:issue:`2465`, :issue:`6445`)\"\n\n#: ../../whats_new.rst:405\nmsgid \"Fix mentions not working if ``mention_author`` is passed in :meth:`abc.Messageable.send` without :attr:`Client.allowed_mentions` set (:issue:`6192`, :issue:`6458`)\"\nmsgstr \":attr:`Client.allowed_mentions` が設定されていないときに、 :meth:`abc.Messageable.send` で ``mention_author`` が渡されてもメンションしない問題を修正しました。 (:issue:`6192`, :issue:`6458`)\"\n\n#: ../../whats_new.rst:406\nmsgid \"Fix user created instances of :class:`CustomActivity` triggering an error (:issue:`4049`)\"\nmsgstr \"ユーザーが作成した :class:`CustomActivity` インスタンスがエラーを引き起こす問題を修正しました。 (:issue:`4049`)\"\n\n#: ../../whats_new.rst:407\nmsgid \"Note that currently, bot users still cannot set a custom activity due to a Discord limitation.\"\nmsgstr \"現在、Discordの制限により、Botはまだカスタムアクティビティを設定できません。\"\n\n#: ../../whats_new.rst:408\nmsgid \"Fix :exc:`ZeroDivisionError` being raised from :attr:`VoiceClient.average_latency` (:issue:`6430`, :issue:`6436`)\"\nmsgstr \":attr:`VoiceClient.average_latency` にて :exc:`ZeroDivisionError` が発生する問題を修正しました。 (:issue:`6430`, :issue:`6436`)\"\n\n#: ../../whats_new.rst:409\nmsgid \"Fix :attr:`User.public_flags` not updating upon edit (:issue:`6315`)\"\nmsgstr \":attr:`User.public_flags` が編集時に更新されない問題を修正しました。 (:issue:`6315`)\"\n\n#: ../../whats_new.rst:410\nmsgid \"Fix :attr:`Message.call` sometimes causing attribute errors (:issue:`6390`)\"\nmsgstr \":attr:`Message.call` が時々AttributeErrorを送出する問題を修正しました。 (:issue:`6390`)\"\n\n#: ../../whats_new.rst:411\nmsgid \"Fix issue resending a file during request retries on newer versions of ``aiohttp`` (:issue:`6531`)\"\nmsgstr \"新しいバージョンの ``aiohttp`` で、リクエストの再試行中にファイルを再送するときに発生する問題を修正しました。 (:issue:`6531`)\"\n\n#: ../../whats_new.rst:412\nmsgid \"Raise an error when ``user_ids`` is empty in :meth:`Guild.query_members`\"\nmsgstr \":meth:`Guild.query_members` を呼び出す際、 ``user_ids`` に空のリストが指定された際にエラーが発生するようになりました。\"\n\n#: ../../whats_new.rst:413\nmsgid \"Fix ``__str__`` magic method raising when a :class:`Guild` is unavailable.\"\nmsgstr \":class:`Guild` が利用不可能なときに ``__str__`` メソッドがエラーを出す問題を修正しました。\"\n\n#: ../../whats_new.rst:414\nmsgid \"Fix potential :exc:`AttributeError` when accessing :attr:`VoiceChannel.members` (:issue:`6602`)\"\nmsgstr \":attr:`VoiceChannel.members` にアクセスする時に :exc:`AttributeError` が発生する潜在的なバグを修正しました。(:issue:`6602`)\"\n\n#: ../../whats_new.rst:415\nmsgid \":class:`Embed` constructor parameters now implicitly convert to :class:`str` (:issue:`6574`)\"\nmsgstr \":class:`Embed` の初期化時に指定された引数は暗黙的に :class:`str` へ変換されるようになりました。 (:issue:`6574`)\"\n\n#: ../../whats_new.rst:416\nmsgid \"Ensure ``discord`` package is only run if executed as a script (:issue:`6483`)\"\nmsgstr \"``discord`` パッケージがスクリプトとして実行された場合のみ実行されるようになりました。 (:issue:`6483`)\"\n\n#: ../../whats_new.rst:417\nmsgid \"|commands| Fix irrelevant commands potentially being unloaded during cog unload due to failure.\"\nmsgstr \"|commands| コグのアンロード中、失敗することにより無関係なコマンドがアンロードされる可能性がある問題を修正しました。\"\n\n#: ../../whats_new.rst:418\nmsgid \"|commands| Fix attribute errors when setting a cog to :class:`~.ext.commands.HelpCommand` (:issue:`5154`)\"\nmsgstr \"|commands| コグを :class:`~.ext.commands.HelpCommand` に設定した際にAttributeErrorが出る問題を修正しました。 (:issue:`5154`)\"\n\n#: ../../whats_new.rst:419\nmsgid \"|commands| Fix :attr:`Context.invoked_with <ext.commands.Context.invoked_with>` being improperly reassigned during a :meth:`~ext.commands.Context.reinvoke` (:issue:`6451`, :issue:`6462`)\"\nmsgstr \"|commands| :meth:`~ext.commands.Context.reinvoke` 中に :attr:`Context.invoked_with <ext.commands.Context.invoked_with>` が不適切に再割り当てされる問題を修正しました。 (:issue:`6451`, :issue:`6462`)\"\n\n#: ../../whats_new.rst:420\nmsgid \"|commands| Remove duplicates from :meth:`HelpCommand.get_bot_mapping <ext.commands.HelpCommand.get_bot_mapping>` (:issue:`6316`)\"\nmsgstr \"|commands| :meth:`HelpCommand.get_bot_mapping <ext.commands.HelpCommand.get_bot_mapping>` で、コマンドが重複する問題を修正しました。 (:issue:`6316`)\"\n\n#: ../../whats_new.rst:421\nmsgid \"|commands| Properly handle positional-only parameters in bot command signatures (:issue:`6431`)\"\nmsgstr \"|commands| Botのコマンドシグネチャーで、位置限定引数を適切に処理するようになりました。 (:issue:`6431`)\"\n\n#: ../../whats_new.rst:422\nmsgid \"|commands| Group signatures now properly show up in :attr:`Command.signature <ext.commands.Command.signature>` (:issue:`6529`, :issue:`6530`)\"\nmsgstr \"|commands| グループのシグネチャーが :attr:`Command.signature <ext.commands.Command.signature>` に正しく表示されるようになりました。 (:issue:`6529`, :issue:`6530`)\"\n\n#: ../../whats_new.rst:427\nmsgid \"User endpoints and all userbot related functionality has been deprecated and will be removed in the next major version of the library.\"\nmsgstr \"ユーザー用エンドポイントとユーザーボットの関連機能は非推奨になり、次のライブラリのメジャーバージョンで削除されます。\"\n\n#: ../../whats_new.rst:428\nmsgid \":class:`Permission` class methods were updated to match the UI of the Discord client (:issue:`6476`)\"\nmsgstr \":class:`Permission` のクラスメソッドがDiscordクライアントのUIと一致するように更新されました。 (:issue:`6476`)\"\n\n#: ../../whats_new.rst:429\nmsgid \"``_`` and ``-`` characters are now stripped when making a new cog using the ``discord`` package (:issue:`6313`)\"\nmsgstr \"``_`` と ``-`` の文字が ``discord`` パッケージを使用して新しいコグを作成するときに取り除かれるようになりました。 (:issue:`6313`)\"\n\n#: ../../whats_new.rst:434\nmsgid \"v1.6.0\"\nmsgstr \"v1.6.0\"\n\n#: ../../whats_new.rst:436\nmsgid \"This version comes with support for replies and stickers.\"\nmsgstr \"このバージョンでは、返信機能とスタンプ機能がサポートされるようになりました。\"\n\n#: ../../whats_new.rst:441\nmsgid \"An entirely redesigned documentation. This was the cumulation of multiple months of effort.\"\nmsgstr \"完全に再設計されたドキュメント。 これは何ヶ月もの努力の積み重ねで作られました。\"\n\n#: ../../whats_new.rst:442\nmsgid \"There's now a dark theme, feel free to navigate to the cog on the screen to change your setting, though this should be automatic.\"\nmsgstr \"ダークテーマが実装されました。変更するには、画面上の歯車から設定をしてください。これは自動的に行われます。\"\n\n#: ../../whats_new.rst:443\nmsgid \"Add support for :meth:`AppInfo.icon_url_as` and :meth:`AppInfo.cover_image_url_as` (:issue:`5888`)\"\nmsgstr \":meth:`AppInfo.icon_url_as` と :meth:`AppInfo.cover_image_url_as` が追加されました。 (:issue:`5888`)\"\n\n#: ../../whats_new.rst:444\nmsgid \"Add :meth:`Colour.random` to get a random colour (:issue:`6067`)\"\nmsgstr \"ランダムな色が得られる、 :meth:`Colour.random` が追加されました。 (:issue:`6067`)\"\n\n#: ../../whats_new.rst:445\nmsgid \"Add support for stickers via :class:`Sticker` (:issue:`5946`)\"\nmsgstr \":class:`Sticker` によってスタンプがサポートされました。 (:issue:`5946`)\"\n\n#: ../../whats_new.rst:449\nmsgid \"Add support for replying via :meth:`Message.reply` (:issue:`6061`)\"\nmsgstr \":meth:`Message.reply` で返信ができるようになりました。 (:issue:`6061`)\"\n\n#: ../../whats_new.rst:447\nmsgid \"This also comes with the :attr:`AllowedMentions.replied_user` setting.\"\nmsgstr \"これには :attr:`AllowedMentions.replied_user` の設定も含まれます。\"\n\n#: ../../whats_new.rst:448\nmsgid \":meth:`abc.Messageable.send` can now accept a :class:`MessageReference`.\"\nmsgstr \":meth:`abc.Messageable.send` が :class:`MessageReference` を受け付けるようになりました。\"\n\n#: ../../whats_new.rst:449\nmsgid \":class:`MessageReference` can now be constructed by users.\"\nmsgstr \":class:`MessageReference` がユーザーによって生成できるようになりました。\"\n\n#: ../../whats_new.rst:450\nmsgid \":meth:`Message.to_reference` can now convert a message to a :class:`MessageReference`.\"\nmsgstr \":meth:`Message.to_reference` によってMessageオブジェクトを :class:`MessageReference` に変換できるようになりました。\"\n\n#: ../../whats_new.rst:451\nmsgid \"Add support for getting the replied to resolved message through :attr:`MessageReference.resolved`.\"\nmsgstr \":attr:`MessageReference.resolved` で解決済みメッセージを得ることができます。\"\n\n#: ../../whats_new.rst:457\nmsgid \"Add support for role tags.\"\nmsgstr \"ロールのタグがサポートされました。\"\n\n#: ../../whats_new.rst:453\nmsgid \":attr:`Guild.premium_subscriber_role` to get the \\\"Nitro Booster\\\" role (if available).\"\nmsgstr \":attr:`Guild.premium_subscriber_role` で ニトロブースターロールを取得できます（利用可能な場合）。\"\n\n#: ../../whats_new.rst:454\nmsgid \":attr:`Guild.self_role` to get the bot's own role (if available).\"\nmsgstr \":attr:`Guild.self_role` でサーバー内のBot自身のロールを取得できます（利用可能な場合）。\"\n\n#: ../../whats_new.rst:455\nmsgid \":attr:`Role.tags` to get the role's tags.\"\nmsgstr \":attr:`Role.tags` でロールのタグを取得できます。\"\n\n#: ../../whats_new.rst:456\nmsgid \":meth:`Role.is_premium_subscriber` to check if a role is the \\\"Nitro Booster\\\" role.\"\nmsgstr \":meth:`Role.is_premium_subscriber` でロールがニトロブースターロールであるかを確認できます。\"\n\n#: ../../whats_new.rst:457\nmsgid \":meth:`Role.is_bot_managed` to check if a role is a bot role (i.e. the automatically created role for bots).\"\nmsgstr \":meth:`Role.is_bot_managed` でロールがボットロール（自動的に作られたBot用ロール）であるかを確認できます。\"\n\n#: ../../whats_new.rst:458\nmsgid \":meth:`Role.is_integration` to check if a role is role created by an integration.\"\nmsgstr \":meth:`Role.is_integration` でインテグレーションによって作成されたロールかどうか確認できます。\"\n\n#: ../../whats_new.rst:459\nmsgid \"Add :meth:`Client.is_ws_ratelimited` to check if the websocket is rate limited.\"\nmsgstr \":meth:`Client.is_ws_ratelimited` でWebSocketのレート制限がされているかどうか確認できるようになりました。\"\n\n#: ../../whats_new.rst:460\nmsgid \":meth:`ShardInfo.is_ws_ratelimited` is the equivalent for checking a specific shard.\"\nmsgstr \":meth:`ShardInfo.is_ws_ratelimited` は特定のシャードのWebSocketレート制限をチェックします。\"\n\n#: ../../whats_new.rst:461\nmsgid \"Add support for chunking an :class:`AsyncIterator` through :meth:`AsyncIterator.chunk` (:issue:`6100`, :issue:`6082`)\"\nmsgstr \":class:`AsyncIterator` を :meth:`AsyncIterator.chunk` を通してチャンク化できるようになりました。 (:issue:`6100`, :issue:`6082`)\"\n\n#: ../../whats_new.rst:462\nmsgid \"Add :attr:`PartialEmoji.created_at` (:issue:`6128`)\"\nmsgstr \":attr:`PartialEmoji.created_at` を追加しました。 (:issue:`6128`)\"\n\n#: ../../whats_new.rst:463\nmsgid \"Add support for editing and deleting webhook sent messages (:issue:`6058`)\"\nmsgstr \"Webhookで送信したメッセージの編集と削除をサポートしました。 (:issue:`6058`)\"\n\n#: ../../whats_new.rst:464\nmsgid \"This adds :class:`WebhookMessage` as well to power this behaviour.\"\nmsgstr \"この機能のために :class:`WebhookMessage` が追加されました。\"\n\n#: ../../whats_new.rst:465\nmsgid \"Add :class:`PartialMessage` to allow working with a message via channel objects and just a message_id (:issue:`5905`)\"\nmsgstr \"チャンネルオブジェクトとメッセージIDのみでメッセージを操作できるようにするために、 :class:`PartialMessage` を追加しました。 (:issue:`5905`)\"\n\n#: ../../whats_new.rst:466\nmsgid \"This is useful if you don't want to incur an extra API call to fetch the message.\"\nmsgstr \"これはメッセージを取得するために追加のAPI呼び出しをしたくないときに便利です。\"\n\n#: ../../whats_new.rst:467\nmsgid \"Add :meth:`Emoji.url_as` (:issue:`6162`)\"\nmsgstr \":meth:`Emoji.url_as` を追加しました。 (:issue:`6162`)\"\n\n#: ../../whats_new.rst:468\nmsgid \"Add support for :attr:`Member.pending` for the membership gating feature.\"\nmsgstr \"メンバーシップゲート機能用に :attr:`Member.pending` のサポートを追加しました。\"\n\n#: ../../whats_new.rst:469\nmsgid \"Allow ``colour`` parameter to take ``int`` in :meth:`Guild.create_role` (:issue:`6195`)\"\nmsgstr \":meth:`Guild.create_role` で ``colour`` パラメータに ``int`` 型を渡すことができるようになりました。 (:issue:`6195`)\"\n\n#: ../../whats_new.rst:470\nmsgid \"Add support for ``presences`` in :meth:`Guild.query_members` (:issue:`2354`)\"\nmsgstr \":meth:`Guild.query_members` で、 ``presences`` 引数が使えるようになりました。 (:issue:`2354`)\"\n\n#: ../../whats_new.rst:471\nmsgid \"|commands| Add support for ``description`` keyword argument in :class:`commands.Cog <ext.commands.Cog>` (:issue:`6028`)\"\nmsgstr \"|commands| :class:`commands.Cog <ext.commands.Cog>` において、 ``description`` キーワード引数が使えるようになりました。 (:issue:`6028`)\"\n\n#: ../../whats_new.rst:472\nmsgid \"|tasks| Add support for calling the wrapped coroutine as a function via ``__call__``.\"\nmsgstr \"|tasks| ``__call__`` を使うことによってラップされたコルーチン関数を呼び出せるようになりました。\"\n\n#: ../../whats_new.rst:478\nmsgid \"Raise :exc:`DiscordServerError` when reaching 503s repeatedly (:issue:`6044`)\"\nmsgstr \"HTTPリクエスト時にステータス503が繰り返し返されたとき、 :exc:`DiscordServerError` が出るようになりました。 (:issue:`6044`)\"\n\n#: ../../whats_new.rst:479\nmsgid \"Fix :exc:`AttributeError` when :meth:`Client.fetch_template` is called (:issue:`5986`)\"\nmsgstr \":meth:`Client.fetch_template` が呼び出されたとき :exc:`AttributeError` が出る問題を修正しました。 (:issue:`5986`)\"\n\n#: ../../whats_new.rst:480\nmsgid \"Fix errors when playing audio and moving to another channel (:issue:`5953`)\"\nmsgstr \"音声を再生するときと別のボイスチャンネルへ移動するときに発生するエラーを修正しました。 (:issue:`5953`)\"\n\n#: ../../whats_new.rst:481\nmsgid \"Fix :exc:`AttributeError` when voice channels disconnect too fast (:issue:`6039`)\"\nmsgstr \"ボイスチャンネルから切断するのが速すぎるときに発生する :exc:`AttributeError` を修正しました。 (:issue:`6039`)\"\n\n#: ../../whats_new.rst:482\nmsgid \"Fix stale :class:`User` references when the members intent is off.\"\nmsgstr \"memberインテントがオフの場合に :class:`User` の参照が古くなってしまう問題を修正しました。\"\n\n#: ../../whats_new.rst:483\nmsgid \"Fix :func:`on_user_update` not dispatching in certain cases when a member is not cached but the user somehow is.\"\nmsgstr \"memberがキャッシュされておらず、userが何らかの形でキャッシュされている場合に :func:`on_user_update` が発火されない問題を修正しました。\"\n\n#: ../../whats_new.rst:484\nmsgid \"Fix :attr:`Message.author` being overwritten in certain cases during message update.\"\nmsgstr \"メッセージが更新されているとき、特定のケースで :attr:`Message.author` が上書きされてしまう問題を修正しました。\"\n\n#: ../../whats_new.rst:485\nmsgid \"This would previously make it so :attr:`Message.author` is a :class:`User`.\"\nmsgstr \"これにより、 :attr:`Message.author` が :class:`User` になるようになりました。\"\n\n#: ../../whats_new.rst:486\nmsgid \"Fix :exc:`UnboundLocalError` for editing ``public_updates_channel`` in :meth:`Guild.edit` (:issue:`6093`)\"\nmsgstr \":meth:`Guild.edit` で ``public_updates_channel`` を変更する際に :exc:`UnboundLocalError` が発生する問題を修正しました。 (:issue:`6093`)\"\n\n#: ../../whats_new.rst:487\nmsgid \"Fix uninitialised :attr:`CustomActivity.created_at` (:issue:`6095`)\"\nmsgstr \":attr:`CustomActivity.created_at` が初期化されない問題を修正しました。 (:issue:`6095`)\"\n\n#: ../../whats_new.rst:488\nmsgid \"|commands| Errors during cog unload no longer stops module cleanup (:issue:`6113`)\"\nmsgstr \"|commands| コグのアンロード中に起きたエラーがモジュールのcleanupを止めないようになりました。 (:issue:`6113`)\"\n\n#: ../../whats_new.rst:489\nmsgid \"|commands| Properly cleanup lingering commands when a conflicting alias is found when adding commands (:issue:`6217`)\"\nmsgstr \"|commands| コマンドを追加する際、エイリアスが競合したときに残ってしまうエイリアスを適切にクリーンアップするようになりました。 (:issue:`6217`)\"\n\n#: ../../whats_new.rst:494\nmsgid \"``ffmpeg`` spawned processes no longer open a window in Windows (:issue:`6038`)\"\nmsgstr \"Windowsにおいて呼び出された ``ffmpeg`` がウィンドウを開かないようになりました。 (:issue:`6038`)\"\n\n#: ../../whats_new.rst:495\nmsgid \"Update dependencies to allow the library to work on Python 3.9+ without requiring build tools. (:issue:`5984`, :issue:`5970`)\"\nmsgstr \"ライブラリがビルドツールなしでPython3.9以上で動作するよう、依存関係を変更しました。 (:issue:`5984`, :issue:`5970`)\"\n\n#: ../../whats_new.rst:496\nmsgid \"Fix docstring issue leading to a SyntaxError in 3.9 (:issue:`6153`)\"\nmsgstr \"Python3.9においてSyntaxErrorになるdocstringの問題を修正しました。 (:issue:`6153`)\"\n\n#: ../../whats_new.rst:497\nmsgid \"Update Windows opus binaries from 1.2.1 to 1.3.1 (:issue:`6161`)\"\nmsgstr \"Windows用のopusバイナリをバージョン1.2.1から1.3.1に更新しました。 (:issue:`6161`)\"\n\n#: ../../whats_new.rst:498\nmsgid \"Allow :meth:`Guild.create_role` to accept :class:`int` as the ``colour`` parameter (:issue:`6195`)\"\nmsgstr \":meth:`Guild.create_role` の ``colour`` 引数で :class:`int` 型が使えるようになりました。\\n\"\n\"(:issue:`6195`)\"\n\n#: ../../whats_new.rst:499\nmsgid \"|commands| :class:`MessageConverter <ext.commands.MessageConverter>` regex got updated to support ``www.`` prefixes (:issue:`6002`)\"\nmsgstr \"|commands| :class:`MessageConverter <ext.commands.MessageConverter>` のregexが ``www.`` プレフィックスをサポートするように更新されました。 (:issue:`6002`)\"\n\n#: ../../whats_new.rst:500\nmsgid \"|commands| :class:`UserConverter <ext.commands.UserConverter>` now fetches the API if an ID is passed and the user is not cached.\"\nmsgstr \"|commands| :class:`UserConverter <ext.commands.UserConverter>` は、IDが渡され、そのユーザーがキャッシュされていない場合にAPIからデータを取得するようになりました。\"\n\n#: ../../whats_new.rst:501\nmsgid \"|commands| :func:`max_concurrency <ext.commands.max_concurrency>` is now called before cooldowns (:issue:`6172`)\"\nmsgstr \"|commands| :func:`max_concurrency <ext.commands.max_concurrency>` がクールダウンの前に呼び出されるようになりました。 (:issue:`6172`)\"\n\n#: ../../whats_new.rst:506\nmsgid \"v1.5.1\"\nmsgstr \"v1.5.1\"\n\n#: ../../whats_new.rst:511\nmsgid \"Fix :func:`utils.escape_markdown` not escaping quotes properly (:issue:`5897`)\"\nmsgstr \":func:`utils.escape_markdown` が引用符を正しくエスケープしない問題を修正しました。 (:issue:`5897`)\"\n\n#: ../../whats_new.rst:512\nmsgid \"Fix :class:`Message` not being hashable (:issue:`5901`, :issue:`5866`)\"\nmsgstr \":class:`Message` がハッシュ可能でない問題を修正しました。 (:issue:`5901`, :issue:`5866`)\"\n\n#: ../../whats_new.rst:513\nmsgid \"Fix moving channels to the end of the channel list (:issue:`5923`)\"\nmsgstr \"チャンネルをチャンネルリストの最後まで移動する際の問題を修正しました。 (:issue:`5923`)\"\n\n#: ../../whats_new.rst:514\nmsgid \"Fix seemingly strange behaviour in ``__eq__`` for :class:`PermissionOverwrite` (:issue:`5929`)\"\nmsgstr \":class:`PermissionOverwrite` における ``__eq__`` のおかしい挙動を修正しました。 (:issue:`5929`)\"\n\n#: ../../whats_new.rst:515\nmsgid \"Fix aliases showing up in ``__iter__`` for :class:`Intents` (:issue:`5945`)\"\nmsgstr \":class:`Intents` の ``__iter__`` におけるエイリアスの表示の問題を修正しました。 (:issue:`5945`)\"\n\n#: ../../whats_new.rst:516\nmsgid \"Fix the bot disconnecting from voice when moving them to another channel (:issue:`5904`)\"\nmsgstr \"別のボイスチャンネルに移動する時にBotがボイスチャンネルから切断されてしまう問題を修正しました。 (:issue:`5945`)\"\n\n#: ../../whats_new.rst:517\nmsgid \"Fix attribute errors when chunking times out sometimes during delayed on_ready dispatching.\"\nmsgstr \"遅延on_readyディスパッチ中にチャンキングがタイムアウトする場合の属性エラーを修正しました。\"\n\n#: ../../whats_new.rst:518\nmsgid \"Ensure that the bot's own member is not evicted from the cache (:issue:`5949`)\"\nmsgstr \"Bot自身のmemberオブジェクトがキャッシュから削除されないことが保証されるようになりました。 (:issue:`5949`)\"\n\n#: ../../whats_new.rst:523\nmsgid \"Members are now loaded during ``GUILD_MEMBER_UPDATE`` events if :attr:`MemberCacheFlags.joined` is set. (:issue:`5930`)\"\nmsgstr \":attr:`MemberCacheFlags.joined` が設定されている場合、memberが ``GUILD_MEMBER_UPDATE`` イベントでロードされるようになりました。 (:issue:`5930`)\"\n\n#: ../../whats_new.rst:524\nmsgid \"|commands| :class:`MemberConverter <ext.commands.MemberConverter>` now properly lazily fetches members if not available from cache.\"\nmsgstr \"|commands| :class:`MemberConverter <ext.commands.MemberConverter>` は、memberがキャッシュから利用できない場合に遅延ロードでmemberを取得するようになりました。\"\n\n#: ../../whats_new.rst:525\nmsgid \"This is the same as having ``discord.Member`` as the type-hint.\"\nmsgstr \"これは ``discord.Member`` を型ヒントとして使うのと同じです。\"\n\n#: ../../whats_new.rst:526\nmsgid \":meth:`Guild.chunk` now allows concurrent calls without spamming the gateway with requests.\"\nmsgstr \":meth:`Guild.chunk` によって、Gatewayに負荷をかけずに同時呼び出しができるようになりました。\"\n\n#: ../../whats_new.rst:531\nmsgid \"v1.5.0\"\nmsgstr \"v1.5.0\"\n\n#: ../../whats_new.rst:533\nmsgid \"This version came with forced breaking changes that Discord is requiring all bots to go through on October 7th. It is highly recommended to read the documentation on intents, :ref:`intents_primer`.\"\nmsgstr \"このバージョンでは、Discordが10月7日に行う、すべてのBotに要求している強制的な破壊的変更が含まれています。Intentsに関するドキュメント :ref:`intents_primer` を読むことを強くおすすめします。\"\n\n#: ../../whats_new.rst:536\nmsgid \"API Changes\"\nmsgstr \"APIの変更\"\n\n#: ../../whats_new.rst:538\nmsgid \"Members and presences will no longer be retrieved due to an API change. See :ref:`privileged_intents` for more info.\"\nmsgstr \"APIの変更により、memberとpresenceの情報は取得されなくなります。 詳細は :ref:`privileged_intents` を参照してください。\"\n\n#: ../../whats_new.rst:539\nmsgid \"As a consequence, fetching offline members is disabled if the members intent is not enabled.\"\nmsgstr \"結果として、 memberインテントが有効でない場合、オフラインメンバーの取得が無効になります。\"\n\n#: ../../whats_new.rst:544\nmsgid \"Support for gateway intents, passed via ``intents`` in :class:`Client` using :class:`Intents`.\"\nmsgstr \":class:`Client` において、 ``intents`` 引数に :class:`Intents` を渡すことでゲートウェイインテントがサポートされるようになりました。\"\n\n#: ../../whats_new.rst:545\nmsgid \"Add :attr:`VoiceRegion.south_korea` (:issue:`5233`)\"\nmsgstr \":attr:`VoiceRegion.south_korea` が追加されました。 (:issue:`5233`)\"\n\n#: ../../whats_new.rst:546\nmsgid \"Add support for ``__eq__`` for :class:`Message` (:issue:`5789`)\"\nmsgstr \":class:`Message` において、 ``__eq__`` がサポートされました。 (:issue:`5789`)\"\n\n#: ../../whats_new.rst:547\nmsgid \"Add :meth:`Colour.dark_theme` factory method (:issue:`1584`)\"\nmsgstr \":meth:`Colour.dark_theme` クラスメソッドが追加されました。 (:issue:`1584`)\"\n\n#: ../../whats_new.rst:548\nmsgid \"Add :meth:`AllowedMentions.none` and :meth:`AllowedMentions.all` (:issue:`5785`)\"\nmsgstr \":meth:`AllowedMentions.none` と :meth:`AllowedMentions.all` が追加されました。 (:issue:`5785`)\"\n\n#: ../../whats_new.rst:549\nmsgid \"Add more concrete exceptions for 500 class errors under :class:`DiscordServerError` (:issue:`5797`)\"\nmsgstr \":class:`DiscordServerError` のサブクラスとして、 ステータス500エラーの具体的な例外を追加しました。 (:issue:`5797`)\"\n\n#: ../../whats_new.rst:550\nmsgid \"Implement :class:`VoiceProtocol` to better intersect the voice flow.\"\nmsgstr \"音声フローをより良く交差させるため、 :class:`VoiceProtocol` を実装しました。\"\n\n#: ../../whats_new.rst:551\nmsgid \"Add :meth:`Guild.chunk` to fully chunk a guild.\"\nmsgstr \"ギルドをチャンク化して取得する :meth:`Guild.chunk` を追加しました。\"\n\n#: ../../whats_new.rst:552\nmsgid \"Add :class:`MemberCacheFlags` to better control member cache. See :ref:`intents_member_cache` for more info.\"\nmsgstr \"メンバーキャッシュをより適切に制御するために :class:`MemberCacheFlags` を追加しました。詳細は :ref:`intents_member_cache` を参照してください。\"\n\n#: ../../whats_new.rst:554\nmsgid \"Add support for :attr:`ActivityType.competing` (:issue:`5823`)\"\nmsgstr \":attr:`ActivityType.competing` のサポートを追加しました。 (:issue:`5823`)\"\n\n#: ../../whats_new.rst:554\nmsgid \"This seems currently unused API wise.\"\nmsgstr \"これはAPIとしては現在未使用のようです。\"\n\n#: ../../whats_new.rst:556\nmsgid \"Add support for message references, :attr:`Message.reference` (:issue:`5754`, :issue:`5832`)\"\nmsgstr \"メッセージ参照のサポート、 :attr:`Message.reference` を追加しました。 (:issue:`5754`, :issue:`5832`)\"\n\n#: ../../whats_new.rst:557\nmsgid \"Add alias for :class:`ColourConverter` under ``ColorConverter`` (:issue:`5773`)\"\nmsgstr \":class:`ColourConverter` のエイリアス ``ColorConverter`` を追加しました。 (:issue:`5773`)\"\n\n#: ../../whats_new.rst:558\nmsgid \"Add alias for :attr:`PublicUserFlags.verified_bot_developer` under :attr:`PublicUserFlags.early_verified_bot_developer` (:issue:`5849`)\"\nmsgstr \":attr:`PublicUserFlags.verified_bot_developer` のエイリアスを :attr:`PublicUserFlags.early_verified_bot_developer` の下に追加しました。(:issue:`5849`)\"\n\n#: ../../whats_new.rst:559\nmsgid \"|commands| Add support for ``require_var_positional`` for :class:`Command` (:issue:`5793`)\"\nmsgstr \"|commands| :class:`Command` に ``require_var_positional`` のサポートを追加しました。 (:issue:`5793`)\"\n\n#: ../../whats_new.rst:564\n#: ../../whats_new.rst:598\nmsgid \"Fix issue with :meth:`Guild.by_category` not showing certain channels.\"\nmsgstr \":meth:`Guild.by_category` がいくつかのチャンネルを表示しない問題を修正しました。\"\n\n#: ../../whats_new.rst:565\n#: ../../whats_new.rst:599\nmsgid \"Fix :attr:`abc.GuildChannel.permissions_synced` always being ``False`` (:issue:`5772`)\"\nmsgstr \":attr:`abc.GuildChannel.permissions_synced` が常に ``False`` になる問題を修正しました。 (:issue:`5772`)\"\n\n#: ../../whats_new.rst:566\n#: ../../whats_new.rst:600\nmsgid \"Fix handling of cloudflare bans on webhook related requests (:issue:`5221`)\"\nmsgstr \"Webhook関連のリクエストでcloudflareにBANされた際の処理に発生するバグを修正しました。(:issue:`5221`)\"\n\n#: ../../whats_new.rst:567\n#: ../../whats_new.rst:601\nmsgid \"Fix cases where a keep-alive thread would ack despite already dying (:issue:`5800`)\"\nmsgstr \"キープライブスレッドが既に死んでいるにも関わらずackをするのを修正しました。(:issue:`5800`)\"\n\n#: ../../whats_new.rst:568\n#: ../../whats_new.rst:602\nmsgid \"Fix cases where a :class:`Member` reference would be stale when cache is disabled in message events (:issue:`5819`)\"\nmsgstr \"メッセージイベントでキャッシュが無効になった際に、 :class:`Member` の参照が古くなる問題を修正しました。 (:issue:`5819`)\"\n\n#: ../../whats_new.rst:569\n#: ../../whats_new.rst:603\nmsgid \"Fix ``allowed_mentions`` not being sent when sending a single file (:issue:`5835`)\"\nmsgstr \"単一のファイルを送信したときに ``allowed_mentions`` が送信されない問題を修正しました。 (:issue:`5835`)\"\n\n#: ../../whats_new.rst:570\n#: ../../whats_new.rst:604\nmsgid \"Fix ``overwrites`` being ignored in :meth:`abc.GuildChannel.edit` if ``{}`` is passed (:issue:`5756`, :issue:`5757`)\"\nmsgstr \"``{}`` が渡された場合、 :meth:`abc.GuildChannel.edit` で ``overwrites`` が無視されるのを修正しました。(:issue:`5756`, :issue:`5757`)\"\n\n#: ../../whats_new.rst:571\n#: ../../whats_new.rst:605\nmsgid \"|commands| Fix exceptions being raised improperly in command invoke hooks (:issue:`5799`)\"\nmsgstr \"|commands| コマンド呼び出しフックでの例外が正しく送出されない問題を修正しました。 (:issue:`5799`)\"\n\n#: ../../whats_new.rst:572\n#: ../../whats_new.rst:606\nmsgid \"|commands| Fix commands not being properly ejected during errors in a cog injection (:issue:`5804`)\"\nmsgstr \"|commands| コグを追加するときにエラーが発生した場合にコマンドが正しく除去されない問題を修正しました。 (:issue:`5804`)\"\n\n#: ../../whats_new.rst:573\n#: ../../whats_new.rst:607\nmsgid \"|commands| Fix cooldown timing ignoring edited timestamps.\"\nmsgstr \"|commands| クールダウンのタイミングが編集のタイムスタンプを無視していたのを修正しました。\"\n\n#: ../../whats_new.rst:574\n#: ../../whats_new.rst:608\nmsgid \"|tasks| Fix tasks extending the next iteration on handled exceptions (:issue:`5762`, :issue:`5763`)\"\nmsgstr \"|tasks| 例外処理後のイテレーションでの問題を修正しました。 (:issue:`5762`, :issue:`5763`)\"\n\n#: ../../whats_new.rst:579\nmsgid \"Webhook requests are now logged (:issue:`5798`)\"\nmsgstr \"Webhookリクエストをログに記録するように変更しました。 (:issue:`5798`)\"\n\n#: ../../whats_new.rst:580\n#: ../../whats_new.rst:613\nmsgid \"Remove caching layer from :attr:`AutoShardedClient.shards`. This was causing issues if queried before launching shards.\"\nmsgstr \":attr:`AutoShardedClient.shards` からキャッシュレイヤーを削除しました。これは、シャードを起動する前にクエリを実行すると問題が発生するためです。\"\n\n#: ../../whats_new.rst:581\nmsgid \"Gateway rate limits are now handled.\"\nmsgstr \"ゲートウェイレート制限の処理が行われるようになりました。\"\n\n#: ../../whats_new.rst:582\nmsgid \"Warnings logged due to missed caches are now changed to DEBUG log level.\"\nmsgstr \"ミスキャッシュによる警告レベルのログがDEBUGレベルのログに変更されました。\"\n\n#: ../../whats_new.rst:583\nmsgid \"Some strings are now explicitly interned to reduce memory usage.\"\nmsgstr \"一部の文字列は、メモリ使用量を削減するために明示的にインターンされるようになりました。\"\n\n#: ../../whats_new.rst:584\nmsgid \"Usage of namedtuples has been reduced to avoid potential breaking changes in the future (:issue:`5834`)\"\nmsgstr \"将来的に壊れる可能性のある変更を避けるために、namedtuplesの使用が削減されました。(:issue:`5834`)\"\n\n#: ../../whats_new.rst:585\nmsgid \"|commands| All :class:`BadArgument` exceptions from the built-in converters now raise concrete exceptions to better tell them apart (:issue:`5748`)\"\nmsgstr \"|commands| ビルトインコンバータから送出されていた全ての :class:`BadArgument` 例外は、判別しやすいよう具体的な例外を発生させるようになりました。 (:issue:`5748`)\"\n\n#: ../../whats_new.rst:586\n#: ../../whats_new.rst:614\nmsgid \"|tasks| Lazily fetch the event loop to prevent surprises when changing event loop policy (:issue:`5808`)\"\nmsgstr \"|tasks| Lazily fetch event loop to prevent surprises when changing event loop policy (:issue:`5808`)\"\n\n#: ../../whats_new.rst:591\nmsgid \"v1.4.2\"\nmsgstr \"v1.4.2\"\n\n#: ../../whats_new.rst:593\nmsgid \"This is a maintenance release with backports from :ref:`vp1p5p0`.\"\nmsgstr \"これは :ref:`vp1p5p0` からのバックポートによるメンテナンスリリースです。\"\n\n#: ../../whats_new.rst:619\nmsgid \"v1.4.1\"\nmsgstr \"v1.4.1\"\n\n#: ../../whats_new.rst:624\nmsgid \"Properly terminate the connection when :meth:`Client.close` is called (:issue:`5207`)\"\nmsgstr \":meth:`Client.close` が呼び出されたときに正常に接続を終了するようにしました。 (:issue:`5207`)\"\n\n#: ../../whats_new.rst:625\nmsgid \"Fix error being raised when clearing embed author or image when it was already cleared (:issue:`5210`, :issue:`5212`)\"\nmsgstr \"埋め込みの作者や画像がすでにクリアされているときにクリアしようとするとエラーが発生するのを修正しました。 (:issue:`5210`, :issue:`5212`)\"\n\n#: ../../whats_new.rst:626\nmsgid \"Fix ``__path__`` to allow editable extensions (:issue:`5213`)\"\nmsgstr \"編集可能なエクステンションを利用できるように ``__path__`` を修正しました。 (:issue:`5213`)\"\n\n#: ../../whats_new.rst:631\nmsgid \"v1.4.0\"\nmsgstr \"v1.4.0\"\n\n#: ../../whats_new.rst:633\nmsgid \"Another version with a long development time. Features like Intents are slated to be released in a v1.5 release. Thank you for your patience!\"\nmsgstr \"長い開発時間を持つ別のバージョンです。Intentsのような機能はv1.5リリースでリリースされる予定です。ご理解いただきありがとうございます！\"\n\n#: ../../whats_new.rst:640\nmsgid \"Add support for :class:`AllowedMentions` to have more control over what gets mentioned.\"\nmsgstr \"メンションの動作を制御する :class:`AllowedMentions` を追加しました。\"\n\n#: ../../whats_new.rst:639\nmsgid \"This can be set globally through :attr:`Client.allowed_mentions`\"\nmsgstr \"これは :attr:`Client.allowed_mentions` から設定することができます。\"\n\n#: ../../whats_new.rst:640\nmsgid \"This can also be set on a per message basis via :meth:`abc.Messageable.send`\"\nmsgstr \":meth:`abc.Messageable.send` を介してメッセージごとに設定することもできます。\"\n\n#: ../../whats_new.rst:648\nmsgid \":class:`AutoShardedClient` has been completely redesigned from the ground up to better suit multi-process clusters (:issue:`2654`)\"\nmsgstr \":class:`AutoShardedClient` は、マルチプロセスクラスタに適した設計に完全に変更されました。(:issue:`2654`)\"\n\n#: ../../whats_new.rst:643\nmsgid \"Add :class:`ShardInfo` which allows fetching specific information about a shard.\"\nmsgstr \"シャードに関する情報を取得するために :class:`ShardInfo` を追加しました。\"\n\n#: ../../whats_new.rst:644\nmsgid \"The :class:`ShardInfo` allows for reconnecting and disconnecting of a specific shard as well.\"\nmsgstr \":class:`ShardInfo` では、特定のシャードの再接続と切断も可能です。\"\n\n#: ../../whats_new.rst:645\nmsgid \"Add :meth:`AutoShardedClient.get_shard` and :attr:`AutoShardedClient.shards` to get information about shards.\"\nmsgstr \"シャードに関する情報を取得するための :meth:`AutoShardedClient.get_shard` と :attr:`AutoShardedClient.shards` を追加しました。\"\n\n#: ../../whats_new.rst:646\nmsgid \"Rework the entire connection flow to better facilitate the ``IDENTIFY`` rate limits.\"\nmsgstr \"接続フロー全体をリワークして、``IDENTIFY`` レート制限の対応を改善しました。\"\n\n#: ../../whats_new.rst:647\nmsgid \"Add a hook :meth:`Client.before_identify_hook` to have better control over what happens before an ``IDENTIFY`` is done.\"\nmsgstr \"``IDENTIFY`` が完了する前に何を行うべきかをよりよく制御できる :meth:`Client.before_identify_hook` を追加しました。\"\n\n#: ../../whats_new.rst:648\nmsgid \"Add more shard related events such as :func:`on_shard_connect`, :func:`on_shard_disconnect` and :func:`on_shard_resumed`.\"\nmsgstr \":func:`on_shard_connect` 、 :func:`on_shard_disconnect` 、 :func:`on_shard_resumed` などのシャード関連イベントを追加しました。\"\n\n#: ../../whats_new.rst:654\nmsgid \"Add support for guild templates (:issue:`2652`)\"\nmsgstr \"サーバーテンプレートのサポートを追加しました。 (:issue:`2652`)\"\n\n#: ../../whats_new.rst:651\nmsgid \"This adds :class:`Template` to read a template's information.\"\nmsgstr \"テンプレートの情報を読むために :class:`Template` を追加しました。\"\n\n#: ../../whats_new.rst:652\nmsgid \":meth:`Client.fetch_template` can be used to fetch a template's information from the API.\"\nmsgstr \"テンプレートの情報を API から取得するには :meth:`Client.fetch_template` が使用できます。\"\n\n#: ../../whats_new.rst:653\nmsgid \":meth:`Client.create_guild` can now take an optional template to base the creation from.\"\nmsgstr \":meth:`Client.create_guild` は任意で作成元のテンプレートを取ることができます。\"\n\n#: ../../whats_new.rst:654\nmsgid \"Note that fetching a guild's template is currently restricted for bot accounts.\"\nmsgstr \"Botアカウントでは、ギルドのテンプレートの取得は現在制限されていることに注意してください。\"\n\n#: ../../whats_new.rst:664\nmsgid \"Add support for guild integrations (:issue:`2051`, :issue:`1083`)\"\nmsgstr \"ギルドインテグレーションのサポートを追加しました。 (:issue:`2051`, :issue:`1083`)\"\n\n#: ../../whats_new.rst:657\nmsgid \":class:`Integration` is used to read integration information.\"\nmsgstr \":class:`Integration` はインテグレーション情報の読み取りに使用されます。\"\n\n#: ../../whats_new.rst:658\nmsgid \":class:`IntegrationAccount` is used to read integration account information.\"\nmsgstr \":class:`IntegrationAccount` はインテグレーションアカウント情報の読み取りに使用されます。\"\n\n#: ../../whats_new.rst:659\nmsgid \":meth:`Guild.integrations` will fetch all integrations in a guild.\"\nmsgstr \":meth:`Guild.integrations` はギルド内の全てのインテグレーションを取得します。\"\n\n#: ../../whats_new.rst:660\nmsgid \":meth:`Guild.create_integration` will create an integration.\"\nmsgstr \":meth:`Guild.create_integration` はインテグレーションを作成します。\"\n\n#: ../../whats_new.rst:661\nmsgid \":meth:`Integration.edit` will edit an existing integration.\"\nmsgstr \":meth:`Integration.edit` は既存のインテグレーションを編集します。\"\n\n#: ../../whats_new.rst:662\nmsgid \":meth:`Integration.delete` will delete an integration.\"\nmsgstr \":meth:`Integration.delete` はインテグレーションを削除します。\"\n\n#: ../../whats_new.rst:663\nmsgid \":meth:`Integration.sync` will sync an integration.\"\nmsgstr \":meth:`Integration.sync` はインテグレーションを同期します。\"\n\n#: ../../whats_new.rst:664\nmsgid \"There is currently no support in the audit log for this.\"\nmsgstr \"これには現時点で監査ログのサポートはありません。\"\n\n#: ../../whats_new.rst:666\nmsgid \"Add an alias for :attr:`VerificationLevel.extreme` under :attr:`VerificationLevel.very_high` (:issue:`2650`)\"\nmsgstr \":attr:`VerificationLevel.extreme` の別名を :attr:`VerificationLevel.very_high` の下に追加しました (:issue:`2650`)\"\n\n#: ../../whats_new.rst:667\nmsgid \"Add various grey to gray aliases for :class:`Colour` (:issue:`5130`)\"\nmsgstr \":class:`Colour` に「グレー」の綴り違いのエイリアスを追加しました。 (:issue:`5130`)\"\n\n#: ../../whats_new.rst:668\nmsgid \"Added :attr:`VoiceClient.latency` and :attr:`VoiceClient.average_latency` (:issue:`2535`)\"\nmsgstr \":attr:`VoiceClient.latency` と :attr:`VoiceClient.average_latency` を追加しました。 (:issue:`2535`)\"\n\n#: ../../whats_new.rst:669\nmsgid \"Add ``use_cached`` and ``spoiler`` parameters to :meth:`Attachment.to_file` (:issue:`2577`, :issue:`4095`)\"\nmsgstr \":meth:`Attachment.to_file` にパラメータ ``use_cached`` と ``spoiler`` を追加しました。 (:issue:`2577`, :issue:`4095`)\"\n\n#: ../../whats_new.rst:670\nmsgid \"Add ``position`` parameter support to :meth:`Guild.create_category` (:issue:`2623`)\"\nmsgstr \":meth:`Guild.create_category` にて ``position`` パラメータのサポートを追加しました。 (:issue:`2623`)\"\n\n#: ../../whats_new.rst:671\nmsgid \"Allow passing ``int`` for the colour in :meth:`Role.edit` (:issue:`4057`)\"\nmsgstr \":meth:`Role.edit` のロールカラーに ``int`` が渡せるようになりました。 (:issue:`4057`)\"\n\n#: ../../whats_new.rst:672\nmsgid \"Add :meth:`Embed.remove_author` to clear author information from an embed (:issue:`4068`)\"\nmsgstr \"埋め込みの作者を削除する :meth:`Embed.remove_author` が追加されました。 (:issue:`4068`)\"\n\n#: ../../whats_new.rst:673\nmsgid \"Add the ability to clear images and thumbnails in embeds using :attr:`Embed.Empty` (:issue:`4053`)\"\nmsgstr \":attr:`Embed.Empty` を使用してEmbed内のサムネイルと画像をクリアできるようになりました。 (:issue:`4053`)\"\n\n#: ../../whats_new.rst:674\nmsgid \"Add :attr:`Guild.max_video_channel_users` (:issue:`4120`)\"\nmsgstr \":attr:`Guild.max_video_channel_users` を追加。( :issue:`4120` )\"\n\n#: ../../whats_new.rst:675\nmsgid \"Add :attr:`Guild.public_updates_channel` (:issue:`4120`)\"\nmsgstr \":attr:`Guild.public_updates_channel` を追加。( :issue:`4120` )\"\n\n#: ../../whats_new.rst:676\nmsgid \"Add ``guild_ready_timeout`` parameter to :class:`Client` and subclasses to control timeouts when the ``GUILD_CREATE`` stream takes too long (:issue:`4112`)\"\nmsgstr \"``GUILD_CREATE`` に時間がかかりすぎるとき、タイムアウトをコントロールできように ``guild_ready_timeout`` パラメータを :class:`Client` に追加しました。 (:issue:`4112`)\"\n\n#: ../../whats_new.rst:677\nmsgid \"Add support for public user flags via :attr:`User.public_flags` and :class:`PublicUserFlags` (:issue:`3999`)\"\nmsgstr \":attr:`User.public_flags` と :class:`PublicUserFlags` を介しユーザーフラグのサポートを追加しました。 (:issue:`3999`)\"\n\n#: ../../whats_new.rst:678\nmsgid \"Allow changing of channel types via :meth:`TextChannel.edit` to and from a news channel (:issue:`4121`)\"\nmsgstr \":meth:`TextChannel.edit` を介してニュースチャンネルの種類を変更することができるようにしました。(:issue:`4121` )\"\n\n#: ../../whats_new.rst:679\nmsgid \"Add :meth:`Guild.edit_role_positions` to bulk edit role positions in a single API call (:issue:`2501`, :issue:`2143`)\"\nmsgstr \"一回のAPI呼び出しでロールの位置を一括変更できる :meth:`Guild.edit_role_positions` を追加しました。 (:issue:`2501`, :issue:`2143`)\"\n\n#: ../../whats_new.rst:680\nmsgid \"Add :meth:`Guild.change_voice_state` to change your voice state in a guild (:issue:`5088`)\"\nmsgstr \"ギルド内のボイスステートを変更する :meth:`Guild.change_voice_state` を追加しました。 (:issue:`5088`)\"\n\n#: ../../whats_new.rst:681\nmsgid \"Add :meth:`PartialInviteGuild.is_icon_animated` for checking if the invite guild has animated icon (:issue:`4180`, :issue:`4181`)\"\nmsgstr \"ギルドにアニメーションアイコンがあるか判断する :meth:`PartialInviteGuild.is_icon_animated` を追加しました。 (:issue:`4180`, :issue:`4181`)\"\n\n#: ../../whats_new.rst:682\nmsgid \"Add :meth:`PartialInviteGuild.icon_url_as` now supports ``static_format`` for consistency (:issue:`4180`, :issue:`4181`)\"\nmsgstr \"``static_format`` が :meth:`PartialInviteGuild.icon_url_as` に追加されました (:issue:`4180`, :issue:`4181`)\"\n\n#: ../../whats_new.rst:683\nmsgid \"Add support for ``user_ids`` in :meth:`Guild.query_members`\"\nmsgstr \":meth:`Guild.query_members` で、 ``user_ids`` 引数が使えるようになりました。\"\n\n#: ../../whats_new.rst:684\nmsgid \"Add support for pruning members by roles in :meth:`Guild.prune_members` (:issue:`4043`)\"\nmsgstr \":meth:`Guild.prune_members` でメンバーをロールにより一括キックできるようになりました。 (:issue:`4043`)\"\n\n#: ../../whats_new.rst:685\nmsgid \"|commands| Implement :func:`~ext.commands.before_invoke` and :func:`~ext.commands.after_invoke` decorators (:issue:`1986`, :issue:`2502`)\"\nmsgstr \"|commands| :func:`~ext.commands.before_invoke` と :func:`~ext.commands.after_invoke` デコレーターを実装。 ( :issue:`1986`, :issue:`2502` )\"\n\n#: ../../whats_new.rst:686\nmsgid \"|commands| Add a way to retrieve ``retry_after`` from a cooldown in a command via :meth:`Command.get_cooldown_retry_after <.ext.commands.Command.get_cooldown_retry_after>` (:issue:`5195`)\"\nmsgstr \"|commands| :meth:`Command.get_cooldown_retry_after <.ext.commands.Command.get_cooldown_retry_after>` によってコマンド中のクールダウンから ``retry_after`` を取得する方法を追加しました (:issue:`5195`)\"\n\n#: ../../whats_new.rst:687\nmsgid \"|commands| Add a way to dynamically add and remove checks from a :class:`HelpCommand <.ext.commands.HelpCommand>` (:issue:`5197`)\"\nmsgstr \"|commands| :class:`HelpCommand <.ext.commands.HelpCommand>` から動的にチェックを追加したり削除したりする方法を追加しました (:issue:`5197`)\"\n\n#: ../../whats_new.rst:688\nmsgid \"|tasks| Add :meth:`Loop.is_running <.ext.tasks.Loop.is_running>` method to the task objects (:issue:`2540`)\"\nmsgstr \"|tasks| タスクオブジェクトに :meth:`Loop.is_running <.ext.tasks.Loop.is_running>` メソッドを追加しました (:issue:`2540`)\"\n\n#: ../../whats_new.rst:689\nmsgid \"|tasks| Allow usage of custom error handlers similar to the command extensions to tasks using :meth:`Loop.error <.ext.tasks.Loop.error>` decorator (:issue:`2621`)\"\nmsgstr \"|tasks| :meth:`Loop.error <.ext.tasks.Loop.error>` デコレーターを用いたタスクに対するコマンド拡張と同様のカスタムエラーハンドラーの使用を可能にしました (:issue:`2621`)\"\n\n#: ../../whats_new.rst:695\nmsgid \"Fix issue with :attr:`PartialEmoji.url` reads leading to a failure (:issue:`4015`, :issue:`4016`)\"\nmsgstr \":attr:`PartialEmoji.url` での読み込みエラーを修正しました。 (:issue:`4015`, :issue:`4016`)\"\n\n#: ../../whats_new.rst:696\nmsgid \"Allow :meth:`abc.Messageable.history` to take a limit of ``1`` even if ``around`` is passed (:issue:`4019`)\"\nmsgstr \"``around`` が渡された場合でも、 :meth:`abc.Messageable.history` が上限 ``1`` を取ることができるようにしました。 (:issue:`4019`)\"\n\n#: ../../whats_new.rst:697\nmsgid \"Fix :attr:`Guild.member_count` not updating in certain cases when a member has left the guild (:issue:`4021`)\"\nmsgstr \"ギルドからメンバーが脱退したとき、特定の場合に :attr:`Guild.member_count` が更新されない問題を修正しました。 (:issue:`4021`)\"\n\n#: ../../whats_new.rst:698\nmsgid \"Fix the type of :attr:`Object.id` not being validated. For backwards compatibility ``str`` is still allowed but is converted to ``int`` (:issue:`4002`)\"\nmsgstr \":attr:`Object.id` の型が検証されない問題を修正されました。後方互換性のため ``str`` は使用可能ですが、 ``int`` に変換されます。 (:issue:`4002`)\"\n\n#: ../../whats_new.rst:699\nmsgid \"Fix :meth:`Guild.edit` not allowing editing of notification settings (:issue:`4074`, :issue:`4047`)\"\nmsgstr \":meth:`Guild.edit` で通知設定の編集ができない問題を修正しました。 (:issue:`4074`, :issue:`4047`)\"\n\n#: ../../whats_new.rst:700\nmsgid \"Fix crash when the guild widget contains channels that aren't in the payload (:issue:`4114`, :issue:`4115`)\"\nmsgstr \"ギルドウィジェットの中にペイロードにないチャンネルが含まれている場合にクラッシュする問題を修正しました。 (:issue:`4114`, :issue:`4115`)\"\n\n#: ../../whats_new.rst:701\nmsgid \"Close ffmpeg stdin handling from spawned processes with :class:`FFmpegOpusAudio` and :class:`FFmpegPCMAudio` (:issue:`4036`)\"\nmsgstr \":class:`FFmpegOpusAudio` および :class:`FFmpegPCMAudio` を使って生成されたプロセスからの ffmpeg stdin のハンドリングを閉じるようにしました (:issue:`4036`)\"\n\n#: ../../whats_new.rst:702\nmsgid \"Fix :func:`utils.escape_markdown` not escaping masked links (:issue:`4206`, :issue:`4207`)\"\nmsgstr \":func:`utils.escape_markdown` がマスクされたリンクをエスケープしない問題を修正しました。 (:issue:`4206`, :issue:`4207`)\"\n\n#: ../../whats_new.rst:703\nmsgid \"Fix reconnect loop due to failed handshake on region change (:issue:`4210`, :issue:`3996`)\"\nmsgstr \"リージョン変更時のハンドシェイクの失敗による再接続のループを修正しました (:issue:`4210`, :issue:`3996`)\"\n\n#: ../../whats_new.rst:704\nmsgid \"Fix :meth:`Guild.by_category` not returning empty categories (:issue:`4186`)\"\nmsgstr \"空のカテゴリーを返さない :meth:`Guild.by_category` を修正しました (:issue:`4186`)\"\n\n#: ../../whats_new.rst:705\nmsgid \"Fix certain JPEG images not being identified as JPEG (:issue:`5143`)\"\nmsgstr \"特定の JPEG 画像が JPEG として認識されないのを修正 (:issue:`5143`)\"\n\n#: ../../whats_new.rst:706\nmsgid \"Fix a crash when an incomplete guild object is used when fetching reaction information (:issue:`5181`)\"\nmsgstr \"反応情報を取得する際に不完全なギルドオブジェクトを使用するとクラッシュする問題を修正しました (:issue:`5181`)\"\n\n#: ../../whats_new.rst:707\nmsgid \"Fix a timeout issue when fetching members using :meth:`Guild.query_members`\"\nmsgstr \":meth:`Guild.query_members` を使用してメンバーを取得する際のタイムアウトの問題を修正しました。\"\n\n#: ../../whats_new.rst:708\nmsgid \"Fix an issue with domain resolution in voice (:issue:`5188`, :issue:`5191`)\"\nmsgstr \"音声のドメイン解決に関する問題を修正しました (:issue:`5188`, :issue:`5191`)\"\n\n#: ../../whats_new.rst:709\nmsgid \"Fix an issue where :attr:`PartialEmoji.id` could be a string (:issue:`4153`, :issue:`4152`)\"\nmsgstr \":attr:`PartialEmoji.id` が文字列である可能性がある問題を修正しました (:issue:`4153`, :issue:`4152`)\"\n\n#: ../../whats_new.rst:710\nmsgid \"Fix regression where :attr:`Member.activities` would not clear.\"\nmsgstr \":attr:`Member.activities` がクリアされないリグレッションを修正しました。\"\n\n#: ../../whats_new.rst:711\nmsgid \"|commands| A :exc:`TypeError` is now raised when :obj:`typing.Optional` is used within :data:`commands.Greedy <.ext.commands.Greedy>` (:issue:`2253`, :issue:`5068`)\"\nmsgstr \"|commands| :data:`commands.Greedy <.ext.commands.Greedy>` 内で :obj:`typing.Optional` を使用すると :exc:`TypeError` が発生します (:issue:`2253`, :issue:`5068`)．\"\n\n#: ../../whats_new.rst:712\nmsgid \"|commands| :meth:`Bot.walk_commands <.ext.commands.Bot.walk_commands>` no longer yields duplicate commands due to aliases (:issue:`2591`)\"\nmsgstr \"|commands| :meth:`Bot.walk_commands <.ext.commands.Bot.walk_commands>` はエイリアスにより重複したコマンドを生成しないようになりました (:issue:`2591`)\"\n\n#: ../../whats_new.rst:713\nmsgid \"|commands| Fix regex characters not being escaped in :attr:`HelpCommand.clean_prefix <.ext.commands.HelpCommand.clean_prefix>` (:issue:`4058`, :issue:`4071`)\"\nmsgstr \"|commands| :attr:`HelpCommand.clean_prefix <.ext.commands.HelpCommand.clean_prefix>` で正規化されていない文字を修正しました (:issue:`4058`, :issue:`4071`)\"\n\n#: ../../whats_new.rst:714\nmsgid \"|commands| Fix :meth:`Bot.get_command <.ext.commands.Bot.get_command>` from raising errors when a name only has whitespace (:issue:`5124`)\"\nmsgstr \"|commands| 名前に空白文字しかない場合にエラーを発生させないように :meth:`Bot.get_command <.ext.commands.Bot.get_command>` を修正しました (:issue:`5124`)\"\n\n#: ../../whats_new.rst:715\nmsgid \"|commands| Fix issue with :attr:`Context.subcommand_passed <.ext.commands.Context.subcommand_passed>` not functioning as expected (:issue:`5198`)\"\nmsgstr \"|commands| :attr:`Context.subcommand_passed <.ext.commands.Context.subcommand_passed>` が期待通りに機能しない問題を修正しました (:issue:`5198`)\"\n\n#: ../../whats_new.rst:716\nmsgid \"|tasks| Task objects are no longer stored globally so two class instances can now start two separate tasks (:issue:`2294`)\"\nmsgstr \"|tasks| Task objects are no longer stored globally so two class instances can start two separate tasks (:issue:`2294`)\"\n\n#: ../../whats_new.rst:717\nmsgid \"|tasks| Allow cancelling the loop within :meth:`before_loop <.ext.tasks.Loop.before_loop>` (:issue:`4082`)\"\nmsgstr \"|tasks| 内のループをキャンセルできるようにする。:meth:`before_loop <.ext.tasks.Loop.before_loop>` (:issue:`4082`)\"\n\n#: ../../whats_new.rst:723\nmsgid \"The :attr:`Member.roles` cache introduced in v1.3 was reverted due to issues caused (:issue:`4087`, :issue:`4157`)\"\nmsgstr \"v1.3 で導入された :attr:`Member.roles` キャッシュは、問題が発生したため元に戻されました (:issue:`4087`, :issue:`4157`)\"\n\n#: ../../whats_new.rst:724\nmsgid \":class:`Webhook` objects are now comparable and hashable (:issue:`4182`)\"\nmsgstr \":class:`Webhook` オブジェクトが比較可能になり、ハッシュ化できるようになりました (:issue:`4182`)\"\n\n#: ../../whats_new.rst:728\nmsgid \"Some more API requests got a ``reason`` parameter for audit logs (:issue:`5086`)\"\nmsgstr \"さらにいくつかの API リクエストで、監査ログ用の ``reason`` パラメータが取得されました (:issue:`5086`)\"\n\n#: ../../whats_new.rst:726\nmsgid \":meth:`TextChannel.follow`\"\nmsgstr \":meth:`TextChannel.follow`\"\n\n#: ../../whats_new.rst:727\nmsgid \":meth:`Message.pin` and :meth:`Message.unpin`\"\nmsgstr \":meth:`Message.pin` と :meth:`Message.unpin`\"\n\n#: ../../whats_new.rst:728\nmsgid \":meth:`Webhook.delete` and :meth:`Webhook.edit`\"\nmsgstr \":meth:`Webhook.delete` と :meth:`Webhook.edit`\"\n\n#: ../../whats_new.rst:730\nmsgid \"For performance reasons ``websockets`` has been dropped in favour of ``aiohttp.ws``.\"\nmsgstr \"パフォーマンス上の理由から、 ``websockets`` は削除され、 ``aiohttp.ws`` が使用されるようになりました。\"\n\n#: ../../whats_new.rst:731\nmsgid \"The blocking logging message now shows the stack trace of where the main thread was blocking\"\nmsgstr \"ブロッキングのログメッセージは、メインスレッドがブロッキングしていた場所のスタックトレースを表示するようになりました\"\n\n#: ../../whats_new.rst:732\nmsgid \"The domain name was changed from ``discordapp.com`` to ``discord.com`` to prepare for the required domain migration\"\nmsgstr \"必要なドメイン移行の準備のため、ドメイン名を ``discordapp.com`` から ``discord.com`` に変更しました。\"\n\n#: ../../whats_new.rst:733\nmsgid \"Reduce memory usage when reconnecting due to stale references being held by the message cache (:issue:`5133`)\"\nmsgstr \"メッセージキャッシュに保持されている古い参照による再接続時のメモリ使用量を削減しました (:issue:`5133`)\"\n\n#: ../../whats_new.rst:734\nmsgid \"Optimize :meth:`abc.GuildChannel.permissions_for` by not creating as many temporary objects (20-32% savings).\"\nmsgstr \"テンポラリオブジェクトをあまり作成しないように :meth:`abc.GuildChannel.permissions_for` を最適化しました (20-32%の節約)。\"\n\n#: ../../whats_new.rst:735\nmsgid \"|commands| Raise :exc:`~ext.commands.CommandRegistrationError` instead of :exc:`ClientException` when a duplicate error is registered (:issue:`4217`)\"\nmsgstr \"|commands| 重複するエラーが登録された場合、 :exc:`ClientException` ではなく :exc:`~ext.commands.CommandRegistrationError` を発生するようにしました (:issue:`4217`)\"\n\n#: ../../whats_new.rst:736\nmsgid \"|tasks| No longer handle :exc:`HTTPException` by default in the task reconnect loop (:issue:`5193`)\"\nmsgstr \"|tasks| タスクの再接続ループにおいて、デフォルトで :exc:`HTTPException` を処理しないようにしました (:issue:`5193`)\"\n\n#: ../../whats_new.rst:741\nmsgid \"v1.3.4\"\nmsgstr \"v1.3.4\"\n\n#: ../../whats_new.rst:746\nmsgid \"Fix an issue with channel overwrites causing multiple issues including crashes (:issue:`5109`)\"\nmsgstr \"チャンネルの上書きがクラッシュを含む複数の問題を引き起こす問題を修正しました (:issue:`5109`)\"\n\n#: ../../whats_new.rst:751\nmsgid \"v1.3.3\"\nmsgstr \"v1.3.3\"\n\n#: ../../whats_new.rst:757\nmsgid \"Change default WS close to 4000 instead of 1000.\"\nmsgstr \"デフォルトのWSクローズを1000から4000に変更。\"\n\n#: ../../whats_new.rst:757\nmsgid \"The previous close code caused sessions to be invalidated at a higher frequency than desired.\"\nmsgstr \"以前のクローズコードは、望ましい頻度よりも高い頻度でセッションが無効化される原因となっていました。\"\n\n#: ../../whats_new.rst:759\nmsgid \"Fix ``None`` appearing in ``Member.activities``. (:issue:`2619`)\"\nmsgstr \"``Member.activities`` に表示される ``None`` を修正しました。(:issue:`2619`)\"\n\n#: ../../whats_new.rst:764\nmsgid \"v1.3.2\"\nmsgstr \"v1.3.2\"\n\n#: ../../whats_new.rst:766\nmsgid \"Another minor bug fix release.\"\nmsgstr \"もう一つのマイナーなバグフィックスリリースです。\"\n\n#: ../../whats_new.rst:771\nmsgid \"Higher the wait time during the ``GUILD_CREATE`` stream before ``on_ready`` is fired for :class:`AutoShardedClient`.\"\nmsgstr \":class:`AutoShardedClient` の ``GUILD_CREATE`` ストリームで ``on_ready`` が発生するまでの待ち時間を長くするようにしました。\"\n\n#: ../../whats_new.rst:772\nmsgid \":func:`on_voice_state_update` now uses the inner ``member`` payload which should make it more reliable.\"\nmsgstr \":func:`on_voice_state_update` は内側の ``member`` ペイロードを使用するようになり、より信頼性が高くなりました。\"\n\n#: ../../whats_new.rst:773\nmsgid \"Fix various Cloudflare handling errors (:issue:`2572`, :issue:`2544`)\"\nmsgstr \"Cloudflare のハンドリングエラーを修正しました (:issue:`2572`, :issue:`2544`)\"\n\n#: ../../whats_new.rst:774\nmsgid \"Fix crashes if :attr:`Message.guild` is :class:`Object` instead of :class:`Guild`.\"\nmsgstr \":attr:`Message.guild` が :class:`Guild` ではなく :class:`Object` であった場合のクラッシュを修正しました。\"\n\n#: ../../whats_new.rst:775\nmsgid \"Fix :meth:`Webhook.send` returning an empty string instead of ``None`` when ``wait=False``.\"\nmsgstr \":meth:`Webhook.send` が ``wait=False`` の時に ``None`` ではなく空の文字列を返すように修正しました。\"\n\n#: ../../whats_new.rst:776\nmsgid \"Fix invalid format specifier in webhook state (:issue:`2570`)\"\nmsgstr \"Webhook の状態における無効なフォーマット指定子を修正 (:issue:`2570`)\"\n\n#: ../../whats_new.rst:777\nmsgid \"|commands| Passing invalid permissions to permission related checks now raises ``TypeError``.\"\nmsgstr \"|commands| パーミッション関連のチェックで無効なパーミッションを渡すと ``TypeError`` が発生するようになりました。\"\n\n#: ../../whats_new.rst:782\nmsgid \"v1.3.1\"\nmsgstr \"v1.3.1\"\n\n#: ../../whats_new.rst:784\nmsgid \"Minor bug fix release.\"\nmsgstr \"マイナーなバグフィックスリリースです。\"\n\n#: ../../whats_new.rst:789\nmsgid \"Fix fetching invites in guilds that the user is not in.\"\nmsgstr \"ユーザーが参加していないギルドの招待状をフェッチするように修正しました。\"\n\n#: ../../whats_new.rst:790\nmsgid \"Fix the channel returned from :meth:`Client.fetch_channel` raising when sending messages. (:issue:`2531`)\"\nmsgstr \"メッセージ送信時に :meth:`Client.fetch_channel` から返されるチャンネルを修正しました。(:issue:`2531`)\"\n\n#: ../../whats_new.rst:795\nmsgid \"Fix compatibility warnings when using the Python 3.9 alpha.\"\nmsgstr \"Python 3.9 alpha を使用する際の互換性警告を修正。\"\n\n#: ../../whats_new.rst:796\nmsgid \"Change the unknown event logging from WARNING to DEBUG to reduce noise.\"\nmsgstr \"ノイズを減らすために、不明なイベントのログをWARNINGからDEBUGに変更します。\"\n\n#: ../../whats_new.rst:801\nmsgid \"v1.3.0\"\nmsgstr \"v1.3.0\"\n\n#: ../../whats_new.rst:803\nmsgid \"This version comes with a lot of bug fixes and new features. It's been in development for a lot longer than was anticipated!\"\nmsgstr \"このバージョンでは、多くのバグフィックスと新機能が搭載されています。予想以上に長い期間、開発が続けられているのです！\"\n\n#: ../../whats_new.rst:808\nmsgid \"Add :meth:`Guild.fetch_members` to fetch members from the HTTP API. (:issue:`2204`)\"\nmsgstr \"HTTP API からメンバーを取得するための :meth:`Guild.fetch_members` を追加しました。(:issue:`2204`)\"\n\n#: ../../whats_new.rst:809\nmsgid \"Add :meth:`Guild.fetch_roles` to fetch roles from the HTTP API. (:issue:`2208`)\"\nmsgstr \"HTTP API からロールをフェッチするために :meth:`Guild.fetch_roles` を追加しました。(:issue:`2208`)\"\n\n#: ../../whats_new.rst:810\nmsgid \"Add support for teams via :class:`Team` when fetching with :meth:`Client.application_info`. (:issue:`2239`)\"\nmsgstr \":meth:`Client.application_info` で取得する際に、 :class:`Team` を介してチームをサポートする機能を追加しました。(:issue:`2239`)\"\n\n#: ../../whats_new.rst:811\nmsgid \"Add support for suppressing embeds via :meth:`Message.edit`\"\nmsgstr \":meth:`Message.edit` による埋め込みの抑制をサポートするようにしました。\"\n\n#: ../../whats_new.rst:812\nmsgid \"Add support for guild subscriptions. See the :class:`Client` documentation for more details.\"\nmsgstr \"ギルドサブスクリプションのサポートを追加しました。詳細は :class:`Client` のドキュメントを参照してください。\"\n\n#: ../../whats_new.rst:813\nmsgid \"Add :attr:`VoiceChannel.voice_states` to get voice states without relying on member cache.\"\nmsgstr \"メンバーキャッシュに依存せずに音声の状態を取得するために、 :attr:`VoiceChannel.voice_states` を追加しました。\"\n\n#: ../../whats_new.rst:814\nmsgid \"Add :meth:`Guild.query_members` to request members from the gateway.\"\nmsgstr \"ゲートウェイにメンバーを要求するために :meth:`Guild.query_members` を追加しました。\"\n\n#: ../../whats_new.rst:815\nmsgid \"Add :class:`FFmpegOpusAudio` and other voice improvements. (:issue:`2258`)\"\nmsgstr \":class:`FFmpegOpusAudio` を追加し、その他の音声の改良を行いました。(:issue:`2258`)\"\n\n#: ../../whats_new.rst:816\nmsgid \"Add :attr:`RawMessageUpdateEvent.channel_id` for retrieving channel IDs during raw message updates. (:issue:`2301`)\"\nmsgstr \"Rawメッセージの更新時にチャンネルIDを取得するための :attr:`RawMessageUpdateEvent.channel_id` を追加しました。(:issue:`2301`)\"\n\n#: ../../whats_new.rst:817\nmsgid \"Add :attr:`RawReactionActionEvent.event_type` to disambiguate between reaction addition and removal in reaction events.\"\nmsgstr \"リアクションイベントでリアクションが追加されたか除去されたかを明確にする :attr:`RawReactionActionEvent.event_type` を追加しました。\"\n\n#: ../../whats_new.rst:818\nmsgid \"Add :attr:`abc.GuildChannel.permissions_synced` to query whether permissions are synced with the category. (:issue:`2300`, :issue:`2324`)\"\nmsgstr \"権限がカテゴリと同期されているかを確認する :attr:`abc.GuildChannel.permissions_synced` を追加しました。 (:issue:`2300`, :issue:`2324`)\"\n\n#: ../../whats_new.rst:819\nmsgid \"Add :attr:`MessageType.channel_follow_add` message type for announcement channels being followed. (:issue:`2314`)\"\nmsgstr \"フォローされているアナウンスチャンネル用の :attr:`MessageType.channel_follow_add` メッセージタイプを追加しました。(:issue:`2314`)\"\n\n#: ../../whats_new.rst:820\nmsgid \"Add :meth:`Message.is_system` to allow for quickly filtering through system messages.\"\nmsgstr \"システムメッセージを素早くフィルタリングできるように :meth:`Message.is_system` を追加しました。\"\n\n#: ../../whats_new.rst:821\nmsgid \"Add :attr:`VoiceState.self_stream` to indicate whether someone is streaming via Go Live. (:issue:`2343`)\"\nmsgstr \"誰かがGo Live経由でストリーミングしているかどうかを示すための、 :attr:`VoiceState.self_stream` を追加しました。 (:issue:`2343`)\"\n\n#: ../../whats_new.rst:822\nmsgid \"Add :meth:`Emoji.is_usable` to check if the client user can use an emoji. (:issue:`2349`)\"\nmsgstr \"クライアントユーザーが絵文字を使用できるかどうかを確認できるように、 :meth:`Emoji.is_usable` を追加しました。 (:issue:`2349`)\"\n\n#: ../../whats_new.rst:823\nmsgid \"Add :attr:`VoiceRegion.europe` and :attr:`VoiceRegion.dubai`. (:issue:`2358`, :issue:`2490`)\"\nmsgstr \":attr:`VoiceRegion.europe` と :attr:`VoiceRegion.dubai` を追加しました。 (:issue:`2358`, :issue:`2490`)\"\n\n#: ../../whats_new.rst:824\nmsgid \"Add :meth:`TextChannel.follow` to follow a news channel. (:issue:`2367`)\"\nmsgstr \"ニュースチャンネルをフォローする :meth:`TextChannel.follow` を追加しました。 (:issue:`2367`)\"\n\n#: ../../whats_new.rst:825\nmsgid \"Add :attr:`Permissions.view_guild_insights` permission. (:issue:`2415`)\"\nmsgstr \":attr:`Permissions.view_guild_insights` 権限を追加しました。 (:issue:`2415`)\"\n\n#: ../../whats_new.rst:827\nmsgid \"Add support for new audit log types. See :ref:`discord-api-audit-logs` for more information. (:issue:`2427`)\"\nmsgstr \"新しい監査ログタイプのサポートを追加しました。詳細については :ref:`discord-api-audit-logs` を参照してください。 (:issue:`2427`)\"\n\n#: ../../whats_new.rst:827\nmsgid \"Note that integration support is not finalized.\"\nmsgstr \"インテグレーションのサポートは未確定であることに注意してください。\"\n\n#: ../../whats_new.rst:829\nmsgid \"Add :attr:`Webhook.type` to query the type of webhook (:class:`WebhookType`). (:issue:`2441`)\"\nmsgstr \"ウェブフック( :class:`WebhookType` )の種類を問い合わせるための :attr:`Webhook.type` を追加しました。 (:issue:`2441`)\"\n\n#: ../../whats_new.rst:830\nmsgid \"Allow bulk editing of channel overwrites through :meth:`abc.GuildChannel.edit`. (:issue:`2198`)\"\nmsgstr \"チャンネル上書きの一括編集を :meth:`abc.GuildChannel.edit` を通して行えるようにしました。(:issue:`2198`)\"\n\n#: ../../whats_new.rst:831\nmsgid \"Add :class:`Activity.created_at` to see when an activity was started. (:issue:`2446`)\"\nmsgstr \"アクティビティがいつ開始されたかを確認するために :class:`Activity.created_at` を追加しました。(:issue:`2446`)\"\n\n#: ../../whats_new.rst:832\nmsgid \"Add support for ``xsalsa20_poly1305_lite`` encryption mode for voice. (:issue:`2463`)\"\nmsgstr \"音声用の ``xsalsa20_poly1305_lite`` 暗号化モードのサポートを追加しました。(:issue:`2463`)\"\n\n#: ../../whats_new.rst:833\nmsgid \"Add :attr:`RawReactionActionEvent.member` to get the member who did the reaction. (:issue:`2443`)\"\nmsgstr \"リアクションを行ったメンバーを取得するために :attr:`RawReactionActionEvent.member` を追加しました。(:issue:`2443`)\"\n\n#: ../../whats_new.rst:834\nmsgid \"Add support for new YouTube streaming via :attr:`Streaming.platform` and :attr:`Streaming.game`. (:issue:`2445`)\"\nmsgstr \":attr:`Streaming.platform` と :attr:`Streaming.game` による新しい YouTube ストリーミングのサポートを追加しました。(:issue:`2445`)\"\n\n#: ../../whats_new.rst:835\nmsgid \"Add :attr:`Guild.discovery_splash_url` to get the discovery splash image asset. (:issue:`2482`)\"\nmsgstr \"ディスカバリースプラッシュイメージアセットを取得するために :attr:`Guild.discovery_splash_url` を追加しました。(:issue:`2482`)\"\n\n#: ../../whats_new.rst:837\nmsgid \"Add :attr:`Guild.rules_channel` to get the rules channel of public guilds. (:issue:`2482`)\"\nmsgstr \"パブリック・ギルドのルール・チャンネルを取得するために :attr:`Guild.rules_channel` を追加しました。(:issue:`2482`)\"\n\n#: ../../whats_new.rst:837\nmsgid \"It should be noted that this feature is restricted to those who are either in Server Discovery or planning to be there.\"\nmsgstr \"なお、この機能はサーバーディスカバリーに参加されている方、または参加予定の方に限定しています。\"\n\n#: ../../whats_new.rst:839\nmsgid \"Add support for message flags via :attr:`Message.flags` and :class:`MessageFlags`. (:issue:`2433`)\"\nmsgstr \":attr:`Message.flags` と :class:`MessageFlags` によるメッセージフラグのサポートを追加しました。(:issue:`2433`)\"\n\n#: ../../whats_new.rst:840\nmsgid \"Add :attr:`User.system` and :attr:`Profile.system` to know whether a user is an official Discord Trust and Safety account.\"\nmsgstr \"ユーザーがDiscord Trust and Safetyの公式アカウントであるかどうかを知るために、 :attr:`User.system` と :attr:`Profile.system` を追加しました。\"\n\n#: ../../whats_new.rst:841\nmsgid \"Add :attr:`Profile.team_user` to check whether a user is a member of a team.\"\nmsgstr \"ユーザーがチームのメンバーであるかどうかを確認するために :attr:`Profile.team_user` を追加しました。\"\n\n#: ../../whats_new.rst:842\nmsgid \"Add :meth:`Attachment.to_file` to easily convert attachments to :class:`File` for sending.\"\nmsgstr \"添付ファイルを簡単に :class:`File` に変換して送信できるように :meth:`Attachment.to_file` を追加。\"\n\n#: ../../whats_new.rst:846\nmsgid \"Add certain aliases to :class:`Permissions` to match the UI better. (:issue:`2496`)\"\nmsgstr \"UIにマッチするように、特定のエイリアスを :class:`Permissions` に追加しました。(:issue:`2496`)\"\n\n#: ../../whats_new.rst:844\nmsgid \":attr:`Permissions.manage_permissions`\"\nmsgstr \":attr:`Permissions.manage_permissions`\"\n\n#: ../../whats_new.rst:845\nmsgid \":attr:`Permissions.view_channel`\"\nmsgstr \":attr:`Permissions.view_channel`\"\n\n#: ../../whats_new.rst:846\nmsgid \":attr:`Permissions.use_external_emojis`\"\nmsgstr \":attr:`Permissions.use_external_emojis`\"\n\n#: ../../whats_new.rst:848\nmsgid \"Add support for passing keyword arguments when creating :class:`Permissions`.\"\nmsgstr \":class:`Permissions` を作成する際に、キーワード引数を渡せるようになりました。\"\n\n#: ../../whats_new.rst:850\nmsgid \"Add support for custom activities via :class:`CustomActivity`. (:issue:`2400`)\"\nmsgstr \":class:`CustomActivity` によるカスタムアクティビティーのサポートを追加しました。(:issue:`2400`)\"\n\n#: ../../whats_new.rst:850\nmsgid \"Note that as of now, bots cannot send custom activities yet.\"\nmsgstr \"なお、現在のところ、ボットはまだカスタムアクティビティを送信できません。\"\n\n#: ../../whats_new.rst:852\nmsgid \"Add support for :func:`on_invite_create` and :func:`on_invite_delete` events.\"\nmsgstr \":func:`on_invite_create` と :func:`on_invite_delete` イベントのサポートを追加しました。\"\n\n#: ../../whats_new.rst:855\nmsgid \"Add support for clearing a specific reaction emoji from a message.\"\nmsgstr \"メッセージから特定のリアクション絵文字を消去する機能を追加しました。\"\n\n#: ../../whats_new.rst:854\nmsgid \":meth:`Message.clear_reaction` and :meth:`Reaction.clear` methods.\"\nmsgstr \":meth:`Message.clear_reaction` および :meth:`Reaction.clear` メソッドを使用します。\"\n\n#: ../../whats_new.rst:855\nmsgid \":func:`on_raw_reaction_clear_emoji` and :func:`on_reaction_clear_emoji` events.\"\nmsgstr \":func:`on_raw_reaction_clear_emoji` と :func:`on_reaction_clear_emoji` イベントです。\"\n\n#: ../../whats_new.rst:857\nmsgid \"Add :func:`utils.sleep_until` helper to sleep until a specific datetime. (:issue:`2517`, :issue:`2519`)\"\nmsgstr \"特定の日付までスリープさせる :func:`utils.sleep_until` ヘルパーを追加しました。(:issue:`2517`、:issue:`2519`)\"\n\n#: ../../whats_new.rst:858\nmsgid \"|commands| Add support for teams and :attr:`Bot.owner_ids <.ext.commands.Bot.owner_ids>` to have multiple bot owners. (:issue:`2239`)\"\nmsgstr \"|commands| チームと :attr:`Bot.owner_ids <.ext.commands.Bot.owner_ids>` が複数のボットオーナーを持つためのサポートを追加しました。(:issue:`2239`)\"\n\n#: ../../whats_new.rst:859\nmsgid \"|commands| Add new :attr:`BucketType.role <.ext.commands.BucketType.role>` bucket type. (:issue:`2201`)\"\nmsgstr \"|commands| 新しい :attr:`BucketType.role <.ext.commands.BucketType.role>` のバケットタイプを追加しました。(:issue:`2201`)です。\"\n\n#: ../../whats_new.rst:860\nmsgid \"|commands| Expose :attr:`Command.cog <.ext.commands.Command.cog>` property publicly. (:issue:`2360`)\"\nmsgstr \"|commands| :attr:`Command.cog <.ext.commands.Command.cog>` のプロパティを公開します。(:issue:`2360`)\"\n\n#: ../../whats_new.rst:861\nmsgid \"|commands| Add non-decorator interface for adding checks to commands via :meth:`Command.add_check <.ext.commands.Command.add_check>` and :meth:`Command.remove_check <.ext.commands.Command.remove_check>`. (:issue:`2411`)\"\nmsgstr \"|commands| :meth:`Command.add_check <.ext.commands.Command.add_check>` および :meth:`Command.remove_check <.ext.commands.Command.remove_check>` によりコマンドにチェックを追加する非デコレーターインターフェイスを追加しました。(:issue:`2411`)\"\n\n#: ../../whats_new.rst:862\nmsgid \"|commands| Add :func:`has_guild_permissions <.ext.commands.has_guild_permissions>` check. (:issue:`2460`)\"\nmsgstr \"|commands| :func:`has_guild_permissions <.ext.commands.has_guild_permissions>` のチェックを追加しました。(:issue:`2460`)\"\n\n#: ../../whats_new.rst:863\nmsgid \"|commands| Add :func:`bot_has_guild_permissions <.ext.commands.bot_has_guild_permissions>` check. (:issue:`2460`)\"\nmsgstr \"|commands| :func:`has_guild_permissions <.ext.commands.bot_has_guild_permissions>` のチェックを追加しました。(:issue:`2460`)\"\n\n#: ../../whats_new.rst:864\nmsgid \"|commands| Add ``predicate`` attribute to checks decorated with :func:`~.ext.commands.check`.\"\nmsgstr \"|commands| :func:`~.ext.commands.check` で装飾されたチェックに ``predicate`` 属性を追加しました。\"\n\n#: ../../whats_new.rst:865\nmsgid \"|commands| Add :func:`~.ext.commands.check_any` check to logical OR multiple checks.\"\nmsgstr \"|commands| :func:`~.ext.commands.check_any` チェックを論理的 OR 複数のチェックに追加しました。\"\n\n#: ../../whats_new.rst:866\nmsgid \"|commands| Add :func:`~.ext.commands.max_concurrency` to allow only a certain amount of users to use a command concurrently before waiting or erroring.\"\nmsgstr \"|commands| 待ち時間やエラーになる前に、ある一定のユーザーだけがコマンドを同時に使用できるようにするための :func:`~.ext.commands.max_concurrency` を追加しました。\"\n\n#: ../../whats_new.rst:867\nmsgid \"|commands| Add support for calling a :class:`~.ext.commands.Command` as a regular function.\"\nmsgstr \"|commands| :class:`~.ext.commands.Command` を通常の関数として呼び出すためのサポートを追加しました。\"\n\n#: ../../whats_new.rst:868\nmsgid \"|tasks| :meth:`Loop.add_exception_type <.ext.tasks.Loop.add_exception_type>` now allows multiple exceptions to be set. (:issue:`2333`)\"\nmsgstr \"|tasks| :meth:`Loop.add_exception_type <.ext.tasks.Loop.add_exception_type>` が、複数の例外を設定できるようになりました。(:issue:`2333`)\"\n\n#: ../../whats_new.rst:869\nmsgid \"|tasks| Add :attr:`Loop.next_iteration <.ext.tasks.Loop.next_iteration>` property. (:issue:`2305`)\"\nmsgstr \"|tasks| Add :attr:`Loop.next_iteration <.ext.tasks.Loop.next_iteration>` プロパティを追加しました。(:issue:`2305`)\"\n\n#: ../../whats_new.rst:874\nmsgid \"Fix issue with permission resolution sometimes failing for guilds with no owner.\"\nmsgstr \"所有者がいないギルドで権限解決に失敗することがある問題を修正しました。\"\n\n#: ../../whats_new.rst:875\nmsgid \"Tokens are now stripped upon use. (:issue:`2135`)\"\nmsgstr \"トークンは、使用時に剥奪されるようになりました。(:issue:`2135`)\"\n\n#: ../../whats_new.rst:876\nmsgid \"Passing in a ``name`` is no longer required for :meth:`Emoji.edit`. (:issue:`2368`)\"\nmsgstr \":meth:`Emoji.edit` に ``name`` を渡す必要はなくなりました。(:issue:`2368`)\"\n\n#: ../../whats_new.rst:877\nmsgid \"Fix issue with webhooks not re-raising after retries have run out. (:issue:`2272`, :issue:`2380`)\"\nmsgstr \"Webhooks がリトライを使い切った後に再レイズしない問題を修正しました。(:issue:`2272`, :issue:`2380`)\"\n\n#: ../../whats_new.rst:878\nmsgid \"Fix mismatch in URL handling in :func:`utils.escape_markdown`. (:issue:`2420`)\"\nmsgstr \":func:`utils.escape_markdown` のURLハンドリングにおけるミスマッチを修正しました。(:issue:`2420`)\"\n\n#: ../../whats_new.rst:879\nmsgid \"Fix issue with ports being read in little endian when they should be big endian in voice connections. (:issue:`2470`)\"\nmsgstr \"音声接続において、ビッグエンディアンであるべきポートがリトルエンディアンで読み込まれる問題を修正しました。(:issue:`2470`)\"\n\n#: ../../whats_new.rst:880\nmsgid \"Fix :meth:`Member.mentioned_in` not taking into consideration the message's guild.\"\nmsgstr \"メッセージのギルドが考慮されない :meth:`Member.mentioned_in` を修正しました。\"\n\n#: ../../whats_new.rst:881\nmsgid \"Fix bug with moving channels when there are gaps in positions due to channel deletion and creation.\"\nmsgstr \"チャンネルの削除と作成によりポジションにギャップがある場合、チャンネルを移動する不具合を修正。\"\n\n#: ../../whats_new.rst:882\nmsgid \"Fix :func:`on_shard_ready` not triggering when ``fetch_offline_members`` is disabled. (:issue:`2504`)\"\nmsgstr \"``fetch_offline_members`` が無効の場合、 :func:`on_shard_ready` が発火されない問題を修正しました。(:issue:`2504`)\"\n\n#: ../../whats_new.rst:883\nmsgid \"Fix issue with large sharded bots taking too long to actually dispatch :func:`on_ready`.\"\nmsgstr \"シャードを使用している大きなBotが :func:`on_ready` を実際に発火するのに長い時間を掛けていた問題を修正しました。\"\n\n#: ../../whats_new.rst:884\nmsgid \"Fix issue with fetching group DM based invites in :meth:`Client.fetch_invite`.\"\nmsgstr \":meth:`Client.fetch_invite` でグループDMベースの招待を取得する際の問題を修正しました。\"\n\n#: ../../whats_new.rst:885\nmsgid \"Fix out of order files being sent in webhooks when there are 10 files.\"\nmsgstr \"10つのファイルをWebhookで送信する際、ファイルの順序が狂う問題を修正しました。\"\n\n#: ../../whats_new.rst:886\nmsgid \"|commands| Extensions that fail internally due to ImportError will no longer raise :exc:`~.ext.commands.ExtensionNotFound`. (:issue:`2244`, :issue:`2275`, :issue:`2291`)\"\nmsgstr \"|commands| ImportErrorによって内部的に失敗する拡張機能は、 :exc:`~.ext.commands.ExtensionNotFound` を発生させなくなりました。(:issue:`2244`, :issue:`2275`, :issue:`2291`)\"\n\n#: ../../whats_new.rst:887\nmsgid \"|commands| Updating the :attr:`Paginator.suffix <.ext.commands.Paginator.suffix>` will not cause out of date calculations. (:issue:`2251`)\"\nmsgstr \"|commands| :attr:`Paginator.suffix <.ext.commands.Paginator.suffix>` を更新しても、計算が古くならないようにしました。(:issue:`2251`)\"\n\n#: ../../whats_new.rst:888\nmsgid \"|commands| Allow converters from custom extension packages. (:issue:`2369`, :issue:`2374`)\"\nmsgstr \"|commands| カスタム拡張パッケージからのコンバータを許可します。(:issue:`2369`, :issue:`2374`) のようになります。\"\n\n#: ../../whats_new.rst:889\nmsgid \"|commands| Fix issue with paginator prefix being ``None`` causing empty pages. (:issue:`2471`)\"\nmsgstr \"|commands| paginator のプレフィックスが ``None`` であるために空のページが発生する問題を修正しました。(:issue:`2471`)\"\n\n#: ../../whats_new.rst:890\nmsgid \"|commands| :class:`~.commands.Greedy` now ignores parsing errors rather than propagating them.\"\nmsgstr \"|commands| :class:`~.commands.Greedy` はパージングエラーを伝播するのではなく、無視するようになりました。\"\n\n#: ../../whats_new.rst:891\nmsgid \"|commands| :meth:`Command.can_run <.ext.commands.Command.can_run>` now checks whether a command is disabled.\"\nmsgstr \"|commands| :meth:`Command.can_run <.ext.commands.Command.can_run>` がコマンドが無効かどうかをチェックするようになりました。\"\n\n#: ../../whats_new.rst:892\nmsgid \"|commands| :attr:`HelpCommand.clean_prefix <.ext.commands.HelpCommand.clean_prefix>` now takes into consideration nickname mentions. (:issue:`2489`)\"\nmsgstr \"|commands| :attr:`HelpCommand.clean_prefix <.ext.commands.HelpCommand.clean_prefix>` がニックネームのメンションを考慮するようになりました。 (:issue:`2489`)\"\n\n#: ../../whats_new.rst:893\nmsgid \"|commands| :meth:`Context.send_help <.ext.commands.Context.send_help>` now properly propagates to the :meth:`HelpCommand.on_help_command_error <.ext.commands.HelpCommand.on_help_command_error>` handler.\"\nmsgstr \"|commands| :meth:`Context.send_help <.ext.commands.Context.send_help>` が :meth:`HelpCommand.on_help_command_error <.ext.commands.HelpCommand.on_help_command_error>` ハンドラに正しく伝播するようになりました。\"\n\n#: ../../whats_new.rst:898\nmsgid \"The library now fully supports Python 3.8 without warnings.\"\nmsgstr \"ライブラリは警告なしに Python 3.8 を完全にサポートするようになりました。\"\n\n#: ../../whats_new.rst:899\nmsgid \"Bump the dependency of ``websockets`` to 8.0 for those who can use it. (:issue:`2453`)\"\nmsgstr \"依存ライブラリ ``websockets`` のバージョンを 8.0 に上げました。(:issue:`2453`)\"\n\n#: ../../whats_new.rst:900\nmsgid \"Due to Discord providing :class:`Member` data in mentions, users will now be upgraded to :class:`Member` more often if mentioned.\"\nmsgstr \"Discordがメンションで :class:`Member` データを提供するようになったため、メンションされたユーザーが :class:`Member` により多くの機会でアップグレードされるようになりました。\"\n\n#: ../../whats_new.rst:901\nmsgid \":func:`utils.escape_markdown` now properly escapes new quote markdown.\"\nmsgstr \":func:`utils.escape_markdown` が新しい引用マークダウンを正しくエスケープするようになりました。\"\n\n#: ../../whats_new.rst:902\nmsgid \"The message cache can now be disabled by passing ``None`` to ``max_messages`` in :class:`Client`.\"\nmsgstr \"メッセージキャッシュを :class:`Client` の ``max_messages`` に ``None`` を渡すことで無効にできるようになりました。\"\n\n#: ../../whats_new.rst:903\nmsgid \"The default message cache size has changed from 5000 to 1000 to accommodate small bots.\"\nmsgstr \"デフォルトのメッセージキャッシュサイズは、小さなボットに対応するために5000から1000に変更されました。\"\n\n#: ../../whats_new.rst:904\nmsgid \"Lower memory usage by only creating certain objects as needed in :class:`Role`.\"\nmsgstr \":class:`Role` にて、必要な場合のみ特定のオブジェクトを作成することによりメモリ使用量を削減しました。\"\n\n#: ../../whats_new.rst:905\nmsgid \"There is now a sleep of 5 seconds before re-IDENTIFYing during a reconnect to prevent long loops of session invalidation.\"\nmsgstr \"セッションの無効化の長いループを防ぐために、再接続中に再度IDENTIFYする前に5秒間待つようになりました。\"\n\n#: ../../whats_new.rst:907\nmsgid \"The rate limiting code now uses millisecond precision to have more granular rate limit handling.\"\nmsgstr \"レート制限コードは、より細かいレート制限処理を行うためにミリ秒の精度を使用するようになりました。\"\n\n#: ../../whats_new.rst:907\nmsgid \"Along with that, the rate limiting code now uses Discord's response to wait. If you need to use the system clock again for whatever reason, consider passing ``assume_synced_clock`` in :class:`Client`.\"\nmsgstr \"それに伴い、レート制限コードはDiscordのレスポンスを使用して待つようになりました。 何らかの理由でシステムクロックを使用する必要がある場合は、 :class:`Client` で ``assume_synced_clock`` を渡すことを検討してください。\"\n\n#: ../../whats_new.rst:909\nmsgid \"The performance of :attr:`Guild.default_role` has been improved from O(N) to O(1). (:issue:`2375`)\"\nmsgstr \":attr:`Guild.default_role` のパフォーマンスが O(N) から O(1) に改善されました。 (:issue:`2375`)\"\n\n#: ../../whats_new.rst:910\nmsgid \"The performance of :attr:`Member.roles` has improved due to usage of caching to avoid surprising performance traps.\"\nmsgstr \"予期しないパフォーマンストラップを避けるために、キャッシュを使用して :attr:`Member.roles` のパフォーマンスを改善しました。\"\n\n#: ../../whats_new.rst:911\nmsgid \"The GC is manually triggered during things that cause large deallocations (such as guild removal) to prevent memory fragmentation.\"\nmsgstr \"メモリの断片化を防ぐため、大規模なメモリの割り当て解除 (ギルドの除去など) が引き起こされた後に手動でガベージコレクションを行うようになりました。\"\n\n#: ../../whats_new.rst:912\nmsgid \"There have been many changes to the documentation for fixes both for usability, correctness, and to fix some linter errors. Thanks to everyone who contributed to those.\"\nmsgstr \"ユーザビリティや正確性を向上させ、リンターエラーを修正するため、ドキュメントに多くの変更がありました。 貢献したすべての人に感謝します。\"\n\n#: ../../whats_new.rst:913\nmsgid \"The loading of the opus module has been delayed which would make the result of :func:`opus.is_loaded` somewhat surprising.\"\nmsgstr \"opus モジュールの読み込みを遅延させるようにしました。このため :func:`opus.is_loaded` の結果が予想しないものになるかもしれません。\"\n\n#: ../../whats_new.rst:914\nmsgid \"|commands| Usernames prefixed with @ inside DMs will properly convert using the :class:`User` converter. (:issue:`2498`)\"\nmsgstr \"|commands| DM内の@で始まるユーザー名が、 :class:`User` コンバータを使用したとき正しく変換されるようになりました。 (:issue:`2498`)\"\n\n#: ../../whats_new.rst:915\nmsgid \"|tasks| The task sleeping time will now take into consideration the amount of time the task body has taken before sleeping. (:issue:`2516`)\"\nmsgstr \"|tasks| タスクの待ち時間が、タスク本体が実行するのにかかった時間を考慮に入れるようになりました。 (:issue:`2516`)\"\n\n#: ../../whats_new.rst:920\nmsgid \"v1.2.5\"\nmsgstr \"v1.2.5\"\n\n#: ../../whats_new.rst:925\nmsgid \"Fix a bug that caused crashes due to missing ``animated`` field in Emoji structures in reactions.\"\nmsgstr \"絵文字構造の ``animated`` フィールドが存在しないとしてクラッシュするバグを修正しました。\"\n\n#: ../../whats_new.rst:930\nmsgid \"v1.2.4\"\nmsgstr \"v1.2.4\"\n\n#: ../../whats_new.rst:935\nmsgid \"Fix a regression when :attr:`Message.channel` would be ``None``.\"\nmsgstr \":attr:`Message.channel` が ``None`` になるリグレッションを修正しました。\"\n\n#: ../../whats_new.rst:936\nmsgid \"Fix a regression where :attr:`Message.edited_at` would not update during edits.\"\nmsgstr \":attr:`Message.edited_at` が編集中に更新されないリグレッションを修正しました。\"\n\n#: ../../whats_new.rst:937\nmsgid \"Fix a crash that would trigger during message updates (:issue:`2265`, :issue:`2287`).\"\nmsgstr \"メッセージの更新中に引き起こされるクラッシュを修正しました。(:issue:`2265`, :issue:`2287`)\"\n\n#: ../../whats_new.rst:938\nmsgid \"Fix a bug when :meth:`VoiceChannel.connect` would not return (:issue:`2274`, :issue:`2372`, :issue:`2373`, :issue:`2377`).\"\nmsgstr \":meth:`VoiceChannel.connect` が応答しないバグを修正しました。（:issue:`2274`、 :issue:`2372`、 :issue:`2373`、 :issue:`2377`）\"\n\n#: ../../whats_new.rst:939\nmsgid \"Fix a crash relating to token-less webhooks (:issue:`2364`).\"\nmsgstr \"トークンのないWebhookに関するクラッシュを修正しました。(:issue:`2364`)\"\n\n#: ../../whats_new.rst:940\nmsgid \"Fix issue where :attr:`Guild.premium_subscription_count` would be ``None`` due to a Discord bug. (:issue:`2331`, :issue:`2376`).\"\nmsgstr \"Discord バグにより :attr:`Guild.premium_subscription_count` が ``None`` になる問題を修正しました。(:issue:`2331`, :issue:`2376`)\"\n\n#: ../../whats_new.rst:945\nmsgid \"v1.2.3\"\nmsgstr \"v1.2.3\"\n\n#: ../../whats_new.rst:950\nmsgid \"Fix an AttributeError when accessing :attr:`Member.premium_since` in :func:`on_member_update`. (:issue:`2213`)\"\nmsgstr \":func:`on_member_update` で :attr:`Member.premium_since` にアクセスした際の AttributeError を修正しました。 (:issue:`2213`)\"\n\n#: ../../whats_new.rst:951\nmsgid \"Handle :exc:`asyncio.CancelledError` in :meth:`abc.Messageable.typing` context manager. (:issue:`2218`)\"\nmsgstr \":meth:`abc.Messageable.typing` コンテキストマネージャでの :exc:`asyncio.CanceledError` を処理するようにしました。 (:issue:`2218`)\"\n\n#: ../../whats_new.rst:952\nmsgid \"Raise the max encoder bitrate to 512kbps to account for nitro boosting. (:issue:`2232`)\"\nmsgstr \"ニトロブーストを考慮し、最大エンコーダビットレートを512kbpsに引き上げ。 (:issue:`2232`)\"\n\n#: ../../whats_new.rst:953\nmsgid \"Properly propagate exceptions in :meth:`Client.run`. (:issue:`2237`)\"\nmsgstr \":meth:`Client.run` にて例外を適切に伝播するようにしました。(:issue:`2237`)\"\n\n#: ../../whats_new.rst:954\nmsgid \"|commands| Ensure cooldowns are properly copied when used in cog level ``command_attrs``.\"\nmsgstr \"|commands| コグレベル ``command_attrs`` で使用されるクールダウンが正しくコピーされるようにしました。\"\n\n#: ../../whats_new.rst:959\nmsgid \"v1.2.2\"\nmsgstr \"v1.2.2\"\n\n#: ../../whats_new.rst:964\nmsgid \"Audit log related attribute access have been fixed to not error out when they shouldn't have.\"\nmsgstr \"監査ログ関連の属性アクセスは、本来すべきでないときにエラーを起こさないよう修正されました。\"\n\n#: ../../whats_new.rst:969\nmsgid \"v1.2.1\"\nmsgstr \"v1.2.1\"\n\n#: ../../whats_new.rst:974\nmsgid \":attr:`User.avatar_url` and related attributes no longer raise an error.\"\nmsgstr \":attr:`User.avatar_url` と関連する属性がエラーを引き起こさないように修正しました。\"\n\n#: ../../whats_new.rst:975\nmsgid \"More compatibility shims with the ``enum.Enum`` code.\"\nmsgstr \"``enum.Enum`` コードの互換性が向上しました。\"\n\n#: ../../whats_new.rst:980\nmsgid \"v1.2.0\"\nmsgstr \"v1.2.0\"\n\n#: ../../whats_new.rst:982\nmsgid \"This update mainly brings performance improvements and various nitro boosting attributes (referred to in the API as \\\"premium guilds\\\").\"\nmsgstr \"今回のアップデートでは、主にパフォーマンスの向上と、さまざまなニトロブースト属性(APIでは「プレミアムギルド」と呼ばれます) が追加されました。\"\n\n#: ../../whats_new.rst:987\nmsgid \"Add :attr:`Guild.premium_tier` to query the guild's current nitro boost level.\"\nmsgstr \":attr:`Guild.premium_tier` で、ギルドの現在のニトロブーストレベルが取得できます。\"\n\n#: ../../whats_new.rst:988\nmsgid \"Add :attr:`Guild.emoji_limit`, :attr:`Guild.bitrate_limit`, :attr:`Guild.filesize_limit` to query the new limits of a guild when taking into consideration boosting.\"\nmsgstr \"ブーストを考慮してギルドの新しい制限を取得する :attr:`Guild.emoji_limit` 、 :attr:`Guild.bitrate_limit` 、 :attr:`Guild.filesize_limit` を追加しました。\"\n\n#: ../../whats_new.rst:989\nmsgid \"Add :attr:`Guild.premium_subscription_count` to query how many members are boosting a guild.\"\nmsgstr \"ギルドをブーストしているメンバー数を取得する :attr:`Guild.premium_subscription_count` を追加しました。\"\n\n#: ../../whats_new.rst:990\nmsgid \"Add :attr:`Member.premium_since` to query since when a member has boosted a guild.\"\nmsgstr \"メンバーがギルドをブーストし始めた日時を取得する :attr:`Member.premium_since` を追加しました。\"\n\n#: ../../whats_new.rst:991\nmsgid \"Add :attr:`Guild.premium_subscribers` to query all the members currently boosting the guild.\"\nmsgstr \"現在ギルドをブーストしているメンバーをすべて取得する :attr:`Guild.premium_subscribers` を追加しました。\"\n\n#: ../../whats_new.rst:992\nmsgid \"Add :attr:`Guild.system_channel_flags` to query the settings for a guild's :attr:`Guild.system_channel`.\"\nmsgstr \"ギルドの :attr:`Guild.system_channel` の設定を取得する :attr:`Guild.system_channel_flags` を追加しました。\"\n\n#: ../../whats_new.rst:993\nmsgid \"This includes a new type named :class:`SystemChannelFlags`\"\nmsgstr \":class:`SystemChannelFlags` という新しい型も含まれます。\"\n\n#: ../../whats_new.rst:994\nmsgid \"Add :attr:`Emoji.available` to query if an emoji can be used (within the guild or otherwise).\"\nmsgstr \"絵文字が(ギルド内またはそれ以外で)利用できるかを確認する :attr:`Emoji.available` を追加しました。\"\n\n#: ../../whats_new.rst:995\nmsgid \"Add support for animated icons in :meth:`Guild.icon_url_as` and :attr:`Guild.icon_url`.\"\nmsgstr \":meth:`Guild.icon_url_as` と :attr:`Guild.icon_url` にアニメーションアイコンのサポートを追加しました。\"\n\n#: ../../whats_new.rst:996\nmsgid \"Add :meth:`Guild.is_icon_animated`.\"\nmsgstr \":meth:`Guild.is_icon_animated` を追加しました。\"\n\n#: ../../whats_new.rst:997\nmsgid \"Add support for the various new :class:`MessageType` involving nitro boosting.\"\nmsgstr \"ニトロブーストに関する様々な新しい :class:`MessageType` のサポートを追加しました。\"\n\n#: ../../whats_new.rst:998\nmsgid \"Add :attr:`VoiceRegion.india`. (:issue:`2145`)\"\nmsgstr \":attr:`VoiceRegion.india` を追加しました。 (:issue:`2145`)\"\n\n#: ../../whats_new.rst:999\nmsgid \"Add :meth:`Embed.insert_field_at`. (:issue:`2178`)\"\nmsgstr \":meth:`Embed.insert_field_at` を追加しました。 (:issue:`2178`)\"\n\n#: ../../whats_new.rst:1000\nmsgid \"Add a ``type`` attribute for all channels to their appropriate :class:`ChannelType`. (:issue:`2185`)\"\nmsgstr \"すべてのチャンネルに対し、適切な :class:`ChannelType` を返す ``type`` 属性を追加しました。 (:issue:`2185` )\"\n\n#: ../../whats_new.rst:1001\nmsgid \"Add :meth:`Client.fetch_channel` to fetch a channel by ID via HTTP. (:issue:`2169`)\"\nmsgstr \"HTTP経由でチャンネルをIDにより取得する、 :meth:`Client.fetch_channel` を追加しました。(:issue:`2169`)\"\n\n#: ../../whats_new.rst:1002\nmsgid \"Add :meth:`Guild.fetch_channels` to fetch all channels via HTTP. (:issue:`2169`)\"\nmsgstr \"HTTP経由でチャンネルをすべて取得する、 :meth:`Guild.fetch_channels` を追加しました。(:issue:`2169`)\"\n\n#: ../../whats_new.rst:1003\nmsgid \"|tasks| Add :meth:`Loop.stop <.ext.tasks.Loop.stop>` to gracefully stop a task rather than cancelling.\"\nmsgstr \"|tasks| タスクをキャンセルするのではなく、現在のタスクが終了後に停止させる :meth:`Loop.stop <.ext.tasks.Loop.stop>` を追加しました。\"\n\n#: ../../whats_new.rst:1004\nmsgid \"|tasks| Add :meth:`Loop.failed <.ext.tasks.Loop.failed>` to query if a task had failed somehow.\"\nmsgstr \"|tasks| タスクが何らかの理由で失敗したかを調べる :meth:`Loop.failed <.ext.tasks.Loop.failed>` を追加しました。\"\n\n#: ../../whats_new.rst:1005\nmsgid \"|tasks| Add :meth:`Loop.change_interval <.ext.tasks.Loop.change_interval>` to change the sleep interval at runtime (:issue:`2158`, :issue:`2162`)\"\nmsgstr \"|tasks| 実行時に待機時間を変更できる :meth:`Loop.change_interval <.ext.tasks.Loop.change_interval>` を追加しました。(:issue:`2158`, :issue:`2162`)\"\n\n#: ../../whats_new.rst:1010\nmsgid \"Fix internal error when using :meth:`Guild.prune_members`.\"\nmsgstr \":meth:`Guild.prune_members` を使用した場合の内部エラーを修正しました。\"\n\n#: ../../whats_new.rst:1011\nmsgid \"|commands| Fix :attr:`.Command.invoked_subcommand` being invalid in many cases.\"\nmsgstr \"|commands| 多くの場合において :attr:`.Command.invoked_subcommand` が誤っているのを修正しました。\"\n\n#: ../../whats_new.rst:1012\nmsgid \"|tasks| Reset iteration count when the loop terminates and is restarted.\"\nmsgstr \"|tasks| ループが終了し、再起動されたときに反復回数をリセットするようにしました。\"\n\n#: ../../whats_new.rst:1013\nmsgid \"|tasks| The decorator interface now works as expected when stacking (:issue:`2154`)\"\nmsgstr \"|tasks| デコレータインターフェースをスタックした時に期待通り動作するようになりました。 (:issue:`2154`)\"\n\n#: ../../whats_new.rst:1019\nmsgid \"Improve performance of all Enum related code significantly.\"\nmsgstr \"列挙型に関連するすべてのコードのパフォーマンスを大幅に向上させました。\"\n\n#: ../../whats_new.rst:1019\nmsgid \"This was done by replacing the ``enum.Enum`` code with an API compatible one.\"\nmsgstr \"これは、 ``enum.Enum`` コードを API 互換のコードに置き換えることによって行われました。\"\n\n#: ../../whats_new.rst:1020\nmsgid \"This should not be a breaking change for most users due to duck-typing.\"\nmsgstr \"ダックタイピングを使用しているため、ほとんどのユーザーにとっては破壊的変更ではありません。\"\n\n#: ../../whats_new.rst:1021\nmsgid \"Improve performance of message creation by about 1.5x.\"\nmsgstr \"メッセージ作成のパフォーマンスを約1.5倍向上させました。\"\n\n#: ../../whats_new.rst:1022\nmsgid \"Improve performance of message editing by about 1.5-4x depending on payload size.\"\nmsgstr \"メッセージ編集のパフォーマンスが約1.5~4倍向上しました。（内容のサイズに依存します）\"\n\n#: ../../whats_new.rst:1023\nmsgid \"Improve performance of attribute access on :class:`Member` about by 2x.\"\nmsgstr \":class:`Member` の属性へのアクセスのパフォーマンスが2倍向上しました。\"\n\n#: ../../whats_new.rst:1024\nmsgid \"Improve performance of :func:`utils.get` by around 4-6x depending on usage.\"\nmsgstr \":func:`utils.get` のパフォーマンスを、使用状況に応じて約 4-6倍 向上させました。\"\n\n#: ../../whats_new.rst:1025\nmsgid \"Improve performance of event parsing lookup by around 2.5x.\"\nmsgstr \"イベント解析中のルックアップのパフォーマンスを約2.5倍向上させました。\"\n\n#: ../../whats_new.rst:1026\nmsgid \"Keyword arguments in :meth:`Client.start` and :meth:`Client.run` are now validated (:issue:`953`, :issue:`2170`)\"\nmsgstr \":meth:`Client.start` と :meth:`Client.run` のキーワード引数を検証するようにしました。 (:issue:`953`, :issue:`2170`)\"\n\n#: ../../whats_new.rst:1027\nmsgid \"The Discord error code is now shown in the exception message for :exc:`HTTPException`.\"\nmsgstr \":exc:`HTTPException` の例外メッセージにDiscordのエラーコードが表示されるようになりました。\"\n\n#: ../../whats_new.rst:1028\nmsgid \"Internal tasks launched by the library will now have their own custom ``__repr__``.\"\nmsgstr \"ライブラリによって実行された内部タスクに独自のカスタム ``__repr__`` を追加しました。\"\n\n#: ../../whats_new.rst:1029\nmsgid \"All public facing types should now have a proper and more detailed ``__repr__``.\"\nmsgstr \"すべての公開された型に、適切でより詳細な ``__repr__`` を追加しました。\"\n\n#: ../../whats_new.rst:1030\nmsgid \"|tasks| Errors are now logged via the standard :mod:`py:logging` module.\"\nmsgstr \"|tasks| 標準の :mod:`py:logging` モジュールを介してエラーが記録されるようになりました。\"\n\n#: ../../whats_new.rst:1035\nmsgid \"v1.1.1\"\nmsgstr \"v1.1.1\"\n\n#: ../../whats_new.rst:1040\nmsgid \"Webhooks do not overwrite data on retrying their HTTP requests (:issue:`2140`)\"\nmsgstr \"WebhookがHTTPリクエストを再試行する時にデータを上書きしないようにしました。 (:issue:`2140`)\"\n\n#: ../../whats_new.rst:1045\nmsgid \"Add back signal handling to :meth:`Client.run` due to issues some users had with proper cleanup.\"\nmsgstr \"一部のユーザーが適切なクリーンアップを行うときに問題が生じていたため、 :meth:`Client.run` にシグナル処理を再度追加しました。\"\n\n#: ../../whats_new.rst:1050\nmsgid \"v1.1.0\"\nmsgstr \"v1.1.0\"\n\n#: ../../whats_new.rst:1055\nmsgid \"**There is a new extension dedicated to making background tasks easier.**\"\nmsgstr \"**バックグラウンドタスクを簡単にするための新しい拡張機能が追加されました。**\"\n\n#: ../../whats_new.rst:1056\nmsgid \"You can check the documentation here: :ref:`ext_tasks_api`.\"\nmsgstr \"使い方の説明は、 :ref:`ext_tasks_api` で確認できます。\"\n\n#: ../../whats_new.rst:1057\nmsgid \"Add :attr:`Permissions.stream` permission. (:issue:`2077`)\"\nmsgstr \":attr:`Permissions.stream` 権限を追加しました。 (:issue:`2077`)\"\n\n#: ../../whats_new.rst:1058\nmsgid \"Add equality comparison and hash support to :class:`Asset`\"\nmsgstr \":class:`Asset` に等価比較とハッシュサポートを追加しました。\"\n\n#: ../../whats_new.rst:1059\nmsgid \"Add ``compute_prune_members`` parameter to :meth:`Guild.prune_members` (:issue:`2085`)\"\nmsgstr \":meth:`Guild.prune_members` に ``compute_prune_members`` パラメータを追加しました。 (:issue:`2085`)\"\n\n#: ../../whats_new.rst:1060\nmsgid \"Add :attr:`Client.cached_messages` attribute to fetch the message cache (:issue:`2086`)\"\nmsgstr \"メッセージキャッシュを取得する :attr:`Client.cached_messages` 属性を追加しました。 (:issue:`2086`)\"\n\n#: ../../whats_new.rst:1061\nmsgid \"Add :meth:`abc.GuildChannel.clone` to clone a guild channel. (:issue:`2093`)\"\nmsgstr \"ギルドのチャンネルをコピーする :meth:`abc.GuildChannel.clone` メソッドが追加されました。（ :issue:`2093` )\"\n\n#: ../../whats_new.rst:1062\nmsgid \"Add ``delay`` keyword-only argument to :meth:`Message.delete` (:issue:`2094`)\"\nmsgstr \":meth:`Message.delete` にキーワード限定引数 ``delay`` が追加されました。（ :issue:`2094` ）\"\n\n#: ../../whats_new.rst:1063\nmsgid \"Add support for ``<:name:id>`` when adding reactions (:issue:`2095`)\"\nmsgstr \"``<:name:id>`` のフォーマットでリアクションを追加できるようになりました。（ :issue:`2095` ）\"\n\n#: ../../whats_new.rst:1064\nmsgid \"Add :meth:`Asset.read` to fetch the bytes content of an asset (:issue:`2107`)\"\nmsgstr \"アセットを ``bytes`` オブジェクトとして取得する :meth:`Asset.read` メソッドが追加されました（ :issue:`2107` ）\"\n\n#: ../../whats_new.rst:1065\nmsgid \"Add :meth:`Attachment.read` to fetch the bytes content of an attachment (:issue:`2118`)\"\nmsgstr \"添付ファイルを ``bytes`` オブジェクトとして取得する :meth:`Attachment.read` メソッドが追加されました（ :issue:`2118` ）\"\n\n#: ../../whats_new.rst:1066\nmsgid \"Add support for voice kicking by passing ``None`` to :meth:`Member.move_to`.\"\nmsgstr \":meth:`Member.move_to` に ``None`` を渡すことでボイスチャンネルから強制切断できるようになりました。\"\n\n#: ../../whats_new.rst:1069\n#: ../../whats_new.rst:1090\n#: ../../whats_new.rst:1109\nmsgid \"``discord.ext.commands``\"\nmsgstr \"``discord.ext.commands``\"\n\n#: ../../whats_new.rst:1071\nmsgid \"Add new :func:`~.commands.dm_only` check.\"\nmsgstr \":func:`~.commands.dm_only` チェックが追加されました。\"\n\n#: ../../whats_new.rst:1072\nmsgid \"Support callable converters in :data:`~.commands.Greedy`\"\nmsgstr \"呼び出し可能オブジェクトのコンバーターを :data:`~.commands.Greedy` で使えるようになりました。\"\n\n#: ../../whats_new.rst:1073\nmsgid \"Add new :class:`~.commands.MessageConverter`.\"\nmsgstr \":class:`~.commands.MessageConverter` が追加されました。\"\n\n#: ../../whats_new.rst:1074\nmsgid \"This allows you to use :class:`Message` as a type hint in functions.\"\nmsgstr \"これにより、 :class:`Message` を関数の型ヒントで使えるようになりました。\"\n\n#: ../../whats_new.rst:1075\nmsgid \"Allow passing ``cls`` in the :func:`~.commands.group` decorator (:issue:`2061`)\"\nmsgstr \":func:`~.commands.group` に ``cls`` を渡せるようになりました（ :issue:`2061` ）\"\n\n#: ../../whats_new.rst:1076\nmsgid \"Add :attr:`.Command.parents` to fetch the parents of a command (:issue:`2104`)\"\nmsgstr \"親コマンドを取得する :attr:`.Command.parents` が追加されました。（ :issue:`2104` ）\"\n\n#: ../../whats_new.rst:1082\nmsgid \"Fix :exc:`AttributeError` when using ``__repr__`` on :class:`Widget`.\"\nmsgstr \":class:`Widget` の ``__repr__`` で :exc:`AttributeError` が発生するバグを修正しました。\"\n\n#: ../../whats_new.rst:1083\nmsgid \"Fix issue with :attr:`abc.GuildChannel.overwrites` returning ``None`` for keys.\"\nmsgstr \":attr:`abc.GuildChannel.overwrites` のキーが ``None`` になるバグを修正しました。\"\n\n#: ../../whats_new.rst:1084\nmsgid \"Remove incorrect legacy NSFW checks in e.g. :meth:`TextChannel.is_nsfw`.\"\nmsgstr \":meth:`TextChannel.is_nsfw` 等でのNSFWのチェックを修正しました。\"\n\n#: ../../whats_new.rst:1085\nmsgid \"Fix :exc:`UnboundLocalError` when :class:`RequestsWebhookAdapter` raises an error.\"\nmsgstr \":class:`RequestsWebhookAdapter` でエラーが発生したときの :exc:`UnboundLocalError` を修正しました。\"\n\n#: ../../whats_new.rst:1086\nmsgid \"Fix bug where updating your own user did not update your member instances.\"\nmsgstr \"ボットのユーザーをアップデートしてもメンバーオブジェクトが更新されないバグを修正しました。\"\n\n#: ../../whats_new.rst:1087\nmsgid \"Tighten constraints of ``__eq__`` in :class:`Spotify` objects (:issue:`2113`, :issue:`2117`)\"\nmsgstr \":class:`Spotify` の ``__eq__`` の条件を厳しくしました。（ :issue:`2113`, :issue:`2117` ）\"\n\n#: ../../whats_new.rst:1092\nmsgid \"Fix lambda converters in a non-module context (e.g. ``eval``).\"\nmsgstr \"モジュール以外での無名コンバーターを修正しました。（例： ``eval`` ）\"\n\n#: ../../whats_new.rst:1093\nmsgid \"Use message creation time for reference time when computing cooldowns.\"\nmsgstr \"クールダウンの計算にメッセージの作成時間を使用するようになりました。\"\n\n#: ../../whats_new.rst:1094\nmsgid \"This prevents cooldowns from triggering during e.g. a RESUME session.\"\nmsgstr \"これにより、RESUME中でのクールダウンの挙動が修正されました。\"\n\n#: ../../whats_new.rst:1095\nmsgid \"Fix the default :func:`on_command_error` to work with new-style cogs (:issue:`2094`)\"\nmsgstr \"新しいスタイルのコグのため、 :func:`on_command_error` のデフォルトの挙動を修正しました。（ :issue:`2094` ）\"\n\n#: ../../whats_new.rst:1096\nmsgid \"DM channels are now recognised as NSFW in :func:`~.commands.is_nsfw` check.\"\nmsgstr \"DMチャンネルが :func:`~.commands.is_nsfw` に認識されるようになりました。\"\n\n#: ../../whats_new.rst:1097\nmsgid \"Fix race condition with help commands (:issue:`2123`)\"\nmsgstr \"ヘルプコマンドの競合状態を修正しました。 (:issue:`2123`)\"\n\n#: ../../whats_new.rst:1098\nmsgid \"Fix cog descriptions not showing in :class:`~.commands.MinimalHelpCommand` (:issue:`2139`)\"\nmsgstr \":class:`~.commands.MinimalHelpCommand` にコグの説明が表示されるようになりました。（ :issue:`2139` ）\"\n\n#: ../../whats_new.rst:1103\nmsgid \"Improve the performance of internal enum creation in the library by about 5x.\"\nmsgstr \"ライブラリ内での列挙型の作成が約5倍早くなりました。\"\n\n#: ../../whats_new.rst:1104\nmsgid \"Make the output of ``python -m discord --version`` a bit more useful.\"\nmsgstr \"``python -m discord --version`` の出力を改善しました。\"\n\n#: ../../whats_new.rst:1105\nmsgid \"The loop cleanup facility has been rewritten again.\"\nmsgstr \"ループのクリーンアップがまた書き直されました。\"\n\n#: ../../whats_new.rst:1106\nmsgid \"The signal handling in :meth:`Client.run` has been removed.\"\nmsgstr \":meth:`Client.run` でのシグナル制御が削除されました。\"\n\n#: ../../whats_new.rst:1111\nmsgid \"Custom exception classes are now used for all default checks in the library (:issue:`2101`)\"\nmsgstr \"ライブラリ内の全てのチェックがカスタム例外クラスを使うようになりました（ :issue:`2101` ）\"\n\n#: ../../whats_new.rst:1117\nmsgid \"v1.0.1\"\nmsgstr \"v1.0.1\"\n\n#: ../../whats_new.rst:1122\nmsgid \"Fix issue with speaking state being cast to ``int`` when it was invalid.\"\nmsgstr \"スピーキング状態が無効なときに ``int`` にキャストした場合に発生する問題を修正しました。\"\n\n#: ../../whats_new.rst:1123\nmsgid \"Fix some issues with loop cleanup that some users experienced on Linux machines.\"\nmsgstr \"一部のユーザーがLinuxマシンで遭遇したループクリーンアップに関する問題を修正しました。\"\n\n#: ../../whats_new.rst:1124\nmsgid \"Fix voice handshake race condition (:issue:`2056`, :issue:`2063`)\"\nmsgstr \"ボイスハンドシェイクの競合状態を修正しました。 (:issue:`2056`, :issue:`2063`)\"\n\n#: ../../whats_new.rst:1129\nmsgid \"v1.0.0\"\nmsgstr \"v1.0.0\"\n\n#: ../../whats_new.rst:1131\nmsgid \"The changeset for this version are too big to be listed here, for more information please see :ref:`the migrating page <migrating_1_0>`.\"\nmsgstr \"このバージョンの変更は大きすぎるため、この場所に収まりきりません。詳細については :ref:`移行についてのページ <migrating_1_0>` を参照してください。\"\n\n#: ../../whats_new.rst:1138\nmsgid \"v0.16.6\"\nmsgstr \"v0.16.6\"\n\n#: ../../whats_new.rst:1143\nmsgid \"Fix issue with :meth:`Client.create_server` that made it stop working.\"\nmsgstr \":meth:`Client.create_server` によって動作が停止する問題を修正しました。\"\n\n#: ../../whats_new.rst:1144\nmsgid \"Fix main thread being blocked upon calling ``StreamPlayer.stop``.\"\nmsgstr \"``StreamPlayer.stop`` の呼び出し時にメインスレッドがブロックされるのを修正しました。\"\n\n#: ../../whats_new.rst:1145\nmsgid \"Handle HEARTBEAT_ACK and resume gracefully when it occurs.\"\nmsgstr \"HEARTBEAT_ACKを処理し、正常に再開します。\"\n\n#: ../../whats_new.rst:1146\nmsgid \"Fix race condition when pre-emptively rate limiting that caused releasing an already released lock.\"\nmsgstr \"既に開放されているロックを解放しようとする原因になっていた先制的なレート制限を行っている時の競合状態を修正しました。\"\n\n#: ../../whats_new.rst:1147\nmsgid \"Fix invalid state errors when immediately cancelling a coroutine.\"\nmsgstr \"コルーチンを直ちにキャンセルするときに無効な状態になるエラーを修正しました。\"\n\n#: ../../whats_new.rst:1152\nmsgid \"v0.16.1\"\nmsgstr \"v0.16.1\"\n\n#: ../../whats_new.rst:1154\nmsgid \"This release is just a bug fix release with some better rate limit implementation.\"\nmsgstr \"このリリースはバグ修正であり、いくつかのレート制限の実装が改善されています。\"\n\n#: ../../whats_new.rst:1159\nmsgid \"Servers are now properly chunked for user bots.\"\nmsgstr \"ユーザーボットがサーバーを適切にチャンクするようにしました。\"\n\n#: ../../whats_new.rst:1160\nmsgid \"The CDN URL is now used instead of the API URL for assets.\"\nmsgstr \"アセットのAPI URLの代わりにCDN URLが使用されるようになりました。\"\n\n#: ../../whats_new.rst:1161\nmsgid \"Rate limit implementation now tries to use header information if possible.\"\nmsgstr \"レート制限の実装が可能な場合ヘッダ情報を利用するようにしました。\"\n\n#: ../../whats_new.rst:1162\nmsgid \"Event loop is now properly propagated (:issue:`420`)\"\nmsgstr \"イベントループが正しく伝播するようにしました。 (:issue:`420`)\"\n\n#: ../../whats_new.rst:1163\nmsgid \"Allow falsey values in :meth:`Client.send_message` and :meth:`Client.send_file`.\"\nmsgstr \":meth:`Client.send_message` と :meth:`Client.send_file` でFalseに変換される値を利用できるようにしました。\"\n\n#: ../../whats_new.rst:1168\nmsgid \"v0.16.0\"\nmsgstr \"v0.16.0\"\n\n#: ../../whats_new.rst:1173\nmsgid \"Add :attr:`Channel.overwrites` to get all the permission overwrites of a channel.\"\nmsgstr \"チャンネルの権限上書きをすべて取得する :attr:`Channel.overwrites` を追加しました。\"\n\n#: ../../whats_new.rst:1174\nmsgid \"Add :attr:`Server.features` to get information about partnered servers.\"\nmsgstr \"パートナーサーバーの情報を得ることのできる :attr:`Server.features` を追加しました。\"\n\n#: ../../whats_new.rst:1179\nmsgid \"Timeout when waiting for offline members while triggering :func:`on_ready`.\"\nmsgstr \":func:`on_ready` を実行中にオフラインメンバーを待っているとき、タイムアウトするようにしました。\"\n\n#: ../../whats_new.rst:1181\nmsgid \"The fact that we did not timeout caused a gigantic memory leak in the library that caused thousands of duplicate :class:`Member` instances causing big memory spikes.\"\nmsgstr \"以前はタイムアウトしなかったため、ライブラリで数千もの :class:`Member` インスタンスが作成されメモリ使用量が大幅に上昇する大規模なメモリリークが発生していました。\"\n\n#: ../../whats_new.rst:1184\nmsgid \"Discard null sequences in the gateway.\"\nmsgstr \"ゲートウェイでヌル値のシーケンスを破棄するようにしました。\"\n\n#: ../../whats_new.rst:1186\nmsgid \"The fact these were not discarded meant that :func:`on_ready` kept being called instead of :func:`on_resumed`. Since this has been corrected, in most cases :func:`on_ready` will be called once or twice with :func:`on_resumed` being called much more often.\"\nmsgstr \"以前は破棄されていなかったため、 :func:`on_ready` が :func:`on_resumed` の代わりに呼び出されることがありました。これが修正されたため、多くの場合では :func:`on_ready` は一、二回呼び出されるだけで、 :func:`on_resumed` がより頻繁に呼び出されるようになります。\"\n\n#: ../../whats_new.rst:1193\nmsgid \"v0.15.1\"\nmsgstr \"v0.15.1\"\n\n#: ../../whats_new.rst:1195\nmsgid \"Fix crash on duplicate or out of order reactions.\"\nmsgstr \"重複したり、順番になっていないリアクションによるクラッシュを修正しました。\"\n\n#: ../../whats_new.rst:1200\nmsgid \"v0.15.0\"\nmsgstr \"v0.15.0\"\n\n#: ../../whats_new.rst:1205\nmsgid \"Rich Embeds for messages are now supported.\"\nmsgstr \"メッセージのリッチな埋め込みをサポートするようにしました。\"\n\n#: ../../whats_new.rst:1207\nmsgid \"To do so, create your own :class:`Embed` and pass the instance to the ``embed`` keyword argument to :meth:`Client.send_message` or :meth:`Client.edit_message`.\"\nmsgstr \"このためには、自分の :class:`Embed` を作成してインスタンスを :meth:`Client.send_message` や :meth:`Client.edit_message` の ``embed`` キーワード引数に渡してください。\"\n\n#: ../../whats_new.rst:1208\nmsgid \"Add :meth:`Client.clear_reactions` to remove all reactions from a message.\"\nmsgstr \"メッセージからすべてリアクションを除去する :meth:`Client.clear_reactions` を追加しました。\"\n\n#: ../../whats_new.rst:1209\nmsgid \"Add support for MESSAGE_REACTION_REMOVE_ALL event, under :func:`on_reaction_clear`.\"\nmsgstr \":func:`on_reaction_clear` の下にMESSAGE_REMOVE_ALL イベントのサポートを追加しました。\"\n\n#: ../../whats_new.rst:1210\nmsgid \"Add :meth:`Permissions.update` and :meth:`PermissionOverwrite.update` for bulk permission updates.\"\nmsgstr \"一括して権限を更新する、 :meth:`Permissions.update` と :meth:`PermissionOverwrite.update` を追加しました。\"\n\n#: ../../whats_new.rst:1212\nmsgid \"This allows you to use e.g. ``p.update(read_messages=True, send_messages=False)`` in a single line.\"\nmsgstr \"これにより、例えば ``p.update(read_messages=True, send_messages=False)`` のように一行で使用できます。\"\n\n#: ../../whats_new.rst:1213\nmsgid \"Add :meth:`PermissionOverwrite.is_empty` to check if the overwrite is empty (i.e. has no overwrites set explicitly as true or false).\"\nmsgstr \"権限上書きが空か(すなわち、明示的にtrueまたはfalseに設定されている上書きが存在しないか)を確認する :meth:`PermissionOverwrite.is_empty` を追加しました。\"\n\n#: ../../whats_new.rst:1215\nmsgid \"For the command extension, the following changed:\"\nmsgstr \"コマンド拡張の場合、以下のことが変更されます。\"\n\n#: ../../whats_new.rst:1217\nmsgid \"``Context`` is no longer slotted to facilitate setting dynamic attributes.\"\nmsgstr \"``Context`` への動的属性の設定を容易にするためにスロット制限を除去しました。\"\n\n#: ../../whats_new.rst:1222\nmsgid \"v0.14.3\"\nmsgstr \"v0.14.3\"\n\n#: ../../whats_new.rst:1227\nmsgid \"Fix crash when dealing with MESSAGE_REACTION_REMOVE\"\nmsgstr \"MESSAGE_REACTION_REMOVEを扱う際のクラッシュを修正しました\"\n\n#: ../../whats_new.rst:1228\nmsgid \"Fix incorrect buckets for reactions.\"\nmsgstr \"リアクションに誤ったバケットが適用されていたのを修正しました。\"\n\n#: ../../whats_new.rst:1233\nmsgid \"v0.14.2\"\nmsgstr \"v0.14.2\"\n\n#: ../../whats_new.rst:1239\nmsgid \":meth:`Client.wait_for_reaction` now returns a namedtuple with ``reaction`` and ``user`` attributes.\"\nmsgstr \":meth:`Client.wait_for_reaction` が ``reaction`` と ``user`` 属性を持つ名前付きタプルを返すようになりました。\"\n\n#: ../../whats_new.rst:1239\nmsgid \"This is for better support in the case that ``None`` is returned since tuple unpacking can lead to issues.\"\nmsgstr \"これは、タプルを展開すると問題につながる可能性がある、 ``None`` が返された場合のより良いサポートのためです。\"\n\n#: ../../whats_new.rst:1244\nmsgid \"Fix bug that disallowed ``None`` to be passed for ``emoji`` parameter in :meth:`Client.wait_for_reaction`.\"\nmsgstr \":meth:`Client.wait_for_reaction` の ``emoji`` パラメータに ``None`` を渡すことを許可しないバグを修正しました。\"\n\n#: ../../whats_new.rst:1249\nmsgid \"v0.14.1\"\nmsgstr \"v0.14.1\"\n\n#: ../../whats_new.rst:1252\nmsgid \"Bug fixes\"\nmsgstr \"バグ修正\"\n\n#: ../../whats_new.rst:1255\nmsgid \"Fix bug with ``Reaction`` not being visible at import.\"\nmsgstr \"インポート時に ``Reaction`` が表示されないバグを修正しました。\"\n\n#: ../../whats_new.rst:1255\nmsgid \"This was also breaking the documentation.\"\nmsgstr \"これは、ドキュメントにも影響を与えていました。\"\n\n#: ../../whats_new.rst:1260\nmsgid \"v0.14.0\"\nmsgstr \"v0.14.0\"\n\n#: ../../whats_new.rst:1262\nmsgid \"This update adds new API features and a couple of bug fixes.\"\nmsgstr \"このアップデートには、新しいAPI機能といくつかのバグ修正が含まれています。\"\n\n#: ../../whats_new.rst:1267\nmsgid \"Add support for Manage Webhooks permission under :attr:`Permissions.manage_webhooks`\"\nmsgstr \":attr:`Permissions.manage_webhooks` の下にWebhookの管理の権限のサポートを追加しました。\"\n\n#: ../../whats_new.rst:1268\nmsgid \"Add support for ``around`` argument in 3.5+ :meth:`Client.logs_from`.\"\nmsgstr \"3.5+ :meth:`Client.logs_from` で ``around`` 引数のサポートを追加しました。\"\n\n#: ../../whats_new.rst:1276\nmsgid \"Add support for reactions.\"\nmsgstr \"リアクションのサポートを追加します。\"\n\n#: ../../whats_new.rst:1270\nmsgid \":meth:`Client.add_reaction` to add a reactions\"\nmsgstr \"リアクションを追加する :meth:`Client.add_reaction`\"\n\n#: ../../whats_new.rst:1271\nmsgid \":meth:`Client.remove_reaction` to remove a reaction.\"\nmsgstr \"リアクションを除去する :meth:`Client.remove_reaction`\"\n\n#: ../../whats_new.rst:1272\nmsgid \":meth:`Client.get_reaction_users` to get the users that reacted to a message.\"\nmsgstr \"メッセージにリアクションしたユーザーを取得する :meth:`Client.get_reaction_users`\"\n\n#: ../../whats_new.rst:1273\nmsgid \":attr:`Permissions.add_reactions` permission bit support.\"\nmsgstr \":attr:`Permissions.add_reactions` パーミッションビットのサポート。\"\n\n#: ../../whats_new.rst:1274\nmsgid \"Two new events, :func:`on_reaction_add` and :func:`on_reaction_remove`.\"\nmsgstr \"2つの新しいイベント、 :func:`on_reaction_add` と :func:`on_reaction_remove` 。\"\n\n#: ../../whats_new.rst:1275\nmsgid \":attr:`Message.reactions` to get reactions from a message.\"\nmsgstr \"メッセージからリアクションを取得する :attr:`Message.reactions`\"\n\n#: ../../whats_new.rst:1276\nmsgid \":meth:`Client.wait_for_reaction` to wait for a reaction from a user.\"\nmsgstr \"ユーザーからのリアクションを待つ :meth:`Client.wait_for_reaction`\"\n\n#: ../../whats_new.rst:1281\nmsgid \"Fix bug with Paginator still allowing lines that are too long.\"\nmsgstr \"Paginatorが長すぎる行をいまだ許可していたバグを修正しました。\"\n\n#: ../../whats_new.rst:1282\nmsgid \"Fix the :attr:`Permissions.manage_emojis` bit being incorrect.\"\nmsgstr \":attr:`Permissions.manage_emojis` ビットが正しくないバグを修正しました。\"\n\n#: ../../whats_new.rst:1287\nmsgid \"v0.13.0\"\nmsgstr \"v0.13.0\"\n\n#: ../../whats_new.rst:1289\nmsgid \"This is a backwards compatible update with new features.\"\nmsgstr \"これは、新しい機能を備えた後方互換性のあるアップデートです。\"\n\n#: ../../whats_new.rst:1294\nmsgid \"Add the ability to manage emojis.\"\nmsgstr \"絵文字を管理する機能を追加しました。\"\n\n#: ../../whats_new.rst:1296\nmsgid \":meth:`Client.create_custom_emoji` to create new emoji.\"\nmsgstr \"新しい絵文字を作成する :meth:`Client.create_custom_emoji` 。\"\n\n#: ../../whats_new.rst:1297\nmsgid \":meth:`Client.edit_custom_emoji` to edit an old emoji.\"\nmsgstr \"既存の絵文字を編集する :meth:`Client.edit_custom_emoji` 。\"\n\n#: ../../whats_new.rst:1298\nmsgid \":meth:`Client.delete_custom_emoji` to delete a custom emoji.\"\nmsgstr \"カスタム絵文字を削除する :meth:`Client.delete_custom_emoji` 。\"\n\n#: ../../whats_new.rst:1299\nmsgid \"Add new :attr:`Permissions.manage_emojis` toggle.\"\nmsgstr \"新しい :attr:`Permissions.manage_emoji` トグルを追加しました。\"\n\n#: ../../whats_new.rst:1301\nmsgid \"This applies for :class:`PermissionOverwrite` as well.\"\nmsgstr \"これは :class:`PermissionOverwrite` にも適用されます。\"\n\n#: ../../whats_new.rst:1302\nmsgid \"Add new statuses for :class:`Status`.\"\nmsgstr \":class:`Status` に新しいステータスを追加しました。\"\n\n#: ../../whats_new.rst:1304\nmsgid \":attr:`Status.dnd` (aliased with :attr:`Status.do_not_disturb`\\\\) for Do Not Disturb.\"\nmsgstr \"取り込み中を示す :attr:`Status.dnd` (エイリアス :attr:`Status.do_not_interrup` )\"\n\n#: ../../whats_new.rst:1305\nmsgid \":attr:`Status.invisible` for setting your status to invisible (please see the docs for a caveat).\"\nmsgstr \"ステータスを非表示に設定するための :attr:`Status.invisible` （ドキュメントの注意事項を参照してください）。\"\n\n#: ../../whats_new.rst:1306\nmsgid \"Deprecate :meth:`Client.change_status`\"\nmsgstr \":meth:`Client.change_status` を非推奨にしました。\"\n\n#: ../../whats_new.rst:1308\nmsgid \"Use :meth:`Client.change_presence` instead for better more up to date functionality.\"\nmsgstr \"より良い最新の機能を使用するためには、 :meth:`Client.change_presence` を使用してください。\"\n\n#: ../../whats_new.rst:1309\nmsgid \"This method is subject for removal in a future API version.\"\nmsgstr \"このメソッドは、将来の API バージョンで削除の対象となります。\"\n\n#: ../../whats_new.rst:1310\nmsgid \"Add :meth:`Client.change_presence` for changing your status with the new Discord API change.\"\nmsgstr \"新しい Discord API でステータスを変更するための :meth:`Client.change_presence` を追加しました。\"\n\n#: ../../whats_new.rst:1312\nmsgid \"This is the only method that allows changing your status to invisible or do not disturb.\"\nmsgstr \"これは、ステータスを非表示や取り込み中に変更できる唯一の方法です。\"\n\n#: ../../whats_new.rst:1317\nmsgid \"Paginator pages do not exceed their max_size anymore (:issue:`340`)\"\nmsgstr \"ページネータのページがmax_sizeを超えないようにしました。 (:issue:`340`)\"\n\n#: ../../whats_new.rst:1318\nmsgid \"Do Not Disturb users no longer show up offline due to the new :class:`Status` changes.\"\nmsgstr \"取り込み中ユーザーは新しい :class:`Status` の変更によりこれ以降オフラインとして表示されないようになりました。\"\n\n#: ../../whats_new.rst:1323\nmsgid \"v0.12.0\"\nmsgstr \"v0.12.0\"\n\n#: ../../whats_new.rst:1325\nmsgid \"This is a bug fix update that also comes with new features.\"\nmsgstr \"これは、新機能つきのバグ修正アップデートです。\"\n\n#: ../../whats_new.rst:1330\nmsgid \"Add custom emoji support.\"\nmsgstr \"カスタム絵文字サポートを追加しました。\"\n\n#: ../../whats_new.rst:1332\nmsgid \"Adds a new class to represent a custom Emoji named :class:`Emoji`\"\nmsgstr \":class:`Emoji` という名前のカスタム絵文字を表す新しいクラスを追加しました。\"\n\n#: ../../whats_new.rst:1333\nmsgid \"Adds a utility generator function, :meth:`Client.get_all_emojis`.\"\nmsgstr \"ユーティリティジェネレータ関数 :meth:`Client.get_all_emojis` を追加しました。\"\n\n#: ../../whats_new.rst:1334\nmsgid \"Adds a list of emojis on a server, :attr:`Server.emojis`.\"\nmsgstr \"サーバーの絵文字のリストを取得する :attr:`Server.emojis` を追加しました。\"\n\n#: ../../whats_new.rst:1335\nmsgid \"Adds a new event, :func:`on_server_emojis_update`.\"\nmsgstr \"新しいイベント :func:`on_server_emojis_update` を追加しました。\"\n\n#: ../../whats_new.rst:1336\nmsgid \"Add new server regions to :class:`ServerRegion`\"\nmsgstr \":class:`ServerRegion` に新しいサーバーリージョンを追加しました。\"\n\n#: ../../whats_new.rst:1338\nmsgid \":attr:`ServerRegion.eu_central` and :attr:`ServerRegion.eu_west`.\"\nmsgstr \":attr:`ServerRegion.eu_central` と :attr:`ServerRegion.eu_west` 。\"\n\n#: ../../whats_new.rst:1339\nmsgid \"Add support for new pinned system message under :attr:`MessageType.pins_add`.\"\nmsgstr \":attr:`MessageType.pins_add` にて新しいピン留めのシステムメッセージのサポートを追加しました。\"\n\n#: ../../whats_new.rst:1340\nmsgid \"Add order comparisons for :class:`Role` to allow it to be compared with regards to hierarchy.\"\nmsgstr \":class:`Role` への比較を追加し、階層を考慮した比較ができるようにしました。\"\n\n#: ../../whats_new.rst:1342\nmsgid \"This means that you can now do ``role_a > role_b`` etc to check if ``role_b`` is lower in the hierarchy.\"\nmsgstr \"つまり、 ``role_a > role_b`` などを実行して、階層内で ``role_b`` が低いかどうかを確認できるようになりました。\"\n\n#: ../../whats_new.rst:1344\nmsgid \"Add :attr:`Server.role_hierarchy` to get the server's role hierarchy.\"\nmsgstr \"サーバーのロール階層を取得する :attr:`Server.role_hierarchy` を追加しました。\"\n\n#: ../../whats_new.rst:1345\nmsgid \"Add :attr:`Member.server_permissions` to get a member's server permissions without their channel specific overwrites.\"\nmsgstr \"チャンネル固有の上書きなしでメンバーのサーバー権限を取得する :attr:`Member.server_permissions` を追加しました。\"\n\n#: ../../whats_new.rst:1346\nmsgid \"Add :meth:`Client.get_user_info` to retrieve a user's info from their ID.\"\nmsgstr \"IDからユーザ情報を取得することができる、 :meth:`Client.get_user_info` を追加しました。\"\n\n#: ../../whats_new.rst:1347\nmsgid \"Add a new ``Player`` property, ``Player.error`` to fetch the error that stopped the player.\"\nmsgstr \"プレイヤーを停止させたエラーを取得するために、新しい ``Player`` プロパティ ``Player.error`` を追加しました。\"\n\n#: ../../whats_new.rst:1349\nmsgid \"To help with this change, a player's ``after`` function can now take a single parameter denoting the current player.\"\nmsgstr \"この変更とともに、プレイヤーの ``after`` 関数に現在のプレイヤーを示すパラメータを取ることができるようになりました。\"\n\n#: ../../whats_new.rst:1350\nmsgid \"Add support for server verification levels.\"\nmsgstr \"サーバー認証レベルのサポートを追加しました。\"\n\n#: ../../whats_new.rst:1352\nmsgid \"Adds a new enum called :class:`VerificationLevel`.\"\nmsgstr \":class:`VerificationLevel` という新しい列挙型を追加しました。\"\n\n#: ../../whats_new.rst:1353\nmsgid \"This enum can be used in :meth:`Client.edit_server` under the ``verification_level`` keyword argument.\"\nmsgstr \"この列挙型は、 :meth:`Client.edit_server` の ``verification_level`` キーワード引数で使用できます。\"\n\n#: ../../whats_new.rst:1354\nmsgid \"Adds a new attribute in the server, :attr:`Server.verification_level`.\"\nmsgstr \"サーバーに :attr:`Server.verification_level` という新しい属性を追加しました。\"\n\n#: ../../whats_new.rst:1355\nmsgid \"Add :attr:`Server.voice_client` shortcut property for :meth:`Client.voice_client_in`.\"\nmsgstr \":meth:`Client.voice_client_in` のショートカットプロパティである :attr:`Server.voice_client` を追加しました。\"\n\n#: ../../whats_new.rst:1357\nmsgid \"This is technically old (was added in v0.10.0) but was undocumented until v0.12.0.\"\nmsgstr \"これは厳密にいえば過去のもの (v0.10.0で追加) ですが、v0.12.0までは文書化されていませんでした。\"\n\n#: ../../whats_new.rst:1359\n#: ../../whats_new.rst:1405\nmsgid \"For the command extension, the following are new:\"\nmsgstr \"コマンド拡張機能では、以下の新機能が追加されました:\"\n\n#: ../../whats_new.rst:1361\nmsgid \"Add custom emoji converter.\"\nmsgstr \"カスタム絵文字コンバータを追加しました。\"\n\n#: ../../whats_new.rst:1362\nmsgid \"All default converters that can take IDs can now convert via ID.\"\nmsgstr \"IDを取ることができるすべてのデフォルトのコンバータが、IDにより変換することができるようにしました。\"\n\n#: ../../whats_new.rst:1363\nmsgid \"Add coroutine support for ``Bot.command_prefix``.\"\nmsgstr \"``Bot.command_prefix`` にコルーチンサポートを追加しました。\"\n\n#: ../../whats_new.rst:1364\nmsgid \"Add a method to reset command cooldown.\"\nmsgstr \"コマンドのクールダウンをリセットするメソッドを追加しました。\"\n\n#: ../../whats_new.rst:1369\nmsgid \"Fix bug that caused the library to not work with the latest ``websockets`` library.\"\nmsgstr \"最新の ``websockets`` ライブラリでライブラリが動作しないバグを修正しました。\"\n\n#: ../../whats_new.rst:1370\nmsgid \"Fix bug that leaked keep alive threads (:issue:`309`)\"\nmsgstr \"キープアライブスレッドをリークしていたバグを修正しました。 (:issue:`309`)\"\n\n#: ../../whats_new.rst:1371\nmsgid \"Fix bug that disallowed :class:`ServerRegion` from being used in :meth:`Client.edit_server`.\"\nmsgstr \":meth:`Client.edit_server` で :class:`ServerRegion` が使用できないバグを修正しました。\"\n\n#: ../../whats_new.rst:1372\nmsgid \"Fix bug in :meth:`Channel.permissions_for` that caused permission resolution to happen out of order.\"\nmsgstr \":meth:`Channel.permissions_for` で権限解決が誤った順序で行われたバグを修正しました。\"\n\n#: ../../whats_new.rst:1373\nmsgid \"Fix bug in :attr:`Member.top_role` that did not account for same-position roles.\"\nmsgstr \":attr:`Member.top_role` が同じポジションの役割を考慮しないバグを修正しました。\"\n\n#: ../../whats_new.rst:1378\nmsgid \"v0.11.0\"\nmsgstr \"v0.11.0\"\n\n#: ../../whats_new.rst:1380\nmsgid \"This is a minor bug fix update that comes with a gateway update (v5 -> v6).\"\nmsgstr \"これはゲートウェイのアップデート (v5 -> v6) を含むマイナーなバグ修正アップデートです。\"\n\n#: ../../whats_new.rst:1383\nmsgid \"Breaking Changes\"\nmsgstr \"破壊的変更\"\n\n#: ../../whats_new.rst:1385\nmsgid \"``Permissions.change_nicknames`` has been renamed to :attr:`Permissions.change_nickname` to match the UI.\"\nmsgstr \"``Permissions.change_nicknames`` は UIに一致するように :attr:`Permissions.change_nickname` に名前が変更されました。\"\n\n#: ../../whats_new.rst:1390\nmsgid \"Add the ability to prune members via :meth:`Client.prune_members`.\"\nmsgstr \":meth:`Client.prune_members` でメンバーを一括キックする機能を追加しました。\"\n\n#: ../../whats_new.rst:1391\nmsgid \"Switch the websocket gateway version to v6 from v5. This allows the library to work with group DMs and 1-on-1 calls.\"\nmsgstr \"WebSocketゲートウェイのバージョンをv5からv6に切り替えました。これにより、ライブラリはグループDMと1-on-1コールで動作するようになります。\"\n\n#: ../../whats_new.rst:1392\nmsgid \"Add :attr:`AppInfo.owner` attribute.\"\nmsgstr \":attr:`AppInfo.owner` 属性を追加しました。\"\n\n#: ../../whats_new.rst:1393\nmsgid \"Add :class:`CallMessage` for group voice call messages.\"\nmsgstr \"グループボイス通話メッセージを示す :class:`CallMessage` を追加しました。\"\n\n#: ../../whats_new.rst:1394\nmsgid \"Add :class:`GroupCall` for group voice call information.\"\nmsgstr \"グループボイス通話情報を示す :class:`GroupCall` を追加しました。\"\n\n#: ../../whats_new.rst:1395\nmsgid \"Add :attr:`Message.system_content` to get the system message.\"\nmsgstr \"システムメッセージを取得する :attr:`Message.system_content` を追加しました。\"\n\n#: ../../whats_new.rst:1396\nmsgid \"Add the remaining VIP servers and the Brazil servers into :class:`ServerRegion` enum.\"\nmsgstr \"残りのVIPサーバーとブラジルサーバーを :class:`ServerRegion` に追加しました。\"\n\n#: ../../whats_new.rst:1397\nmsgid \"Add ``stderr`` argument to :meth:`VoiceClient.create_ffmpeg_player` to redirect stderr.\"\nmsgstr \":meth:`VoiceClient.create_ffmpeg_player` に標準エラー出力をリダイレクトするための ``stderr`` 引数を追加しました。\"\n\n#: ../../whats_new.rst:1398\nmsgid \"The library now handles implicit permission resolution in :meth:`Channel.permissions_for`.\"\nmsgstr \"ライブラリは :meth:`Channel.permissions_for` で暗黙的な権限解決を処理するようになりました。\"\n\n#: ../../whats_new.rst:1399\nmsgid \"Add :attr:`Server.mfa_level` to query a server's 2FA requirement.\"\nmsgstr \"サーバーの 2FA 要件を取得する :attr:`Server.mfa_level` を追加しました。\"\n\n#: ../../whats_new.rst:1400\nmsgid \"Add :attr:`Permissions.external_emojis` permission.\"\nmsgstr \":attr:`Permissions.external_emojis` 権限を追加しました。\"\n\n#: ../../whats_new.rst:1401\nmsgid \"Add :attr:`Member.voice` attribute that refers to a :class:`VoiceState`.\"\nmsgstr \":class:`VoiceState` を返す :attr:`Member.voice` 属性を追加しました。\"\n\n#: ../../whats_new.rst:1403\nmsgid \"For backwards compatibility, the member object will have properties mirroring the old behaviour.\"\nmsgstr \"後方互換性のため、メンバーオブジェクトには古い挙動をミラーリングするプロパティも存在します。\"\n\n#: ../../whats_new.rst:1407\nmsgid \"Command cooldown system with the ``cooldown`` decorator.\"\nmsgstr \"``cololdown`` デコレータを用いたコマンドクールダウンシステム。\"\n\n#: ../../whats_new.rst:1408\nmsgid \"``UserInputError`` exception for the hierarchy for user input related errors.\"\nmsgstr \"ユーザー入力関連エラーの親である ``UserInputError`` 例外。\"\n\n#: ../../whats_new.rst:1413\nmsgid \":attr:`Client.email` is now saved when using a token for user accounts.\"\nmsgstr \":attr:`Client.email` がユーザーアカウントにトークンを使用してログインしたとき保存されるようになりました。\"\n\n#: ../../whats_new.rst:1414\nmsgid \"Fix issue when removing roles out of order.\"\nmsgstr \"順番になってないロールの除去で発生した問題を修正しました。\"\n\n#: ../../whats_new.rst:1415\nmsgid \"Fix bug where discriminators would not update.\"\nmsgstr \"タグが更新されないバグを修正しました。\"\n\n#: ../../whats_new.rst:1416\nmsgid \"Handle cases where ``HEARTBEAT`` opcode is received. This caused bots to disconnect seemingly randomly.\"\nmsgstr \"``HEARTBEAT`` のコードを受け取った場合を処理するようにしました。これは、ボットが一見ランダムに切断されるのを引き起こしていました。\"\n\n#: ../../whats_new.rst:1418\nmsgid \"For the command extension, the following bug fixes apply:\"\nmsgstr \"コマンド拡張機能では、以下のバグが修正されました:\"\n\n#: ../../whats_new.rst:1420\nmsgid \"``Bot.check`` decorator is actually a decorator not requiring parentheses.\"\nmsgstr \"``Bot.check`` デコレータが実際に括弧を必要としないようになりました。\"\n\n#: ../../whats_new.rst:1421\nmsgid \"``Bot.remove_command`` and ``Group.remove_command`` no longer throw if the command doesn't exist.\"\nmsgstr \"``Bot.remove_command`` と ``Group.remove_command`` が、コマンドが存在しない場合に例外を送出しないようにしました。\"\n\n#: ../../whats_new.rst:1422\nmsgid \"Command names are no longer forced to be ``lower()``.\"\nmsgstr \"コマンド名は強制的に ``lower()`` されなくなりました。\"\n\n#: ../../whats_new.rst:1423\nmsgid \"Fix a bug where Member and User converters failed to work in private message contexts.\"\nmsgstr \"MemberとUserのコンバータがプライベートメッセージ内で動かなかったバグを修正しました。\"\n\n#: ../../whats_new.rst:1424\nmsgid \"``HelpFormatter`` now ignores hidden commands when deciding the maximum width.\"\nmsgstr \"``HelpFormatter`` が最大幅を決めるときに隠されたコマンドを無視するようになりました。\"\n\n#: ../../whats_new.rst:1429\nmsgid \"v0.10.0\"\nmsgstr \"v0.10.0\"\n\n#: ../../whats_new.rst:1431\nmsgid \"For breaking changes, see :ref:`migrating-to-async`. The breaking changes listed there will not be enumerated below. Since this version is rather a big departure from v0.9.2, this change log will be non-exhaustive.\"\nmsgstr \"破壊的変更に関しては、 :ref:`migrating-to-async` を参照してください。そのページで列挙された破壊的変更はここでは述べません。このバージョンがv0.9.2よりかなり大きな変更であるため、変更履歴は完全ではありません。\"\n\n#: ../../whats_new.rst:1436\nmsgid \"The library is now fully ``asyncio`` compatible, allowing you to write non-blocking code a lot more easily.\"\nmsgstr \"ライブラリが完全に ``asyncio`` に対応するようになり、ノンブロッキングコードをより簡単に書けるようになりました。\"\n\n#: ../../whats_new.rst:1437\nmsgid \"The library now fully handles 429s and unconditionally retries on 502s.\"\nmsgstr \"ライブラリが429を完全に処理し、502で無条件に再試行するようにしました。\"\n\n#: ../../whats_new.rst:1438\nmsgid \"A new command extension module was added but is currently undocumented. Figuring it out is left as an exercise to the reader.\"\nmsgstr \"新しいコマンド拡張機能モジュールが追加されましたが、現在文書化されていません。詳細は読者が自身で調べることをおすすめします。\"\n\n#: ../../whats_new.rst:1439\nmsgid \"Two new exception types, :exc:`Forbidden` and :exc:`NotFound` to denote permission errors or 404 errors.\"\nmsgstr \"パーミッションエラーや404エラーを示す2つの新しい例外タイプ、 :exc:`Forbidden` と :exc:`NotFound` が追加されました。\"\n\n#: ../../whats_new.rst:1440\nmsgid \"Added :meth:`Client.delete_invite` to revoke invites.\"\nmsgstr \"招待を取り消す :meth:`Client.delete_invite` を追加しました。\"\n\n#: ../../whats_new.rst:1441\nmsgid \"Added support for sending voice. Check :class:`VoiceClient` for more details.\"\nmsgstr \"音声を送信するためのサポートを追加しました。詳細は :class:`VoiceClient` を参照してください。\"\n\n#: ../../whats_new.rst:1442\nmsgid \"Added :meth:`Client.wait_for_message` coroutine to aid with follow up commands.\"\nmsgstr \"フォローアップコマンドを作りやすいように、コルーチン :meth:`Client.wait_for_message` を追加しました。\"\n\n#: ../../whats_new.rst:1443\nmsgid \"Added :data:`version_info` named tuple to check version info of the library.\"\nmsgstr \"ライブラリのバージョン情報を確認するための、namedtuple :data:`version_info` を追加しました。\"\n\n#: ../../whats_new.rst:1444\nmsgid \"Login credentials are now cached to have a faster login experience. You can disable this by passing in ``cache_auth=False`` when constructing a :class:`Client`.\"\nmsgstr \"ログイン情報をキャッシュすることで、より高速にログインできるようになりました。これを無効にするには、 :class:`Client` を作成する際に ``cache_auth=False`` を渡します。\"\n\n#: ../../whats_new.rst:1446\nmsgid \"New utility function, :func:`discord.utils.get` to simplify retrieval of items based on attributes.\"\nmsgstr \"新しいユーティリティ関数 :func:`discord.utils.get` は、属性に基づいたアイテムの取得を簡素化します。\"\n\n#: ../../whats_new.rst:1447\nmsgid \"All data classes now support ``!=``, ``==``, ``hash(obj)`` and ``str(obj)``.\"\nmsgstr \"すべてのデータクラスが ``!=``, ``==``, ``hash(obj)``, ``str(obj)`` をサポートするようになりました\"\n\n#: ../../whats_new.rst:1448\nmsgid \"Added :meth:`Client.get_bans` to get banned members from a server.\"\nmsgstr \"サーバーからBANされたメンバーを取得する :meth:`Client.get_bans` を追加しました。\"\n\n#: ../../whats_new.rst:1449\nmsgid \"Added :meth:`Client.invites_from` to get currently active invites in a server.\"\nmsgstr \"サーバーで現在アクティブな招待を取得する :meth:`Client.invites_from` を追加しました。\"\n\n#: ../../whats_new.rst:1450\nmsgid \"Added :attr:`Server.me` attribute to get the :class:`Member` version of :attr:`Client.user`.\"\nmsgstr \":attr:`Client.user` の :class:`Member` を取得できる :attr:`Server.me` を追加しました。\"\n\n#: ../../whats_new.rst:1451\nmsgid \"Most data classes now support a ``hash(obj)`` function to allow you to use them in ``set`` or ``dict`` classes or subclasses.\"\nmsgstr \"ほとんどのデータクラスが ``hash(obj)`` 関数をサポートするようになり、 ``set`` や ``dict`` クラス、サブクラスで使用できるようになりました。\"\n\n#: ../../whats_new.rst:1452\nmsgid \"Add :meth:`Message.clean_content` to get a text version of the content with the user and channel mentioned changed into their names.\"\nmsgstr \"ユーザーとチャンネルのメンションを名前に変更したバージョンのコンテンツを取得する、 :meth:`Message.clean_content` を追加しました。\"\n\n#: ../../whats_new.rst:1453\nmsgid \"Added a way to remove the messages of the user that just got banned in :meth:`Client.ban`.\"\nmsgstr \":meth:`Client.ban` でBANされたユーザーのメッセージを削除する方法を追加しました。\"\n\n#: ../../whats_new.rst:1454\nmsgid \"Added :meth:`Client.wait_until_ready` to facilitate easy creation of tasks that require the client cache to be ready.\"\nmsgstr \"クライアントキャッシュを準備する必要があるタスクを簡単に作成できるように、 :meth:`Client.wait_until_ready` を追加しました。\"\n\n#: ../../whats_new.rst:1455\nmsgid \"Added :meth:`Client.wait_until_login` to facilitate easy creation of tasks that require the client to be logged in.\"\nmsgstr \"クライアントのログインを必要とするタスクを簡単に作成できるように :meth:`Client.wait_until_login` を追加しました。\"\n\n#: ../../whats_new.rst:1456\nmsgid \"Add :class:`discord.Game` to represent any game with custom text to send to :meth:`Client.change_status`.\"\nmsgstr \":class:`Client.change_status` に送信する、カスタムテキストを含む任意のゲームを表す :meth:`discord.Game` を追加しました。\"\n\n#: ../../whats_new.rst:1457\nmsgid \"Add :attr:`Message.nonce` attribute.\"\nmsgstr \":attr:`Message.nonce` 属性を追加しました。\"\n\n#: ../../whats_new.rst:1458\nmsgid \"Add :meth:`Member.permissions_in` as another way of doing :meth:`Channel.permissions_for`.\"\nmsgstr \":meth:`Channel.permissions_for` の代替として :meth:`Member.permissions_in` を追加しました。\"\n\n#: ../../whats_new.rst:1459\nmsgid \"Add :meth:`Client.move_member` to move a member to another voice channel.\"\nmsgstr \"メンバーを別のボイスチャンネルに移動するための :meth:`Client.move_member` を追加しました。\"\n\n#: ../../whats_new.rst:1460\nmsgid \"You can now create a server via :meth:`Client.create_server`.\"\nmsgstr \":meth:`Client.create_server` を使用してサーバーを作成できるようになりました。\"\n\n#: ../../whats_new.rst:1461\nmsgid \"Added :meth:`Client.edit_server` to edit existing servers.\"\nmsgstr \"既存のサーバを編集するための :meth:`Client.edit_server` を追加しました。\"\n\n#: ../../whats_new.rst:1462\nmsgid \"Added :meth:`Client.server_voice_state` to server mute or server deafen a member.\"\nmsgstr \"メンバーをサーバーミュートしたり、サーバースピーカーミュートしたりできる :meth:`Client.server_voice_state` を追加しました。\"\n\n#: ../../whats_new.rst:1463\nmsgid \"If you are being rate limited, the library will now handle it for you.\"\nmsgstr \"レートリミットの際にライブラリが処理するようになりました。\"\n\n#: ../../whats_new.rst:1464\nmsgid \"Add :func:`on_member_ban` and :func:`on_member_unban` events that trigger when a member is banned/unbanned.\"\nmsgstr \"メンバーがBANまたはBAN解除されたときに実行される :func:`on_member_ban` と :func:`on_member_unban` イベントを追加しました。\"\n\n#: ../../whats_new.rst:1467\nmsgid \"Performance Improvements\"\nmsgstr \"パフォーマンスの改善\"\n\n#: ../../whats_new.rst:1469\nmsgid \"All data classes now use ``__slots__`` which greatly reduce the memory usage of things kept in cache.\"\nmsgstr \"すべてのデータクラスは ``__slots__`` を使用するようになり、キャッシュに保存されているもののメモリ使用量を大幅に削減しました。\"\n\n#: ../../whats_new.rst:1470\nmsgid \"Due to the usage of ``asyncio``, the CPU usage of the library has gone down significantly.\"\nmsgstr \"``asyncio`` の使用により、ライブラリの CPU 使用率は大幅に減少しました。\"\n\n#: ../../whats_new.rst:1471\nmsgid \"A lot of the internal cache lists were changed into dictionaries to change the ``O(n)`` lookup into ``O(1)``.\"\nmsgstr \"多くの内部キャッシュリストが ``O(n)`` 検索を ``O(1)`` に変更するために辞書型に変更されました。\"\n\n#: ../../whats_new.rst:1472\nmsgid \"Compressed READY is now on by default. This means if you're on a lot of servers (or maybe even a few) you would receive performance improvements by having to download and process less data.\"\nmsgstr \"圧縮されたREADYがデフォルトでオンになりました。 つまり、多くのサーバー(あるいはもしかすると少なめのサーバー) にいる場合、より少ないデータをダウンロードして処理することでパフォーマンスが向上されます。\"\n\n#: ../../whats_new.rst:1474\nmsgid \"While minor, change regex from ``\\\\d+`` to ``[0-9]+`` to avoid unnecessary unicode character lookups.\"\nmsgstr \"小規模ながら、不要な Unicode 文字の検索を避けるために正規表現を ``\\\\d+`` から ``[0-9]+`` に変更しました。\"\n\n#: ../../whats_new.rst:1479\nmsgid \"Fix bug where guilds being updated did not edit the items in cache.\"\nmsgstr \"ギルドが更新されてもキャッシュ内のアイテムが編集されなかったバグを修正しました。\"\n\n#: ../../whats_new.rst:1480\nmsgid \"Fix bug where ``member.roles`` were empty upon joining instead of having the ``@everyone`` role.\"\nmsgstr \"``member.roles`` が参加時に ``@everyone`` ロールを有さず空であったバグを修正しました。\"\n\n#: ../../whats_new.rst:1481\nmsgid \"Fix bug where :meth:`Role.is_everyone` was not being set properly when the role was being edited.\"\nmsgstr \"ロールが編集されたときに :meth:`Role.is_everyone` が正しく設定されていないバグを修正しました。\"\n\n#: ../../whats_new.rst:1482\nmsgid \":meth:`Client.logs_from` now handles cases where limit > 100 to sidestep the discord API limitation.\"\nmsgstr \":meth:`Client.logs_from` が、DiscordのAPI制限を避けるために制限 > 100を超える場合を処理するようになりました。\"\n\n#: ../../whats_new.rst:1483\nmsgid \"Fix bug where a role being deleted would trigger a ``ValueError``.\"\nmsgstr \"ロールが削除されると、 ``ValueError`` が発生するバグを修正しました。\"\n\n#: ../../whats_new.rst:1484\nmsgid \"Fix bug where :meth:`Permissions.kick_members` and :meth:`Permissions.ban_members` were flipped.\"\nmsgstr \":meth:`Permissions.kick_members` と :meth:`Permissions.ban_members` がひっくり返されたバグを修正しました。\"\n\n#: ../../whats_new.rst:1485\nmsgid \"Mentions are now triggered normally. This was changed due to the way discord handles it internally.\"\nmsgstr \"メンションが正常に発動されるようになりました。これは、Discordの内部処理の方法の変更によるものです。\"\n\n#: ../../whats_new.rst:1486\nmsgid \"Fix issue when a :class:`Message` would attempt to upgrade a :attr:`Message.server` when the channel is a :class:`Object`.\"\nmsgstr \"チャンネルが :class:`Object` の時に、 :class:`Message` が :attr:`Message.server` をアップグレードしようとする問題を修正しました。\"\n\n#: ../../whats_new.rst:1488\nmsgid \"Unavailable servers were not being added into cache, this has been corrected.\"\nmsgstr \"利用できないサーバーがキャッシュに追加されない不具合が修正されました。\"\n\n"
  },
  {
    "path": "docs/logging.rst",
    "content": ":orphan:\n\n.. currentmodule:: discord\n.. versionadded:: 0.6.0\n.. _logging_setup:\n\nSetting Up Logging\n===================\n\n*discord.py* logs errors and debug information via the :mod:`logging` python\nmodule. In order to streamline this process, the library provides default configuration for the ``discord`` logger when using :meth:`Client.run`. It is strongly recommended that the logging module is configured, as no errors or warnings will be output if it is not set up.\n\nThe default logging configuration provided by the library will print to :data:`sys.stderr` using coloured output. You can configure it to send to a file instead by using one of the built-in :mod:`logging.handlers`, such as :class:`logging.FileHandler`.\n\nThis can be done by passing it through :meth:`Client.run`:\n\n.. code-block:: python3\n\n    import logging\n\n    handler = logging.FileHandler(filename='discord.log', encoding='utf-8', mode='w')\n\n    # Assume client refers to a discord.Client subclass...\n    client.run(token, log_handler=handler)\n\nYou can also disable the library's logging configuration completely by passing ``None``:\n\n.. code-block:: python3\n\n    client.run(token, log_handler=None)\n\n\nLikewise, configuring the log level to ``logging.DEBUG`` is also possible:\n\n.. code-block:: python3\n\n    import logging\n\n    handler = logging.FileHandler(filename='discord.log', encoding='utf-8', mode='w')\n\n    # Assume client refers to a discord.Client subclass...\n    client.run(token, log_handler=handler, log_level=logging.DEBUG)\n\nThis is recommended, especially at verbose levels such as ``DEBUG``, as there are a lot of events logged and it would clog the stderr of your program.\n\nIf you want the logging configuration the library provides to affect all loggers rather than just the ``discord`` logger, you can pass ``root_logger=True`` inside :meth:`Client.run`:\n\n.. code-block:: python3\n\n    client.run(token, log_handler=handler, root_logger=True)\n\nIf you want to setup logging using the library provided configuration without using :meth:`Client.run`, you can use :func:`discord.utils.setup_logging`:\n\n.. code-block:: python3\n\n    import discord\n\n    discord.utils.setup_logging()\n\n    # or, for example\n    discord.utils.setup_logging(level=logging.INFO, root=False)\n\nMore advanced setups are possible with the :mod:`logging` module. The example below configures a rotating file handler that outputs DEBUG output for everything the library outputs, except for HTTP requests:\n\n.. code-block:: python3\n\n    import discord\n    import logging\n    import logging.handlers\n\n    logger = logging.getLogger('discord')\n    logger.setLevel(logging.DEBUG)\n    logging.getLogger('discord.http').setLevel(logging.INFO)\n\n    handler = logging.handlers.RotatingFileHandler(\n        filename='discord.log',\n        encoding='utf-8',\n        maxBytes=32 * 1024 * 1024,  # 32 MiB\n        backupCount=5,  # Rotate through 5 files\n    )\n    dt_fmt = '%Y-%m-%d %H:%M:%S'\n    formatter = logging.Formatter('[{asctime}] [{levelname:<8}] {name}: {message}', dt_fmt, style='{')\n    handler.setFormatter(formatter)\n    logger.addHandler(handler)\n\n    # Assume client refers to a discord.Client subclass...\n    # Suppress the default configuration since we have our own\n    client.run(token, log_handler=None)\n\n\nFor more information, check the documentation and tutorial of the :mod:`logging` module.\n\n.. versionchanged:: 2.0\n\n    The library now provides a default logging configuration.\n"
  },
  {
    "path": "docs/make.bat",
    "content": "@ECHO OFF\n\nREM Command file for Sphinx documentation\n\nif \"%SPHINXBUILD%\" == \"\" (\n\tset SPHINXBUILD=sphinx-build\n)\nset BUILDDIR=_build\nset ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% .\nset I18NSPHINXOPTS=%SPHINXOPTS% .\nif NOT \"%PAPER%\" == \"\" (\n\tset ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS%\n\tset I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS%\n)\n\nif \"%1\" == \"\" goto help\n\nif \"%1\" == \"help\" (\n\t:help\n\techo.Please use `make ^<target^>` where ^<target^> is one of\n\techo.  html       to make standalone HTML files\n\techo.  dirhtml    to make HTML files named index.html in directories\n\techo.  singlehtml to make a single large HTML file\n\techo.  pickle     to make pickle files\n\techo.  json       to make JSON files\n\techo.  htmlhelp   to make HTML files and a HTML help project\n\techo.  qthelp     to make HTML files and a qthelp project\n\techo.  devhelp    to make HTML files and a Devhelp project\n\techo.  epub       to make an epub\n\techo.  latex      to make LaTeX files, you can set PAPER=a4 or PAPER=letter\n\techo.  text       to make text files\n\techo.  man        to make manual pages\n\techo.  texinfo    to make Texinfo files\n\techo.  gettext    to make PO message catalogs\n\techo.  changes    to make an overview over all changed/added/deprecated items\n\techo.  xml        to make Docutils-native XML files\n\techo.  pseudoxml  to make pseudoxml-XML files for display purposes\n\techo.  linkcheck  to check all external links for integrity\n\techo.  doctest    to run all doctests embedded in the documentation if enabled\n\techo.  coverage   to run coverage check of the documentation if enabled\n\tgoto end\n)\n\nif \"%1\" == \"clean\" (\n\tfor /d %%i in (%BUILDDIR%\\*) do rmdir /q /s %%i\n\tdel /q /s %BUILDDIR%\\*\n\tgoto end\n)\n\n\nREM Check if sphinx-build is available and fallback to Python version if any\n%SPHINXBUILD% 2> nul\nif errorlevel 9009 goto sphinx_python\ngoto sphinx_ok\n\n:sphinx_python\n\nset SPHINXBUILD=python -m sphinx.__init__\n%SPHINXBUILD% 2> nul\nif errorlevel 9009 (\n\techo.\n\techo.The 'sphinx-build' command was not found. Make sure you have Sphinx\n\techo.installed, then set the SPHINXBUILD environment variable to point\n\techo.to the full path of the 'sphinx-build' executable. Alternatively you\n\techo.may add the Sphinx directory to PATH.\n\techo.\n\techo.If you don't have Sphinx installed, grab it from\n\techo.http://sphinx-doc.org/\n\texit /b 1\n)\n\n:sphinx_ok\n\n\nif \"%1\" == \"html\" (\n\t%SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html\n\tif errorlevel 1 exit /b 1\n\techo.\n\techo.Build finished. The HTML pages are in %BUILDDIR%/html.\n\tgoto end\n)\n\nif \"%1\" == \"dirhtml\" (\n\t%SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml\n\tif errorlevel 1 exit /b 1\n\techo.\n\techo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml.\n\tgoto end\n)\n\nif \"%1\" == \"singlehtml\" (\n\t%SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml\n\tif errorlevel 1 exit /b 1\n\techo.\n\techo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml.\n\tgoto end\n)\n\nif \"%1\" == \"pickle\" (\n\t%SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle\n\tif errorlevel 1 exit /b 1\n\techo.\n\techo.Build finished; now you can process the pickle files.\n\tgoto end\n)\n\nif \"%1\" == \"json\" (\n\t%SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json\n\tif errorlevel 1 exit /b 1\n\techo.\n\techo.Build finished; now you can process the JSON files.\n\tgoto end\n)\n\nif \"%1\" == \"htmlhelp\" (\n\t%SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp\n\tif errorlevel 1 exit /b 1\n\techo.\n\techo.Build finished; now you can run HTML Help Workshop with the ^\n.hhp project file in %BUILDDIR%/htmlhelp.\n\tgoto end\n)\n\nif \"%1\" == \"qthelp\" (\n\t%SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp\n\tif errorlevel 1 exit /b 1\n\techo.\n\techo.Build finished; now you can run \"qcollectiongenerator\" with the ^\n.qhcp project file in %BUILDDIR%/qthelp, like this:\n\techo.^> qcollectiongenerator %BUILDDIR%\\qthelp\\discord.py.qhcp\n\techo.To view the help file:\n\techo.^> assistant -collectionFile %BUILDDIR%\\qthelp\\discord.py.ghc\n\tgoto end\n)\n\nif \"%1\" == \"devhelp\" (\n\t%SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp\n\tif errorlevel 1 exit /b 1\n\techo.\n\techo.Build finished.\n\tgoto end\n)\n\nif \"%1\" == \"epub\" (\n\t%SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub\n\tif errorlevel 1 exit /b 1\n\techo.\n\techo.Build finished. The epub file is in %BUILDDIR%/epub.\n\tgoto end\n)\n\nif \"%1\" == \"latex\" (\n\t%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex\n\tif errorlevel 1 exit /b 1\n\techo.\n\techo.Build finished; the LaTeX files are in %BUILDDIR%/latex.\n\tgoto end\n)\n\nif \"%1\" == \"latexpdf\" (\n\t%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex\n\tcd %BUILDDIR%/latex\n\tmake all-pdf\n\tcd %~dp0\n\techo.\n\techo.Build finished; the PDF files are in %BUILDDIR%/latex.\n\tgoto end\n)\n\nif \"%1\" == \"latexpdfja\" (\n\t%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex\n\tcd %BUILDDIR%/latex\n\tmake all-pdf-ja\n\tcd %~dp0\n\techo.\n\techo.Build finished; the PDF files are in %BUILDDIR%/latex.\n\tgoto end\n)\n\nif \"%1\" == \"text\" (\n\t%SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text\n\tif errorlevel 1 exit /b 1\n\techo.\n\techo.Build finished. The text files are in %BUILDDIR%/text.\n\tgoto end\n)\n\nif \"%1\" == \"man\" (\n\t%SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man\n\tif errorlevel 1 exit /b 1\n\techo.\n\techo.Build finished. The manual pages are in %BUILDDIR%/man.\n\tgoto end\n)\n\nif \"%1\" == \"texinfo\" (\n\t%SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo\n\tif errorlevel 1 exit /b 1\n\techo.\n\techo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo.\n\tgoto end\n)\n\nif \"%1\" == \"gettext\" (\n\t%SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale\n\tif errorlevel 1 exit /b 1\n\techo.\n\techo.Build finished. The message catalogs are in %BUILDDIR%/locale.\n\tgoto end\n)\n\nif \"%1\" == \"changes\" (\n\t%SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes\n\tif errorlevel 1 exit /b 1\n\techo.\n\techo.The overview file is in %BUILDDIR%/changes.\n\tgoto end\n)\n\nif \"%1\" == \"linkcheck\" (\n\t%SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck\n\tif errorlevel 1 exit /b 1\n\techo.\n\techo.Link check complete; look for any errors in the above output ^\nor in %BUILDDIR%/linkcheck/output.txt.\n\tgoto end\n)\n\nif \"%1\" == \"doctest\" (\n\t%SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest\n\tif errorlevel 1 exit /b 1\n\techo.\n\techo.Testing of doctests in the sources finished, look at the ^\nresults in %BUILDDIR%/doctest/output.txt.\n\tgoto end\n)\n\nif \"%1\" == \"coverage\" (\n\t%SPHINXBUILD% -b coverage %ALLSPHINXOPTS% %BUILDDIR%/coverage\n\tif errorlevel 1 exit /b 1\n\techo.\n\techo.Testing of coverage in the sources finished, look at the ^\nresults in %BUILDDIR%/coverage/python.txt.\n\tgoto end\n)\n\nif \"%1\" == \"xml\" (\n\t%SPHINXBUILD% -b xml %ALLSPHINXOPTS% %BUILDDIR%/xml\n\tif errorlevel 1 exit /b 1\n\techo.\n\techo.Build finished. The XML files are in %BUILDDIR%/xml.\n\tgoto end\n)\n\nif \"%1\" == \"pseudoxml\" (\n\t%SPHINXBUILD% -b pseudoxml %ALLSPHINXOPTS% %BUILDDIR%/pseudoxml\n\tif errorlevel 1 exit /b 1\n\techo.\n\techo.Build finished. The pseudo-XML files are in %BUILDDIR%/pseudoxml.\n\tgoto end\n)\n\n:end\n"
  },
  {
    "path": "docs/migrating.rst",
    "content": ".. currentmodule:: discord\n\n.. _migrating_2_0:\n\nMigrating to v2.0\n======================\n\nCompared to v1.0, v2.0 mostly has breaking changes related to better developer experience and API coverage.\nWhile the changes aren't as massive to require an entire rewrite, there are still many changes that need to be accounted for.\n\nPython Version Change\n-----------------------\n\nIn order to ease development, maintain security updates, and use newer features **v2.0 drops support for Python 3.7 and earlier**.\n\n.. _migrating_2_0_userbot_removal:\n\nRemoval of Support For User Accounts\n--------------------------------------\n\nLogging on with a user token is against the Discord `Terms of Service <https://support.discord.com/hc/en-us/articles/115002192352>`_\nand as such all support for user-only endpoints has been removed.\n\nThe following have been removed:\n\n- ``bot`` parameter to :meth:`Client.login` and :meth:`Client.start`\n- ``afk`` parameter to :meth:`Client.change_presence`\n- ``password``, ``new_password``, ``email``, and ``house`` parameters to :meth:`ClientUser.edit`\n- ``CallMessage`` model\n- ``GroupCall`` model\n- ``Profile`` model\n- ``Relationship`` model\n- ``RelationshipType`` enumeration\n- ``HypeSquadHouse`` enumeration\n- ``PremiumType`` enumeration\n- ``UserContentFilter`` enumeration\n- ``FriendFlags`` enumeration\n- ``Theme`` enumeration\n- ``on_relationship_add`` event\n- ``on_relationship_remove`` event\n- ``on_relationship_update`` event\n- ``Client.fetch_user_profile`` method\n- ``ClientUser.create_group`` method\n- ``ClientUser.edit_settings`` method\n- ``ClientUser.get_relationship`` method\n- ``GroupChannel.add_recipients`` method\n- ``GroupChannel.remove_recipients`` method\n- ``GroupChannel.edit`` method\n- ``Guild.ack`` method\n- ``Message.ack`` method\n- ``User.block`` method\n- ``User.is_blocked`` method\n- ``User.is_friend`` method\n- ``User.profile`` method\n- ``User.remove_friend`` method\n- ``User.send_friend_request`` method\n- ``User.unblock`` method\n- ``ClientUser.blocked`` attribute\n- ``ClientUser.email`` attribute\n- ``ClientUser.friends`` attribute\n- ``ClientUser.premium`` attribute\n- ``ClientUser.premium_type`` attribute\n- ``ClientUser.relationships`` attribute\n- ``Message.call`` attribute\n- ``User.mutual_friends`` attribute\n- ``User.relationship`` attribute\n\n.. _migrating_2_0_client_async_setup:\n\nasyncio Event Loop Changes\n---------------------------\n\nPython 3.7 introduced a new helper function :func:`asyncio.run` which automatically creates and destroys the asynchronous event loop.\n\nIn order to support this, the way discord.py handles the :mod:`asyncio` event loop has changed.\n\nThis allows you to rather than using :meth:`Client.run` create your own asynchronous loop to setup other asynchronous code as needed.\n\nQuick example:\n\n.. code-block:: python\n\n    client = discord.Client()\n\n    async def main():\n        # do other async things\n        await my_async_function()\n\n        # start the client\n        async with client:\n            await client.start(TOKEN)\n\n    asyncio.run(main())\n\nA new :meth:`~Client.setup_hook` method has also been added to the :class:`Client` class.\nThis method is called after login but before connecting to the discord gateway.\n\nIt is intended to be used to setup various bot features in an asynchronous context.\n\n:meth:`~Client.setup_hook` can be defined by subclassing the :class:`Client` class.\n\nQuick example:\n\n.. code-block:: python\n\n    class MyClient(discord.Client):\n        async def setup_hook(self):\n            print('This is asynchronous!')\n\n    client = MyClient()\n    client.run(TOKEN)\n\nWith this change, constructor of :class:`Client` no longer accepts ``connector`` and ``loop`` parameters.\n\nIn parallel with this change, changes were made to loading and unloading of commands extension extensions and cogs,\nsee :ref:`migrating_2_0_commands_extension_cog_async` for more information.\n\nIntents Are Now Required\n--------------------------\n\nIn earlier versions, the ``intents`` keyword argument was optional and defaulted to :meth:`Intents.default`. In order to better educate users on their intents and to also make it more explicit, this parameter is now required to pass in.\n\nFor example:\n\n.. code-block:: python3\n\n    # before\n    client = discord.Client()\n\n    # after\n    intents = discord.Intents.default()\n    client = discord.Client(intents=intents)\n\nThis change applies to **all** subclasses of :class:`Client`.\n\n- :class:`AutoShardedClient`\n- :class:`~discord.ext.commands.Bot`\n- :class:`~discord.ext.commands.AutoShardedBot`\n\n\nAbstract Base Classes Changes\n-------------------------------\n\n:ref:`discord_api_abcs` that inherited from :class:`abc.ABCMeta` now inherit from :class:`typing.Protocol`.\n\nThis results in a change of the base metaclass used by these classes\nbut this should generally be completely transparent to the user.\n\nAll of the classes are either :func:`runtime-checkable <typing.runtime_checkable>` protocols or explicitly inherited from\nand as such usage with :func:`isinstance` and :func:`issubclass` is not affected.\n\nThe following have been changed to :func:`runtime-checkable <typing.runtime_checkable>` :class:`~typing.Protocol`\\s:\n\n- :class:`abc.Snowflake`\n- :class:`abc.User`\n\nThe following have been changed to subclass :class:`~typing.Protocol`:\n\n- :class:`abc.GuildChannel`\n- :class:`abc.Connectable`\n\nThe following have been changed to use the default metaclass instead of :class:`abc.ABCMeta`:\n\n- :class:`abc.Messageable`\n- :class:`abc.PrivateChannel`\n\n``datetime`` Objects Are Now UTC-Aware\n----------------------------------------\n\nAll usage of naive :class:`datetime.datetime` objects in the library has been replaced with aware objects using UTC timezone.\nMethods that accepted naive :class:`~datetime.datetime` objects now also accept timezone-aware objects.\nTo keep behavior inline with :class:`~datetime.datetime`'s methods, this library's methods now assume\nthat naive :class:`~datetime.datetime` objects are local time (note that some of the methods may not accept\nnaive :class:`~datetime.datetime`, such exceptions are listed below).\n\nBecause naive :class:`~datetime.datetime` objects are treated by many of its methods as local times, the previous behavior\nwas more likely to result in programming errors with their usage.\n\nTo ease the migration, :func:`utils.utcnow` helper function has been added.\n\n.. warning::\n    Using :meth:`datetime.datetime.utcnow` can be problematic since it returns a naive UTC ``datetime`` object.\n\nQuick example:\n\n.. code:: python\n\n    # before\n    week_ago = datetime.datetime.utcnow() - datetime.timedelta(days=7)\n    if member.created_at > week_ago:\n        print(f'Member account {member} was created less than a week ago!')\n\n    # after\n    # The new helper function can be used here:\n    week_ago = discord.utils.utcnow() - datetime.timedelta(days=7)\n    # ...or the equivalent result can be achieved with datetime.datetime.now():\n    week_ago = datetime.datetime.now(datetime.timezone.utc) - datetime.timedelta(days=7)\n    if member.created_at > week_ago:\n        print(f'Member account {member} was created less than a week ago!')\n\nThe following have been changed from naive to aware :class:`~datetime.datetime` objects in UTC:\n\n- :attr:`AuditLogEntry.created_at` attribute\n- :attr:`BaseActivity.created_at` attribute\n- :attr:`ClientUser.created_at` attribute\n- :attr:`DMChannel.created_at` attribute\n- :attr:`Emoji.created_at` attribute\n- :attr:`GroupChannel.created_at` attribute\n- :attr:`Guild.created_at` attribute\n- :attr:`abc.GuildChannel.created_at` attribute\n- :attr:`Invite.created_at` attribute\n- :attr:`Object.created_at` attribute\n- :attr:`Member.created_at` attribute\n- :attr:`Message.created_at` attribute\n- :attr:`PartialEmoji.created_at` attribute\n- :attr:`PartialInviteChannel.created_at` attribute\n- :attr:`PartialInviteGuild.created_at` attribute\n- :attr:`PartialMessage.created_at` attribute\n- :attr:`Role.created_at` attribute\n- :attr:`Spotify.created_at` attribute\n- :attr:`Sticker.created_at` attribute\n- :attr:`TeamMember.created_at` attribute\n- :attr:`Template.created_at` attribute\n- :attr:`User.created_at` attribute\n- :attr:`Webhook.created_at` attribute\n- :attr:`Widget.created_at` attribute\n- :attr:`WidgetChannel.created_at` attribute\n- :attr:`WidgetMember.created_at` attribute\n- :attr:`Message.edited_at` attribute\n- :attr:`Invite.expires_at` attribute\n- :attr:`Activity.end` attribute\n- :attr:`Game.end` attribute\n- :attr:`Spotify.end` attribute\n- :attr:`Member.joined_at` attribute\n- :attr:`Member.premium_since` attribute\n- :attr:`VoiceState.requested_to_speak_at` attribute\n- :attr:`Activity.start` attribute\n- :attr:`Game.start` attribute\n- :attr:`Spotify.start` attribute\n- :attr:`StreamIntegration.synced_at` attribute\n- :attr:`Embed.timestamp` attribute\n- :attr:`Template.updated_at` attribute\n- ``timestamp`` parameter in :func:`on_typing` event\n- ``last_pin`` parameter in :func:`on_private_channel_pins_update` event\n- ``last_pin`` parameter in :func:`on_guild_channel_pins_update` event\n- Return type of :func:`utils.snowflake_time`\n\nThe following now accept aware :class:`~datetime.datetime` and assume that if the passed :class:`~datetime.datetime` is naive, it is a local time:\n\n- :meth:`abc.Messageable.history` method\n- :meth:`Client.fetch_guilds` method\n- :meth:`Guild.audit_logs` method\n- :meth:`Guild.fetch_members` method\n- :meth:`TextChannel.purge` method\n- :attr:`Embed` constructor\n- :attr:`Embed.timestamp` property setter\n- :func:`utils.sleep_until` function\n- :func:`utils.time_snowflake` function\n\nCurrently, there's only one place in this library that doesn't accept naive :class:`datetime.datetime` objects:\n\n- ``timed_out_until`` parameter in :meth:`Member.edit`\n\n    This has been done to prevent users from mistakenly applying incorrect timeouts to guild members.\n\nMajor Webhook Changes\n-----------------------\n\nWebhook support has been rewritten to work better with typings and rate limits.\n\nAs a result, synchronous functionality has been split to separate classes.\n\nQuick example for asynchronous webhooks:\n\n.. code:: python\n\n    # before\n    async with aiohttp.ClientSession() as session:\n        webhook = discord.Webhook.from_url('url-here', adapter=discord.AsyncWebhookAdapter(session))\n        await webhook.send('Hello World', username='Foo')\n\n    # after\n    async with aiohttp.ClientSession() as session:\n        webhook = discord.Webhook.from_url('url-here', session=session)\n        await webhook.send('Hello World', username='Foo')\n\nQuick example for synchronous webhooks:\n\n.. code:: python\n\n    # before\n    webhook = discord.Webhook.partial(123456, 'token-here', adapter=discord.RequestsWebhookAdapter())\n    webhook.send('Hello World', username='Foo')\n\n    # after\n    webhook = discord.SyncWebhook.partial(123456, 'token-here')\n    webhook.send('Hello World', username='Foo')\n\nThe following breaking changes have been made:\n\n- Synchronous functionality of :class:`Webhook` and :class:`WebhookMessage` has been split to\n  :class:`SyncWebhook` and :class:`SyncWebhookMessage`.\n- ``WebhookAdapter`` class has been removed and the interfaces based on it (``AsyncWebhookAdapter``\n  and ``RequestsWebhookAdapter``) are now considered implementation detail and should not be depended on.\n- ``execute`` alias for :meth:`Webhook.send`/:meth:`SyncWebhook.send` has been removed.\n\nAsset Redesign and Changes\n----------------------------\n\nThe :class:`Asset` object now encompasses all of the methods and attributes related to a CDN asset.\n\nThis means that all models with asset-related attribute and methods have been transformed to use this new design.\nAs an example, here's how these changes look for :attr:`Guild.icon` (of :class:`Asset` type):\n\n- ``Guild.icon`` (of :class:`str` type) has been replaced with :attr:`Guild.icon.key <Asset.key>`.\n- ``Guild.is_icon_animated`` has been replaced with :meth:`Guild.icon.is_animated <Asset.is_animated>`.\n- ``Guild.icon_url`` has been replaced with :attr:`Guild.icon`.\n- ``Guild.icon_url_as`` has been replaced with :meth:`Guild.icon.replace <Asset.replace>`.\n\n    - Helper methods :meth:`Asset.with_size`, :meth:`Asset.with_format`, and :meth:`Asset.with_static_format` have also been added.\n\nIn addition to this, :class:`Emoji` and :class:`PartialEmoji` now also share an interface similar to :class:`Asset`'s:\n\n- :attr:`Emoji.url` is now of :class:`str` type.\n- ``Emoji.url_as`` has been removed.\n- ``Emoji.url.read`` has been replaced with :meth:`Emoji.read`.\n- ``Emoji.url.save`` has been replaced with :meth:`Emoji.save`.\n\n:class:`Asset` now always represent an actually existing CDN asset. This means that:\n\n- ``str(x)`` on an :class:`Asset` can no longer return an empty string.\n- ``bool(x)`` on an :class:`Asset` can no longer return ``False``.\n- Attributes containing an optional :class:`Asset` can now be ``None``.\n\nThe following were affected by this change:\n\n- :attr:`AppInfo.cover_image`\n\n    - ``AppInfo.cover_image`` (replaced by :attr:`AppInfo.cover_image.key <Asset.key>`)\n    - ``AppInfo.cover_image_url`` (replaced by :attr:`AppInfo.cover_image`)\n\n        - The new attribute may now be ``None``.\n\n    - ``AppInfo.cover_image_url_as`` (replaced by :meth:`AppInfo.cover_image.replace <Asset.replace>`)\n\n- :attr:`AppInfo.icon`\n\n    - ``AppInfo.icon`` (replaced by :attr:`AppInfo.icon.key <Asset.key>`)\n    - ``AppInfo.icon_url`` (replaced by :attr:`AppInfo.icon`)\n\n        - The new attribute may now be ``None``.\n\n    - ``AppInfo.icon_url_as`` (replaced by :meth:`AppInfo.icon.replace <Asset.replace>`)\n\n- :class:`AuditLogDiff`\n\n    - :attr:`AuditLogDiff.avatar` is now of :class:`Asset` type.\n    - :attr:`AuditLogDiff.icon` is now of :class:`Asset` type.\n    - :attr:`AuditLogDiff.splash` is now of :class:`Asset` type.\n\n- :attr:`Emoji.url`\n\n    - :attr:`Emoji.url` is now of :class:`str` type.\n    - ``Emoji.url_as`` has been removed.\n    - ``Emoji.url.read`` (replaced by :meth:`Emoji.read`)\n    - ``Emoji.url.save`` (replaced by :meth:`Emoji.save`)\n\n- :attr:`GroupChannel.icon`\n\n    - ``GroupChannel.icon`` (replaced by :attr:`GroupChannel.icon.key <Asset.key>`)\n    - ``GroupChannel.icon_url`` (replaced by :attr:`GroupChannel.icon`)\n\n        - The new attribute may now be ``None``.\n\n    - ``GroupChannel.icon_url_as`` (replaced by :meth:`GroupChannel.icon.replace <Asset.replace>`)\n\n- :attr:`Guild.banner`\n\n    - ``Guild.banner`` (replaced by :attr:`Guild.banner.key <Asset.key>`)\n    - ``Guild.banner_url`` (replaced by :attr:`Guild.banner`)\n\n        - The new attribute may now be ``None``.\n\n    - ``Guild.banner_url_as`` (replaced by :meth:`Guild.banner.replace <Asset.replace>`)\n\n- :attr:`Guild.discovery_splash`\n\n    - ``Guild.discovery_splash`` (replaced by :attr:`Guild.discovery_splash.key <Asset.key>`)\n    - ``Guild.discovery_splash_url`` (replaced by :attr:`Guild.discovery_splash`)\n\n        - The new attribute may now be ``None``.\n\n    - ``Guild.discovery_splash_url_as`` (replaced by :meth:`Guild.discovery_splash.replace <Asset.replace>`)\n\n- :attr:`Guild.icon`\n\n    - ``Guild.icon`` (replaced by :attr:`Guild.icon.key <Asset.key>`)\n    - ``Guild.is_icon_animated`` (replaced by :meth:`Guild.icon.is_animated <Asset.is_animated>`)\n    - ``Guild.icon_url`` (replaced by :attr:`Guild.icon`)\n\n        - The new attribute may now be ``None``.\n\n    - ``Guild.icon_url_as`` (replaced by :meth:`Guild.icon.replace <Asset.replace>`)\n\n- :attr:`Guild.splash`\n\n    - ``Guild.splash`` (replaced by :attr:`Guild.splash.key <Asset.key>`)\n    - ``Guild.splash_url`` (replaced by :attr:`Guild.splash`)\n\n        - The new attribute may now be ``None``.\n\n    - ``Guild.splash_url_as`` (replaced by :meth:`Guild.splash.replace <Asset.replace>`)\n\n- :attr:`Member.avatar`\n\n    - ``Member.avatar`` (replaced by :attr:`Member.avatar.key <Asset.key>`)\n    - ``Member.is_avatar_animated`` (replaced by :meth:`Member.avatar.is_animated <Asset.is_animated>`)\n    - ``Member.avatar_url`` (replaced by :attr:`Member.avatar`)\n\n        - The new attribute may now be ``None``.\n\n    - ``Member.avatar_url_as`` (replaced by :meth:`Member.avatar.replace <Asset.replace>`)\n\n- :attr:`Member.default_avatar`\n\n    - ``Member.default_avatar`` (replaced by :attr:`Member.default_avatar.key <Asset.key>`)\n    - ``Member.default_avatar_url`` (replaced by :attr:`Member.default_avatar`)\n    - ``Member.default_avatar_url_as`` (replaced by :meth:`Member.default_avatar.replace <Asset.replace>`)\n\n- :attr:`PartialEmoji.url`\n\n    - :attr:`PartialEmoji.url` is now of :class:`str` type.\n    - ``PartialEmoji.url_as`` has been removed.\n    - ``PartialEmoji.url.read`` (replaced by :meth:`PartialEmoji.read`)\n    - ``PartialEmoji.url.save`` (replaced by :meth:`PartialEmoji.save`)\n\n- :attr:`PartialInviteGuild.banner`\n\n    - ``PartialInviteGuild.banner`` (replaced by :attr:`PartialInviteGuild.banner.key <Asset.key>`)\n    - ``PartialInviteGuild.banner_url`` (replaced by :attr:`PartialInviteGuild.banner`)\n\n        - The new attribute may now be ``None``.\n\n    - ``PartialInviteGuild.banner_url_as`` (replaced by :meth:`PartialInviteGuild.banner.replace <Asset.replace>`)\n\n- :attr:`PartialInviteGuild.icon`\n\n    - ``PartialInviteGuild.icon`` (replaced by :attr:`PartialInviteGuild.icon.key <Asset.key>`)\n    - ``PartialInviteGuild.is_icon_animated`` (replaced by :meth:`PartialInviteGuild.icon.is_animated <Asset.is_animated>`)\n    - ``PartialInviteGuild.icon_url`` (replaced by :attr:`PartialInviteGuild.icon`)\n\n        - The new attribute may now be ``None``.\n\n    - ``PartialInviteGuild.icon_url_as`` (replaced by :meth:`PartialInviteGuild.icon.replace <Asset.replace>`)\n\n- :attr:`PartialInviteGuild.splash`\n\n    - ``PartialInviteGuild.splash`` (replaced by :attr:`PartialInviteGuild.splash.key <Asset.key>`)\n    - ``PartialInviteGuild.splash_url`` (replaced by :attr:`PartialInviteGuild.splash`)\n\n        - The new attribute may now be ``None``.\n\n    - ``PartialInviteGuild.splash_url_as`` (replaced by :meth:`PartialInviteGuild.splash.replace <Asset.replace>`)\n\n- :attr:`Team.icon`\n\n    - ``Team.icon`` (replaced by :attr:`Team.icon.key <Asset.key>`)\n    - ``Team.icon_url`` (replaced by :attr:`Team.icon`)\n\n        - The new attribute may now be ``None``.\n\n    - ``Team.icon_url_as`` (replaced by :meth:`Team.icon.replace <Asset.replace>`)\n\n- :attr:`User.avatar`\n\n    - ``User.avatar`` (replaced by :attr:`User.avatar.key <Asset.key>`)\n    - ``User.is_avatar_animated`` (replaced by :meth:`User.avatar.is_animated <Asset.is_animated>`)\n    - ``User.avatar_url`` (replaced by :attr:`User.avatar`)\n\n        - The new attribute may now be ``None``.\n\n    - ``User.avatar_url_as`` (replaced by :meth:`User.avatar.replace <Asset.replace>`)\n\n- :attr:`User.default_avatar`\n\n    - ``User.default_avatar`` (replaced by :attr:`User.default_avatar.key <Asset.key>`)\n    - ``User.default_avatar_url`` (replaced by :attr:`User.default_avatar`)\n    - ``User.default_avatar_url_as`` (replaced by :meth:`User.default_avatar.replace <Asset.replace>`)\n\n- :attr:`Webhook.avatar`\n\n    - ``Webhook.avatar`` (replaced by :attr:`Webhook.avatar.key <Asset.key>`)\n    - ``Webhook.avatar_url`` (replaced by :attr:`Webhook.avatar`)\n\n        - The new attribute may now be ``None``.\n\n    - ``Webhook.avatar_url_as`` (replaced by :meth:`Webhook.avatar.replace <Asset.replace>`)\n\n.. _migrating_2_0_thread_support:\n\nThread Support\n----------------\n\nv2.0 has been updated to use a newer API gateway version which supports threads and as a result of this had to make few breaking changes. Most notably messages sent in guilds can, in addition to a :class:`TextChannel`, be sent in a :class:`Thread`.\n\nThe main differences between text channels and threads are:\n\n- Threads do not have their own permissions, they inherit the permissions of their parent channel.\n\n    - This means that threads do not have these attributes:\n\n        - ``changed_roles``\n        - ``overwrites``\n        - ``permissions_synced``\n\n    .. note::\n\n        Text channels have a few dedicated permissions for threads:\n\n        - :attr:`Permissions.manage_threads`\n        - :attr:`Permissions.create_public_threads`\n        - :attr:`Permissions.create_private_threads`\n        - :attr:`Permissions.send_messages_in_threads`\n\n- Threads do not have their own NSFW status, they inherit it from their parent channel.\n\n    - This means that :class:`Thread` does not have an ``nsfw`` attribute.\n\n- Threads do not have their own topic.\n\n    - This means that :class:`Thread` does not have a ``topic`` attribute.\n\n- Threads do not have their own position in the channel list.\n\n    - This means that :class:`Thread` does not have a ``position`` attribute.\n\n- :attr:`Thread.created_at` of threads created before 10 January 2022 is ``None``.\n- :attr:`Thread.members` is of type List[:class:`ThreadMember`] rather than List[:class:`Member`]\n\n    - Most of the time, this data is not provided and a call to :meth:`Thread.fetch_members` is needed.\n\nFor convenience, :class:`Thread` has a set of properties and methods that return the information about the parent channel:\n\n- :attr:`Thread.category`\n- :attr:`Thread.category_id`\n- :meth:`Thread.is_news`\n- :meth:`Thread.is_nsfw`\n- :meth:`Thread.permissions_for`\n\n    - Note that this outputs the permissions of the parent channel and you might need to check for different permissions\n      when trying to determine if a member can do something.\n\n      Here are some notable examples:\n\n      - A guild member can send messages in a text channel if they have :attr:`~Permissions.send_messages` permission in it.\n\n        A guild member can send messages in a public thread if:\n            - They have :attr:`~Permissions.send_messages_in_threads` permission in its parent channel.\n            - The thread is not :attr:`~Thread.locked`.\n\n        A guild member can send messages in a private thread if:\n            - They have :attr:`~Permissions.send_messages_in_threads` permission in its parent channel.\n            - They're either already a member of the thread\n              or have a :attr:`~Permissions.manage_threads` permission in its parent channel.\n            - The thread is not :attr:`~Thread.locked`.\n\n      - A guild member can edit a text channel if they have :attr:`~Permissions.manage_channels` permission in it.\n\n        A guild member can edit a thread if they have :attr:`~Permissions.manage_threads` permission in its parent channel.\n\n        .. note::\n\n            A thread's :attr:`~Thread.owner` can archive a (not-locked) thread and edit its :attr:`~Thread.name`\n            and :attr:`~Thread.auto_archive_duration` without :attr:`~Permissions.manage_threads` permission.\n\n      - A guild member can react with an emoji to messages in a text channel if:\n            - They have :attr:`~Permissions.read_message_history` permission in it.\n            - They have :attr:`~Permissions.add_reactions` permission in it or the message already has that emoji reaction.\n\n        A guild member can react with an emoji to messages in a public thread if:\n            - They have :attr:`~Permissions.read_message_history` permission in its parent channel.\n            - They have :attr:`~Permissions.add_reactions` permission in its parent channel or the message already has that emoji reaction.\n            - The thread is not :attr:`~Thread.archived`. Note that the guild member can unarchive a thread\n              (if it's not :attr:`~Thread.locked`) to react to a message.\n\n        A guild member can react with an emoji to messages in a private thread if:\n            - They have :attr:`~Permissions.read_message_history` permission in its parent channel.\n            - They have :attr:`~Permissions.add_reactions` permission in its parent channel or the message already has that emoji reaction.\n            - They're either already a member of the thread\n              or have a :attr:`~Permissions.manage_threads` permission in its parent channel.\n            - The thread is not :attr:`~Thread.archived`. Note that the guild member can unarchive a thread\n              (if it's not :attr:`~Thread.locked`) to react to a message.\n\nThe following changes have been made:\n\n- :attr:`Message.channel` may now be a :class:`Thread`.\n- :attr:`Message.channel_mentions` list may now contain a :class:`Thread`.\n- :attr:`AuditLogEntry.target` may now be a :class:`Thread`.\n- :attr:`PartialMessage.channel` may now be a :class:`Thread`.\n- :attr:`Guild.get_channel` does not return :class:`Thread`\\s.\n\n    - If you're looking to get a channel or thread, use :attr:`Guild.get_channel_or_thread` instead.\n    - If you're only looking to get threads, use :attr:`Guild.get_thread` or :attr:`TextChannel.get_thread` instead.\n\n- ``channel`` parameter in :func:`on_guild_channel_pins_update` may now be a :class:`Thread`.\n- ``channel`` parameter in :func:`on_typing` may now be a :class:`Thread`.\n- :meth:`Client.fetch_channel` may now return :class:`Thread`.\n- :meth:`Client.get_channel` may now return :class:`Thread`.\n- :meth:`Guild.fetch_channel` may now return :class:`Thread`.\n\nRemoving In-Place Edits\n-------------------------\n\nMost of the model methods that previously edited the model in-place have been updated to no longer do this.\nInstead, these methods will now return a new instance of the newly updated model.\nThis has been done to avoid the library running into race conditions between in-place edits and gateway events on model updates. See :issue:`4098` for more information.\n\nQuick example:\n\n.. code:: python\n\n    # before\n    await member.edit(nick='new nick')\n    await member.send(f'Your new nick is {member.nick}')\n\n    # after\n    updated_member = await member.edit(nick='new nick')\n    await member.send(f'Your new nick is {updated_member.nick}')\n\nThe following have been changed:\n\n- :meth:`CategoryChannel.edit`\n\n    - Note that this method will return ``None`` instead of :class:`CategoryChannel` if the edit was only positional.\n\n- :meth:`Member.edit`\n\n    - Note that this method only returns the updated :class:`Member` when certain fields are updated.\n\n- :meth:`StageChannel.edit`\n\n    - Note that this method will return ``None`` instead of :class:`StageChannel` if the edit was only positional.\n\n- :meth:`TextChannel.edit`\n\n    - Note that this method will return ``None`` instead of :class:`TextChannel` if the edit was only positional.\n\n- :meth:`VoiceChannel.edit`\n\n    - Note that this method will return ``None`` instead of :class:`VoiceChannel` if the edit was only positional.\n\n- :meth:`ClientUser.edit`\n- :meth:`Emoji.edit`\n- :meth:`Guild.edit`\n- :meth:`Message.edit`\n- :meth:`Role.edit`\n- :meth:`Template.edit`\n- :meth:`Template.sync`\n- :meth:`Webhook.edit`\n- :meth:`Webhook.edit_message`\n- :meth:`WebhookMessage.edit`\n\nSticker Changes\n-----------------\n\nDiscord has changed how their stickers work and as such, sticker support has been reworked.\n\nThe following breaking changes have been made:\n\n- Type of :attr:`Message.stickers` changed to List[:class:`StickerItem`].\n\n    - To get the :class:`Sticker` from :class:`StickerItem`, use :meth:`StickerItem.fetch`\n      or (only for stickers from guilds the bot is in) :meth:`Client.get_sticker`.\n\n- :attr:`Sticker.format` is now of :class:`StickerFormatType` type.\n- ``Sticker.tags`` has been removed.\n\n    - Depending on type of the sticker, :attr:`StandardSticker.tags` or :attr:`GuildSticker.emoji` can be used instead.\n\n- ``Sticker.image`` and related methods have been removed.\n- ``Sticker.preview_image`` and related methods have been removed.\n- :attr:`AuditLogDiff.type` is now of Union[:class:`ChannelType`, :class:`StickerType`] type.\n- The old ``StickerType`` enum has been renamed to :class:`StickerFormatType`.\n\n    - :class:`StickerType` now refers to a sticker type (official sticker vs guild-uploaded sticker) rather than its format type.\n\nIntegrations Changes\n----------------------\n\nTo support the new integration types, integration support has been reworked.\n\nThe following breaking changes have been made:\n\n- The old ``Integration`` class has been renamed to :class:`StreamIntegration`.\n- :meth:`Guild.integrations` now returns subclasses of the new :class:`Integration` class.\n\nPresence Updates Now Have A Separate Event\n--------------------------------------------\n\nPresence updates (changes in member's status and activity) now have a separate :func:`on_presence_update` event.\n:func:`on_member_update` event is now only called on member updates (changes in nickname, role, pending status, etc.).\n\nFrom API perspective, these are separate events and as such, this change improves library's consistency with the API.\nPresence updates usually are 90% of all handled events so splitting these should benefit listeners that were only interested\nin member updates.\n\nQuick example:\n\n.. code:: python\n\n    # before\n    @client.event\n    async def on_member_update(self, before, after):\n        if before.nick != after.nick:\n            await nick_changed(before, after)\n        if before.status != after.status:\n            await status_changed(before, after)\n\n    # after\n    @client.event\n    async def on_member_update(self, before, after):\n        if before.nick != after.nick:\n            await nick_changed(before, after)\n\n    @client.event\n    async def on_presence_update(self, before, after):\n        if before.status != after.status:\n            await status_changed(before, after)\n\nMoving Away From Custom AsyncIterator\n--------------------------------------\n\nAsynchronous iterators in v1.0 were implemented using a special class named ``AsyncIterator``.\nv2.0 instead provides regular asynchronous iterators with no added utility methods.\n\nThis means that usage of the following utility methods is no longer possible:\n\n- ``AsyncIterator.next()``\n\n    Usage of an explicit ``async for`` loop should generally be preferred:\n\n    .. code:: python\n\n        # before\n        it = channel.history()\n        while True:\n            try:\n                message = await self.next()\n            except discord.NoMoreItems:\n                break\n            print(f'Found message with ID {message.id}')\n\n        # after\n        async for message in channel.history():\n            print(f'Found message with ID {message.id}')\n\n    If you need to get next item from an iterator without a loop,\n    you can use :func:`anext` (new in Python 3.10) or :meth:`~object.__anext__` instead:\n\n    .. code:: python\n\n        # before\n        it = channel.history()\n        first = await it.next()\n        if first.content == 'do not iterate':\n            return\n        async for message in it:\n            ...\n\n        # after\n        it = channel.history()\n        first = await anext(it)  # await it.__anext__() on Python<3.10\n        if first.content == 'do not iterate':\n            return\n        async for message in it:\n            ...\n\n- ``AsyncIterator.get()``\n\n    .. code:: python\n\n        # before\n        msg = await channel.history().get(author__name='Dave')\n\n        # after\n        msg = await discord.utils.get(channel.history(), author__name='Dave')\n\n- ``AsyncIterator.find()``\n\n    .. code:: python\n\n        def predicate(event):\n            return event.reason is not None\n\n        # before\n        event = await guild.audit_logs().find(predicate)\n\n        # after\n        event = await discord.utils.find(predicate, guild.audit_logs())\n\n- ``AsyncIterator.flatten()``\n\n    .. code:: python\n\n        # before\n        users = await reaction.users().flatten()\n\n        # after\n        users = [user async for user in reaction.users()]\n\n- ``AsyncIterator.chunk()``\n\n    .. code:: python\n\n        # before\n        async for leader, *users in reaction.users().chunk(3):\n            ...\n\n        # after\n        async for leader, *users in discord.utils.as_chunks(reaction.users(), 3):\n            ...\n\n- ``AsyncIterator.map()``\n\n    .. code:: python\n\n        # before\n        content_of_messages = []\n        async for content in channel.history().map(lambda m: m.content):\n            content_of_messages.append(content)\n\n        # after\n        content_of_messages = [message.content async for message in channel.history()]\n\n- ``AsyncIterator.filter()``\n\n    .. code:: python\n\n        def predicate(message):\n            return not message.author.bot\n\n        # before\n        user_messages = []\n        async for message in channel.history().filter(lambda m: not m.author.bot):\n            user_messages.append(message)\n\n        # after\n        user_messages = [message async for message in channel.history() if not m.author.bot]\n\nTo ease this transition, these changes have been made:\n\n- Added :func:`utils.as_chunks` as an alternative for ``AsyncIter.chunk``.\n- Added support for :term:`asynchronous iterator` to :func:`utils.find`.\n- Added support for :term:`asynchronous iterator` to :func:`utils.get`.\n\nThe return type of the following methods has been changed to an :term:`asynchronous iterator`:\n\n- :meth:`abc.Messageable.history`\n- :meth:`Client.fetch_guilds`\n- :meth:`Guild.audit_logs`\n- :meth:`Guild.fetch_members`\n- :meth:`Reaction.users`\n\nThe ``NoMoreItems`` exception was removed as calling :func:`anext` or :meth:`~object.__anext__` on an\n:term:`asynchronous iterator` will now raise :class:`StopAsyncIteration`.\n\nChanging certain lists to be lazy sequences instead\n-----------------------------------------------------\n\nIn order to improve performance when calculating the length of certain lists, certain attributes were changed to return a sequence rather than a :class:`list`.\n\nA sequence is similar to a :class:`list` except it is read-only. In order to get a list again you can call :class:`list` on the resulting sequence.\n\nThe following properties were changed to return a sequence instead of a list:\n\n- :attr:`Client.guilds`\n- :attr:`Client.emojis`\n- :attr:`Client.private_channels`\n- :attr:`Guild.roles`\n- :attr:`Guild.channels`\n- :attr:`Guild.members`\n\nThis change should be transparent, unless you are modifying the sequence by doing things such as ``list.append``.\n\n\nEmbed Changes\n--------------\n\nOriginally, embeds used a special sentinel to denote emptiness or remove an attribute from display. The ``Embed.Empty`` sentinel was made when Discord's embed design was in a nebulous state of flux. Since then, the embed design has stabilised and thus the sentinel is seen as legacy.\n\nTherefore, ``Embed.Empty`` has been removed in favour of ``None``.\n\nAdditionally, ``Embed.__eq__`` has been implemented thus embeds becoming unhashable (e.g. using them in sets or dict keys).\n\n.. code-block:: python\n\n    # before\n    embed = discord.Embed(title='foo')\n    embed.title = discord.Embed.Empty\n    embed == embed.copy() # False\n\n    # after\n    embed = discord.Embed(title='foo')\n    embed.title = None\n    embed == embed.copy() # True\n    {embed, embed} # Raises TypeError\n\n\n\nRemoval of ``InvalidArgument`` Exception\n-------------------------------------------\n\nThe custom ``InvalidArgument`` exception has been removed and functions and methods that\nraised it are now raising :class:`TypeError` and/or :class:`ValueError` instead.\n\nThe following methods have been changed:\n\n- :meth:`Message.add_reaction`\n- :meth:`AutoShardedClient.change_presence`\n- :meth:`Client.change_presence`\n- :meth:`Reaction.clear`\n- :meth:`Message.clear_reaction`\n- :meth:`Guild.create_category`\n- :meth:`Guild.create_custom_emoji`\n- :meth:`Client.create_guild`\n- :meth:`Template.create_guild`\n- :meth:`StageChannel.create_instance`\n- :meth:`Guild.create_role`\n- :meth:`Guild.create_stage_channel`\n- :meth:`Guild.create_text_channel`\n- :meth:`Guild.create_voice_channel`\n- :meth:`TextChannel.create_webhook`\n- :meth:`Webhook.delete`\n- :meth:`WebhookMessage.delete`\n- :meth:`Webhook.delete_message`\n- :meth:`CategoryChannel.edit`\n- :meth:`ClientUser.edit`\n- :meth:`Guild.edit`\n- :meth:`Message.edit`\n- :meth:`Role.edit`\n- :meth:`StageChannel.edit`\n- :meth:`StageInstance.edit`\n- :meth:`StreamIntegration.edit`\n- :meth:`TextChannel.edit`\n- :meth:`VoiceChannel.edit`\n- :meth:`Webhook.edit`\n- :meth:`WebhookMessage.edit`\n- :meth:`Webhook.edit_message`\n- :meth:`Guild.edit_role_positions`\n- :meth:`Guild.estimate_pruned_members`\n- :meth:`TextChannel.follow`\n- :meth:`Webhook.from_url`\n- :meth:`abc.GuildChannel.move`\n- :meth:`Guild.prune_members`\n- :meth:`Message.remove_reaction`\n- :meth:`Message.reply`\n- :meth:`abc.Messageable.send`\n- :meth:`Webhook.send`\n- :meth:`abc.GuildChannel.set_permissions`\n\nLogging Changes\n----------------\n\nThe library now provides a default logging configuration if using :meth:`Client.run`. To disable it, pass ``None`` to the ``log_handler`` keyword parameter. Since the library now provides a default logging configuration, certain methods were changed to no longer print to :data:`sys.stderr` but use the logger instead:\n\n- :meth:`Client.on_error`\n- :meth:`discord.ext.tasks.Loop.error`\n- :meth:`discord.ext.commands.Bot.on_command_error`\n- :meth:`VoiceClient.play`\n\nFor more information, check :doc:`logging`.\n\nText in Voice\n---------------\n\nIn order to support text in voice functionality, a few changes had to be made:\n\n- :class:`VoiceChannel` is now :class:`abc.Messageable` so it can have messages sent and received.\n- :attr:`Message.channel` can now be :class:`VoiceChannel`.\n\nIn the future this may include :class:`StageChannel` when Discord implements it.\n\nRemoval of ``StoreChannel``\n-----------------------------\n\nDiscord's API has removed store channels as of `March 10th, 2022 <https://support-dev.discord.com/hc/en-us/articles/6309018858647>`_. Therefore, the library has removed support for it as well.\n\nThis removes the following:\n\n- ``StoreChannel``\n- ``commands.StoreChannelConverter``\n- ``ChannelType.store``\n\nChange in ``Guild.bans`` endpoint\n-----------------------------------\n\nDue to a breaking API change by Discord, :meth:`Guild.bans` no longer returns a list of every ban in the guild but instead is paginated using an asynchronous iterator.\n\n.. code-block:: python3\n\n    # before\n\n    bans = await guild.bans()\n\n    # after\n    async for ban in guild.bans(limit=1000):\n        ...\n\nFlag classes now have a custom ``bool()`` implementation\n--------------------------------------------------------\n\nTo allow library users to easily check whether an instance of a flag class has any flags enabled,\nusing `bool` on them will now only return ``True`` if at least one flag is enabled.\n\nThis means that evaluating instances of the following classes in a bool context (such as ``if obj:``) may no longer return ``True``:\n\n- :class:`Intents`\n- :class:`MemberCacheFlags`\n- :class:`MessageFlags`\n- :class:`Permissions`\n- :class:`PublicUserFlags`\n- :class:`SystemChannelFlags`\n\nFunction Signature Changes\n----------------------------\n\nParameters in the following methods are now all positional-only:\n\n- :meth:`AutoShardedClient.get_shard`\n- :meth:`Client.get_channel`\n- :meth:`Client.fetch_channel`\n- :meth:`Guild.get_channel`\n- :meth:`Guild.fetch_channel`\n- :meth:`Client.get_emoji`\n- :meth:`Guild.fetch_emoji`\n- :meth:`Client.get_guild`\n- :meth:`Client.fetch_guild`\n- :meth:`Client.delete_invite`\n- :meth:`Guild.get_member`\n- :meth:`Guild.get_member_named`\n- :meth:`Guild.fetch_member`\n- :meth:`Client.get_user`\n- :meth:`Client.fetch_user`\n- :meth:`Guild.get_role`\n- :meth:`Client.fetch_webhook`\n- :meth:`Client.fetch_widget`\n- :meth:`Message.add_reaction`\n- :meth:`Client.on_error`\n- :meth:`abc.Messageable.fetch_message`\n- :meth:`abc.GuildChannel.permissions_for`\n- :meth:`DMChannel.get_partial_message`\n- :meth:`TextChannel.get_partial_message`\n- :meth:`TextChannel.delete_messages`\n- :meth:`Webhook.delete_message`\n- :func:`utils.find`\n- :func:`utils.snowflake_time`\n\nThe following parameters are now positional-only:\n\n- ``iterable`` in :func:`utils.get`\n- ``event_method`` in :meth:`Client.on_error`\n- ``event`` in :meth:`Client.wait_for`\n- ``dt`` in :func:`utils.time_snowflake`\n\nThe following are now keyword-only:\n\n- Parameters in :meth:`Reaction.users`\n- Parameters in :meth:`Client.create_guild`\n- ``permissions``, ``guild``, ``redirect_uri``, and ``scopes`` parameters in :func:`utils.oauth_url`\n- ``high`` in :func:`utils.snowflake_time`\n\nThe library now less often uses ``None`` as the default value for function/method parameters.\n\nAs a result, these parameters can no longer be ``None``:\n\n- ``size``, ``format``, and ``static_format`` in :meth:`Asset.replace`\n- ``check`` in :meth:`TextChannel.purge`\n- ``icon`` and ``code`` in :meth:`Client.create_guild`\n- ``roles`` in :meth:`Emoji.edit`\n- ``topic``, ``position`` and ``overwrites`` in :meth:`Guild.create_text_channel`\n- ``position`` and ``overwrites`` in :meth:`Guild.create_voice_channel`\n- ``topic``, ``position`` and ``overwrites`` in :meth:`Guild.create_stage_channel`\n- ``position`` and ``overwrites`` in :meth:`Guild.create_category`\n- ``roles`` in :meth:`Guild.prune_members`\n- ``roles`` in :meth:`Guild.estimate_pruned_members`\n- ``description`` in :meth:`Guild.create_template`\n- ``roles`` in :meth:`Guild.create_custom_emoji`\n- ``before``, ``after``, ``oldest_first``, ``user``, and ``action`` in :meth:`Guild.audit_logs`\n- ``enable_emoticons`` in :meth:`StreamIntegration.edit`\n- ``mute``, ``deafen``, ``suppress``, and ``roles`` in :meth:`Member.edit`\n- ``position`` in :meth:`Role.edit`\n- ``icon`` in :meth:`Template.create_guild`\n- ``name`` in :meth:`Template.edit`\n- ``permissions``, ``guild``, ``redirect_uri``, ``scopes`` in :meth:`utils.oauth_url`\n- ``content``, ``username``, ``avatar_url``, ``tts``, ``file``, ``files``, ``embed``, ``embeds``, and ``allowed_mentions`` in :meth:`Webhook.send`\n\nAllowed types for the following parameters have been changed:\n\n- ``rtc_region`` in :meth:`Guild.create_voice_channel` is now of type Optional[:class:`str`].\n- ``rtc_region`` in :meth:`StageChannel.edit` is now of type Optional[:class:`str`].\n- ``rtc_region`` in :meth:`VoiceChannel.edit` is now of type Optional[:class:`str`].\n- ``preferred_locale`` in :meth:`Guild.edit` is now of type :class:`Locale`.\n\nAttribute Type Changes\n------------------------\n\nThe following changes have been made:\n\n- :attr:`DMChannel.recipient` may now be ``None``.\n- :meth:`Guild.vanity_invite` may now be ``None``. This has been done to fix an issue with the method returning a broken :class:`Invite` object.\n- :meth:`Widget.fetch_invite` may now be ``None``.\n- :attr:`Guild.shard_id` is now ``0`` instead of ``None`` if :class:`AutoShardedClient` is not used.\n- :attr:`Guild.mfa_level` is now of type :class:`MFALevel`.\n- :attr:`Guild.member_count` is now of type Optional[:class:`int`].\n- :attr:`AuditLogDiff.mfa_level` is now of type :class:`MFALevel`.\n- :attr:`AuditLogDiff.rtc_region` is now of type :class:`str`.\n- :attr:`StageChannel.rtc_region` is now of type :class:`str`.\n- :attr:`VoiceChannel.rtc_region` is now of type :class:`str`.\n- :attr:`ClientUser.avatar` is now ``None`` when the default avatar is used.\n\n    - If you want the avatar that a user has displayed, consider :attr:`ClientUser.display_avatar`.\n\n- :attr:`Member.avatar` is now ``None`` when the default avatar is used.\n\n    - If you want the avatar that a member or user has displayed,\n      consider :attr:`Member.display_avatar` or :attr:`User.display_avatar`.\n\n- :attr:`User.avatar` is now ``None`` when the default avatar is used.\n\n    - If you want the avatar that a user has displayed, consider :attr:`User.display_avatar`.\n\n- :attr:`Webhook.avatar` is now ``None`` when the default avatar is used.\n\n    - If you want the avatar that a webhook has displayed, consider :attr:`Webhook.display_avatar`.\n\n- :attr:`AuditLogEntry.target` may now be a :class:`PartialMessageable`.\n- :attr:`PartialMessage.channel` may now be a :class:`PartialMessageable`.\n- :attr:`Guild.preferred_locale` is now of type :class:`Locale`.\n- :attr:`abc.GuildChannel.overwrites` keys can now have :class:`Object` in them.\n\nRemovals\n----------\n\nThe following deprecated functionality have been removed:\n\n- ``Client.request_offline_members``\n\n    - Use :meth:`Guild.chunk` instead.\n\n- ``AutoShardedClient.request_offline_members``\n\n    - Use :meth:`Guild.chunk` instead.\n\n- ``Client.logout``\n\n    - Use :meth:`Client.close` instead.\n\n- ``fetch_offline_members`` parameter from :class:`Client` constructor\n\n    - Use ``chunk_guild_at_startup`` instead.\n\n- ``Permissions.use_slash_commands`` and ``PermissionOverwrite.use_slash_commands``\n    - Use :attr:`Permissions.use_application_commands` and ``PermissionOverwrite.use_application_commands`` instead.\n\nThe following have been removed:\n\n- ``MemberCacheFlags.online``\n\n    - There is no replacement for this one. The current API version no longer provides enough data for this to be possible.\n\n- ``AppInfo.summary``\n\n    - There is no replacement for this one. The current API version no longer provides this field.\n\n- ``User.permissions_in`` and ``Member.permissions_in``\n\n    - Use :meth:`abc.GuildChannel.permissions_for` instead.\n\n- ``guild_subscriptions`` parameter from :class:`Client` constructor\n\n    - The current API version no longer provides this functionality. Use ``intents`` parameter instead.\n\n- :class:`VerificationLevel` aliases:\n\n    - ``VerificationLevel.table_flip`` - use :attr:`VerificationLevel.high` instead.\n    - ``VerificationLevel.extreme`` - use :attr:`VerificationLevel.highest` instead.\n    - ``VerificationLevel.double_table_flip`` - use :attr:`VerificationLevel.highest` instead.\n    - ``VerificationLevel.very_high`` - use :attr:`VerificationLevel.highest` instead.\n\n- ``topic`` parameter from :meth:`StageChannel.edit`\n\n    - The ``topic`` parameter must now be set via :meth:`StageChannel.create_instance`.\n\n- ``Reaction.custom_emoji``\n\n    - Use :meth:`Reaction.is_custom_emoji` instead.\n\n- ``AuditLogDiff.region``\n- ``Guild.region``\n- ``VoiceRegion``\n\n    - This has been marked deprecated by Discord and it was usually more or less out of date due to the pace they added them anyway.\n\n- ``region`` parameter from :meth:`Client.create_guild`\n- ``region`` parameter from :meth:`Template.create_guild`\n- ``region`` parameter from :meth:`Guild.edit`\n- ``on_private_channel_create`` event\n\n    - Discord API no longer sends channel create event for DMs.\n\n- ``on_private_channel_delete`` event\n\n    - Discord API no longer sends channel create event for DMs.\n\n- The undocumented private ``on_socket_response`` event\n\n    - Consider using the newer documented :func:`on_socket_event_type` event instead.\n\n- ``abc.Messageable.trigger_typing``\n\n    - Use :meth:`abc.Messageable.typing` with ``await`` instead.\n\nMiscellaneous Changes\n----------------------\n\nThe following changes have been made:\n\n- :func:`on_socket_raw_receive` is now only called if ``enable_debug_events`` is set on :class:`Client`.\n- :func:`on_socket_raw_receive` is now only called once the **complete** message is received and decompressed. The passed ``msg`` parameter is now always :class:`str`.\n- :func:`on_socket_raw_send` is now only called if ``enable_debug_events`` is set on :class:`Client`.\n- The documented return type for :meth:`Guild.fetch_channels` changed to Sequence[:class:`abc.GuildChannel`].\n- :func:`utils.resolve_invite` now returns a :class:`ResolvedInvite` class.\n- :func:`utils.oauth_url` now defaults to ``bot`` and ``applications.commands`` scopes when not given instead of just ``bot``.\n- :meth:`abc.Messageable.typing` can no longer be used as a regular (non-async) context manager.\n- :attr:`Intents.emojis` is now an alias of :attr:`Intents.emojis_and_stickers`.\n\n    This may affect code that iterates through ``(name, value)`` pairs in an instance of this class:\n\n    .. code:: python\n\n        # before\n        friendly_names = {\n            ...,\n            'emojis': 'Emojis Intent',\n            ...,\n        }\n        for name, value in discord.Intents.all():\n            print(f'{friendly_names[name]}: {value}')\n\n        # after\n        friendly_names = {\n            ...,\n            'emojis_and_stickers': 'Emojis Intent',\n            ...,\n        }\n        for name, value in discord.Intents.all():\n            print(f'{friendly_names[name]}: {value}')\n\n- ``created_at`` is no longer part of :class:`abc.Snowflake`.\n\n    All of the existing classes still keep this attribute. It is just no longer part of this protocol.\n    This has been done because Discord reuses IDs (snowflakes) of some models in other models.\n    For example, if :class:`Thread` is created from a message, its :attr:`Thread.id` is equivalent to the ID of that message\n    and as such it doesn't contain information about creation time of the thread and :attr:`Thread.created_at` cannot be based on it.\n\n- :class:`Embed`'s bool implementation now returns ``True`` when embed has any data set.\n- Calling :meth:`Emoji.edit` without ``roles`` argument no longer makes the emoji available to everyone.\n\n    - To make the emoji available to everyone, pass an empty list to ``roles`` instead.\n\n- The old ``Colour.blurple`` has been renamed to :attr:`Colour.og_blurple`.\n\n    - :attr:`Colour.blurple` refers to a different colour now.\n\n- :attr:`Message.type` is now set to :attr:`MessageType.reply` when a message is a reply.\n\n    - This is caused by a difference in behavior in the current Discord API version.\n\n- :meth:`Message.edit` now merges object passed in ``allowed_mentions`` parameter with :attr:`Client.allowed_mentions`.\n  If the parameter isn't provided, the defaults given by :attr:`Client.allowed_mentions` are used instead.\n\n- :meth:`Permissions.stage_moderator` now includes the :attr:`Permissions.manage_channels` permission and the :attr:`Permissions.request_to_speak` permission is no longer included.\n\n- :attr:`File.filename` will no longer be ``None``, in situations where previously this was the case the filename is set to ``'untitled'``.\n\n- :attr:`Message.application` will no longer be a raw :class:`dict` of the API payload and now returns an instance of :class:`MessageApplication`.\n\n:meth:`VoiceProtocol.connect` signature changes.\n--------------------------------------------------\n\n:meth:`VoiceProtocol.connect` will now be passed 2 keyword only arguments, ``self_deaf`` and ``self_mute``. These indicate\nwhether or not the client should join the voice chat being deafened or muted.\n\n.. _migrating_2_0_commands:\n\nCommand Extension Changes\n---------------------------\n\n.. _migrating_2_0_commands_extension_cog_async:\n\nExtension and Cog Loading / Unloading is Now Asynchronous\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nAs an extension to the :ref:`asyncio changes <migrating_2_0_client_async_setup>` the loading and unloading of extensions and cogs is now asynchronous.\n\nTo accommodate this, the following changes have been made:\n\n- The ``setup`` and ``teardown`` functions in extensions must now be coroutines.\n- :meth:`ext.commands.Bot.load_extension` must now be awaited.\n- :meth:`ext.commands.Bot.unload_extension` must now be awaited.\n- :meth:`ext.commands.Bot.reload_extension` must now be awaited.\n- :meth:`ext.commands.Bot.add_cog` must now be awaited.\n- :meth:`ext.commands.Bot.remove_cog` must now be awaited.\n\nQuick example of an extension setup function:\n\n.. code:: python\n\n    # before\n    def setup(bot):\n        bot.add_cog(MyCog(bot))\n\n    # after\n    async def setup(bot):\n        await bot.add_cog(MyCog(bot))\n\nQuick example of loading an extension:\n\n.. code:: python\n\n    # before\n    bot.load_extension('my_extension')\n\n    # after using setup_hook\n    class MyBot(commands.Bot):\n        async def setup_hook(self):\n            await self.load_extension('my_extension')\n\n    # after using async_with\n    async def main():\n        async with bot:\n            await bot.load_extension('my_extension')\n            await bot.start(TOKEN)\n\n    asyncio.run(main())\n\n\nConverters Are Now Generic Runtime Protocols\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n:class:`~ext.commands.Converter` is now a :func:`runtime-checkable <typing.runtime_checkable>` :class:`typing.Protocol`.\n\nThis results in a change of the base metaclass used by these classes\nwhich may affect user-created classes that inherit from :class:`~ext.commands.Converter`.\n\nQuick example:\n\n.. code:: python\n\n    # before\n    class SomeConverterMeta(type):\n        ...\n\n    class SomeConverter(commands.Converter, metaclass=SomeConverterMeta):\n        ...\n\n    # after\n    class SomeConverterMeta(type(commands.Converter)):\n        ...\n\n    class SomeConverter(commands.Converter, metaclass=SomeConverterMeta):\n        ...\n\nIn addition, :class:`~ext.commands.Converter` is now a :class:`typing.Generic` which (optionally) allows the users to\ndefine their type hints more accurately.\n\nFunction Signature Changes\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nParameters in the following methods are now all positional-only:\n\n- :meth:`ext.commands.when_mentioned`\n- :meth:`ext.commands.Bot.on_command_error`\n- :meth:`ext.commands.Bot.check`\n- :meth:`ext.commands.Bot.check_once`\n- :meth:`ext.commands.Bot.is_owner`\n- :meth:`ext.commands.Bot.before_invoke`\n- :meth:`ext.commands.Bot.after_invoke`\n- :meth:`ext.commands.Bot.get_prefix`\n- :meth:`ext.commands.Bot.invoke`\n- :meth:`ext.commands.Bot.process_commands`\n- :meth:`ext.commands.Command.is_on_cooldown`\n- :meth:`ext.commands.Command.reset_cooldown`\n- :meth:`ext.commands.Command.get_cooldown_retry_after`\n- :meth:`ext.commands.Command.error`\n- :meth:`ext.commands.Command.before_invoke`\n- :meth:`ext.commands.Command.after_invoke`\n- :meth:`ext.commands.Command.can_run`\n- :meth:`ext.commands.check`\n- :meth:`ext.commands.has_role`\n- :meth:`ext.commands.bot_has_role`\n- :meth:`ext.commands.before_invoke`\n- :meth:`ext.commands.after_invoke`\n- :meth:`ext.commands.HelpCommand.get_command_signature`\n- :meth:`ext.commands.HelpCommand.remove_mentions`\n- :meth:`ext.commands.HelpCommand.command_not_found`\n- :meth:`ext.commands.HelpCommand.subcommand_not_found`\n- :meth:`ext.commands.HelpCommand.get_max_size`\n- :meth:`ext.commands.HelpCommand.send_error_message`\n- :meth:`ext.commands.HelpCommand.on_help_command_error`\n- :meth:`ext.commands.HelpCommand.send_bot_help`\n- :meth:`ext.commands.HelpCommand.send_cog_help`\n- :meth:`ext.commands.HelpCommand.send_group_help`\n- :meth:`ext.commands.HelpCommand.send_command_help`\n- :meth:`ext.commands.HelpCommand.prepare_help_command`\n- :meth:`ext.commands.DefaultHelpCommand.shorten_text`\n- :meth:`ext.commands.DefaultHelpCommand.add_command_formatting`\n- :meth:`ext.commands.MinimalHelpCommand.get_command_signature`\n- :meth:`ext.commands.MinimalHelpCommand.add_bot_commands_formatting`\n- :meth:`ext.commands.MinimalHelpCommand.add_subcommand_formatting`\n- :meth:`ext.commands.MinimalHelpCommand.add_aliases_formatting`\n- :meth:`ext.commands.MinimalHelpCommand.add_command_formatting`\n\nThe following parameters are now positional-only:\n\n- ``func`` in :meth:`ext.commands.Bot.check`\n- ``func`` in :meth:`ext.commands.Bot.add_check`\n- ``func`` in :meth:`ext.commands.Bot.remove_check`\n- ``func`` in :meth:`ext.commands.Bot.check_once`\n- ``func`` in :meth:`ext.commands.Bot.add_listener`\n- ``func`` in :meth:`ext.commands.Bot.remove_listener`\n- ``message`` in :meth:`ext.commands.Bot.get_context`\n- ``func`` in :meth:`ext.commands.Command.add_check`\n- ``func`` in :meth:`ext.commands.Command.remove_check`\n- ``context`` in :meth:`ext.commands.Command.__call__`\n- ``commands`` in :meth:`ext.commands.HelpCommand.filter_commands`\n- ``ctx`` in :meth:`ext.commands.HelpCommand.command_callback`\n- ``func`` in :meth:`ext.commands.HelpCommand.add_check`\n- ``func`` in :meth:`ext.commands.HelpCommand.remove_check`\n- ``commands`` in :meth:`ext.commands.DefaultHelpCommand.add_indented_commands`\n- ``cog`` in :meth:`ext.commands.Bot.add_cog`\n- ``name`` in :meth:`ext.commands.Bot.get_cog`\n- ``name`` in :meth:`ext.commands.Bot.remove_cog`\n- ``command`` in :meth:`ext.commands.Context.invoke`\n- ``command`` in :meth:`ext.commands.GroupMixin.add_command`\n- ``name`` in :meth:`ext.commands.GroupMixin.get_command`\n- ``name`` in :meth:`ext.commands.GroupMixin.remove_command`\n\nThe following parameters have been removed:\n\n- ``self_bot`` from :class:`~ext.commands.Bot`\n\n    - This has been done due to the :ref:`migrating_2_0_userbot_removal` changes.\n\nThe library now less often uses ``None`` as the default value for function/method parameters.\n\nAs a result, these parameters can no longer be ``None``:\n\n- ``name`` in :meth:`ext.commands.Bot.add_listener`\n- ``name`` in :meth:`ext.commands.Bot.remove_listener`\n- ``name`` in :meth:`ext.commands.Bot.listen`\n- ``name`` in :meth:`ext.commands.Cog.listener`\n- ``name`` in :meth:`ext.commands.Command`\n- ``name`` and ``cls`` in :meth:`ext.commands.command`\n- ``name`` and ``cls`` in :meth:`ext.commands.group`\n\nRemovals\n~~~~~~~~~~\n\nThe following attributes have been removed:\n\n- ``original`` from the :exc:`~ext.commands.ExtensionNotFound`\n- ``type`` from the :class:`~ext.commands.Cooldown` class\n  that was provided by the :attr:`ext.commands.CommandOnCooldown.cooldown` attribute\n\n    - Use :attr:`ext.commands.CommandOnCooldown.type` instead.\n\n- ``clean_prefix`` from the :class:`~ext.commands.HelpCommand`\n\n    - Use :attr:`ext.commands.Context.clean_prefix` instead.\n\nMiscellaneous Changes\n~~~~~~~~~~~~~~~~~~~~~~\n\n- :meth:`ext.commands.Bot.add_cog` is now raising :exc:`ClientException` when a cog with the same name is already loaded.\n\n    - To override a cog, the new ``override`` parameter can be used.\n\n- When passing a callable to ``type`` argument of :meth:`~ext.commands.cooldown`,\n  it now needs to accept :class:`~ext.commands.Context` rather than :class:`Message` as its only argument.\n- Metaclass of :class:`~ext.commands.Context` changed from :class:`abc.ABCMeta` to :class:`type`.\n- Changed type of :attr:`ext.commands.Command.clean_params` from :class:`collections.OrderedDict` to :class:`dict`.\n  As the latter is guaranteed to preserve insertion order since Python 3.7.\n- :attr:`ext.commands.ChannelNotReadable.argument` may now be a :class:`Thread` due to the :ref:`migrating_2_0_thread_support` changes.\n- :attr:`ext.commands.NSFWChannelRequired.channel` may now be a :class:`Thread` due to the :ref:`migrating_2_0_thread_support` changes.\n- :attr:`ext.commands.Context.channel` may now be a :class:`Thread` due to the :ref:`migrating_2_0_thread_support` changes.\n- :attr:`ext.commands.Context.channel` may now be a :class:`PartialMessageable`.\n- ``MissingPermissions.missing_perms`` has been renamed to :attr:`ext.commands.MissingPermissions.missing_permissions`.\n- ``BotMissingPermissions.missing_perms`` has been renamed to :attr:`ext.commands.BotMissingPermissions.missing_permissions`.\n- :meth:`ext.commands.Cog.cog_load` has been added as part of the :ref:`migrating_2_0_commands_extension_cog_async` changes.\n- :meth:`ext.commands.Cog.cog_unload` may now be a :term:`coroutine` due to the :ref:`migrating_2_0_commands_extension_cog_async` changes.\n- :attr:`ext.commands.Command.clean_params` type now uses a custom :class:`inspect.Parameter` to handle defaults.\n\n.. _migrating_2_0_tasks:\n\nTasks Extension Changes\n-------------------------\n\n- Calling :meth:`ext.tasks.Loop.stop` in :meth:`~ext.tasks.Loop.before_loop` now stops the first iteration from running.\n- Calling :meth:`ext.tasks.Loop.change_interval` now changes the interval for the sleep time right away,\n  rather than on the next loop iteration.\n- ``loop`` parameter in :func:`ext.tasks.loop` can no longer be ``None``.\n\nMigrating to v1.0\n======================\n\nThe contents of that migration has been moved to :ref:`migrating_1_0`.\n"
  },
  {
    "path": "docs/migrating_to_async.rst",
    "content": ":orphan:\n\n.. currentmodule:: discord\n\n.. _migrating-to-async:\n\nMigrating to v0.10.0\n======================\n\nv0.10.0 is one of the biggest breaking changes in the library due to massive\nfundamental changes in how the library operates.\n\nThe biggest major change is that the library has dropped support to all versions prior to\nPython 3.4.2. This was made to support :mod:`asyncio`, in which more detail can be seen\n:issue:`in the corresponding issue <50>`. To reiterate this, the implication is that\n**python version 2.7 and 3.3 are no longer supported**.\n\nBelow are all the other major changes from v0.9.0 to v0.10.0.\n\nEvent Registration\n--------------------\n\nAll events before were registered using :meth:`Client.event`. While this is still\npossible, the events must be decorated with ``@asyncio.coroutine``.\n\nBefore:\n\n.. code-block:: python3\n\n    @client.event\n    def on_message(message):\n        pass\n\nAfter:\n\n.. code-block:: python3\n\n    @client.event\n    @asyncio.coroutine\n    def on_message(message):\n        pass\n\nOr in Python 3.5+:\n\n.. code-block:: python3\n\n    @client.event\n    async def on_message(message):\n        pass\n\nBecause there is a lot of typing, a utility decorator (:meth:`Client.async_event`) is provided\nfor easier registration. For example:\n\n.. code-block:: python3\n\n    @client.async_event\n    def on_message(message):\n        pass\n\n\nBe aware however, that this is still a coroutine and your other functions that are coroutines must\nbe decorated with ``@asyncio.coroutine`` or be ``async def``.\n\nEvent Changes\n--------------\n\nSome events in v0.9.0 were considered pretty useless due to having no separate states. The main\nevents that were changed were the ``_update`` events since previously they had no context on what\nwas changed.\n\nBefore:\n\n.. code-block:: python3\n\n    def on_channel_update(channel): pass\n    def on_member_update(member): pass\n    def on_status(member): pass\n    def on_server_role_update(role): pass\n    def on_voice_state_update(member): pass\n    def on_socket_raw_send(payload, is_binary): pass\n\n\nAfter:\n\n.. code-block:: python3\n\n    def on_channel_update(before, after): pass\n    def on_member_update(before, after): pass\n    def on_server_role_update(before, after): pass\n    def on_voice_state_update(before, after): pass\n    def on_socket_raw_send(payload): pass\n\nNote that ``on_status`` was removed. If you want its functionality, use :func:`on_member_update`.\nSee :ref:`discord-api-events` for more information. Other removed events include ``on_socket_closed``, ``on_socket_receive``, and ``on_socket_opened``.\n\n\nCoroutines\n-----------\n\nThe biggest change that the library went through is that almost every function in :class:`Client`\nwas changed to be a `coroutine <py:library/asyncio-task.html>`_. Functions\nthat are marked as a coroutine in the documentation must be awaited from or yielded from in order\nfor the computation to be done. For example...\n\nBefore:\n\n.. code-block:: python3\n\n    client.send_message(message.channel, 'Hello')\n\nAfter:\n\n.. code-block:: python3\n\n    yield from client.send_message(message.channel, 'Hello')\n\n    # or in python 3.5+\n    await client.send_message(message.channel, 'Hello')\n\nIn order for you to ``yield from`` or ``await`` a coroutine then your function must be decorated\nwith ``@asyncio.coroutine`` or ``async def``.\n\nIterables\n----------\n\nFor performance reasons, many of the internal data structures were changed into a dictionary to support faster\nlookup. As a consequence, this meant that some lists that were exposed via the API have changed into iterables\nand not sequences. In short, this means that certain attributes now only support iteration and not any of the\nsequence functions.\n\nThe affected attributes are as follows:\n\n- :attr:`Client.servers`\n- :attr:`Client.private_channels`\n- :attr:`Server.channels`\n- :attr:`Server.members`\n\nSome examples of previously valid behaviour that is now invalid\n\n.. code-block:: python3\n\n    if client.servers[0].name == \"test\":\n        # do something\n\nSince they are no longer :obj:`list`\\s, they no longer support indexing or any operation other than iterating.\nIn order to get the old behaviour you should explicitly cast it to a list.\n\n.. code-block:: python3\n\n    servers = list(client.servers)\n    # work with servers\n\n.. warning::\n\n    Due to internal changes of the structure, the order you receive the data in\n    is not in a guaranteed order.\n\nEnumerations\n------------\n\nDue to dropping support for versions lower than Python 3.4.2, the library can now use\n:doc:`py:library/enum` in places where it makes sense.\n\nThe common places where this was changed was in the server region, member status, and channel type.\n\nBefore:\n\n.. code-block:: python3\n\n    server.region == 'us-west'\n    member.status == 'online'\n    channel.type == 'text'\n\nAfter:\n\n.. code-block:: python3\n\n    server.region == discord.ServerRegion.us_west\n    member.status = discord.Status.online\n    channel.type == discord.ChannelType.text\n\nThe main reason for this change was to reduce the use of finicky strings in the API as this\ncould give users a false sense of power. More information can be found in the :ref:`discord-api-enums` page.\n\nProperties\n-----------\n\nA lot of function calls that returned constant values were changed into Python properties for ease of use\nin format strings.\n\nThe following functions were changed into properties:\n\n+----------------------------------------+--------------------------------------+\n|                 Before                 |                After                 |\n+----------------------------------------+--------------------------------------+\n| ``User.avatar_url()``                  | :attr:`User.avatar_url`              |\n+----------------------------------------+--------------------------------------+\n| ``User.mention()``                     | :attr:`User.mention`                 |\n+----------------------------------------+--------------------------------------+\n| ``Channel.mention()``                  | :attr:`Channel.mention`              |\n+----------------------------------------+--------------------------------------+\n| ``Channel.is_default_channel()``       | :attr:`Channel.is_default`           |\n+----------------------------------------+--------------------------------------+\n| ``Role.is_everyone()``                 | :attr:`Role.is_everyone`             |\n+----------------------------------------+--------------------------------------+\n| ``Server.get_default_role()``          | :attr:`Server.default_role`          |\n+----------------------------------------+--------------------------------------+\n| ``Server.icon_url()``                  | :attr:`Server.icon_url`              |\n+----------------------------------------+--------------------------------------+\n| ``Server.get_default_channel()``       | :attr:`Server.default_channel`       |\n+----------------------------------------+--------------------------------------+\n| ``Message.get_raw_mentions()``         | :attr:`Message.raw_mentions`         |\n+----------------------------------------+--------------------------------------+\n| ``Message.get_raw_channel_mentions()`` | :attr:`Message.raw_channel_mentions` |\n+----------------------------------------+--------------------------------------+\n\nMember Management\n-------------------\n\nFunctions that involved banning and kicking were changed.\n\n+--------------------------------+--------------------------+\n| Before                         | After                    |\n+--------------------------------+--------------------------+\n| ``Client.ban(server, user)``   | ``Client.ban(member)``   |\n+--------------------------------+--------------------------+\n| ``Client.kick(server, user)``  | ``Client.kick(member)``  |\n+--------------------------------+--------------------------+\n\n.. migrating-renames:\n\nRenamed Functions\n-------------------\n\nFunctions have been renamed.\n\n+------------------------------------+-------------------------------------------+\n| Before                             | After                                     |\n+------------------------------------+-------------------------------------------+\n| ``Client.set_channel_permissions`` | :meth:`Client.edit_channel_permissions`   |\n+------------------------------------+-------------------------------------------+\n\nAll the :class:`Permissions` related attributes have been renamed and the `can_` prefix has been\ndropped. So for example, ``can_manage_messages`` has become ``manage_messages``.\n\nForced Keyword Arguments\n-------------------------\n\nSince 3.0+ of Python, we can now force questions to take in forced keyword arguments. A keyword argument is when you\nexplicitly specify the name of the variable and assign to it, for example: ``foo(name='test')``. Due to this support,\nsome functions in the library were changed to force things to take said keyword arguments. This is to reduce errors of\nknowing the argument order and the issues that could arise from them.\n\nThe following parameters are now exclusively keyword arguments:\n\n- :meth:`Client.send_message`\n    - ``tts``\n- :meth:`Client.logs_from`\n    - ``before``\n    - ``after``\n- :meth:`Client.edit_channel_permissions`\n    - ``allow``\n    - ``deny``\n\nIn the documentation you can tell if a function parameter is a forced keyword argument if it is after ``\\*,``\nin the function signature.\n\n.. _migrating-running:\n\nRunning the Client\n--------------------\n\nIn earlier versions of discord.py, ``client.run()`` was a blocking call to the main thread\nthat called it. In v0.10.0 it is still a blocking call but it handles the event loop for you.\nHowever, in order to do that you must pass in your credentials to :meth:`Client.run`.\n\nBasically, before:\n\n.. code-block:: python3\n\n    client.login('token')\n    client.run()\n\nAfter:\n\n.. code-block:: python3\n\n    client.run('token')\n\n.. warning::\n\n    Like in the older ``Client.run`` function, the newer one must be the one of\n    the last functions to call. This is because the function is **blocking**. Registering\n    events or doing anything after :meth:`Client.run` will not execute until the function\n    returns.\n\nThis is a utility function that abstracts the event loop for you. There's no need for\nthe run call to be blocking and out of your control. Indeed, if you want control of the\nevent loop then doing so is quite straightforward:\n\n.. code-block:: python3\n\n    import discord\n    import asyncio\n\n    client = discord.Client()\n\n    @asyncio.coroutine\n    def main_task():\n        yield from client.login('token')\n        yield from client.connect()\n\n    loop = asyncio.get_event_loop()\n    try:\n        loop.run_until_complete(main_task())\n    except:\n        loop.run_until_complete(client.logout())\n    finally:\n        loop.close()\n\n\n\n"
  },
  {
    "path": "docs/migrating_to_v1.rst",
    "content": ":orphan:\n\n.. currentmodule:: discord\n\n.. _migrating_1_0:\n\nMigrating to v1.0\n======================\n\nv1.0 is one of the biggest breaking changes in the library due to a complete\nredesign.\n\nThe amount of changes are so massive and long that for all intents and purposes, it is a completely\nnew library.\n\nPart of the redesign involves making things more easy to use and natural. Things are done on the\n:ref:`models <discord_api_models>` instead of requiring a :class:`Client` instance to do any work.\n\nPython Version Change\n-----------------------\n\nIn order to make development easier and also to allow for our dependencies to upgrade to allow usage of 3.7 or higher,\nthe library had to remove support for Python versions lower than 3.5.3, which essentially means that **support for Python 3.4\nis dropped**.\n\nMajor Model Changes\n---------------------\n\nBelow are major model changes that have happened in v1.0\n\nSnowflakes are int\n~~~~~~~~~~~~~~~~~~~~\n\nBefore v1.0, all snowflakes (the ``id`` attribute) were strings. This has been changed to :class:`int`.\n\nQuick example: ::\n\n    # before\n    ch = client.get_channel('84319995256905728')\n    if message.author.id == '80528701850124288':\n        ...\n\n    # after\n    ch = client.get_channel(84319995256905728)\n    if message.author.id == 80528701850124288:\n        ...\n\nThis change allows for fewer errors when using the Copy ID feature in the official client since you no longer have\nto wrap it in quotes and allows for optimisation opportunities by allowing ETF to be used instead of JSON internally.\n\nServer is now Guild\n~~~~~~~~~~~~~~~~~~~~~\n\nThe official API documentation calls the \"Server\" concept a \"Guild\" instead. In order to be more consistent with the\nAPI documentation when necessary, the model has been renamed to :class:`Guild` and all instances referring to it has\nbeen changed as well.\n\nA list of changes is as follows:\n\n+-------------------------------+----------------------------------+\n|             Before            |              After               |\n+-------------------------------+----------------------------------+\n| ``Message.server``            | :attr:`Message.guild`            |\n+-------------------------------+----------------------------------+\n| ``Channel.server``            | :attr:`.GuildChannel.guild`      |\n+-------------------------------+----------------------------------+\n| ``Client.servers``            | :attr:`Client.guilds`            |\n+-------------------------------+----------------------------------+\n| ``Client.get_server``         | :meth:`Client.get_guild`         |\n+-------------------------------+----------------------------------+\n| ``Emoji.server``              | :attr:`Emoji.guild`              |\n+-------------------------------+----------------------------------+\n| ``Role.server``               | :attr:`Role.guild`               |\n+-------------------------------+----------------------------------+\n| ``Invite.server``             | :attr:`Invite.guild`             |\n+-------------------------------+----------------------------------+\n| ``Member.server``             | :attr:`Member.guild`             |\n+-------------------------------+----------------------------------+\n| ``Permissions.manage_server`` | :attr:`Permissions.manage_guild` |\n+-------------------------------+----------------------------------+\n| ``VoiceClient.server``        | :attr:`VoiceClient.guild`        |\n+-------------------------------+----------------------------------+\n| ``Client.create_server``      | :meth:`Client.create_guild`      |\n+-------------------------------+----------------------------------+\n\n.. _migrating_1_0_model_state:\n\nModels are Stateful\n~~~~~~~~~~~~~~~~~~~~~\n\nAs mentioned earlier, a lot of functionality was moved out of :class:`Client` and\nput into their respective :ref:`model <discord_api_models>`.\n\nA list of these changes is enumerated below.\n\n+---------------------------------------+------------------------------------------------------------------------------+\n|                 Before                |                                    After                                     |\n+---------------------------------------+------------------------------------------------------------------------------+\n| ``Client.add_reaction``               | :meth:`Message.add_reaction`                                                 |\n+---------------------------------------+------------------------------------------------------------------------------+\n| ``Client.add_roles``                  | :meth:`Member.add_roles`                                                     |\n+---------------------------------------+------------------------------------------------------------------------------+\n| ``Client.ban``                        | :meth:`Member.ban` or :meth:`Guild.ban`                                      |\n+---------------------------------------+------------------------------------------------------------------------------+\n| ``Client.change_nickname``            | :meth:`Member.edit`                                                          |\n+---------------------------------------+------------------------------------------------------------------------------+\n| ``Client.clear_reactions``            | :meth:`Message.clear_reactions`                                              |\n+---------------------------------------+------------------------------------------------------------------------------+\n| ``Client.create_channel``             | :meth:`Guild.create_text_channel` and :meth:`Guild.create_voice_channel`     |\n+---------------------------------------+------------------------------------------------------------------------------+\n| ``Client.create_custom_emoji``        | :meth:`Guild.create_custom_emoji`                                            |\n+---------------------------------------+------------------------------------------------------------------------------+\n| ``Client.create_invite``              | :meth:`abc.GuildChannel.create_invite`                                       |\n+---------------------------------------+------------------------------------------------------------------------------+\n| ``Client.create_role``                | :meth:`Guild.create_role`                                                    |\n+---------------------------------------+------------------------------------------------------------------------------+\n| ``Client.delete_channel``             | :meth:`abc.GuildChannel.delete`                                              |\n+---------------------------------------+------------------------------------------------------------------------------+\n| ``Client.delete_channel_permissions`` | :meth:`abc.GuildChannel.set_permissions` with ``overwrite`` set to ``None``  |\n+---------------------------------------+------------------------------------------------------------------------------+\n| ``Client.delete_custom_emoji``        | :meth:`Emoji.delete`                                                         |\n+---------------------------------------+------------------------------------------------------------------------------+\n| ``Client.delete_invite``              | :meth:`Invite.delete` or :meth:`Client.delete_invite`                        |\n+---------------------------------------+------------------------------------------------------------------------------+\n| ``Client.delete_message``             | :meth:`Message.delete`                                                       |\n+---------------------------------------+------------------------------------------------------------------------------+\n| ``Client.delete_messages``            | :meth:`TextChannel.delete_messages`                                          |\n+---------------------------------------+------------------------------------------------------------------------------+\n| ``Client.delete_role``                | :meth:`Role.delete`                                                          |\n+---------------------------------------+------------------------------------------------------------------------------+\n| ``Client.delete_server``              | :meth:`Guild.delete`                                                         |\n+---------------------------------------+------------------------------------------------------------------------------+\n| ``Client.edit_channel``               | :meth:`TextChannel.edit` or :meth:`VoiceChannel.edit`                        |\n+---------------------------------------+------------------------------------------------------------------------------+\n| ``Client.edit_channel_permissions``   | :meth:`abc.GuildChannel.set_permissions`                                     |\n+---------------------------------------+------------------------------------------------------------------------------+\n| ``Client.edit_custom_emoji``          | :meth:`Emoji.edit`                                                           |\n+---------------------------------------+------------------------------------------------------------------------------+\n| ``Client.edit_message``               | :meth:`Message.edit`                                                         |\n+---------------------------------------+------------------------------------------------------------------------------+\n| ``Client.edit_profile``               | :meth:`ClientUser.edit` (you get this from :attr:`Client.user`)              |\n+---------------------------------------+------------------------------------------------------------------------------+\n| ``Client.edit_role``                  | :meth:`Role.edit`                                                            |\n+---------------------------------------+------------------------------------------------------------------------------+\n| ``Client.edit_server``                | :meth:`Guild.edit`                                                           |\n+---------------------------------------+------------------------------------------------------------------------------+\n| ``Client.estimate_pruned_members``    | :meth:`Guild.estimate_pruned_members`                                        |\n+---------------------------------------+------------------------------------------------------------------------------+\n| ``Client.get_all_emojis``             | :attr:`Client.emojis`                                                        |\n+---------------------------------------+------------------------------------------------------------------------------+\n| ``Client.get_bans``                   | :meth:`Guild.bans`                                                           |\n+---------------------------------------+------------------------------------------------------------------------------+\n| ``Client.get_invite``                 | :meth:`Client.fetch_invite`                                                  |\n+---------------------------------------+------------------------------------------------------------------------------+\n| ``Client.get_message``                | :meth:`abc.Messageable.fetch_message`                                        |\n+---------------------------------------+------------------------------------------------------------------------------+\n| ``Client.get_reaction_users``         | :meth:`Reaction.users`                                                       |\n+---------------------------------------+------------------------------------------------------------------------------+\n| ``Client.get_user_info``              | :meth:`Client.fetch_user`                                                    |\n+---------------------------------------+------------------------------------------------------------------------------+\n| ``Client.invites_from``               | :meth:`abc.GuildChannel.invites` or :meth:`Guild.invites`                    |\n+---------------------------------------+------------------------------------------------------------------------------+\n| ``Client.join_voice_channel``         | :meth:`VoiceChannel.connect` (see :ref:`migrating_1_0_voice`)                |\n+---------------------------------------+------------------------------------------------------------------------------+\n| ``Client.kick``                       | :meth:`Guild.kick` or :meth:`Member.kick`                                    |\n+---------------------------------------+------------------------------------------------------------------------------+\n| ``Client.leave_server``               | :meth:`Guild.leave`                                                          |\n+---------------------------------------+------------------------------------------------------------------------------+\n| ``Client.logs_from``                  | :meth:`abc.Messageable.history` (see :ref:`migrating_1_0_async_iter`)        |\n+---------------------------------------+------------------------------------------------------------------------------+\n| ``Client.move_channel``               | :meth:`TextChannel.edit` or :meth:`VoiceChannel.edit`                        |\n+---------------------------------------+------------------------------------------------------------------------------+\n| ``Client.move_member``                | :meth:`Member.edit`                                                          |\n+---------------------------------------+------------------------------------------------------------------------------+\n| ``Client.move_role``                  | :meth:`Role.edit`                                                            |\n+---------------------------------------+------------------------------------------------------------------------------+\n| ``Client.pin_message``                | :meth:`Message.pin`                                                          |\n+---------------------------------------+------------------------------------------------------------------------------+\n| ``Client.pins_from``                  | :meth:`abc.Messageable.pins`                                                 |\n+---------------------------------------+------------------------------------------------------------------------------+\n| ``Client.prune_members``              | :meth:`Guild.prune_members`                                                  |\n+---------------------------------------+------------------------------------------------------------------------------+\n| ``Client.purge_from``                 | :meth:`TextChannel.purge`                                                    |\n+---------------------------------------+------------------------------------------------------------------------------+\n| ``Client.remove_reaction``            | :meth:`Message.remove_reaction`                                              |\n+---------------------------------------+------------------------------------------------------------------------------+\n| ``Client.remove_roles``               | :meth:`Member.remove_roles`                                                  |\n+---------------------------------------+------------------------------------------------------------------------------+\n| ``Client.replace_roles``              | :meth:`Member.edit`                                                          |\n+---------------------------------------+------------------------------------------------------------------------------+\n| ``Client.send_file``                  | :meth:`abc.Messageable.send` (see :ref:`migrating_1_0_sending_messages`)     |\n+---------------------------------------+------------------------------------------------------------------------------+\n| ``Client.send_message``               | :meth:`abc.Messageable.send` (see :ref:`migrating_1_0_sending_messages`)     |\n+---------------------------------------+------------------------------------------------------------------------------+\n| ``Client.send_typing``                | :meth:`abc.Messageable.trigger_typing` (use :meth:`abc.Messageable.typing`)  |\n+---------------------------------------+------------------------------------------------------------------------------+\n| ``Client.server_voice_state``         | :meth:`Member.edit`                                                          |\n+---------------------------------------+------------------------------------------------------------------------------+\n| ``Client.start_private_message``      | :meth:`User.create_dm`                                                       |\n+---------------------------------------+------------------------------------------------------------------------------+\n| ``Client.unban``                      | :meth:`Guild.unban` or :meth:`Member.unban`                                  |\n+---------------------------------------+------------------------------------------------------------------------------+\n| ``Client.unpin_message``              | :meth:`Message.unpin`                                                        |\n+---------------------------------------+------------------------------------------------------------------------------+\n| ``Client.wait_for_message``           | :meth:`Client.wait_for` (see :ref:`migrating_1_0_wait_for`)                  |\n+---------------------------------------+------------------------------------------------------------------------------+\n| ``Client.wait_for_reaction``          | :meth:`Client.wait_for` (see :ref:`migrating_1_0_wait_for`)                  |\n+---------------------------------------+------------------------------------------------------------------------------+\n| ``Client.wait_until_login``           | Removed                                                                      |\n+---------------------------------------+------------------------------------------------------------------------------+\n| ``Client.wait_until_ready``           | No change                                                                    |\n+---------------------------------------+------------------------------------------------------------------------------+\n\nProperty Changes\n~~~~~~~~~~~~~~~~~~\n\nIn order to be a bit more consistent, certain things that were properties were changed to methods instead.\n\nThe following are now methods instead of properties (requires parentheses):\n\n- :meth:`Role.is_default`\n- :meth:`Client.is_ready`\n- :meth:`Client.is_closed`\n\nDict Value Change\n~~~~~~~~~~~~~~~~~~~~~\n\nPrior to v1.0 some aggregating properties that retrieved models would return \"dict view\" objects.\n\nAs a consequence, when the dict would change size while you would iterate over it, a RuntimeError would\nbe raised and crash the task. To alleviate this, the \"dict view\" objects were changed into lists.\n\nThe following views were changed to a list:\n\n- :attr:`Client.guilds`\n- :attr:`Client.users` (new in v1.0)\n- :attr:`Client.emojis` (new in v1.0)\n- :attr:`Guild.channels`\n- :attr:`Guild.text_channels` (new in v1.0)\n- :attr:`Guild.voice_channels` (new in v1.0)\n- :attr:`Guild.emojis`\n- :attr:`Guild.members`\n\nVoice State Changes\n~~~~~~~~~~~~~~~~~~~~~\n\nEarlier, in v0.11.0 a :class:`VoiceState` class was added to refer to voice states along with a\n:attr:`Member.voice` attribute to refer to it.\n\nHowever, it was transparent to the user. In an effort to make the library save more memory, the\nvoice state change is now more visible.\n\nThe only way to access voice attributes is via the :attr:`Member.voice` attribute. Note that if\nthe member does not have a voice state this attribute can be ``None``.\n\nQuick example: ::\n\n    # before\n    member.deaf\n    member.voice.voice_channel\n\n    # after\n    if member.voice: # can be None\n        member.voice.deaf\n        member.voice.channel\n\n\nUser and Member Type Split\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nIn v1.0 to save memory, :class:`User` and :class:`Member` are no longer inherited. Instead, they are \"flattened\"\nby having equivalent properties that map out to the functional underlying :class:`User`. Thus, there is no functional\nchange in how they are used. However this breaks :func:`isinstance` checks and thus is something to keep in mind.\n\nThese memory savings were accomplished by having a global :class:`User` cache, and as a positive consequence you\ncan now easily fetch a :class:`User` by their ID by using the new :meth:`Client.get_user`. You can also get a list\nof all :class:`User` your client can see with :attr:`Client.users`.\n\n.. _migrating_1_0_channel_split:\n\nChannel Type Split\n~~~~~~~~~~~~~~~~~~~~~\n\nPrior to v1.0, channels were two different types, ``Channel`` and ``PrivateChannel`` with a ``is_private``\nproperty to help differentiate between them.\n\nIn order to save memory the channels have been split into 4 different types:\n\n- :class:`TextChannel` for guild text channels.\n- :class:`VoiceChannel` for guild voice channels.\n- :class:`DMChannel` for DM channels with members.\n- :class:`GroupChannel` for Group DM channels with members.\n\nWith this split came the removal of the ``is_private`` attribute. You should now use :func:`isinstance`.\n\nThe types are split into two different :ref:`discord_api_abcs`:\n\n- :class:`abc.GuildChannel` for guild channels.\n- :class:`abc.PrivateChannel` for private channels (DMs and group DMs).\n\nSo to check if something is a guild channel you would do: ::\n\n    isinstance(channel, discord.abc.GuildChannel)\n\nAnd to check if it's a private channel you would do: ::\n\n    isinstance(channel, discord.abc.PrivateChannel)\n\nOf course, if you're looking for only a specific type you can pass that too, e.g. ::\n\n    isinstance(channel, discord.TextChannel)\n\nWith this type split also came event changes, which are enumerated in :ref:`migrating_1_0_event_changes`.\n\n\nMiscellaneous Model Changes\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nThere were lots of other things added or removed in the models in general.\n\nThey will be enumerated here.\n\n**Removed**\n\n- :meth:`Client.login` no longer accepts email and password logins.\n\n    - Use a token and ``bot=False``.\n\n- ``Client.get_all_emojis``\n\n    - Use :attr:`Client.emojis` instead.\n\n- ``Client.messages``\n\n    - Use read-only :attr:`Client.cached_messages` instead.\n\n- ``Client.wait_for_message`` and ``Client.wait_for_reaction`` are gone.\n\n    - Use :meth:`Client.wait_for` instead.\n\n- ``Channel.voice_members``\n\n    - Use :attr:`VoiceChannel.members` instead.\n\n- ``Channel.is_private``\n\n    - Use ``isinstance`` instead with one of the :ref:`discord_api_abcs` instead.\n    - e.g. ``isinstance(channel, discord.abc.GuildChannel)`` will check if it isn't a private channel.\n\n- ``Client.accept_invite``\n\n    - There is no replacement for this one. This functionality is deprecated API wise.\n\n- ``Guild.default_channel`` / ``Server.default_channel`` and ``Channel.is_default``\n\n    - The concept of a default channel was removed from Discord.\n      See `#329 <https://github.com/hammerandchisel/discord-api-docs/pull/329>`_.\n\n- ``Message.edited_timestamp``\n\n    - Use :attr:`Message.edited_at` instead.\n\n- ``Message.timestamp``\n\n    - Use :attr:`Message.created_at` instead.\n\n- ``Colour.to_tuple()``\n\n    - Use :meth:`Colour.to_rgb` instead.\n\n- ``Permissions.view_audit_logs``\n\n    - Use :attr:`Permissions.view_audit_log` instead.\n\n- ``Member.game``\n\n    - Use :attr:`Member.activities` instead.\n\n- ``Guild.role_hierarchy`` / ``Server.role_hierarchy``\n\n    - Use :attr:`Guild.roles` instead. Note that while sorted, it is in the opposite order\n      of what the old ``Guild.role_hierarchy`` used to be.\n\n**Changed**\n\n- :attr:`Member.avatar_url` and :attr:`User.avatar_url` now return the default avatar if a custom one is not set.\n- :attr:`Message.embeds` is now a list of :class:`Embed` instead of :class:`dict` objects.\n- :attr:`Message.attachments` is now a list of :class:`Attachment` instead of :class:`dict` object.\n- :attr:`Guild.roles` is now sorted through hierarchy. The first element is always the ``@everyone`` role.\n\n**Added**\n\n- :class:`Attachment` to represent a discord attachment.\n- :class:`CategoryChannel` to represent a channel category.\n- :attr:`VoiceChannel.members` for fetching members connected to a voice channel.\n- :attr:`TextChannel.members` for fetching members that can see the channel.\n- :attr:`Role.members` for fetching members that have the role.\n- :attr:`Guild.text_channels` for fetching text channels only.\n- :attr:`Guild.voice_channels` for fetching voice channels only.\n- :attr:`Guild.categories` for fetching channel categories only.\n- :attr:`TextChannel.category` and :attr:`VoiceChannel.category` to get the category a channel belongs to.\n- :meth:`Guild.by_category` to get channels grouped by their category.\n- :attr:`Guild.chunked` to check member chunking status.\n- :attr:`Guild.explicit_content_filter` to fetch the content filter.\n- :attr:`Guild.shard_id` to get a guild's Shard ID if you're sharding.\n- :attr:`Client.users` to get all visible :class:`User` instances.\n- :meth:`Client.get_user` to get a :class:`User` by ID.\n- :meth:`User.avatar_url_as` to get an avatar in a specific size or format.\n- :meth:`Guild.vanity_invite` to fetch the guild's vanity invite.\n- :meth:`Guild.audit_logs` to fetch the guild's audit logs.\n- :attr:`Message.webhook_id` to fetch the message's webhook ID.\n- :attr:`Message.activity` and :attr:`Message.application` for Rich Presence related information.\n- :meth:`TextChannel.is_nsfw` to check if a text channel is NSFW.\n- :meth:`Colour.from_rgb` to construct a :class:`Colour` from RGB tuple.\n- :meth:`Guild.get_role` to get a role by its ID.\n\n.. _migrating_1_0_sending_messages:\n\nSending Messages\n------------------\n\nOne of the changes that were done was the merger of the previous ``Client.send_message`` and ``Client.send_file``\nfunctionality into a single method, :meth:`~abc.Messageable.send`.\n\nBasically: ::\n\n    # before\n    await client.send_message(channel, 'Hello')\n\n    # after\n    await channel.send('Hello')\n\nThis supports everything that the old ``send_message`` supported such as embeds: ::\n\n    e = discord.Embed(title='foo')\n    await channel.send('Hello', embed=e)\n\nThere is a caveat with sending files however, as this functionality was expanded to support multiple\nfile attachments, you must now use a :class:`File` pseudo-namedtuple to upload a single file. ::\n\n    # before\n    await client.send_file(channel, 'cool.png', filename='testing.png', content='Hello')\n\n    # after\n    await channel.send('Hello', file=discord.File('cool.png', 'testing.png'))\n\nThis change was to facilitate multiple file uploads: ::\n\n    my_files = [\n        discord.File('cool.png', 'testing.png'),\n        discord.File(some_fp, 'cool_filename.png'),\n    ]\n\n    await channel.send('Your images:', files=my_files)\n\n.. _migrating_1_0_async_iter:\n\nAsynchronous Iterators\n------------------------\n\nPrior to v1.0, certain functions like ``Client.logs_from`` would return a different type if done in Python 3.4 or 3.5+.\n\nIn v1.0, this change has been reverted and will now return a singular type meeting an abstract concept called\n:class:`AsyncIterator`.\n\nThis allows you to iterate over it like normal: ::\n\n    async for message in channel.history():\n        print(message)\n\nOr turn it into a list: ::\n\n    messages = await channel.history().flatten()\n    for message in messages:\n        print(message)\n\nA handy aspect of returning :class:`AsyncIterator` is that it allows you to chain functions together such as\n:meth:`AsyncIterator.map` or :meth:`AsyncIterator.filter`: ::\n\n    async for m_id in channel.history().filter(lambda m: m.author == client.user).map(lambda m: m.id):\n        print(m_id)\n\nThe functions passed to :meth:`AsyncIterator.map` or :meth:`AsyncIterator.filter` can be either coroutines or regular\nfunctions.\n\nYou can also get single elements a la :func:`discord.utils.find` or :func:`discord.utils.get` via\n:meth:`AsyncIterator.get` or :meth:`AsyncIterator.find`: ::\n\n    my_last_message = await channel.history().get(author=client.user)\n\nThe following return :class:`AsyncIterator`:\n\n- :meth:`abc.Messageable.history`\n- :meth:`Guild.audit_logs`\n- :meth:`Reaction.users`\n\n.. _migrating_1_0_event_changes:\n\nEvent Changes\n--------------\n\nA lot of events have gone through some changes.\n\nMany events with ``server`` in the name were changed to use ``guild`` instead.\n\nBefore:\n\n- ``on_server_join``\n- ``on_server_remove``\n- ``on_server_update``\n- ``on_server_role_create``\n- ``on_server_role_delete``\n- ``on_server_role_update``\n- ``on_server_emojis_update``\n- ``on_server_available``\n- ``on_server_unavailable``\n\nAfter:\n\n- :func:`on_guild_join`\n- :func:`on_guild_remove`\n- :func:`on_guild_update`\n- :func:`on_guild_role_create`\n- :func:`on_guild_role_delete`\n- :func:`on_guild_role_update`\n- :func:`on_guild_emojis_update`\n- :func:`on_guild_available`\n- :func:`on_guild_unavailable`\n\n\nThe :func:`on_voice_state_update` event has received an argument change.\n\nBefore: ::\n\n    async def on_voice_state_update(before, after)\n\nAfter: ::\n\n    async def on_voice_state_update(member, before, after)\n\nInstead of two :class:`Member` objects, the new event takes one :class:`Member` object and two :class:`VoiceState` objects.\n\nThe :func:`on_guild_emojis_update` event has received an argument change.\n\nBefore: ::\n\n    async def on_guild_emojis_update(before, after)\n\nAfter: ::\n\n    async def on_guild_emojis_update(guild, before, after)\n\nThe first argument is now the :class:`Guild` that the emojis were updated from.\n\nThe :func:`on_member_ban` event has received an argument change as well:\n\nBefore: ::\n\n    async def on_member_ban(member)\n\nAfter: ::\n\n    async def on_member_ban(guild, user)\n\nAs part of the change, the event can either receive a :class:`User` or :class:`Member`. To help in the cases that have\n:class:`User`, the :class:`Guild` is provided as the first parameter.\n\nThe ``on_channel_`` events have received a type level split (see :ref:`migrating_1_0_channel_split`).\n\nBefore:\n\n- ``on_channel_delete``\n- ``on_channel_create``\n- ``on_channel_update``\n\nAfter:\n\n- :func:`on_guild_channel_delete`\n- :func:`on_guild_channel_create`\n- :func:`on_guild_channel_update`\n- :func:`on_private_channel_delete`\n- :func:`on_private_channel_create`\n- :func:`on_private_channel_update`\n\nThe ``on_guild_channel_`` events correspond to :class:`abc.GuildChannel` being updated (i.e. :class:`TextChannel`\nand :class:`VoiceChannel`) and the ``on_private_channel_`` events correspond to :class:`abc.PrivateChannel` being\nupdated (i.e. :class:`DMChannel` and :class:`GroupChannel`).\n\n.. _migrating_1_0_voice:\n\nVoice Changes\n---------------\n\nVoice sending has gone through a complete redesign.\n\nIn particular:\n\n- Connection is done through :meth:`VoiceChannel.connect` instead of ``Client.join_voice_channel``.\n- You no longer create players and operate on them (you no longer store them).\n- You instead request :class:`VoiceClient` to play an :class:`AudioSource` via :meth:`VoiceClient.play`.\n- There are different built-in :class:`AudioSource`\\s.\n\n  - :class:`FFmpegPCMAudio` is the equivalent of ``create_ffmpeg_player``\n\n- create_ffmpeg_player/create_stream_player/create_ytdl_player have all been removed.\n\n  - The goal is to create :class:`AudioSource` instead.\n\n- Using :meth:`VoiceClient.play` will not return an ``AudioPlayer``.\n\n  - Instead, it's \"flattened\" like :class:`User` -> :class:`Member` is.\n\n- The ``after`` parameter now takes a single parameter (the error).\n\nBasically:\n\nBefore: ::\n\n    vc = await client.join_voice_channel(channel)\n    player = vc.create_ffmpeg_player('testing.mp3', after=lambda: print('done'))\n    player.start()\n\n    player.is_playing()\n    player.pause()\n    player.resume()\n    player.stop()\n    # ...\n\nAfter: ::\n\n    vc = await channel.connect()\n    vc.play(discord.FFmpegPCMAudio('testing.mp3'), after=lambda e: print('done', e))\n    vc.is_playing()\n    vc.pause()\n    vc.resume()\n    vc.stop()\n    # ...\n\nWith the changed :class:`AudioSource` design, you can now change the source that the :class:`VoiceClient` is\nplaying at runtime via :attr:`VoiceClient.source`.\n\nFor example, you can add a :class:`PCMVolumeTransformer` to allow changing the volume: ::\n\n    vc.source = discord.PCMVolumeTransformer(vc.source)\n    vc.source.volume = 0.6\n\nAn added benefit of the redesign is that it will be much more resilient towards reconnections:\n\n- The voice websocket will now automatically re-connect and re-do the handshake when disconnected.\n- The initial connect handshake will now retry up to 5 times so you no longer get as many ``asyncio.TimeoutError``.\n- Audio will now stop and resume when a disconnect is found.\n\n  - This includes changing voice regions etc.\n\n\n.. _migrating_1_0_wait_for:\n\nWaiting For Events\n--------------------\n\nPrior to v1.0, the machinery for waiting for an event outside of the event itself was done through two different\nfunctions, ``Client.wait_for_message`` and ``Client.wait_for_reaction``. One problem with one such approach is that it did\nnot allow you to wait for events outside of the ones provided by the library.\n\nIn v1.0 the concept of waiting for another event has been generalised to work with any event as :meth:`Client.wait_for`.\n\nFor example, to wait for a message: ::\n\n    # before\n    msg = await client.wait_for_message(author=message.author, channel=message.channel)\n\n    # after\n    def pred(m):\n        return m.author == message.author and m.channel == message.channel\n\n    msg = await client.wait_for('message', check=pred)\n\nTo facilitate multiple returns, :meth:`Client.wait_for` returns either a single argument, no arguments, or a tuple of\narguments.\n\nFor example, to wait for a reaction: ::\n\n    reaction, user = await client.wait_for('reaction_add', check=lambda r, u: u.id == 176995180300206080)\n\n    # use user and reaction\n\nSince this function now can return multiple arguments, the ``timeout`` parameter will now raise a :exc:`asyncio.TimeoutError`\nwhen reached instead of setting the return to ``None``. For example:\n\n.. code-block:: python3\n\n    def pred(m):\n        return m.author == message.author and m.channel == message.channel\n\n    try:\n\n        msg = await client.wait_for('message', check=pred, timeout=60.0)\n    except asyncio.TimeoutError:\n        await channel.send('You took too long...')\n    else:\n        await channel.send('You said {0.content}, {0.author}.'.format(msg))\n\nUpgraded Dependencies\n-----------------------\n\nFollowing v1.0 of the library, we've updated our requirements to :doc:`aiohttp <aio:index>` v2.0 or higher.\n\nSince this is a backwards incompatible change, it is recommended that you see the\n`changes <http://aiohttp.readthedocs.io/en/stable/changes.html#rc1-2017-03-15>`_\nand the :doc:`aio:migration_to_2xx` pages for details on the breaking changes in\n:doc:`aiohttp <aio:index>`.\n\nOf the most significant for common users is the removal of helper functions such as:\n\n- ``aiohttp.get``\n- ``aiohttp.post``\n- ``aiohttp.delete``\n- ``aiohttp.patch``\n- ``aiohttp.head``\n- ``aiohttp.put``\n- ``aiohttp.request``\n\nIt is recommended that you create a session instead: ::\n\n    async with aiohttp.ClientSession() as sess:\n        async with sess.get('url') as resp:\n            # work with resp\n\nSince it is better to not create a session for every request, you should store it in a variable and then call\n``session.close`` on it when it needs to be disposed.\n\nSharding\n----------\n\nThe library has received significant changes on how it handles sharding and now has sharding as a first-class citizen.\n\nIf using a Bot account and you want to shard your bot in a single process then you can use the :class:`AutoShardedClient`.\n\nThis class allows you to use sharding without having to launch multiple processes or deal with complicated IPC.\n\nIt should be noted that **the sharded client does not support user accounts**. This is due to the changes in connection\nlogic and state handling.\n\nUsage is as simple as doing: ::\n\n    client = discord.AutoShardedClient()\n\ninstead of using :class:`Client`.\n\nThis will launch as many shards as your bot needs using the ``/gateway/bot`` endpoint, which allocates about 1000 guilds\nper shard.\n\nIf you want more control over the sharding you can specify ``shard_count`` and ``shard_ids``. ::\n\n    # launch 10 shards regardless\n    client = discord.AutoShardedClient(shard_count=10)\n\n    # launch specific shard IDs in this process\n    client = discord.AutoShardedClient(shard_count=10, shard_ids=(1, 2, 5, 6))\n\nFor users of the command extension, there is also :class:`~ext.commands.AutoShardedBot` which behaves similarly.\n\nConnection Improvements\n-------------------------\n\nIn v1.0, the auto reconnection logic has been powered up significantly.\n\n:meth:`Client.connect` has gained a new keyword argument, ``reconnect`` that defaults to ``True`` which controls\nthe reconnect logic. When enabled, the client will automatically reconnect in all instances of your internet going\noffline or Discord going offline with exponential back-off.\n\n:meth:`Client.run` and :meth:`Client.start` gains this keyword argument as well, but for most cases you will not\nneed to specify it unless turning it off.\n\n.. _migrating_1_0_commands:\n\nCommand Extension Changes\n--------------------------\n\nDue to the :ref:`migrating_1_0_model_state` changes, some of the design of the extension module had to\nundergo some design changes as well.\n\nContext Changes\n~~~~~~~~~~~~~~~~~\n\nIn v1.0, the :class:`.Context` has received a lot of changes with how it's retrieved and used.\n\nThe biggest change is that ``pass_context=True`` no longer exists, :class:`.Context` is always passed. Ergo:\n\n.. code-block:: python3\n\n    # before\n    @bot.command()\n    async def foo():\n        await bot.say('Hello')\n\n    # after\n    @bot.command()\n    async def foo(ctx):\n        await ctx.send('Hello')\n\nThe reason for this is because :class:`~ext.commands.Context` now meets the requirements of :class:`abc.Messageable`. This\nmakes it have similar functionality to :class:`TextChannel` or :class:`DMChannel`. Using :meth:`~.Context.send`\nwill either DM the user in a DM context or send a message in the channel it was in, similar to the old ``bot.say``\nfunctionality. The old helpers have been removed in favour of the new :class:`abc.Messageable` interface. See\n:ref:`migrating_1_0_removed_helpers` for more information.\n\nSince the :class:`~ext.commands.Context` is now passed by default, several shortcuts have been added:\n\n**New Shortcuts**\n\n- :attr:`ctx.author <ext.commands.Context.author>` is a shortcut for ``ctx.message.author``.\n- :attr:`ctx.guild <ext.commands.Context.guild>` is a shortcut for ``ctx.message.guild``.\n- :attr:`ctx.channel <ext.commands.Context.channel>` is a shortcut for ``ctx.message.channel``.\n- :attr:`ctx.me <ext.commands.Context.me>` is a shortcut for ``ctx.message.guild.me`` or ``ctx.bot.user``.\n- :attr:`ctx.voice_client <ext.commands.Context.voice_client>` is a shortcut for ``ctx.message.guild.voice_client``.\n\n**New Functionality**\n\n- :meth:`.Context.reinvoke` to invoke a command again.\n\n    - This is useful for bypassing cooldowns.\n- :attr:`.Context.valid` to check if a context can be invoked with :meth:`.Bot.invoke`.\n- :meth:`.Context.send_help` to show the help command for an entity using the new :class:`~.ext.commands.HelpCommand` system.\n\n    - This is useful if you want to show the user help if they misused a command.\n\nSubclassing Context\n++++++++++++++++++++\n\nIn v1.0, there is now the ability to subclass :class:`~ext.commands.Context` and use it instead of the default\nprovided one.\n\nFor example, if you want to add some functionality to the context:\n\n.. code-block:: python3\n\n    class MyContext(commands.Context):\n        @property\n        def secret(self):\n            return 'my secret here'\n\nThen you can use :meth:`~ext.commands.Bot.get_context` inside :func:`on_message` with combination with\n:meth:`~ext.commands.Bot.invoke` to use your custom context:\n\n.. code-block:: python3\n\n    class MyBot(commands.Bot):\n        async def on_message(self, message):\n            ctx = await self.get_context(message, cls=MyContext)\n            await self.invoke(ctx)\n\nNow inside your commands you will have access to your custom context:\n\n.. code-block:: python3\n\n    @bot.command()\n    async def secret(ctx):\n        await ctx.send(ctx.secret)\n\n.. _migrating_1_0_removed_helpers:\n\nRemoved Helpers\n+++++++++++++++++\n\nWith the new :class:`.Context` changes, a lot of message sending helpers have been removed.\n\nFor a full list of changes, see below:\n\n+-----------------+------------------------------------------------------------+\n|      Before     |                           After                            |\n+-----------------+------------------------------------------------------------+\n| ``Bot.say``     | :meth:`.Context.send`                                      |\n+-----------------+------------------------------------------------------------+\n| ``Bot.upload``  | :meth:`.Context.send`                                      |\n+-----------------+------------------------------------------------------------+\n| ``Bot.whisper`` | ``ctx.author.send``                                        |\n+-----------------+------------------------------------------------------------+\n| ``Bot.type``    | :meth:`.Context.typing` or :meth:`.Context.trigger_typing` |\n+-----------------+------------------------------------------------------------+\n| ``Bot.reply``   | No replacement.                                            |\n+-----------------+------------------------------------------------------------+\n\nCommand Changes\n~~~~~~~~~~~~~~~~~\n\nAs mentioned earlier, the first command change is that ``pass_context=True`` no longer\nexists, so there is no need to pass this as a parameter.\n\nAnother change is the removal of ``no_pm=True``. Instead, use the new :func:`~ext.commands.guild_only` built-in\ncheck.\n\nThe ``commands`` attribute of :class:`~ext.commands.Bot` and :class:`~ext.commands.Group` have been changed from a\ndictionary to a set that does not have aliases. To retrieve the previous dictionary behaviour, use ``all_commands`` instead.\n\nCommand instances have gained new attributes and properties:\n\n1. :attr:`~ext.commands.Command.signature` to get the signature of the command.\n2. :attr:`~ext.commands.Command.usage`, an attribute to override the default signature.\n3. :attr:`~ext.commands.Command.root_parent` to get the root parent group of a subcommand.\n\nFor :class:`~ext.commands.Group` and :class:`~ext.commands.Bot` the following changed:\n\n- Changed :attr:`~.GroupMixin.commands` to be a :class:`set` without aliases.\n\n    - Use :attr:`~.GroupMixin.all_commands` to get the old :class:`dict` with all commands.\n\nCheck Changes\n~~~~~~~~~~~~~~~\n\nPrior to v1.0, :func:`~ext.commands.check`\\s could only be synchronous. As of v1.0 checks can now be coroutines.\n\nAlong with this change, a couple new checks were added.\n\n- :func:`~ext.commands.guild_only` replaces the old ``no_pm=True`` functionality.\n- :func:`~ext.commands.is_owner` uses the :meth:`Client.application_info` endpoint by default to fetch owner ID.\n\n    - This is actually powered by a different function, :meth:`~ext.commands.Bot.is_owner`.\n    - You can set the owner ID yourself by setting :attr:`.Bot.owner_id`.\n\n- :func:`~ext.commands.is_nsfw` checks if the channel the command is in is a NSFW channel.\n\n    - This is powered by the new :meth:`TextChannel.is_nsfw` method.\n\nEvent Changes\n~~~~~~~~~~~~~~~\n\nAll command extension events have changed.\n\nBefore: ::\n\n    on_command(command, ctx)\n    on_command_completion(command, ctx)\n    on_command_error(error, ctx)\n\nAfter: ::\n\n    on_command(ctx)\n    on_command_completion(ctx)\n    on_command_error(ctx, error)\n\nThe extraneous ``command`` parameter in :func:`.on_command` and :func:`.on_command_completion`\nhave been removed. The :class:`~ext.commands.Command` instance was not kept up-to date so it was incorrect. In order to get\nthe up to date :class:`~ext.commands.Command` instance, use the :attr:`.Context.command`\nattribute.\n\nThe error handlers, either :meth:`~ext.commands.Command.error` or :func:`.on_command_error`,\nhave been re-ordered to use the :class:`~ext.commands.Context` as its first parameter to be consistent with other events\nand commands.\n\nHelpFormatter and Help Command Changes\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nThe ``HelpFormatter`` class has been removed. It has been replaced with a :class:`~.commands.HelpCommand` class. This class now stores all the command handling and processing of the help command.\n\nThe help command is now stored in the :attr:`.Bot.help_command` attribute. As an added extension, you can disable the help command completely by assigning the attribute to ``None`` or passing it at ``__init__`` as ``help_command=None``.\n\nThe new interface allows the help command to be customised through special methods that can be overridden.\n\n- :meth:`.HelpCommand.send_bot_help`\n    - Called when the user requested for help with the entire bot.\n- :meth:`.HelpCommand.send_cog_help`\n    - Called when the user requested for help with a specific cog.\n- :meth:`.HelpCommand.send_group_help`\n    - Called when the user requested for help with a :class:`~.commands.Group`\n- :meth:`.HelpCommand.send_command_help`\n    - Called when the user requested for help with a :class:`~.commands.Command`\n- :meth:`.HelpCommand.get_destination`\n    - Called to know where to send the help messages. Useful for deciding whether to DM or not.\n- :meth:`.HelpCommand.command_not_found`\n    - A function (or coroutine) that returns a presentable no command found string.\n- :meth:`.HelpCommand.subcommand_not_found`\n    - A function (or coroutine) that returns a string when a subcommand is not found.\n- :meth:`.HelpCommand.send_error_message`\n    - A coroutine that gets passed the result of :meth:`.HelpCommand.command_not_found` and :meth:`.HelpCommand.subcommand_not_found`.\n    - By default it just sends the message. But you can, for example, override it to put it in an embed.\n- :meth:`.HelpCommand.on_help_command_error`\n    - The :ref:`error handler <ext_commands_error_handler>` for the help command if you want to add one.\n- :meth:`.HelpCommand.prepare_help_command`\n    - A coroutine that is called right before the help command processing is done.\n\nCertain subclasses can implement more customisable methods.\n\nThe old ``HelpFormatter`` was replaced with :class:`~.commands.DefaultHelpCommand`\\, which implements all of the logic of the old help command. The customisable methods can be found in the accompanying documentation.\n\nThe library now provides a new more minimalistic :class:`~.commands.HelpCommand` implementation that doesn't take as much space, :class:`~.commands.MinimalHelpCommand`. The customisable methods can also be found in the accompanying documentation.\n\nA frequent request was if you could associate a help command with a cog. The new design allows for dynamically changing of cog through binding it to the :attr:`.HelpCommand.cog` attribute. After this assignment the help command will pretend to be part of the cog and everything should work as expected. When the cog is unloaded then the help command will be \"unbound\" from the cog.\n\nFor example, to implement a :class:`~.commands.HelpCommand` in a cog, the following snippet can be used.\n\n.. code-block:: python3\n\n    class MyHelpCommand(commands.MinimalHelpCommand):\n        def get_command_signature(self, command):\n            return '{0.clean_prefix}{1.qualified_name} {1.signature}'.format(self, command)\n\n    class MyCog(commands.Cog):\n        def __init__(self, bot):\n            self._original_help_command = bot.help_command\n            bot.help_command = MyHelpCommand()\n            bot.help_command.cog = self\n\n        def cog_unload(self):\n            self.bot.help_command = self._original_help_command\n\nFor more information, check out the relevant :ref:`documentation <ext_commands_help_command>`.\n\nCog Changes\n~~~~~~~~~~~~~\n\nCogs have completely been revamped. They are documented in :ref:`ext_commands_cogs` as well.\n\nCogs are now required to have a base class, :class:`~.commands.Cog` for future proofing purposes. This comes with special methods to customise some behaviour.\n\n* :meth:`.Cog.cog_unload`\n    - This is called when a cog needs to do some cleanup, such as cancelling a task.\n* :meth:`.Cog.bot_check_once`\n    - This registers a :meth:`.Bot.check_once` check.\n* :meth:`.Cog.bot_check`\n    - This registers a regular :meth:`.Bot.check` check.\n* :meth:`.Cog.cog_check`\n    - This registers a check that applies to every command in the cog.\n* :meth:`.Cog.cog_command_error`\n    - This is a special error handler that is called whenever an error happens inside the cog.\n* :meth:`.Cog.cog_before_invoke` and :meth:`.Cog.cog_after_invoke`\n    - A special method that registers a cog before and after invoke hook. More information can be found in :ref:`migrating_1_0_before_after_hook`.\n\nThose that were using listeners, such as ``on_message`` inside a cog will now have to explicitly mark them as such using the :meth:`.commands.Cog.listener` decorator.\n\nAlong with that, cogs have gained the ability to have custom names through specifying it in the class definition line. More options can be found in the metaclass that facilitates all this, :class:`.commands.CogMeta`.\n\nAn example cog with every special method registered and a custom name is as follows:\n\n.. code-block:: python3\n\n    class MyCog(commands.Cog, name='Example Cog'):\n        def cog_unload(self):\n            print('cleanup goes here')\n\n        def bot_check(self, ctx):\n            print('bot check')\n            return True\n\n        def bot_check_once(self, ctx):\n            print('bot check once')\n            return True\n\n        async def cog_check(self, ctx):\n            print('cog local check')\n            return await ctx.bot.is_owner(ctx.author)\n\n        async def cog_command_error(self, ctx, error):\n            print('Error in {0.command.qualified_name}: {1}'.format(ctx, error))\n\n        async def cog_before_invoke(self, ctx):\n            print('cog local before: {0.command.qualified_name}'.format(ctx))\n\n        async def cog_after_invoke(self, ctx):\n            print('cog local after: {0.command.qualified_name}'.format(ctx))\n\n        @commands.Cog.listener()\n        async def on_message(self, message):\n            pass\n\n\n.. _migrating_1_0_before_after_hook:\n\nBefore and After Invocation Hooks\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nCommands have gained new before and after invocation hooks that allow you to do an action before and after a command is\nrun.\n\nThey take a single parameter, :class:`~ext.commands.Context` and they must be a coroutine.\n\nThey are on a global, per-cog, or per-command basis.\n\nBasically: ::\n\n\n    # global hooks:\n\n    @bot.before_invoke\n    async def before_any_command(ctx):\n        # do something before a command is called\n        pass\n\n    @bot.after_invoke\n    async def after_any_command(ctx):\n        # do something after a command is called\n        pass\n\nThe after invocation is hook always called, **regardless of an error in the command**. This makes it ideal for some error\nhandling or clean up of certain resources such a database connection.\n\nThe per-command registration is as follows: ::\n\n    @bot.command()\n    async def foo(ctx):\n        await ctx.send('foo')\n\n    @foo.before_invoke\n    async def before_foo_command(ctx):\n        # do something before the foo command is called\n        pass\n\n    @foo.after_invoke\n    async def after_foo_command(ctx):\n        # do something after the foo command is called\n        pass\n\nThe special cog method for these is :meth:`.Cog.cog_before_invoke` and :meth:`.Cog.cog_after_invoke`, e.g.:\n\n.. code-block:: python3\n\n    class MyCog(commands.Cog):\n        async def cog_before_invoke(self, ctx):\n            ctx.secret_cog_data = 'foo'\n\n        async def cog_after_invoke(self, ctx):\n            print('{0.command} is done...'.format(ctx))\n\n        @commands.command()\n        async def foo(self, ctx):\n            await ctx.send(ctx.secret_cog_data)\n\nTo check if a command failed in the after invocation hook, you can use\n:attr:`.Context.command_failed`.\n\nThe invocation order is as follows:\n\n1. Command local before invocation hook\n2. Cog local before invocation hook\n3. Global before invocation hook\n4. The actual command\n5. Command local after invocation hook\n6. Cog local after invocation hook\n7. Global after invocation hook\n\nConverter Changes\n~~~~~~~~~~~~~~~~~~~\n\nPrior to v1.0, a converter was a type hint that could be a callable that could be invoked\nwith a singular argument denoting the argument passed by the user as a string.\n\nThis system was eventually expanded to support a :class:`~ext.commands.Converter` system to\nallow plugging in the :class:`~ext.commands.Context` and do more complicated conversions such\nas the built-in \"discord\" converters.\n\nIn v1.0 this converter system was revamped to allow instances of :class:`~ext.commands.Converter` derived\nclasses to be passed. For consistency, the :meth:`~ext.commands.Converter.convert` method was changed to\nalways be a coroutine and will now take the two arguments as parameters.\n\nEssentially, before: ::\n\n    class MyConverter(commands.Converter):\n        def convert(self):\n            return self.ctx.message.server.me\n\nAfter: ::\n\n    class MyConverter(commands.Converter):\n        async def convert(self, ctx, argument):\n            return ctx.me\n\nThe command framework also got a couple new converters:\n\n- :class:`~ext.commands.clean_content` this is akin to :attr:`Message.clean_content` which scrubs mentions.\n- :class:`~ext.commands.UserConverter` will now appropriately convert :class:`User` only.\n- ``ChannelConverter`` is now split into two different converters.\n\n    - :class:`~ext.commands.TextChannelConverter` for :class:`TextChannel`.\n    - :class:`~ext.commands.VoiceChannelConverter` for :class:`VoiceChannel`.\n"
  },
  {
    "path": "docs/quickstart.rst",
    "content": ":orphan:\n\n.. _quickstart:\n\n.. currentmodule:: discord\n\nQuickstart\n============\n\nThis page gives a brief introduction to the library. It assumes you have the library installed,\nif you don't check the :ref:`installing` portion.\n\nA Minimal Bot\n---------------\n\nLet's make a bot that responds to a specific message and walk you through it.\n\nIt looks something like this:\n\n.. code-block:: python3\n\n    # This example requires the 'message_content' intent.\n\n    import discord\n\n    intents = discord.Intents.default()\n    intents.message_content = True\n\n    client = discord.Client(intents=intents)\n\n    @client.event\n    async def on_ready():\n        print(f'We have logged in as {client.user}')\n\n    @client.event\n    async def on_message(message):\n        if message.author == client.user:\n            return\n\n        if message.content.startswith('$hello'):\n            await message.channel.send('Hello!')\n\n    client.run('your token here')\n\nLet's name this file ``example_bot.py``. Make sure not to name it ``discord.py`` as that'll conflict\nwith the library.\n\nThere's a lot going on here, so let's walk you through it step by step.\n\n1. The first line just imports the library, if this raises a :exc:`ModuleNotFoundError` or :exc:`ImportError`\n   then head on over to :ref:`installing` section to properly install.\n2. Next, we create an instance of a :class:`Client`. This client is our connection to Discord.\n3. We then use the :meth:`Client.event` decorator to register an event. This library has many events.\n   Since this library is asynchronous, we do things in a \"callback\" style manner.\n\n   A callback is essentially a function that is called when something happens. In our case,\n   the :func:`on_ready` event is called when the bot has finished logging in and setting things\n   up and the :func:`on_message` event is called when the bot has received a message.\n4. Since the :func:`on_message` event triggers for *every* message received, we have to make\n   sure that we ignore messages from ourselves. We do this by checking if the :attr:`Message.author`\n   is the same as the :attr:`Client.user`.\n5. Afterwards, we check if the :class:`Message.content` starts with ``'$hello'``. If it does,\n   then we send a message in the channel it was used in with ``'Hello!'``. This is a basic way of \n   handling commands, which can be later automated with the :doc:`./ext/commands/index` framework.\n6. Finally, we run the bot with our login token. If you need help getting your token or creating a bot,\n   look in the :ref:`discord-intro` section.\n\n\nNow that we've made a bot, we have to *run* the bot. Luckily, this is simple since this is just a\nPython script, we can run it directly.\n\nOn Windows:\n\n.. code-block:: shell\n\n    $ py -3 example_bot.py\n\nOn other systems:\n\n.. code-block:: shell\n\n    $ python3 example_bot.py\n\nNow you can try playing around with your basic bot.\n"
  },
  {
    "path": "docs/version_guarantees.rst",
    "content": ".. _version_guarantees:\n\nVersion Guarantees\n=====================\n\nThe 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.\n\nThe 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.\n\n.. note::\n\n    The examples below are non-exhaustive.\n\nExamples of Breaking Changes\n------------------------------\n\n- Changing the default parameter value to something else.\n- Renaming a function without an alias to an old function.\n- Adding or removing parameters to an event.\n\nExamples of Non-Breaking Changes\n----------------------------------\n\n- Adding or removing private underscored attributes.\n- Adding an element into the ``__slots__`` of a data class.\n- Changing the behaviour of a function to fix a bug.\n- Changes in the typing behaviour of the library\n- Changes in the calling convention of functions that are primarily meant as callbacks\n- Changes in the documentation.\n- Modifying the internal HTTP handling.\n- Upgrading the dependencies to a new version, major or otherwise.\n\n"
  },
  {
    "path": "docs/whats_new.rst",
    "content": ".. currentmodule:: discord\n\n.. |commands| replace:: [:ref:`ext.commands <discord_ext_commands>`]\n.. |tasks| replace:: [:ref:`ext.tasks <discord_ext_tasks>`]\n\n.. _whats_new:\n\nChangelog\n============\n\nThis page keeps a detailed human friendly rendering of what's new and changed\nin specific versions.\n\n.. _vp2p4p0:\n\nv2.4.0\n-------\n\nNew Features\n~~~~~~~~~~~~~\n\n- Add support for allowed contexts in app commands (:issue:`9760`).\n    - An \"allowed context\" is the location where an app command can be used.\n    - This is an internal change to decorators such as :func:`app_commands.guild_only` and :func:`app_commands.dm_only`.\n    - Add :func:`app_commands.private_channel_only`.\n    - Add :func:`app_commands.allowed_contexts`.\n    - Add :class:`app_commands.AppCommandContext`.\n    - Add :attr:`app_commands.Command.allowed_contexts`.\n    - Add :attr:`app_commands.AppCommand.allowed_contexts`.\n    - Add :attr:`app_commands.ContextMenu.allowed_contexts`.\n\n- Add support for user-installable apps (:issue:`9760`).\n    - Add :attr:`app_commands.Command.allowed_installs`.\n    - Add :attr:`app_commands.AppCommand.allowed_installs`.\n    - Add :attr:`app_commands.ContextMenu.allowed_installs`.\n    - Add :func:`app_commands.allowed_installs`.\n    - Add :func:`app_commands.guild_install`.\n    - Add :func:`app_commands.user_install`.\n    - Add :class:`app_commands.AppInstallationType`.\n    - Add :attr:`Interaction.context`.\n    - Add :meth:`Interaction.is_guild_integration`.\n    - Add :meth:`Interaction.is_user_integration`.\n\n- Add support for Polls (:issue:`9759`).\n    - Polls can be created using :class:`Poll` and the ``poll`` keyword-only parameter in various message sending methods.\n    - Add :class:`PollAnswer` and :class:`PollMedia`.\n    - Add :attr:`Intents.polls`, :attr:`Intents.guild_polls` and :attr:`Intents.dm_polls` intents.\n    - Add :meth:`Message.end_poll` method to end polls.\n    - Add new events, :func:`on_poll_vote_add`, :func:`on_poll_vote_remove`, :func:`on_raw_poll_vote_add`, and :func:`on_raw_poll_vote_remove`.\n\n- Voice handling has been completely rewritten to hopefully fix many bugs (:issue:`9525`, :issue:`9528`, :issue:`9536`, :issue:`9572`, :issue:`9576`, :issue:`9596`, :issue:`9683`, :issue:`9699`, :issue:`9772`, etc.)\n- Add :attr:`DMChannel.recipients` to get all recipients of a DM channel (:issue:`9760`).\n- Add support for :attr:`RawReactionActionEvent.message_author_id`.\n- Add support for :attr:`AuditLogAction.creator_monetization_request_created` and :attr:`AuditLogAction.creator_monetization_terms_accepted`.\n- Add support for :class:`AttachmentFlags`, accessed via :attr:`Attachment.flags` (:issue:`9486`).\n- Add support for :class:`RoleFlags`, accessed via :attr:`Role.flags` (:issue:`9485`).\n- Add support for :attr:`ChannelType.media`, accessed via :meth:`ForumChannel.is_media`.\n- Add various new permissions (:issue:`9501`, :issue:`9762`, :issue:`9759`, :issue:`9857`)\n    - Add :meth:`Permissions.events`.\n    - Add :attr:`Permissions.create_events`.\n    - Add :attr:`Permissions.view_creator_monetization_analytics`.\n    - Add :attr:`Permissions.send_polls`\n    - Add :attr:`Permissions.create_polls`.\n    - Add :attr:`Permissions.use_external_apps`.\n\n- Add shortcut for :attr:`CategoryChannel.forums`.\n- Add encoder options to :meth:`VoiceClient.play` (:issue:`9527`).\n- Add support for team member roles.\n    - Add :class:`TeamMemberRole`.\n    - Add :attr:`TeamMember.role`.\n    - Updated :attr:`Bot.owner_ids <.ext.commands.Bot.owner_ids>` to account for team roles. Team owners or developers are considered Bot owners.\n\n- Add optional attribute ``integration_type`` in :attr:`AuditLogEntry.extra` for ``kick`` or ``member_role_update`` actions.\n- Add support for \"dynamic\" :class:`ui.Item` that let you parse state out of a ``custom_id`` using regex.\n    - In order to use this, you must subclass :class:`ui.DynamicItem`.\n    - This is an alternative to persistent views.\n    - Add :meth:`Client.add_dynamic_items`.\n    - Add :meth:`Client.remove_dynamic_items`.\n    - Add :meth:`ui.Item.interaction_check`.\n    - Check the :resource:`dynamic_counter example <examples>` for more information.\n\n- Add support for reading burst reactions. The API does not support sending them as of currently.\n    - Add :attr:`Reaction.normal_count`.\n    - Add :attr:`Reaction.burst_count`.\n    - Add :attr:`Reaction.me_burst`.\n\n- Add support for default values on select menus (:issue:`9577`).\n    - Add :class:`SelectDefaultValue`.\n    - Add :class:`SelectDefaultValueType`.\n    - Add a ``default_values`` attribute to each specialised select menu.\n\n- Add ``scheduled_event`` parameter for :meth:`StageChannel.create_instance` (:issue:`9595`).\n- Add support for auto mod members (:issue:`9328`).\n    - Add ``type`` keyword argument to :class:`AutoModRuleAction`.\n    - Add :attr:`AutoModTrigger.mention_raid_protection`.\n    - Add :attr:`AutoModRuleTriggerType.member_profile`.\n    - Add :attr:`AutoModRuleEventType.member_update`.\n    - Add :attr:`AutoModRuleActionType.block_member_interactions`.\n\n- Add support for premium app integrations (:issue:`9453`).\n    - Add multiple SKU and entitlement related classes, e.g. :class:`SKU`, :class:`Entitlement`, :class:`SKUFlags`.\n    - Add multiple enums, e.g. :class:`SKUType`, :class:`EntitlementType`, :class:`EntitlementOwnerType`.\n    - Add :meth:`Client.fetch_skus` and :meth:`Client.fetch_entitlement` to fetch from the API.\n    - Add :meth:`Client.create_entitlement` to create entitlements.\n    - Add :attr:`Client.entitlements`.\n    - Add :attr:`Interaction.entitlement_sku_ids`.\n    - Add :attr:`Interaction.entitlements`.\n    - Add :attr:`ButtonStyle.premium` and :attr:`ui.Button.sku_id` to send a button asking the user to buy an SKU (:issue:`9845`).\n    - Add support for one time purchase (:issue:`9803`).\n\n- Add support for editing application info (:issue:`9610`).\n    - Add :attr:`AppInfo.interactions_endpoint_url`.\n    - Add :attr:`AppInfo.redirect_uris`.\n    - Add :meth:`AppInfo.edit`.\n\n- Add support for getting/fetching threads from :class:`Message` (:issue:`9665`).\n    - Add :attr:`PartialMessage.thread`.\n    - Add :attr:`Message.thread`.\n    - Add :meth:`Message.fetch_thread`.\n\n- Add support for platform and assets to activities (:issue:`9677`).\n    - Add :attr:`Activity.platform`.\n    - Add :attr:`Game.platform`.\n    - Add :attr:`Game.assets`.\n\n- Add support for suppressing embeds in an interaction response (:issue:`9678`).\n- Add support for adding forum thread tags via webhook (:issue:`9680`) and (:issue:`9783`).\n- Add support for guild incident message types (:issue:`9686`).\n- Add :attr:`Locale.latin_american_spanish` (:issue:`9689`).\n- Add support for setting voice channel status (:issue:`9603`).\n- Add a shard connect timeout parameter to :class:`AutoShardedClient`.\n- Add support for guild incidents (:issue:`9590`).\n    - Updated :meth:`Guild.edit` with ``invites_disabled_until`` and ``dms_disabled_until`` parameters.\n    - Add :attr:`Guild.invites_paused_until`.\n    - Add :attr:`Guild.dms_paused_until`.\n    - Add :meth:`Guild.invites_paused`.\n    - Add :meth:`Guild.dms_paused`.\n\n- Add support for :attr:`abc.User.avatar_decoration` (:issue:`9343`).\n- Add support for GIF stickers (:issue:`9737`).\n- Add support for updating :class:`ClientUser` banners (:issue:`9752`).\n- Add support for bulk banning members via :meth:`Guild.bulk_ban`.\n- Add ``reason`` keyword argument to :meth:`Thread.delete` (:issue:`9804`).\n- Add :attr:`AppInfo.approximate_guild_count` (:issue:`9811`).\n- Add support for :attr:`Message.interaction_metadata` (:issue:`9817`).\n- Add support for differing :class:`Invite` types (:issue:`9682`).\n- Add support for reaction types to raw and non-raw models (:issue:`9836`).\n- |tasks| Add ``name`` parameter to :meth:`~ext.tasks.loop` to name the internal :class:`asyncio.Task`.\n- |commands| Add fallback behaviour to :class:`~ext.commands.CurrentGuild`.\n- |commands| Add logging for errors that occur during :meth:`~ext.commands.Cog.cog_unload`.\n- |commands| Add support for :class:`typing.NewType` and ``type`` keyword type aliases (:issue:`9815`).\n    - Also supports application commands.\n\n- |commands| Add support for positional-only flag parameters (:issue:`9805`).\n- |commands| Add support for channel URLs in ChannelConverter related classes (:issue:`9799`).\n\n\nBug Fixes\n~~~~~~~~~~\n\n- Fix emoji and sticker cache being populated despite turning the intent off.\n- Fix outstanding chunk requests when receiving a gateway READY event not being cleared (:issue:`9571`).\n- Fix escape behaviour for lists and headers in :meth:`~utils.escape_markdown`.\n- Fix alias value for :attr:`Intents.auto_moderation` (:issue:`9524`).\n- Fixes and improvements for :class:`FFmpegAudio` and all related subclasses (:issue:`9528`).\n- Fix :meth:`Template.source_guild` attempting to resolve from cache (:issue:`9535`).\n- Fix :exc:`IndexError` being raised instead of :exc:`ValueError` when calling :meth:`Colour.from_str` with an empty string (:issue:`9540`).\n- Fix :meth:`View.from_message` not correctly creating the varying :class:`ui.Select` types (:issue:`9559`).\n- Fix logging with autocomplete exceptions, which were previously suppressed.\n- Fix possible error in voice cleanup logic (:issue:`9572`).\n- Fix possible :exc:`AttributeError` during :meth:`app_commands.CommandTree.sync` when a command is regarded as 'too large'.\n- Fix possible :exc:`TypeError` if a :class:`app_commands.Group` did not have a name set (:issue:`9581`).\n- Fix possible bad voice state where you move to a voice channel with missing permissions (:issue:`9596`).\n- Fix websocket reaching an error state due to received error payload (:issue:`9561`).\n- Fix handling of :class:`AuditLogDiff` when relating to auto mod triggers (:issue:`9622`).\n- Fix race condition in voice logic relating to disconnect and connect (:issue:`9683`).\n- Use the :attr:`Interaction.user` guild as a fallback for :attr:`Interaction.guild` if not available.\n- Fix restriction on auto moderation audit log ID range.\n- Fix check for maximum number of children per :class:`ui.View`.\n- Fix comparison between :class:`Object` classes with a ``type`` set.\n- Fix handling of an enum in :meth:`AutoModRule.edit` (:issue:`9798`).\n- Fix handling of :meth:`Client.close` within :meth:`Client.__aexit__` (:issue:`9769`).\n- Fix channel deletion not evicting related threads from cache (:issue:`9796`).\n- Fix bug with cache superfluously incrementing role positions (:issue:`9853`).\n- Fix ``exempt_channels`` not being passed along in :meth:`Guild.create_automod_rule` (:issue:`9861`).\n- Fix :meth:`abc.GuildChannel.purge` failing on single-message delete mode if the message was deleted (:issue:`9830`, :issue:`9863`).\n- |commands| Fix localization support for :class:`~ext.commands.HybridGroup` fallback.\n- |commands| Fix nested :class:`~ext.commands.HybridGroup`'s inserting manual app commands.\n- |commands| Fix an issue where :class:`~ext.commands.HybridGroup` wrapped instances would be out of sync.\n- |commands| Fix :class:`~ext.commands.HelpCommand` defined checks not carrying over during copy (:issue:`9843`).\n\nMiscellaneous\n~~~~~~~~~~~~~~\n\n- Additional documentation added for logging capabilities.\n- Performance increases of constructing :class:`Permissions` using keyword arguments.\n- Improve ``__repr__`` of :class:`SyncWebhook` and :class:`Webhook` (:issue:`9764`).\n- Change internal thread names to be consistent (:issue:`9538`).\n\n.. _vp2p3p2:\n\nv2.3.2\n-------\n\nBug Fixes\n~~~~~~~~~~\n\n- Fix the ``name`` parameter not being respected when sending a :class:`CustomActivity`.\n- Fix :attr:`Intents.emoji` and :attr:`Intents.emojis_and_stickers` having swapped alias values (:issue:`9471`).\n- Fix ``NameError`` when using :meth:`abc.GuildChannel.create_invite` (:issue:`9505`).\n- Fix crash when disconnecting during the middle of a ``HELLO`` packet when using :class:`AutoShardedClient`.\n- Fix voice websocket not being closed before being replaced by a new one (:issue:`9518`).\n- |commands| Fix the wrong :meth:`~ext.commands.HelpCommand.on_help_command_error` being called when ejected from a cog.\n- |commands| Fix ``=None`` being displayed in :attr:`~ext.commands.Command.signature`.\n\n.. _vp2p3p1:\n\nv2.3.1\n-------\n\nBug Fixes\n~~~~~~~~~~\n\n- Fix username lookup in :meth:`Guild.get_member_named` (:issue:`9451`).\n- Use cache data first for :attr:`Interaction.channel` instead of API data.\n    - This bug usually manifested in incomplete channel objects (e.g. no ``overwrites``) because Discord does not provide this data.\n\n- Fix false positives in :meth:`PartialEmoji.from_str` inappropriately setting ``animated`` to ``True`` (:issue:`9456`, :issue:`9457`).\n- Fix certain select types not appearing in :attr:`Message.components` (:issue:`9462`).\n- |commands| Change lookup order for :class:`~ext.commands.MemberConverter` and :class:`~ext.commands.UserConverter` to prioritise usernames instead of nicknames.\n\n.. _vp2p3p0:\n\nv2.3.0\n--------\n\nNew Features\n~~~~~~~~~~~~~\n\n- Add support for the new username system (also known as \"pomelo\").\n    - Add :attr:`User.global_name` to get their global nickname or \"display name\".\n    - Update :attr:`User.display_name` and :attr:`Member.display_name` to understand global nicknames.\n    - Update ``__str__`` for :class:`User` to drop discriminators if the user has been migrated.\n    - Update :meth:`Guild.get_member_named` to work with migrated users.\n    - Update :attr:`User.default_avatar` to work with migrated users.\n    - |commands| Update user and member converters to understand migrated users.\n\n- Add :attr:`DefaultAvatar.pink` for new pink default avatars.\n- Add :meth:`Colour.pink` to get the pink default avatar colour.\n- Add support for voice messages (:issue:`9358`)\n    - Add :attr:`MessageFlags.voice`\n    - Add :attr:`Attachment.duration` and :attr:`Attachment.waveform`\n    - Add :meth:`Attachment.is_voice_message`\n    - This does not support *sending* voice messages because this is currently unsupported by the API.\n\n- Add support for new :attr:`Interaction.channel` attribute from the API update (:issue:`9339`).\n- Add support for :attr:`TextChannel.default_thread_slowmode_delay` (:issue:`9291`).\n- Add support for :attr:`ForumChannel.default_sort_order` (:issue:`9290`).\n- Add support for ``default_reaction_emoji`` and ``default_forum_layout`` in :meth:`Guild.create_forum` (:issue:`9300`).\n- Add support for ``widget_channel``, ``widget_enabled``, and ``mfa_level`` in :meth:`Guild.edit` (:issue:`9302`, :issue:`9303`).\n- Add various new :class:`Permissions` and changes (:issue:`9312`, :issue:`9325`, :issue:`9358`, :issue:`9378`)\n    - Add new :attr:`~Permissions.manage_expressions`, :attr:`~Permissions.use_external_sounds`, :attr:`~Permissions.use_soundboard`, :attr:`~Permissions.send_voice_messages`, :attr:`~Permissions.create_expressions` permissions.\n    - Change :attr:`Permissions.manage_emojis` to be an alias of :attr:`~Permissions.manage_expressions`.\n\n- Add various new properties to :class:`PartialAppInfo` and :class:`AppInfo` (:issue:`9298`).\n- Add support for ``with_counts`` parameter to :meth:`Client.fetch_guilds` (:issue:`9369`).\n- Add new :meth:`Guild.get_emoji` helper (:issue:`9296`).\n- Add :attr:`ApplicationFlags.auto_mod_badge` (:issue:`9313`).\n- Add :attr:`Guild.max_stage_video_users` and :attr:`Guild.safety_alerts_channel` (:issue:`9318`).\n- Add support for ``raid_alerts_disabled`` and ``safety_alerts_channel`` in :meth:`Guild.edit` (:issue:`9318`).\n- |commands| Add :attr:`BadLiteralArgument.argument <ext.commands.BadLiteralArgument.argument>` to get the failed argument's value (:issue:`9283`).\n- |commands| Add :attr:`Context.filesize_limit <ext.commands.Context.filesize_limit>` property (:issue:`9416`).\n- |commands| Add support for :attr:`Parameter.displayed_name <ext.commands.Parameter.displayed_name>` (:issue:`9427`).\n\nBug Fixes\n~~~~~~~~~~\n\n- Fix ``FileHandler`` handlers being written ANSI characters when the bot is executed inside PyCharm.\n    - This has the side effect of removing coloured logs from the PyCharm terminal due an upstream bug involving TTY detection. This issue is tracked under `PY-43798 <https://youtrack.jetbrains.com/issue/PY-43798>`_.\n\n- Fix channel edits with :meth:`Webhook.edit` sending two requests instead of one.\n- Fix :attr:`StageChannel.last_message_id` always being ``None`` (:issue:`9422`).\n- Fix piped audio input ending prematurely (:issue:`9001`, :issue:`9380`).\n- Fix persistent detection for :class:`ui.TextInput` being incorrect if the ``custom_id`` is set later (:issue:`9438`).\n- Fix custom attributes not being copied over when inheriting from :class:`app_commands.Group` (:issue:`9383`).\n- Fix AutoMod audit log entry error due to empty channel_id (:issue:`9384`).\n- Fix handling of ``around`` parameter in :meth:`abc.Messageable.history` (:issue:`9388`).\n- Fix occasional :exc:`AttributeError` when accessing the :attr:`ClientUser.mutual_guilds` property (:issue:`9387`).\n- Fix :func:`utils.escape_markdown` not escaping the new markdown (:issue:`9361`).\n- Fix webhook targets not being converted in audit logs (:issue:`9332`).\n- Fix error when not passing ``enabled`` in :meth:`Guild.create_automod_rule` (:issue:`9292`).\n- Fix how various parameters are handled in :meth:`Guild.create_scheduled_event` (:issue:`9275`).\n- Fix not sending the ``ssrc`` parameter when sending the SPEAKING payload (:issue:`9301`).\n- Fix :attr:`Message.guild` being ``None`` sometimes when received via an interaction.\n- Fix :attr:`Message.system_content` for :attr:`MessageType.channel_icon_change` (:issue:`9410`).\n\nMiscellaneous\n~~~~~~~~~~~~~~\n\n- Update the base :attr:`Guild.filesize_limit` to 25MiB (:issue:`9353`).\n- Allow Interaction webhook URLs to be used in :meth:`Webhook.from_url`.\n- Set the socket family of internal connector to ``AF_INET`` to prevent IPv6 connections (:issue:`9442`, :issue:`9443`).\n\n.. _vp2p2p3:\n\nv2.2.3\n-------\n\nBug Fixes\n~~~~~~~~~~\n\n- Fix crash from Discord sending null ``channel_id`` for automod audit logs.\n- Fix ``channel`` edits when using :meth:`Webhook.edit` sending two requests.\n- Fix :attr:`AuditLogEntry.target` being ``None`` for invites (:issue:`9336`).\n- Fix :exc:`KeyError` when accessing data for :class:`GuildSticker` (:issue:`9324`).\n\n\n.. _vp2p2p2:\n\nv2.2.2\n-------\n\nBug Fixes\n~~~~~~~~~~\n\n- Fix UDP discovery in voice not using new 74 byte layout which caused voice to break (:issue:`9277`, :issue:`9278`)\n\n.. _vp2p2p0:\n\nv2.2.0\n-------\n\nNew Features\n~~~~~~~~~~~~\n\n- Add support for new :func:`on_audit_log_entry_create` event\n- Add support for silent messages via ``silent`` parameter in :meth:`abc.Messageable.send`\n    - This is queryable via :attr:`MessageFlags.suppress_notifications`\n\n- Implement :class:`abc.Messageable` for :class:`StageChannel` (:issue:`9248`)\n- Add setter for :attr:`discord.ui.ChannelSelect.channel_types` (:issue:`9068`)\n- Add support for custom messages in automod via :attr:`AutoModRuleAction.custom_message` (:issue:`9267`)\n- Add :meth:`ForumChannel.get_thread` (:issue:`9106`)\n- Add :attr:`StageChannel.slowmode_delay` and :attr:`VoiceChannel.slowmode_delay` (:issue:`9111`)\n- Add support for editing the slowmode for :class:`StageChannel` and :class:`VoiceChannel` (:issue:`9111`)\n- Add :attr:`Locale.indonesian`\n- Add ``delete_after`` keyword argument to :meth:`Interaction.edit_message` (:issue:`9415`)\n- Add ``delete_after`` keyword argument to :meth:`InteractionMessage.edit` (:issue:`9206`)\n- Add support for member flags (:issue:`9204`)\n    - Accessible via :attr:`Member.flags` and has a type of :class:`MemberFlags`\n    - Support ``bypass_verification`` within :meth:`Member.edit`\n\n- Add support for passing a client to :meth:`Webhook.from_url` and :meth:`Webhook.partial`\n    - This allows them to use views (assuming they are \"bot owned\" webhooks)\n\n- Add :meth:`Colour.dark_embed` and :meth:`Colour.light_embed` (:issue:`9219`)\n- Add support for many more parameters within :meth:`Guild.create_stage_channel` (:issue:`9245`)\n- Add :attr:`AppInfo.role_connections_verification_url`\n- Add support for :attr:`ForumChannel.default_layout`\n- Add various new :class:`MessageType` values such as ones related to stage channel and role subscriptions\n- Add support for role subscription related attributes\n    - :class:`RoleSubscriptionInfo` within :attr:`Message.role_subscription`\n    - :attr:`MessageType.role_subscription_purchase`\n    - :attr:`SystemChannelFlags.role_subscription_purchase_notifications`\n    - :attr:`SystemChannelFlags.role_subscription_purchase_notification_replies`\n    - :attr:`RoleTags.subscription_listing_id`\n    - :meth:`RoleTags.is_available_for_purchase`\n\n- Add support for checking if a role is a linked role under :meth:`RoleTags.is_guild_connection`\n- Add support for GIF sticker type\n- Add support for :attr:`Message.application_id` and :attr:`Message.position`\n- Add :func:`utils.maybe_coroutine` helper\n- Add :attr:`ScheduledEvent.creator_id` attribute\n- |commands| Add support for :meth:`~ext.commands.Cog.interaction_check` for :class:`~ext.commands.GroupCog` (:issue:`9189`)\n\nBug Fixes\n~~~~~~~~~~\n\n- Fix views not being removed from message store backing leading to a memory leak when used from an application command context\n- Fix async iterators requesting past their bounds when using ``oldest_first`` and ``after`` or ``before`` (:issue:`9093`)\n- Fix :meth:`Guild.audit_logs` pagination logic being buggy when using ``after`` (:issue:`9269`)\n- Fix :attr:`Message.channel` sometimes being :class:`Object` instead of :class:`PartialMessageable`\n- Fix :class:`ui.View` not properly calling ``super().__init_subclass__`` (:issue:`9231`)\n- Fix ``available_tags`` and ``default_thread_slowmode_delay`` not being respected in :meth:`Guild.create_forum`\n- Fix :class:`AutoModTrigger` ignoring ``allow_list`` with type keyword (:issue:`9107`)\n- Fix implicit permission resolution for :class:`Thread` (:issue:`9153`)\n- Fix :meth:`AutoModRule.edit` to work with actual snowflake types such as :class:`Object` (:issue:`9159`)\n- Fix :meth:`Webhook.send` returning :class:`ForumChannel` for :attr:`WebhookMessage.channel`\n- When a lookup for :attr:`AuditLogEntry.target` fails, it will fallback to :class:`Object` with the appropriate :attr:`Object.type` (:issue:`9171`)\n- Fix :attr:`AuditLogDiff.type` for integrations returning :class:`ChannelType` instead of :class:`str` (:issue:`9200`)\n- Fix :attr:`AuditLogDiff.type` for webhooks returning :class:`ChannelType` instead of :class:`WebhookType` (:issue:`9251`)\n- Fix webhooks and interactions not properly closing files after the request has completed\n- Fix :exc:`NameError` in audit log target for app commands\n- Fix :meth:`ScheduledEvent.edit` requiring some arguments to be passed in when unnecessary (:issue:`9261`, :issue:`9268`)\n- |commands| Explicit set a traceback for hybrid command invocations (:issue:`9205`)\n\nMiscellaneous\n~~~~~~~~~~~~~~\n\n- Add colour preview for the colours predefined in :class:`Colour`\n- Finished views are no longer stored by the library when sending them (:issue:`9235`)\n- Force enable colour logging for the default logging handler when run under Docker.\n- Add various overloads for :meth:`Client.wait_for` to aid in static analysis (:issue:`9184`)\n- :class:`Interaction` can now optionally take a generic parameter, ``ClientT`` to represent the type for :attr:`Interaction.client`\n- |commands| Respect :attr:`~ext.commands.Command.ignore_extra` for :class:`~discord.ext.commands.FlagConverter` keyword-only parameters\n- |commands| Change :attr:`Paginator.pages <ext.commands.Paginator.pages>` to not prematurely close (:issue:`9257`)\n\n.. _vp2p1p1:\n\nv2.1.1\n-------\n\nBug Fixes\n~~~~~~~~~~\n\n- Fix crash involving GIF stickers when looking up their filename extension.\n\n.. _vp2p1p0:\n\nv2.1.0\n-------\n\nNew Features\n~~~~~~~~~~~~\n\n- Add support for ``delete_message_seconds`` in :meth:`Guild.ban` (:issue:`8391`)\n- Add support for automod related audit log actions (:issue:`8389`)\n- Add support for :class:`ForumChannel` annotations in app commands\n- Add support for :attr:`ForumChannel.default_thread_slowmode_delay`.\n- Add support for :attr:`ForumChannel.default_reaction_emoji`.\n- Add support for forum tags under :class:`ForumTag`.\n    - Tags can be obtained using :attr:`ForumChannel.available_tags` or :meth:`ForumChannel.get_tag`.\n    - See :meth:`Thread.edit` and :meth:`ForumChannel.edit` for modifying tags and their usage.\n\n- Add support for new select types (:issue:`9013`, :issue:`9003`).\n    - These are split into separate classes, :class:`~discord.ui.ChannelSelect`, :class:`~discord.ui.RoleSelect`, :class:`~discord.ui.UserSelect`, :class:`~discord.ui.MentionableSelect`.\n    - The decorator still uses a single function, :meth:`~discord.ui.select`. Changing the select type is done by the ``cls`` keyword parameter.\n\n- Add support for toggling discoverable and invites_disabled features in :meth:`Guild.edit` (:issue:`8390`).\n- Add :meth:`Interaction.translate` helper method (:issue:`8425`).\n- Add :meth:`Forum.archived_threads` (:issue:`8476`).\n- Add :attr:`ApplicationFlags.active`, :attr:`UserFlags.active_developer`, and :attr:`PublicUserFlags.active_developer`.\n- Add ``delete_after`` to :meth:`InteractionResponse.send_message` (:issue:`9022`).\n- Add support for :attr:`AutoModTrigger.regex_patterns`.\n- |commands| Add :attr:`GroupCog.group_extras <discord.ext.commands.GroupCog.group_extras>` to set :attr:`app_commands.Group.extras` (:issue:`8405`).\n- |commands| Add support for NumPy style docstrings for regular commands to set parameter descriptions.\n- |commands| Allow :class:`~discord.ext.commands.Greedy` to potentially maintain state between calls.\n- |commands| Add :meth:`Cog.has_app_command_error_handler <discord.ext.commands.Cog.has_app_command_error_handler>` (:issue:`8991`).\n- |commands| Allow ``delete_after`` in :meth:`Context.send <discord.ext.commands.Context.send>` on ephemeral messages (:issue:`9021`).\n\nBug Fixes\n~~~~~~~~~\n\n- Fix an :exc:`KeyError` being raised when constructing :class:`app_commands.Group` with no module (:issue:`8411`).\n- Fix unescaped period in webhook URL regex (:issue:`8443`).\n- Fix :exc:`app_commands.CommandSyncFailure` raising for other 400 status code errors.\n- Fix potential formatting issues showing `_errors` in :exc:`app_commands.CommandSyncFailure`.\n- Fix :attr:`Guild.stage_instances` and :attr:`Guild.schedule_events` clearing on ``GUILD_UPDATE``.\n- Fix detection of overriden :meth:`app_commands.Group.on_error`\n- Fix :meth:`app_commands.CommandTree.on_error` still being called when a bound error handler is set.\n- Fix thread permissions being set to ``True`` in :meth:`DMChannel.permissions_for` (:issue:`8965`).\n- Fix ``on_scheduled_event_delete`` occasionally dispatching with too many parameters (:issue:`9019`).\n- |commands| Fix :meth:`Context.from_interaction <discord.ext.commands.Context.from_interaction>` ignoring :attr:`~discord.ext.commands.Context.command_failed`.\n- |commands| Fix :class:`~discord.ext.commands.Range` to allow 3.10 Union syntax (:issue:`8446`).\n- |commands| Fix ``before_invoke`` not triggering for fallback commands in a hybrid group command (:issue:`8461`, :issue:`8462`).\n\nMiscellaneous\n~~~~~~~~~~~~~\n\n- Change error message for unbound callbacks in :class:`app_commands.ContextMenu` to make it clearer that bound methods are not allowed.\n- Normalize type formatting in TypeError exceptions (:issue:`8453`).\n- Change :meth:`VoiceProtocol.on_voice_state_update` and :meth:`VoiceProtocol.on_voice_server_update` parameters to be positional only (:issue:`8463`).\n- Add support for PyCharm when using the default coloured logger (:issue:`9015`).\n\n.. _vp2p0p1:\n\nv2.0.1\n-------\n\nBug Fixes\n~~~~~~~~~~\n\n- Fix ``cchardet`` being installed on Python >=3.10 when using the ``speed`` extras.\n- Fix :class:`ui.View` timeout updating when the :meth:`ui.View.interaction_check` failed.\n- Fix :meth:`app_commands.CommandTree.on_error` not triggering if :meth:`~app_commands.CommandTree.interaction_check` raises.\n- Fix ``__main__`` script to use ``importlib.metadata`` instead of the deprecated ``pkg_resources``.\n- Fix library callbacks triggering a type checking error if the parameter names were different.\n    - This required a change in the :ref:`version_guarantees`\n\n- |commands| Fix Python 3.10 union types not working with :class:`commands.Greedy <discord.ext.commands.Greedy>`.\n\n.. _vp2p0p0:\n\nv2.0.0\n--------\n\nThe changeset for this version are too big to be listed here, for more information please\nsee :ref:`the migrating page <migrating_2_0>`.\n\n.. _vp1p7p3:\n\nv1.7.3\n--------\n\nBug Fixes\n~~~~~~~~~~\n\n- Fix a crash involving guild uploaded stickers\n- Fix :meth:`DMChannel.permissions_for` not having :attr:`Permissions.read_messages` set.\n\n.. _vp1p7p2:\n\nv1.7.2\n-------\n\nBug Fixes\n~~~~~~~~~~~\n\n- Fix ``fail_if_not_exists`` causing certain message references to not be usable within :meth:`abc.Messageable.send` and :meth:`Message.reply` (:issue:`6726`)\n- Fix :meth:`Guild.chunk` hanging when the user left the guild. (:issue:`6730`)\n- Fix loop sleeping after final iteration rather than before (:issue:`6744`)\n\n.. _vp1p7p1:\n\nv1.7.1\n-------\n\nBug Fixes\n~~~~~~~~~~~\n\n- |commands| Fix :meth:`Cog.has_error_handler <ext.commands.Cog.has_error_handler>` not working as intended.\n\n.. _vp1p7p0:\n\nv1.7.0\n--------\n\nThis version is mainly for improvements and bug fixes. This is more than likely the last major version in the 1.x series.\nWork after this will be spent on v2.0. As a result, **this is the last version to support Python 3.5**.\nLikewise, **this is the last version to support user bots**.\n\nDevelopment of v2.0 will have breaking changes and support for newer API features.\n\nNew Features\n~~~~~~~~~~~~~~\n\n- Add support for stage channels via :class:`StageChannel` (:issue:`6602`, :issue:`6608`)\n- Add support for :attr:`MessageReference.fail_if_not_exists` (:issue:`6484`)\n    - By default, if the message you're replying to doesn't exist then the API errors out.\n      This attribute tells the Discord API that it's okay for that message to be missing.\n\n- Add support for Discord's new permission serialisation scheme.\n- Add an easier way to move channels using :meth:`abc.GuildChannel.move`\n- Add :attr:`Permissions.use_slash_commands`\n- Add :attr:`Permissions.request_to_speak`\n- Add support for voice regions in voice channels via :attr:`VoiceChannel.rtc_region` (:issue:`6606`)\n- Add support for :meth:`PartialEmoji.url_as` (:issue:`6341`)\n- Add :attr:`MessageReference.jump_url` (:issue:`6318`)\n- Add :attr:`File.spoiler` (:issue:`6317`)\n- Add support for passing ``roles`` to :meth:`Guild.estimate_pruned_members` (:issue:`6538`)\n- Allow callable class factories to be used in :meth:`abc.Connectable.connect` (:issue:`6478`)\n- Add a way to get mutual guilds from the client's cache via :attr:`User.mutual_guilds` (:issue:`2539`, :issue:`6444`)\n- :meth:`PartialMessage.edit` now returns a full :class:`Message` upon success (:issue:`6309`)\n- Add :attr:`RawMessageUpdateEvent.guild_id` (:issue:`6489`)\n- :class:`AuditLogEntry` is now hashable (:issue:`6495`)\n- :class:`Attachment` is now hashable\n- Add :attr:`Attachment.content_type` attribute (:issue:`6618`)\n- Add support for casting :class:`Attachment` to :class:`str` to get the URL.\n- Add ``seed`` parameter for :class:`Colour.random` (:issue:`6562`)\n    - This only seeds it for one call. If seeding for multiple calls is desirable, use :func:`random.seed`.\n\n- Add a :func:`utils.remove_markdown` helper function (:issue:`6573`)\n- Add support for passing scopes to :func:`utils.oauth_url` (:issue:`6568`)\n- |commands| Add support for ``rgb`` CSS function as a parameter to :class:`ColourConverter <ext.commands.ColourConverter>` (:issue:`6374`)\n- |commands| Add support for converting :class:`StoreChannel` via :class:`StoreChannelConverter <ext.commands.StoreChannelConverter>` (:issue:`6603`)\n- |commands| Add support for stripping whitespace after the prefix is encountered using the ``strip_after_prefix`` :class:`~ext.commands.Bot` constructor parameter.\n- |commands| Add :attr:`Context.invoked_parents <ext.commands.Context.invoked_parents>` to get the aliases a command's parent was invoked with (:issue:`1874`, :issue:`6462`)\n- |commands| Add a converter for :class:`PartialMessage` under :class:`ext.commands.PartialMessageConverter` (:issue:`6308`)\n- |commands| Add a converter for :class:`Guild` under :class:`ext.commands.GuildConverter` (:issue:`6016`, :issue:`6365`)\n- |commands| Add :meth:`Command.has_error_handler <ext.commands.Command.has_error_handler>`\n    - This is also adds :meth:`Cog.has_error_handler <ext.commands.Cog.has_error_handler>`\n- |commands| Allow callable types to act as a bucket key for cooldowns (:issue:`6563`)\n- |commands| Add ``linesep`` keyword argument to :class:`Paginator <ext.commands.Paginator>` (:issue:`5975`)\n- |commands| Allow ``None`` to be passed to :attr:`HelpCommand.verify_checks <ext.commands.HelpCommand.verify_checks>` to only verify in a guild context (:issue:`2008`, :issue:`6446`)\n- |commands| Allow relative paths when loading extensions via a ``package`` keyword argument (:issue:`2465`, :issue:`6445`)\n\nBug Fixes\n~~~~~~~~~~\n\n- Fix mentions not working if ``mention_author`` is passed in :meth:`abc.Messageable.send` without :attr:`Client.allowed_mentions` set (:issue:`6192`, :issue:`6458`)\n- Fix user created instances of :class:`CustomActivity` triggering an error (:issue:`4049`)\n    - Note that currently, bot users still cannot set a custom activity due to a Discord limitation.\n- Fix :exc:`ZeroDivisionError` being raised from :attr:`VoiceClient.average_latency` (:issue:`6430`, :issue:`6436`)\n- Fix :attr:`User.public_flags` not updating upon edit (:issue:`6315`)\n- Fix :attr:`Message.call` sometimes causing attribute errors (:issue:`6390`)\n- Fix issue resending a file during request retries on newer versions of ``aiohttp`` (:issue:`6531`)\n- Raise an error when ``user_ids`` is empty in :meth:`Guild.query_members`\n- Fix ``__str__`` magic method raising when a :class:`Guild` is unavailable.\n- Fix potential :exc:`AttributeError` when accessing :attr:`VoiceChannel.members` (:issue:`6602`)\n- :class:`Embed` constructor parameters now implicitly convert to :class:`str` (:issue:`6574`)\n- Ensure ``discord`` package is only run if executed as a script (:issue:`6483`)\n- |commands| Fix irrelevant commands potentially being unloaded during cog unload due to failure.\n- |commands| Fix attribute errors when setting a cog to :class:`~.ext.commands.HelpCommand` (:issue:`5154`)\n- |commands| Fix :attr:`Context.invoked_with <ext.commands.Context.invoked_with>` being improperly reassigned during a :meth:`~ext.commands.Context.reinvoke` (:issue:`6451`, :issue:`6462`)\n- |commands| Remove duplicates from :meth:`HelpCommand.get_bot_mapping <ext.commands.HelpCommand.get_bot_mapping>` (:issue:`6316`)\n- |commands| Properly handle positional-only parameters in bot command signatures (:issue:`6431`)\n- |commands| Group signatures now properly show up in :attr:`Command.signature <ext.commands.Command.signature>` (:issue:`6529`, :issue:`6530`)\n\nMiscellaneous\n~~~~~~~~~~~~~~\n\n- User endpoints and all userbot related functionality has been deprecated and will be removed in the next major version of the library.\n- :class:`Permission` class methods were updated to match the UI of the Discord client (:issue:`6476`)\n- ``_`` and ``-`` characters are now stripped when making a new cog using the ``discord`` package (:issue:`6313`)\n\n.. _vp1p6p0:\n\nv1.6.0\n--------\n\nThis version comes with support for replies and stickers.\n\nNew Features\n~~~~~~~~~~~~~~\n\n- An entirely redesigned documentation. This was the cumulation of multiple months of effort.\n    - There's now a dark theme, feel free to navigate to the cog on the screen to change your setting, though this should be automatic.\n- Add support for :meth:`AppInfo.icon_url_as` and :meth:`AppInfo.cover_image_url_as` (:issue:`5888`)\n- Add :meth:`Colour.random` to get a random colour (:issue:`6067`)\n- Add support for stickers via :class:`Sticker` (:issue:`5946`)\n- Add support for replying via :meth:`Message.reply` (:issue:`6061`)\n    - This also comes with the :attr:`AllowedMentions.replied_user` setting.\n    - :meth:`abc.Messageable.send` can now accept a :class:`MessageReference`.\n    - :class:`MessageReference` can now be constructed by users.\n    - :meth:`Message.to_reference` can now convert a message to a :class:`MessageReference`.\n- Add support for getting the replied to resolved message through :attr:`MessageReference.resolved`.\n- Add support for role tags.\n    - :attr:`Guild.premium_subscriber_role` to get the \"Nitro Booster\" role (if available).\n    - :attr:`Guild.self_role` to get the bot's own role (if available).\n    - :attr:`Role.tags` to get the role's tags.\n    - :meth:`Role.is_premium_subscriber` to check if a role is the \"Nitro Booster\" role.\n    - :meth:`Role.is_bot_managed` to check if a role is a bot role (i.e. the automatically created role for bots).\n    - :meth:`Role.is_integration` to check if a role is role created by an integration.\n- Add :meth:`Client.is_ws_ratelimited` to check if the websocket is rate limited.\n    - :meth:`ShardInfo.is_ws_ratelimited` is the equivalent for checking a specific shard.\n- Add support for chunking an :class:`AsyncIterator` through :meth:`AsyncIterator.chunk` (:issue:`6100`, :issue:`6082`)\n- Add :attr:`PartialEmoji.created_at` (:issue:`6128`)\n- Add support for editing and deleting webhook sent messages (:issue:`6058`)\n    - This adds :class:`WebhookMessage` as well to power this behaviour.\n- Add :class:`PartialMessage` to allow working with a message via channel objects and just a message_id (:issue:`5905`)\n    - This is useful if you don't want to incur an extra API call to fetch the message.\n- Add :meth:`Emoji.url_as` (:issue:`6162`)\n- Add support for :attr:`Member.pending` for the membership gating feature.\n- Allow ``colour`` parameter to take ``int`` in :meth:`Guild.create_role` (:issue:`6195`)\n- Add support for ``presences`` in :meth:`Guild.query_members` (:issue:`2354`)\n- |commands| Add support for ``description`` keyword argument in :class:`commands.Cog <ext.commands.Cog>` (:issue:`6028`)\n- |tasks| Add support for calling the wrapped coroutine as a function via ``__call__``.\n\n\nBug Fixes\n~~~~~~~~~~~\n\n- Raise :exc:`DiscordServerError` when reaching 503s repeatedly (:issue:`6044`)\n- Fix :exc:`AttributeError` when :meth:`Client.fetch_template` is called (:issue:`5986`)\n- Fix errors when playing audio and moving to another channel (:issue:`5953`)\n- Fix :exc:`AttributeError` when voice channels disconnect too fast (:issue:`6039`)\n- Fix stale :class:`User` references when the members intent is off.\n- Fix :func:`on_user_update` not dispatching in certain cases when a member is not cached but the user somehow is.\n- Fix :attr:`Message.author` being overwritten in certain cases during message update.\n    - This would previously make it so :attr:`Message.author` is a :class:`User`.\n- Fix :exc:`UnboundLocalError` for editing ``public_updates_channel`` in :meth:`Guild.edit` (:issue:`6093`)\n- Fix uninitialised :attr:`CustomActivity.created_at` (:issue:`6095`)\n- |commands| Errors during cog unload no longer stops module cleanup (:issue:`6113`)\n- |commands| Properly cleanup lingering commands when a conflicting alias is found when adding commands (:issue:`6217`)\n\nMiscellaneous\n~~~~~~~~~~~~~~~\n\n- ``ffmpeg`` spawned processes no longer open a window in Windows (:issue:`6038`)\n- Update dependencies to allow the library to work on Python 3.9+ without requiring build tools. (:issue:`5984`, :issue:`5970`)\n- Fix docstring issue leading to a SyntaxError in 3.9 (:issue:`6153`)\n- Update Windows opus binaries from 1.2.1 to 1.3.1 (:issue:`6161`)\n- Allow :meth:`Guild.create_role` to accept :class:`int` as the ``colour`` parameter (:issue:`6195`)\n- |commands| :class:`MessageConverter <ext.commands.MessageConverter>` regex got updated to support ``www.`` prefixes (:issue:`6002`)\n- |commands| :class:`UserConverter <ext.commands.UserConverter>` now fetches the API if an ID is passed and the user is not cached.\n- |commands| :func:`max_concurrency <ext.commands.max_concurrency>` is now called before cooldowns (:issue:`6172`)\n\n.. _vp1p5p1:\n\nv1.5.1\n-------\n\nBug Fixes\n~~~~~~~~~~~\n\n- Fix :func:`utils.escape_markdown` not escaping quotes properly (:issue:`5897`)\n- Fix :class:`Message` not being hashable (:issue:`5901`, :issue:`5866`)\n- Fix moving channels to the end of the channel list (:issue:`5923`)\n- Fix seemingly strange behaviour in ``__eq__`` for :class:`PermissionOverwrite` (:issue:`5929`)\n- Fix aliases showing up in ``__iter__`` for :class:`Intents` (:issue:`5945`)\n- Fix the bot disconnecting from voice when moving them to another channel (:issue:`5904`)\n- Fix attribute errors when chunking times out sometimes during delayed on_ready dispatching.\n- Ensure that the bot's own member is not evicted from the cache (:issue:`5949`)\n\nMiscellaneous\n~~~~~~~~~~~~~~\n\n- Members are now loaded during ``GUILD_MEMBER_UPDATE`` events if :attr:`MemberCacheFlags.joined` is set. (:issue:`5930`)\n- |commands| :class:`MemberConverter <ext.commands.MemberConverter>` now properly lazily fetches members if not available from cache.\n    - This is the same as having ``discord.Member`` as the type-hint.\n- :meth:`Guild.chunk` now allows concurrent calls without spamming the gateway with requests.\n\n.. _vp1p5p0:\n\nv1.5.0\n--------\n\nThis version came with forced breaking changes that Discord is requiring all bots to go through on October 7th. It is highly recommended to read the documentation on intents, :ref:`intents_primer`.\n\nAPI Changes\n~~~~~~~~~~~~~\n\n- Members and presences will no longer be retrieved due to an API change. See :ref:`privileged_intents` for more info.\n- As a consequence, fetching offline members is disabled if the members intent is not enabled.\n\nNew Features\n~~~~~~~~~~~~~~\n\n- Support for gateway intents, passed via ``intents`` in :class:`Client` using :class:`Intents`.\n- Add :attr:`VoiceRegion.south_korea` (:issue:`5233`)\n- Add support for ``__eq__`` for :class:`Message` (:issue:`5789`)\n- Add :meth:`Colour.dark_theme` factory method (:issue:`1584`)\n- Add :meth:`AllowedMentions.none` and :meth:`AllowedMentions.all` (:issue:`5785`)\n- Add more concrete exceptions for 500 class errors under :class:`DiscordServerError` (:issue:`5797`)\n- Implement :class:`VoiceProtocol` to better intersect the voice flow.\n- Add :meth:`Guild.chunk` to fully chunk a guild.\n- Add :class:`MemberCacheFlags` to better control member cache. See :ref:`intents_member_cache` for more info.\n- Add support for :attr:`ActivityType.competing` (:issue:`5823`)\n    - This seems currently unused API wise.\n\n- Add support for message references, :attr:`Message.reference` (:issue:`5754`, :issue:`5832`)\n- Add alias for :class:`ColourConverter` under ``ColorConverter`` (:issue:`5773`)\n- Add alias for :attr:`PublicUserFlags.verified_bot_developer` under :attr:`PublicUserFlags.early_verified_bot_developer` (:issue:`5849`)\n- |commands| Add support for ``require_var_positional`` for :class:`Command` (:issue:`5793`)\n\nBug Fixes\n~~~~~~~~~~\n\n- Fix issue with :meth:`Guild.by_category` not showing certain channels.\n- Fix :attr:`abc.GuildChannel.permissions_synced` always being ``False`` (:issue:`5772`)\n- Fix handling of cloudflare bans on webhook related requests (:issue:`5221`)\n- Fix cases where a keep-alive thread would ack despite already dying (:issue:`5800`)\n- Fix cases where a :class:`Member` reference would be stale when cache is disabled in message events (:issue:`5819`)\n- Fix ``allowed_mentions`` not being sent when sending a single file (:issue:`5835`)\n- Fix ``overwrites`` being ignored in :meth:`abc.GuildChannel.edit` if ``{}`` is passed (:issue:`5756`, :issue:`5757`)\n- |commands| Fix exceptions being raised improperly in command invoke hooks (:issue:`5799`)\n- |commands| Fix commands not being properly ejected during errors in a cog injection (:issue:`5804`)\n- |commands| Fix cooldown timing ignoring edited timestamps.\n- |tasks| Fix tasks extending the next iteration on handled exceptions (:issue:`5762`, :issue:`5763`)\n\nMiscellaneous\n~~~~~~~~~~~~~~~\n\n- Webhook requests are now logged (:issue:`5798`)\n- Remove caching layer from :attr:`AutoShardedClient.shards`. This was causing issues if queried before launching shards.\n- Gateway rate limits are now handled.\n- Warnings logged due to missed caches are now changed to DEBUG log level.\n- Some strings are now explicitly interned to reduce memory usage.\n- Usage of namedtuples has been reduced to avoid potential breaking changes in the future (:issue:`5834`)\n- |commands| All :class:`BadArgument` exceptions from the built-in converters now raise concrete exceptions to better tell them apart (:issue:`5748`)\n- |tasks| Lazily fetch the event loop to prevent surprises when changing event loop policy (:issue:`5808`)\n\n.. _vp1p4p2:\n\nv1.4.2\n--------\n\nThis is a maintenance release with backports from :ref:`vp1p5p0`.\n\nBug Fixes\n~~~~~~~~~~~\n\n- Fix issue with :meth:`Guild.by_category` not showing certain channels.\n- Fix :attr:`abc.GuildChannel.permissions_synced` always being ``False`` (:issue:`5772`)\n- Fix handling of cloudflare bans on webhook related requests (:issue:`5221`)\n- Fix cases where a keep-alive thread would ack despite already dying (:issue:`5800`)\n- Fix cases where a :class:`Member` reference would be stale when cache is disabled in message events (:issue:`5819`)\n- Fix ``allowed_mentions`` not being sent when sending a single file (:issue:`5835`)\n- Fix ``overwrites`` being ignored in :meth:`abc.GuildChannel.edit` if ``{}`` is passed (:issue:`5756`, :issue:`5757`)\n- |commands| Fix exceptions being raised improperly in command invoke hooks (:issue:`5799`)\n- |commands| Fix commands not being properly ejected during errors in a cog injection (:issue:`5804`)\n- |commands| Fix cooldown timing ignoring edited timestamps.\n- |tasks| Fix tasks extending the next iteration on handled exceptions (:issue:`5762`, :issue:`5763`)\n\nMiscellaneous\n~~~~~~~~~~~~~~~\n\n- Remove caching layer from :attr:`AutoShardedClient.shards`. This was causing issues if queried before launching shards.\n- |tasks| Lazily fetch the event loop to prevent surprises when changing event loop policy (:issue:`5808`)\n\n.. _vp1p4p1:\n\nv1.4.1\n--------\n\nBug Fixes\n~~~~~~~~~~~\n\n- Properly terminate the connection when :meth:`Client.close` is called (:issue:`5207`)\n- Fix error being raised when clearing embed author or image when it was already cleared (:issue:`5210`, :issue:`5212`)\n- Fix ``__path__`` to allow editable extensions (:issue:`5213`)\n\n.. _vp1p4p0:\n\nv1.4.0\n--------\n\nAnother version with a long development time. Features like Intents are slated to be released in a v1.5 release. Thank you for your patience!\n\nNew Features\n~~~~~~~~~~~~~~\n\n- Add support for :class:`AllowedMentions` to have more control over what gets mentioned.\n    - This can be set globally through :attr:`Client.allowed_mentions`\n    - This can also be set on a per message basis via :meth:`abc.Messageable.send`\n\n- :class:`AutoShardedClient` has been completely redesigned from the ground up to better suit multi-process clusters (:issue:`2654`)\n    - Add :class:`ShardInfo` which allows fetching specific information about a shard.\n    - The :class:`ShardInfo` allows for reconnecting and disconnecting of a specific shard as well.\n    - Add :meth:`AutoShardedClient.get_shard` and :attr:`AutoShardedClient.shards` to get information about shards.\n    - Rework the entire connection flow to better facilitate the ``IDENTIFY`` rate limits.\n    - Add a hook :meth:`Client.before_identify_hook` to have better control over what happens before an ``IDENTIFY`` is done.\n    - Add more shard related events such as :func:`on_shard_connect`, :func:`on_shard_disconnect` and :func:`on_shard_resumed`.\n\n- Add support for guild templates (:issue:`2652`)\n    - This adds :class:`Template` to read a template's information.\n    - :meth:`Client.fetch_template` can be used to fetch a template's information from the API.\n    - :meth:`Client.create_guild` can now take an optional template to base the creation from.\n    - Note that fetching a guild's template is currently restricted for bot accounts.\n\n- Add support for guild integrations (:issue:`2051`, :issue:`1083`)\n    - :class:`Integration` is used to read integration information.\n    - :class:`IntegrationAccount` is used to read integration account information.\n    - :meth:`Guild.integrations` will fetch all integrations in a guild.\n    - :meth:`Guild.create_integration` will create an integration.\n    - :meth:`Integration.edit` will edit an existing integration.\n    - :meth:`Integration.delete` will delete an integration.\n    - :meth:`Integration.sync` will sync an integration.\n    - There is currently no support in the audit log for this.\n\n- Add an alias for :attr:`VerificationLevel.extreme` under :attr:`VerificationLevel.very_high` (:issue:`2650`)\n- Add various grey to gray aliases for :class:`Colour` (:issue:`5130`)\n- Added :attr:`VoiceClient.latency` and :attr:`VoiceClient.average_latency` (:issue:`2535`)\n- Add ``use_cached`` and ``spoiler`` parameters to :meth:`Attachment.to_file` (:issue:`2577`, :issue:`4095`)\n- Add ``position`` parameter support to :meth:`Guild.create_category` (:issue:`2623`)\n- Allow passing ``int`` for the colour in :meth:`Role.edit` (:issue:`4057`)\n- Add :meth:`Embed.remove_author` to clear author information from an embed (:issue:`4068`)\n- Add the ability to clear images and thumbnails in embeds using :attr:`Embed.Empty` (:issue:`4053`)\n- Add :attr:`Guild.max_video_channel_users` (:issue:`4120`)\n- Add :attr:`Guild.public_updates_channel` (:issue:`4120`)\n- Add ``guild_ready_timeout`` parameter to :class:`Client` and subclasses to control timeouts when the ``GUILD_CREATE`` stream takes too long (:issue:`4112`)\n- Add support for public user flags via :attr:`User.public_flags` and :class:`PublicUserFlags` (:issue:`3999`)\n- Allow changing of channel types via :meth:`TextChannel.edit` to and from a news channel (:issue:`4121`)\n- Add :meth:`Guild.edit_role_positions` to bulk edit role positions in a single API call (:issue:`2501`, :issue:`2143`)\n- Add :meth:`Guild.change_voice_state` to change your voice state in a guild (:issue:`5088`)\n- Add :meth:`PartialInviteGuild.is_icon_animated` for checking if the invite guild has animated icon (:issue:`4180`, :issue:`4181`)\n- Add :meth:`PartialInviteGuild.icon_url_as` now supports ``static_format`` for consistency (:issue:`4180`, :issue:`4181`)\n- Add support for ``user_ids`` in :meth:`Guild.query_members`\n- Add support for pruning members by roles in :meth:`Guild.prune_members` (:issue:`4043`)\n- |commands| Implement :func:`~ext.commands.before_invoke` and :func:`~ext.commands.after_invoke` decorators (:issue:`1986`, :issue:`2502`)\n- |commands| Add a way to retrieve ``retry_after`` from a cooldown in a command via :meth:`Command.get_cooldown_retry_after <.ext.commands.Command.get_cooldown_retry_after>` (:issue:`5195`)\n- |commands| Add a way to dynamically add and remove checks from a :class:`HelpCommand <.ext.commands.HelpCommand>` (:issue:`5197`)\n- |tasks| Add :meth:`Loop.is_running <.ext.tasks.Loop.is_running>` method to the task objects (:issue:`2540`)\n- |tasks| Allow usage of custom error handlers similar to the command extensions to tasks using :meth:`Loop.error <.ext.tasks.Loop.error>` decorator (:issue:`2621`)\n\n\nBug Fixes\n~~~~~~~~~~~~\n\n- Fix issue with :attr:`PartialEmoji.url` reads leading to a failure (:issue:`4015`, :issue:`4016`)\n- Allow :meth:`abc.Messageable.history` to take a limit of ``1`` even if ``around`` is passed (:issue:`4019`)\n- Fix :attr:`Guild.member_count` not updating in certain cases when a member has left the guild (:issue:`4021`)\n- Fix the type of :attr:`Object.id` not being validated. For backwards compatibility ``str`` is still allowed but is converted to ``int`` (:issue:`4002`)\n- Fix :meth:`Guild.edit` not allowing editing of notification settings (:issue:`4074`, :issue:`4047`)\n- Fix crash when the guild widget contains channels that aren't in the payload (:issue:`4114`, :issue:`4115`)\n- Close ffmpeg stdin handling from spawned processes with :class:`FFmpegOpusAudio` and :class:`FFmpegPCMAudio` (:issue:`4036`)\n- Fix :func:`utils.escape_markdown` not escaping masked links (:issue:`4206`, :issue:`4207`)\n- Fix reconnect loop due to failed handshake on region change (:issue:`4210`, :issue:`3996`)\n- Fix :meth:`Guild.by_category` not returning empty categories (:issue:`4186`)\n- Fix certain JPEG images not being identified as JPEG (:issue:`5143`)\n- Fix a crash when an incomplete guild object is used when fetching reaction information (:issue:`5181`)\n- Fix a timeout issue when fetching members using :meth:`Guild.query_members`\n- Fix an issue with domain resolution in voice (:issue:`5188`, :issue:`5191`)\n- Fix an issue where :attr:`PartialEmoji.id` could be a string (:issue:`4153`, :issue:`4152`)\n- Fix regression where :attr:`Member.activities` would not clear.\n- |commands| A :exc:`TypeError` is now raised when :obj:`typing.Optional` is used within :data:`commands.Greedy <.ext.commands.Greedy>` (:issue:`2253`, :issue:`5068`)\n- |commands| :meth:`Bot.walk_commands <.ext.commands.Bot.walk_commands>` no longer yields duplicate commands due to aliases (:issue:`2591`)\n- |commands| Fix regex characters not being escaped in :attr:`HelpCommand.clean_prefix <.ext.commands.HelpCommand.clean_prefix>` (:issue:`4058`, :issue:`4071`)\n- |commands| Fix :meth:`Bot.get_command <.ext.commands.Bot.get_command>` from raising errors when a name only has whitespace (:issue:`5124`)\n- |commands| Fix issue with :attr:`Context.subcommand_passed <.ext.commands.Context.subcommand_passed>` not functioning as expected (:issue:`5198`)\n- |tasks| Task objects are no longer stored globally so two class instances can now start two separate tasks (:issue:`2294`)\n- |tasks| Allow cancelling the loop within :meth:`before_loop <.ext.tasks.Loop.before_loop>` (:issue:`4082`)\n\n\nMiscellaneous\n~~~~~~~~~~~~~~~\n\n- The :attr:`Member.roles` cache introduced in v1.3 was reverted due to issues caused (:issue:`4087`, :issue:`4157`)\n- :class:`Webhook` objects are now comparable and hashable (:issue:`4182`)\n- Some more API requests got a ``reason`` parameter for audit logs (:issue:`5086`)\n    - :meth:`TextChannel.follow`\n    - :meth:`Message.pin` and :meth:`Message.unpin`\n    - :meth:`Webhook.delete` and :meth:`Webhook.edit`\n\n- For performance reasons ``websockets`` has been dropped in favour of ``aiohttp.ws``.\n- The blocking logging message now shows the stack trace of where the main thread was blocking\n- The domain name was changed from ``discordapp.com`` to ``discord.com`` to prepare for the required domain migration\n- Reduce memory usage when reconnecting due to stale references being held by the message cache (:issue:`5133`)\n- Optimize :meth:`abc.GuildChannel.permissions_for` by not creating as many temporary objects (20-32% savings).\n- |commands| Raise :exc:`~ext.commands.CommandRegistrationError` instead of :exc:`ClientException` when a duplicate error is registered (:issue:`4217`)\n- |tasks| No longer handle :exc:`HTTPException` by default in the task reconnect loop (:issue:`5193`)\n\n.. _vp1p3p4:\n\nv1.3.4\n--------\n\nBug Fixes\n~~~~~~~~~~~\n\n- Fix an issue with channel overwrites causing multiple issues including crashes (:issue:`5109`)\n\n.. _vp1p3p3:\n\nv1.3.3\n--------\n\nBug Fixes\n~~~~~~~~~~~~\n\n- Change default WS close to 4000 instead of 1000.\n    - The previous close code caused sessions to be invalidated at a higher frequency than desired.\n\n- Fix ``None`` appearing in ``Member.activities``. (:issue:`2619`)\n\n.. _vp1p3p2:\n\nv1.3.2\n---------\n\nAnother minor bug fix release.\n\nBug Fixes\n~~~~~~~~~~~\n\n- Higher the wait time during the ``GUILD_CREATE`` stream before ``on_ready`` is fired for :class:`AutoShardedClient`.\n- :func:`on_voice_state_update` now uses the inner ``member`` payload which should make it more reliable.\n- Fix various Cloudflare handling errors (:issue:`2572`, :issue:`2544`)\n- Fix crashes if :attr:`Message.guild` is :class:`Object` instead of :class:`Guild`.\n- Fix :meth:`Webhook.send` returning an empty string instead of ``None`` when ``wait=False``.\n- Fix invalid format specifier in webhook state (:issue:`2570`)\n- |commands| Passing invalid permissions to permission related checks now raises ``TypeError``.\n\n.. _vp1p3p1:\n\nv1.3.1\n--------\n\nMinor bug fix release.\n\nBug Fixes\n~~~~~~~~~~~\n\n- Fix fetching invites in guilds that the user is not in.\n- Fix the channel returned from :meth:`Client.fetch_channel` raising when sending messages. (:issue:`2531`)\n\nMiscellaneous\n~~~~~~~~~~~~~~\n\n- Fix compatibility warnings when using the Python 3.9 alpha.\n- Change the unknown event logging from WARNING to DEBUG to reduce noise.\n\n.. _vp1p3p0:\n\nv1.3.0\n--------\n\nThis version comes with a lot of bug fixes and new features. It's been in development for a lot longer than was anticipated!\n\nNew Features\n~~~~~~~~~~~~~~\n\n- Add :meth:`Guild.fetch_members` to fetch members from the HTTP API. (:issue:`2204`)\n- Add :meth:`Guild.fetch_roles` to fetch roles from the HTTP API. (:issue:`2208`)\n- Add support for teams via :class:`Team` when fetching with :meth:`Client.application_info`. (:issue:`2239`)\n- Add support for suppressing embeds via :meth:`Message.edit`\n- Add support for guild subscriptions. See the :class:`Client` documentation for more details.\n- Add :attr:`VoiceChannel.voice_states` to get voice states without relying on member cache.\n- Add :meth:`Guild.query_members` to request members from the gateway.\n- Add :class:`FFmpegOpusAudio` and other voice improvements. (:issue:`2258`)\n- Add :attr:`RawMessageUpdateEvent.channel_id` for retrieving channel IDs during raw message updates. (:issue:`2301`)\n- Add :attr:`RawReactionActionEvent.event_type` to disambiguate between reaction addition and removal in reaction events.\n- Add :attr:`abc.GuildChannel.permissions_synced` to query whether permissions are synced with the category. (:issue:`2300`, :issue:`2324`)\n- Add :attr:`MessageType.channel_follow_add` message type for announcement channels being followed. (:issue:`2314`)\n- Add :meth:`Message.is_system` to allow for quickly filtering through system messages.\n- Add :attr:`VoiceState.self_stream` to indicate whether someone is streaming via Go Live. (:issue:`2343`)\n- Add :meth:`Emoji.is_usable` to check if the client user can use an emoji. (:issue:`2349`)\n- Add :attr:`VoiceRegion.europe` and :attr:`VoiceRegion.dubai`. (:issue:`2358`, :issue:`2490`)\n- Add :meth:`TextChannel.follow` to follow a news channel. (:issue:`2367`)\n- Add :attr:`Permissions.view_guild_insights` permission. (:issue:`2415`)\n- Add support for new audit log types. See :ref:`discord-api-audit-logs` for more information. (:issue:`2427`)\n    - Note that integration support is not finalized.\n\n- Add :attr:`Webhook.type` to query the type of webhook (:class:`WebhookType`). (:issue:`2441`)\n- Allow bulk editing of channel overwrites through :meth:`abc.GuildChannel.edit`. (:issue:`2198`)\n- Add :class:`Activity.created_at` to see when an activity was started. (:issue:`2446`)\n- Add support for ``xsalsa20_poly1305_lite`` encryption mode for voice. (:issue:`2463`)\n- Add :attr:`RawReactionActionEvent.member` to get the member who did the reaction. (:issue:`2443`)\n- Add support for new YouTube streaming via :attr:`Streaming.platform` and :attr:`Streaming.game`. (:issue:`2445`)\n- Add :attr:`Guild.discovery_splash_url` to get the discovery splash image asset. (:issue:`2482`)\n- Add :attr:`Guild.rules_channel` to get the rules channel of public guilds. (:issue:`2482`)\n    - It should be noted that this feature is restricted to those who are either in Server Discovery or planning to be there.\n\n- Add support for message flags via :attr:`Message.flags` and :class:`MessageFlags`. (:issue:`2433`)\n- Add :attr:`User.system` and :attr:`Profile.system` to know whether a user is an official Discord Trust and Safety account.\n- Add :attr:`Profile.team_user` to check whether a user is a member of a team.\n- Add :meth:`Attachment.to_file` to easily convert attachments to :class:`File` for sending.\n- Add certain aliases to :class:`Permissions` to match the UI better. (:issue:`2496`)\n    - :attr:`Permissions.manage_permissions`\n    - :attr:`Permissions.view_channel`\n    - :attr:`Permissions.use_external_emojis`\n\n- Add support for passing keyword arguments when creating :class:`Permissions`.\n- Add support for custom activities via :class:`CustomActivity`. (:issue:`2400`)\n    - Note that as of now, bots cannot send custom activities yet.\n\n- Add support for :func:`on_invite_create` and :func:`on_invite_delete` events.\n- Add support for clearing a specific reaction emoji from a message.\n    - :meth:`Message.clear_reaction` and :meth:`Reaction.clear` methods.\n    - :func:`on_raw_reaction_clear_emoji` and :func:`on_reaction_clear_emoji` events.\n\n- Add :func:`utils.sleep_until` helper to sleep until a specific datetime. (:issue:`2517`, :issue:`2519`)\n- |commands| Add support for teams and :attr:`Bot.owner_ids <.ext.commands.Bot.owner_ids>` to have multiple bot owners. (:issue:`2239`)\n- |commands| Add new :attr:`BucketType.role <.ext.commands.BucketType.role>` bucket type. (:issue:`2201`)\n- |commands| Expose :attr:`Command.cog <.ext.commands.Command.cog>` property publicly. (:issue:`2360`)\n- |commands| Add non-decorator interface for adding checks to commands via :meth:`Command.add_check <.ext.commands.Command.add_check>` and :meth:`Command.remove_check <.ext.commands.Command.remove_check>`. (:issue:`2411`)\n- |commands| Add :func:`has_guild_permissions <.ext.commands.has_guild_permissions>` check. (:issue:`2460`)\n- |commands| Add :func:`bot_has_guild_permissions <.ext.commands.bot_has_guild_permissions>` check. (:issue:`2460`)\n- |commands| Add ``predicate`` attribute to checks decorated with :func:`~.ext.commands.check`.\n- |commands| Add :func:`~.ext.commands.check_any` check to logical OR multiple checks.\n- |commands| Add :func:`~.ext.commands.max_concurrency` to allow only a certain amount of users to use a command concurrently before waiting or erroring.\n- |commands| Add support for calling a :class:`~.ext.commands.Command` as a regular function.\n- |tasks| :meth:`Loop.add_exception_type <.ext.tasks.Loop.add_exception_type>` now allows multiple exceptions to be set. (:issue:`2333`)\n- |tasks| Add :attr:`Loop.next_iteration <.ext.tasks.Loop.next_iteration>` property. (:issue:`2305`)\n\nBug Fixes\n~~~~~~~~~~\n\n- Fix issue with permission resolution sometimes failing for guilds with no owner.\n- Tokens are now stripped upon use. (:issue:`2135`)\n- Passing in a ``name`` is no longer required for :meth:`Emoji.edit`. (:issue:`2368`)\n- Fix issue with webhooks not re-raising after retries have run out. (:issue:`2272`, :issue:`2380`)\n- Fix mismatch in URL handling in :func:`utils.escape_markdown`. (:issue:`2420`)\n- Fix issue with ports being read in little endian when they should be big endian in voice connections. (:issue:`2470`)\n- Fix :meth:`Member.mentioned_in` not taking into consideration the message's guild.\n- Fix bug with moving channels when there are gaps in positions due to channel deletion and creation.\n- Fix :func:`on_shard_ready` not triggering when ``fetch_offline_members`` is disabled. (:issue:`2504`)\n- Fix issue with large sharded bots taking too long to actually dispatch :func:`on_ready`.\n- Fix issue with fetching group DM based invites in :meth:`Client.fetch_invite`.\n- Fix out of order files being sent in webhooks when there are 10 files.\n- |commands| Extensions that fail internally due to ImportError will no longer raise :exc:`~.ext.commands.ExtensionNotFound`. (:issue:`2244`, :issue:`2275`, :issue:`2291`)\n- |commands| Updating the :attr:`Paginator.suffix <.ext.commands.Paginator.suffix>` will not cause out of date calculations. (:issue:`2251`)\n- |commands| Allow converters from custom extension packages. (:issue:`2369`, :issue:`2374`)\n- |commands| Fix issue with paginator prefix being ``None`` causing empty pages. (:issue:`2471`)\n- |commands| :class:`~.commands.Greedy` now ignores parsing errors rather than propagating them.\n- |commands| :meth:`Command.can_run <.ext.commands.Command.can_run>` now checks whether a command is disabled.\n- |commands| :attr:`HelpCommand.clean_prefix <.ext.commands.HelpCommand.clean_prefix>` now takes into consideration nickname mentions. (:issue:`2489`)\n- |commands| :meth:`Context.send_help <.ext.commands.Context.send_help>` now properly propagates to the :meth:`HelpCommand.on_help_command_error <.ext.commands.HelpCommand.on_help_command_error>` handler.\n\nMiscellaneous\n~~~~~~~~~~~~~~~\n\n- The library now fully supports Python 3.8 without warnings.\n- Bump the dependency of ``websockets`` to 8.0 for those who can use it. (:issue:`2453`)\n- Due to Discord providing :class:`Member` data in mentions, users will now be upgraded to :class:`Member` more often if mentioned.\n- :func:`utils.escape_markdown` now properly escapes new quote markdown.\n- The message cache can now be disabled by passing ``None`` to ``max_messages`` in :class:`Client`.\n- The default message cache size has changed from 5000 to 1000 to accommodate small bots.\n- Lower memory usage by only creating certain objects as needed in :class:`Role`.\n- There is now a sleep of 5 seconds before re-IDENTIFYing during a reconnect to prevent long loops of session invalidation.\n- The rate limiting code now uses millisecond precision to have more granular rate limit handling.\n    - Along with that, the rate limiting code now uses Discord's response to wait. If you need to use the system clock again for whatever reason, consider passing ``assume_synced_clock`` in :class:`Client`.\n\n- The performance of :attr:`Guild.default_role` has been improved from O(N) to O(1). (:issue:`2375`)\n- The performance of :attr:`Member.roles` has improved due to usage of caching to avoid surprising performance traps.\n- The GC is manually triggered during things that cause large deallocations (such as guild removal) to prevent memory fragmentation.\n- There have been many changes to the documentation for fixes both for usability, correctness, and to fix some linter errors. Thanks to everyone who contributed to those.\n- The loading of the opus module has been delayed which would make the result of :func:`opus.is_loaded` somewhat surprising.\n- |commands| Usernames prefixed with @ inside DMs will properly convert using the :class:`User` converter. (:issue:`2498`)\n- |tasks| The task sleeping time will now take into consideration the amount of time the task body has taken before sleeping. (:issue:`2516`)\n\n.. _vp1p2p5:\n\nv1.2.5\n--------\n\nBug Fixes\n~~~~~~~~~~~\n\n- Fix a bug that caused crashes due to missing ``animated`` field in Emoji structures in reactions.\n\n.. _vp1p2p4:\n\nv1.2.4\n--------\n\nBug Fixes\n~~~~~~~~~~~\n\n- Fix a regression when :attr:`Message.channel` would be ``None``.\n- Fix a regression where :attr:`Message.edited_at` would not update during edits.\n- Fix a crash that would trigger during message updates (:issue:`2265`, :issue:`2287`).\n- Fix a bug when :meth:`VoiceChannel.connect` would not return (:issue:`2274`, :issue:`2372`, :issue:`2373`, :issue:`2377`).\n- Fix a crash relating to token-less webhooks (:issue:`2364`).\n- Fix issue where :attr:`Guild.premium_subscription_count` would be ``None`` due to a Discord bug. (:issue:`2331`, :issue:`2376`).\n\n.. _vp1p2p3:\n\nv1.2.3\n--------\n\nBug Fixes\n~~~~~~~~~~~\n\n- Fix an AttributeError when accessing :attr:`Member.premium_since` in :func:`on_member_update`. (:issue:`2213`)\n- Handle :exc:`asyncio.CancelledError` in :meth:`abc.Messageable.typing` context manager. (:issue:`2218`)\n- Raise the max encoder bitrate to 512kbps to account for nitro boosting. (:issue:`2232`)\n- Properly propagate exceptions in :meth:`Client.run`. (:issue:`2237`)\n- |commands| Ensure cooldowns are properly copied when used in cog level ``command_attrs``.\n\n.. _vp1p2p2:\n\nv1.2.2\n--------\n\nBug Fixes\n~~~~~~~~~~~\n\n- Audit log related attribute access have been fixed to not error out when they shouldn't have.\n\n.. _vp1p2p1:\n\nv1.2.1\n--------\n\nBug Fixes\n~~~~~~~~~~~\n\n- :attr:`User.avatar_url` and related attributes no longer raise an error.\n- More compatibility shims with the ``enum.Enum`` code.\n\n.. _vp1p2p0:\n\nv1.2.0\n--------\n\nThis update mainly brings performance improvements and various nitro boosting attributes (referred to in the API as \"premium guilds\").\n\nNew Features\n~~~~~~~~~~~~~~\n\n- Add :attr:`Guild.premium_tier` to query the guild's current nitro boost level.\n- Add :attr:`Guild.emoji_limit`, :attr:`Guild.bitrate_limit`, :attr:`Guild.filesize_limit` to query the new limits of a guild when taking into consideration boosting.\n- Add :attr:`Guild.premium_subscription_count` to query how many members are boosting a guild.\n- Add :attr:`Member.premium_since` to query since when a member has boosted a guild.\n- Add :attr:`Guild.premium_subscribers` to query all the members currently boosting the guild.\n- Add :attr:`Guild.system_channel_flags` to query the settings for a guild's :attr:`Guild.system_channel`.\n    - This includes a new type named :class:`SystemChannelFlags`\n- Add :attr:`Emoji.available` to query if an emoji can be used (within the guild or otherwise).\n- Add support for animated icons in :meth:`Guild.icon_url_as` and :attr:`Guild.icon_url`.\n- Add :meth:`Guild.is_icon_animated`.\n- Add support for the various new :class:`MessageType` involving nitro boosting.\n- Add :attr:`VoiceRegion.india`. (:issue:`2145`)\n- Add :meth:`Embed.insert_field_at`. (:issue:`2178`)\n- Add a ``type`` attribute for all channels to their appropriate :class:`ChannelType`. (:issue:`2185`)\n- Add :meth:`Client.fetch_channel` to fetch a channel by ID via HTTP. (:issue:`2169`)\n- Add :meth:`Guild.fetch_channels` to fetch all channels via HTTP. (:issue:`2169`)\n- |tasks| Add :meth:`Loop.stop <.ext.tasks.Loop.stop>` to gracefully stop a task rather than cancelling.\n- |tasks| Add :meth:`Loop.failed <.ext.tasks.Loop.failed>` to query if a task had failed somehow.\n- |tasks| Add :meth:`Loop.change_interval <.ext.tasks.Loop.change_interval>` to change the sleep interval at runtime (:issue:`2158`, :issue:`2162`)\n\nBug Fixes\n~~~~~~~~~~~\n\n- Fix internal error when using :meth:`Guild.prune_members`.\n- |commands| Fix :attr:`.Command.invoked_subcommand` being invalid in many cases.\n- |tasks| Reset iteration count when the loop terminates and is restarted.\n- |tasks| The decorator interface now works as expected when stacking (:issue:`2154`)\n\nMiscellaneous\n~~~~~~~~~~~~~~~\n\n- Improve performance of all Enum related code significantly.\n    - This was done by replacing the ``enum.Enum`` code with an API compatible one.\n    - This should not be a breaking change for most users due to duck-typing.\n- Improve performance of message creation by about 1.5x.\n- Improve performance of message editing by about 1.5-4x depending on payload size.\n- Improve performance of attribute access on :class:`Member` about by 2x.\n- Improve performance of :func:`utils.get` by around 4-6x depending on usage.\n- Improve performance of event parsing lookup by around 2.5x.\n- Keyword arguments in :meth:`Client.start` and :meth:`Client.run` are now validated (:issue:`953`, :issue:`2170`)\n- The Discord error code is now shown in the exception message for :exc:`HTTPException`.\n- Internal tasks launched by the library will now have their own custom ``__repr__``.\n- All public facing types should now have a proper and more detailed ``__repr__``.\n- |tasks| Errors are now logged via the standard :mod:`py:logging` module.\n\n.. _vp1p1p1:\n\nv1.1.1\n--------\n\nBug Fixes\n~~~~~~~~~~~~\n\n- Webhooks do not overwrite data on retrying their HTTP requests (:issue:`2140`)\n\nMiscellaneous\n~~~~~~~~~~~~~~\n\n- Add back signal handling to :meth:`Client.run` due to issues some users had with proper cleanup.\n\n.. _vp1p1p0:\n\nv1.1.0\n---------\n\nNew Features\n~~~~~~~~~~~~~~\n\n- **There is a new extension dedicated to making background tasks easier.**\n    - You can check the documentation here: :ref:`ext_tasks_api`.\n- Add :attr:`Permissions.stream` permission. (:issue:`2077`)\n- Add equality comparison and hash support to :class:`Asset`\n- Add ``compute_prune_members`` parameter to :meth:`Guild.prune_members` (:issue:`2085`)\n- Add :attr:`Client.cached_messages` attribute to fetch the message cache (:issue:`2086`)\n- Add :meth:`abc.GuildChannel.clone` to clone a guild channel. (:issue:`2093`)\n- Add ``delay`` keyword-only argument to :meth:`Message.delete` (:issue:`2094`)\n- Add support for ``<:name:id>`` when adding reactions (:issue:`2095`)\n- Add :meth:`Asset.read` to fetch the bytes content of an asset (:issue:`2107`)\n- Add :meth:`Attachment.read` to fetch the bytes content of an attachment (:issue:`2118`)\n- Add support for voice kicking by passing ``None`` to :meth:`Member.move_to`.\n\n``discord.ext.commands``\n++++++++++++++++++++++++++\n\n- Add new :func:`~.commands.dm_only` check.\n- Support callable converters in :data:`~.commands.Greedy`\n- Add new :class:`~.commands.MessageConverter`.\n    - This allows you to use :class:`Message` as a type hint in functions.\n- Allow passing ``cls`` in the :func:`~.commands.group` decorator (:issue:`2061`)\n- Add :attr:`.Command.parents` to fetch the parents of a command (:issue:`2104`)\n\n\nBug Fixes\n~~~~~~~~~~~~\n\n- Fix :exc:`AttributeError` when using ``__repr__`` on :class:`Widget`.\n- Fix issue with :attr:`abc.GuildChannel.overwrites` returning ``None`` for keys.\n- Remove incorrect legacy NSFW checks in e.g. :meth:`TextChannel.is_nsfw`.\n- Fix :exc:`UnboundLocalError` when :class:`RequestsWebhookAdapter` raises an error.\n- Fix bug where updating your own user did not update your member instances.\n- Tighten constraints of ``__eq__`` in :class:`Spotify` objects (:issue:`2113`, :issue:`2117`)\n\n``discord.ext.commands``\n++++++++++++++++++++++++++\n\n- Fix lambda converters in a non-module context (e.g. ``eval``).\n- Use message creation time for reference time when computing cooldowns.\n    - This prevents cooldowns from triggering during e.g. a RESUME session.\n- Fix the default :func:`on_command_error` to work with new-style cogs (:issue:`2094`)\n- DM channels are now recognised as NSFW in :func:`~.commands.is_nsfw` check.\n- Fix race condition with help commands (:issue:`2123`)\n- Fix cog descriptions not showing in :class:`~.commands.MinimalHelpCommand` (:issue:`2139`)\n\nMiscellaneous\n~~~~~~~~~~~~~~~\n\n- Improve the performance of internal enum creation in the library by about 5x.\n- Make the output of ``python -m discord --version`` a bit more useful.\n- The loop cleanup facility has been rewritten again.\n- The signal handling in :meth:`Client.run` has been removed.\n\n``discord.ext.commands``\n++++++++++++++++++++++++++\n\n- Custom exception classes are now used for all default checks in the library (:issue:`2101`)\n\n\n.. _vp1p0p1:\n\nv1.0.1\n--------\n\nBug Fixes\n~~~~~~~~~~~\n\n- Fix issue with speaking state being cast to ``int`` when it was invalid.\n- Fix some issues with loop cleanup that some users experienced on Linux machines.\n- Fix voice handshake race condition (:issue:`2056`, :issue:`2063`)\n\n.. _vp1p0p0:\n\nv1.0.0\n--------\n\nThe changeset for this version are too big to be listed here, for more information please\nsee :ref:`the migrating page <migrating_1_0>`.\n\n\n.. _vp0p16p6:\n\nv0.16.6\n--------\n\nBug Fixes\n~~~~~~~~~~\n\n- Fix issue with :meth:`Client.create_server` that made it stop working.\n- Fix main thread being blocked upon calling ``StreamPlayer.stop``.\n- Handle HEARTBEAT_ACK and resume gracefully when it occurs.\n- Fix race condition when pre-emptively rate limiting that caused releasing an already released lock.\n- Fix invalid state errors when immediately cancelling a coroutine.\n\n.. _vp0p16p1:\n\nv0.16.1\n--------\n\nThis release is just a bug fix release with some better rate limit implementation.\n\nBug Fixes\n~~~~~~~~~~~\n\n- Servers are now properly chunked for user bots.\n- The CDN URL is now used instead of the API URL for assets.\n- Rate limit implementation now tries to use header information if possible.\n- Event loop is now properly propagated (:issue:`420`)\n- Allow falsey values in :meth:`Client.send_message` and :meth:`Client.send_file`.\n\n.. _vp0p16p0:\n\nv0.16.0\n---------\n\nNew Features\n~~~~~~~~~~~~~~\n\n- Add :attr:`Channel.overwrites` to get all the permission overwrites of a channel.\n- Add :attr:`Server.features` to get information about partnered servers.\n\nBug Fixes\n~~~~~~~~~~\n\n- Timeout when waiting for offline members while triggering :func:`on_ready`.\n\n    - The fact that we did not timeout caused a gigantic memory leak in the library that caused\n      thousands of duplicate :class:`Member` instances causing big memory spikes.\n\n- Discard null sequences in the gateway.\n\n    - The fact these were not discarded meant that :func:`on_ready` kept being called instead of\n      :func:`on_resumed`. Since this has been corrected, in most cases :func:`on_ready` will be\n      called once or twice with :func:`on_resumed` being called much more often.\n\n.. _vp0p15p1:\n\nv0.15.1\n---------\n\n- Fix crash on duplicate or out of order reactions.\n\n.. _vp0p15p0:\n\nv0.15.0\n--------\n\nNew Features\n~~~~~~~~~~~~~~\n\n- Rich Embeds for messages are now supported.\n\n    - To do so, create your own :class:`Embed` and pass the instance to the ``embed`` keyword argument to :meth:`Client.send_message` or :meth:`Client.edit_message`.\n- Add :meth:`Client.clear_reactions` to remove all reactions from a message.\n- Add support for MESSAGE_REACTION_REMOVE_ALL event, under :func:`on_reaction_clear`.\n- Add :meth:`Permissions.update` and :meth:`PermissionOverwrite.update` for bulk permission updates.\n\n    - This allows you to use e.g. ``p.update(read_messages=True, send_messages=False)`` in a single line.\n- Add :meth:`PermissionOverwrite.is_empty` to check if the overwrite is empty (i.e. has no overwrites set explicitly as true or false).\n\nFor the command extension, the following changed:\n\n- ``Context`` is no longer slotted to facilitate setting dynamic attributes.\n\n.. _vp0p14p3:\n\nv0.14.3\n---------\n\nBug Fixes\n~~~~~~~~~~~\n\n- Fix crash when dealing with MESSAGE_REACTION_REMOVE\n- Fix incorrect buckets for reactions.\n\n.. _v0p14p2:\n\nv0.14.2\n---------\n\nNew Features\n~~~~~~~~~~~~~~\n\n- :meth:`Client.wait_for_reaction` now returns a namedtuple with ``reaction`` and ``user`` attributes.\n    - This is for better support in the case that ``None`` is returned since tuple unpacking can lead to issues.\n\nBug Fixes\n~~~~~~~~~~\n\n- Fix bug that disallowed ``None`` to be passed for ``emoji`` parameter in :meth:`Client.wait_for_reaction`.\n\n.. _v0p14p1:\n\nv0.14.1\n---------\n\nBug fixes\n~~~~~~~~~~\n\n- Fix bug with ``Reaction`` not being visible at import.\n    - This was also breaking the documentation.\n\n.. _v0p14p0:\n\nv0.14.0\n--------\n\nThis update adds new API features and a couple of bug fixes.\n\nNew Features\n~~~~~~~~~~~~~\n\n- Add support for Manage Webhooks permission under :attr:`Permissions.manage_webhooks`\n- Add support for ``around`` argument in 3.5+ :meth:`Client.logs_from`.\n- Add support for reactions.\n    - :meth:`Client.add_reaction` to add a reactions\n    - :meth:`Client.remove_reaction` to remove a reaction.\n    - :meth:`Client.get_reaction_users` to get the users that reacted to a message.\n    - :attr:`Permissions.add_reactions` permission bit support.\n    - Two new events, :func:`on_reaction_add` and :func:`on_reaction_remove`.\n    - :attr:`Message.reactions` to get reactions from a message.\n    - :meth:`Client.wait_for_reaction` to wait for a reaction from a user.\n\nBug Fixes\n~~~~~~~~~~\n\n- Fix bug with Paginator still allowing lines that are too long.\n- Fix the :attr:`Permissions.manage_emojis` bit being incorrect.\n\n.. _v0p13p0:\n\nv0.13.0\n---------\n\nThis is a backwards compatible update with new features.\n\nNew Features\n~~~~~~~~~~~~~\n\n- Add the ability to manage emojis.\n\n    - :meth:`Client.create_custom_emoji` to create new emoji.\n    - :meth:`Client.edit_custom_emoji` to edit an old emoji.\n    - :meth:`Client.delete_custom_emoji` to delete a custom emoji.\n- Add new :attr:`Permissions.manage_emojis` toggle.\n\n    - This applies for :class:`PermissionOverwrite` as well.\n- Add new statuses for :class:`Status`.\n\n    - :attr:`Status.dnd` (aliased with :attr:`Status.do_not_disturb`\\) for Do Not Disturb.\n    - :attr:`Status.invisible` for setting your status to invisible (please see the docs for a caveat).\n- Deprecate :meth:`Client.change_status`\n\n    - Use :meth:`Client.change_presence` instead for better more up to date functionality.\n    - This method is subject for removal in a future API version.\n- Add :meth:`Client.change_presence` for changing your status with the new Discord API change.\n\n    - This is the only method that allows changing your status to invisible or do not disturb.\n\nBug Fixes\n~~~~~~~~~~\n\n- Paginator pages do not exceed their max_size anymore (:issue:`340`)\n- Do Not Disturb users no longer show up offline due to the new :class:`Status` changes.\n\n.. _v0p12p0:\n\nv0.12.0\n---------\n\nThis is a bug fix update that also comes with new features.\n\nNew Features\n~~~~~~~~~~~~~\n\n- Add custom emoji support.\n\n    - Adds a new class to represent a custom Emoji named :class:`Emoji`\n    - Adds a utility generator function, :meth:`Client.get_all_emojis`.\n    - Adds a list of emojis on a server, :attr:`Server.emojis`.\n    - Adds a new event, :func:`on_server_emojis_update`.\n- Add new server regions to :class:`ServerRegion`\n\n    - :attr:`ServerRegion.eu_central` and :attr:`ServerRegion.eu_west`.\n- Add support for new pinned system message under :attr:`MessageType.pins_add`.\n- Add order comparisons for :class:`Role` to allow it to be compared with regards to hierarchy.\n\n    - This means that you can now do ``role_a > role_b`` etc to check if ``role_b`` is lower in the hierarchy.\n\n- Add :attr:`Server.role_hierarchy` to get the server's role hierarchy.\n- Add :attr:`Member.server_permissions` to get a member's server permissions without their channel specific overwrites.\n- Add :meth:`Client.get_user_info` to retrieve a user's info from their ID.\n- Add a new ``Player`` property, ``Player.error`` to fetch the error that stopped the player.\n\n    - To help with this change, a player's ``after`` function can now take a single parameter denoting the current player.\n- Add support for server verification levels.\n\n    - Adds a new enum called :class:`VerificationLevel`.\n    - This enum can be used in :meth:`Client.edit_server` under the ``verification_level`` keyword argument.\n    - Adds a new attribute in the server, :attr:`Server.verification_level`.\n- Add :attr:`Server.voice_client` shortcut property for :meth:`Client.voice_client_in`.\n\n    - This is technically old (was added in v0.10.0) but was undocumented until v0.12.0.\n\nFor the command extension, the following are new:\n\n- Add custom emoji converter.\n- All default converters that can take IDs can now convert via ID.\n- Add coroutine support for ``Bot.command_prefix``.\n- Add a method to reset command cooldown.\n\nBug Fixes\n~~~~~~~~~~\n\n- Fix bug that caused the library to not work with the latest ``websockets`` library.\n- Fix bug that leaked keep alive threads (:issue:`309`)\n- Fix bug that disallowed :class:`ServerRegion` from being used in :meth:`Client.edit_server`.\n- Fix bug in :meth:`Channel.permissions_for` that caused permission resolution to happen out of order.\n- Fix bug in :attr:`Member.top_role` that did not account for same-position roles.\n\n.. _v0p11p0:\n\nv0.11.0\n--------\n\nThis is a minor bug fix update that comes with a gateway update (v5 -> v6).\n\nBreaking Changes\n~~~~~~~~~~~~~~~~~\n\n- ``Permissions.change_nicknames`` has been renamed to :attr:`Permissions.change_nickname` to match the UI.\n\nNew Features\n~~~~~~~~~~~~~\n\n- Add the ability to prune members via :meth:`Client.prune_members`.\n- Switch the websocket gateway version to v6 from v5. This allows the library to work with group DMs and 1-on-1 calls.\n- Add :attr:`AppInfo.owner` attribute.\n- Add :class:`CallMessage` for group voice call messages.\n- Add :class:`GroupCall` for group voice call information.\n- Add :attr:`Message.system_content` to get the system message.\n- Add the remaining VIP servers and the Brazil servers into :class:`ServerRegion` enum.\n- Add ``stderr`` argument to :meth:`VoiceClient.create_ffmpeg_player` to redirect stderr.\n- The library now handles implicit permission resolution in :meth:`Channel.permissions_for`.\n- Add :attr:`Server.mfa_level` to query a server's 2FA requirement.\n- Add :attr:`Permissions.external_emojis` permission.\n- Add :attr:`Member.voice` attribute that refers to a :class:`VoiceState`.\n\n    - For backwards compatibility, the member object will have properties mirroring the old behaviour.\n\nFor the command extension, the following are new:\n\n- Command cooldown system with the ``cooldown`` decorator.\n- ``UserInputError`` exception for the hierarchy for user input related errors.\n\nBug Fixes\n~~~~~~~~~~\n\n- :attr:`Client.email` is now saved when using a token for user accounts.\n- Fix issue when removing roles out of order.\n- Fix bug where discriminators would not update.\n- Handle cases where ``HEARTBEAT`` opcode is received. This caused bots to disconnect seemingly randomly.\n\nFor the command extension, the following bug fixes apply:\n\n- ``Bot.check`` decorator is actually a decorator not requiring parentheses.\n- ``Bot.remove_command`` and ``Group.remove_command`` no longer throw if the command doesn't exist.\n- Command names are no longer forced to be ``lower()``.\n- Fix a bug where Member and User converters failed to work in private message contexts.\n- ``HelpFormatter`` now ignores hidden commands when deciding the maximum width.\n\n.. _v0p10p0:\n\nv0.10.0\n-------\n\nFor breaking changes, see :ref:`migrating-to-async`. The breaking changes listed there will not be enumerated below. Since this version is rather a big departure from v0.9.2, this change log will be non-exhaustive.\n\nNew Features\n~~~~~~~~~~~~~\n\n- The library is now fully ``asyncio`` compatible, allowing you to write non-blocking code a lot more easily.\n- The library now fully handles 429s and unconditionally retries on 502s.\n- A new command extension module was added but is currently undocumented. Figuring it out is left as an exercise to the reader.\n- Two new exception types, :exc:`Forbidden` and :exc:`NotFound` to denote permission errors or 404 errors.\n- Added :meth:`Client.delete_invite` to revoke invites.\n- Added support for sending voice. Check :class:`VoiceClient` for more details.\n- Added :meth:`Client.wait_for_message` coroutine to aid with follow up commands.\n- Added :data:`version_info` named tuple to check version info of the library.\n- Login credentials are now cached to have a faster login experience. You can disable this by passing in ``cache_auth=False``\n  when constructing a :class:`Client`.\n- New utility function, :func:`discord.utils.get` to simplify retrieval of items based on attributes.\n- All data classes now support ``!=``, ``==``, ``hash(obj)`` and ``str(obj)``.\n- Added :meth:`Client.get_bans` to get banned members from a server.\n- Added :meth:`Client.invites_from` to get currently active invites in a server.\n- Added :attr:`Server.me` attribute to get the :class:`Member` version of :attr:`Client.user`.\n- Most data classes now support a ``hash(obj)`` function to allow you to use them in ``set`` or ``dict`` classes or subclasses.\n- Add :meth:`Message.clean_content` to get a text version of the content with the user and channel mentioned changed into their names.\n- Added a way to remove the messages of the user that just got banned in :meth:`Client.ban`.\n- Added :meth:`Client.wait_until_ready` to facilitate easy creation of tasks that require the client cache to be ready.\n- Added :meth:`Client.wait_until_login` to facilitate easy creation of tasks that require the client to be logged in.\n- Add :class:`discord.Game` to represent any game with custom text to send to :meth:`Client.change_status`.\n- Add :attr:`Message.nonce` attribute.\n- Add :meth:`Member.permissions_in` as another way of doing :meth:`Channel.permissions_for`.\n- Add :meth:`Client.move_member` to move a member to another voice channel.\n- You can now create a server via :meth:`Client.create_server`.\n- Added :meth:`Client.edit_server` to edit existing servers.\n- Added :meth:`Client.server_voice_state` to server mute or server deafen a member.\n- If you are being rate limited, the library will now handle it for you.\n- Add :func:`on_member_ban` and :func:`on_member_unban` events that trigger when a member is banned/unbanned.\n\nPerformance Improvements\n~~~~~~~~~~~~~~~~~~~~~~~~~\n\n- All data classes now use ``__slots__`` which greatly reduce the memory usage of things kept in cache.\n- Due to the usage of ``asyncio``, the CPU usage of the library has gone down significantly.\n- A lot of the internal cache lists were changed into dictionaries to change the ``O(n)`` lookup into ``O(1)``.\n- Compressed READY is now on by default. This means if you're on a lot of servers (or maybe even a few) you would\n  receive performance improvements by having to download and process less data.\n- While minor, change regex from ``\\d+`` to ``[0-9]+`` to avoid unnecessary unicode character lookups.\n\nBug Fixes\n~~~~~~~~~~\n\n- Fix bug where guilds being updated did not edit the items in cache.\n- Fix bug where ``member.roles`` were empty upon joining instead of having the ``@everyone`` role.\n- Fix bug where :meth:`Role.is_everyone` was not being set properly when the role was being edited.\n- :meth:`Client.logs_from` now handles cases where limit > 100 to sidestep the discord API limitation.\n- Fix bug where a role being deleted would trigger a ``ValueError``.\n- Fix bug where :meth:`Permissions.kick_members` and :meth:`Permissions.ban_members` were flipped.\n- Mentions are now triggered normally. This was changed due to the way discord handles it internally.\n- Fix issue when a :class:`Message` would attempt to upgrade a :attr:`Message.server` when the channel is\n  a :class:`Object`.\n- Unavailable servers were not being added into cache, this has been corrected.\n"
  },
  {
    "path": "examples/advanced_startup.py",
    "content": "# This example requires the 'message_content' privileged intent to function, however your own bot might not.\n\n# This example covers advanced startup options and uses some real world examples for why you may need them.\n\nimport asyncio\nimport logging\nimport logging.handlers\nimport os\n\nfrom typing import List, Optional\n\nimport asyncpg  # asyncpg is not a dependency of the discord.py, and is only included here for illustrative purposes.\nimport discord\nfrom discord.ext import commands\nfrom aiohttp import ClientSession\n\n\nclass CustomBot(commands.Bot):\n    def __init__(\n        self,\n        *args,\n        initial_extensions: List[str],\n        db_pool: asyncpg.Pool,\n        web_client: ClientSession,\n        testing_guild_id: Optional[int] = None,\n        **kwargs,\n    ):\n        super().__init__(*args, **kwargs)\n        self.db_pool = db_pool\n        self.web_client = web_client\n        self.testing_guild_id = testing_guild_id\n        self.initial_extensions = initial_extensions\n\n    async def setup_hook(self) -> None:\n\n        # here, we are loading extensions prior to sync to ensure we are syncing interactions defined in those extensions.\n\n        for extension in self.initial_extensions:\n            await self.load_extension(extension)\n\n        # In overriding setup hook,\n        # we can do things that require a bot prior to starting to process events from the websocket.\n        # In this case, we are using this to ensure that once we are connected, we sync for the testing guild.\n        # You should not do this for every guild or for global sync, those should only be synced when changes happen.\n        if self.testing_guild_id:\n            guild = discord.Object(self.testing_guild_id)\n            # We'll copy in the global commands to test with:\n            self.tree.copy_global_to(guild=guild)\n            # followed by syncing to the testing guild.\n            await self.tree.sync(guild=guild)\n\n        # This would also be a good place to connect to our database and\n        # load anything that should be in memory prior to handling events.\n\n\nasync def main():\n\n    # When taking over how the bot process is run, you become responsible for a few additional things.\n\n    # 1. logging\n\n    # for this example, we're going to set up a rotating file logger.\n    # for more info on setting up logging,\n    # see https://discordpy.readthedocs.io/en/latest/logging.html and https://docs.python.org/3/howto/logging.html\n\n    logger = logging.getLogger('discord')\n    logger.setLevel(logging.INFO)\n\n    handler = logging.handlers.RotatingFileHandler(\n        filename='discord.log',\n        encoding='utf-8',\n        maxBytes=32 * 1024 * 1024,  # 32 MiB\n        backupCount=5,  # Rotate through 5 files\n    )\n    dt_fmt = '%Y-%m-%d %H:%M:%S'\n    formatter = logging.Formatter('[{asctime}] [{levelname:<8}] {name}: {message}', dt_fmt, style='{')\n    handler.setFormatter(formatter)\n    logger.addHandler(handler)\n\n    # Alternatively, you could use:\n    # discord.utils.setup_logging(handler=handler, root=False)\n\n    # One of the reasons to take over more of the process though\n    # is to ensure use with other libraries or tools which also require their own cleanup.\n\n    # Here we have a web client and a database pool, both of which do cleanup at exit.\n    # We also have our bot, which depends on both of these.\n\n    async with ClientSession() as our_client, asyncpg.create_pool(user='postgres', command_timeout=30) as pool:\n        # 2. We become responsible for starting the bot.\n\n        exts = ['general', 'mod', 'dice']\n        intents = discord.Intents.default()\n        intents.message_content = True\n        async with CustomBot(\n            commands.when_mentioned,\n            db_pool=pool,\n            web_client=our_client,\n            initial_extensions=exts,\n            intents=intents,\n        ) as bot:\n            await bot.start('token')\n\n\n# For most use cases, after defining what needs to run, we can just tell asyncio to run it:\nasyncio.run(main())\n"
  },
  {
    "path": "examples/app_commands/basic.py",
    "content": "from typing import Optional\n\nimport discord\nfrom discord import app_commands\n\n\nMY_GUILD = discord.Object(id=0)  # replace with your guild id\n\n\nclass MyClient(discord.Client):\n    def __init__(self, *, intents: discord.Intents):\n        super().__init__(intents=intents)\n        # A CommandTree is a special type that holds all the application command\n        # state required to make it work. This is a separate class because it\n        # allows all the extra state to be opt-in.\n        # Whenever you want to work with application commands, your tree is used\n        # to store and work with them.\n        # Note: When using commands.Bot instead of discord.Client, the bot will\n        # maintain its own tree instead.\n        self.tree = app_commands.CommandTree(self)\n\n    # In this basic example, we just synchronize the app commands to one guild.\n    # Instead of specifying a guild to every command, we copy over our global commands instead.\n    # By doing so, we don't have to wait up to an hour until they are shown to the end-user.\n    async def setup_hook(self):\n        # This copies the global commands over to your guild.\n        self.tree.copy_global_to(guild=MY_GUILD)\n        await self.tree.sync(guild=MY_GUILD)\n\n\nintents = discord.Intents.default()\nclient = MyClient(intents=intents)\n\n\n@client.event\nasync def on_ready():\n    print(f'Logged in as {client.user} (ID: {client.user.id})')\n    print('------')\n\n\n@client.tree.command()\nasync def hello(interaction: discord.Interaction):\n    \"\"\"Says hello!\"\"\"\n    await interaction.response.send_message(f'Hi, {interaction.user.mention}')\n\n\n@client.tree.command()\n@app_commands.describe(\n    first_value='The first value you want to add something to',\n    second_value='The value you want to add to the first value',\n)\nasync def add(interaction: discord.Interaction, first_value: int, second_value: int):\n    \"\"\"Adds two numbers together.\"\"\"\n    await interaction.response.send_message(f'{first_value} + {second_value} = {first_value + second_value}')\n\n\n# The rename decorator allows us to change the display of the parameter on Discord.\n# In this example, even though we use `text_to_send` in the code, the client will use `text` instead.\n# Note that other decorators will still refer to it as `text_to_send` in the code.\n@client.tree.command()\n@app_commands.rename(text_to_send='text')\n@app_commands.describe(text_to_send='Text to send in the current channel')\nasync def send(interaction: discord.Interaction, text_to_send: str):\n    \"\"\"Sends the text into the current channel.\"\"\"\n    await interaction.response.send_message(text_to_send)\n\n\n# To make an argument optional, you can either give it a supported default argument\n# or you can mark it as Optional from the typing standard library. This example does both.\n@client.tree.command()\n@app_commands.describe(member='The member you want to get the joined date from; defaults to the user who uses the command')\nasync def joined(interaction: discord.Interaction, member: Optional[discord.Member] = None):\n    \"\"\"Says when a member joined.\"\"\"\n    # If no member is explicitly provided then we use the command user here\n    member = member or interaction.user\n\n    # The format_dt function formats the date time into a human readable representation in the official client\n    await interaction.response.send_message(f'{member} joined {discord.utils.format_dt(member.joined_at)}')\n\n\n# A Context Menu command is an app command that can be run on a member or on a message by\n# accessing a menu within the client, usually via right clicking.\n# It always takes an interaction as its first parameter and a Member or Message as its second parameter.\n\n# This context menu command only works on members\n@client.tree.context_menu(name='Show Join Date')\nasync def show_join_date(interaction: discord.Interaction, member: discord.Member):\n    # The format_dt function formats the date time into a human readable representation in the official client\n    await interaction.response.send_message(f'{member} joined at {discord.utils.format_dt(member.joined_at)}')\n\n\n# This context menu command only works on messages\n@client.tree.context_menu(name='Report to Moderators')\nasync def report_message(interaction: discord.Interaction, message: discord.Message):\n    # We're sending this response message with ephemeral=True, so only the command executor can see it\n    await interaction.response.send_message(\n        f'Thanks for reporting this message by {message.author.mention} to our moderators.', ephemeral=True\n    )\n\n    # Handle report by sending it into a log channel\n    log_channel = interaction.guild.get_channel(0)  # replace with your channel id\n\n    embed = discord.Embed(title='Reported Message')\n    if message.content:\n        embed.description = message.content\n\n    embed.set_author(name=message.author.display_name, icon_url=message.author.display_avatar.url)\n    embed.timestamp = message.created_at\n\n    url_view = discord.ui.View()\n    url_view.add_item(discord.ui.Button(label='Go to Message', style=discord.ButtonStyle.url, url=message.jump_url))\n\n    await log_channel.send(embed=embed, view=url_view)\n\n\nclient.run('token')\n"
  },
  {
    "path": "examples/app_commands/transformers.py",
    "content": "# This example builds on the concepts of the app_commands/basic.py example\n# It's suggested to look at that one to understand certain concepts first.\n\nfrom typing import Literal, Union, NamedTuple\nfrom enum import Enum\n\nimport discord\nfrom discord import app_commands\n\n\nMY_GUILD = discord.Object(id=0)  # replace with your guild id\n\n\nclass MyClient(discord.Client):\n    def __init__(self):\n        super().__init__(intents=discord.Intents.default())\n        self.tree = app_commands.CommandTree(self)\n\n    async def setup_hook(self):\n        self.tree.copy_global_to(guild=MY_GUILD)\n        await self.tree.sync(guild=MY_GUILD)\n\n\nclient = MyClient()\n\n\n@client.event\nasync def on_ready():\n    print(f'Logged in as {client.user} (ID: {client.user.id})')\n    print('------')\n\n\n# A transformer is a class that specifies how a parameter in your code\n# should behave both when used on Discord and when you receive it from Discord.\n# There are a few built-in transformers, this example will show these along with\n# creating your own for maximum flexibility.\n\n# The first built-in transformer is app_commands.Range\n# It works on `str`, `int`, and `float` options and tells you\n# the maximum and minimum values (or length in the case of `str`) allowed\n\n\n@client.tree.command()\n@app_commands.describe(first='The first number to add', second='The second number to add')\nasync def add(\n    interaction: discord.Interaction,\n    # This makes it so the first parameter can only be between 0 to 100.\n    first: app_commands.Range[int, 0, 100],\n    # This makes it so the second parameter must be over 0, with no maximum limit.\n    second: app_commands.Range[int, 0, None],\n):\n    \"\"\"Adds two numbers together\"\"\"\n    await interaction.response.send_message(f'{first} + {second} = {first + second}', ephemeral=True)\n\n\n# Other transformers include regular type hints that are supported by Discord\n# Examples of these include int, str, float, bool, User, Member, Role, and any channel type.\n# Since there are a lot of these, for brevity only a channel example will be included.\n\n# This command shows how to only show text and voice channels to a user using the Union type hint\n# combined with the VoiceChannel and TextChannel types.\n@client.tree.command(name='channel-info')\n@app_commands.describe(channel='The channel to get info of')\nasync def channel_info(interaction: discord.Interaction, channel: Union[discord.VoiceChannel, discord.TextChannel]):\n    \"\"\"Shows basic channel info for a text or voice channel.\"\"\"\n\n    embed = discord.Embed(title='Channel Info')\n    embed.add_field(name='Name', value=channel.name, inline=True)\n    embed.add_field(name='ID', value=channel.id, inline=True)\n    embed.add_field(\n        name='Type',\n        value='Voice' if isinstance(channel, discord.VoiceChannel) else 'Text',\n        inline=True,\n    )\n\n    embed.set_footer(text='Created').timestamp = channel.created_at\n    await interaction.response.send_message(embed=embed)\n\n\n# In order to support choices, the library has a few ways of doing this.\n# The first one is using a typing.Literal for basic choices.\n\n# On Discord, this will show up as two choices, Buy and Sell.\n# In the code, you will receive either 'Buy' or 'Sell' as a string.\n@client.tree.command()\n@app_commands.describe(action='The action to do in the shop', item='The target item')\nasync def shop(interaction: discord.Interaction, action: Literal['Buy', 'Sell'], item: str):\n    \"\"\"Interact with the shop\"\"\"\n    await interaction.response.send_message(f'Action: {action}\\nItem: {item}')\n\n\n# The second way to do choices is via an Enum from the standard library\n# On Discord, this will show up as four choices: apple, banana, cherry, and dragonfruit\n# In the code, you will receive the appropriate enum value.\n\n\nclass Fruits(Enum):\n    apple = 0\n    banana = 1\n    cherry = 2\n    dragonfruit = 3\n\n\n@client.tree.command()\n@app_commands.describe(fruit='The fruit to choose')\nasync def fruit(interaction: discord.Interaction, fruit: Fruits):\n    \"\"\"Choose a fruit!\"\"\"\n    await interaction.response.send_message(repr(fruit))\n\n\n# You can also make your own transformer by inheriting from app_commands.Transformer\n\n\nclass Point(NamedTuple):\n    x: int\n    y: int\n\n\n# The default transformer takes in a string option and you can transform\n# it into any value you'd like.\n#\n# Transformers also support various other settings such as overriding\n# properties like `choices`, `max_value`, `min_value`, `type`, or `channel_types`.\n# However, this is outside of the scope of this example so check the documentation\n# for more information.\nclass PointTransformer(app_commands.Transformer):\n    async def transform(self, interaction: discord.Interaction, value: str) -> Point:\n        (x, _, y) = value.partition(',')\n        return Point(x=int(x.strip()), y=int(y.strip()))\n\n\n@client.tree.command()\nasync def graph(\n    interaction: discord.Interaction,\n    # In order to use the transformer, you should use Transform to tell the\n    # library to use it.\n    point: app_commands.Transform[Point, PointTransformer],\n):\n    await interaction.response.send_message(str(point))\n\n\n# For more basic transformers for your own types without too much repetition,\n# a concept known as \"inline transformers\" is supported. This allows you to use\n# a classmethod to have a string based transformer. It's only useful\n# if you only care about transforming a string to a class and nothing else.\nclass Point3D(NamedTuple):\n    x: int\n    y: int\n    z: int\n\n    # This is the same as the above transformer except inline\n    @classmethod\n    async def transform(cls, interaction: discord.Interaction, value: str):\n        x, y, z = value.split(',')\n        return cls(x=int(x.strip()), y=int(y.strip()), z=int(z.strip()))\n\n\n@client.tree.command()\nasync def graph3d(interaction: discord.Interaction, point: Point3D):\n    await interaction.response.send_message(str(point))\n\n\nclient.run('token')\n"
  },
  {
    "path": "examples/background_task.py",
    "content": "from discord.ext import tasks\n\nimport discord\n\n\nclass MyClient(discord.Client):\n    def __init__(self, *args, **kwargs):\n        super().__init__(*args, **kwargs)\n\n        # an attribute we can access from our task\n        self.counter = 0\n\n    async def setup_hook(self) -> None:\n        # start the task to run in the background\n        self.my_background_task.start()\n\n    async def on_ready(self):\n        print(f'Logged in as {self.user} (ID: {self.user.id})')\n        print('------')\n\n    @tasks.loop(seconds=60)  # task runs every 60 seconds\n    async def my_background_task(self):\n        channel = self.get_channel(1234567)  # channel ID goes here\n        self.counter += 1\n        await channel.send(self.counter)\n\n    @my_background_task.before_loop\n    async def before_my_task(self):\n        await self.wait_until_ready()  # wait until the bot logs in\n\n\nclient = MyClient(intents=discord.Intents.default())\nclient.run('token')\n"
  },
  {
    "path": "examples/background_task_asyncio.py",
    "content": "import discord\nimport asyncio\n\n\nclass MyClient(discord.Client):\n    def __init__(self, *args, **kwargs):\n        super().__init__(*args, **kwargs)\n\n    async def setup_hook(self) -> None:\n        # create the background task and run it in the background\n        self.bg_task = self.loop.create_task(self.my_background_task())\n\n    async def on_ready(self):\n        print(f'Logged in as {self.user} (ID: {self.user.id})')\n        print('------')\n\n    async def my_background_task(self):\n        await self.wait_until_ready()\n        counter = 0\n        channel = self.get_channel(1234567)  # channel ID goes here\n        while not self.is_closed():\n            counter += 1\n            await channel.send(counter)\n            await asyncio.sleep(60)  # task runs every 60 seconds\n\n\nclient = MyClient(intents=discord.Intents.default())\nclient.run('token')\n"
  },
  {
    "path": "examples/basic_bot.py",
    "content": "# This example requires the 'members' and 'message_content' privileged intents to function.\n\nimport discord\nfrom discord.ext import commands\nimport random\n\ndescription = '''An example bot to showcase the discord.ext.commands extension\nmodule.\n\nThere are a number of utility commands being showcased here.'''\n\nintents = discord.Intents.default()\nintents.members = True\nintents.message_content = True\n\nbot = commands.Bot(command_prefix='?', description=description, intents=intents)\n\n\n@bot.event\nasync def on_ready():\n    print(f'Logged in as {bot.user} (ID: {bot.user.id})')\n    print('------')\n\n\n@bot.command()\nasync def add(ctx, left: int, right: int):\n    \"\"\"Adds two numbers together.\"\"\"\n    await ctx.send(left + right)\n\n\n@bot.command()\nasync def roll(ctx, dice: str):\n    \"\"\"Rolls a dice in NdN format.\"\"\"\n    try:\n        rolls, limit = map(int, dice.split('d'))\n    except Exception:\n        await ctx.send('Format has to be in NdN!')\n        return\n\n    result = ', '.join(str(random.randint(1, limit)) for r in range(rolls))\n    await ctx.send(result)\n\n\n@bot.command(description='For when you wanna settle the score some other way')\nasync def choose(ctx, *choices: str):\n    \"\"\"Chooses between multiple choices.\"\"\"\n    await ctx.send(random.choice(choices))\n\n\n@bot.command()\nasync def repeat(ctx, times: int, content='repeating...'):\n    \"\"\"Repeats a message multiple times.\"\"\"\n    for i in range(times):\n        await ctx.send(content)\n\n\n@bot.command()\nasync def joined(ctx, member: discord.Member):\n    \"\"\"Says when a member joined.\"\"\"\n    await ctx.send(f'{member.name} joined {discord.utils.format_dt(member.joined_at)}')\n\n\n@bot.group()\nasync def cool(ctx):\n    \"\"\"Says if a user is cool.\n\n    In reality this just checks if a subcommand is being invoked.\n    \"\"\"\n    if ctx.invoked_subcommand is None:\n        await ctx.send(f'No, {ctx.subcommand_passed} is not cool')\n\n\n@cool.command(name='bot')\nasync def _bot(ctx):\n    \"\"\"Is the bot cool?\"\"\"\n    await ctx.send('Yes, the bot is cool.')\n\n\nbot.run('token')\n"
  },
  {
    "path": "examples/basic_voice.py",
    "content": "# This example requires the 'message_content' privileged intent to function.\n\nimport asyncio\n\nimport discord\nimport youtube_dl\n\nfrom discord.ext import commands\n\n# Suppress noise about console usage from errors\nyoutube_dl.utils.bug_reports_message = lambda: ''\n\n\nytdl_format_options = {\n    'format': 'bestaudio/best',\n    'outtmpl': '%(extractor)s-%(id)s-%(title)s.%(ext)s',\n    'restrictfilenames': True,\n    'noplaylist': True,\n    'nocheckcertificate': True,\n    'ignoreerrors': False,\n    'logtostderr': False,\n    'quiet': True,\n    'no_warnings': True,\n    'default_search': 'auto',\n    'source_address': '0.0.0.0',  # bind to ipv4 since ipv6 addresses cause issues sometimes\n}\n\nffmpeg_options = {\n    'options': '-vn',\n}\n\nytdl = youtube_dl.YoutubeDL(ytdl_format_options)\n\n\nclass YTDLSource(discord.PCMVolumeTransformer):\n    def __init__(self, source, *, data, volume=0.5):\n        super().__init__(source, volume)\n\n        self.data = data\n\n        self.title = data.get('title')\n        self.url = data.get('url')\n\n    @classmethod\n    async def from_url(cls, url, *, loop=None, stream=False):\n        loop = loop or asyncio.get_event_loop()\n        data = await loop.run_in_executor(None, lambda: ytdl.extract_info(url, download=not stream))\n\n        if 'entries' in data:\n            # take first item from a playlist\n            data = data['entries'][0]\n\n        filename = data['url'] if stream else ytdl.prepare_filename(data)\n        return cls(discord.FFmpegPCMAudio(filename, **ffmpeg_options), data=data)\n\n\nclass Music(commands.Cog):\n    def __init__(self, bot):\n        self.bot = bot\n\n    @commands.command()\n    async def join(self, ctx, *, channel: discord.VoiceChannel):\n        \"\"\"Joins a voice channel\"\"\"\n\n        if ctx.voice_client is not None:\n            return await ctx.voice_client.move_to(channel)\n\n        await channel.connect()\n\n    @commands.command()\n    async def play(self, ctx, *, query):\n        \"\"\"Plays a file from the local filesystem\"\"\"\n\n        source = discord.PCMVolumeTransformer(discord.FFmpegPCMAudio(query))\n        ctx.voice_client.play(source, after=lambda e: print(f'Player error: {e}') if e else None)\n\n        await ctx.send(f'Now playing: {query}')\n\n    @commands.command()\n    async def yt(self, ctx, *, url):\n        \"\"\"Plays from a url (almost anything youtube_dl supports)\"\"\"\n\n        async with ctx.typing():\n            player = await YTDLSource.from_url(url, loop=self.bot.loop)\n            ctx.voice_client.play(player, after=lambda e: print(f'Player error: {e}') if e else None)\n\n        await ctx.send(f'Now playing: {player.title}')\n\n    @commands.command()\n    async def stream(self, ctx, *, url):\n        \"\"\"Streams from a url (same as yt, but doesn't predownload)\"\"\"\n\n        async with ctx.typing():\n            player = await YTDLSource.from_url(url, loop=self.bot.loop, stream=True)\n            ctx.voice_client.play(player, after=lambda e: print(f'Player error: {e}') if e else None)\n\n        await ctx.send(f'Now playing: {player.title}')\n\n    @commands.command()\n    async def volume(self, ctx, volume: int):\n        \"\"\"Changes the player's volume\"\"\"\n\n        if ctx.voice_client is None:\n            return await ctx.send(\"Not connected to a voice channel.\")\n\n        ctx.voice_client.source.volume = volume / 100\n        await ctx.send(f\"Changed volume to {volume}%\")\n\n    @commands.command()\n    async def stop(self, ctx):\n        \"\"\"Stops and disconnects the bot from voice\"\"\"\n\n        await ctx.voice_client.disconnect()\n\n    @play.before_invoke\n    @yt.before_invoke\n    @stream.before_invoke\n    async def ensure_voice(self, ctx):\n        if ctx.voice_client is None:\n            if ctx.author.voice:\n                await ctx.author.voice.channel.connect()\n            else:\n                await ctx.send(\"You are not connected to a voice channel.\")\n                raise commands.CommandError(\"Author not connected to a voice channel.\")\n        elif ctx.voice_client.is_playing():\n            ctx.voice_client.stop()\n\n\nintents = discord.Intents.default()\nintents.message_content = True\n\nbot = commands.Bot(\n    command_prefix=commands.when_mentioned_or(\"!\"),\n    description='Relatively simple music bot example',\n    intents=intents,\n)\n\n\n@bot.event\nasync def on_ready():\n    print(f'Logged in as {bot.user} (ID: {bot.user.id})')\n    print('------')\n\n\nasync def main():\n    async with bot:\n        await bot.add_cog(Music(bot))\n        await bot.start('token')\n\n\nasyncio.run(main())\n"
  },
  {
    "path": "examples/converters.py",
    "content": "# This example requires the 'members' privileged intent to use the Member converter.\n# This example also requires the 'message_content' privileged intent to function.\n\nimport traceback\nimport typing\n\nimport discord\nfrom discord.ext import commands\n\nintents = discord.Intents.default()\nintents.members = True\nintents.message_content = True\n\nbot = commands.Bot('!', intents=intents)\n\n\n@bot.command()\nasync def userinfo(ctx: commands.Context, user: discord.User):\n    # In the command signature above, you can see that the `user`\n    # parameter is typehinted to `discord.User`. This means that\n    # during command invocation we will attempt to convert\n    # the value passed as `user` to a `discord.User` instance.\n    # The documentation notes what can be converted, in the case of `discord.User`\n    # you pass an ID, mention or username (discrim optional)\n    # E.g. 80088516616269824, @Danny or Danny#0007\n\n    # NOTE: typehinting acts as a converter within the `commands` framework only.\n    # In standard Python, it is use for documentation and IDE assistance purposes.\n\n    # If the conversion is successful, we will have a `discord.User` instance\n    # and can do the following:\n    user_id = user.id\n    username = user.name\n    avatar = user.display_avatar.url\n    await ctx.send(f'User found: {user_id} -- {username}\\n{avatar}')\n\n\n@userinfo.error\nasync def userinfo_error(ctx: commands.Context, error: commands.CommandError):\n    # If the conversion above fails for any reason, it will raise `commands.BadArgument`\n    # so we handle this in this error handler:\n    if isinstance(error, commands.BadArgument):\n        return await ctx.send('Couldn\\'t find that user.')\n    # The default `on_command_error` will ignore errors from this command\n    # because we made our own command-specific error handler,\n    # so we need to log tracebacks ourselves.\n    else:\n        traceback.print_exception(type(error), error, error.__traceback__)\n\n\n# Custom Converter here\nclass ChannelOrMemberConverter(commands.Converter):\n    async def convert(self, ctx: commands.Context, argument: str):\n        # In this example we have made a custom converter.\n        # This checks if an input is convertible to a\n        # `discord.Member` or `discord.TextChannel` instance from the\n        # input the user has given us using the pre-existing converters\n        # that the library provides.\n\n        member_converter = commands.MemberConverter()\n        try:\n            # Try and convert to a Member instance.\n            # If this fails, then an exception is raised.\n            # Otherwise, we just return the converted member value.\n            member = await member_converter.convert(ctx, argument)\n        except commands.MemberNotFound:\n            pass\n        else:\n            return member\n\n        # Do the same for TextChannel...\n        textchannel_converter = commands.TextChannelConverter()\n        try:\n            channel = await textchannel_converter.convert(ctx, argument)\n        except commands.ChannelNotFound:\n            pass\n        else:\n            return channel\n\n        # If the value could not be converted we can raise an error\n        # so our error handlers can deal with it in one place.\n        # The error has to be CommandError derived, so BadArgument works fine here.\n        raise commands.BadArgument(f'No Member or TextChannel could be converted from \"{argument}\"')\n\n\n@bot.command()\nasync def notify(ctx: commands.Context, target: ChannelOrMemberConverter):\n    # This command signature utilises the custom converter written above\n    # What will happen during command invocation is that the `target` above will be passed to\n    # the `argument` parameter of the `ChannelOrMemberConverter.convert` method and\n    # the conversion will go through the process defined there.\n\n    await target.send(f'Hello, {target.name}!')\n\n\n@bot.command()\nasync def ignore(ctx: commands.Context, target: typing.Union[discord.Member, discord.TextChannel]):\n    # This command signature utilises the `typing.Union` typehint.\n    # The `commands` framework attempts a conversion of each type in this Union *in order*.\n    # So, it will attempt to convert whatever is passed to `target` to a `discord.Member` instance.\n    # If that fails, it will attempt to convert it to a `discord.TextChannel` instance.\n    # See: https://discordpy.readthedocs.io/en/latest/ext/commands/commands.html#typing-union\n    # NOTE: If a Union typehint converter fails it will raise `commands.BadUnionArgument`\n    # instead of `commands.BadArgument`.\n\n    # To check the resulting type, `isinstance` is used\n    if isinstance(target, discord.Member):\n        await ctx.send(f'Member found: {target.mention}, adding them to the ignore list.')\n    elif isinstance(target, discord.TextChannel):  # this could be an `else` but for completeness' sake.\n        await ctx.send(f'Channel found: {target.mention}, adding it to the ignore list.')\n\n\n# Built-in type converters.\n@bot.command()\nasync def multiply(ctx: commands.Context, number: int, maybe: bool):\n    # We want an `int` and a `bool` parameter here.\n    # `bool` is a slightly special case, as shown here:\n    # See: https://discordpy.readthedocs.io/en/latest/ext/commands/commands.html#bool\n\n    if maybe is True:\n        return await ctx.send(number * 2)\n    await ctx.send(number * 5)\n\n\nbot.run('token')\n"
  },
  {
    "path": "examples/custom_context.py",
    "content": "# This example requires the 'message_content' privileged intent to function.\n\n\nimport random\n\nimport discord\nfrom discord.ext import commands\n\n\nclass MyContext(commands.Context):\n    async def tick(self, value):\n        # reacts to the message with an emoji\n        # depending on whether value is True or False\n        # if its True, it'll add a green check mark\n        # otherwise, it'll add a red cross mark\n        emoji = '\\N{WHITE HEAVY CHECK MARK}' if value else '\\N{CROSS MARK}'\n        try:\n            # this will react to the command author's message\n            await self.message.add_reaction(emoji)\n        except discord.HTTPException:\n            # sometimes errors occur during this, for example\n            # maybe you don't have permission to do that\n            # we don't mind, so we can just ignore them\n            pass\n\n\nclass MyBot(commands.Bot):\n    async def get_context(self, message, *, cls=MyContext):\n        # when you override this method, you pass your new Context\n        # subclass to the super() method, which tells the bot to\n        # use the new MyContext class\n        return await super().get_context(message, cls=cls)\n\n\nintents = discord.Intents.default()\nintents.message_content = True\n\nbot = MyBot(command_prefix='!', intents=intents)\n\n\n@bot.command()\nasync def guess(ctx, number: int):\n    \"\"\"Guess a random number from 1 to 6.\"\"\"\n    # explained in a previous example, this gives you\n    # a random number from 1-6\n    value = random.randint(1, 6)\n    # with your new helper function, you can add a\n    # green check mark if the guess was correct,\n    # or a red cross mark if it wasn't\n    await ctx.tick(number == value)\n\n\n# IMPORTANT: You shouldn't hard code your token\n# these are very important, and leaking them can\n# let people do very malicious things with your\n# bot. Try to use a file or something to keep\n# them private, and don't commit it to GitHub\ntoken = \"your token here\"\nbot.run(token)\n"
  },
  {
    "path": "examples/deleted.py",
    "content": "# This example requires the 'message_content' privileged intent to function.\n\nimport discord\n\n\nclass MyClient(discord.Client):\n    async def on_ready(self):\n        print(f'Logged in as {self.user} (ID: {self.user.id})')\n        print('------')\n\n    async def on_message(self, message):\n        if message.content.startswith('!deleteme'):\n            msg = await message.channel.send('I will delete myself now...')\n            await msg.delete()\n\n            # this also works\n            await message.channel.send('Goodbye in 3 seconds...', delete_after=3.0)\n\n    async def on_message_delete(self, message):\n        msg = f'{message.author} has deleted the message: {message.content}'\n        await message.channel.send(msg)\n\n\nintents = discord.Intents.default()\nintents.message_content = True\n\nclient = MyClient(intents=intents)\nclient.run('token')\n"
  },
  {
    "path": "examples/edits.py",
    "content": "# This example requires the 'message_content' privileged intent to function.\n\nimport discord\nimport asyncio\n\n\nclass MyClient(discord.Client):\n    async def on_ready(self):\n        print(f'Logged in as {self.user} (ID: {self.user.id})')\n        print('------')\n\n    async def on_message(self, message):\n        if message.content.startswith('!editme'):\n            msg = await message.channel.send('10')\n            await asyncio.sleep(3.0)\n            await msg.edit(content='40')\n\n    async def on_message_edit(self, before, after):\n        msg = f'**{before.author}** edited their message:\\n{before.content} -> {after.content}'\n        await before.channel.send(msg)\n\n\nintents = discord.Intents.default()\nintents.message_content = True\n\nclient = MyClient(intents=intents)\nclient.run('token')\n"
  },
  {
    "path": "examples/guessing_game.py",
    "content": "# This example requires the 'message_content' privileged intent to function.\n\nimport discord\nimport random\nimport asyncio\n\n\nclass MyClient(discord.Client):\n    async def on_ready(self):\n        print(f'Logged in as {self.user} (ID: {self.user.id})')\n        print('------')\n\n    async def on_message(self, message):\n        # we do not want the bot to reply to itself\n        if message.author.id == self.user.id:\n            return\n\n        if message.content.startswith('$guess'):\n            await message.channel.send('Guess a number between 1 and 10.')\n\n            def is_correct(m):\n                return m.author == message.author and m.content.isdigit()\n\n            answer = random.randint(1, 10)\n\n            try:\n                guess = await self.wait_for('message', check=is_correct, timeout=5.0)\n            except asyncio.TimeoutError:\n                return await message.channel.send(f'Sorry, you took too long it was {answer}.')\n\n            if int(guess.content) == answer:\n                await message.channel.send('You are right!')\n            else:\n                await message.channel.send(f'Oops. It is actually {answer}.')\n\n\nintents = discord.Intents.default()\nintents.message_content = True\n\nclient = MyClient(intents=intents)\nclient.run('token')\n"
  },
  {
    "path": "examples/modals/basic.py",
    "content": "import discord\nfrom discord import app_commands\n\nimport traceback\n\n# The guild in which this slash command will be registered.\n# It is recommended to have a test guild to separate from your \"production\" bot\nTEST_GUILD = discord.Object(0)\n\n\nclass MyClient(discord.Client):\n    def __init__(self) -> None:\n        # Just default intents and a `discord.Client` instance\n        # We don't need a `commands.Bot` instance because we are not\n        # creating text-based commands.\n        intents = discord.Intents.default()\n        super().__init__(intents=intents)\n\n        # We need an `discord.app_commands.CommandTree` instance\n        # to register application commands (slash commands in this case)\n        self.tree = app_commands.CommandTree(self)\n\n    async def on_ready(self):\n        print(f'Logged in as {self.user} (ID: {self.user.id})')\n        print('------')\n\n    async def setup_hook(self) -> None:\n        # Sync the application command with Discord.\n        await self.tree.sync(guild=TEST_GUILD)\n\n\nclass Feedback(discord.ui.Modal, title='Feedback'):\n    # Our modal classes MUST subclass `discord.ui.Modal`,\n    # but the title can be whatever you want.\n\n    # This will be a short input, where the user can enter their name\n    # It will also have a placeholder, as denoted by the `placeholder` kwarg.\n    # By default, it is required and is a short-style input which is exactly\n    # what we want.\n    name = discord.ui.TextInput(\n        label='Name',\n        placeholder='Your name here...',\n    )\n\n    # This is a longer, paragraph style input, where user can submit feedback\n    # Unlike the name, it is not required. If filled out, however, it will\n    # only accept a maximum of 300 characters, as denoted by the\n    # `max_length=300` kwarg.\n    feedback = discord.ui.TextInput(\n        label='What do you think of this new feature?',\n        style=discord.TextStyle.long,\n        placeholder='Type your feedback here...',\n        required=False,\n        max_length=300,\n    )\n\n    async def on_submit(self, interaction: discord.Interaction):\n        await interaction.response.send_message(f'Thanks for your feedback, {self.name.value}!', ephemeral=True)\n\n    async def on_error(self, interaction: discord.Interaction, error: Exception) -> None:\n        await interaction.response.send_message('Oops! Something went wrong.', ephemeral=True)\n\n        # Make sure we know what the error actually is\n        traceback.print_exception(type(error), error, error.__traceback__)\n\n\nclient = MyClient()\n\n\n@client.tree.command(guild=TEST_GUILD, description=\"Submit feedback\")\nasync def feedback(interaction: discord.Interaction):\n    # Send the modal with an instance of our `Feedback` class\n    # Since modals require an interaction, they cannot be done as a response to a text command.\n    # They can only be done as a response to either an application command or a button press.\n    await interaction.response.send_modal(Feedback())\n\n\nclient.run('token')\n"
  },
  {
    "path": "examples/new_member.py",
    "content": "# This example requires the 'members' privileged intent to function.\n\nimport discord\n\n\nclass MyClient(discord.Client):\n    async def on_ready(self):\n        print(f'Logged in as {self.user} (ID: {self.user.id})')\n        print('------')\n\n    async def on_member_join(self, member):\n        guild = member.guild\n        if guild.system_channel is not None:\n            to_send = f'Welcome {member.mention} to {guild.name}!'\n            await guild.system_channel.send(to_send)\n\n\nintents = discord.Intents.default()\nintents.members = True\n\nclient = MyClient(intents=intents)\nclient.run('token')\n"
  },
  {
    "path": "examples/reaction_roles.py",
    "content": "# This example requires the 'members' privileged intents\n\nimport discord\n\n\nclass MyClient(discord.Client):\n    def __init__(self, *args, **kwargs):\n        super().__init__(*args, **kwargs)\n\n        self.role_message_id = 0  # ID of the message that can be reacted to to add/remove a role.\n        self.emoji_to_role = {\n            discord.PartialEmoji(name='🔴'): 0,  # ID of the role associated with unicode emoji '🔴'.\n            discord.PartialEmoji(name='🟡'): 0,  # ID of the role associated with unicode emoji '🟡'.\n            discord.PartialEmoji(name='green', id=0): 0,  # ID of the role associated with a partial emoji's ID.\n        }\n\n    async def on_raw_reaction_add(self, payload: discord.RawReactionActionEvent):\n        \"\"\"Gives a role based on a reaction emoji.\"\"\"\n        # Make sure that the message the user is reacting to is the one we care about.\n        if payload.message_id != self.role_message_id:\n            return\n\n        guild = self.get_guild(payload.guild_id)\n        if guild is None:\n            # Check if we're still in the guild and it's cached.\n            return\n\n        try:\n            role_id = self.emoji_to_role[payload.emoji]\n        except KeyError:\n            # If the emoji isn't the one we care about then exit as well.\n            return\n\n        role = guild.get_role(role_id)\n        if role is None:\n            # Make sure the role still exists and is valid.\n            return\n\n        try:\n            # Finally, add the role.\n            await payload.member.add_roles(role)\n        except discord.HTTPException:\n            # If we want to do something in case of errors we'd do it here.\n            pass\n\n    async def on_raw_reaction_remove(self, payload: discord.RawReactionActionEvent):\n        \"\"\"Removes a role based on a reaction emoji.\"\"\"\n        # Make sure that the message the user is reacting to is the one we care about.\n        if payload.message_id != self.role_message_id:\n            return\n\n        guild = self.get_guild(payload.guild_id)\n        if guild is None:\n            # Check if we're still in the guild and it's cached.\n            return\n\n        try:\n            role_id = self.emoji_to_role[payload.emoji]\n        except KeyError:\n            # If the emoji isn't the one we care about then exit as well.\n            return\n\n        role = guild.get_role(role_id)\n        if role is None:\n            # Make sure the role still exists and is valid.\n            return\n\n        # The payload for `on_raw_reaction_remove` does not provide `.member`\n        # so we must get the member ourselves from the payload's `.user_id`.\n        member = guild.get_member(payload.user_id)\n        if member is None:\n            # Make sure the member still exists and is valid.\n            return\n\n        try:\n            # Finally, remove the role.\n            await member.remove_roles(role)\n        except discord.HTTPException:\n            # If we want to do something in case of errors we'd do it here.\n            pass\n\n\nintents = discord.Intents.default()\nintents.members = True\n\nclient = MyClient(intents=intents)\nclient.run('token')\n"
  },
  {
    "path": "examples/reply.py",
    "content": "# This example requires the 'message_content' privileged intent to function.\n\nimport discord\n\n\nclass MyClient(discord.Client):\n    async def on_ready(self):\n        print(f'Logged in as {self.user} (ID: {self.user.id})')\n        print('------')\n\n    async def on_message(self, message):\n        # we do not want the bot to reply to itself\n        if message.author.id == self.user.id:\n            return\n\n        if message.content.startswith('!hello'):\n            await message.reply('Hello!', mention_author=True)\n\n\nintents = discord.Intents.default()\nintents.message_content = True\n\nclient = MyClient(intents=intents)\nclient.run('token')\n"
  },
  {
    "path": "examples/secret.py",
    "content": "import typing\n\nimport discord\nfrom discord.ext import commands\n\nintents = discord.Intents.default()\n\nbot = commands.Bot(command_prefix=commands.when_mentioned, description=\"Nothing to see here!\", intents=intents)\n\n# the `hidden` keyword argument hides it from the help command.\n@bot.group(hidden=True)\nasync def secret(ctx: commands.Context):\n    \"\"\"What is this \"secret\" you speak of?\"\"\"\n    if ctx.invoked_subcommand is None:\n        await ctx.send('Shh!', delete_after=5)\n\n\ndef create_overwrites(ctx, *objects):\n    \"\"\"This is just a helper function that creates the overwrites for the\n    voice/text channels.\n\n    A `discord.PermissionOverwrite` allows you to determine the permissions\n    of an object, whether it be a `discord.Role` or a `discord.Member`.\n\n    In this case, the `view_channel` permission is being used to hide the channel\n    from being viewed by whoever does not meet the criteria, thus creating a\n    secret channel.\n    \"\"\"\n\n    # a dict comprehension is being utilised here to set the same permission overwrites\n    # for each `discord.Role` or `discord.Member`.\n    overwrites = {obj: discord.PermissionOverwrite(view_channel=True) for obj in objects}\n\n    # prevents the default role (@everyone) from viewing the channel\n    # if it isn't already allowed to view the channel.\n    overwrites.setdefault(ctx.guild.default_role, discord.PermissionOverwrite(view_channel=False))\n\n    # makes sure the client is always allowed to view the channel.\n    overwrites[ctx.guild.me] = discord.PermissionOverwrite(view_channel=True)\n\n    return overwrites\n\n\n# since these commands rely on guild related features,\n# it is best to lock it to be guild-only.\n@secret.command()\n@commands.guild_only()\nasync def text(ctx: commands.Context, name: str, *objects: typing.Union[discord.Role, discord.Member]):\n    \"\"\"This makes a text channel with a specified name\n    that is only visible to roles or members that are specified.\n    \"\"\"\n\n    overwrites = create_overwrites(ctx, *objects)\n\n    await ctx.guild.create_text_channel(\n        name,\n        overwrites=overwrites,\n        topic='Top secret text channel. Any leakage of this channel may result in serious trouble.',\n        reason='Very secret business.',\n    )\n\n\n@secret.command()\n@commands.guild_only()\nasync def voice(ctx: commands.Context, name: str, *objects: typing.Union[discord.Role, discord.Member]):\n    \"\"\"This does the same thing as the `text` subcommand\n    but instead creates a voice channel.\n    \"\"\"\n\n    overwrites = create_overwrites(ctx, *objects)\n\n    await ctx.guild.create_voice_channel(\n        name,\n        overwrites=overwrites,\n        reason='Very secret business.',\n    )\n\n\n@secret.command()\n@commands.guild_only()\nasync def emoji(ctx: commands.Context, emoji: discord.PartialEmoji, *roles: discord.Role):\n    \"\"\"This clones a specified emoji that only specified roles\n    are allowed to use.\n    \"\"\"\n\n    # fetch the emoji asset and read it as bytes.\n    emoji_bytes = await emoji.read()\n\n    # the key parameter here is `roles`, which controls\n    # what roles are able to use the emoji.\n    await ctx.guild.create_custom_emoji(\n        name=emoji.name,\n        image=emoji_bytes,\n        roles=roles,\n        reason='Very secret business.',\n    )\n\n\nbot.run('token')\n"
  },
  {
    "path": "examples/views/confirm.py",
    "content": "# This example requires the 'message_content' privileged intent to function.\n\nfrom discord.ext import commands\n\nimport discord\n\n\nclass Bot(commands.Bot):\n    def __init__(self):\n        intents = discord.Intents.default()\n        intents.message_content = True\n\n        super().__init__(command_prefix=commands.when_mentioned_or('$'), intents=intents)\n\n    async def on_ready(self):\n        print(f'Logged in as {self.user} (ID: {self.user.id})')\n        print('------')\n\n\n# Define a simple View that gives us a confirmation menu\nclass Confirm(discord.ui.View):\n    def __init__(self):\n        super().__init__()\n        self.value = None\n\n    # When the confirm button is pressed, set the inner value to `True` and\n    # stop the View from listening to more input.\n    # We also send the user an ephemeral message that we're confirming their choice.\n    @discord.ui.button(label='Confirm', style=discord.ButtonStyle.green)\n    async def confirm(self, interaction: discord.Interaction, button: discord.ui.Button):\n        await interaction.response.send_message('Confirming', ephemeral=True)\n        self.value = True\n        self.stop()\n\n    # This one is similar to the confirmation button except sets the inner value to `False`\n    @discord.ui.button(label='Cancel', style=discord.ButtonStyle.grey)\n    async def cancel(self, interaction: discord.Interaction, button: discord.ui.Button):\n        await interaction.response.send_message('Cancelling', ephemeral=True)\n        self.value = False\n        self.stop()\n\n\nbot = Bot()\n\n\n@bot.command()\nasync def ask(ctx: commands.Context):\n    \"\"\"Asks the user a question to confirm something.\"\"\"\n    # We create the view and assign it to a variable so we can wait for it later.\n    view = Confirm()\n    await ctx.send('Do you want to continue?', view=view)\n    # Wait for the View to stop listening for input...\n    await view.wait()\n    if view.value is None:\n        print('Timed out...')\n    elif view.value:\n        print('Confirmed...')\n    else:\n        print('Cancelled...')\n\n\nbot.run('token')\n"
  },
  {
    "path": "examples/views/counter.py",
    "content": "# This example requires the 'message_content' privileged intent to function.\n\nfrom discord.ext import commands\n\nimport discord\n\n\nclass CounterBot(commands.Bot):\n    def __init__(self):\n        intents = discord.Intents.default()\n        intents.message_content = True\n\n        super().__init__(command_prefix=commands.when_mentioned_or('$'), intents=intents)\n\n    async def on_ready(self):\n        print(f'Logged in as {self.user} (ID: {self.user.id})')\n        print('------')\n\n\n# Define a simple View that gives us a counter button\nclass Counter(discord.ui.View):\n\n    # Define the actual button\n    # When pressed, this increments the number displayed until it hits 5.\n    # When it hits 5, the counter button is disabled and it turns green.\n    # note: The name of the function does not matter to the library\n    @discord.ui.button(label='0', style=discord.ButtonStyle.red)\n    async def count(self, interaction: discord.Interaction, button: discord.ui.Button):\n        number = int(button.label) if button.label else 0\n        if number + 1 >= 5:\n            button.style = discord.ButtonStyle.green\n            button.disabled = True\n        button.label = str(number + 1)\n\n        # Make sure to update the message with our updated selves\n        await interaction.response.edit_message(view=self)\n\n\nbot = CounterBot()\n\n\n@bot.command()\nasync def counter(ctx: commands.Context):\n    \"\"\"Starts a counter for pressing.\"\"\"\n    await ctx.send('Press!', view=Counter())\n\n\nbot.run('token')\n"
  },
  {
    "path": "examples/views/dropdown.py",
    "content": "# This example requires the 'message_content' privileged intent to function.\n\nimport discord\nfrom discord.ext import commands\n\n# Defines a custom Select containing colour options\n# that the user can choose. The callback function\n# of this class is called when the user changes their choice\nclass Dropdown(discord.ui.Select):\n    def __init__(self):\n\n        # Set the options that will be presented inside the dropdown\n        options = [\n            discord.SelectOption(label='Red', description='Your favourite colour is red', emoji='🟥'),\n            discord.SelectOption(label='Green', description='Your favourite colour is green', emoji='🟩'),\n            discord.SelectOption(label='Blue', description='Your favourite colour is blue', emoji='🟦'),\n        ]\n\n        # The placeholder is what will be shown when no option is chosen\n        # The min and max values indicate we can only pick one of the three options\n        # The options parameter defines the dropdown options. We defined this above\n        super().__init__(placeholder='Choose your favourite colour...', min_values=1, max_values=1, options=options)\n\n    async def callback(self, interaction: discord.Interaction):\n        # Use the interaction object to send a response message containing\n        # the user's favourite colour or choice. The self object refers to the\n        # Select object, and the values attribute gets a list of the user's\n        # selected options. We only want the first one.\n        await interaction.response.send_message(f'Your favourite colour is {self.values[0]}')\n\n\nclass DropdownView(discord.ui.View):\n    def __init__(self):\n        super().__init__()\n\n        # Adds the dropdown to our view object.\n        self.add_item(Dropdown())\n\n\nclass Bot(commands.Bot):\n    def __init__(self):\n        intents = discord.Intents.default()\n        intents.message_content = True\n\n        super().__init__(command_prefix=commands.when_mentioned_or('$'), intents=intents)\n\n    async def on_ready(self):\n        print(f'Logged in as {self.user} (ID: {self.user.id})')\n        print('------')\n\n\nbot = Bot()\n\n\n@bot.command()\nasync def colour(ctx):\n    \"\"\"Sends a message with our dropdown containing colours\"\"\"\n\n    # Create the view containing our dropdown\n    view = DropdownView()\n\n    # Sending a message containing our view\n    await ctx.send('Pick your favourite colour:', view=view)\n\n\nbot.run('token')\n"
  },
  {
    "path": "examples/views/dynamic_counter.py",
    "content": "from __future__ import annotations\n\nfrom discord.ext import commands\nimport discord\nimport re\n\n# Complicated use cases for persistent views can be difficult to achieve when dealing\n# with state changes or dynamic items. In order to facilitate these complicated use cases,\n# the library provides DynamicItem which allows you to define an item backed by a regular\n# expression that can parse state out of the custom_id.\n\n# The following example showcases a dynamic item that implements a counter.\n# The `template` class parameter is used to give the library a regular expression to parse\n# the custom_id. In this case we're parsing out custom_id in the form of e.g.\n# `counter:5:user:80088516616269824` where the first number is the current count and the\n# second number is the user ID who owns the button.\n\n# Note that custom_ids can only be up to 100 characters long.\nclass DynamicCounter(\n    discord.ui.DynamicItem[discord.ui.Button],\n    template=r'counter:(?P<count>[0-9]+):user:(?P<id>[0-9]+)',\n):\n    def __init__(self, user_id: int, count: int = 0) -> None:\n        self.user_id: int = user_id\n        self.count: int = count\n        super().__init__(\n            discord.ui.Button(\n                label=f'Total: {count}',\n                style=self.style,\n                custom_id=f'counter:{count}:user:{user_id}',\n                emoji='\\N{THUMBS UP SIGN}',\n            )\n        )\n\n    # We want the style of the button to be dynamic depending on the count.\n    @property\n    def style(self) -> discord.ButtonStyle:\n        if self.count < 10:\n            return discord.ButtonStyle.grey\n        if self.count < 15:\n            return discord.ButtonStyle.red\n        if self.count < 20:\n            return discord.ButtonStyle.blurple\n        return discord.ButtonStyle.green\n\n    # This method actually extracts the information from the custom ID and creates the item.\n    @classmethod\n    async def from_custom_id(cls, interaction: discord.Interaction, item: discord.ui.Button, match: re.Match[str], /):\n        count = int(match['count'])\n        user_id = int(match['id'])\n        return cls(user_id, count=count)\n\n    # We want to ensure that our button is only called by the user who created it.\n    async def interaction_check(self, interaction: discord.Interaction) -> bool:\n        return interaction.user.id == self.user_id\n\n    async def callback(self, interaction: discord.Interaction) -> None:\n        # When the button is invoked, we want to increase the count and update the button's\n        # styling and label.\n        # In order to actually persist these changes we need to also update the custom_id\n        # to match the new information.\n        # Note that the custom ID *must* match the template.\n        self.count += 1\n        self.item.label = f'Total: {self.count}'\n        self.custom_id = f'counter:{self.count}:user:{self.user_id}'\n        self.item.style = self.style\n        # In here, self.view is the view given by the interaction's message.\n        # It cannot be a custom subclass due to limitations.\n        await interaction.response.edit_message(view=self.view)\n\n\nclass DynamicCounterBot(commands.Bot):\n    def __init__(self):\n        intents = discord.Intents.default()\n        super().__init__(command_prefix=commands.when_mentioned, intents=intents)\n\n    async def setup_hook(self) -> None:\n        # For dynamic items, we must register the classes instead of the views.\n        self.add_dynamic_items(DynamicCounter)\n\n    async def on_ready(self):\n        print(f'Logged in as {self.user} (ID: {self.user.id})')\n        print('------')\n\n\nbot = DynamicCounterBot()\n\n\n@bot.command()\nasync def counter(ctx: commands.Context):\n    \"\"\"Starts a dynamic counter.\"\"\"\n\n    view = discord.ui.View(timeout=None)\n    view.add_item(DynamicCounter(ctx.author.id))\n    await ctx.send('Here is your very own button!', view=view)\n\n\nbot.run('token')\n"
  },
  {
    "path": "examples/views/ephemeral.py",
    "content": "# This example requires the 'message_content' privileged intent to function.\n\nfrom discord.ext import commands\n\nimport discord\n\n\nclass EphemeralCounterBot(commands.Bot):\n    def __init__(self):\n        intents = discord.Intents.default()\n        intents.message_content = True\n\n        super().__init__(command_prefix=commands.when_mentioned_or('$'), intents=intents)\n\n    async def on_ready(self):\n        print(f'Logged in as {self.user} (ID: {self.user.id})')\n        print('------')\n\n\n# Define a simple View that gives us a counter button\nclass Counter(discord.ui.View):\n\n    # Define the actual button\n    # When pressed, this increments the number displayed until it hits 5.\n    # When it hits 5, the counter button is disabled and it turns green.\n    # note: The name of the function does not matter to the library\n    @discord.ui.button(label='0', style=discord.ButtonStyle.red)\n    async def count(self, interaction: discord.Interaction, button: discord.ui.Button):\n        number = int(button.label) if button.label else 0\n        if number + 1 >= 5:\n            button.style = discord.ButtonStyle.green\n            button.disabled = True\n        button.label = str(number + 1)\n\n        # Make sure to update the message with our updated selves\n        await interaction.response.edit_message(view=self)\n\n\n# Define a View that will give us our own personal counter button\nclass EphemeralCounter(discord.ui.View):\n    # When this button is pressed, it will respond with a Counter view that will\n    # give the button presser their own personal button they can press 5 times.\n    @discord.ui.button(label='Click', style=discord.ButtonStyle.blurple)\n    async def receive(self, interaction: discord.Interaction, button: discord.ui.Button):\n        # ephemeral=True makes the message hidden from everyone except the button presser\n        await interaction.response.send_message('Enjoy!', view=Counter(), ephemeral=True)\n\n\nbot = EphemeralCounterBot()\n\n\n@bot.command()\nasync def counter(ctx: commands.Context):\n    \"\"\"Starts a counter for pressing.\"\"\"\n    await ctx.send('Press!', view=EphemeralCounter())\n\n\nbot.run('token')\n"
  },
  {
    "path": "examples/views/link.py",
    "content": "# This example requires the 'message_content' privileged intent to function.\n\nfrom discord.ext import commands\n\nimport discord\nfrom urllib.parse import quote_plus\n\n\nclass GoogleBot(commands.Bot):\n    def __init__(self):\n        intents = discord.Intents.default()\n        intents.message_content = True\n\n        super().__init__(command_prefix=commands.when_mentioned_or('$'), intents=intents)\n\n    async def on_ready(self):\n        print(f'Logged in as {self.user} (ID: {self.user.id})')\n        print('------')\n\n\n# Define a simple View that gives us a google link button.\n# We take in `query` as the query that the command author requests for\nclass Google(discord.ui.View):\n    def __init__(self, query: str):\n        super().__init__()\n        # we need to quote the query string to make a valid url. Discord will raise an error if it isn't valid.\n        query = quote_plus(query)\n        url = f'https://www.google.com/search?q={query}'\n\n        # Link buttons cannot be made with the decorator\n        # Therefore we have to manually create one.\n        # We add the quoted url to the button, and add the button to the view.\n        self.add_item(discord.ui.Button(label='Click Here', url=url))\n\n\nbot = GoogleBot()\n\n\n@bot.command()\nasync def google(ctx: commands.Context, *, query: str):\n    \"\"\"Returns a google link for a query\"\"\"\n    await ctx.send(f'Google Result for: `{query}`', view=Google(query))\n\n\nbot.run('token')\n"
  },
  {
    "path": "examples/views/persistent.py",
    "content": "# This example requires the 'message_content' privileged intent to function.\nfrom __future__ import annotations\n\nfrom discord.ext import commands\nimport discord\nimport re\n\n\n# Define a simple View that persists between bot restarts\n# In order for a view to persist between restarts it needs to meet the following conditions:\n# 1) The timeout of the View has to be set to None\n# 2) Every item in the View has to have a custom_id set\n# It is recommended that the custom_id be sufficiently unique to\n# prevent conflicts with other buttons the bot sends.\n# For this example the custom_id is prefixed with the name of the bot.\n# Note that custom_ids can only be up to 100 characters long.\nclass PersistentView(discord.ui.View):\n    def __init__(self):\n        super().__init__(timeout=None)\n\n    @discord.ui.button(label='Green', style=discord.ButtonStyle.green, custom_id='persistent_view:green')\n    async def green(self, interaction: discord.Interaction, button: discord.ui.Button):\n        await interaction.response.send_message('This is green.', ephemeral=True)\n\n    @discord.ui.button(label='Red', style=discord.ButtonStyle.red, custom_id='persistent_view:red')\n    async def red(self, interaction: discord.Interaction, button: discord.ui.Button):\n        await interaction.response.send_message('This is red.', ephemeral=True)\n\n    @discord.ui.button(label='Grey', style=discord.ButtonStyle.grey, custom_id='persistent_view:grey')\n    async def grey(self, interaction: discord.Interaction, button: discord.ui.Button):\n        await interaction.response.send_message('This is grey.', ephemeral=True)\n\n\n# More complicated cases might require parsing state out from the custom_id instead.\n# For this use case, the library provides a `DynamicItem` to make this easier.\n# The same constraints as above apply to this too.\n# For this example, the `template` class parameter is used to give the library a regular\n# expression to parse the custom_id with.\n# These custom IDs will be in the form of e.g. `button:user:80088516616269824`.\nclass DynamicButton(discord.ui.DynamicItem[discord.ui.Button], template=r'button:user:(?P<id>[0-9]+)'):\n    def __init__(self, user_id: int) -> None:\n        super().__init__(\n            discord.ui.Button(\n                label='Do Thing',\n                style=discord.ButtonStyle.blurple,\n                custom_id=f'button:user:{user_id}',\n                emoji='\\N{THUMBS UP SIGN}',\n            )\n        )\n        self.user_id: int = user_id\n\n    # This is called when the button is clicked and the custom_id matches the template.\n    @classmethod\n    async def from_custom_id(cls, interaction: discord.Interaction, item: discord.ui.Button, match: re.Match[str], /):\n        user_id = int(match['id'])\n        return cls(user_id)\n\n    async def interaction_check(self, interaction: discord.Interaction) -> bool:\n        # Only allow the user who created the button to interact with it.\n        return interaction.user.id == self.user_id\n\n    async def callback(self, interaction: discord.Interaction) -> None:\n        await interaction.response.send_message('This is your very own button!', ephemeral=True)\n\n\nclass PersistentViewBot(commands.Bot):\n    def __init__(self):\n        intents = discord.Intents.default()\n        intents.message_content = True\n\n        super().__init__(command_prefix=commands.when_mentioned_or('$'), intents=intents)\n\n    async def setup_hook(self) -> None:\n        # Register the persistent view for listening here.\n        # Note that this does not send the view to any message.\n        # In order to do this you need to first send a message with the View, which is shown below.\n        # If you have the message_id you can also pass it as a keyword argument, but for this example\n        # we don't have one.\n        self.add_view(PersistentView())\n        # For dynamic items, we must register the classes instead of the views.\n        self.add_dynamic_items(DynamicButton)\n\n    async def on_ready(self):\n        print(f'Logged in as {self.user} (ID: {self.user.id})')\n        print('------')\n\n\nbot = PersistentViewBot()\n\n\n@bot.command()\n@commands.is_owner()\nasync def prepare(ctx: commands.Context):\n    \"\"\"Starts a persistent view.\"\"\"\n    # In order for a persistent view to be listened to, it needs to be sent to an actual message.\n    # Call this method once just to store it somewhere.\n    # In a more complicated program you might fetch the message_id from a database for use later.\n    # However this is outside of the scope of this simple example.\n    await ctx.send(\"What's your favourite colour?\", view=PersistentView())\n\n\n@bot.command()\nasync def dynamic_button(ctx: commands.Context):\n    \"\"\"Starts a dynamic button.\"\"\"\n\n    view = discord.ui.View(timeout=None)\n    view.add_item(DynamicButton(ctx.author.id))\n    await ctx.send('Here is your very own button!', view=view)\n\n\nbot.run('token')\n"
  },
  {
    "path": "examples/views/tic_tac_toe.py",
    "content": "# This example requires the 'message_content' privileged intent to function.\n\nfrom typing import List\nfrom discord.ext import commands\nimport discord\n\n# Defines a custom button that contains the logic of the game.\n# The ['TicTacToe'] bit is for type hinting purposes to tell your IDE or linter\n# what the type of `self.view` is. It is not required.\nclass TicTacToeButton(discord.ui.Button['TicTacToe']):\n    def __init__(self, x: int, y: int):\n        # A label is required, but we don't need one so a zero-width space is used\n        # The row parameter tells the View which row to place the button under.\n        # A View can only contain up to 5 rows -- each row can only have 5 buttons.\n        # Since a Tic Tac Toe grid is 3x3 that means we have 3 rows and 3 columns.\n        super().__init__(style=discord.ButtonStyle.secondary, label='\\u200b', row=y)\n        self.x = x\n        self.y = y\n\n    # This function is called whenever this particular button is pressed\n    # This is part of the \"meat\" of the game logic\n    async def callback(self, interaction: discord.Interaction):\n        assert self.view is not None\n        view: TicTacToe = self.view\n        state = view.board[self.y][self.x]\n        if state in (view.X, view.O):\n            return\n\n        if view.current_player == view.X:\n            self.style = discord.ButtonStyle.danger\n            self.label = 'X'\n            self.disabled = True\n            view.board[self.y][self.x] = view.X\n            view.current_player = view.O\n            content = \"It is now O's turn\"\n        else:\n            self.style = discord.ButtonStyle.success\n            self.label = 'O'\n            self.disabled = True\n            view.board[self.y][self.x] = view.O\n            view.current_player = view.X\n            content = \"It is now X's turn\"\n\n        winner = view.check_board_winner()\n        if winner is not None:\n            if winner == view.X:\n                content = 'X won!'\n            elif winner == view.O:\n                content = 'O won!'\n            else:\n                content = \"It's a tie!\"\n\n            for child in view.children:\n                child.disabled = True\n\n            view.stop()\n\n        await interaction.response.edit_message(content=content, view=view)\n\n\n# This is our actual board View\nclass TicTacToe(discord.ui.View):\n    # This tells the IDE or linter that all our children will be TicTacToeButtons\n    # This is not required\n    children: List[TicTacToeButton]\n    X = -1\n    O = 1\n    Tie = 2\n\n    def __init__(self):\n        super().__init__()\n        self.current_player = self.X\n        self.board = [\n            [0, 0, 0],\n            [0, 0, 0],\n            [0, 0, 0],\n        ]\n\n        # Our board is made up of 3 by 3 TicTacToeButtons\n        # The TicTacToeButton maintains the callbacks and helps steer\n        # the actual game.\n        for x in range(3):\n            for y in range(3):\n                self.add_item(TicTacToeButton(x, y))\n\n    # This method checks for the board winner -- it is used by the TicTacToeButton\n    def check_board_winner(self):\n        for across in self.board:\n            value = sum(across)\n            if value == 3:\n                return self.O\n            elif value == -3:\n                return self.X\n\n        # Check vertical\n        for line in range(3):\n            value = self.board[0][line] + self.board[1][line] + self.board[2][line]\n            if value == 3:\n                return self.O\n            elif value == -3:\n                return self.X\n\n        # Check diagonals\n        diag = self.board[0][2] + self.board[1][1] + self.board[2][0]\n        if diag == 3:\n            return self.O\n        elif diag == -3:\n            return self.X\n\n        diag = self.board[0][0] + self.board[1][1] + self.board[2][2]\n        if diag == 3:\n            return self.O\n        elif diag == -3:\n            return self.X\n\n        # If we're here, we need to check if a tie was made\n        if all(i != 0 for row in self.board for i in row):\n            return self.Tie\n\n        return None\n\n\nclass TicTacToeBot(commands.Bot):\n    def __init__(self):\n        intents = discord.Intents.default()\n        intents.message_content = True\n\n        super().__init__(command_prefix=commands.when_mentioned_or('$'), intents=intents)\n\n    async def on_ready(self):\n        print(f'Logged in as {self.user} (ID: {self.user.id})')\n        print('------')\n\n\nbot = TicTacToeBot()\n\n\n@bot.command()\nasync def tic(ctx: commands.Context):\n    \"\"\"Starts a tic-tac-toe game with yourself.\"\"\"\n    await ctx.send('Tic Tac Toe: X goes first', view=TicTacToe())\n\n\nbot.run('token')\n"
  },
  {
    "path": "pyproject.toml",
    "content": "[build-system]\nrequires = [\"setuptools\"]\nbuild-backend = \"setuptools.build_meta\"\n\n[project]\nname = \"discord.py\"\ndescription = \"A Python wrapper for the Discord API\"\nreadme = { file = \"README.rst\", content-type = \"text/x-rst\" }\nlicense = { file = \"LICENSE\" }\nrequires-python = \">=3.8\"\nauthors = [{ name = \"Rapptz\" }]\nclassifiers = [\n    \"Development Status :: 5 - Production/Stable\",\n    \"License :: OSI Approved :: MIT License\",\n    \"Intended Audience :: Developers\",\n    \"Natural Language :: English\",\n    \"Operating System :: OS Independent\",\n    \"Programming Language :: Python :: 3.8\",\n    \"Programming Language :: Python :: 3.9\",\n    \"Programming Language :: Python :: 3.10\",\n    \"Programming Language :: Python :: 3.11\",\n    \"Programming Language :: Python :: 3.12\",\n    \"Topic :: Internet\",\n    \"Topic :: Software Development :: Libraries\",\n    \"Topic :: Software Development :: Libraries :: Python Modules\",\n    \"Topic :: Utilities\",\n    \"Typing :: Typed\",\n]\ndynamic = [\"version\", \"dependencies\"]\n\n[project.urls]\nDocumentation = \"https://discordpy.readthedocs.io/en/latest/\"\n\"Issue tracker\" = \"https://github.com/Rapptz/discord.py/issues\"\n\n[tool.setuptools.dynamic]\ndependencies = { file = \"requirements.txt\" }\n\n[project.optional-dependencies]\nvoice = [\"PyNaCl>=1.3.0,<1.6\"]\ndocs = [\n    \"sphinx==4.4.0\",\n    \"sphinxcontrib_trio==1.1.2\",\n    # TODO: bump these when migrating to a newer Sphinx version\n    \"sphinxcontrib-websupport==1.2.4\",\n    \"sphinxcontrib-applehelp==1.0.4\",\n    \"sphinxcontrib-devhelp==1.0.2\",\n    \"sphinxcontrib-htmlhelp==2.0.1\",\n    \"sphinxcontrib-jsmath==1.0.1\",\n    \"sphinxcontrib-qthelp==1.0.3\",\n    \"sphinxcontrib-serializinghtml==1.1.5\",\n    \"typing-extensions>=4.3,<5\",\n    \"sphinx-inline-tabs==2023.4.21\",\n]\nspeed = [\n    \"orjson>=3.5.4\",\n    \"aiodns>=1.1\",\n    \"Brotli\",\n    \"cchardet==2.1.7; python_version < '3.10'\",\n]\ntest = [\n    \"coverage[toml]\",\n    \"pytest\",\n    \"pytest-asyncio\",\n    \"pytest-cov\",\n    \"pytest-mock\",\n    \"typing-extensions>=4.3,<5\",\n    \"tzdata; sys_platform == 'win32'\",\n]\n\n[tool.setuptools]\npackages = [\n    \"discord\",\n    \"discord.types\",\n    \"discord.ui\",\n    \"discord.webhook\",\n    \"discord.app_commands\",\n    \"discord.ext.commands\",\n    \"discord.ext.tasks\",\n]\ninclude-package-data = true\n\n[tool.black]\nline-length = 125\nskip-string-normalization = true\n\n[tool.coverage.run]\nomit = [\n    \"discord/__main__.py\",\n    \"discord/types/*\",\n    \"*/_types.py\",\n]\n\n[tool.coverage.report]\nexclude_lines = [\n    \"pragma: no cover\",\n    \"@overload\",\n]\n\n[tool.isort]\nprofile = \"black\"\ncombine_as_imports = true\ncombine_star = true\nline_length = 125\n\n[tool.pyright]\ninclude = [\n    \"discord\",\n    \"discord/app_commands\",\n    \"discord/types\",\n    \"discord/ui\",\n    \"discord/ext\",\n    \"discord/ext/commands\",\n    \"discord/ext/tasks\",\n]\nexclude = [\n    \"**/__pycache__\",\n    \"build\",\n    \"dist\",\n    \"docs\",\n]\nreportUnnecessaryTypeIgnoreComment = \"warning\"\nreportUnusedImport = \"error\"\npythonVersion = \"3.8\"\ntypeCheckingMode = \"basic\"\n\n[tool.pytest.ini_options]\nasyncio_mode = \"strict\"\n"
  },
  {
    "path": "requirements.txt",
    "content": "aiohttp>=3.7.4,<4\n"
  },
  {
    "path": "setup.py",
    "content": "from setuptools import setup\nimport re\n\ndef derive_version() -> str:\n    version = ''\n    with open('discord/__init__.py') as f:\n        version = re.search(r'^__version__\\s*=\\s*[\\'\"]([^\\'\"]*)[\\'\"]', f.read(), re.MULTILINE).group(1)\n\n    if not version:\n        raise RuntimeError('version is not set')\n\n    if version.endswith(('a', 'b', 'rc')):\n        # append version identifier based on commit count\n        try:\n            import subprocess\n\n            p = subprocess.Popen(['git', 'rev-list', '--count', 'HEAD'], stdout=subprocess.PIPE, stderr=subprocess.PIPE)\n            out, err = p.communicate()\n            if out:\n                version += out.decode('utf-8').strip()\n            p = subprocess.Popen(['git', 'rev-parse', '--short', 'HEAD'], stdout=subprocess.PIPE, stderr=subprocess.PIPE)\n            out, err = p.communicate()\n            if out:\n                version += '+g' + out.decode('utf-8').strip()\n        except Exception:\n            pass\n\n    return version\n\n\nsetup(version=derive_version())\n"
  },
  {
    "path": "tests/test_annotated_annotation.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom __future__ import annotations\nfrom typing import Optional\nfrom typing_extensions import Annotated\n\nimport discord\nfrom discord import app_commands\nfrom discord.ext import commands\n\nimport pytest\n\ndef test_annotated_annotation():\n    # can't exactly test if the parameter is the same, so just test if it raises something\n    @app_commands.command()\n    async def foo(interaction: discord.Interaction, param: Annotated[float, Optional[int]]):\n        pass\n\n\n    def to_hex(arg: str) -> int:\n        return int(arg, 16)\n\n    class Flag(commands.FlagConverter):\n        thing: Annotated[int, to_hex]\n\n    assert Flag.get_flags()['thing'].annotation == to_hex\n\n    @commands.command()\n    async def bar(ctx: commands.Context, param: Annotated[float, Optional[int]]):\n        pass\n\n    assert bar.clean_params['param'].annotation == Optional[int]\n\n    @commands.command()\n    async def nested(ctx: commands.Context, param: Optional[Annotated[str, int]]):\n        pass\n\n    assert nested.clean_params['param'].annotation == Optional[int]\n\n"
  },
  {
    "path": "tests/test_app_commands_autocomplete.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom __future__ import annotations\nfrom typing import List\n\nimport discord\nimport pytest\nfrom discord import app_commands\nfrom discord.utils import MISSING\n\n\nasync def free_function_autocomplete(interaction: discord.Interaction, current: str) -> List[app_commands.Choice[str]]:\n    return []\n\n\nasync def invalid_free_function(self, interaction: discord.Interaction, current: str) -> List[app_commands.Choice[str]]:\n    return []\n\n\nclass X(app_commands.Transformer):\n    async def autocomplete(self, interaction: discord.Interaction, current: str) -> List[app_commands.Choice[str]]:\n        return []\n\n\nclass ClassBased:\n    async def autocomplete(self, interaction: discord.Interaction, current: str) -> List[app_commands.Choice[str]]:\n        return []\n\n    async def invalid(self, interaction: discord.Interaction, current: str, bad: int) -> List[app_commands.Choice[str]]:\n        return []\n\n\nlookup = ClassBased()\nbound_autocomplete = lookup.autocomplete\ninvalid_bound_autocomplete = lookup.invalid\n\n\ndef test_free_function_autocomplete():\n    @app_commands.command()\n    @app_commands.autocomplete(name=free_function_autocomplete)\n    async def cmd(interaction: discord.Interaction, name: str):\n        ...\n\n    param = cmd._params['name']\n    assert param.autocomplete is not MISSING\n    assert not param.autocomplete.pass_command_binding  # type: ignore\n\n\ndef test_invalid_free_function_autocomplete():\n    with pytest.raises(TypeError):\n\n        @app_commands.command()\n        @app_commands.autocomplete(name=invalid_free_function)\n        async def cmd(interaction: discord.Interaction, name: str):\n            ...\n\n\ndef test_transformer_autocomplete():\n    @app_commands.command()\n    async def cmd(interaction: discord.Interaction, param: app_commands.Transform[str, X]):\n        ...\n\n    param = cmd._params['param']\n    assert param.autocomplete is not MISSING\n    assert getattr(param.autocomplete, '__self__', None) is not None\n    assert not getattr(param.autocomplete, 'pass_command_binding', False)\n\n\nfirst_instance = X()\nsecond_instance = X()\n\n\ndef test_multiple_transformer_autocomplete():\n    @app_commands.command()\n    async def cmd(\n        interaction: discord.Interaction,\n        param: app_commands.Transform[str, first_instance],\n        second: app_commands.Transform[str, second_instance],\n    ):\n        ...\n\n    param = cmd._params['param']\n    assert param.autocomplete is not MISSING\n    assert getattr(param.autocomplete, '__self__', None) is first_instance\n    assert not getattr(param.autocomplete, 'pass_command_binding', False)\n\n    param = cmd._params['second']\n    assert param.autocomplete is not MISSING\n    assert getattr(param.autocomplete, '__self__', None) is second_instance\n    assert not getattr(param.autocomplete, 'pass_command_binding', False)\n\n\ndef test_bound_function_autocomplete():\n    @app_commands.command()\n    @app_commands.autocomplete(name=bound_autocomplete)\n    async def cmd(interaction: discord.Interaction, name: str):\n        ...\n\n    param = cmd._params['name']\n    assert param.autocomplete is not MISSING\n    assert getattr(param.autocomplete, '__self__', None) is lookup\n    assert not getattr(param.autocomplete, 'pass_command_binding', False)\n\n\ndef test_invalid_bound_function_autocomplete():\n    with pytest.raises(TypeError):\n\n        @app_commands.command()\n        @app_commands.autocomplete(name=invalid_bound_autocomplete)  # type: ignore\n        async def cmd(interaction: discord.Interaction, name: str):\n            ...\n\n\ndef test_group_function_autocomplete():\n    class MyGroup(app_commands.Group):\n        @app_commands.command()\n        async def foo(self, interaction: discord.Interaction, name: str):\n            ...\n\n        @foo.autocomplete('name')\n        async def autocomplete(self, interaction: discord.Interaction, current: str) -> List[app_commands.Choice[str]]:\n            return []\n\n    g = MyGroup()\n    param = g.foo._params['name']\n\n    assert param.autocomplete is not MISSING\n    assert getattr(param.autocomplete, '__self__', None) is None\n    assert getattr(param.autocomplete, 'pass_command_binding', False)\n"
  },
  {
    "path": "tests/test_app_commands_description.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom __future__ import annotations\n\nimport discord\nfrom discord import app_commands\nfrom discord.ext import commands\n\n\ndef test_descriptions_describe():\n    @app_commands.command(description='This is the short description that will appear.')\n    @app_commands.describe(arg='Decorator description of arg.')\n    @app_commands.describe(arg2='Decorator description of arg2.')\n    async def describe(interaction: discord.Interaction, arg: str, arg2: int) -> None:\n        ...\n\n    assert describe.description == 'This is the short description that will appear.'\n    assert describe.get_parameter('arg').description == 'Decorator description of arg.'  # type: ignore\n    assert describe.get_parameter('arg2').description == 'Decorator description of arg2.'  # type: ignore\n\n\ndef test_descriptions_no_args():\n    @app_commands.command()\n    async def no_args(interaction: discord.Interaction) -> None:\n        \"\"\"This is the short description that will appear.\"\"\"\n\n    assert no_args.description == 'This is the short description that will appear.'\n\n\ndef test_descriptions_numpy():\n    @app_commands.command()\n    async def numpy(interaction: discord.Interaction, arg: str, arg2: int) -> None:\n        \"\"\"This is the short description that will appear.\n\n        This extended description will not appear in the command description.\n\n        Parameters\n        ----------\n        arg: str\n            Docstring description of arg.\n            This is the second line of the arg docstring.\n        arg2: int\n            Docstring description of arg2.\n        \"\"\"\n\n    assert numpy.description == 'This is the short description that will appear.'\n    assert numpy.get_parameter('arg').description == 'Docstring description of arg. This is the second line of the arg docstring.'  # type: ignore\n    assert numpy.get_parameter('arg2').description == 'Docstring description of arg2.'  # type: ignore\n\n\ndef test_descriptions_numpy_extras():\n    @app_commands.command()\n    async def numpy(interaction: discord.Interaction, arg: str, arg2: int) -> None:\n        \"\"\"This is the short description that will appear.\n\n        This extended description will not appear in the command description.\n\n        Parameters\n        ----------\n        interaction: discord.Interaction\n            The interaction object.\n        arg: str\n            Docstring description of arg.\n            This is the second line of the arg docstring.\n        arg2: int\n            Docstring description of arg2.\n\n        Returns\n        -------\n        NoneType\n            This function does not return anything.\n        \"\"\"\n\n    assert numpy.description == 'This is the short description that will appear.'\n    assert numpy.get_parameter('arg').description == 'Docstring description of arg. This is the second line of the arg docstring.'  # type: ignore\n    assert numpy.get_parameter('arg2').description == 'Docstring description of arg2.'  # type: ignore\n\n\ndef test_descriptions_google():\n    @app_commands.command()\n    async def google(interaction: discord.Interaction, arg: str, arg2: int) -> None:\n        \"\"\"This is the short description that will appear.\n\n        This extended description will not appear in the command description.\n\n        Args:\n            arg: Docstring description of arg.\n                This is the second line of the arg docstring.\n            arg2 (int): Docstring description of arg2.\n        \"\"\"\n\n    assert google.description == 'This is the short description that will appear.'\n    assert google.get_parameter('arg').description == 'Docstring description of arg. This is the second line of the arg docstring.'  # type: ignore\n    assert google.get_parameter('arg2').description == 'Docstring description of arg2.'  # type: ignore\n\n\ndef test_descriptions_google_extras():\n    @app_commands.command()\n    async def google(interaction: discord.Interaction, arg: str, arg2: int) -> None:\n        \"\"\"This is the short description that will appear.\n\n        This extended description will not appear in the command description.\n\n        Args:\n            interaction: discord.Interaction\n                The interaction object.\n            arg: Docstring description of arg.\n                This is the second line of the arg docstring.\n            arg2 (int): Docstring description of arg2.\n\n        Returns:\n            NoneType\n                This function does not return anything.\n        \"\"\"\n\n    assert google.description == 'This is the short description that will appear.'\n    assert google.get_parameter('arg').description == 'Docstring description of arg. This is the second line of the arg docstring.'  # type: ignore\n    assert google.get_parameter('arg2').description == 'Docstring description of arg2.'  # type: ignore\n\n\ndef test_descriptions_sphinx():\n    @app_commands.command()\n    async def sphinx(interaction: discord.Interaction, arg: str, arg2: int) -> None:\n        \"\"\"This is the short description that will appear.\n\n        This extended description will not appear in the command description.\n\n        :param arg: Docstring description of arg.\n            This is the second line of the arg docstring.\n        :type arg: str\n        :param arg2: Docstring description of arg2.\n        :type arg2: int\n        \"\"\"\n\n    assert sphinx.description == 'This is the short description that will appear.'\n    assert sphinx.get_parameter('arg').description == 'Docstring description of arg. This is the second line of the arg docstring.'  # type: ignore\n    assert sphinx.get_parameter('arg2').description == 'Docstring description of arg2.'  # type: ignore\n\n\ndef test_descriptions_sphinx_extras():\n    @app_commands.command()\n    async def sphinx(interaction: discord.Interaction, arg: str, arg2: int) -> None:\n        \"\"\"This is the short description that will appear.\n\n        This extended description will not appear in the command description.\n\n        :param interaction: The interaction object.\n        :type interaction: :class:`discord.Interaction`\n        :param arg: Docstring description of arg.\n            This is the second line of the arg docstring.\n        :type arg: :class:`str`\n        :param arg2: Docstring description of arg2.\n        :type arg2: :class:`int`\n        :return: None\n        :rtpye: NoneType\n        \"\"\"\n\n    assert sphinx.description == 'This is the short description that will appear.'\n    assert sphinx.get_parameter('arg').description == 'Docstring description of arg. This is the second line of the arg docstring.'  # type: ignore\n    assert sphinx.get_parameter('arg2').description == 'Docstring description of arg2.'  # type: ignore\n\n\ndef test_descriptions_docstring_and_describe():\n    @app_commands.command(description='This is the short description that will appear.')\n    @app_commands.describe(arg='Decorator description of arg.')\n    async def describe(interaction: discord.Interaction, arg: str, arg2: int) -> None:\n        \"\"\"This description will not appear since it is overriden by the decorator.\n\n        This extended description will not appear in the command description.\n\n        Args:\n            arg: Docstring description of arg.\n                This will not be used since the decorator overrides it.\n            arg2 (int): Docstring description of arg2.\n        \"\"\"\n\n    assert describe.description == 'This is the short description that will appear.'\n    assert describe.get_parameter('arg').description == 'Decorator description of arg.'  # type: ignore\n    assert describe.get_parameter('arg2').description == 'Docstring description of arg2.'  # type: ignore\n\n\ndef test_descriptions_group_no_args():\n    my_group = app_commands.Group(name='mygroup', description='My group')\n\n    @my_group.command()\n    async def my_command(interaction: discord.Interaction) -> None:\n        \"\"\"Test slash command\"\"\"\n\n    assert my_command.description == 'Test slash command'\n\n\ndef test_descriptions_group_args():\n    my_group = app_commands.Group(name='mygroup', description='My group')\n\n    @my_group.command()\n    async def my_command(interaction: discord.Interaction, arg: str, arg2: int) -> None:\n        \"\"\"Test slash command\n\n        Parameters\n        ----------\n        arg: str\n            Description of arg.\n            This is the second line of the arg description.\n        arg2: int\n            Description of arg2.\n        \"\"\"\n\n    assert my_command.description == 'Test slash command'\n    assert my_command.get_parameter('arg').description == 'Description of arg. This is the second line of the arg description.'  # type: ignore\n    assert my_command.get_parameter('arg2').description == 'Description of arg2.'  # type: ignore\n\n\ndef test_descriptions_cog_commands():\n    class MyCog(commands.Cog):\n        @app_commands.command()\n        async def test(self, interaction: discord.Interaction, arg: str, arg2: int) -> None:\n            \"\"\"Test slash command\n\n            Parameters\n            ----------\n            arg: str\n                Description of arg.\n                This is the second line of the arg description.\n            arg2: int\n                Description of arg2.\n            \"\"\"\n\n    cog = MyCog()\n    assert cog.test.description == 'Test slash command'\n    assert cog.test.get_parameter('arg').description == 'Description of arg. This is the second line of the arg description.'  # type: ignore\n    assert cog.test.get_parameter('arg2').description == 'Description of arg2.'  # type: ignore\n"
  },
  {
    "path": "tests/test_app_commands_group.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom __future__ import annotations\n\nfrom discord import app_commands\nimport discord\nfrom discord.ext import commands\n\n\ndef test_group_with_commands():\n    my_group = app_commands.Group(name='mygroup', description='My group')\n\n    @my_group.command()\n    async def my_command(interaction: discord.Interaction) -> None:\n        ...\n\n    assert my_command.binding is None\n    assert my_command.parent is my_group\n    assert my_group.commands[0] is my_command\n\n\ndef test_group_subclass_with_commands():\n    class MyGroup(app_commands.Group, name='mygroup'):\n        @app_commands.command()\n        async def my_command(self, interaction: discord.Interaction) -> None:\n            ...\n\n    my_group = MyGroup()\n    assert MyGroup.__discord_app_commands_group_children__[0].parent is not my_group\n    assert my_group.my_command is not MyGroup.my_command\n    assert my_group.my_command.parent is my_group\n\n\ndef test_group_subclass_with_group():\n    class MyGroup(app_commands.Group, name='mygroup'):\n        sub_group = app_commands.Group(name='mysubgroup', description='My sub-group')\n\n        @sub_group.command()\n        async def my_command(self, interaction: discord.Interaction) -> None:\n            ...\n\n    my_group = MyGroup()\n    assert MyGroup.__discord_app_commands_group_children__[0].parent is not my_group\n    assert MyGroup.sub_group.parent is None\n    assert MyGroup.my_command.parent is MyGroup.sub_group\n    assert my_group.sub_group is not MyGroup.sub_group\n    assert my_group.my_command is not MyGroup.my_command\n    assert my_group.sub_group.parent is my_group\n    assert my_group.my_command.parent is my_group.sub_group\n    assert my_group.my_command.binding is my_group\n\n\ndef test_group_subclass_with_group_subclass():\n    class MySubGroup(app_commands.Group, name='mysubgroup'):\n        @app_commands.command()\n        async def my_sub_group_command(self, interaction: discord.Interaction) -> None:\n            ...\n\n    class MyGroup(app_commands.Group, name='mygroup'):\n        sub_group = MySubGroup()\n\n        @app_commands.command()\n        async def my_group_command(self, interaction: discord.Interaction) -> None:\n            ...\n\n    my_group = MyGroup()\n    assert MyGroup.__discord_app_commands_group_children__[0].parent is not my_group\n    assert MySubGroup.__discord_app_commands_group_children__[0].parent is not my_group.sub_group\n    assert my_group.sub_group is not MyGroup.sub_group\n    assert my_group.my_group_command is not MyGroup.my_group_command\n    assert my_group.sub_group.my_sub_group_command is not MySubGroup.my_sub_group_command\n    assert my_group.sub_group.parent is my_group\n    assert my_group.my_group_command.parent is my_group\n    assert my_group.my_group_command.binding is my_group\n    assert my_group.sub_group.my_sub_group_command.parent is my_group.sub_group\n    assert not hasattr(my_group, 'my_sub_group_command')\n    assert my_group.sub_group.my_sub_group_command.binding is my_group.sub_group\n\n\ndef test_cog_with_commands():\n    class MyCog(commands.Cog):\n        @app_commands.command()\n        async def my_command(self, interaction: discord.Interaction) -> None:\n            ...\n\n    cog = MyCog()\n    assert cog.my_command.parent is None\n    assert cog.my_command.binding is cog\n\n\ndef test_cog_with_group_with_commands():\n    class MyCog(commands.Cog):\n        my_group = app_commands.Group(name='mygroup', description='My group')\n\n        @my_group.command()\n        async def my_command(self, interaction: discord.Interaction) -> None:\n            ...\n\n    cog = MyCog()\n    assert cog.my_group is not MyCog.my_group\n    assert cog.my_command is not MyCog.my_command\n    assert cog.my_group.parent is None\n    assert cog.my_command.parent is cog.my_group\n    assert cog.my_command.binding is cog\n\n\ndef test_cog_with_nested_group_with_commands():\n    class MyCog(commands.Cog):\n        first = app_commands.Group(name='test', description='Test 1')\n        second = app_commands.Group(name='test2', parent=first, description='Test 2')\n\n        @first.command(name='cmd')\n        async def test_cmd(self, interaction: discord.Interaction) -> None:\n            ...\n\n        @second.command(name='cmd2')\n        async def test2_cmd(self, interaction: discord.Interaction) -> None:\n            ...\n\n    cog = MyCog()\n\n    assert len(MyCog.__cog_app_commands__) == 1\n    assert cog.first.parent is None\n    assert cog.first is not MyCog.first\n    assert cog.second is not MyCog.second\n    assert cog.second.parent is cog.first\n    assert cog.test_cmd.parent is cog.first\n    assert cog.test2_cmd.parent is cog.second\n    assert cog.test_cmd.binding is cog\n    assert cog.test2_cmd.binding is cog\n\n\ndef test_cog_with_group_subclass_with_commands():\n    class MyGroup(app_commands.Group, name='mygroup'):\n        @app_commands.command()\n        async def my_command(self, interaction: discord.Interaction) -> None:\n            ...\n\n    class MyCog(commands.Cog):\n        my_group = MyGroup()\n\n        @my_group.command()\n        async def my_cog_command(self, interaction: discord.Interaction) -> None:\n            ...\n\n    cog = MyCog()\n    assert MyGroup.__discord_app_commands_group_children__[0].parent is not cog.my_group\n    assert cog.my_group is not MyCog.my_group\n    assert cog.my_group.my_command is not MyGroup.my_command\n    assert cog.my_cog_command is not MyCog.my_cog_command\n    assert not hasattr(cog.my_group, 'my_cog_command')\n    assert cog.my_group.parent is None\n    assert cog.my_group.my_command.parent is cog.my_group\n    assert cog.my_group.my_command.binding is cog.my_group\n    assert cog.my_cog_command.parent is cog.my_group\n    assert cog.my_cog_command.binding is cog\n\n\ndef test_cog_with_group_subclass_with_group():\n    class MyGroup(app_commands.Group, name='mygroup'):\n        sub_group = app_commands.Group(name='mysubgroup', description='My sub-group')\n\n        @sub_group.command()\n        async def my_command(self, interaction: discord.Interaction) -> None:\n            ...\n\n    class MyCog(commands.Cog):\n        my_group = MyGroup()\n\n        @my_group.command()\n        async def my_cog_command(self, interaction: discord.Interaction) -> None:\n            ...\n\n    cog = MyCog()\n    assert MyGroup.__discord_app_commands_group_children__[0].parent is not cog.my_group\n    assert cog.my_group is not MyCog.my_group\n    assert cog.my_group.sub_group is not MyGroup.sub_group\n    assert cog.my_group.my_command is not MyGroup.my_command\n    assert cog.my_cog_command is not MyCog.my_cog_command\n    assert not hasattr(cog.my_group, 'my_cog_command')\n    assert not hasattr(cog, 'sub_group')\n    assert not hasattr(cog, 'my_command')\n    assert cog.my_group.parent is None\n    assert cog.my_group.sub_group.parent is cog.my_group\n    assert cog.my_group.my_command.parent is cog.my_group.sub_group\n    assert cog.my_group.my_command.binding is cog.my_group\n    assert cog.my_cog_command.parent is cog.my_group\n    assert cog.my_cog_command.binding is cog\n\n\ndef test_cog_with_group_subclass_with_group_subclass():\n    class MySubGroup(app_commands.Group, name='mysubgroup'):\n        @app_commands.command()\n        async def my_sub_group_command(self, interaction: discord.Interaction) -> None:\n            ...\n\n    class MyGroup(app_commands.Group, name='mygroup'):\n        sub_group = MySubGroup()\n\n        @app_commands.command()\n        async def my_group_command(self, interaction: discord.Interaction) -> None:\n            ...\n\n    class MyCog(commands.Cog):\n        my_group = MyGroup()\n\n        @my_group.command()\n        async def my_cog_command(self, interaction: discord.Interaction) -> None:\n            ...\n\n        @my_group.sub_group.command()\n        async def my_sub_group_cog_command(self, interaction: discord.Interaction) -> None:\n            ...\n\n    cog = MyCog()\n    assert MyGroup.__discord_app_commands_group_children__[0].parent is not cog.my_group\n    assert MySubGroup.__discord_app_commands_group_children__[0].parent is not cog.my_group.sub_group\n    assert cog.my_group is not MyCog.my_group\n    assert cog.my_group.my_group_command is not MyCog.my_group.my_group_command\n    assert cog.my_group.sub_group is not MyGroup.sub_group\n    assert cog.my_cog_command is not MyCog.my_cog_command\n    assert not hasattr(cog.my_group, 'my_cog_command')\n    assert not hasattr(cog, 'sub_group')\n    assert not hasattr(cog, 'my_group_command')\n    assert not hasattr(cog, 'my_sub_group_command')\n    assert not hasattr(cog.my_group, 'my_sub_group_command')\n    assert cog.my_group.sub_group.my_sub_group_command is not MyGroup.sub_group.my_sub_group_command\n    assert cog.my_group.sub_group.my_sub_group_command is not MySubGroup.my_sub_group_command\n    assert cog.my_group.sub_group.parent is cog.my_group\n    assert cog.my_group.my_group_command.parent is cog.my_group\n    assert cog.my_group.my_group_command.binding is cog.my_group\n    assert cog.my_group.sub_group.my_sub_group_command.parent is cog.my_group.sub_group\n    assert cog.my_group.sub_group.my_sub_group_command.binding is cog.my_group.sub_group\n    assert cog.my_cog_command.parent is cog.my_group\n    assert cog.my_cog_command.binding is cog\n    assert cog.my_sub_group_cog_command.parent is cog.my_group.sub_group\n    assert cog.my_sub_group_cog_command.binding is cog\n\n\ndef test_cog_group_with_commands():\n    class MyCog(commands.GroupCog):\n        @app_commands.command()\n        async def my_command(self, interaction: discord.Interaction) -> None:\n            ...\n\n    cog = MyCog()\n    assert MyCog.__cog_app_commands__[0].parent is not cog\n    assert MyCog.__cog_app_commands__[0].parent is not cog.__cog_app_commands_group__\n    assert cog.my_command is not MyCog.my_command\n    assert cog.__cog_app_commands_group__ is not None\n    assert cog.__cog_app_commands_group__.parent is None\n    assert cog.my_command.parent is cog.__cog_app_commands_group__\n\n\ndef test_cog_group_with_group():\n    class MyCog(commands.GroupCog):\n        sub_group = app_commands.Group(name='mysubgroup', description='My sub-group')\n\n        @sub_group.command()\n        async def my_command(self, interaction: discord.Interaction) -> None:\n            ...\n\n    cog = MyCog()\n    assert MyCog.__cog_app_commands__[0].parent is not cog\n    assert MyCog.__cog_app_commands__[0].parent is not cog.__cog_app_commands_group__\n    assert cog.sub_group is not MyCog.sub_group\n    assert cog.my_command is not MyCog.my_command\n    assert cog.__cog_app_commands_group__ is not None\n    assert cog.__cog_app_commands_group__.parent is None\n    assert cog.sub_group.parent is cog.__cog_app_commands_group__\n    assert cog.my_command.parent is cog.sub_group\n\n\ndef test_cog_group_with_subclass_group():\n    class MyGroup(app_commands.Group, name='mygroup'):\n        @app_commands.command()\n        async def my_command(self, interaction: discord.Interaction) -> None:\n            ...\n\n    class MyCog(commands.GroupCog):\n        sub_group = MyGroup()\n\n        @sub_group.command()\n        async def my_cog_command(self, interaction: discord.Interaction) -> None:\n            ...\n\n    cog = MyCog()\n    assert MyCog.__cog_app_commands__[0].parent is not cog\n    assert MyCog.__cog_app_commands__[0].parent is not cog.__cog_app_commands_group__\n    assert MyGroup.__discord_app_commands_group_children__[0].parent is not cog.sub_group\n    assert cog.sub_group is not MyCog.sub_group\n    assert cog.sub_group.my_command is not MyGroup.my_command\n    assert cog.my_cog_command is not MyCog.my_cog_command\n    assert not hasattr(cog.sub_group, 'my_cog_command')\n    assert cog.__cog_app_commands_group__ is not None\n    assert cog.__cog_app_commands_group__.parent is None\n    assert cog.sub_group.parent is cog.__cog_app_commands_group__\n    assert cog.sub_group.my_command.parent is cog.sub_group\n    assert cog.my_cog_command.parent is cog.sub_group\n    assert cog.my_cog_command.binding is cog\n\n\ndef test_cog_group_with_subclassed_subclass_group():\n    class MyGroup(app_commands.Group):\n        @app_commands.command()\n        async def my_command(self, interaction: discord.Interaction) -> None:\n            ...\n\n    class MySubclassedGroup(MyGroup, name='mygroup'):\n        ...\n\n    class MyCog(commands.GroupCog):\n        sub_group = MySubclassedGroup()\n\n        @sub_group.command()\n        async def my_cog_command(self, interaction: discord.Interaction) -> None:\n            ...\n\n    cog = MyCog()\n    assert MyCog.__cog_app_commands__[0].parent is not cog\n    assert MyCog.__cog_app_commands__[0].parent is not cog.__cog_app_commands_group__\n    assert MyGroup.__discord_app_commands_group_children__[0].parent is not cog.sub_group\n    assert MySubclassedGroup.__discord_app_commands_group_children__[0].parent is not cog.sub_group\n    assert cog.sub_group is not MyCog.sub_group\n    assert cog.sub_group.my_command is not MyGroup.my_command\n    assert cog.sub_group.my_command is not MySubclassedGroup.my_command\n    assert cog.my_cog_command is not MyCog.my_cog_command\n    assert not hasattr(cog.sub_group, 'my_cog_command')\n    assert cog.__cog_app_commands_group__ is not None\n    assert cog.__cog_app_commands_group__.parent is None\n    assert cog.sub_group.parent is cog.__cog_app_commands_group__\n    assert cog.sub_group.my_command.parent is cog.sub_group\n    assert cog.my_cog_command.parent is cog.sub_group\n    assert cog.my_cog_command.binding is cog\n\n\ndef test_cog_group_with_custom_state_issue9383():\n    class InnerGroup(app_commands.Group):\n        def __init__(self):\n            super().__init__()\n            self.state: int = 20\n\n        @app_commands.command()\n        async def my_command(self, interaction: discord.Interaction) -> None:\n            ...\n\n    class MyCog(commands.GroupCog):\n        inner = InnerGroup()\n\n        @app_commands.command()\n        async def my_regular_command(self, interaction: discord.Interaction) -> None:\n            ...\n\n        @inner.command()\n        async def my_inner_command(self, interaction: discord.Interaction) -> None:\n            ...\n\n    cog = MyCog()\n    assert cog.inner.state == 20\n    assert cog.my_regular_command is not MyCog.my_regular_command\n\n    # Basically the same tests as above... (superset?)\n    assert MyCog.__cog_app_commands__[0].parent is not cog\n    assert MyCog.__cog_app_commands__[0].parent is not cog.__cog_app_commands_group__\n    assert InnerGroup.__discord_app_commands_group_children__[0].parent is not cog.inner\n    assert InnerGroup.__discord_app_commands_group_children__[0].parent is not cog.inner\n    assert cog.inner is not MyCog.inner\n    assert cog.inner.my_command is not InnerGroup.my_command\n    assert cog.inner.my_command is not InnerGroup.my_command\n    assert cog.my_inner_command is not MyCog.my_inner_command\n    assert not hasattr(cog.inner, 'my_inner_command')\n    assert cog.__cog_app_commands_group__ is not None\n    assert cog.__cog_app_commands_group__.parent is None\n    assert cog.inner.parent is cog.__cog_app_commands_group__\n    assert cog.inner.my_command.parent is cog.inner\n    assert cog.my_inner_command.parent is cog.inner\n    assert cog.my_inner_command.binding is cog\n\n\ndef test_cog_hybrid_group_manual_command():\n    class MyCog(commands.Cog):\n        @commands.hybrid_group()\n        async def first(self, ctx: commands.Context) -> None:\n            ...\n\n        @first.command(name='both')\n        async def second_both(self, ctx: commands.Context) -> None:\n            ...\n\n        @first.app_command.command(name='second')\n        async def second_app(self, interaction: discord.Interaction) -> None:\n            ...\n\n    client = discord.Client(intents=discord.Intents.default())\n    tree = app_commands.CommandTree(client)\n\n    cog = MyCog()\n    tree.add_command(cog.first.app_command)\n\n    assert cog.first is not MyCog.first\n    assert cog.second_both is not MyCog.second_both\n    assert cog.second_app is not MyCog.second_app\n    assert cog.first.parent is None\n    assert cog.second_both.parent is cog.first\n    assert cog.second_app.parent is cog.first.app_command\n    assert cog.second_app.binding is cog\n    assert tree.get_command('first') is cog.first.app_command\n\n    first = tree.get_command('first')\n    assert isinstance(first, app_commands.Group)\n    both = first.get_command('both')\n    assert isinstance(both, app_commands.Command)\n    assert both.parent is first\n    assert both.binding is cog\n\n    second = first.get_command('second')\n    assert isinstance(second, app_commands.Command)\n    assert second.parent is first\n    assert second.binding is cog\n\n\ndef test_cog_hybrid_group_manual_nested_command():\n    class MyCog(commands.Cog):\n        @commands.hybrid_group()\n        async def first(self, ctx: commands.Context) -> None:\n            pass\n\n        @first.group()\n        async def second(self, ctx: commands.Context) -> None:\n            pass\n\n        @second.app_command.command()\n        async def third(self, interaction: discord.Interaction) -> None:\n            pass\n\n    client = discord.Client(intents=discord.Intents.default())\n    tree = app_commands.CommandTree(client)\n\n    cog = MyCog()\n    tree.add_command(cog.first.app_command)\n\n    assert cog.first is not MyCog.first\n    assert cog.second is not MyCog.second\n    assert cog.third is not MyCog.third\n    assert cog.first.parent is None\n    assert cog.second.parent is cog.first\n    assert cog.third.parent is cog.second.app_command\n    assert cog.third.binding is cog\n\n    first = tree.get_command('first')\n    assert isinstance(first, app_commands.Group)\n\n    second = first.get_command('second')\n    assert isinstance(second, app_commands.Group)\n\n    third = second.get_command('third')\n    assert isinstance(third, app_commands.Command)\n    assert third.parent is second\n    assert third.binding is cog\n\n\ndef test_cog_hybrid_group_wrapped_instance():\n    class MyCog(commands.Cog):\n        @commands.hybrid_group(fallback='fallback')\n        async def first(self, ctx: commands.Context) -> None:\n            pass\n\n        @first.command()\n        async def second(self, ctx: commands.Context) -> None:\n            pass\n\n        @first.group()\n        async def nested(self, ctx: commands.Context) -> None:\n            pass\n\n        @nested.app_command.command()\n        async def child(self, interaction: discord.Interaction) -> None:\n            pass\n\n    cog = MyCog()\n\n    fallback = cog.first.app_command.get_command('fallback')\n    assert fallback is not None\n    assert getattr(fallback, 'wrapped', None) is cog.first\n    assert fallback.parent is cog.first.app_command\n    assert cog.second.app_command is not None\n    assert cog.second.app_command.wrapped is cog.second\n"
  },
  {
    "path": "tests/test_app_commands_invoke.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\nfrom __future__ import annotations\n\n\nfrom functools import wraps\nimport pytest\nfrom typing import Awaitable, TYPE_CHECKING, Callable, Coroutine, Optional, TypeVar, Any, Type, List, Union\n\nimport discord\n\nif TYPE_CHECKING:\n\n    from typing_extensions import ParamSpec\n    from discord.types.interactions import (\n        ApplicationCommandInteraction as ApplicationCommandInteractionPayload,\n        ChatInputApplicationCommandInteractionData as ChatInputApplicationCommandInteractionDataPayload,\n        ApplicationCommandInteractionDataOption as ApplicationCommandInteractionDataOptionPayload,\n    )\n\n    P = ParamSpec('P')\n\n\nT = TypeVar('T')\n\n\nclass MockCommandInteraction(discord.Interaction):\n    @classmethod\n    def _get_command_options(cls, **options: str) -> List[ApplicationCommandInteractionDataOptionPayload]:\n        return [\n            {\n                'type': discord.AppCommandOptionType.string.value,\n                'name': name,\n                'value': value,\n            }\n            for name, value in options.items()\n        ]\n\n    @classmethod\n    def _get_command_data(\n        cls,\n        command: Union[discord.app_commands.Command[Any, ..., Any], discord.app_commands.Group],\n        options: List[ApplicationCommandInteractionDataOptionPayload],\n    ) -> ChatInputApplicationCommandInteractionDataPayload:\n\n        data: Union[ChatInputApplicationCommandInteractionDataPayload, ApplicationCommandInteractionDataOptionPayload] = {\n            'type': discord.AppCommandType.chat_input.value,\n            'name': command.name,\n            'options': options,\n        }\n\n        if command.parent is None:\n            data['id'] = hash(command)  # type: ignore # narrowing isn't possible\n            return data  # type: ignore # see above\n        else:\n            return cls._get_command_data(command.parent, [data])\n\n    def __init__(\n        self,\n        client: discord.Client,\n        command: discord.app_commands.Command[Any, ..., Any],\n        **options: str,\n    ) -> None:\n\n        data: ApplicationCommandInteractionPayload = {\n            \"id\": 0,\n            \"application_id\": 0,\n            \"token\": \"\",\n            \"version\": 1,\n            \"type\": 2,\n            \"data\": self._get_command_data(command, self._get_command_options(**options)),\n        }\n        super().__init__(data=data, state=client._connection)\n\n\nclient = discord.Client(intents=discord.Intents.default())\n\n\nclass MockTree(discord.app_commands.CommandTree):\n    last_exception: Optional[discord.app_commands.AppCommandError]\n\n    async def _call(self, interaction: discord.Interaction) -> None:\n        self.last_exception = None\n        return await super()._call(interaction)\n\n    async def on_error(self, interaction: discord.Interaction, error: discord.app_commands.AppCommandError) -> None:\n        self.last_exception = error\n\n\ntree = MockTree(client)\n\n\n@tree.command()\nasync def test_command(interaction: discord.Interaction, foo: str) -> None:\n    pass\n\n\ndef wrapper(func: Callable[P, Awaitable[T]]) -> Callable[P, Coroutine[Any, Any, T]]:\n    @wraps(func)\n    async def deco(*args: P.args, **kwargs: P.kwargs) -> T:\n        return await func(*args, **kwargs)\n\n    return deco\n\n\n@tree.command()\n@wrapper\nasync def test_wrapped_command(interaction: discord.Interaction, foo: str) -> None:\n    pass\n\n\n@tree.command()\nasync def test_command_raises(interaction: discord.Interaction, foo: str) -> None:\n    raise TypeError\n\n\n@tree.command()\n@wrapper\nasync def test_wrapped_command_raises(interaction: discord.Interaction, foo: str) -> None:\n    raise TypeError\n\n\ngroup = discord.app_commands.Group(name='group', description='...')\ntest_subcommand = group.command()(test_command.callback)\ntest_wrapped_subcommand = group.command()(test_wrapped_command.callback)\ntest_subcommand_raises = group.command()(test_command_raises.callback)\ntest_wrapped_subcommand_raises = group.command()(test_wrapped_command_raises.callback)\ntree.add_command(group)\n\n\n@pytest.mark.parametrize(\n    ('command', 'raises'),\n    [\n        (test_command, None),\n        (test_wrapped_command, None),\n        (test_command_raises, TypeError),\n        (test_wrapped_command_raises, TypeError),\n        (test_subcommand, None),\n        (test_wrapped_subcommand, None),\n        (test_subcommand_raises, TypeError),\n        (test_wrapped_subcommand_raises, TypeError),\n    ],\n)\n@pytest.mark.asyncio\nasync def test_valid_command_invoke(\n    command: discord.app_commands.Command[Any, ..., Any], raises: Optional[Type[BaseException]]\n):\n    interaction = MockCommandInteraction(client, command, foo='foo')\n    await tree._call(interaction)\n\n    if raises is None:\n        assert tree.last_exception is None\n    else:\n        assert isinstance(tree.last_exception, discord.app_commands.CommandInvokeError)\n        assert isinstance(tree.last_exception.original, raises)\n\n\n@pytest.mark.parametrize(\n    ('command',),\n    [\n        (test_command,),\n        (test_wrapped_command,),\n        (test_command_raises,),\n        (test_wrapped_command_raises,),\n        (test_subcommand,),\n        (test_subcommand_raises,),\n        (test_wrapped_subcommand,),\n        (test_wrapped_subcommand_raises,),\n    ],\n)\n@pytest.mark.asyncio\nasync def test_invalid_command_invoke(command: discord.app_commands.Command[Any, ..., Any]):\n    interaction = MockCommandInteraction(client, command, bar='bar')\n    await tree._call(interaction)\n\n    assert isinstance(tree.last_exception, discord.app_commands.CommandSignatureMismatch)\n"
  },
  {
    "path": "tests/test_colour.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom __future__ import annotations\n\nimport discord\nimport pytest\n\n\n@pytest.mark.parametrize(\n    ('value', 'expected'),\n    [\n        ('0xFF1294', 0xFF1294),\n        ('0xff1294', 0xFF1294),\n        ('0xFFF', 0xFFFFFF),\n        ('0xfff', 0xFFFFFF),\n        ('#abcdef', 0xABCDEF),\n        ('#ABCDEF', 0xABCDEF),\n        ('#ABC', 0xAABBCC),\n        ('#abc', 0xAABBCC),\n        ('rgb(68,36,59)', 0x44243B),\n        ('rgb(26.7%, 14.1%, 23.1%)', 0x44243B),\n        ('rgb(20%, 24%, 56%)', 0x333D8F),\n        ('rgb(20%, 23.9%, 56.1%)', 0x333D8F),\n        ('rgb(51, 61, 143)', 0x333D8F),\n    ],\n)\ndef test_from_str(value, expected):\n    assert discord.Colour.from_str(value) == discord.Colour(expected)\n\n\n@pytest.mark.parametrize(\n    ('value'),\n    [\n        'not valid',\n        '0xYEAH',\n        '#YEAH',\n        '#yeah',\n        'yellow',\n        'rgb(-10, -20, -30)',\n        'rgb(30, -1, 60)',\n        'invalid(a, b, c)',\n        'rgb(',\n    ],\n)\ndef test_from_str_failures(value):\n    with pytest.raises(ValueError):\n        discord.Colour.from_str(value)\n"
  },
  {
    "path": "tests/test_ext_commands_cog.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom __future__ import annotations\n\nfrom collections.abc import Coroutine\nfrom typing import Any, Type\nfrom unittest.mock import AsyncMock\n\nimport discord\nfrom discord import app_commands\nfrom discord.ext import commands\nimport pytest\n\n\n@pytest.fixture\ndef mock_bot() -> object:\n    return object()\n\n\n@pytest.fixture\ndef mock_interaction() -> object:\n    return object()\n\n\n@pytest.fixture\ndef mock_on_group_error_handler() -> AsyncMock:\n    return AsyncMock()\n\n\n@pytest.fixture\ndef mock_on_sub_group_error_handler() -> AsyncMock:\n    return AsyncMock()\n\n\n@pytest.fixture\ndef sub_group_class() -> Type[app_commands.Group]:\n    class MySubGroup(app_commands.Group):\n        @app_commands.command()\n        async def my_sub_group_command(self, interaction: discord.Interaction) -> None:\n            ...\n\n    return MySubGroup\n\n\n@pytest.fixture\ndef sub_group_with_handler_class(mock_on_sub_group_error_handler: AsyncMock) -> Type[app_commands.Group]:\n    class MySubGroup(app_commands.Group):\n        @app_commands.command()\n        async def my_sub_group_command(self, interaction: discord.Interaction) -> None:\n            ...\n\n        def on_error(\n            self,\n            interaction: discord.Interaction,\n            error: app_commands.AppCommandError,\n        ) -> Coroutine[Any, Any, None]:\n            return mock_on_sub_group_error_handler(self, interaction, error)\n\n    return MySubGroup\n\n\n@pytest.fixture\ndef group_class(sub_group_class: Type[app_commands.Group]) -> Type[app_commands.Group]:\n    class MyGroup(app_commands.Group):\n        my_sub_group = sub_group_class()\n\n        @app_commands.command()\n        async def my_group_command(self, interaction: discord.Interaction) -> None:\n            ...\n\n    return MyGroup\n\n\n@pytest.fixture\ndef group_with_handler_class(\n    sub_group_class: Type[app_commands.Group], mock_on_group_error_handler: AsyncMock\n) -> Type[app_commands.Group]:\n    class MyGroupWithHandler(app_commands.Group):\n        my_sub_group = sub_group_class()\n\n        @app_commands.command()\n        async def my_group_command(self, interaction: discord.Interaction) -> None:\n            ...\n\n        def on_error(\n            self,\n            interaction: discord.Interaction,\n            error: app_commands.AppCommandError,\n        ) -> Coroutine[Any, Any, None]:\n            return mock_on_group_error_handler(self, interaction, error)\n\n    return MyGroupWithHandler\n\n\n@pytest.fixture\ndef group_with_handler_and_sub_group_handler_class(\n    sub_group_with_handler_class: Type[app_commands.Group], mock_on_group_error_handler: AsyncMock\n) -> Type[app_commands.Group]:\n    class MyGroupWithHandler(app_commands.Group):\n        my_sub_group = sub_group_with_handler_class()\n\n        @app_commands.command()\n        async def my_group_command(self, interaction: discord.Interaction) -> None:\n            ...\n\n        def on_error(\n            self,\n            interaction: discord.Interaction,\n            error: app_commands.AppCommandError,\n        ) -> Coroutine[Any, Any, None]:\n            return mock_on_group_error_handler(self, interaction, error)\n\n    return MyGroupWithHandler\n\n\nclass TestCog:\n    @pytest.mark.asyncio\n    async def test_cog_app_command_error_from_command(\n        self,\n        mock_bot: commands.Bot,\n        mock_interaction: discord.Interaction,\n    ) -> None:\n        on_error = AsyncMock()\n        error = app_commands.CheckFailure()\n\n        class MyCog(commands.Cog):\n            @app_commands.command()\n            async def my_command(self, interaction: discord.Interaction) -> None:\n                ...\n\n            def cog_app_command_error(\n                self,\n                interaction: discord.Interaction,\n                error: app_commands.AppCommandError,\n            ) -> Coroutine[Any, Any, None]:\n                return on_error(self, interaction, error)\n\n        cog = MyCog(mock_bot)\n\n        await cog.my_command._invoke_error_handlers(mock_interaction, error)\n        on_error.assert_awaited_once_with(cog, mock_interaction, error)\n\n    @pytest.mark.asyncio\n    async def test_cog_app_command_error_from_command_with_error_handler(\n        self,\n        mock_bot: commands.Bot,\n        mock_interaction: discord.Interaction,\n    ) -> None:\n        on_error = AsyncMock()\n        on_command_error = AsyncMock()\n        error = app_commands.CheckFailure()\n\n        class MyCog(commands.Cog):\n            @app_commands.command()\n            async def my_command(self, interaction: discord.Interaction) -> None:\n                ...\n\n            @my_command.error\n            async def on_my_command_with_handler_error(\n                self,\n                interaction: discord.Interaction,\n                error: app_commands.AppCommandError,\n            ) -> None:\n                await on_command_error(self, interaction, error)\n\n            def cog_app_command_error(\n                self,\n                interaction: discord.Interaction,\n                error: app_commands.AppCommandError,\n            ) -> Coroutine[Any, Any, None]:\n                return on_error(self, interaction, error)\n\n        cog = MyCog(mock_bot)\n\n        await cog.my_command._invoke_error_handlers(mock_interaction, error)\n        on_command_error.assert_awaited_once_with(cog, mock_interaction, error)\n        on_error.assert_awaited_once_with(cog, mock_interaction, error)\n\n    @pytest.mark.asyncio\n    async def test_cog_app_command_error_from_group(\n        self,\n        mock_bot: commands.Bot,\n        mock_interaction: discord.Interaction,\n        group_class: Type[app_commands.Group],\n    ) -> None:\n        on_error = AsyncMock()\n        error = app_commands.CheckFailure()\n\n        class MyCog(commands.Cog):\n            my_group = group_class()\n\n            def cog_app_command_error(\n                self,\n                interaction: discord.Interaction,\n                error: app_commands.AppCommandError,\n            ) -> Coroutine[Any, Any, None]:\n                return on_error(self, interaction, error)\n\n        cog = MyCog(mock_bot)\n\n        await cog.my_group.my_group_command._invoke_error_handlers(mock_interaction, error)  # type: ignore\n        on_error.assert_awaited_once_with(cog, mock_interaction, error)\n\n    @pytest.mark.asyncio\n    async def test_cog_app_command_error_from_sub_group(\n        self,\n        mock_bot: commands.Bot,\n        mock_interaction: discord.Interaction,\n        group_class: Type[app_commands.Group],\n    ) -> None:\n        on_error = AsyncMock()\n        error = app_commands.CheckFailure()\n\n        class MyCog(commands.Cog):\n            my_group = group_class()\n\n            def cog_app_command_error(\n                self,\n                interaction: discord.Interaction,\n                error: app_commands.AppCommandError,\n            ) -> Coroutine[Any, Any, None]:\n                return on_error(self, interaction, error)\n\n        cog = MyCog(mock_bot)\n\n        await cog.my_group.my_sub_group.my_sub_group_command._invoke_error_handlers(mock_interaction, error)  # type: ignore\n        on_error.assert_awaited_once_with(cog, mock_interaction, error)\n\n    @pytest.mark.asyncio\n    async def test_cog_app_command_error_from_group_with_handler(\n        self,\n        mock_bot: commands.Bot,\n        mock_interaction: discord.Interaction,\n        mock_on_group_error_handler: AsyncMock,\n        group_with_handler_class: Type[app_commands.Group],\n    ) -> None:\n        on_error = AsyncMock()\n        error = app_commands.CheckFailure()\n\n        class MyCog(commands.Cog):\n            my_group = group_with_handler_class()\n\n            def cog_app_command_error(\n                self,\n                interaction: discord.Interaction,\n                error: app_commands.AppCommandError,\n            ) -> Coroutine[Any, Any, None]:\n                return on_error(self, interaction, error)\n\n        cog = MyCog(mock_bot)\n\n        await cog.my_group.my_group_command._invoke_error_handlers(mock_interaction, error)  # type: ignore\n        mock_on_group_error_handler.assert_awaited_once_with(cog.my_group, mock_interaction, error)\n        on_error.assert_awaited_once_with(cog, mock_interaction, error)\n\n    @pytest.mark.asyncio\n    async def test_cog_app_command_error_from_sub_group_with_parent_handler(\n        self,\n        mock_bot: commands.Bot,\n        mock_interaction: discord.Interaction,\n        mock_on_group_error_handler: AsyncMock,\n        group_with_handler_class: Type[app_commands.Group],\n    ) -> None:\n        on_error = AsyncMock()\n        error = app_commands.CheckFailure()\n\n        class MyCog(commands.Cog):\n            my_group = group_with_handler_class()\n\n            def cog_app_command_error(\n                self,\n                interaction: discord.Interaction,\n                error: app_commands.AppCommandError,\n            ) -> Coroutine[Any, Any, None]:\n                return on_error(self, interaction, error)\n\n        cog = MyCog(mock_bot)\n\n        await cog.my_group.my_sub_group.my_sub_group_command._invoke_error_handlers(mock_interaction, error)  # type: ignore\n        mock_on_group_error_handler.assert_awaited_once_with(cog.my_group, mock_interaction, error)\n        on_error.assert_awaited_once_with(cog, mock_interaction, error)\n\n    @pytest.mark.asyncio\n    async def test_cog_app_command_error_from_sub_group_with_handler_and_parent_handler(\n        self,\n        mock_bot: commands.Bot,\n        mock_interaction: discord.Interaction,\n        mock_on_group_error_handler: AsyncMock,\n        mock_on_sub_group_error_handler: AsyncMock,\n        group_with_handler_and_sub_group_handler_class: Type[app_commands.Group],\n    ) -> None:\n        on_error = AsyncMock()\n        error = app_commands.CheckFailure()\n\n        class MyCog(commands.Cog):\n            my_group = group_with_handler_and_sub_group_handler_class()\n\n            def cog_app_command_error(\n                self,\n                interaction: discord.Interaction,\n                error: app_commands.AppCommandError,\n            ) -> Coroutine[Any, Any, None]:\n                return on_error(self, interaction, error)\n\n        cog = MyCog(mock_bot)\n\n        await cog.my_group.my_sub_group.my_sub_group_command._invoke_error_handlers(mock_interaction, error)  # type: ignore\n        mock_on_sub_group_error_handler.assert_awaited_once_with(cog.my_group.my_sub_group, mock_interaction, error)  # type: ignore\n        mock_on_group_error_handler.assert_awaited_once_with(cog.my_group, mock_interaction, error)\n        on_error.assert_awaited_once_with(cog, mock_interaction, error)\n\n\nclass TestGroupCog:\n    @pytest.mark.asyncio\n    async def test_cog_app_command_error_from_command(\n        self,\n        mock_bot: commands.Bot,\n        mock_interaction: discord.Interaction,\n    ) -> None:\n        on_error = AsyncMock()\n        error = app_commands.CheckFailure()\n\n        class MyCog(commands.GroupCog):\n            @app_commands.command()\n            async def my_command(self, interaction: discord.Interaction) -> None:\n                ...\n\n            def cog_app_command_error(\n                self,\n                interaction: discord.Interaction,\n                error: app_commands.AppCommandError,\n            ) -> Coroutine[Any, Any, None]:\n                return on_error(self, interaction, error)\n\n        cog = MyCog(mock_bot)\n\n        await cog.my_command._invoke_error_handlers(mock_interaction, error)\n        on_error.assert_awaited_once_with(cog, mock_interaction, error)\n\n    @pytest.mark.asyncio\n    async def test_cog_app_command_error_from_command_with_error_handler(\n        self,\n        mock_bot: commands.Bot,\n        mock_interaction: discord.Interaction,\n    ) -> None:\n        on_error = AsyncMock()\n        on_command_error = AsyncMock()\n        error = app_commands.CheckFailure()\n\n        class MyCog(commands.GroupCog):\n            @app_commands.command()\n            async def my_command(self, interaction: discord.Interaction) -> None:\n                ...\n\n            @my_command.error\n            async def on_my_command_with_handler_error(\n                self,\n                interaction: discord.Interaction,\n                error: app_commands.AppCommandError,\n            ) -> None:\n                await on_command_error(self, interaction, error)\n\n            def cog_app_command_error(\n                self,\n                interaction: discord.Interaction,\n                error: app_commands.AppCommandError,\n            ) -> Coroutine[Any, Any, None]:\n                return on_error(self, interaction, error)\n\n        cog = MyCog(mock_bot)\n\n        await cog.my_command._invoke_error_handlers(mock_interaction, error)\n        on_command_error.assert_awaited_once_with(cog, mock_interaction, error)\n        on_error.assert_awaited_once_with(cog, mock_interaction, error)\n\n    @pytest.mark.asyncio\n    async def test_cog_app_command_error_from_sub_group(\n        self,\n        mock_bot: commands.Bot,\n        mock_interaction: discord.Interaction,\n        sub_group_class: Type[app_commands.Group],\n    ) -> None:\n        on_error = AsyncMock()\n        error = app_commands.CheckFailure()\n\n        class MyCog(commands.GroupCog):\n            my_sub_group = sub_group_class()\n\n            def cog_app_command_error(\n                self,\n                interaction: discord.Interaction,\n                error: app_commands.AppCommandError,\n            ) -> Coroutine[Any, Any, None]:\n                return on_error(self, interaction, error)\n\n        cog = MyCog(mock_bot)\n\n        await cog.my_sub_group.my_sub_group_command._invoke_error_handlers(mock_interaction, error)  # type: ignore\n        on_error.assert_awaited_once_with(cog, mock_interaction, error)\n\n    @pytest.mark.asyncio\n    async def test_cog_app_command_error_from_sub_group_with_handler(\n        self,\n        mock_bot: commands.Bot,\n        mock_interaction: discord.Interaction,\n        mock_on_sub_group_error_handler: AsyncMock,\n        sub_group_with_handler_class: Type[app_commands.Group],\n    ) -> None:\n        on_error = AsyncMock()\n        error = app_commands.CheckFailure()\n\n        class MyCog(commands.GroupCog):\n            my_sub_group = sub_group_with_handler_class()\n\n            def cog_app_command_error(\n                self,\n                interaction: discord.Interaction,\n                error: app_commands.AppCommandError,\n            ) -> Coroutine[Any, Any, None]:\n                return on_error(self, interaction, error)\n\n        cog = MyCog(mock_bot)\n\n        await cog.my_sub_group.my_sub_group_command._invoke_error_handlers(mock_interaction, error)  # type: ignore\n        mock_on_sub_group_error_handler.assert_awaited_once_with(cog.my_sub_group, mock_interaction, error)\n        on_error.assert_awaited_once_with(cog, mock_interaction, error)\n"
  },
  {
    "path": "tests/test_ext_commands_description.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom __future__ import annotations\n\nfrom discord.ext import commands\n\n\ndef test_ext_commands_descriptions_explicit():\n    @commands.command(help='This is the short description that will appear.')\n    async def describe(\n        ctx: commands.Context,\n        arg: str = commands.param(description='Description of arg.'),\n        arg2: int = commands.param(description='Description of arg2.'),\n    ) -> None:\n        ...\n\n    assert describe.help == 'This is the short description that will appear.'\n    assert describe.clean_params['arg'].description == 'Description of arg.'\n    assert describe.clean_params['arg2'].description == 'Description of arg2.'\n\n\ndef test_ext_commands_descriptions_no_args():\n    @commands.command()\n    async def no_args(ctx: commands.Context) -> None:\n        \"\"\"This is the short description that will appear.\"\"\"\n\n    assert no_args.help == 'This is the short description that will appear.'\n\n\ndef test_ext_commands_descriptions_numpy():\n    @commands.command()\n    async def numpy(ctx: commands.Context, arg: str, arg2: int) -> None:\n        \"\"\"This is the short description that will appear.\n\n        This extended description will also appear in the command description.\n\n        Parameters\n        ----------\n        arg: str\n            Docstring description of arg.\n            This is the second line of the arg docstring.\n        arg2: int\n            Docstring description of arg2.\n        \"\"\"\n\n    assert (\n        numpy.help\n        == 'This is the short description that will appear.\\nThis extended description will also appear in the command description.'\n    )\n    assert (\n        numpy.clean_params['arg'].description\n        == 'Docstring description of arg. This is the second line of the arg docstring.'\n    )\n    assert numpy.clean_params['arg2'].description == 'Docstring description of arg2.'\n\n\ndef test_ext_commands_descriptions_numpy_extras():\n    @commands.command()\n    async def numpy(ctx: commands.Context, arg: str, arg2: int) -> None:\n        \"\"\"This is the short description that will appear.\n\n        This extended description will also appear in the command description.\n\n        Parameters\n        ----------\n        ctx: commands.Context\n            The interaction object.\n        arg: str\n            Docstring description of arg.\n            This is the second line of the arg docstring.\n        arg2: int\n            Docstring description of arg2.\n\n        Returns\n        -------\n        NoneType\n            This function does not return anything.\n        \"\"\"\n\n    assert (\n        numpy.help\n        == 'This is the short description that will appear.\\nThis extended description will also appear in the command description.'\n    )\n    assert (\n        numpy.clean_params['arg'].description\n        == 'Docstring description of arg. This is the second line of the arg docstring.'\n    )\n    assert numpy.clean_params['arg2'].description == 'Docstring description of arg2.'\n\n\ndef test_ext_commands_descriptions_cog_commands():\n    class MyCog(commands.Cog):\n        @commands.command()\n        async def test(self, ctx: commands.Context, arg: str, arg2: int) -> None:\n            \"\"\"Test command\n\n            Parameters\n            ----------\n            arg: str\n                Description of arg.\n                This is the second line of the arg description.\n            arg2: int\n                Description of arg2.\n            \"\"\"\n\n    cog = MyCog()\n    assert cog.test.help == 'Test command'\n    assert cog.test.clean_params['arg'].description == 'Description of arg. This is the second line of the arg description.'\n    assert cog.test.clean_params['arg2'].description == 'Description of arg2.'\n"
  },
  {
    "path": "tests/test_ext_tasks.py",
    "content": "# -*- coding: utf-8 -*-\n\n\"\"\"\n\nTests for discord.ext.tasks\n\n\"\"\"\n\nimport asyncio\nimport datetime\n\nimport pytest\nimport sys\n\nfrom discord import utils\nfrom discord.ext import tasks\n\n\n@pytest.mark.asyncio\nasync def test_explicit_initial_runs_tomorrow_single():\n    now = utils.utcnow()\n\n    if not ((0, 4) < (now.hour, now.minute) < (23, 59)):\n        await asyncio.sleep(5 * 60)  # sleep for 5 minutes\n\n    now = utils.utcnow()\n\n    has_run = False\n\n    async def inner():\n        nonlocal has_run\n        has_run = True\n\n    time = utils.utcnow() - datetime.timedelta(minutes=1)\n\n    # a loop that should have an initial run tomorrow\n    loop = tasks.loop(time=datetime.time(hour=time.hour, minute=time.minute))(inner)\n\n    loop.start()\n    await asyncio.sleep(1)\n\n    try:\n        assert not has_run\n    finally:\n        loop.cancel()\n\n\n@pytest.mark.asyncio\nasync def test_explicit_initial_runs_tomorrow_multi():\n    now = utils.utcnow()\n\n    if not ((0, 4) < (now.hour, now.minute) < (23, 59)):\n        await asyncio.sleep(5 * 60)  # sleep for 5 minutes\n\n    now = utils.utcnow()\n\n    # multiple times that are in the past for today\n    times = []\n    for _ in range(3):\n        now -= datetime.timedelta(minutes=1)\n        times.append(datetime.time(hour=now.hour, minute=now.minute))\n\n    has_run = False\n\n    async def inner():\n        nonlocal has_run\n        has_run = True\n\n    # a loop that should have an initial run tomorrow\n    loop = tasks.loop(time=times)(inner)\n\n    loop.start()\n    await asyncio.sleep(1)\n\n    try:\n        assert not has_run\n    finally:\n        loop.cancel()\n\n\ndef test_task_regression_issue7659():\n    jst = datetime.timezone(datetime.timedelta(hours=9))\n\n    # 00:00, 03:00, 06:00, 09:00, 12:00, 15:00, 18:00, 21:00\n    times = [datetime.time(hour=h, tzinfo=jst) for h in range(0, 24, 3)]\n\n    @tasks.loop(time=times)\n    async def loop():\n        pass\n\n    before_midnight = datetime.datetime(2022, 3, 12, 23, 50, 59, tzinfo=jst)\n    after_midnight = before_midnight + datetime.timedelta(minutes=9, seconds=2)\n\n    expected_before_midnight = datetime.datetime(2022, 3, 13, 0, 0, 0, tzinfo=jst)\n    expected_after_midnight = datetime.datetime(2022, 3, 13, 3, 0, 0, tzinfo=jst)\n\n    assert loop._get_next_sleep_time(before_midnight) == expected_before_midnight\n    assert loop._get_next_sleep_time(after_midnight) == expected_after_midnight\n\n    today = datetime.date.today()\n    minute_before = [datetime.datetime.combine(today, time, tzinfo=jst) - datetime.timedelta(minutes=1) for time in times]\n\n    for before, expected_time in zip(minute_before, times):\n        expected = datetime.datetime.combine(today, expected_time, tzinfo=jst)\n        actual = loop._get_next_sleep_time(before)\n        assert actual == expected\n\n\ndef test_task_regression_issue7676():\n    jst = datetime.timezone(datetime.timedelta(hours=9))\n\n    # 00:00, 03:00, 06:00, 09:00, 12:00, 15:00, 18:00, 21:00\n    times = [datetime.time(hour=h, tzinfo=jst) for h in range(0, 24, 3)]\n\n    @tasks.loop(time=times)\n    async def loop():\n        pass\n\n    # Create pseudo UTC times\n    now = utils.utcnow()\n    today = now.date()\n    times_before_in_utc = [\n        datetime.datetime.combine(today, time, tzinfo=jst).astimezone(datetime.timezone.utc) - datetime.timedelta(minutes=1)\n        for time in times\n    ]\n\n    for before, expected_time in zip(times_before_in_utc, times):\n        actual = loop._get_next_sleep_time(before)\n        actual_time = actual.timetz()\n        assert actual_time == expected_time\n\n\n@pytest.mark.skipif(sys.version_info < (3, 9), reason=\"zoneinfo requires 3.9\")\ndef test_task_is_imaginary():\n    import zoneinfo\n\n    tz = zoneinfo.ZoneInfo('America/New_York')\n\n    # 2:30 AM was skipped\n    dt = datetime.datetime(2022, 3, 13, 2, 30, tzinfo=tz)\n    assert tasks.is_imaginary(dt)\n\n    now = utils.utcnow()\n    # UTC time is never imaginary or ambiguous\n    assert not tasks.is_imaginary(now)\n\n\n@pytest.mark.skipif(sys.version_info < (3, 9), reason=\"zoneinfo requires 3.9\")\ndef test_task_is_ambiguous():\n    import zoneinfo\n\n    tz = zoneinfo.ZoneInfo('America/New_York')\n\n    # 1:30 AM happened twice\n    dt = datetime.datetime(2022, 11, 6, 1, 30, tzinfo=tz)\n    assert tasks.is_ambiguous(dt)\n\n    now = utils.utcnow()\n    # UTC time is never imaginary or ambiguous\n    assert not tasks.is_imaginary(now)\n\n\n@pytest.mark.skipif(sys.version_info < (3, 9), reason=\"zoneinfo requires 3.9\")\n@pytest.mark.parametrize(\n    ('dt', 'key', 'expected'),\n    [\n        (datetime.datetime(2022, 11, 6, 1, 30), 'America/New_York', datetime.datetime(2022, 11, 6, 1, 30, fold=1)),\n        (datetime.datetime(2022, 3, 13, 2, 30), 'America/New_York', datetime.datetime(2022, 3, 13, 3, 30)),\n        (datetime.datetime(2022, 4, 8, 2, 30), 'America/New_York', datetime.datetime(2022, 4, 8, 2, 30)),\n        (datetime.datetime(2023, 1, 7, 12, 30), 'UTC', datetime.datetime(2023, 1, 7, 12, 30)),\n    ],\n)\ndef test_task_date_resolve(dt, key, expected):\n    import zoneinfo\n\n    tz = zoneinfo.ZoneInfo(key)\n\n    actual = tasks.resolve_datetime(dt.replace(tzinfo=tz))\n    expected = expected.replace(tzinfo=tz)\n    assert actual == expected\n"
  },
  {
    "path": "tests/test_files.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom __future__ import annotations\n\nfrom io import BytesIO\n\nimport discord\n\n\nFILE = BytesIO()\n\n\ndef test_file_with_no_name():\n    f = discord.File('.gitignore')\n    assert f.filename == '.gitignore'\n\n\ndef test_io_with_no_name():\n    f = discord.File(FILE)\n    assert f.filename == 'untitled'\n\n\ndef test_file_with_name():\n    f = discord.File('.gitignore', 'test')\n    assert f.filename == 'test'\n\n\ndef test_io_with_name():\n    f = discord.File(FILE, 'test')\n    assert f.filename == 'test'\n\n\ndef test_file_with_no_name_and_spoiler():\n    f = discord.File('.gitignore', spoiler=True)\n    assert f.filename == 'SPOILER_.gitignore'\n    assert f.spoiler == True\n\n\ndef test_file_with_spoiler_name_and_implicit_spoiler():\n    f = discord.File('.gitignore', 'SPOILER_.gitignore')\n    assert f.filename == 'SPOILER_.gitignore'\n    assert f.spoiler == True\n\n\ndef test_file_with_spoiler_name_and_spoiler():\n    f = discord.File('.gitignore', 'SPOILER_.gitignore', spoiler=True)\n    assert f.filename == 'SPOILER_.gitignore'\n    assert f.spoiler == True\n\n\ndef test_file_with_spoiler_name_and_not_spoiler():\n    f = discord.File('.gitignore', 'SPOILER_.gitignore', spoiler=False)\n    assert f.filename == '.gitignore'\n    assert f.spoiler == False\n\n\ndef test_file_with_name_and_double_spoiler_and_implicit_spoiler():\n    f = discord.File('.gitignore', 'SPOILER_SPOILER_.gitignore')\n    assert f.filename == 'SPOILER_.gitignore'\n    assert f.spoiler == True\n\n\ndef test_file_with_name_and_double_spoiler_and_spoiler():\n    f = discord.File('.gitignore', 'SPOILER_SPOILER_.gitignore', spoiler=True)\n    assert f.filename == 'SPOILER_.gitignore'\n    assert f.spoiler == True\n\n\ndef test_file_with_name_and_double_spoiler_and_not_spoiler():\n    f = discord.File('.gitignore', 'SPOILER_SPOILER_.gitignore', spoiler=False)\n    assert f.filename == '.gitignore'\n    assert f.spoiler == False\n\n\ndef test_file_with_spoiler_with_overriding_name_not_spoiler():\n    f = discord.File('.gitignore', spoiler=True)\n    f.filename = '.gitignore'\n    assert f.filename == '.gitignore'\n    assert f.spoiler == False\n\n\ndef test_file_with_spoiler_with_overriding_name_spoiler():\n    f = discord.File('.gitignore', spoiler=True)\n    f.filename = 'SPOILER_.gitignore'\n    assert f.filename == 'SPOILER_.gitignore'\n    assert f.spoiler == True\n\n\ndef test_file_not_spoiler_with_overriding_name_not_spoiler():\n    f = discord.File('.gitignore')\n    f.filename = '.gitignore'\n    assert f.filename == '.gitignore'\n    assert f.spoiler == False\n\n\ndef test_file_not_spoiler_with_overriding_name_spoiler():\n    f = discord.File('.gitignore')\n    f.filename = 'SPOILER_.gitignore'\n    assert f.filename == 'SPOILER_.gitignore'\n    assert f.spoiler == True\n\n\ndef test_file_not_spoiler_with_overriding_name_double_spoiler():\n    f = discord.File('.gitignore')\n    f.filename = 'SPOILER_SPOILER_.gitignore'\n    assert f.filename == 'SPOILER_.gitignore'\n    assert f.spoiler == True\n"
  },
  {
    "path": "tests/test_ui_selects.py",
    "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\"\"\"\n\nfrom __future__ import annotations\n\nimport discord\nimport pytest\n\n\n@pytest.mark.asyncio\nasync def test_add_option():\n    select = discord.ui.Select()\n\n    for i in range(1, 25 + 1):\n        select.add_option(label=str(i), value=str(i))\n\n    with pytest.raises(ValueError):\n        select.add_option(label=\"26\", value=\"26\")\n"
  },
  {
    "path": "tests/test_utils.py",
    "content": "# -*- coding: utf-8 -*-\n\n\"\"\"\n\nTests for discord.utils\n\n\"\"\"\n\nimport datetime\nimport random\nimport collections\nimport secrets\nimport sys\nimport time\nimport typing\n\nimport pytest\n\nfrom discord import utils\n\n\n# Async generator for async support\nasync def async_iterate(array):\n    for item in array:\n        yield item\n\n\ndef test_cached_properties():\n    # cached_property\n    class Test:\n        @utils.cached_property\n        def time(self) -> float:\n            return time.perf_counter()\n\n    instance = Test()\n\n    assert instance.time == instance.time\n\n    # cached_slot_property\n    class TestSlotted:\n        __slots__ = '_cs_time'\n\n        @utils.cached_slot_property('_cs_time')\n        def time(self) -> float:\n            return time.perf_counter()\n\n    instance = TestSlotted()\n\n    assert instance.time == instance.time\n    assert not hasattr(instance, '__dict__')\n\n\n@pytest.mark.parametrize(\n    ('snowflake', 'time_tuple'),\n    [\n        (10000000000000000, (2015, 1, 28, 14, 16, 25)),\n        (12345678901234567, (2015, 2, 4, 1, 37, 19)),\n        (100000000000000000, (2015, 10, 3, 22, 44, 17)),\n        (123456789012345678, (2015, 12, 7, 16, 13, 12)),\n        (661720302316814366, (2020, 1, 1, 0, 0, 14)),\n        (1000000000000000000, (2022, 7, 22, 11, 22, 59)),\n    ],\n)\ndef test_snowflake_time(snowflake: int, time_tuple: typing.Tuple[int, int, int, int, int, int]):\n    dt = utils.snowflake_time(snowflake)\n\n    assert (dt.year, dt.month, dt.day, dt.hour, dt.minute, dt.second) == time_tuple\n\n    assert utils.time_snowflake(dt, high=False) <= snowflake <= utils.time_snowflake(dt, high=True)\n\n\n@pytest.mark.asyncio\nasync def test_get_find():\n    # Generate a dictionary of random keys to values\n    mapping = {secrets.token_bytes(32): secrets.token_bytes(32) for _ in range(100)}\n\n    # Turn it into a shuffled iterable of pairs\n    pair = collections.namedtuple('pair', 'key value')\n    array = [pair(key=k, value=v) for k, v in mapping.items()]\n    random.shuffle(array)\n\n    # Confirm all values can be found\n    for key, value in mapping.items():\n        # Sync get\n        item = utils.get(array, key=key)\n        assert item is not None\n        assert item.value == value\n\n        # Async get\n        item = await utils.get(async_iterate(array), key=key)\n        assert item is not None\n        assert item.value == value\n\n        # Sync find\n        item = utils.find(lambda i: i.key == key, array)\n        assert item is not None\n        assert item.value == value\n\n        # Async find\n        item = await utils.find(lambda i: i.key == key, async_iterate(array))\n        assert item is not None\n        assert item.value == value\n\n\ndef test_get_slots():\n    class A:\n        __slots__ = ('one', 'two')\n\n    class B(A):\n        __slots__ = ('three', 'four')\n\n    class C(B):\n        __slots__ = ('five', 'six')\n\n    assert set(utils.get_slots(C)) == {'one', 'two', 'three', 'four', 'five', 'six'}\n\n\ndef test_valid_icon_size():\n    # Valid icon sizes\n    for size in [16, 32, 64, 128, 256, 512, 1024, 2048, 4096]:\n        assert utils.valid_icon_size(size)\n\n    # Some not valid icon sizes\n    for size in [-1, 0, 20, 103, 500, 8192]:\n        assert not utils.valid_icon_size(size)\n\n\n@pytest.mark.parametrize(\n    ('url', 'code'),\n    [\n        ('https://discordapp.com/invite/dpy', 'dpy'),\n        ('https://discord.com/invite/dpy', 'dpy'),\n        ('https://discord.gg/dpy', 'dpy'),\n    ],\n)\ndef test_resolve_invite(url, code):\n    assert utils.resolve_invite(url).code == code\n\n\n@pytest.mark.parametrize(\n    ('url', 'event_id'),\n    [\n        ('https://discordapp.com/invite/dpy', None),\n        ('https://discord.com/invite/dpy', None),\n        ('https://discord.gg/dpy', None),\n        ('https://discordapp.com/invite/dpy?event=22222222', 22222222),\n        ('https://discord.com/invite/dpy?event=4098', 4098),\n        ('https://discord.gg/dpy?event=727', 727),\n    ],\n)\ndef test_resolve_invite_event(url, event_id: typing.Optional[int]):\n    assert utils.resolve_invite(url).event == event_id\n\n\n@pytest.mark.parametrize(\n    ('url', 'code'),\n    [\n        ('https://discordapp.com/template/foobar', 'foobar'),\n        ('https://discord.com/template/foobar', 'foobar'),\n        ('https://discord.new/foobar', 'foobar'),\n    ],\n)\ndef test_resolve_template(url, code):\n    assert utils.resolve_template(url) == code\n\n\n@pytest.mark.parametrize(\n    'mention', ['@everyone', '@here', '<@80088516616269824>', '<@!80088516616269824>', '<@&381978264698224660>']\n)\ndef test_escape_mentions(mention):\n    assert mention not in utils.escape_mentions(mention)\n    assert mention not in utils.escape_mentions(f\"one {mention} two\")\n\n\n@pytest.mark.asyncio\n@pytest.mark.parametrize(\n    ('source', 'chunk_size', 'chunked'),\n    [\n        ([1, 2, 3, 4, 5, 6], 2, [[1, 2], [3, 4], [5, 6]]),\n        ([1, 2, 3, 4, 5, 6], 3, [[1, 2, 3], [4, 5, 6]]),\n        ([1, 2, 3, 4, 5, 6], 4, [[1, 2, 3, 4], [5, 6]]),\n        ([1, 2, 3, 4, 5, 6], 5, [[1, 2, 3, 4, 5], [6]]),\n    ],\n)\nasync def test_as_chunks(source, chunk_size, chunked):\n    assert [x for x in utils.as_chunks(source, chunk_size)] == chunked\n    assert [x async for x in utils.as_chunks(async_iterate(source), chunk_size)] == chunked\n\n\n@pytest.mark.parametrize(\n    ('annotation', 'resolved'),\n    [\n        (datetime.datetime, datetime.datetime),\n        ('datetime.datetime', datetime.datetime),\n        ('typing.Union[typing.Literal[\"a\"], typing.Literal[\"b\"]]', typing.Union[typing.Literal[\"a\"], typing.Literal[\"b\"]]),\n        ('typing.Union[typing.Union[int, str], typing.Union[bool, dict]]', typing.Union[int, str, bool, dict]),\n    ],\n)\ndef test_resolve_annotation(annotation, resolved):\n    assert resolved == utils.resolve_annotation(annotation, globals(), locals(), None)\n\n\n@pytest.mark.parametrize(\n    ('annotation', 'resolved', 'check_cache'),\n    [\n        (datetime.datetime, datetime.datetime, False),\n        ('datetime.datetime', datetime.datetime, True),\n        (\n            'typing.Union[typing.Literal[\"a\"], typing.Literal[\"b\"]]',\n            typing.Union[typing.Literal[\"a\"], typing.Literal[\"b\"]],\n            True,\n        ),\n        ('typing.Union[typing.Union[int, str], typing.Union[bool, dict]]', typing.Union[int, str, bool, dict], True),\n    ],\n)\ndef test_resolve_annotation_with_cache(annotation, resolved, check_cache):\n    cache = {}\n\n    assert resolved == utils.resolve_annotation(annotation, globals(), locals(), cache)\n\n    if check_cache:\n        assert len(cache) == 1\n\n        cached_item = cache[annotation]\n\n        latest = utils.resolve_annotation(annotation, globals(), locals(), cache)\n\n        assert latest is cached_item\n        assert typing.get_origin(latest) is typing.get_origin(resolved)\n    else:\n        assert len(cache) == 0\n\n\ndef test_resolve_annotation_optional_normalisation():\n    value = utils.resolve_annotation('typing.Union[None, int]', globals(), locals(), None)\n    assert value.__args__ == (int, type(None))\n\n\n@pytest.mark.skipif(sys.version_info < (3, 10), reason=\"3.10 union syntax\")\n@pytest.mark.parametrize(\n    ('annotation', 'resolved'),\n    [\n        ('int | None', typing.Optional[int]),\n        ('str | int', typing.Union[str, int]),\n        ('str | int | None', typing.Optional[typing.Union[str, int]]),\n    ],\n)\ndef test_resolve_annotation_310(annotation, resolved):\n    assert resolved == utils.resolve_annotation(annotation, globals(), locals(), None)\n\n\n@pytest.mark.skipif(sys.version_info < (3, 10), reason=\"3.10 union syntax\")\n@pytest.mark.parametrize(\n    ('annotation', 'resolved'),\n    [\n        ('int | None', typing.Optional[int]),\n        ('str | int', typing.Union[str, int]),\n        ('str | int | None', typing.Optional[typing.Union[str, int]]),\n    ],\n)\ndef test_resolve_annotation_with_cache_310(annotation, resolved):\n    cache = {}\n\n    assert resolved == utils.resolve_annotation(annotation, globals(), locals(), cache)\n    assert typing.get_origin(resolved) is typing.Union\n\n    assert len(cache) == 1\n\n    cached_item = cache[annotation]\n\n    latest = utils.resolve_annotation(annotation, globals(), locals(), cache)\n    assert latest is cached_item\n    assert typing.get_origin(latest) is typing.get_origin(resolved)\n\n\n# is_inside_class tests\n\n\ndef not_a_class():\n    def not_a_class_either():\n        pass\n\n    return not_a_class_either\n\n\nclass ThisIsAClass:\n    def in_a_class(self):\n        def not_directly_in_a_class():\n            pass\n\n        return not_directly_in_a_class\n\n    @classmethod\n    def a_class_method(cls):\n        def not_directly_in_a_class():\n            pass\n\n        return not_directly_in_a_class\n\n    @staticmethod\n    def a_static_method():\n        def not_directly_in_a_class():\n            pass\n\n        return not_directly_in_a_class\n\n    class SubClass:\n        pass\n\n\ndef test_is_inside_class():\n    assert not utils.is_inside_class(not_a_class)\n    assert not utils.is_inside_class(not_a_class())\n    assert not utils.is_inside_class(ThisIsAClass)\n    assert utils.is_inside_class(ThisIsAClass.in_a_class)\n    assert utils.is_inside_class(ThisIsAClass.a_class_method)\n    assert utils.is_inside_class(ThisIsAClass.a_static_method)\n    assert not utils.is_inside_class(ThisIsAClass().in_a_class())\n    assert not utils.is_inside_class(ThisIsAClass.a_class_method())\n    assert not utils.is_inside_class(ThisIsAClass().a_static_method())\n    assert not utils.is_inside_class(ThisIsAClass.a_static_method())\n    # Only really designed for callables, although I guess it is callable due to the constructor\n    assert utils.is_inside_class(ThisIsAClass.SubClass)\n\n\n@pytest.mark.parametrize(\n    ('dt', 'style', 'formatted'),\n    [\n        (datetime.datetime(1970, 1, 1, 0, 0, 0, 0, tzinfo=datetime.timezone.utc), None, '<t:0>'),\n        (datetime.datetime(2020, 1, 1, 0, 0, 0, 0, tzinfo=datetime.timezone.utc), None, '<t:1577836800>'),\n        (datetime.datetime(2020, 1, 1, 0, 0, 0, 0, tzinfo=datetime.timezone.utc), 'F', '<t:1577836800:F>'),\n        (datetime.datetime(2033, 5, 18, 3, 33, 20, 0, tzinfo=datetime.timezone.utc), 'D', '<t:2000000000:D>'),\n    ],\n)\ndef test_format_dt(dt: datetime.datetime, style: typing.Optional[utils.TimestampStyle], formatted: str):\n    assert utils.format_dt(dt, style=style) == formatted\n"
  }
]